/* ============================================================
   OMR System — Design System
   Aesthetic: Technical / Precision / Monochrome + Electric
   Fonts: Space Mono (display) + DM Sans (body)
   ============================================================ */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #0d0f12;
  --bg-card:     #141720;
  --bg-input:    #1a1e28;
  --bg-hover:    #1f2435;
  --border:      #252a38;
  --border-focus:#4a90d9;

  --text:        #e8eaf0;
  --text-muted:  #6b7394;
  --text-dim:    #3d4460;

  --primary:     #4a90d9;
  --primary-dark:#3370b8;
  --accent:      #00e5a0;
  --danger:      #ff4d6a;
  --warn:        #ffb547;
  --success:     #00e5a0;

  --acerto-bg:   #00291e;
  --acerto-text: #00e5a0;
  --erro-bg:     #2a0d15;
  --erro-text:   #ff4d6a;
  --branco-bg:   #1c1f2b;
  --branco-text: #6b7394;

  --radius:      8px;
  --radius-lg:   14px;
  --shadow:      0 2px 16px rgba(0,0,0,.4);
  --shadow-card: 0 4px 24px rgba(0,0,0,.5);

  --font-mono:   'Space Mono', monospace;
  --font-body:   'DM Sans', sans-serif;

  --nav-h:       56px;
  --transition:  .18s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

input, select, textarea, button {
  font-family: var(--font-body);
  font-size: 15px;
}

/* ─── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(13,15,18,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  z-index: 1000;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-right: 1rem;
}

.nav-logo {
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
}

.nav-name {
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: .25rem;
  flex: 1;
}

.nav-link {
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-link.active { color: var(--accent); }

.nav-admin { color: var(--warn) !important; }

.nav-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
}

.badge-admin { background: rgba(255,181,71,.15); color: var(--warn); }
.badge-prof  { background: rgba(74,144,217,.15); color: var(--primary); }

.nav-username {
  font-size: .85rem;
  color: var(--text-muted);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-logout {
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: .25rem;
  transition: var(--transition);
}
.nav-logout:hover { color: var(--danger); }

/* ─── Main Content ───────────────────────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.main-content.has-nav {
  padding-top: calc(var(--nav-h) + 2rem);
}

/* ─── Page Header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.page-desc {
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: .25rem;
}

.header-actions { display: flex; gap: .75rem; }

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text);
}

.card-action {
  font-size: .85rem;
  color: var(--text-muted);
}
.card-action:hover { color: var(--accent); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text);
}
.btn-secondary:hover { background: var(--border); }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-hover); color: var(--text); }

.btn-full { width: 100%; justify-content: center; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-sm {
  display: inline-flex;
  align-items: center;
  padding: .25rem .65rem;
  border-radius: 5px;
  font-size: .8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-edit   { background: rgba(74,144,217,.15); color: var(--primary); }
.btn-edit:hover { background: rgba(74,144,217,.3); }
.btn-danger { background: rgba(255,77,106,.12); color: var(--danger); }
.btn-danger:hover { background: rgba(255,77,106,.25); }
.btn-sm.btn-primary { background: var(--primary); color: #fff; }
.btn-sm.btn-primary:hover { background: var(--primary-dark); }

/* ─── Form Elements ──────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }

.field-label {
  font-size: .825rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.field-label small {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
}

.field-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: .65rem 1rem;
  width: 100%;
  transition: border-color var(--transition);
  outline: none;
}

.field-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(74,144,217,.15);
}

.field-textarea { resize: vertical; min-height: 70px; }

.field-hint { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

.field-password { position: relative; }
.pwd-toggle {
  position: absolute; right: .75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem;
  padding: .25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-row .field-group { flex: 1; min-width: 200px; }

.form-card { max-width: 760px; }

.form-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* Toggle */
.toggle-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: .5rem;
}

.toggle-label input[type="checkbox"] { display: none; }

.toggle-track {
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}

.toggle-label input:checked + .toggle-track {
  background: var(--accent);
}
.toggle-label input:checked + .toggle-track::after {
  transform: translateX(18px);
  background: #fff;
}

/* ─── Flash messages ─────────────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: .9rem;
  font-weight: 500;
}

.flash button {
  background: none; border: none;
  color: inherit; cursor: pointer;
  font-size: 1rem; opacity: .7;
}
.flash button:hover { opacity: 1; }

.flash-error   { background: rgba(255,77,106,.12); border: 1px solid rgba(255,77,106,.3); color: #ff8fa0; }
.flash-success { background: rgba(0,229,160,.1);   border: 1px solid rgba(0,229,160,.3);  color: var(--accent); }
.flash-warn    { background: rgba(255,181,71,.1);   border: 1px solid rgba(255,181,71,.3); color: var(--warn); }

/* ─── Auth ───────────────────────────────────────────────────── */
.auth-body {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

.auth-container {
  width: 420px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  z-index: 1;
}

.auth-brand { margin-bottom: 2.5rem; }

.auth-logo {
  font-size: 3rem;
  color: var(--accent);
  display: block;
  margin-bottom: .5rem;
  animation: spin 20s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.auth-title {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
}

.auth-subtitle {
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

.auth-form { margin-bottom: 1.5rem; }

.auth-footer {
  font-size: .8rem;
  color: var(--text-dim);
  text-align: center;
}

.auth-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.auth-visual::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,160,.05), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: .5; transform: translate(-50%,-50%) scale(1); }
  50%       { opacity: 1;  transform: translate(-50%,-50%) scale(1.1); }
}

.card-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  position: relative;
  z-index: 1;
}

.cp-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cp-num {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-muted);
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.cp-bubble {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: background var(--transition);
}

.cp-bubble.filled {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(0,229,160,.4);
}

/* ─── Stats Grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  transition: border-color var(--transition);
}

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

.stat-card-icon { font-size: 1.5rem; margin-bottom: .25rem; }
.stat-card-val  { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-card-label{ font-size: .8rem; color: var(--text-muted); }

/* ─── Admin grid ─────────────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
}

/* ─── Table ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.data-table th {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(37,42,56,.7);
  color: var(--text);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--bg-hover); }
.data-table .row-inactive td { opacity: .5; }

.actions-cell { display: flex; gap: .5rem; align-items: center; }

.link-action {
  font-size: .8rem;
  color: var(--primary);
  font-weight: 500;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.nota-badge {
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 4px;
  display: inline-block;
}

.nota-ok   { background: rgba(0,229,160,.15);  color: var(--accent); }
.nota-fail { background: rgba(255,77,106,.12); color: var(--danger); }

.tipo-badge {
  font-size: .8rem; font-weight: 600;
  padding: .2rem .55rem; border-radius: 4px;
}
.tipo-admin    { background: rgba(255,181,71,.12); color: var(--warn); }
.tipo-professor{ background: rgba(74,144,217,.12); color: var(--primary); }

.status-dot {
  font-size: .8rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: .3rem;
}
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-on::before  { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.status-off::before { background: var(--text-dim); }

.acertos-badge {
  font-family: var(--font-mono); font-size: .85rem;
  color: var(--text-muted);
}

/* ─── Confidence bar ─────────────────────────────────────────── */
.conf-bar-wrap {
  display: flex; align-items: center; gap: .5rem;
  min-width: 90px;
}
.conf-bar {
  height: 6px; background: var(--accent);
  border-radius: 3px; min-width: 2px;
  flex-shrink: 0;
}
.conf-label { font-family: var(--font-mono); font-size: .75rem; color: var(--text-muted); white-space: nowrap; }

/* ─── Corrigir Page ──────────────────────────────────────────── */
.corrigir-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .corrigir-layout { grid-template-columns: 1fr; }
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition), background var(--transition);
  text-align: center;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(74,144,217,.05);
}

.upload-input {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}

.upload-content {
  display: flex; flex-direction: column;
  align-items: center; gap: .5rem;
  pointer-events: none;
}

.upload-icon { font-size: 2.5rem; }
.upload-text { font-weight: 500; color: var(--text); }
.upload-hint { font-size: .8rem; color: var(--text-muted); }

.upload-preview {
  width: 100%; max-height: 260px;
  object-fit: contain; border-radius: var(--radius);
}

/* Prova info chips */
.prova-info {
  display: flex; gap: .75rem; flex-wrap: wrap;
  padding: .75rem 1rem;
  background: var(--bg-hover);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.info-chip { display: flex; align-items: center; gap: .3rem; font-size: .85rem; }
.info-label{ color: var(--text-muted); }
.info-val  { color: var(--text); font-weight: 600; }

/* ─── Resultado Panel ────────────────────────────────────────── */
.resultado-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  animation: slideIn .3s ease;
}

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

.resultado-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 1.5rem;
}

.resultado-title { font-family: var(--font-mono); font-size: 1.1rem; }

.nota-circle {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: var(--font-mono);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.nota-circle span { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.nota-circle small{ font-size: .75rem; color: var(--text-muted); }

.nota-circle.nota-ok   { border-color: var(--accent); box-shadow: 0 0 20px rgba(0,229,160,.2); }
.nota-circle.nota-fail { border-color: var(--danger); box-shadow: 0 0 20px rgba(255,77,106,.2); }

/* Stats row */
.resultado-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem; margin-bottom: 1.5rem;
}

.stat-box {
  text-align: center;
  padding: .75rem .5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stat-num   { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }

.stat-acerto { background: var(--acerto-bg); border-color: rgba(0,229,160,.2); }
.stat-acerto .stat-num { color: var(--acerto-text); }
.stat-erro   { background: var(--erro-bg);   border-color: rgba(255,77,106,.2); }
.stat-erro .stat-num   { color: var(--erro-text); }
.stat-branco { background: var(--branco-bg); }
.stat-branco .stat-num { color: var(--branco-text); }
.stat-conf   { background: rgba(74,144,217,.08); border-color: rgba(74,144,217,.2); }
.stat-conf .stat-num   { color: var(--primary); }

/* Detalhe grid */
.detalhe-title { font-family: var(--font-mono); font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }

.detalhe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: .4rem;
  max-height: 260px; overflow-y: auto;
}

.detalhe-item {
  display: flex; flex-direction: column;
  align-items: center; padding: .5rem .25rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: .8rem; font-family: var(--font-mono);
  gap: .15rem;
}

.detalhe-acerto { background: var(--acerto-bg); border-color: rgba(0,229,160,.25); }
.detalhe-erro   { background: var(--erro-bg);   border-color: rgba(255,77,106,.2); }
.detalhe-branco { background: var(--branco-bg); }

.di-num  { font-size: .65rem; color: var(--text-muted); }
.di-resp { font-weight: 700; color: var(--text); }
.di-sep  { font-size: .6rem; color: var(--text-dim); }
.di-gab  { color: var(--text-muted); }
.di-icon { font-size: .85rem; }
.detalhe-acerto .di-icon { color: var(--acerto-text); }
.detalhe-erro   .di-icon { color: var(--erro-text); }
.detalhe-branco .di-icon { color: var(--branco-text); }

.resultado-actions {
  display: flex; gap: .75rem; flex-wrap: wrap;
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ─── Provas grid ────────────────────────────────────────────── */
.provas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.prova-card { display: flex; flex-direction: column; gap: .75rem; }

.prova-card-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }

.prova-card-title { font-weight: 600; font-size: .95rem; }

.prova-badge {
  font-family: var(--font-mono); font-size: .75rem;
  background: rgba(74,144,217,.15); color: var(--primary);
  padding: .15rem .5rem; border-radius: 4px; white-space: nowrap;
}

.prova-desc { font-size: .85rem; color: var(--text-muted); }

.prova-meta { display: flex; align-items: center; justify-content: space-between; }

.prova-gab {
  font-size: .8rem; color: var(--accent);
  background: rgba(0,229,160,.08); padding: .2rem .5rem;
  border-radius: 4px;
}

.prova-nota { font-size: .8rem; color: var(--text-muted); }

.prova-footer {
  display: flex; justify-content: space-between;
  font-size: .8rem; color: var(--text-dim);
  padding-top: .75rem; border-top: 1px solid var(--border);
}

.prova-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ─── Gabarito preview ───────────────────────────────────────── */
.gab-preview {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.preview-title {
  font-family: var(--font-mono); font-size: .8rem;
  color: var(--text-muted); margin-bottom: .75rem;
}

.gab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: .4rem;
}

.gab-item {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: .4rem;
}

.gi-num { font-size: .65rem; color: var(--text-dim); font-family: var(--font-mono); }
.gi-gab { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--accent); }

/* ─── Filter card ────────────────────────────────────────────── */
.filter-card { margin-bottom: 1.25rem; padding: 1rem 1.5rem; }
.filter-form { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── Empty state ────────────────────────────────────────────── */
.empty-state { color: var(--text-muted); font-size: .9rem; text-align: center; padding: 2rem; }
.empty-card  { text-align: center; padding: 3rem; }
.empty-icon  { font-size: 3rem; margin-bottom: 1rem; }

/* ─── Resultado Completo ─────────────────────────────────────── */
.resultado-completo { display: flex; flex-direction: column; gap: 1.25rem; }

.res-header-card { display: flex; flex-direction: column; gap: 1.25rem; }

.res-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}

.res-info-item { display: flex; flex-direction: column; gap: .2rem; }
.res-info-label { font-size: .75rem; text-transform: uppercase; color: var(--text-muted); font-weight: 600; letter-spacing: .04em; }
.res-info-val   { font-weight: 600; color: var(--text); }

.res-nota-destaque { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

.nota-grande {
  display: flex; align-items: baseline; gap: .35rem;
  font-family: var(--font-mono);
}

.nota-num  { font-size: 3.5rem; font-weight: 700; line-height: 1; }
.nota-den  { font-size: 1.2rem; color: var(--text-muted); }

.nota-grande.nota-ok   .nota-num { color: var(--accent); }
.nota-grande.nota-fail .nota-num { color: var(--danger); }

.res-stats-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.rs-item { font-size: .85rem; font-weight: 500; }
.rs-acerto { color: var(--acerto-text); }
.rs-erro   { color: var(--erro-text); }
.rs-branco { color: var(--branco-text); }
.rs-conf   { color: var(--primary); }

/* Questões grid */
.questoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: .5rem;
}

.questao-item {
  display: flex; flex-direction: column; align-items: center;
  padding: .6rem .3rem; border-radius: 8px;
  border: 1px solid var(--border);
  font-family: var(--font-mono); gap: .15rem;
  transition: transform var(--transition);
}
.questao-item:hover { transform: scale(1.04); }

.qi-acerto { background: var(--acerto-bg); border-color: rgba(0,229,160,.25); }
.qi-erro   { background: var(--erro-bg);   border-color: rgba(255,77,106,.2); }
.qi-branco { background: var(--branco-bg); }

.qi-num  { font-size: .65rem; color: var(--text-muted); }
.qi-resp { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.qi-sep  { font-size: .55rem; color: var(--text-dim); }
.qi-gab  { font-size: .85rem; color: var(--text-muted); }
.qi-peso { font-size: .6rem; color: var(--warn); }

.status-icon { font-size: .8rem; }
.si-acerto { color: var(--acerto-text); }
.si-erro   { color: var(--erro-text); }
.si-branco { color: var(--branco-text); }

/* Strings compare */
.strings-compare { display: flex; flex-direction: column; gap: .75rem; }
.str-row { display: flex; align-items: center; gap: 1rem; }
.str-label { font-size: .8rem; color: var(--text-muted); width: 70px; flex-shrink: 0; }
.str-val { font-family: var(--font-mono); font-size: .9rem; letter-spacing: .1em; word-break: break-all; }

/* ─── Dashboard provas list ──────────────────────────────────── */
.provas-list { display: flex; flex-direction: column; gap: .25rem; }
.pl-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .75rem; border-radius: var(--radius);
  transition: background var(--transition);
}
.pl-item:hover { background: var(--bg-hover); }
.pl-nome { flex: 1; font-size: .875rem; color: var(--text); }
.pl-q { font-family: var(--font-mono); font-size: .75rem; color: var(--text-muted); }

/* ─── Quick actions ──────────────────────────────────────────── */
.quick-actions { display: flex; flex-direction: column; gap: .5rem; }
.qa-btn {
  display: block; padding: .75rem 1rem;
  background: var(--bg-hover); color: var(--text);
  border-radius: var(--radius); font-size: .875rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
  border: 1px solid var(--border);
}
.qa-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Mono helper ────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }

/* ─── Print ──────────────────────────────────────────────────── */
@media print {
  .navbar, .resultado-actions, .page-header .btn, .header-actions, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .main-content { padding-top: 1rem; }
  .questao-item { break-inside: avoid; }
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .navbar { padding: 0 1rem; }
  .nav-links { display: none; }
  .main-content { padding: 1rem; }
  .main-content.has-nav { padding-top: calc(var(--nav-h) + 1rem); }
  .resultado-stats { grid-template-columns: repeat(2, 1fr); }
  .auth-visual { display: none; }
  .auth-container { width: 100%; }
  .form-actions { flex-direction: column; }
  .prova-actions { flex-wrap: wrap; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
