/* Inter self-hosted (subsets latin + latin-ext) */
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/inter/inter-400-latin-ext.woff2") format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/inter/inter-400-latin.woff2") format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url("/fonts/inter/inter-500-latin-ext.woff2") format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url("/fonts/inter/inter-500-latin.woff2") format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url("/fonts/inter/inter-600-latin-ext.woff2") format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url("/fonts/inter/inter-600-latin.woff2") format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url("/fonts/inter/inter-700-latin-ext.woff2") format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url("/fonts/inter/inter-700-latin.woff2") format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:800;font-display:swap;src:url("/fonts/inter/inter-800-latin-ext.woff2") format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:800;font-display:swap;src:url("/fonts/inter/inter-800-latin.woff2") format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:900;font-display:swap;src:url("/fonts/inter/inter-900-latin-ext.woff2") format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:900;font-display:swap;src:url("/fonts/inter/inter-900-latin.woff2") format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
/* ================================================================
   SIMULADOS ENEM — Design System
   Paleta: Indigo (#4F46E5) + Amber (#F59E0B) · Mobile-first
   ================================================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body, main { overflow-x: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6; color: #111827; background: #F9FAFB;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }
* { margin: 0; padding: 0; }

/* === VARIABLES === */
:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #EEF2FF;
  --primary-muted: #818CF8;
  --secondary: #7C3AED;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --accent-light: #FEF3C7;
  --success: #10B981;
  --success-light: #D1FAE5;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --gray-50: #F9FAFB; --gray-100: #F3F4F6; --gray-200: #E5E7EB;
  --gray-300: #D1D5DB; --gray-400: #9CA3AF; --gray-500: #6B7280;
  --gray-600: #4B5563; --gray-700: #374151; --gray-800: #1F2937; --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  --radius-sm: 8px; --radius: 12px; --radius-lg: 20px; --radius-full: 9999px;

  /* Per-area knowledge colors */
  --c-ling: #7C3AED; --c-ling-light: #EDE9FE; --c-ling-mid: #8B5CF6;
  --c-hum:  #4F46E5; --c-hum-light:  #EEF2FF; --c-hum-mid:  #6366F1;
  --c-nat:  #059669; --c-nat-light:  #D1FAE5; --c-nat-mid:  #10B981;
  --c-mat:  #D97706; --c-mat-light:  #FEF3C7; --c-mat-mid:  #F59E0B;
}

/* === LAYOUT === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-narrow { max-width: 700px; margin: 0 auto; padding: 0 1rem; }
main { flex: 1; }

/* === NAVBAR === */
.navbar {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .875rem 1rem; max-width: 1200px; margin: 0 auto;
}
.navbar-brand {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.375rem; font-weight: 800; color: var(--primary);
  letter-spacing: -.02em;
}
.navbar-brand span { color: var(--accent); }
.navbar-logo {
  width: 36px; height: 36px; background: linear-gradient(135deg, #4338CA, #7C3AED);
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem; font-weight: 900; letter-spacing: -.03em;
  position: relative; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79,70,229,.35);
}
.navbar-logo::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 55%; height: 3px; background: #F59E0B; border-radius: 1.5px;
}
.navbar-nav { display: flex; align-items: center; gap: .5rem; }
.navbar-user { font-size: .875rem; color: var(--gray-600); font-weight: 500; }

/* Hamburger button — hidden on desktop */
.hamburger-btn {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; font-size: 1.2rem; color: var(--gray-700);
  border-radius: var(--radius-sm); transition: background .15s;
  flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--gray-100); }

@media (max-width: 768px) {
  .hamburger-btn { display: flex; }

  /* Hide desktop nav, show as dropdown when open */
  .navbar-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
    background: white; border-bottom: 2px solid var(--gray-200);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
  }
  .navbar-nav.nav-open { display: flex; }

  /* Stack nav buttons full-width */
  .navbar-nav .btn { justify-content: flex-start; border-radius: var(--radius-sm); }
  .navbar-nav .btn-outline { border-color: transparent; }
  .navbar-nav form { width: 100%; }
  .navbar-nav form .btn { width: 100%; }
  .navbar-user { padding: .5rem .25rem; font-size: .875rem; color: var(--gray-500); border-bottom: 1px solid var(--gray-100); margin-bottom: .25rem; display: block !important; }

  /* Navbar must be relative so the dropdown positions correctly */
  .navbar { position: relative; }
}

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; justify-content: center;
  padding: .625rem 1.25rem; border-radius: var(--radius-sm); font-size: .9rem;
  font-weight: 600; line-height: 1; transition: all .2s ease;
  cursor: pointer; border: 2px solid transparent;
  text-decoration: none; white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { color: var(--gray-600); background: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-sm { padding: .4rem .875rem; font-size: .8rem; }
.btn-lg { padding: .875rem 2rem; font-size: 1rem; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { padding: .5rem; border-radius: var(--radius-sm); }

/* === CARDS === */
.card {
  background: white; border-radius: var(--radius); border: 1px solid var(--gray-200);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-100); background: var(--gray-50); }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-100); background: var(--gray-50); }
.card-hover { transition: transform .2s ease, box-shadow .2s ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* === HERO / LANDING === */
@keyframes hero-grad { 0%,100% { background-position:0% 50% } 50% { background-position:100% 50% } }
@keyframes float-blob { 0%,100% { transform:translate(0,0) scale(1) } 50% { transform:translate(-20px,30px) scale(1.05) } }
@keyframes float-blob2 { 0%,100% { transform:translate(0,0) scale(1) } 50% { transform:translate(15px,-20px) scale(.95) } }
.hero {
  background: linear-gradient(-45deg, #1e1b4b, #3b0764, #312e81, #1e1b4b, #4c1d95);
  background-size: 400% 400%;
  animation: hero-grad 10s ease infinite;
  color: white; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
/* Decorative blobs */
.hero::after {
  content: ''; position: absolute; top: -120px; right: -80px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.18) 0%, transparent 65%);
  animation: float-blob 7s ease-in-out infinite; pointer-events: none;
}
.hero-blob2 {
  position: absolute; bottom: -80px; left: -60px;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.25) 0%, transparent 70%);
  animation: float-blob2 9s ease-in-out infinite; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: 5rem 1rem 4rem; text-align: center; max-width: 900px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  color: #E0E7FF; padding: .375rem 1rem; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; margin-bottom: 1.75rem;
  text-transform: uppercase; backdrop-filter: blur(4px);
  box-shadow: 0 1px 8px rgba(0,0,0,.15);
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900; line-height: 1.1;
  letter-spacing: -.03em; margin-bottom: 1.25rem;
}
.hero h1 .highlight { color: var(--accent); }
.hero p { font-size: clamp(1rem, 2.5vw, 1.25rem); color: #C7D2FE; max-width: 600px; margin: 0 auto 2.5rem; line-height: 1.7; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.5rem; margin-top: 4rem; padding-top: 3rem; border-top: 1px solid rgba(255,255,255,.12);
  max-width: 700px; margin-left: auto; margin-right: auto;
}
.hero-stat-value { font-size: 2.5rem; font-weight: 900; color: white; line-height: 1; letter-spacing: -.04em; }
.hero-stat-label { font-size: .78rem; color: #A5B4FC; margin-top: .35rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }

/* === FEATURES SECTION === */
.features { padding: 5rem 1rem; }
.section-title { text-align: center; font-size: 2rem; font-weight: 800; color: var(--gray-900); margin-bottom: .5rem; }
.section-subtitle { text-align: center; font-size: 1rem; color: var(--gray-500); margin-bottom: 3rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: white; border-radius: var(--radius-lg); padding: 2rem 1.5rem;
  border: 1px solid var(--gray-200); text-align: center;
  transition: all .25s ease;
  position: relative; overflow: hidden;
  box-shadow: 0 1px 12px rgba(79,70,229,.06);
}
.feature-card::before {
  content: ''; display: block; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(79,70,229,.15), 0 2px 8px rgba(0,0,0,.06);
  border-color: var(--primary-muted);
}
.feature-icon {
  width: 60px; height: 60px; border-radius: var(--radius); margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.75rem;
}
.feature-icon-blue { background: var(--primary-light); }
.feature-icon-amber { background: var(--accent-light); }
.feature-icon-green { background: var(--success-light); }
.feature-icon-purple { background: #F3E8FF; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: .5rem; }
.feature-card p { font-size: .9rem; color: var(--gray-500); line-height: 1.6; }

/* === PAGE HEADER === */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white; padding: 2rem 1rem;
}
.page-header-inner { max-width: 1200px; margin: 0 auto; }
.page-header h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .25rem; }
.page-header p { color: #C7D2FE; font-size: .95rem; }

/* === TESTS INDEX === */
.tests-layout { padding: 2rem 1rem; max-width: 1200px; margin: 0 auto; }
.tests-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: gap; gap: 1rem; }
.tests-grid { display: grid; gap: 1rem; }

/* TEST CARD */
.test-card {
  background: white; border-radius: var(--radius); border: 1px solid var(--gray-200);
  box-shadow: var(--shadow); padding: 1.25rem 1.5rem;
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  transition: all .2s ease;
}
.test-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.test-card-info { min-width: 0; }
.test-card-title { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin-bottom: .1rem; display: flex; align-items: center; gap: .5rem; min-width: 0; }
.test-card-name  { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.test-card-meta { font-size: .8rem; color: var(--gray-500); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.test-card-meta-item { display: flex; align-items: center; gap: .3rem; }
.test-card-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.test-timer { font-family: 'Courier New', monospace; font-size: 1rem; font-weight: 700; color: var(--primary); }
.test-timer-active { color: var(--accent); animation: pulse-text 2s infinite; }
@keyframes pulse-text { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }

/* BADGES */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .6rem; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 600; line-height: 1.4;
}
.badge-pending { background: var(--warning-light); color: #92400E; }
.badge-active { background: var(--primary-light); color: var(--primary-dark); }
.badge-finished { background: var(--success-light); color: #065F46; }
.badge-score { background: var(--gray-100); color: var(--gray-700); font-size: .875rem; padding: .3rem .75rem; }
.badge-score-high { background: var(--success-light); color: #065F46; }
.badge-score-low { background: var(--danger-light); color: #991B1B; }
.badge-kind { background: var(--primary-light); color: var(--primary-dark); text-transform: capitalize; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--gray-500); }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; display: block; }
.empty-state h3 { font-size: 1.25rem; font-weight: 700; color: var(--gray-700); margin-bottom: .5rem; }

/* === CREATE TEST MODAL === */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: white; border-radius: var(--radius-lg); width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(.95) translateY(-10px); transition: transform .2s ease;
  box-shadow: var(--shadow-xl);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 1.5rem; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: white; z-index: 1;
}
.modal-title { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-100); display: flex; gap: .75rem; justify-content: flex-end; }
.close-btn { font-size: 1.5rem; color: var(--gray-400); line-height: 1; padding: .25rem; }
.close-btn:hover { color: var(--gray-700); }

/* === FORMS === */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .875rem; font-weight: 600; color: var(--gray-700); margin-bottom: .375rem; }
.form-control {
  width: 100%; padding: .625rem .875rem; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: .9rem; color: var(--gray-900);
  background: white; transition: border-color .2s ease, box-shadow .2s ease;
  line-height: 1.5; -webkit-appearance: none; appearance: none;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.form-control::placeholder { color: var(--gray-400); }
.form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .5rem center; background-size: 1.25rem; padding-right: 2.5rem; cursor: pointer; }
.form-hint { font-size: .8rem; color: var(--gray-500); margin-top: .25rem; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: .25rem; }

/* CHECKBOXES */
.checkbox-group { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.checkbox-item {
  display: flex; align-items: center; gap: .625rem; padding: .625rem .875rem;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm); cursor: pointer;
  transition: all .15s ease; user-select: none;
}
.checkbox-item:hover { border-color: var(--primary); background: var(--primary-light); }
.checkbox-item input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--primary); }
.checkbox-item.checked { border-color: var(--primary); background: var(--primary-light); }
.checkbox-label { font-size: .875rem; font-weight: 600; color: var(--gray-700); }
.checkbox-item:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.checkbox-item:has(input:checked) .checkbox-label { color: var(--primary-dark); }

/* RADIO GROUP */
.radio-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.radio-item {
  display: flex; align-items: center; gap: .5rem; padding: .5rem .875rem;
  border: 2px solid var(--gray-200); border-radius: var(--radius-full); cursor: pointer;
  transition: all .15s ease; user-select: none;
}
.radio-item:hover { border-color: var(--primary); }
.radio-item:has(input:checked) { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.radio-item input[type="radio"] { accent-color: var(--primary); }

/* === TEST TAKING PAGE === */
.test-header {
  background: white; border-bottom: 1px solid var(--gray-200);
  padding: .875rem 1rem; position: sticky; top: 0; z-index: 40;
  box-shadow: var(--shadow-sm);
}
.test-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.test-header-center { flex: 1; max-width: 400px; }
.test-progress-label { font-size: .75rem; color: var(--gray-500); margin-bottom: .25rem; font-weight: 600; }
.progress-bar { height: 8px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: var(--radius-full); transition: width .4s ease; }

.quiz-container { max-width: 900px; margin: 0 auto; padding: 2rem 1rem 4rem; }

.question-card {
  background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-200);
  box-shadow: var(--shadow); margin-bottom: 1.5rem; overflow: hidden;
  transition: box-shadow .2s ease;
}
.question-card:hover { box-shadow: var(--shadow-md); }
.question-card.answered { border-left: 4px solid var(--success); }

.question-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-100);
}
.question-number {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: white; font-size: .875rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.question-answered .question-number { background: var(--success); }
.question-meta { flex: 1; min-width: 0; }
.question-title { font-size: .875rem; font-weight: 700; color: var(--gray-800); line-height: 1.3; }
.question-kind { font-size: .75rem; color: var(--gray-500); margin-top: .125rem; text-transform: uppercase; letter-spacing: .04em; }
.q-origin { font-size: .7rem; color: var(--gray-400); margin-top: .2rem; font-style: italic; }
.question-answered-badge { flex-shrink: 0; font-size: .75rem; background: var(--success-light); color: #065F46; padding: .2rem .6rem; border-radius: var(--radius-full); font-weight: 700; }

.question-body { padding: 1.5rem; }
.question-text { font-size: .95rem; color: var(--gray-800); line-height: 1.75; margin-bottom: 1.25rem; }
.alternatives-intro { font-size: .95rem; color: var(--gray-900); font-weight: 600; line-height: 1.6; margin-bottom: 1rem; white-space: pre-wrap; }
.result-alternatives-intro { font-size: .9rem; font-weight: 600; color: var(--gray-800); margin-bottom: .75rem; }
.question-images { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.question-images img { border-radius: var(--radius-sm); border: 1px solid var(--gray-200); max-height: 400px; object-fit: contain; width: auto; }

/* Question media section (images with label) */
.question-media-section { margin-bottom: 1.25rem; }
.question-media-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-400); margin-bottom: .5rem;
  padding: .25rem .5rem; background: var(--gray-50); border-radius: 4px;
  display: inline-block;
}

.options-list { display: flex; flex-direction: column; gap: .625rem; }
.option-btn {
  display: flex; align-items: flex-start; gap: .875rem; padding: .875rem 1rem;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm); cursor: pointer;
  text-align: left; width: 100%; transition: all .15s ease;
  background: white; font: inherit;
}
.option-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.option-btn.selected { border-color: var(--primary); background: var(--primary-light); }
.option-letter {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--gray-300); display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800; color: var(--gray-500); transition: all .15s ease;
}
.option-btn:hover .option-letter { border-color: var(--primary); color: var(--primary); background: white; }
.option-btn.selected .option-letter { border-color: var(--primary); color: white; background: var(--primary); }
.option-body { display: flex; flex-direction: column; gap: .5rem; flex: 1; padding-top: .125rem; }
.option-text { font-size: .9rem; color: var(--gray-800); line-height: 1.55; }
.option-btn.selected .option-text { color: var(--primary-dark); font-weight: 600; }
.option-img-wrap { display: block; }
.option-img { max-height: 200px; max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); object-fit: contain; }

/* LOADING / WAITING STATE */
.waiting-container { text-align: center; padding: 5rem 2rem; }
.spinner {
  width: 60px; height: 60px; border: 4px solid var(--gray-200);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.waiting-container h2 { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); margin-bottom: .5rem; }
.waiting-container p { color: var(--gray-500); font-size: .95rem; }
.dots::after { content: ''; animation: dots 1.5s infinite; }
@keyframes dots { 0% { content: ''; } 33% { content: '.'; } 66% { content: '..'; } 100% { content: '...'; } }

/* === RESULT PAGE === */
.result-container { max-width: 900px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.score-section { text-align: center; padding: 3rem 1rem 2rem; }
.score-circle {
  width: 180px; height: 180px; border-radius: 50%; margin: 0 auto 1.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: var(--shadow-xl);
  background: conic-gradient(var(--score-color, var(--primary)) 0deg, var(--score-color, var(--primary)) calc(var(--score-pct, 0) * 3.6deg), var(--gray-100) calc(var(--score-pct, 0) * 3.6deg));
  position: relative;
}
.score-circle::after {
  content: ''; position: absolute; inset: 12px; border-radius: 50%; background: white;
}
.score-value { position: relative; z-index: 1; font-size: 2.5rem; font-weight: 900; color: var(--score-color, var(--primary-dark)); line-height: 1; }
.score-label { position: relative; z-index: 1; font-size: .75rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.score-section h2 { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); margin-bottom: .5rem; }
.score-section p { color: var(--gray-500); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { text-align: center; padding: 1.5rem 1rem; border-radius: var(--radius); }
.stat-card-correct { background: var(--success-light); border: 2px solid #111827; }
.stat-card-wrong { background: var(--danger-light); border: 2px solid #111827; }
.stat-card-skip { background: var(--gray-100); border: 2px solid #111827; }
.stat-card-value { font-size: 2rem; font-weight: 900; line-height: 1; margin-bottom: .25rem; }
.stat-card-correct .stat-card-value { color: #065F46; }
.stat-card-wrong .stat-card-value { color: #991B1B; }
.stat-card-skip .stat-card-value { color: var(--gray-600); }
.stat-card-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card-correct .stat-card-label { color: #065F46; }
.stat-card-wrong .stat-card-label { color: #991B1B; }
.stat-card-skip .stat-card-label { color: var(--gray-500); }

/* RESULT QUESTIONS */
.result-question {
  background: white; border-radius: var(--radius); border: 1px solid var(--gray-200);
  margin-bottom: 1rem; overflow: hidden;
}
.result-question-header {
  display: flex; align-items: center; gap: .875rem; padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
}
.result-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }
.result-icon-correct { background: var(--success-light); color: var(--success); }
.result-icon-wrong { background: var(--danger-light); color: var(--danger); }
.result-icon-skip { background: var(--gray-100); color: var(--gray-500); }
.result-question-body { padding: 1.25rem; }
.result-question-text { font-size: .9rem; color: var(--gray-700); line-height: 1.65; margin-bottom: 1rem;  max-height: 120px; overflow: hidden; position: relative; }
.result-question-text.expanded { max-height: none; }
.result-options { display: grid; gap: .375rem; }
.result-option { display: flex; gap: .75rem; align-items: flex-start; padding: .625rem .875rem; border-radius: var(--radius-sm); font-size: .85rem; }
.result-option-neutral { background: var(--gray-50); color: var(--gray-700); }
.result-option-user-wrong { background: var(--danger-light); color: #991B1B; }
.result-option-correct { background: var(--success-light); color: #065F46; font-weight: 700; }
.result-option-letter { font-weight: 800; flex-shrink: 0; min-width: 1.25rem; }
.result-option-body { display: flex; flex-direction: column; gap: .375rem; flex: 1; }
.result-option-img-wrap { display: block; }
.result-option-img { max-height: 200px; max-width: 100%; border-radius: var(--radius-sm); border: 1px solid rgba(0,0,0,.08); object-fit: contain; }
.answer-explanation { margin-top: 1rem; padding: 1rem; background: var(--primary-light); border-radius: var(--radius-sm); border-left: 3px solid var(--primary); }
.answer-explanation-title { font-size: .8rem; font-weight: 700; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .375rem; }
.answer-explanation p { font-size: .85rem; color: var(--gray-700); line-height: 1.65; }

/* KIND BREAKDOWN */
.kind-breakdown { display: grid; gap: .75rem; margin-bottom: 2rem; }
.kind-row { display: flex; align-items: center; gap: 1rem; background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: .875rem 1.25rem; }
.kind-name { flex: 0 0 160px; font-size: .875rem; font-weight: 600; color: var(--gray-700); }
.kind-bar-container { flex: 1; height: 8px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.kind-bar { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.kind-score-text { flex: 0 0 80px; text-align: right; font-size: .875rem; font-weight: 700; }

/* === AUTH FORMS === */
.auth-wrapper { min-height: 100vh; background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.auth-box { background: white; border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: var(--shadow-xl); }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center; margin: 0 auto .875rem;
  font-size: 1.75rem;
}
.auth-logo h2 { font-size: 1.5rem; font-weight: 900; color: var(--gray-900); letter-spacing: -.02em; }
.auth-logo h2 span { color: var(--accent); }
.auth-logo p { font-size: .875rem; color: var(--gray-500); margin-top: .25rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.auth-divider span { font-size: .75rem; color: var(--gray-400); white-space: nowrap; }
.auth-links { text-align: center; margin-top: 1.5rem; }
.auth-links a { font-size: .875rem; color: var(--primary); font-weight: 600; }
.auth-links a:hover { color: var(--primary-dark); text-decoration: underline; }

/* === FLASH MESSAGES === */
.flash { padding: .875rem 1.25rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; border: 1px solid; display: flex; align-items: center; gap: .625rem; }
.flash-notice { background: var(--success-light); border-color: #6EE7B7; color: #065F46; }
.flash-alert { background: var(--danger-light); border-color: #FCA5A5; color: #991B1B; }
.flash-warning { background: var(--warning-light); border-color: #FCD34D; color: #92400E; }
.flash-container { position: fixed; top: 70px; right: 1rem; z-index: 200; width: 340px; display: flex; flex-direction: column; gap: .5rem; }

/* === FOOTER === */
footer {
  background: var(--gray-900); color: var(--gray-400); padding: 2rem 1rem;
  text-align: center; font-size: .85rem; margin-top: auto;
}
footer strong { color: white; }

/* === UTILITIES === */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-bold { font-weight: 700; }
.fw-black { font-weight: 900; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.w-full { width: 100%; }

/* ERROR MESSAGES */
.error-messages {
  background: var(--danger-light); border: 1px solid #FCA5A5; border-radius: var(--radius-sm);
  padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.error-messages h6 { font-size: .875rem; font-weight: 700; color: #991B1B; margin-bottom: .375rem; }
.error-messages ul { padding-left: 1.25rem; list-style: disc; }
.error-messages li { font-size: .85rem; color: #991B1B; }

/* QUIZ NAVBAR */
.quiz-navbar .navbar-inner { flex-wrap: wrap; gap: .5rem; }
.quiz-progress-wrap { flex: 1; min-width: 160px; max-width: 400px; padding: 0 .75rem; }
.quiz-blank-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--danger-light); color: #991B1B;
  font-size: .7rem; font-weight: 700; padding: .1rem .45rem;
  border-radius: var(--radius-full); margin-left: .5rem;
}

/* QUESTION NUMBER STATES */
.question-number { background: var(--gray-300); color: var(--gray-600); }
.question-number.q-answered { background: var(--success); color: white; }
.question-number.q-unanswered { background: var(--gray-200); color: var(--gray-500); border: 2px dashed var(--gray-400); }
.question-number-wrap { display: flex; flex-direction: column; align-items: center; gap: .2rem; flex-shrink: 0; }
.q-unanswered-label { font-size: .6rem; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }

/* QUESTION CARD STATES */
.question-card.answered { border-left: 4px solid var(--success); }
.question-card.unanswered { border-left: 4px solid var(--gray-200); }

/* QUIZ FINISH FOOTER */
.quiz-finish-footer {
  text-align: center; padding: 2rem 0 3rem;
  border-top: 1px solid var(--gray-200); margin-top: 1rem;
}
.quiz-finish-footer p { color: var(--gray-400); font-size: .85rem; margin-top: .75rem; }

/* FINISH MODAL */
.finish-modal-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-bottom: 1.25rem;
}
.finish-stat {
  display: flex; align-items: center; gap: .625rem;
  padding: .875rem; background: var(--gray-50);
  border-radius: var(--radius-sm); border: 1px solid var(--gray-200);
}
.finish-stat-icon { font-size: 1.5rem; flex-shrink: 0; }
.finish-stat-blank { color: var(--accent-dark); }
.finish-stat-label { font-size: .7rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; }
.finish-stat-value { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); }
.finish-modal-warning {
  background: var(--warning-light); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
  font-size: .875rem; color: #92400E;
}
.finish-modal-success {
  background: var(--success-light); border: 1px solid #6EE7B7;
  border-radius: var(--radius-sm); padding: .75rem 1rem;
  font-size: .875rem; color: #065F46;
}

/* ACTIVE TEST RESUME BANNER */
.active-test-banner {
  background: linear-gradient(90deg, var(--primary-light) 0%, #EDE9FE 100%);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  margin: 0 1rem 1.25rem;
}
.active-test-banner-inner {
  padding: .875rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.active-test-banner-icon {
  font-size: 1.25rem; flex-shrink: 0; color: var(--primary);
}
.active-test-banner-inner > div {
  flex: 1; min-width: 0;
}
.active-test-banner-inner > div strong {
  display: block; color: var(--primary-dark); font-size: .95rem;
}
.active-test-banner-meta {
  font-size: .8rem; color: var(--gray-600);
}
@media (min-width: 769px) {
  .active-test-banner { margin: 0 2rem 1.25rem; }
}

/* DRAFT BANNER */
.draft-banner {
  background: var(--warning-light); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); margin-bottom: 1.25rem;
}
.draft-banner-inner {
  padding: .875rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; font-size: .875rem; color: #92400E;
}

/* TEST CARD Q BADGE */
.test-q-badge {
  margin-left: .5rem; font-size: .75rem; padding: .15rem .5rem;
  border-radius: 4px; background: var(--primary-light);
  color: var(--primary-dark); font-weight: 700;
}

/* PER-AREA SCORE CHIPS (finished test cards) */
.test-area-scores {
  display: flex; gap: .3rem; flex-wrap: wrap; align-items: center;
  margin-left: .5rem;
}
.area-score-chip {
  position: relative; display: inline-flex; align-items: center;
  gap: .2rem; background: var(--success-light); border-radius: 999px;
  padding: .15rem .45rem; font-size: .7rem; cursor: default;
  transition: background .15s;
}
.area-score-chip:hover { background: #A7F3D0; }
.area-score-icon { font-size: .75rem; line-height: 1; }
.area-score-count { color: #065F46; font-weight: 800; }
/* CSS tooltip */
.area-score-chip::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); background: var(--gray-800); color: white;
  font-size: .65rem; white-space: nowrap; padding: .2rem .5rem;
  border-radius: 4px; pointer-events: none; opacity: 0;
  transition: opacity .15s; z-index: 20;
}
.area-score-chip:hover::after { opacity: 1; }
@media (max-width: 640px) {
  .test-area-scores { gap: .2rem; }
  .area-score-chip { padding: .18rem .4rem; }
  .area-score-chip::after { display: none; }
}

/* RESULT PAGE — UX */
.result-q-correct { border-left: 4px solid var(--success); }
.result-q-wrong   { border-left: 4px solid var(--danger); }
.result-q-blank   { border-left: 4px solid var(--gray-300); }

.result-status-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; flex-shrink: 0;
}
.result-status-icon-correct { background: var(--success-light); color: var(--success); }
.result-status-icon-wrong   { background: var(--danger-light); color: var(--danger); }
.result-status-icon-blank   { background: var(--gray-100); color: var(--gray-500); }

.result-status-label {
  font-size: .7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: .25rem;
}
.result-status-correct { color: var(--success); }
.result-status-wrong   { color: var(--danger); }
.result-status-blank   { color: var(--gray-400); }

.result-q-title {
  font-size: .875rem; font-weight: 700; color: var(--gray-900);
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  margin-bottom: .125rem;
}
.result-q-meta { font-size: .75rem; color: var(--gray-500); }

.result-option-text { flex: 1; }
.result-option-badge {
  margin-left: auto; font-size: .7rem; font-weight: 700; white-space: nowrap;
  padding: .1rem .4rem; border-radius: 4px; flex-shrink: 0;
}
.result-option-correct .result-option-badge { background: var(--success); color: white; }
.result-option-user-wrong .result-option-badge { background: var(--danger); color: white; }

.result-actions {
  display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.result-review-title {
  font-size: 1.1rem; font-weight: 800; color: var(--gray-900);
  margin-bottom: 1rem; padding-top: .5rem;
  border-top: 1px solid var(--gray-200);
}
.result-toggle-btn {
  font-size: .8rem; color: var(--primary); cursor: pointer;
  background: none; border: none; padding: .25rem 0; font-weight: 600;
  font-family: inherit;
}
.result-toggle-btn:hover { text-decoration: underline; }

/* === RESPONSIVE === */

/* Tablet → 2 columns for area cards (4 cards at 220px don't fit sub-1000px) */
@media (max-width: 999px) {
  .area-card { flex: 1 1 calc(50% - .44rem); max-width: none; }
}
/* Desktop: result container is max 960px → inner 896px with 2rem padding.
   4 × 220px + 3 × 14px gaps = 922px > 896px → 3+1 bug.
   Reduce basis to 200px: 4×200+42=842px < 896px → 4 even columns. */
@media (min-width: 1000px) {
  .result-area-section .area-card { flex: 1 1 200px; }
}

@media (max-width: 768px) {
  .hero-inner { padding: 3.5rem 1rem 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .test-card { grid-template-columns: 1fr; }
  .test-card-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: .5rem; }
  .stats-grid { gap: .5rem; }
  .checkbox-group { grid-template-columns: 1fr; }
  .kind-name { flex: 0 0 110px; font-size: .8rem; }
  .navbar-user { display: none; }
  .auth-box { padding: 1.75rem 1.25rem; }
  .modal { margin: 0; border-radius: var(--radius) var(--radius) 0 0; max-height: 95vh; overflow-y: auto; }
  .modal-overlay { align-items: flex-end; }
  .tests-header { flex-direction: column; align-items: flex-start; }
  .flash-container { width: calc(100vw - 2rem); right: 1rem; }
  .finish-modal-stats { grid-template-columns: 1fr; gap: .5rem; }
  .page-header { padding: 1.25rem 1rem; }
  .page-header h1 { font-size: 1.4rem; }
  .dashboard-greeting { font-size: 1.15rem; }
  .area-section-header { flex-direction: column; gap: .5rem; }
  .ds-card { flex: 1 1 130px; max-width: none; }
  .dashboard-header { padding: 1.25rem 1rem 1rem; }
}

@media (max-width: 500px) {
  .dashboard-header-inner { flex-direction: column; align-items: flex-start; }
  .dashboard-header-inner .btn { align-self: flex-start; }
  .hero h1 { font-size: 1.75rem; letter-spacing: -.02em; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}

@media (max-width: 640px) {
  /* Quiz navbar stacks on mobile */
  .quiz-navbar .navbar-inner { padding: .625rem 1rem; }
  .quiz-progress-wrap { order: 3; max-width: 100%; min-width: unset; flex: 1 0 100%; padding: 0; }
  .quiz-navbar .navbar-brand { display: none; }
  .quiz-navbar .navbar-nav { gap: .375rem; }
  .quiz-navbar .btn-sm { padding: .375rem .75rem; font-size: .8rem; }
  .test-timer { font-size: .875rem; }

  /* Question cards */
  .question-header { padding: .875rem 1rem; gap: .5rem; flex-wrap: wrap; }
  .question-body { padding: 1rem; }
  .option-btn { padding: .75rem .875rem; gap: .625rem; }
  .option-letter { width: 26px; height: 26px; font-size: .75rem; }

  /* Result */
  .result-container { padding: 1rem 0 2rem; }
  .score-section { padding: 1.5rem 1rem; }
  .score-circle { width: 140px; height: 140px; }
  .score-value { font-size: 2rem; }
  .stat-card { padding: 1rem .625rem; }
  .stat-card-value { font-size: 1.5rem; }
  .result-question { margin-bottom: .75rem; }
  .result-question-header { padding: .75rem 1rem; }
  .result-question-body { padding: .75rem 1rem; }
  .result-q-title { font-size: .8rem; }
  .result-status-icon { width: 30px; height: 30px; font-size: .875rem; }
  .kind-row { flex-wrap: wrap; gap: .5rem; }
  .kind-name { flex: 0 0 100%; font-size: .875rem; }
  .kind-score-text { flex: 0 0 auto; }

  /* KPI grid */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: .625rem; }
  .kpi-value { font-size: 1.4rem; }

  /* Quiz container */
  .quiz-container { padding: 1rem 0 3rem; }
  .quiz-finish-footer { padding: 1.5rem 1rem; }

  /* Admin sidebar compact */
  .admin-stat-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 769px) {
  .container { padding: 0 2rem; }
  .tests-layout { padding: 2rem 2rem; }
  .quiz-container { padding: 2rem 2rem 4rem; }
  .result-container { padding: 2rem 2rem 4rem; }
}

/* ================================================================
   ADMIN PANEL
   ================================================================ */

/* Admin body override */
.admin-body { background: #0F172A; }
.admin-body main { display: none; } /* admin layout doesn't use main */

/* Admin layout: sidebar + content */
.admin-layout {
  display: flex;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Sidebar */
.admin-sidebar {
  width: 240px;
  min-width: 240px;
  background: #0F172A;
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #1E293B;
  z-index: 40;
}

.admin-sidebar-header {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid #1E293B;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #F1F5F9;
  text-decoration: none;
}
.admin-brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.admin-brand strong { color: var(--accent); }
.admin-brand-role {
  font-size: .7rem;
  color: #64748B;
  margin-top: .25rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.admin-nav { padding: .75rem 0; flex: 1; }
.admin-nav-section {
  padding: .5rem 1rem .25rem;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #475569;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem 1rem;
  font-size: .875rem;
  color: #94A3B8;
  text-decoration: none;
  border-radius: 0;
  transition: background .15s, color .15s;
  position: relative;
}
.admin-nav-item:hover { background: #1E293B; color: #F1F5F9; }
.admin-nav-item.active {
  background: #1E293B;
  color: #F1F5F9;
  border-left: 3px solid var(--primary);
}
.admin-nav-icon { width: 1.1rem; text-align: center; opacity: .85; }
.admin-badge-count {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: var(--radius-full);
  min-width: 1.25rem;
  text-align: center;
}

.admin-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid #1E293B;
}
.admin-user-info {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: .75rem;
}
.admin-user-avatar {
  width: 32px; height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; font-weight: 700;
  flex-shrink: 0;
}
.admin-user-name { font-size: .8rem; font-weight: 600; color: #F1F5F9; }
.admin-user-email { font-size: .7rem; color: #475569; }
.admin-sidebar-actions { display: flex; flex-direction: column; gap: .25rem; }
.admin-sidebar-link {
  font-size: .75rem; color: #64748B; text-decoration: none; padding: .25rem 0;
  background: none; border: none; cursor: pointer; text-align: left; font-family: inherit;
  transition: color .15s;
}
.admin-sidebar-link:hover { color: #94A3B8; }
.admin-sidebar-link-danger:hover { color: var(--danger); }

/* Admin content area */
.admin-content {
  flex: 1;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: .875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}
.admin-topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}
.admin-topbar-actions { display: flex; gap: .5rem; align-items: center; }

.admin-flash-container { padding: .75rem 1.5rem 0; }
.admin-main { padding: 1.5rem; flex: 1; }

/* Admin cards */
.admin-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.admin-card-header {
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 700;
  color: var(--gray-800);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-card-header-link {
  font-size: .8rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.admin-card-header-link:hover { text-decoration: underline; }
.admin-card-body { padding: 1.25rem; }
.admin-card-body.p-0 { padding: 0; }
.admin-empty {
  padding: 2.5rem;
  text-align: center;
  color: var(--gray-400);
  font-size: .9rem;
}
.admin-empty-link { color: var(--primary); font-weight: 600; }

/* Admin tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.admin-table th {
  padding: .625rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.admin-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--gray-50); }
.admin-table-actions { display: flex; gap: .375rem; align-items: center; }
.text-muted { color: var(--gray-400) !important; }

/* Dashboard stats */
.admin-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card-lg {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.stat-card-lg-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-card-lg-label {
  font-size: .8rem;
  color: var(--gray-500);
  font-weight: 500;
}
.stat-card-lg-danger .stat-card-lg-value { color: var(--danger); }
.stat-card-lg-danger { border-left: 3px solid var(--danger); }
.stat-card-lg-success .stat-card-lg-value { color: var(--success); }
.stat-card-lg-success { border-left: 3px solid var(--success); }
.stat-card-lg-accent .stat-card-lg-value { color: var(--accent-dark); }
.stat-card-lg-accent { border-left: 3px solid var(--accent); }
.stat-card-lg-primary .stat-card-lg-value { color: var(--primary); }
.stat-card-lg-primary { border-left: 3px solid var(--primary); }

.admin-section-title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Sparkline */
.sparkline-container {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 60px;
  padding: 0 .25rem;
}
.sparkline-bar-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  cursor: default;
}
.sparkline-bar {
  width: 100%;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
  opacity: .7;
  transition: opacity .15s;
  min-height: 2px;
}
.sparkline-bar-wrap:hover .sparkline-bar { opacity: 1; }

/* Period tabs */
.admin-period-tabs {
  display: flex;
  gap: .375rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.admin-period-tab {
  padding: .375rem .875rem;
  font-size: .8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  background: white;
  text-decoration: none;
  transition: all .15s;
}
.admin-period-tab:hover { border-color: var(--primary); color: var(--primary); }
.admin-period-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Dashboard layout helpers */
.dash-section-label {
  font-size: .7rem; font-weight: 800; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .07em;
  margin: 1.25rem 0 .5rem;
}
.dash-section-label:first-child { margin-top: 0; }

.dash-charts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 900px) { .dash-charts-row { grid-template-columns: 1fr; } }

.dash-leaderboards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 900px) { .dash-leaderboards-row { grid-template-columns: 1fr; } }

/* Funnel */
.dash-funnel {
  display: flex;
  gap: .75rem;
  align-items: stretch;
}
.dash-funnel-step {
  flex: 1;
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}
.dash-funnel-count {
  font-size: 1.75rem; font-weight: 800; line-height: 1;
}
.dash-funnel-label {
  font-size: .75rem; font-weight: 700; margin: .25rem 0 .125rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.dash-funnel-pct {
  font-size: .85rem; font-weight: 600; opacity: .7;
}
@media (max-width: 640px) { .dash-funnel { flex-direction: column; } }

/* Rank badges */
.dash-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  font-size: .7rem; font-weight: 800;
  background: var(--gray-200); color: var(--gray-600);
}
.dash-rank-1 { background: #FEF3C7; color: #92400E; }
.dash-rank-2 { background: var(--gray-200); color: var(--gray-700); }
.dash-rank-3 { background: #FDE8D8; color: #9A3412; }

/* Score badges */
.dash-score-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .2rem .55rem; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 700;
}
.dash-score-ok  { background: var(--success-light); color: #065F46; }
.dash-score-low { background: var(--danger-light);  color: #991B1B; }

/* Sub-badges inside stat cards */
.stat-sub-badges {
  display: flex; flex-wrap: wrap; gap: .25rem;
  justify-content: center; margin-top: .375rem;
}
.stat-sub-badge {
  font-size: .65rem; font-weight: 600;
  background: var(--gray-100); color: var(--gray-500);
  padding: .1rem .4rem; border-radius: var(--radius-full);
}
.stat-sub-badge-green { background: var(--success-light); color: #065F46; }
.stat-sub-badge-amber { background: var(--accent-light);  color: var(--accent-dark); }

.mb-3 { margin-bottom: 1rem; }

/* Role badges */
.badge-role-admin {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 700;
  background: #7C3AED;
  color: white;
}
.badge-role-maintainer {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 700;
  background: var(--primary);
  color: white;
}
.badge-role-client {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 700;
  background: var(--gray-200);
  color: var(--gray-700);
}

/* Kind badges */
.badge-kind-linguagens { color: #7C3AED; font-size: .75rem; font-weight: 600; }
.badge-kind-ciencias_humanas { color: var(--primary); font-size: .75rem; font-weight: 600; }
.badge-kind-ciencias_natureza { color: var(--success); font-size: .75rem; font-weight: 600; }
.badge-kind-matematica { color: var(--accent-dark); font-size: .75rem; font-weight: 600; }

/* Reported / reviewed badges */
.reported-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 700;
  background: var(--danger-light);
  color: var(--danger);
}
.reviewed-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 700;
  background: var(--success-light);
  color: var(--success);
}

/* Reported question card in admin */
.reported-question-card .admin-card-header {
  background: #FFF7F7;
  border-bottom-color: var(--danger-light);
}

/* Admin forms */
.admin-form { display: flex; flex-direction: column; gap: 1.25rem; }
.admin-form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.admin-form-actions {
  display: flex;
  gap: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--gray-100);
}
.admin-form-errors {
  background: var(--danger-light);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: .875rem;
  margin-bottom: .5rem;
}
.admin-form-error-item { color: var(--danger); font-size: .875rem; margin-bottom: .25rem; }
.admin-form-error-item:last-child { margin-bottom: 0; }

.form-input {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  color: var(--gray-900);
  background: white;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.form-textarea-lg { resize: vertical; min-height: 160px; }
.form-textarea-sm { resize: vertical; min-height: 64px; }
.form-checkbox { width: 1rem; height: 1rem; cursor: pointer; }

/* Admin options editor */
.admin-options-header {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--gray-100);
}
.admin-option-group { display: flex; gap: .75rem; align-items: flex-start; }
.admin-option-label { flex-shrink: 0; padding-top: .5rem; }
.admin-option-letter {
  width: 28px; height: 28px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .875rem; color: var(--gray-700);
}
.admin-option-group .form-input { flex: 1; }

/* Full-width option group with image upload */
.admin-option-group-full {
  display: flex; gap: .75rem; align-items: flex-start;
  margin-bottom: .875rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--gray-100);
}
.admin-option-group-full:last-of-type { border-bottom: none; }
.admin-option-letter-col { flex-shrink: 0; padding-top: .5rem; }
.admin-option-content-col { flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.admin-option-image-row { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.admin-option-img-preview { display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; }
.admin-option-img-upload { flex: 1; min-width: 200px; }
.form-input-sm { padding: .375rem .625rem; font-size: .825rem; }

/* Answer option radios */
.admin-answer-options {
  display: flex;
  gap: .625rem;
  flex-wrap: wrap;
}
.admin-answer-option-item {
  display: flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all .15s;
}
.admin-answer-option-item:hover { border-color: var(--success); color: var(--success); }
.admin-answer-option-item.selected,
.admin-answer-option-item:has(input[type="radio"]:checked) { border-color: var(--success); background: var(--success-light); color: var(--success); }
.admin-answer-radio { display: none; }

/* Images grid */
.admin-images-grid { display: flex; gap: .75rem; flex-wrap: wrap; }
.admin-image-item { position: relative; }

/* Edition meta */
.admin-edition-meta {
  display: flex;
  gap: 1.5rem;
  font-size: .875rem;
  color: var(--gray-500);
  margin-bottom: 1.25rem;
}

/* mb-3 utility */
.mb-3 { margin-bottom: 1.5rem; }

/* ================================================================
   STUDENT DASHBOARD
   ================================================================ */
.student-dashboard { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }

.dashboard-header {
  background: linear-gradient(135deg, #4338CA 0%, #6D28D9 50%, #7C3AED 100%);
  color: white; padding: 1.75rem 1rem 1.5rem; position: relative; overflow: hidden;
}
.dashboard-header::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1' fill='white' fill-opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
}
.dashboard-header::after {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.2) 0%, transparent 70%);
  pointer-events: none;
}
.dashboard-header-inner { position: relative; z-index: 1; }
.dashboard-header-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.dashboard-greeting { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .2rem; }
.dashboard-subtext { font-size: .875rem; color: #C7D2FE; }

.dashboard-inner { max-width: 1100px; margin: 0 auto; width: 100%; padding: 0 1rem; }
@media (min-width: 769px) { .dashboard-inner { padding: 0 2rem; } }

/* Stats band */
.dashboard-stats {
  background: white; border-bottom: 1px solid var(--gray-200);
  padding: 1.25rem 1rem; box-shadow: var(--shadow-sm);
}
.dashboard-stats-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .875rem;
}
@media (min-width: 769px) { .dashboard-stats-inner { padding: 0 2rem; } }

.ds-card {
  background: var(--gray-50); border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: .875rem 1rem;
  display: flex; align-items: center; gap: .75rem;
  transition: box-shadow .2s ease, transform .2s ease;
  flex: 0 1 160px; min-width: 130px;
}
.ds-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ds-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.ds-icon-primary { background: var(--primary-light); }
.ds-icon-success { background: var(--success-light); }
.ds-icon-danger { background: var(--danger-light); }
.ds-icon-neutral { background: var(--gray-200); }
.ds-icon-accent { background: var(--accent-light); }
.ds-icon-purple { background: #F3E8FF; }
.ds-body { min-width: 0; }
.ds-value { font-size: 1.5rem; font-weight: 900; color: var(--gray-900); line-height: 1; }
.ds-value-success { color: #065F46; }
.ds-value-danger { color: #991B1B; }
.ds-value-accent { color: var(--accent-dark); }
.ds-value-purple { color: #6D28D9; }
.ds-label { font-size: .7rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: .125rem; }

/* Accuracy gauge bar */
.accuracy-bar-wrap { margin-top: .375rem; height: 4px; background: var(--gray-200); border-radius: 99px; overflow: hidden; }
.accuracy-bar { height: 100%; border-radius: 99px; transition: width .6s ease; }

/* Performance card (larger) */
.ds-card-accent-bg {
  background: linear-gradient(135deg, var(--primary-light) 0%, #EDE9FE 100%);
  border-color: var(--primary);
}

/* Tests section */
.tests-section { flex: 1; padding: 1.5rem 1rem 3rem; }
.tests-section-inner { max-width: 1100px; margin: 0 auto; }
@media (min-width: 769px) { .tests-section { padding: 1.75rem 2rem 3rem; }
  .tests-section-inner { padding: 0; } }

.tests-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; gap: 1rem; flex-wrap: wrap;
}
.tests-section-title { font-size: 1.1rem; font-weight: 800; color: var(--gray-900); }
.tests-section-count { font-size: .8rem; color: var(--gray-500); font-weight: 500; margin-top: .1rem; }

/* KPI GRID (legacy, for result page stats) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin: 0 auto 1.5rem;
  max-width: 900px;
  padding: 0 1rem;
}
@media (min-width: 769px) {
  .kpi-grid { padding: 0 2rem; }
}
.kpi-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--primary);
}
.kpi-card-success { border-left-color: var(--success); }
.kpi-card-danger { border-left-color: var(--danger); }
.kpi-card-neutral { border-left-color: var(--gray-300); }
.kpi-card-accent { border-left-color: var(--accent); }
.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: .25rem;
}
.kpi-label {
  font-size: .775rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* Modal kind constraint hint */
.kind-limit-hint {
  font-size: .8rem; font-weight: 700; color: var(--primary);
  background: var(--primary-light); border: 1px solid #C7D2FE;
  border-radius: var(--radius-sm); padding: .4rem .75rem;
  display: flex; align-items: center; gap: .375rem; margin-bottom: .625rem;
}
.checkbox-item.disabled-kind { opacity: .45; cursor: not-allowed; pointer-events: none; }
.checkbox-item.disabled-kind input { cursor: not-allowed; }

/* ================================================================
   REPORT BUTTON (client side)
   ================================================================ */
.btn-report {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .75rem;
  color: var(--gray-400);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  padding: .2rem .4rem;
  border-radius: 4px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.btn-report:hover { color: var(--danger); background: var(--danger-light); }
.btn-report:disabled { opacity: .5; cursor: not-allowed; }

/* Report reviewed message (inline) */
.report-reviewed-msg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  color: var(--gray-600);
  background: var(--warning-light);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: .5rem .75rem;
  margin-top: .25rem;
}
.report-anyway-link {
  color: var(--danger);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font-size: .75rem;
}

/* ================================================================
   ADMIN responsive
   ================================================================ */
@media (max-width: 900px) {
  .admin-sidebar {
    width: 200px;
    min-width: 200px;
  }
}
@media (max-width: 640px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .admin-sidebar-footer { display: none; }
  .admin-nav { display: flex; flex-wrap: wrap; padding: .5rem; }
  .admin-stat-row { grid-template-columns: 1fr 1fr; }

  /* Table horizontal scroll on mobile */
  .admin-card-body.p-0 { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 540px; }

  /* Admin main padding reduction */
  .admin-main { padding: 1rem .75rem; }

  /* Show "Área do Aluno" link in topbar on mobile (since sidebar-footer is hidden) */
  .admin-topbar-student-link { display: flex !important; }
}

/* Hidden on desktop, shown on mobile via the rule above */
.admin-topbar-student-link {
  display: none;
  align-items: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  gap: .25rem;
  padding: .375rem .625rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all .15s;
}
.admin-topbar-student-link:hover { background: var(--gray-50); color: var(--primary); border-color: var(--primary); }

/* ================================================================
   TEST CARD SCORE BADGE
   ================================================================ */
.tq-correct { color: var(--success); font-weight: 800; }
.tq-sep { color: var(--gray-300); font-weight: 400; margin: 0 1px; }
.tq-total { color: var(--primary); font-weight: 800; }
.tq-qs-label { font-weight: 400; font-size: .7em; color: var(--gray-500); }
.test-q-score { font-size: .85rem; }

/* ================================================================
   CONFIRM MODAL — shared icon + desc styles
   ================================================================ */
.confirm-modal-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900;
  margin: 0 auto 1rem;
}
.confirm-modal-icon-danger  { background: var(--danger-light);  color: var(--danger); }
.confirm-modal-icon-warning { background: var(--warning-light); color: var(--accent-dark); }
.confirm-modal-icon-success { background: var(--success-light); color: var(--success); }
.confirm-modal-desc {
  text-align: center; font-size: .85rem; color: var(--gray-500);
  line-height: 1.5; margin-top: .375rem;
}

/* ================================================================
   USERS KPI — redesign
   ================================================================ */
.users-kpi-wrapper { margin-bottom: 1.5rem; }

.users-kpi-summary {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  background: white; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm);
}
.users-kpi-summary-left { display: flex; align-items: baseline; gap: .625rem; }
.users-kpi-total-num {
  font-size: 2.25rem; font-weight: 900; color: var(--gray-900);
  line-height: 1; letter-spacing: -.02em;
}
.users-kpi-total-label { font-size: .875rem; color: var(--gray-500); font-weight: 500; }
.users-kpi-breakdown-bar-wrap { flex: 1; min-width: 200px; }
.users-kpi-breakdown-bar {
  height: 10px; border-radius: 99px; background: var(--gray-100);
  display: flex; overflow: hidden; margin-bottom: .5rem;
}
.users-kpi-breakdown-seg { height: 100%; transition: width .5s ease; }
.seg-clients { background: var(--gray-400); }
.seg-maint   { background: var(--primary); }
.seg-admins  { background: #7C3AED; }
.users-kpi-breakdown-legend {
  display: flex; gap: 1rem; font-size: .75rem; color: var(--gray-500); font-weight: 500;
}
.legend-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: .3rem; vertical-align: middle;
}
.dot-clients { background: var(--gray-400); }
.dot-maint   { background: var(--primary); }
.dot-admins  { background: #7C3AED; }

.users-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.users-kpi-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.25rem 1rem;
  display: flex; align-items: flex-start; gap: 1rem;
  position: relative; overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.users-kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.users-kpi-card::after {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.users-kpi-card-clients::after  { background: var(--gray-400); }
.users-kpi-card-maint::after    { background: var(--primary); }
.users-kpi-card-admins::after   { background: #7C3AED; }

.users-kpi-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  margin-top: .125rem;
}
.users-kpi-icon-clients { background: var(--gray-100); }
.users-kpi-icon-maint   { background: var(--primary-light); }
.users-kpi-icon-admins  { background: #F3E8FF; }

.users-kpi-body { flex: 1; min-width: 0; }
.users-kpi-value {
  font-size: 2rem; font-weight: 900; color: var(--gray-900);
  line-height: 1; letter-spacing: -.02em; margin-bottom: .2rem;
}
.users-kpi-label {
  font-size: .75rem; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: .625rem;
}
.users-kpi-bar-track {
  height: 4px; background: var(--gray-100); border-radius: 99px;
  overflow: hidden; margin-bottom: .375rem;
}
.users-kpi-bar { height: 100%; border-radius: 99px; transition: width .5s ease; min-width: 2px; }
.bar-clients { background: var(--gray-400); }
.bar-maint   { background: var(--primary); }
.bar-admins  { background: #7C3AED; }
.users-kpi-pct { font-size: .75rem; color: var(--gray-400); }

@media (max-width: 640px) {
  .users-kpi-grid { grid-template-columns: 1fr; }
  .users-kpi-summary { gap: 1rem; }
}

/* ================================================================
   REPORTED QUESTIONS — table page
   ================================================================ */
.reported-empty-state {
  padding: 3rem 1.5rem; text-align: center;
}
.reported-empty-icon {
  font-size: 2.5rem; color: var(--success); margin-bottom: .75rem;
  width: 60px; height: 60px; background: var(--success-light);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto .875rem; font-size: 1.75rem; font-weight: 900;
}
.reported-empty-title { font-weight: 700; font-size: 1.1rem; color: var(--gray-700); margin-bottom: .375rem; }
.reported-empty-desc  { color: var(--gray-400); font-size: .875rem; }

.reported-page-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem;
}
.reported-page-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.reported-count-badge {
  display: inline-flex; align-items: center;
  background: var(--danger-light); color: var(--danger);
  font-size: .8rem; font-weight: 700; padding: .3rem .875rem;
  border-radius: var(--radius-full);
}
.reported-page-info { font-size: .8rem; color: var(--gray-500); }

.reported-q-num-cell {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; padding: .2rem .4rem;
  background: var(--danger-light); color: var(--danger);
  font-size: .75rem; font-weight: 800; border-radius: 6px;
}
.reported-edition-chip {
  display: inline-block; padding: .15rem .5rem;
  background: var(--primary-light); color: var(--primary-dark);
  border-radius: var(--radius-full); font-size: .75rem; font-weight: 600;
  white-space: nowrap;
}
.reported-title-cell {
  font-size: .875rem; color: var(--gray-700); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; margin: 1.5rem 0; flex-wrap: wrap;
}
.pagination-btn {
  display: inline-flex; align-items: center;
  padding: .5rem 1.125rem; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300); color: var(--gray-600);
  font-size: .875rem; font-weight: 600; background: white;
  transition: all .15s;
}
.pagination-btn:hover { border-color: var(--primary); color: var(--primary); }
.pagination-pages { display: flex; gap: .25rem; align-items: center; }
.pagination-page {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--gray-200);
  font-size: .875rem; font-weight: 600; color: var(--gray-600);
  background: white; transition: all .15s;
}
.pagination-page:hover { border-color: var(--primary); color: var(--primary); }
.pagination-page.active {
  background: var(--primary); border-color: var(--primary); color: white;
}
.pagination-ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; color: var(--gray-400); font-size: .875rem;
}

/* ================================================================
   AREA PERFORMANCE CARDS (shared: dashboard + result page)
   ================================================================ */
.area-section {
  padding: 1.5rem 1rem 0;
  max-width: 1100px; margin: 0 auto;
}
@media (min-width: 769px) { .area-section { padding: 1.75rem 2rem 0; } }

.area-section-title {
  font-size: .75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gray-500); margin-bottom: .875rem;
}

.area-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
  justify-content: center;
}

.area-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
  overflow: hidden; position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
  flex: 1 1 220px; max-width: 300px;
}
.area-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.area-card-top {
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem 1rem .625rem;
}
.area-card-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.area-card-name { font-size: .8rem; font-weight: 700; color: var(--gray-800); }
.area-card-pct { font-size: 1.5rem; font-weight: 900; line-height: 1; }

.area-card-bar-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px;
  background: var(--gray-200); border-top: 1px solid var(--gray-200);
}
.area-card-stat {
  background: white; padding: .5rem .625rem; text-align: center;
}
.area-card-stat-val { font-size: 1rem; font-weight: 800; line-height: 1; }
.area-card-stat-lbl { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400); margin-top: .125rem; }
.area-stat-correct .area-card-stat-val { color: #065F46; }
.area-stat-wrong   .area-card-stat-val { color: #991B1B; }
.area-stat-blank   .area-card-stat-val { color: var(--gray-500); }

.area-pct-bar {
  height: 4px; background: var(--gray-100); margin: 0 1rem .625rem;
  border-radius: 99px; overflow: hidden;
}
.area-pct-bar-fill { height: 100%; border-radius: 99px; transition: width .6s ease; }

/* Area color theming */
.area-ling  { --ac: var(--c-ling);  --ac-l: var(--c-ling-light); }
.area-hum   { --ac: var(--c-hum);   --ac-l: var(--c-hum-light); }
.area-nat   { --ac: var(--c-nat);   --ac-l: var(--c-nat-light); }
.area-mat   { --ac: var(--c-mat);   --ac-l: var(--c-mat-light); }

.area-card-icon { background: var(--ac-l); }
.area-card-pct  { color: var(--ac); }
.area-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ac);
}
.area-pct-bar-fill { background: var(--ac); }

/* ================================================================
   RESULT PAGE — REDESIGNED
   ================================================================ */
.result-container { max-width: 960px; margin: 0 auto; padding: 2rem 1rem 4rem; }

/* Score hero */
.result-hero {
  text-align: center; padding: 2.5rem 1rem 2rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4c1d95 100%);
  border-radius: var(--radius-lg); color: white; margin-bottom: 1.5rem;
  position: relative; overflow: hidden;
}
.result-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M20 20h20v20H20zM0 0h20v20H0z'/%3E%3C/g%3E%3C/svg%3E");
}
.result-hero > * { position: relative; z-index: 1; }

.score-circle {
  width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 1.25rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px rgba(255,255,255,.15), var(--shadow-xl);
  background: conic-gradient(var(--score-color, white) 0deg, var(--score-color, white) calc(var(--score-pct, 0) * 3.6deg), rgba(255,255,255,.15) calc(var(--score-pct, 0) * 3.6deg));
  position: relative;
}
.score-circle::after {
  content: ''; position: absolute; inset: 12px; border-radius: 50%;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
}
.score-value { position: relative; z-index: 1; font-size: 2.25rem; font-weight: 900; color: white; line-height: 1; }
.score-label { position: relative; z-index: 1; font-size: .7rem; color: rgba(255,255,255,.6); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.result-hero h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .375rem; }
.result-hero-sub { font-size: .875rem; color: rgba(255,255,255,.7); }

/* Overall stat cards */
.stats-grid { display: flex; justify-content: center; gap: .875rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.stat-card { text-align: center; padding: 1.25rem .875rem; border-radius: var(--radius); flex: 1 1 90px; max-width: 180px; }
.stat-card-correct { background: var(--success-light); border: 2px solid rgba(16,185,129,.3); }
.stat-card-wrong   { background: var(--danger-light);  border: 2px solid rgba(239,68,68,.3); }
.stat-card-skip    { background: var(--gray-100);      border: 2px solid var(--gray-200); }
.stat-card-value { font-size: 2.25rem; font-weight: 900; line-height: 1; margin-bottom: .2rem; }
.stat-card-correct .stat-card-value { color: #065F46; }
.stat-card-wrong   .stat-card-value { color: #991B1B; }
.stat-card-skip    .stat-card-value { color: var(--gray-600); }
.stat-card-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat-card-correct .stat-card-label { color: #065F46; }
.stat-card-wrong   .stat-card-label { color: #991B1B; }
.stat-card-skip    .stat-card-label { color: var(--gray-500); }

/* Area breakdown on result page */
.result-area-section {
  margin-bottom: 1.5rem;
}
.result-area-title {
  font-size: .75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gray-500); margin-bottom: .75rem;
  padding-left: .125rem;
}

/* Result question review */
.result-review-title {
  font-size: 1rem; font-weight: 800; color: var(--gray-900);
  margin: 1.5rem 0 .875rem;
  padding-top: 1rem; border-top: 1px solid var(--gray-200);
}
.result-actions { display: flex; gap: .75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

/* ================================================================
   STUDENT DASHBOARD — area section + filter pills
   ================================================================ */
.dashboard-area-section {
  background: white; border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.25rem 1rem;
}
.dashboard-area-inner {
  max-width: 1100px; margin: 0 auto;
}
@media (min-width: 769px) { .dashboard-area-inner { padding: 0 2rem; } }

.area-section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .875rem;
}
.area-section-title {
  font-size: .95rem; font-weight: 800; color: var(--gray-800); letter-spacing: -.01em;
}
.area-section-sub {
  font-size: .75rem; color: var(--gray-400); margin-top: .1rem;
}

.area-filter-bar {
  display: flex; align-items: center; gap: .375rem; flex-wrap: wrap;
  margin-bottom: .125rem;
}
.area-filter-pill {
  padding: .3rem .75rem; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--gray-200); background: var(--gray-50);
  color: var(--gray-600); transition: all .15s ease; white-space: nowrap;
}
.area-filter-pill:hover { border-color: var(--primary-muted); color: var(--primary); background: var(--primary-light); }
.area-filter-pill-active { background: var(--primary); border-color: var(--primary); color: white; }
.area-filter-pill-active:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }

.area-filter-limit-group {
  display: inline-flex; align-items: center; gap: .375rem;
}
.area-filter-limit-input {
  width: 56px; padding: .25rem .5rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary); font-size: .8rem; font-weight: 700;
  color: var(--primary); text-align: center; background: var(--primary-light);
  -moz-appearance: textfield;
}
.area-filter-limit-input::-webkit-inner-spin-button,
.area-filter-limit-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.area-filter-limit-input:focus { outline: none; border-color: var(--primary-dark); }
.area-filter-limit-label { font-size: .75rem; font-weight: 600; color: var(--primary); }

.area-filter-empty {
  font-size: .85rem; color: var(--gray-400); padding: 1rem 0; text-align: center;
}

/* ================================================================
   PERFORMANCE FILTER BAR (controls both stats band + area cards)
   ================================================================ */
.perf-filter-bar {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  padding: .625rem 1rem;
}
.perf-filter-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
@media (min-width: 769px) { .perf-filter-inner { padding: 0 2rem; } }
.perf-filter-label {
  font-size: .7rem; font-weight: 800; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
  padding-right: .25rem; border-right: 1px solid var(--gray-200);
}
/* Small chip shown when a non-default period is active */
.perf-filter-active-chip {
  display: inline-flex; align-items: center;
  background: var(--primary-light); color: var(--primary-dark);
  font-size: .7rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: var(--radius-full);
  border: 1px solid #C7D2FE;
}
.perf-filter-active-chip::before { content: '⬤'; margin-right: .3rem; font-size: .5rem; color: var(--primary); }

/* ================================================================
   TEST CARD — score progress bar
   ================================================================ */
.test-card-score-bar {
  height: 3px; background: var(--gray-100); border-radius: 99px;
  overflow: hidden; margin-top: .375rem;
}
.test-card-score-bar-fill { height: 100%; border-radius: 99px; transition: width .5s ease; }

@media (max-width: 640px) {
  .area-card { flex: 1 1 140px; max-width: calc(50% - .44rem); }
  .area-card-top { padding: .75rem .875rem .5rem; }
  .result-hero { padding: 1.75rem 1rem 1.5rem; border-radius: var(--radius); }
  .score-circle { width: 130px; height: 130px; }
  .score-value { font-size: 1.875rem; }
  .stats-grid { gap: .5rem; }
  .stat-card { padding: 1rem .625rem; }
  .stat-card-value { font-size: 1.75rem; }
}

/* ─────────── Paywall / assinatura ─────────── */
.paywall-inline-error {
  background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA;
  border-radius: var(--radius-sm); padding: .6rem .8rem; margin-bottom: .9rem; font-size: .85rem;
}
.paywall-inline-error[data-kind="warn"] { background:#FFFBEB; color:#92400E; border-color:#FDE68A; }
.paywall-modal { max-width: 480px; }
.paywall-header { align-items: flex-start; }
.paywall-sub { font-size: .82rem; color: var(--gray-500); margin-top: .3rem; font-weight: 400; line-height: 1.4; }
.paywall-price-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white; padding: 1.1rem 1.5rem;
}
.paywall-price { display: flex; align-items: baseline; gap: .4rem; }
.paywall-price-value { font-size: 2rem; font-weight: 900; letter-spacing: -.02em; }
.paywall-price-period { font-size: .85rem; opacity: .9; }
.paywall-benefits { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .2rem; }
.paywall-benefits li { font-size: .82rem; opacity: .95; }
.paywall-body { max-height: 46vh; overflow-y: auto; }
.paywall-section-label {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--gray-500); margin: .4rem 0 .6rem;
}
.paywall-body .paywall-section-label:not(:first-child) { margin-top: 1.1rem; }
.paywall-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.paywall-row .form-group:only-child { grid-column: 1 / -1; }
@media (max-width: 480px) { .paywall-row { grid-template-columns: 1fr 1fr; } }
.paywall-footer { flex-direction: column; align-items: stretch; gap: .5rem; }
.paywall-submit { width: 100%; }
.paywall-powered {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .72rem; color: var(--gray-400); margin-top: .1rem;
}
.paywall-asaas strong { color: var(--gray-600); }
.paywall-nostore { font-size: .7rem; color: var(--gray-400); text-align: center; margin: 0; }

/* Assinatura — página da conta */
.sub-status-card {
  border-radius: var(--radius); padding: 1.25rem 1.5rem; color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}
.sub-status-card.sub-inactive { background: linear-gradient(135deg,#334155 0%,#1E293B 100%); }
.sub-status-days { font-size: 2.4rem; font-weight: 900; line-height: 1; }
.sub-status-label { font-size: .85rem; opacity: .9; margin-top: .25rem; }
.sub-status-meta { font-size: .78rem; opacity: .8; margin-top: .6rem; }

/* Página da conta */
.account-page { min-height: calc(100vh - 60px); background: var(--gray-50); padding: 1.5rem 1rem 3rem; }
.account-inner { max-width: 680px; margin: 0 auto; }
.account-title { font-size: 1.6rem; font-weight: 900; color: var(--gray-900); margin: .5rem 0 1.25rem; }
.account-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 1.25rem; overflow: hidden; }
.account-card-head { padding: .9rem 1.25rem; border-bottom: 1px solid var(--gray-100); font-weight: 800; color: var(--gray-800); font-size: .95rem; }
.account-card-body { padding: 1.25rem; }
.account-cancel-row { margin-top: 1rem; display: flex; justify-content: flex-end; }
.account-cancel-link { color: var(--gray-400); }
.account-cancel-link:hover { color: var(--danger); }
.account-cancel-form { display: inline; }
.account-back { text-align: center; margin-top: .5rem; }

/* ─────────── Landing (SEO) ─────────── */
.container-narrow { max-width: 760px; }
.social-proof { background: var(--accent-light, #FEF3C7); padding: 1.25rem 1rem; text-align: center; }
.social-proof-text { font-size: 1.05rem; color: var(--gray-800); margin: 0; }
.why-best { padding: 4rem 1rem; background: white; }
.why-best-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; max-width: 900px; margin: 2rem auto 0; }
.why-best-item { display: flex; gap: .75rem; align-items: flex-start; }
.why-best-item > span { font-size: 1.2rem; }
.why-best-item strong { display: block; color: var(--gray-900); margin-bottom: .2rem; }
.why-best-item p { color: var(--gray-600); font-size: .9rem; margin: 0; }
.testimonials { padding: 4rem 1rem; background: var(--gray-50); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; max-width: 1000px; margin: 2rem auto 0; }
.testimonial-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; }
.testimonial-card p { color: var(--gray-700); font-style: italic; margin: 0 0 1rem; line-height: 1.6; }
.testimonial-author { font-weight: 700; color: var(--primary); font-size: .88rem; }
.faq { padding: 4rem 1rem; background: white; }
.faq-item { padding: 1.1rem 0; border-bottom: 1px solid var(--gray-100); }
.faq-item h3 { font-size: 1.02rem; color: var(--gray-900); margin: 0 0 .4rem; }
.faq-item p { color: var(--gray-600); margin: 0; line-height: 1.6; }
.final-cta { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; text-align: center; padding: 4rem 1rem; }
.final-cta h2 { font-size: 2rem; font-weight: 900; margin-bottom: .6rem; }
.final-cta p { color: #C7D2FE; margin-bottom: 1.75rem; font-size: 1.05rem; }
.landing-footer { background: var(--gray-900, #0F172A); color: var(--gray-300, #CBD5E1); padding: 2.5rem 1rem; text-align: center; font-size: .85rem; }
.landing-footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }
.landing-footer-links a { color: var(--gray-300, #CBD5E1); text-decoration: none; }
.landing-footer-links a:hover { color: white; }
@media (max-width: 720px) {
  .why-best-grid, .testimonials-grid { grid-template-columns: 1fr; }
}

/* ─────────── Blog ─────────── */
.blog-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; padding: 3rem 1rem; text-align: center; }
.blog-hero h1 { font-size: 2.2rem; font-weight: 900; margin-bottom: .5rem; }
.blog-hero p { color: #C7D2FE; max-width: 620px; margin: 0 auto; }
.blog-list-section { padding: 3rem 1rem; background: var(--gray-50); min-height: 60vh; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; max-width: 1000px; margin: 0 auto; }
.blog-card { display: block; background: white; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.blog-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.blog-card-date { font-size: .75rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; }
.blog-card-title { font-size: 1.15rem; color: var(--gray-900); margin: .5rem 0 .6rem; line-height: 1.3; }
.blog-card-desc { color: var(--gray-600); font-size: .9rem; line-height: 1.55; margin-bottom: 1rem; }
.blog-card-link { color: var(--primary); font-weight: 700; font-size: .88rem; }
.blog-cta, .blog-article-cta { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 2rem; text-align: center; max-width: 640px; margin: 2.5rem auto 0; }
.blog-cta h3, .blog-article-cta h3 { font-size: 1.3rem; color: var(--gray-900); margin-bottom: .5rem; }
.blog-cta p, .blog-article-cta p { color: var(--gray-600); margin-bottom: 1.25rem; }
.blog-article { padding: 2.5rem 1rem 3rem; background: white; min-height: 60vh; }
.blog-breadcrumb { font-size: .82rem; color: var(--gray-400); margin-bottom: 1rem; }
.blog-breadcrumb a { color: var(--primary); text-decoration: none; }
.blog-article-title { font-size: 2rem; font-weight: 900; color: var(--gray-900); line-height: 1.2; margin-bottom: .5rem; }
.blog-article-date { color: var(--gray-400); font-size: .85rem; margin-bottom: 2rem; }
.blog-article-body { color: var(--gray-700); line-height: 1.8; font-size: 1.02rem; }
.blog-article-body h2 { font-size: 1.4rem; color: var(--gray-900); margin: 2rem 0 .75rem; }
.blog-article-body p { margin-bottom: 1.1rem; }
.blog-back { text-align: center; margin-top: 2rem; }

/* ═══════════════ LANDING PAGE (lp-) ═══════════════ */
.lp-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--gray-100); }
.lp-nav-inner { max-width: 1160px; margin: 0 auto; padding: .8rem 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.lp-nav-links { display: flex; align-items: center; gap: 1.25rem; }
.lp-nav-link { color: var(--gray-600); text-decoration: none; font-weight: 600; font-size: .9rem; }
.lp-nav-link:hover { color: var(--primary); }

.lp-hero { position: relative; overflow: hidden; background: linear-gradient(135deg,#4338CA 0%,#5B21B6 55%,#6D28D9 100%); color: white; }
.lp-hero-bg { position: absolute; inset: 0; background:
  radial-gradient(600px 300px at 85% 10%, rgba(245,158,11,.28), transparent 60%),
  radial-gradient(500px 300px at 10% 90%, rgba(124,58,237,.35), transparent 60%); }
.lp-hero-inner { position: relative; max-width: 1160px; margin: 0 auto; padding: 4.5rem 1.25rem 5rem; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.lp-hero-copy { max-width: 560px; }
.lp-badge { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #fff; padding: .4rem .85rem; border-radius: var(--radius-full); font-size: .82rem; font-weight: 600; margin-bottom: 1.25rem; }
.lp-hero-copy h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 900; line-height: 1.08; letter-spacing: -.03em; margin-bottom: 1.1rem; }
.lp-hl { color: var(--accent); position: relative; white-space: nowrap; }
.lp-hero-sub { font-size: clamp(1rem,1.5vw,1.18rem); color: #DDD6FE; line-height: 1.65; margin-bottom: 1.9rem; }
.lp-hero-cta { display: flex; gap: .9rem; flex-wrap: wrap; }
.lp-btn-ghost-light { border: 1.5px solid rgba(255,255,255,.4); color: #fff; background: transparent; }
.lp-btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.lp-hero-trust { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 1.6rem; font-size: .85rem; color: #C4B5FD; }

/* mockup */
.lp-hero-visual { display: flex; justify-content: center; }
.lp-mock { width: 100%; max-width: 400px; background: #fff; border-radius: var(--radius-lg); box-shadow: 0 30px 60px -12px rgba(0,0,0,.4); overflow: hidden; transform: rotate(1.5deg); }
.lp-mock-head { display: flex; align-items: center; gap: .4rem; padding: .75rem 1rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-100); }
.lp-mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-300); }
.lp-mock-dot:nth-child(1){ background:#FB7185; } .lp-mock-dot:nth-child(2){ background:#FBBF24; } .lp-mock-dot:nth-child(3){ background:#34D399; }
.lp-mock-title { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--gray-500); }
.lp-mock-body { padding: 1.25rem; }
.lp-mock-score { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.lp-mock-ring { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--success) 0 78%, var(--gray-200) 78% 100%); }
.lp-mock-ring span { width: 54px; height: 54px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 900; color: var(--gray-900); font-size: 1.05rem; }
.lp-mock-score-lbl { font-weight: 800; color: var(--gray-800); }
.lp-mock-score-sub { font-size: .78rem; color: var(--gray-400); }
.lp-mock-bar-row { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.lp-mock-bar-name { font-size: .72rem; color: var(--gray-500); font-weight: 600; }
.lp-mock-bar-track { height: 8px; background: var(--gray-100); border-radius: 99px; overflow: hidden; }
.lp-mock-bar-fill { display: block; height: 100%; border-radius: 99px; }
.lp-mock-bar-pct { font-size: .72rem; font-weight: 800; color: var(--gray-700); text-align: right; }

/* prova social */
.lp-proof { background: var(--gray-900); color: #fff; }
.lp-proof-inner { max-width: 1160px; margin: 0 auto; padding: 1.5rem 1.25rem; display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.lp-proof-item { text-align: center; display: flex; flex-direction: column; gap: .15rem; }
.lp-proof-item strong { font-size: 1.5rem; font-weight: 900; color: var(--accent); letter-spacing: -.02em; }
.lp-proof-item span { font-size: .8rem; color: #9CA3AF; }

/* seções */
.lp-section { padding: 4.5rem 1.25rem; background: #fff; }
.lp-section-alt { background: var(--gray-50); }
.lp-eyebrow { text-align: center; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 800; color: var(--primary); margin-bottom: .5rem; }
.lp-h2 { text-align: center; font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 900; color: var(--gray-900); letter-spacing: -.02em; margin-bottom: .6rem; }
.lp-sub { text-align: center; color: var(--gray-500); max-width: 620px; margin: 0 auto 2.75rem; font-size: 1.02rem; line-height: 1.6; }

.lp-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; max-width: 960px; margin: 0 auto; }
.lp-step { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; position: relative; }
.lp-step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-weight: 900; font-size: 1.2rem; display: grid; place-items: center; margin: 0 auto 1rem; }
.lp-step h3 { font-size: 1.1rem; color: var(--gray-900); margin-bottom: .4rem; }
.lp-step p { color: var(--gray-500); font-size: .9rem; line-height: 1.6; }

.lp-features { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; }
.lp-feature { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.75rem 1.5rem; transition: transform .15s, box-shadow .15s; }
.lp-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lp-feature-ic { width: 52px; height: 52px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 1rem; }
.lp-ic-blue{ background: var(--primary-light);} .lp-ic-amber{ background: var(--accent-light);} .lp-ic-green{ background: var(--success-light);} .lp-ic-purple{ background:#F3E8FF;}
.lp-feature h3 { font-size: 1.05rem; color: var(--gray-900); margin-bottom: .4rem; }
.lp-feature p { color: var(--gray-500); font-size: .88rem; line-height: 1.6; }

.lp-numbers { background: linear-gradient(135deg,var(--primary) 0%,var(--secondary) 100%); color: #fff; padding: 3rem 1.25rem; }
.lp-numbers-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; text-align: center; }
.lp-num { font-size: clamp(2rem,4vw,2.75rem); font-weight: 900; letter-spacing: -.03em; }
.lp-num-lbl { font-size: .82rem; color: #C7D2FE; text-transform: uppercase; letter-spacing: .05em; margin-top: .2rem; }

.lp-testimonials { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.lp-testimonial { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.75rem; position: relative; }
.lp-quote { position: absolute; top: .5rem; right: 1.1rem; font-size: 3rem; color: var(--gray-100); font-family: Georgia, serif; line-height: 1; }
.lp-testimonial p { color: var(--gray-700); line-height: 1.65; margin-bottom: 1.25rem; position: relative; }
.lp-author { display: flex; align-items: center; gap: .7rem; }
.lp-avatar { width: 42px; height: 42px; border-radius: 50%; color: #fff; font-weight: 800; display: grid; place-items: center; }
.lp-author strong { display: block; color: var(--gray-900); font-size: .92rem; }
.lp-author span { font-size: .8rem; color: var(--primary); font-weight: 600; }

.lp-posts { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; max-width: 1000px; margin: 0 auto 2rem; }
.lp-post-card { display: block; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.lp-post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lp-post-date { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400); }
.lp-post-card h3 { font-size: 1.05rem; color: var(--gray-900); margin: .5rem 0 .5rem; line-height: 1.35; }
.lp-post-card p { font-size: .88rem; color: var(--gray-500); line-height: 1.55; margin-bottom: .9rem; }
.lp-post-link { color: var(--primary); font-weight: 700; font-size: .85rem; }
.lp-center { text-align: center; }

.lp-faq { max-width: 720px; margin: 0 auto; }
.lp-faq-item { border: 1px solid var(--gray-200); border-radius: var(--radius-sm); margin-bottom: .7rem; background: #fff; overflow: hidden; }
.lp-faq-item summary { cursor: pointer; padding: 1.05rem 1.25rem; font-weight: 700; color: var(--gray-800); list-style: none; position: relative; }
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after { content: "+"; position: absolute; right: 1.25rem; color: var(--primary); font-weight: 800; font-size: 1.2rem; }
.lp-faq-item[open] summary::after { content: "−"; }
.lp-faq-item p { padding: 0 1.25rem 1.15rem; color: var(--gray-600); line-height: 1.65; margin: 0; }

.lp-final { background: var(--gray-900); color: #fff; text-align: center; padding: 4.5rem 1.25rem; }
.lp-final-inner h2 { font-size: clamp(1.7rem,3vw,2.4rem); font-weight: 900; margin-bottom: .7rem; }
.lp-final-inner p { color: #9CA3AF; font-size: 1.08rem; margin-bottom: 2rem; }

.lp-footer { background: #0B1020; color: #94A3B8; padding: 2.5rem 1.25rem 1.25rem; }
.lp-footer-inner { max-width: 1160px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.lp-footer-brand { display: flex; align-items: center; gap: .7rem; }
.lp-footer-brand strong { color: #fff; display: block; }
.lp-footer-brand span { font-size: .8rem; }
.lp-footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.lp-footer-links a { color: #94A3B8; text-decoration: none; font-size: .9rem; }
.lp-footer-links a:hover { color: #fff; }
.lp-footer-copy { max-width: 1160px; margin: 1.5rem auto 0; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; text-align: center; }

@media (max-width: 900px) {
  .lp-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .lp-hero-copy { max-width: none; }
  .lp-hero-cta, .lp-hero-trust { justify-content: center; }
  .lp-hero-visual { margin-top: 1rem; }
  .lp-features { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 680px) {
  .lp-nav-links { display: none; }
  .lp-nav-links.nav-open { display: flex; flex-direction: column; position: absolute; top: 100%; right: 0; left: 0; background: #fff; padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-200); align-items: stretch; }
  .lp-proof-inner, .lp-steps, .lp-features, .lp-numbers-grid, .lp-testimonials, .lp-posts { grid-template-columns: 1fr 1fr; }
  .lp-testimonials, .lp-posts, .lp-steps { grid-template-columns: 1fr; }
}

/* ── Landing v2: trust strip + benefits + blog covers ── */
.lp-h2-hl { color: var(--primary); }
.lp-trust { background: #fff; border-bottom: 1px solid var(--gray-100); }
.lp-trust-inner { max-width: 1100px; margin: 0 auto; padding: 1.15rem 1.25rem; display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; justify-content: center; }
.lp-trust-item { display: flex; align-items: center; gap: .55rem; color: var(--gray-600); font-weight: 600; font-size: .9rem; }
.lp-trust-item span { font-size: 1.15rem; }

.lp-benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.lp-benefit { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.75rem 1.4rem; transition: transform .15s, box-shadow .15s; }
.lp-benefit:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.lp-benefit-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 1rem; }
.lp-benefit h3 { font-size: 1.05rem; color: var(--gray-900); margin-bottom: .45rem; line-height: 1.3; }
.lp-benefit p { color: var(--gray-500); font-size: .9rem; line-height: 1.6; }

.lp-stars { color: #FBBF24; font-size: .95rem; letter-spacing: 2px; margin-bottom: .75rem; }

/* blog covers na landing */
.lp-post-card { overflow: hidden; padding: 0; }
.lp-post-cover { aspect-ratio: 1200 / 500; overflow: hidden; background: var(--gray-100); }
.lp-post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-post-body { padding: 1.25rem 1.4rem 1.5rem; }
.lp-post-cat { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--primary); background: var(--primary-light); padding: .2rem .55rem; border-radius: 99px; margin-bottom: .6rem; }
.lp-post-body h3 { font-size: 1.02rem; color: var(--gray-900); line-height: 1.35; margin-bottom: .7rem; }

.lp-final-micro { margin-top: 1rem; font-size: .82rem; color: #94A3B8; }

/* ── Blog index/article covers ── */
.blog-card { padding: 0; overflow: hidden; }
.blog-card-cover { aspect-ratio: 1200 / 500; overflow: hidden; background: var(--gray-100); }
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body { padding: 1.4rem 1.5rem 1.5rem; }
.blog-card-cat { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--primary); background: var(--primary-light); padding: .2rem .55rem; border-radius: 99px; margin-bottom: .6rem; }
.blog-article-cover { border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0 2rem; }
.blog-article-cover img { width: 100%; height: auto; display: block; }
.blog-related { margin-top: 3rem; border-top: 1px solid var(--gray-200); padding-top: 2rem; }
.blog-related h3 { font-size: 1.2rem; color: var(--gray-900); margin-bottom: 1rem; }
.blog-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.blog-related-card { display: block; text-decoration: none; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; transition: box-shadow .15s; }
.blog-related-card:hover { box-shadow: var(--shadow-md); }
.blog-related-card img { width: 100%; aspect-ratio: 1200/500; object-fit: cover; display: block; }
.blog-related-card span { display: block; padding: .7rem .8rem; font-size: .82rem; font-weight: 600; color: var(--gray-800); line-height: 1.35; }
@media (max-width: 680px) { .lp-benefits { grid-template-columns: 1fr 1fr; } .blog-related-grid { grid-template-columns: 1fr; } }

/* ── Blog: formato notícia + rich content ── */
.blog-article-subtitle { font-size: 1.2rem; color: var(--gray-500); line-height: 1.5; font-weight: 400; margin: 0 0 1.5rem; }
.blog-article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: 2rem 0; padding: 1rem 0; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); font-size: .9rem; color: var(--gray-500); }
.blog-article-author strong { color: var(--gray-800); }
.blog-card-cover-none { display: grid; place-items: center; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); }
.blog-card-cover-none span { color: #fff; font-weight: 800; font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; opacity: .95; }
.blog-related-nocover { display: grid; place-items: center; aspect-ratio: 1200/500; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: #fff; font-weight: 800; font-size: .8rem; text-transform: uppercase; }

/* Conteúdo rico (posts + questões): tabelas, imagens, listas, etc. */
.blog-article-body img, .rich-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }
.blog-article-body table, .rich-content table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: .92rem; }
.blog-article-body th, .blog-article-body td, .rich-content th, .rich-content td { border: 1px solid var(--gray-300); padding: .5rem .7rem; text-align: left; }
.blog-article-body th, .rich-content th { background: var(--gray-50); font-weight: 700; }
.blog-article-body ul, .blog-article-body ol, .rich-content ul, .rich-content ol { margin: 1rem 0 1rem 1.4rem; }
.blog-article-body li, .rich-content li { margin-bottom: .35rem; }
.blog-article-body a, .rich-content a { color: var(--primary); text-decoration: underline; }
.blog-article-body blockquote, .rich-content blockquote { border-left: 4px solid var(--primary-light); padding-left: 1rem; color: var(--gray-600); font-style: italic; margin: 1.25rem 0; }
.rich-content { overflow-x: auto; }

/* ── Payment modal v2 ── */
.paywall-modal { max-width: 460px; padding: 0; overflow: hidden; position: relative; }
.paywall-close { position: absolute; top: .75rem; right: .9rem; z-index: 3; background: rgba(255,255,255,.18); color: #fff; border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.paywall-close:hover { background: rgba(255,255,255,.32); }
.paywall-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: #fff; padding: 1.6rem 1.6rem 1.4rem; }
.paywall-hero-badge { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); padding: .25rem .7rem; border-radius: 99px; font-size: .74rem; font-weight: 700; margin-bottom: .8rem; }
.paywall-hero-title { font-size: 1.35rem; font-weight: 900; line-height: 1.2; margin-bottom: .4rem; }
.paywall-hero-sub { font-size: .86rem; color: #DDD6FE; line-height: 1.5; margin-bottom: 1rem; }
.paywall-hero-price { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .9rem; }
.paywall-hero-amount { font-size: 2.3rem; font-weight: 900; letter-spacing: -.02em; }
.paywall-hero-per { font-size: .82rem; color: #C7D2FE; }
.paywall-hero-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.paywall-hero-benefits li { font-size: .84rem; color: #EDE9FE; }
.paywall-body { max-height: 42vh; overflow-y: auto; padding: 1.25rem 1.6rem; }
.paywall-section-label { display: flex; align-items: center; justify-content: space-between; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-500); margin: 0 0 .7rem; }
.paywall-body .paywall-section-label:not(:first-of-type) { margin-top: 1.1rem; }
.paywall-brands { font-size: .66rem; color: var(--gray-400); letter-spacing: 0; text-transform: none; font-weight: 600; }
.paywall-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.paywall-row .form-group:only-child { grid-column: 1 / -1; }
.paywall-footer { flex-direction: column; align-items: stretch; gap: .6rem; padding: 1.1rem 1.6rem 1.4rem; border-top: 1px solid var(--gray-100); }
.paywall-total { display: flex; align-items: center; justify-content: space-between; font-size: .95rem; color: var(--gray-700); }
.paywall-total strong { font-size: 1.25rem; color: var(--gray-900); }
.paywall-submit { width: 100%; }
.paywall-trust-row { display: flex; align-items: center; justify-content: center; gap: .5rem; font-size: .74rem; color: var(--gray-500); }
.paywall-trust-row strong { color: var(--gray-700); }
.paywall-nostore { font-size: .7rem; color: var(--gray-400); text-align: center; margin: 0; }
@media (max-width: 480px) { .paywall-row { grid-template-columns: 1fr 1fr; } }

/* ── Blog taxonomy / article extras ── */
.blog-breadcrumb-light { color: rgba(255,255,255,.75); }
.blog-breadcrumb-light a { color: #fff; }
.blog-cats { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 auto 2rem; justify-content: center; }
.blog-cat-chip { text-decoration: none; font-size: .82rem; font-weight: 600; color: var(--gray-600); background: #fff; border: 1px solid var(--gray-200); padding: .4rem .9rem; border-radius: 99px; transition: all .15s; }
.blog-cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.blog-cat-chip.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.blog-card-meta { display: block; font-size: .75rem; color: var(--gray-400); margin-top: .5rem; }
.blog-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2.5rem 0 0; }
.blog-page-btn { text-decoration: none; font-weight: 700; font-size: .88rem; color: var(--primary); background: #fff; border: 1px solid var(--gray-200); padding: .55rem 1.1rem; border-radius: var(--radius-sm); }
.blog-page-btn:hover { background: var(--primary-light); }
.blog-page-info { font-size: .85rem; color: var(--gray-500); }
.blog-empty { text-align: center; color: var(--gray-500); padding: 2rem; }
.blog-article-topmeta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; color: var(--gray-500); font-size: .88rem; margin-bottom: 1.5rem; }
.blog-article-author-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.blog-article-author-link:hover { text-decoration: underline; }
.blog-toc { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin: 0 0 2rem; }
.blog-toc-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); margin-bottom: .6rem; }
.blog-toc ol { margin: 0; padding-left: 1.2rem; }
.blog-toc li { margin-bottom: .35rem; }
.blog-toc a { color: var(--primary); text-decoration: none; font-size: .92rem; }
.blog-toc a:hover { text-decoration: underline; }
.blog-article-body h2 { scroll-margin-top: 80px; }
.blog-faq { margin: 2.5rem 0; }
.blog-faq > h2 { font-size: 1.4rem; color: var(--gray-900); margin-bottom: 1rem; }
.sitemap-block { margin-bottom: 2rem; }
.sitemap-block h2 { font-size: 1.1rem; color: var(--gray-900); margin-bottom: .6rem; }
.sitemap-block ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.sitemap-block a { color: var(--primary); text-decoration: none; }
.sitemap-block a:hover { text-decoration: underline; }

/* ── Capa de post em CSS (sempre visível, sem depender de arquivo) ── */
.blog-cover-css { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  background: linear-gradient(135deg, var(--cov1, #4F46E5) 0%, var(--cov2, #7C3AED) 100%); overflow: hidden; padding: 1.1rem 1.25rem; }
.blog-cover-css::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.08); }
.blog-cover-css::before { content: ""; position: absolute; left: -30px; bottom: -50px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.06); }
.blog-cover-emoji { font-size: 2rem; line-height: 1; position: relative; z-index: 1; }
.blog-cover-cat { color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; margin-top: .5rem; opacity: .95; position: relative; z-index: 1; }
.blog-cover-title { color: #fff; font-weight: 800; font-size: 1.1rem; line-height: 1.25; margin-top: .4rem; position: relative; z-index: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* aplica o layout de capa nas variações (card, artigo, relacionados, landing) */
.blog-card-cover.blog-cover-css { aspect-ratio: 1200/500; }
.lp-post-cover.blog-cover-css { aspect-ratio: 1200/500; }
.blog-article-cover.blog-cover-css { aspect-ratio: 1200/380; border-radius: var(--radius); margin: 1.5rem 0 2rem; padding: 1.75rem 2rem; }
.blog-article-cover.blog-cover-css .blog-cover-emoji { font-size: 2.6rem; }
.blog-article-cover.blog-cover-css .blog-cover-cat { font-size: 1rem; }
.blog-related-cover.blog-cover-css { aspect-ratio: 1200/500; padding: .7rem .85rem; }
.blog-related-cover.blog-cover-css .blog-cover-emoji { font-size: 1.3rem; }
.blog-related-cover.blog-cover-css .blog-cover-cat { font-size: .62rem; margin-top: .25rem; }
.blog-related-card .blog-related-cover { display: block; }

/* Rich content dentro das alternativas: sem margens de parágrafo, imagens contidas */
.option-body.rich-content p, .result-option-body.rich-content p { margin: 0; }
.option-body.rich-content img, .result-option-body.rich-content img { max-height: 220px; margin: .25rem 0 0; }
.question-text.rich-content img, .alternatives-intro.rich-content img { max-height: 420px; }

/* Admin: grade de dados (chave/valor) */
.admin-kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 1.5rem; }
.admin-kv-grid > div { display: flex; flex-direction: column; gap: .15rem; }
.admin-kv-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400); font-weight: 700; }
.admin-kv-value { font-size: .92rem; color: var(--gray-800); font-weight: 500; word-break: break-word; }

/* ── Depoimentos v2 (mais profissional) ── */
.lp-testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 1040px; margin: 0 auto; }
.lp-testimonial { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.6rem 1.6rem 1.4rem; margin: 0;
  box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: transform .16s ease, box-shadow .16s ease; display: flex; flex-direction: column; }
.lp-testimonial:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -12px rgba(16,24,40,.18); }
.lp-testimonial-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.lp-stars { color: #F59E0B; font-size: 1rem; letter-spacing: 2px; }
.lp-verified { font-size: .68rem; font-weight: 800; color: #047857; background: #D1FAE5; padding: .22rem .55rem; border-radius: 99px; letter-spacing: .02em; }
.lp-testimonial-quote { font-size: .98rem; color: var(--gray-700); line-height: 1.6; margin: 0 0 1.35rem; flex: 1; font-style: normal; }
.lp-author { display: flex; align-items: center; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--gray-100); }
.lp-avatar { width: 46px; height: 46px; min-width: 46px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(79,70,229,.25); }
.lp-author-info { display: flex; flex-direction: column; line-height: 1.25; }
.lp-author-info strong { color: var(--gray-900); font-size: .92rem; }
.lp-author-course { font-size: .8rem; color: var(--primary); font-weight: 600; }
.lp-testimonial-note { text-align: center; font-size: .78rem; color: var(--gray-400); margin: 1.25rem 0 0; }
@media (max-width: 820px) { .lp-testimonials { grid-template-columns: 1fr; max-width: 460px; } }

/* Admin: gerenciar acesso do usuário */
.access-status { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--gray-700); margin-bottom: 1.1rem; padding: .6rem .85rem; border-radius: var(--radius-sm); background: var(--gray-50); }
.access-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gray-300); }
.access-status.is-on .access-dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-light); }
.access-status.is-off .access-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); }
.access-forms { display: grid; gap: 1.25rem; }
.access-form-row { display: flex; align-items: center; gap: .5rem; margin-top: .3rem; }
.access-form-suffix { color: var(--gray-500); font-size: .9rem; }

/* ── Payment modal: grade correta + mais largo (override final) ── */
.paywall-modal { max-width: 520px; }
.paywall-body { padding: 1.25rem 1.75rem; }
.paywall-hero { padding: 1.7rem 1.75rem 1.4rem; }
.paywall-footer { padding: 1.1rem 1.75rem 1.4rem; }
.paywall-row { grid-template-columns: 1fr 1fr; gap: .75rem; }         /* cobrança: 2 colunas confortáveis */
.paywall-row.paywall-row-3 { grid-template-columns: 1fr 1fr 1fr; }   /* validade do cartão: 3 colunas */
.paywall-row .form-group { min-width: 0; }
.paywall-body .form-input { width: 100%; }
@media (max-width: 540px) {
  .paywall-modal { max-width: 94vw; }
  .paywall-row, .paywall-row.paywall-row-3 { grid-template-columns: 1fr 1fr; }
}

/* ── Modais e campos: UX mobile ── */
/* o overlay permite rolar quando o modal é mais alto que a tela */
.modal-overlay.open { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal { max-height: 92vh; }

@media (max-width: 560px) {
  .paywall-modal { max-width: 96vw; max-height: 94vh; }
  .paywall-body { max-height: none; padding: 1rem 1.1rem; }   /* sem cap: o modal inteiro rola */
  .paywall-hero { padding: 1.3rem 1.2rem 1.15rem; }
  .paywall-footer { padding: 1rem 1.2rem 1.2rem; }
  .paywall-hero-title { font-size: 1.2rem; }
  .paywall-row { grid-template-columns: 1fr 1fr; gap: .6rem; }        /* cobrança em 2 colunas */
  .paywall-row.paywall-row-3 { grid-template-columns: 1fr 1fr 1fr; }  /* validade: 3 campos curtos lado a lado */
  .form-input, .paywall-body .form-input { font-size: 16px; }        /* evita zoom automático no iOS */
}
@media (max-width: 380px) {
  .paywall-row { grid-template-columns: 1fr; }                        /* telas bem pequenas: 1 por linha */
}
/* modal de criar simulado e demais: caber e rolar no celular */
@media (max-width: 560px) {
  .modal { max-width: 96vw; }
  .modal-body { max-height: 70vh; overflow-y: auto; }
}

/* ═══ Polimento da página de responder simulado ═══ */
.quiz-container { max-width: 840px; }
.question-card { border-radius: 16px; box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04); transition: box-shadow .2s ease, transform .2s ease; }
.question-card:hover { box-shadow: 0 10px 30px -12px rgba(16,24,40,.18); }
.question-header { padding: 1.1rem 1.5rem; }
.question-body { padding: 1.6rem 1.6rem 1.4rem; }
.question-text { font-size: 1rem; color: var(--gray-800); line-height: 1.8; }
.alternatives-intro { white-space: normal; font-size: 1rem; font-weight: 600; color: var(--gray-900); }

/* imagens embutidas no enunciado/intro: centralizadas, com moldura discreta */
.question-text.rich-content img, .alternatives-intro.rich-content img,
.result-question-text.rich-content img {
  display: block; margin: 1rem auto; max-width: 100%; max-height: 440px; height: auto;
  border-radius: 10px; border: 1px solid var(--gray-200); box-shadow: 0 2px 10px rgba(0,0,0,.06); object-fit: contain;
}
.question-text.rich-content table, .result-question-text.rich-content table { margin: 1rem 0; }

/* alternativas mais elegantes */
.options-list { gap: .7rem; }
.option-btn { padding: 1rem 1.1rem; border-radius: 14px; border-width: 1.5px; }
.option-btn:hover { border-color: var(--primary-muted); background: #fff; box-shadow: 0 6px 16px -6px rgba(79,70,229,.28); transform: translateY(-1px); }
.option-btn.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px var(--primary-light); transform: none; }
.option-letter { width: 32px; height: 32px; font-size: .82rem; }
.option-btn.selected .option-letter { box-shadow: 0 3px 8px rgba(79,70,229,.35); }
.option-body.rich-content { padding-top: .15rem; }
.option-body.rich-content img { max-height: 240px; border-radius: 8px; border: 1px solid var(--gray-200); margin: 0; }

@media (max-width: 560px) {
  .question-body { padding: 1.15rem 1.1rem 1rem; }
  .question-header { padding: .9rem 1.1rem; }
  .option-btn { padding: .85rem .9rem; gap: .7rem; }
  .quiz-container { padding: 1.25rem .75rem 3rem; }
}

/* Resultado: questão com imagem não colapsa (senão a imagem é cortada) */
.result-question-text.has-media { max-height: none !important; overflow: visible !important; }
.result-question-text.rich-content img { display: block; margin: .75rem auto; max-width: 100%; max-height: 380px; height: auto; border-radius: 10px; border: 1px solid var(--gray-200); box-shadow: 0 2px 8px rgba(0,0,0,.05); object-fit: contain; }
