@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Cores Oficiais da Logo Meta Educ AI: Azul (#0048B4), Laranja (#E87722) e Branco */
  --brand-blue: #0048B4;
  --brand-blue-dark: #003688;
  --brand-blue-light: #1A62D6;
  --logo-blue: #0048B4;
  --brand-blue-sky: #4da1e8;
  --brand-blue-soft: #EAF1FD;

  --brand-orange: #E87722;
  --brand-orange-hover: #D46513;
  --brand-orange-soft: #FFF3EB;

  --brand-white: #FFFFFF;

  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --surface-elevated: #EBF2FA;
  --surface-subtle: #F8FAFD;
  --border: #D8E3F0;
  --border-hover: #B8CCE4;
  --border-focus: #0048B4;

  --text: #0048B4;
  --text-secondary: #4A6B8C;
  --text-muted: #6E8BA8;

  --primary-bg: #E87722;
  --primary-text: #FFFFFF;
  --primary-hover: #D46513;

  --live: #ef4444;
  --success: #10b981;
  --danger: #ef4444;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14px;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle top hairline grid effect */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(0, 72, 180, 0.06) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Utilitário de Acessibilidade: Ocultar texto visualmente preservando para leitores de tela */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---- TOPBAR (Professor & Aluno) ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
  border-bottom: 2px solid var(--brand-orange);
  box-shadow: 0 4px 16px rgba(0, 72, 180, 0.18);
}

.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-decoration: none;
}

.brand-icon-box {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-icon-box .svg-icon {
  width: 15px;
  height: 15px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Room Code Pill */
.room-badge-group {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 2px 4px 2px 10px;
  font-size: 12px;
  gap: 6px;
  height: 30px;
}

.room-badge-group .label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.room-badge-group .code {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text);
}

.btn-icon-tiny {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
}
.btn-icon-tiny:hover {
  background: var(--surface-elevated);
  color: var(--text);
}

/* Status Badges com Imagens Personalizadas */
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent !important;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 0 10px 0 8px;
  height: 28px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.badge-live .dot {
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
  animation: pulse 1.6s infinite;
}

.status-badge-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.badge-live .status-badge-icon {
  animation: pulse 1.6s infinite;
}

.badge-off {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0 10px 0 6px;
  height: 28px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
}

.stage-empty-img-box {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stage-empty-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.rec-badge-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.dock-rec-btn-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.dock-btn-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.dock-launcher-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.dock-circle-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.dock-option-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.badge-rec {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.35);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-role {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0 10px;
  height: 30px;
  border-radius: var(--radius-xs);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ---- BUTTONS (Vercel / Linear Monochrome) ---- */
button, .btn {
  font-family: var(--font-main);
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 0 14px;
  height: 36px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
  outline: none;
  text-decoration: none;
  white-space: nowrap;
}

button:active, .btn:active {
  transform: scale(0.985);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary-bg);
  color: var(--primary-text);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface-elevated);
  border-color: var(--border-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-lg {
  height: 40px;
  padding: 0 18px;
  font-size: 13.5px;
}

.btn-full {
  width: 100%;
}

/* ---- INPUTS ---- */
.input-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 13.5px;
  transition: border-color 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--text-secondary);
}

input::placeholder {
  color: var(--text-muted);
}

/* Segmented Role Selector (Professor / Aluno) */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.role-option {
  height: 34px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.role-option.active {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border-hover);
}


/* ---- TOAST & ERROR ---- */
.toast-notice {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hover);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 100;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: all 0.2s ease;
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

.error-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  margin-top: 14px;
  display: none;
}

/* SVG Icons */
.svg-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.svg-icon-lg {
  width: 20px;
  height: 20px;
}
.svg-icon-xl {
  width: 32px;
  height: 32px;
}

/* ==========================================================================

/* Logo Redonda Oficial com Azul da Logo (#0048B4) */
.logo-round-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.logo-round-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--logo-blue, #0048B4);
  box-shadow: 0 4px 14px rgba(0, 72, 180, 0.25);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: width 0.25s ease, height 0.25s ease, transform 0.2s ease, border-color 0.2s ease;
}

.logo-round-circle:hover {
  transform: scale(1.04);
}

.logo-round-img {
  width: 122%;
  height: 122%;
  object-fit: contain;
  display: block;
}

.logo-round-lg {
  width: 84px;
  height: 84px;
  border: 3px solid var(--logo-blue, #0048B4);
}

.logo-round-sm {
  width: 44px;
  height: 44px;
  border: 2px solid var(--logo-blue, #0048B4);
}

.auth-logo-center {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

body.sidebar-collapsed .logo-round-circle {
  width: 46px;
  height: 46px;
  border: 2px solid var(--logo-blue, #0048B4);
}
