/* =====================================================
   SAEB — Sistema de Gestão de Avaliações Educacionais
   Design System: Dark Mode + Glassmorphism + Semaphore
   Font: Inter (Google Fonts)
   ===================================================== */

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

:root {
  /* Base Colors */
  --bg-primary:    #0a0f1e;
  --bg-secondary:  #0f172a;
  --bg-card:       rgba(15, 23, 42, 0.85);
  --bg-glass:      rgba(255, 255, 255, 0.04);
  --bg-glass-hover:rgba(255, 255, 255, 0.07);
  --border:        rgba(255, 255, 255, 0.08);
  --border-focus:  rgba(99, 102, 241, 0.6);

  /* Brand */
  --accent:       #6366f1;
  --accent-light: #818cf8;
  --accent-dark:  #4f46e5;
  --accent-glow:  rgba(99, 102, 241, 0.3);

  /* Text */
  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  /* Semaphore / Proficiency */
  --color-abaixo:   #ef4444;   /* Abaixo do Básico */
  --color-basico:   #f97316;   /* Básico */
  --color-adequado: #eab308;   /* Adequado */
  --color-avancado: #22c55e;   /* Avançado */

  --bg-abaixo:   rgba(239, 68, 68,  0.15);
  --bg-basico:   rgba(249, 115, 22, 0.15);
  --bg-adequado: rgba(234, 179, 8,  0.15);
  --bg-avancado: rgba(34, 197, 94,  0.15);

  /* Role Colors */
  --role-admin:       #a855f7;
  --role-coordenador: #0ea5e9;
  --role-professor:   #22c55e;
  --role-avaliador:   #f97316;

  /* Spacing */
  --radius:    12px;
  --radius-lg: 20px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 30px var(--accent-glow);
}

/* Light Theme Overrides */
.light-theme {
  --bg-primary:    #f1f5f9;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-glass:      rgba(255, 255, 255, 0.7);
  --bg-glass-hover:rgba(0, 0, 0, 0.03);
  --border:        #e2e8f0;
  --border-focus:  var(--accent);

  /* Brand adjusted for light */
  --accent-glow:  rgba(99, 102, 241, 0.15);

  /* Text */
  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;

  /* Shadows for light */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 25px rgba(0,0,0,0.12);

  /* Semaphore backgrounds (softer for light) */
  --bg-abaixo:   rgba(239, 68, 68,  0.08);
  --bg-basico:   rgba(249, 115, 22, 0.08);
  --bg-adequado: rgba(234, 179, 8,  0.08);
  --bg-avancado: rgba(34, 197, 94,  0.08);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.06) 0%, transparent 50%);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.light-theme body {
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.03) 0%, transparent 50%);
}

/* =====================================================
   LAYOUT
   ===================================================== */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  min-height: 100vh;
  background: rgba(10,15,30,0.95);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  transition: transform 0.3s ease;
}

.light-theme .sidebar {
  background: rgba(255, 255, 255, 0.95);
  border-right: 1px solid var(--border);
}

.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar-brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.75rem;
}

.sidebar-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 20px var(--accent-glow);
}

.sidebar-title { font-weight: 800; font-size: 0.95rem; line-height: 1.2; }
.sidebar-subtitle { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }

.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 1.25rem 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.nav-item.active {
  color: var(--accent-light);
  background: rgba(99,102,241,0.1);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-light));
  border-radius: 0 2px 2px 0;
}

.nav-icon { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.85; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: #fff;
  flex-shrink: 0;
}

.user-name  { font-size: 0.8rem; font-weight: 600; }
.user-role  { font-size: 0.7rem; color: var(--text-muted); text-transform: capitalize; }

.badge-role {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-role.admin       { background: rgba(168,85,247,0.15); color: var(--role-admin); }
.badge-role.coordenador { background: rgba(14,165,233,0.15); color: var(--role-coordenador); }
.badge-role.professor   { background: rgba(34,197,94,0.15);  color: var(--role-professor); }
.badge-role.avaliador   { background: rgba(249,115,22,0.15); color: var(--role-avaliador); }

/* =====================================================
   TOPBAR
   ===================================================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-title    { font-size: 1.6rem; font-weight: 800; }
.page-subtitle { font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover { border-color: var(--border-focus); }

.card-glass {
  background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(30,41,59,0.7));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(30px);
  box-shadow: var(--shadow-md);
}

.light-theme .card-glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(241,245,249,0.7));
}

.stat-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.2rem; }
.stat-delta { font-size: 0.72rem; margin-top: 0.3rem; color: var(--color-avancado); }

/* =====================================================
   TABS
   ===================================================== */
.tab-container { margin-bottom: 2rem; }

.tab-bar {
  display: flex;
  gap: 0.25rem;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius);
  padding: 0.3rem;
  border: 1px solid var(--border);
  overflow-x: auto;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: inherit;
}

.tab-btn:hover { background: var(--bg-glass-hover); color: var(--text-primary); }

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,0.4);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  background: rgba(255,255,255,0.06);
}

.form-control::placeholder { color: var(--text-muted); }
.form-select option { background: var(--bg-secondary); }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 2px 10px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(99,102,241,0.5); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-glass-hover); color: var(--text-primary); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--color-abaixo);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-success {
  background: rgba(34,197,94,0.15);
  color: var(--color-avancado);
  border: 1px solid rgba(34,197,94,0.3);
}
.btn-success:hover { background: rgba(34,197,94,0.25); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.78rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* Alternative Choice Buttons (A/B/C/D/E) */
.alt-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex; align-items: center; justify-content: center;
}

.alt-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(99,102,241,0.1);
}

.alt-btn.selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 15px rgba(99,102,241,0.4);
}

.alt-btn.correct {
  background: rgba(34,197,94,0.2);
  border-color: var(--color-avancado);
  color: var(--color-avancado);
}

.alt-btn.wrong {
  background: rgba(239,68,68,0.15);
  border-color: var(--color-abaixo);
  color: var(--color-abaixo);
}

/* =====================================================
   TABLE
   ===================================================== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

thead th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s ease;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-glass); }

tbody td {
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  vertical-align: middle;
}

/* =====================================================
   PROFICIENCY / HEATMAP
   ===================================================== */
.proficiency-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.proficiency-badge.abaixo   { background: var(--bg-abaixo);   color: var(--color-abaixo);   border: 1px solid rgba(239,68,68,0.3); }
.proficiency-badge.basico   { background: var(--bg-basico);   color: var(--color-basico);   border: 1px solid rgba(249,115,22,0.3); }
.proficiency-badge.adequado { background: var(--bg-adequado); color: var(--color-adequado); border: 1px solid rgba(234,179,8,0.3); }
.proficiency-badge.avancado { background: var(--bg-avancado); color: var(--color-avancado); border: 1px solid rgba(34,197,94,0.3); }

/* Heatmap Bar */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.heatmap-cell {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
  cursor: default;
}
.heatmap-cell:hover { transform: translateY(-2px); }

.heatmap-cell.level-0 { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); }
.heatmap-cell.level-1 { background: rgba(249,115,22,0.2);border-color: rgba(249,115,22,0.4); }
.heatmap-cell.level-2 { background: rgba(234,179,8,0.2); border-color: rgba(234,179,8,0.4); }
.heatmap-cell.level-3 { background: rgba(34,197,94,0.2); border-color: rgba(34,197,94,0.4); }

.heatmap-code  { font-size: 0.8rem; font-weight: 700; margin-bottom: 0.2rem; }
.heatmap-pct   { font-size: 1.3rem; font-weight: 800; }
.heatmap-desc  { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.15rem; line-height: 1.3; }

/* Progress Bar */
.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-abaixo   { background: linear-gradient(to right, var(--color-abaixo),   #b91c1c); }
.fill-basico   { background: linear-gradient(to right, var(--color-basico),   #c2410c); }
.fill-adequado { background: linear-gradient(to right, var(--color-adequado), #a16207); }
.fill-avancado { background: linear-gradient(to right, var(--color-avancado), #15803d); }

/* =====================================================
   QR CODE CONTAINER
   ===================================================== */
.qr-container {
  display: flex; flex-direction: column;
  align-items: center; gap: 0.75rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  color: #000;
  width: fit-content;
}

.qr-container canvas, .qr-container img { border-radius: 4px; }
.qr-student-name { font-weight: 700; font-size: 0.85rem; text-align: center; }

/* QR Print grid */
.qr-print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* =====================================================
   ALERTS / NOTIFICATIONS
   ===================================================== */
.alert {
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-success { background: rgba(34,197,94,0.12);  border: 1px solid rgba(34,197,94,0.3);  color: #4ade80; }
.alert-danger  { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.3);  color: #f87171; }
.alert-warning { background: rgba(234,179,8,0.12);  border: 1px solid rgba(234,179,8,0.3);  color: #fbbf24; }
.alert-info    { background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.3); color: #a5b4fc; }

/* =====================================================
   MODALS
   ===================================================== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 540px;
  margin: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.25rem;
  padding: 0.25rem;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }

/* =====================================================
   SCANNER (Mobile-first)
   ===================================================== */
.scanner-container {
  max-width: 480px;
  margin: 0 auto;
}

#qr-reader {
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
}

.scanner-result {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-sm);
  display: none;
}

.scanner-result.show { display: block; }
.scanner-student-name { font-size: 1.1rem; font-weight: 700; color: var(--color-avancado); }

/* =====================================================
   QUESTION GRID (Manual Entry)
   ===================================================== */
.question-grid {
  display: flex; flex-direction: column; gap: 0.75rem;
}

.question-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.question-row.answered { border-color: rgba(99,102,241,0.3); }
.question-row.omitida  { border-color: rgba(239,68,68,0.3); }

.question-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 50px;
  flex-shrink: 0;
}

.alt-group { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* =====================================================
   CHART.JS OVERRIDES
   ===================================================== */
.chart-wrapper { position: relative; }
.chart-legend  {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: center; margin-top: 1rem;
  font-size: 0.78rem;
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%; display: inline-block; margin-right: 4px;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(99,102,241,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 60%, rgba(168,85,247,0.08) 0%, transparent 50%),
    var(--bg-primary);
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(30px);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(99,102,241,0.1);
}

.login-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 30px var(--accent-glow);
}

.login-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* =====================================================
   UTILS
   ===================================================== */
.grid    { display: grid; }
.g-2     { grid-template-columns: 1fr 1fr; gap: 1rem; }
.g-3     { grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.g-4     { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.flex    { display: flex; }
.items-c { align-items: center; }
.justify-b { justify-content: space-between; }
.gap-1   { gap: 0.5rem; }
.gap-2   { gap: 1rem; }
.mb-1    { margin-bottom: 0.5rem; }
.mb-2    { margin-bottom: 1rem; }
.mb-3    { margin-bottom: 1.5rem; }
.mb-4    { margin-bottom: 2rem; }
.mt-2    { margin-top: 1rem; }
.mt-3    { margin-top: 1.5rem; }
.text-sm { font-size: 0.8rem; }
.text-muted { color: var(--text-secondary); }
.fw-700  { font-weight: 700; }
.fw-800  { font-weight: 800; }
.text-center { text-align: center; }
.w-100   { width: 100%; }
.d-none  { display: none !important; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.animate-in { animation: fadeIn 0.3s ease; }

/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar            { width: 6px; height: 6px; }
::-webkit-scrollbar-track      { background: transparent; }
::-webkit-scrollbar-thumb      { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* =====================================================
   PRINT STYLES (QR Codes + Relatórios)
   ===================================================== */
@media print {
  .sidebar, .topbar .btn, .no-print { display: none !important; }
  .main-content { margin-left: 0; padding: 0; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ddd; }
  .qr-print-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =====================================================
   RESPONSIVE (Mobile: Avaliador)
   ===================================================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }

  .main-content { margin-left: 0; padding: 1rem; }

  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }

  .topbar {
    flex-direction: column; align-items: flex-start;
    gap: 1rem;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
  }

  .alt-btn { width: 44px; height: 44px; }
}

@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
}
