/* ============================================================
   Imtihan AI — Design System v2 (Phase 1 redesign)
   "Premium EdTech companion" — Deep Navy · Royal Blue · Emerald
   Mobile-first PWA · 480px app column
   ============================================================ */
:root {
  /* primary scale — deep navy */
  --navy-950: #0B1630;
  --navy-900: #101F42;
  --navy-800: #16295C;
  --navy-700: #1E3A6E;
  /* secondary — royal blue (actions, links, primary buttons) */
  --blue-700: #1D4ED8;
  --blue-600: #2563EB;
  --blue-500: #3B82F6;
  --blue-100: #DCE7FD;
  --blue-50: #EFF4FE;
  /* accent — emerald (success, streaks, positive) */
  --emerald-700: #0B7A55;
  --emerald-600: #0D9D6C;
  --emerald-500: #10B981;
  --emerald-100: #D3F2E4;
  --emerald-50: #ECFDF5;
  /* neutrals */
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --bg: #F7F9FC;
  --card: #FFFFFF;
  --line: #E5E9F0;
  --line-soft: #EEF1F6;
  /* accents */
  --gold: #B7791F;
  --gold-bg: #FDF6E3;
  --gold-line: #F0DFAE;
  --orange: #E07B26;
  --red: #C93A3A;
  --red-bg: #FDECEC;
  --red-line: #F6C9C9;
  --blue: #2563eb; /* legacy alias */
  --blue-bg: #eff4fe; /* legacy alias */
  /* compat: old emerald brand scale → new navy/blue (existing components keep working) */
  --brand-950: var(--navy-950);
  --brand-900: var(--navy-900);
  --brand-800: var(--navy-800);
  --brand-700: var(--blue-700);
  --brand-600: var(--blue-600);
  --brand-100: var(--blue-100);
  --brand-50: var(--blue-50);
  /* shape + depth */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(11, 22, 48, .05), 0 8px 24px rgba(11, 22, 48, .06);
  --shadow-pop: 0 12px 32px rgba(11, 22, 48, .16);
  --shadow-sm: 0 1px 3px rgba(11, 22, 48, .08);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg); color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
  /* anti-cheat: no text selection / copy of questions on screen */
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none; /* iOS long-press copy menu */
}
/* typing still works; own typed text stays editable */
input, textarea { -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; -webkit-touch-callout: default; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 112px; }
button { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; margin-top: 8px; color: var(--muted); }
.center { text-align: center; }
h2 { font-size: 21px; margin: 4px 0; letter-spacing: -.2px; }
h3 { font-size: 16.5px; margin-bottom: 10px; letter-spacing: -.1px; }

/* ================= auth (login / signup) ================= */
.auth-hero {
  margin: -14px -14px 0; padding: 36px 22px 64px; text-align: center;
  background:
    radial-gradient(120px 120px at 85% 10%, rgba(255,255,255,.14), transparent 70%),
    radial-gradient(200px 200px at 10% 90%, rgba(255,255,255,.08), transparent 70%),
    linear-gradient(140deg, var(--brand-900) 0%, var(--brand-700) 55%, var(--brand-600) 100%);
  color: #fff; border-radius: 0 0 28px 28px;
  box-shadow: var(--shadow-pop);
}
.auth-hero.slim { padding: 28px 22px 58px; }
.auth-logo {
  width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.6);
  display: block; object-fit: cover;
  font-size: 24px; font-weight: 800; letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.auth-brand { font-size: 27px; font-weight: 800; letter-spacing: -.4px; }
.auth-credit { font-size: 11.5px; font-weight: 700; opacity: .85; margin-top: 5px; letter-spacing: 1px; text-transform: uppercase; }
.auth-tag { font-size: 14px; opacity: .93; margin-top: 8px; line-height: 1.55; max-width: 320px; margin-left: auto; margin-right: auto; }
.auth-points { display: flex; gap: 16px; justify-content: center; margin-top: 16px; font-size: 12.5px; font-weight: 700; opacity: .95; }
.auth-card { margin-top: -36px; position: relative; z-index: 2; }
.tabs { display: flex; background: var(--bg); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.tab {
  flex: 1; border: none; background: none; padding: 10px; border-radius: 10px;
  font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.tab.active { background: #fff; color: var(--brand-800); box-shadow: 0 1px 6px rgba(8,63,49,.12); }
.seg { display: flex; gap: 8px; margin-bottom: 14px; }
.seg-btn {
  flex: 1; border: 2px solid var(--line); background: #fff; border-radius: var(--radius-sm);
  padding: 10px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.seg-btn.active { border-color: var(--brand-600); color: var(--brand-800); background: var(--brand-50); }
.field { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 12px; }
.field input, .field select { margin-top: 6px; font-weight: 400; }
input[type=email], input[type=date], select {
  width: 100%; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input[type=email]:focus, input[type=date]:focus, select:focus {
  outline: none; border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(14, 122, 95, .14);
}
/* home screen pickers: bold like the original design */
.dd { position: relative; margin-bottom: 10px; }
#dd-chapter { margin-bottom: 2px; }
.field .dd { margin-top: 6px; margin-bottom: 0; }
.dd-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; font-size: 15px; font-weight: 700; font-family: inherit;
  background-color: #fff; color: var(--ink); cursor: pointer; text-align: left;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364776f' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color .15s, box-shadow .15s;
}
.dd-btn .dd-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 22px; }
.dd.open .dd-btn { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(14, 122, 95, .14); }
.dd.open { z-index: 61; }
/* white option list opening BELOW the field — never a dark system popup */
.dd-list[hidden] { display: none; }
.dd-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop); max-height: 264px; overflow-y: auto; padding: 6px;
  animation: dd-in .16s ease-out;
  display: flex; flex-direction: column; gap: 2px;
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; } }
.dd-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; border: none; background: none; cursor: pointer; text-align: left;
  padding: 13px 12px; font-size: 15px; font-weight: 700; font-family: inherit; color: var(--ink);
  border-radius: 10px; min-height: 48px;
}
.dd-opt:active { background: var(--brand-50); }
.dd-opt.sel { background: var(--brand-50); color: var(--brand-800); }
.dd-check { color: var(--brand-600); font-weight: 800; flex: 0 0 auto; }
.err { color: var(--red); font-size: 13px; font-weight: 700; margin: 4px 0 10px; min-height: 18px; }
/* TikTok-style date of birth: Day / Month / Year */
.dob-row { display: flex; gap: 8px; margin-top: 6px; }
.dob-row input {
  flex: 1; min-width: 0; text-align: center; border: 2px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 8px; font-size: 15px; font-family: inherit;
  background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.dob-row input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(14,122,95,.14); }
.btn-google {
  background: #fff; color: var(--ink); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-google .g {
  font-size: 20px; font-weight: 800;
  background: linear-gradient(90deg, #4285F4 0 33%, #EA4335 33% 66%, #FBBC05 66% 83%, #34A853 83% 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn[disabled] { opacity: .6; cursor: wait; }

/* creator credit */
.creator {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.creator-dp {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 15%;
  border: 2.5px solid var(--brand-600); box-shadow: 0 2px 10px rgba(14,122,95,.28);
}
.creator-txt { text-align: left; }
.creator-by { font-size: 10.5px; color: var(--faint); font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; }
.creator-name { font-size: 17px; font-weight: 800; color: var(--brand-800); letter-spacing: -.2px; }

/* text link button */
.link {
  background: none; border: none; color: var(--brand-700); font-weight: 700;
  font-size: 14px; cursor: pointer; padding: 8px; margin-top: 4px;
}
.link:active { opacity: .7; }

/* ================= screens ================= */
.screen { display: none; padding: 14px 14px 20px; animation: fade .22s ease-out; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; } }

/* ================= topbar ================= */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 2px 14px;
}
.app-title {
  font-size: 20px; font-weight: 800; color: var(--brand-900); letter-spacing: -.3px;
  display: flex; align-items: center; gap: 9px;
}
.app-title::before {
  content: "🎓"; width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
  box-shadow: 0 3px 8px rgba(8,63,49,.28);
}
.app-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; padding-left: 41px; }
.streak {
  background: #fff7ec; border: 1px solid #f4ddb8; color: #8a5a12;
  padding: 7px 13px; border-radius: 20px; font-size: 13px; font-weight: 800;
  box-shadow: 0 1px 4px rgba(180,120,30,.1);
}
.timer {
  background: linear-gradient(135deg, var(--orange), #c96a1d); color: #fff; font-weight: 800; font-size: 18px;
  padding: 8px 16px; border-radius: 24px; min-width: 96px; text-align: center;
  box-shadow: 0 3px 10px rgba(224,123,38,.35); font-variant-numeric: tabular-nums;
}
.timer.small { font-size: 15px; min-width: 76px; }
.timer.danger { background: linear-gradient(135deg, var(--red), #a82e2e); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.qcount { font-weight: 700; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.iconbtn {
  background: #fff; border: 1px solid var(--line); border-radius: 50%;
  width: 38px; height: 38px; font-size: 16px; cursor: pointer; color: var(--ink-soft);
  box-shadow: 0 1px 4px rgba(8,63,49,.08);
}
.iconbtn:active { transform: scale(.94); }

/* ================= cards ================= */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.card-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--brand-700); margin-bottom: 10px;
}

/* trial / premium top pill */
.trial-banner {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(135deg, #fff8ea, #ffefd2);
  border: 1.5px solid var(--gold-line); color: #7a5410;
  border-radius: 16px; padding: 11px 14px; font-size: 13.5px; line-height: 1.5;
  margin: 0 0 14px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(183,121,31,.12);
  transition: transform .12s;
}
.trial-banner:active { transform: scale(.98); }
.trial-banner.paid {
  background: linear-gradient(135deg, #eafaf1, #d7f3e3);
  border-color: #a9e3c2; color: #0b6b3f;
  box-shadow: 0 2px 10px rgba(14,122,95,.12);
}
.trial-banner b { font-weight: 800; }
.trial-banner:focus-visible { outline: 3px solid rgba(14,122,95,.3); outline-offset: 2px; }

/* test card */
.test-meta { display: flex; gap: 12px; font-size: 13px; color: var(--muted); margin: 10px 0 14px; flex-wrap: wrap; }
.test-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ================= buttons ================= */
.btn {
  border: none; border-radius: 14px; padding: 15px 18px;
  font-size: 16px; font-weight: 800; cursor: pointer; width: 100%;
  letter-spacing: .1px; transition: transform .1s, box-shadow .15s, filter .15s;
}
.btn:active { transform: scale(.985); }
.btn-primary {
  background: var(--blue-600);
  color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,.32), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:active { filter: brightness(.94); box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.btn-big { margin-top: 8px; font-size: 17px; padding: 16px 18px; }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-line); }
.btn-secondary {
  background: #fff; color: var(--brand-800); border: 2px solid var(--line);
  box-shadow: 0 1px 4px rgba(8,63,49,.06);
}
.btn:focus-visible { outline: 3px solid rgba(14,122,95,.35); outline-offset: 2px; }

/* mini cards */
.row2 { display: flex; gap: 12px; }
.row2 .card { flex: 1; min-width: 0; }
.mini-label { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.mini-val { font-size: 26px; font-weight: 800; color: var(--brand-900); margin-top: 4px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.mini { font-size: 13px; }
.tip { font-size: 14px; line-height: 1.65; color: var(--ink-soft); }

/* ================= progress ================= */
.progress { height: 9px; background: #dfe8e3; border-radius: 8px; overflow: hidden; margin: 0 4px 14px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--brand-600), var(--brand-800)); border-radius: 8px; transition: width .3s ease; }

/* ================= question ================= */
.q-kind { font-size: 11.5px; font-weight: 800; color: var(--orange); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 8px; }
.qcard h3 { font-size: 17.5px; line-height: 1.55; }
.opt {
  display: block; width: 100%; text-align: left;
  background: #f6f9f7; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; margin-top: 10px; font-size: 15px; cursor: pointer; color: var(--ink);
  transition: border-color .12s, background .12s;
}
.opt:active { transform: scale(.995); }
.opt.sel { border-color: var(--brand-600); background: var(--brand-50); font-weight: 700; }
.opt.ok { border-color: var(--brand-600); background: var(--brand-50); font-weight: 700; }
.opt.bad { border-color: var(--red); background: var(--red-bg); }
.opt:disabled { cursor: default; }

/* ================= quiz feedback + test review ================= */
.rev-feedback, .rv-explain {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: #f6f9f7; border: 1px solid var(--line); font-size: 14.5px; line-height: 1.6;
}
.fb-status, .rv-status {
  display: inline-block; font-weight: 800; font-size: 15px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 10px;
}
.fb-status.ok, .rv-status.ok { color: var(--brand-700); background: var(--brand-50); border: 1.5px solid var(--brand-600); }
.fb-status.bad, .rv-status.bad { color: var(--red); background: var(--red-bg); border: 1.5px solid var(--red); }
.fb-line, .rv-line { margin: 6px 0; font-size: 14.5px; }
.fb-explain, .rv-explain { margin-top: 10px; }
.rv-item {
  margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff;
}
.rv-q { font-size: 15px; line-height: 1.55; margin-bottom: 8px; }
textarea, input[type=text], input[type=password] {
  width: 100%; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; font-size: 15px; font-family: inherit; resize: vertical; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; background: #fff;
}
textarea:focus, input[type=text]:focus, input[type=password]:focus {
  outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(14,122,95,.14);
}

/* ================= viva ================= */
.viva-q { font-size: 16px; line-height: 1.7; color: var(--ink); }

/* ================= result ================= */
.score-ring {
  width: 124px; height: 124px; border-radius: 50%; margin: 8px auto 14px;
  border: 11px solid var(--brand-100); border-top-color: var(--brand-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 800; color: var(--brand-900); letter-spacing: -.5px;
  box-shadow: inset 0 2px 8px rgba(8,63,49,.08);
  background: #fff;
}
.bharosa { height: 12px; background: #e6ece9; border-radius: 8px; overflow: hidden; margin: 8px 0; }
.bharosa > div { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--red), var(--orange), var(--brand-600)); transition: width .5s ease; }

/* ================= mastery (tayyari) ================= */
.mrow { margin-bottom: 13px; }
.mrow .mhead { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink-soft); }
.mbar { height: 10px; background: #e6ece9; border-radius: 8px; overflow: hidden; }
.mbar > div { height: 100%; background: linear-gradient(90deg, var(--brand-600), var(--brand-800)); border-radius: 8px; transition: width .4s ease; }
.hist { font-size: 13px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; color: var(--ink-soft); }
.hist:last-child { border-bottom: none; }

/* ================= whatsapp preview ================= */
.whatsapp { background: #e9f5ee; border-color: #cde8d6; }
.wa-head { font-weight: 800; margin-bottom: 10px; color: var(--brand-900); }
#report-text { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.7; }

/* ================= bottom nav (floating pill) ================= */
#bottomnav {
  position: fixed; bottom: calc(10px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 456px;
  background: rgba(255,255,255,.97);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  display: flex; border: 1px solid var(--line); border-radius: 24px;
  padding: 7px 6px; z-index: 50;
  box-shadow: 0 10px 32px rgba(8,63,49,.16);
}
#bottomnav button {
  flex: 1; min-width: 0; background: none; border: none; font-size: 20px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--faint);
  border-radius: 16px; padding: 8px 2px 7px;
  transition: background .15s, color .15s, transform .1s;
}
#bottomnav button:active { transform: scale(.94); }
#bottomnav button span { font-size: 10.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
#bottomnav button.active { color: var(--brand-800); background: var(--brand-50); font-weight: 800; }

/* viva camera corner preview (on-device presence check) */
#camera-corner {
  position: fixed; right: 12px; bottom: 16px; z-index: 60;
  width: 118px; background: #0c1f1a; border-radius: 14px; padding: 6px;
  border: 2px solid var(--brand-600); box-shadow: var(--shadow-pop);
}
#camera-corner video {
  width: 100%; border-radius: 9px; display: block;
  background: #000; aspect-ratio: 3/4; object-fit: cover;
}
#camera-corner p { color: #cfe6dd; font-size: 10px; margin: 4px 2px 2px; text-align: center; }

/* strike / warning text */
.warn { color: var(--red); font-weight: 700; }

/* ================= overlay / dialog ================= */
.overlay {
  position: fixed; inset: 0; background: rgba(6,42,33,.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .18s ease-out;
}
.overlay.hidden { display: none; }
.overlay .card { max-width: 380px; width: 100%; box-shadow: var(--shadow-pop); }
.overlay p { font-size: 15px; line-height: 1.7; margin: 10px 0 16px; color: var(--ink-soft); }

.warn-tag {
  display: inline-block; background: var(--red-bg); color: var(--red);
  font-size: 11.5px; font-weight: 800; padding: 4px 11px; border-radius: 12px; margin: 4px 4px 0 0;
  border: 1px solid var(--red-line);
}
.ok-tag {
  display: inline-block; background: var(--brand-50); color: var(--brand-800);
  font-size: 11.5px; font-weight: 800; padding: 4px 11px; border-radius: 12px; margin: 4px 4px 0 0;
  border: 1px solid var(--brand-100);
}

/* question kind row (speaker removed; kept for layout compat) */
.q-kind-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.q-kind-row .q-kind { margin-bottom: 0; }
.speakbtn { flex: 0 0 auto; }
.speakbtn.speaking { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* viva voice-first: read-only live transcript + mic status */
.transcript {
  min-height: 96px; max-height: 220px; overflow-y: auto;
  background: #f6f9f7; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; line-height: 1.7;
  white-space: pre-wrap; user-select: none; color: var(--ink);
}
.transcript.empty { color: var(--faint); }
.mic-state {
  display: inline-block; font-size: 13px; font-weight: 700;
  padding: 6px 13px; border-radius: 20px; margin: 2px 0 8px;
  background: #eef1ef; color: var(--muted);
}
.mic-state.listening { background: #e2f5e9; color: var(--brand-800); animation: micpulse 1.6s ease-in-out infinite; }
.mic-state.denied { background: var(--red-bg); color: var(--red); }
.mic-state.stopped { background: #fdf3e0; color: #9a6b12; }
@keyframes micpulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ================= admin panel ================= */
.btn-row { display: flex; gap: 8px; margin-top: 8px; }
.btn-row .btn { flex: 1; }
.btn-small {
  padding: 9px 15px; font-size: 13px; font-weight: 700; border: 1.5px solid var(--line);
  background: #fff; border-radius: 11px; cursor: pointer; color: var(--ink-soft);
  transition: background .12s, border-color .12s, color .12s;
}
.btn-small:active { transform: scale(.96); }
/* admin: plan dropdown — chhota, class/subject selector jaisa */
.plan-pick {
  padding: 9px 32px 9px 13px; font-size: 13px; font-weight: 700;
  border: 1.5px solid var(--line); background-color: #fff; border-radius: 11px;
  color: var(--ink-soft); cursor: pointer; max-width: 148px;
}
.btn-small.active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); box-shadow: 0 2px 8px rgba(14,122,95,.3); }
.barchart { display: flex; align-items: flex-end; gap: 4px; height: 132px; padding: 20px 2px 0; }
.barchart .bar { flex: 1; min-width: 0; background: linear-gradient(180deg, var(--brand-600), var(--brand-800)); border-radius: 5px 5px 0 0; position: relative; min-height: 3px; }
.barchart .bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 800; color: var(--brand-800); }
.barchart .bar i { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 8px; color: var(--faint); margin-top: 3px; white-space: nowrap; }
.ad-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.ad-row:last-child { border-bottom: none; }
.ad-row.ad-head { font-weight: 800; color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; }
.ad-row .right { text-align: right; flex: 0 0 auto; }

/* ================= payments: paywall + admin paid/free ================= */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 800; letter-spacing: .8px; }
.badge-paid { background: #dcf5e5; color: #166534; border: 1px solid #b7e6c9; }
.badge-free { background: var(--red-bg); color: #b91c1c; border: 1px solid var(--red-line); }
.badge-golden { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.pay-manual { margin-top: 16px; border-top: 1px dashed #d8e0dc; padding-top: 14px; }
.pay-divider { display: flex; align-items: center; gap: 10px; color: var(--faint); margin: 4px 0 12px; font-size: 13px; font-weight: 700; }
.pay-divider::before, .pay-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pay-number {
  display: block; width: 100%; background: var(--blue-bg); border: 2px dashed var(--blue);
  border-radius: var(--radius-sm); padding: 13px; font-size: 22px; font-weight: 800;
  letter-spacing: 1px; color: #1e3a8a; cursor: pointer; margin: 8px 0; font-variant-numeric: tabular-nums;
}
.pay-number small { display: block; font-size: 12px; font-weight: 400; color: #64748b; letter-spacing: 0; margin-top: 4px; }
.bank-card { background: #f8faf9; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 14px; margin: 10px 0; text-align: left; }
.bank-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.bank-row:last-child { border-bottom: none; }
.bank-row .muted { font-size: 13px; }
.copy-chip {
  display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border: 2px dashed var(--blue); border-radius: 10px; padding: 7px 11px;
  font-weight: 700; color: #1e3a8a; cursor: pointer; font-size: 14px; letter-spacing: .5px;
  transition: transform .1s;
}
.copy-chip:active { transform: scale(.96); }
.copy-chip small { font-weight: 400; color: #64748b; font-size: 11px; }
.pay-steps { text-align: left; color: var(--ink-soft); margin: 12px 0; padding-left: 22px; font-size: 14px; line-height: 1.6; }
.pay-steps li { margin: 7px 0; }
.pay-label { display: block; text-align: left; font-weight: 700; margin: 12px 0 6px; font-size: 14px; color: var(--ink-soft); }
.founder-note {
  background: var(--gold-bg); border: 1px solid var(--gold-line); color: #7a5410;
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13px; margin: 12px 0; line-height: 1.6;
}
.pay-card h2 { margin: 6px 0; }
.price-box { margin: 14px 0; text-align: center; }
.price { font-size: 32px; font-weight: 800; letter-spacing: -.6px; color: var(--brand-900); font-variant-numeric: tabular-nums; }
/* Plan picker: PRO vs ULTRA — limits saaf nazar aayen */
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.plan-card { border: 2px solid var(--line, #e2ece7); border-radius: 14px; background: #fff; padding: 14px 10px; text-align: center; cursor: pointer; font: inherit; }
.plan-card.sel { border-color: var(--brand-600); background: #f2faf5; box-shadow: 0 2px 10px rgba(10,92,72,.12); }
.plan-name { font-weight: 800; font-size: 15px; color: var(--brand-900); letter-spacing: .5px; }
.plan-tag { font-size: 10px; background: var(--brand-600); color: #fff; border-radius: 8px; padding: 2px 7px; vertical-align: 2px; margin-left: 4px; }
.plan-price { font-size: 22px; font-weight: 800; margin: 6px 0 2px; color: var(--ink); }
.plan-price .muted { font-size: 13px; font-weight: 400; }
.plan-limit { font-size: 13px; color: var(--ink-soft); }
.plan-limit b { color: var(--brand-900); font-size: 15px; }
.pay-list { text-align: left; padding-left: 20px; margin: 12px 0 18px; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.pay-list li { margin: 7px 0; }
.pay-list li::marker { color: var(--brand-600); }
.input {
  width: 100%; padding: 12px 13px; border: 2px solid var(--line); border-radius: 11px;
  font-size: 14px; box-sizing: border-box; font-family: inherit; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(14,122,95,.14); }

/* ================= invite & earn ================= */
.invite-code {
  font-size: 34px; font-weight: 800; letter-spacing: 8px; text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--brand-700); margin: 10px 0 14px; text-indent: 8px;
  background: var(--brand-50); border: 2px dashed var(--brand-100); border-radius: var(--radius-sm);
  padding: 12px 8px;
}
.stat-row { display: flex; gap: 10px; }
.stat {
  flex: 1; min-width: 0; text-align: center; background: #f8faf9;
  border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 4px;
}
.stat-val { font-size: 21px; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.stat-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.note-card { background: var(--gold-bg); border: 1px solid var(--gold-line); }
.note-body { font-size: 14px; line-height: 1.75; color: #4a4436; }
.note-body p { margin: 9px 0; }
.note-body b { color: var(--ink); }
.txn-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-soft); }
.txn-row:last-child { border-bottom: none; }
.txn-pos { color: #0d7a3f; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.txn-neg { color: var(--red); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ================= misc polish ================= */
::placeholder { color: var(--faint); opacity: 1; }
:focus-visible { outline: 3px solid rgba(14,122,95,.35); outline-offset: 2px; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364776f' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px !important;
}
/* thin elegant scrollbars inside panels */
.transcript::-webkit-scrollbar { width: 6px; }
.transcript::-webkit-scrollbar-thumb { background: #cbd6d1; border-radius: 6px; }

/* ---------- dashboard + gamification ---------- */
.dash-hello { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge-chip { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 20px; }
.xp-bar { height: 8px; background: #eef2f0; border-radius: 6px; margin-top: 10px; overflow: hidden; }
.xp-bar > div { height: 100%; background: linear-gradient(90deg, #10b981, #0d7a4f); border-radius: 6px; width: 0; transition: width .4s; }
/* ---------- today's goals ---------- */
.goal-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.goal-row:last-child { border-bottom: none; }
.goal-row .g-t { flex: 1; font-weight: 600; font-size: 14px; }
.goal-row .g-s { font-size: 12px; color: var(--faint); white-space: nowrap; }
/* ---------- MCQ explanation after lock ---------- */
.q-explain { background: #f0fdf6; border: 1px solid #b7e6c9; border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 14px; line-height: 1.5; }
/* ---------- 30-day plan ---------- */
.plan30-day { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.plan30-day.today { border-color: var(--brand-600); box-shadow: 0 0 0 1px var(--brand-600); }
.plan30-head { font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.plan30-sub { font-size: 12px; color: var(--faint); }
.plan30-tasks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.plan30-task { font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 16px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-soft); }
.plan30-task.done { background: #dcf5e5; border-color: #b7e6c9; color: #166534; text-decoration: line-through; }
/* ---------- referral friends table ---------- */
.friend-row { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.friend-row:last-child { border-bottom: none; }
.friend-row .f-n { flex: 1; font-weight: 700; }
.friend-row .f-e { color: var(--faint); font-size: 11px; display: block; font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .screen { animation: none; }
}
@media (min-width: 520px) {
  body { background: #e4eae6; }
  #app {
    background: var(--bg);
    border-left: 1px solid var(--line); border-right: 1px solid var(--line);
    box-shadow: 0 0 40px rgba(8,63,49,.08);
  }
}

/* ============ PREMIUM LAYER — refined, expensive feel ============ */

/* Auth hero: deep navy glow */
.auth-hero{background:
  radial-gradient(120% 90% at 50% -20%, rgba(59,130,246,.30) 0%, rgba(59,130,246,0) 55%),
  linear-gradient(160deg,#0B1630 0%, #16295C 60%, #1E3A6E 100%);}
.auth-hero::before{content:"";position:absolute;inset:0;
  background:radial-gradient(60% 45% at 80% 10%, rgba(255,255,255,.10), transparent 70%);}
.auth-brand{font-size:40px;letter-spacing:.5px;text-shadow:0 2px 18px rgba(0,0,0,.35)}
.auth-brand::after{content:"";display:block;width:56px;height:3px;border-radius:3px;
  background:linear-gradient(90deg,var(--gold),transparent);margin:10px auto 0}
.auth-credit{color:#f3e9c8}
.auth-tag{color:#e9f5ef;opacity:.92}
.auth-points span{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}

/* Buttons: royal blue */
.btn-primary{background:var(--blue-600);
  box-shadow:0 6px 18px rgba(37,99,235,.35), inset 0 1px 0 rgba(255,255,255,.25)}
.btn-primary:active{box-shadow:0 2px 8px rgba(37,99,235,.3), inset 0 1px 0 rgba(255,255,255,.2)}
.btn-google{box-shadow:var(--shadow-sm)}

/* Cards: layered depth, soft top light */
.card{box-shadow:0 1px 2px rgba(16,42,34,.05), 0 10px 28px rgba(16,42,34,.09);
  border:1px solid rgba(16,42,34,.06);
  background:linear-gradient(180deg,#ffffff 0%, #fdfefe 100%)}

/* Section labels: refined small caps */
.card-label{letter-spacing:1.6px;color:#7d8f88}
.card-label::after{content:"";display:block;width:26px;height:2px;border-radius:2px;
  background:linear-gradient(90deg,var(--brand-500),transparent);margin-top:6px}

/* Trial banner: subtle shimmer sweep */
.trial-banner{position:relative;overflow:hidden}
.trial-banner::after{content:"";position:absolute;top:0;bottom:0;width:60px;left:-80px;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.35),transparent);
  animation:shimmer 3.6s ease-in-out infinite}
@keyframes shimmer{0%{left:-80px}55%,100%{left:110%}}

/* Score ring: gradient conic */
.score-ring{background:conic-gradient(var(--brand-500) 0 78%, #e5ece9 78% 100%)}
.score-ring::before{background:radial-gradient(circle at 50% 35%, #ffffff 0 62%, #f4f8f6 100%)}

/* Invite code: premium ticket */
.invite-code{background:linear-gradient(180deg,#fffdf4,#fbf3d9);
  border:2px dashed #c9a227;color:#7a5c00;
  box-shadow:0 4px 14px rgba(201,162,39,.18)}

/* Price: rich gradient text */
.price{background:linear-gradient(120deg,#0a5c48,#129a76);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}

/* Bottom nav: active pill */
#bottomnav button.active{background:linear-gradient(180deg,#e8f7f1,#d9f0e6);
  box-shadow:inset 0 0 0 1px rgba(18,154,118,.25)}

/* Entrance: gentle fade-up */
@keyframes riseIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
#view-home .card,#view-invite .card,#view-pay .card{animation:riseIn .45s ease both}
#view-home .card:nth-child(3){animation-delay:.06s}
#view-home .card:nth-child(4){animation-delay:.12s}

/* Focus: gold ring */
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* Timer: premium pill */
.timer{background:linear-gradient(180deg,#0d7a5f,#0a5c48);color:#fff;
  box-shadow:0 4px 12px rgba(10,92,72,.35)}
.timer.low{background:linear-gradient(180deg,#e05252,#c0392b);box-shadow:0 4px 12px rgba(192,57,43,.35)}

/* Stat values: tabular numerals */
.stat-val{font-variant-numeric:tabular-nums;letter-spacing:.2px}

/* Streak: warm glow */
.streak{box-shadow:0 3px 10px rgba(217,119,6,.25)}

@media (prefers-reduced-motion: reduce){
  .trial-banner::after{animation:none}
  #view-home .card,#view-invite .card,#view-pay .card{animation:none}
}

/* ---- paywall modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 40, 32, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  background: #fff; border-radius: 18px; max-width: 360px; width: 100%;
  padding: 26px 22px; text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  border-top: 5px solid #0a5c48;
}
.modal-card h2 { margin: 8px 0 10px; font-size: 1.25rem; }
.modal-card p { color: #41525c; line-height: 1.55; margin: 0 0 18px; }
.modal-emoji { font-size: 2.4rem; }
.modal-card .btn { width: 100%; margin-top: 10px; }

/* ---- locked test card (free trial exhausted) ---- */
.test-card.locked { position: relative; }
.test-card.locked #btn-start-test {
  background: #9db3ab; border-color: #9db3ab; cursor: pointer;
}
.test-card.locked::before {
  content: "🔒";
  position: absolute; top: 12px; right: 14px; font-size: 1.4rem;
}
#test-card-note.lock-note { color: #b3541e; font-weight: 700; }

/* ============================================================
   PHASE 1 REDESIGN — v2 components
   ============================================================ */
/* section heading inside screens */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 10px; }
.sec-title { font-size: 16px; font-weight: 800; letter-spacing: -.2px; color: var(--ink); }
.sec-link { font-size: 13px; font-weight: 700; color: var(--blue-600); background: none; border: none; cursor: pointer; padding: 4px; }

/* dashboard greeting */
.dash-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ink-soft); background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 999px; padding: 5px 11px; }
.chip.emerald { background: var(--emerald-50); border-color: var(--emerald-100); color: var(--emerald-700); }

/* preparation score hero */
.score-hero { display: flex; align-items: center; gap: 16px; }
.score-num { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; color: var(--navy-950); font-variant-numeric: tabular-nums; line-height: 1; }
.score-num small { font-size: 17px; font-weight: 700; color: var(--faint); letter-spacing: 0; }
.score-delta { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 800; color: var(--emerald-700); background: var(--emerald-50); border-radius: 999px; padding: 3px 10px; }
.score-delta.down { color: var(--red); background: var(--red-bg); }
.score-break { margin-top: 12px; display: grid; gap: 9px; }
.score-row { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 10px; font-size: 12.5px; }
.score-row .lbl { font-weight: 700; color: var(--ink-soft); }
.score-row .val { font-weight: 800; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 99px; background: var(--blue-600); transition: width .5s ease; }
.bar.emerald > div { background: var(--emerald-500); }
.bar.navy > div { background: var(--navy-800); }

/* mission / action cards */
.mission-card { border: 1.5px solid var(--blue-100); background: linear-gradient(180deg, #fff, var(--blue-50)); }
.mission-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 6px 0 12px; }

/* weak areas list */
.weak-row { display: grid; grid-template-columns: 1fr 46px; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); align-items: center; }
.weak-row:last-child { border-bottom: none; }
.weak-row .wname { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.weak-row .wval { font-size: 13px; font-weight: 800; color: var(--red); text-align: right; font-variant-numeric: tabular-nums; }
.weak-row .bar { grid-column: 1 / -1; }
.weak-row .bar > div { background: linear-gradient(90deg, var(--orange), var(--red)); }

/* weekly mini chart */
.wchart { display: flex; align-items: flex-end; gap: 8px; height: 84px; margin-top: 10px; }
.wchart .wcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.wchart .wbar { width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px; background: var(--blue-100); min-height: 6px; transition: height .4s ease; }
.wchart .wbar.hot { background: var(--blue-600); }
.wchart .wday { font-size: 10px; font-weight: 700; color: var(--faint); }

/* profile menu rows */
.menu-row { display: flex; align-items: center; gap: 13px; width: 100%; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; cursor: pointer; text-align: left; font-family: inherit; box-shadow: var(--shadow-sm); }
.menu-row:active { transform: scale(.99); }
.menu-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-50); color: var(--blue-700); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.menu-ico svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.menu-row .mtitle { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.menu-row .msub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.menu-row .mchev { margin-left: auto; color: var(--faint); font-size: 18px; font-weight: 700; }
.menu-badge { margin-left: auto; font-size: 11.5px; font-weight: 800; color: var(--emerald-700); background: var(--emerald-50); border-radius: 999px; padding: 4px 10px; }

/* profile header */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-ava { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-800), var(--blue-600)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; flex: 0 0 auto; }
.profile-name { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.profile-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 600; }

/* skeleton loaders */
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--line-soft) 25%, #f6f8fb 50%, var(--line-soft) 75%); background-size: 200% 100%; animation: skel 1.3s ease-in-out infinite; }
@keyframes skel { to { background-position: -200% 0; } }

/* empty states */
.empty-state { text-align: center; padding: 26px 18px; }
.empty-state .eico { font-size: 34px; margin-bottom: 8px; }
.empty-state .etitle { font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 5px; }
.empty-state .esub { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 280px; margin: 0 auto; }

/* bottom nav v2 — 5 items, SVG line icons */
#bottomnav button svg { width: 23px; height: 23px; }
#bottomnav button.active { color: var(--blue-700); background: var(--blue-50); font-weight: 800; }
#bottomnav button.active svg { stroke: var(--blue-700); }
#bottomnav button svg { stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* topbar v2 */
.topbar.v2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.topbar.v2 .app-title { font-size: 19px; }
.topbar.v2 .app-title::before { content: ""; display: inline-block; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--navy-800), var(--blue-600)); margin-right: 9px; vertical-align: -7px; }
.streak.v2 { background: var(--emerald-50); border: 1px solid var(--emerald-100); color: var(--emerald-700); font-weight: 800; border-radius: 999px; padding: 7px 13px; font-size: 13px; }

/* viva card */
.viva-card { border: 1.5px solid var(--emerald-100); background: linear-gradient(180deg, #fff, var(--emerald-50)); }

/* study medium (v67) */
.req { color: var(--red-600, #dc2626); font-weight: 800; }
.field-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.medium-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.medium-pill { display: inline-block; font-weight: 800; font-size: 14px; color: var(--navy-800); background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 999px; padding: 7px 14px; }
.btn-small { padding: 8px 14px; font-size: 13px; }

/* ============================================================
   DESKTOP — computer-friendly layout (v72)
   Mobile-first base untouched; enhancement layer for ≥1024px.
   ============================================================ */
@media (min-width: 900px) {
  #app { max-width: 1180px; padding-left: 32px; padding-right: 32px; }

  /* auth + short flows: comfortably centered, not stretched */
  #screen-login, #screen-medium, #screen-forgot, #screen-otp, #screen-profile { max-width: 600px; margin-left: auto; margin-right: auto; }

  /* home dashboard → 2-column masonry */
  #screen-home.active { columns: 2; column-gap: 22px; }
  #screen-home > * { break-inside: avoid; }
  #screen-home .topbar.v2, #screen-home .trial-banner { column-span: all; }

  /* practice → selector full width, test cards side by side */
  #screen-practice.active { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; align-items: start; }
  #screen-practice .topbar.v2, #screen-practice .card:first-of-type { grid-column: 1 / -1; }

  /* test → comfortable reading measure, roomier options */
  #screen-test .topbar, #screen-test .progress { max-width: 860px; margin-left: auto; margin-right: auto; }
  #screen-test .card.qcard { max-width: 860px; margin-left: auto; margin-right: auto; padding: 26px 30px; }
  #screen-test .qcard h3 { font-size: 19px; }
  #screen-test .opt { font-size: 16px; padding: 15px 18px; }
  #screen-test #btn-next-q, #screen-test .tiny.center { max-width: 860px; margin-left: auto; margin-right: auto; }
  #screen-rev .card.qcard { max-width: 860px; margin-left: auto; margin-right: auto; padding: 26px 30px; }

  /* results, viva, tayyari, report, invite, pay, settings → centered reading column */
  #screen-result .card, #screen-viva .card, #screen-tayyari .card, #screen-report .card,
  #screen-invite .card, #screen-pay .card, #screen-settings .card { max-width: 880px; margin-left: auto; margin-right: auto; }

  /* desktop top navbar — mobile bottom pill ko upar shift karo */
  body:has(#bottomnav[style*="flex"]) #app { padding-top: 78px; }
  #bottomnav {
    top: 0; bottom: auto; left: 0; transform: none;
    width: 100%; max-width: none; border-radius: 0;
    border: none; border-bottom: 1px solid var(--line);
    padding: 10px max(32px, calc((100vw - 1180px) / 2 + 32px));
    justify-content: flex-start; gap: 4px;
    box-shadow: 0 2px 14px rgba(8,63,49,.07);
  }
  #bottomnav::before {
    content: "Imtihan AI";
    font-weight: 800; font-size: 19px; color: var(--navy-800);
    align-self: center; margin-right: 28px; white-space: nowrap;
  }
  #bottomnav button { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 10px 16px; }
  #bottomnav button span { font-size: 14px; }
  #bottomnav button svg { width: 20px; height: 20px; }
}
