/* Dashboard Direct View Layout - 100% Fullscreen Edge-to-Edge */
html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: #f8fafc;
  user-select: none;
  font-family: var(--font-sans);
}

.dashboard-page.direct-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  position: fixed;
  inset: 0;
  overflow: hidden;
  background-color: #f8fafc;
}

.dashboard-viewport.full-screen-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  outline: none;
}

.portal-iframe {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border: none;
  margin: 0;
  padding: 0;
  display: block;
  background-color: #ffffff;
  position: absolute;
  inset: 0;
}

/* Loading Splash Screen */
.stream-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stream-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-logo-wrap {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0;
}

.loading-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portal-spinner {
  width: 34px;
  height: 34px;
  border: 3.5px solid rgba(0, 191, 216, 0.2);
  border-top-color: #00BFD8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
}

/* Overlay Glass Card for Errors */
.overlay-glass-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

.error-badge-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.overlay-glass-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.overlay-glass-card p {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

.btn-primary {
  display: inline-block;
  background: #00BFD8;
  color: #0a192f;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 191, 216, 0.35);
}

.btn-primary:hover {
  background: #009eb5;
  box-shadow: 0 6px 20px rgba(0, 191, 216, 0.5);
  transform: translateY(-1px);
}
