/* =====================================================================
   TLES design system — Teacher Licensing & Examination System
   Built on Bootstrap 4 grid/utilities. Navy + sun-gold from the bureau seal.
   ===================================================================== */

:root {
  --navy-950: #0a1a30;
  --navy-900: #0f2440;
  --navy-800: #15315a;
  --navy-700: #1b3f73;
  --navy-600: #224f8f;
  --navy-500: #2f64ad;
  --navy-100: #dfe8f5;
  --navy-50:  #f0f5fb;

  --gold-600: #c98a06;
  --gold-500: #e9a10d;
  --gold-400: #f6b928;
  --gold-100: #fdf1d2;

  --ink:      #0f172a;
  --ink-2:    #334155;
  --muted:    #64748b;
  --subtle:   #94a3b8;
  --line:     #e3e8ef;
  --line-2:   #eef2f6;
  --surface:  #ffffff;
  --canvas:   #f4f6fa;

  --success: #0f9d6b;  --success-bg: #e3f6ee;
  --warning: #b7791f;  --warning-bg: #fdf3dc;
  --danger:  #d23b3b;  --danger-bg:  #fde8e8;
  --info:    #1f6fd1;  --info-bg:    #e5f0fd;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow:    0 1px 3px rgba(15, 23, 42, .06), 0 6px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .14);
  --ring:      0 0 0 3px rgba(47, 100, 173, .22);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Ethiopic", "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 260px;
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
a { color: var(--navy-600); }
a:hover { color: var(--navy-800); text-decoration: none; }
.text-muted { color: var(--muted) !important; }
.small, small { font-size: 82%; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.text-gold { color: var(--gold-600) !important; }
.text-navy { color: var(--navy-700) !important; }
:focus-visible { outline: none; box-shadow: var(--ring); }
::selection { background: var(--gold-100); }

/* ---------- buttons ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; padding: .55rem 1rem; border-width: 1px; transition: background .15s, box-shadow .15s, transform .05s; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn:active { transform: translateY(1px); }
.btn:focus, .btn.focus { box-shadow: var(--ring); }
.btn-sm { padding: .35rem .7rem; font-size: 13px; }
.btn-lg { padding: .8rem 1.4rem; font-size: 16px; border-radius: 10px; }
.btn-primary { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-gold { background: var(--gold-400); border-color: var(--gold-400); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-950); }
.btn-light, .btn-secondary, .btn-default { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-light:hover, .btn-secondary:hover, .btn-default:hover { background: var(--navy-50); border-color: var(--navy-100); color: var(--navy-800); }
.btn-success { background: var(--success); border-color: var(--success); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-outline-danger { color: var(--danger); border-color: #f3c2c2; background: #fff; }
.btn-outline-danger:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.btn-outline-primary { color: var(--navy-700); border-color: var(--navy-100); background: #fff; }
.btn-outline-primary:hover { background: var(--navy-50); color: var(--navy-800); border-color: var(--navy-500); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }

/* ---------- forms ---------- */
label, .form-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: .35rem; }
.form-control, .custom-select {
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14.5px; color: var(--ink);
  height: calc(2.6rem + 2px); padding: .5rem .8rem; background-color: #fff; box-shadow: var(--shadow-sm);
}
textarea.form-control { height: auto; min-height: 90px; }
.form-control:focus, .custom-select:focus { border-color: var(--navy-500); box-shadow: var(--ring); }
.form-control::placeholder { color: var(--subtle); }
.form-text { color: var(--muted); font-size: 12.5px; }
.form-group { margin-bottom: 1.1rem; }
.req::after { content: " *"; color: var(--danger); }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.3rem; }
.custom-control-label { font-weight: 500; }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--navy-600); border-color: var(--navy-600); }
.form-section { border-top: 1px solid var(--line-2); padding-top: 1.25rem; margin-top: .5rem; }
.form-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1rem; }

/* ---------- cards ---------- */
.card-x { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-x + .card-x { margin-top: 1.25rem; }
.card-x-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-x-title { font-size: 15.5px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .5rem; }
.card-x-title i { color: var(--navy-500); }
.card-x-sub { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.card-x-body { padding: 1.25rem; }
.card-x-footer { padding: .9rem 1.25rem; border-top: 1px solid var(--line-2); background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.grid-gap { row-gap: 1.25rem; }

/* stat tiles */
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; gap: 1rem; align-items: center; box-shadow: var(--shadow-sm); height: 100%; }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.stat-icon.navy { background: var(--navy-50); color: var(--navy-600); }
.stat-icon.gold { background: var(--gold-100); color: var(--gold-600); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-value { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat a.stretched-link { color: inherit; }

/* ---------- tables ---------- */
.table-x { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table-x th { background: #f8fafc; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .7rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
.table-x td { padding: .8rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink-2); }
.table-x tbody tr:hover td { background: #fafbfd; }
.table-x tbody tr:last-child td { border-bottom: 0; }
.table-x .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-x .actions { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 12.5px; color: var(--muted); }
.person { display: flex; align-items: center; gap: .7rem; min-width: 180px; }

/* ---------- pills / avatars ---------- */
.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: 12px; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill-success { background: var(--success-bg); color: var(--success); }
.pill-warning { background: var(--warning-bg); color: var(--warning); }
.pill-danger  { background: var(--danger-bg);  color: var(--danger); }
.pill-info    { background: var(--info-bg);    color: var(--info); }
.pill-primary { background: var(--navy-50);    color: var(--navy-600); }
.pill-neutral { background: var(--line-2);     color: var(--muted); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: .15rem .5rem; border-radius: 6px; background: var(--line-2); color: var(--ink-2); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy-100); color: var(--navy-700); display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 84px; height: 84px; font-size: 26px; }

/* ---------- alerts ---------- */
.alert-x { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 14px; border: 1px solid transparent; }
.alert-x > i { margin-top: 3px; }
.alert-x > div { flex: 1; }
.alert-x-success { background: var(--success-bg); color: #0b6b4a; border-color: #bfe8d6; }
.alert-x-error   { background: var(--danger-bg);  color: #9b2424; border-color: #f6c9c9; }
.alert-x-warning { background: var(--warning-bg); color: #7c5310; border-color: #f2dcaa; }
.alert-x-info    { background: var(--info-bg);    color: #174e94; border-color: #c4dbf8; }
.alert-x-close { background: none; border: 0; font-size: 20px; line-height: 1; color: inherit; opacity: .6; cursor: pointer; }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--navy-50); color: var(--navy-500); display: grid; place-items: center; font-size: 24px; margin: 0 auto 1rem; }
.empty h4 { font-size: 17px; margin-bottom: .35rem; }

/* ---------- toolbar / filters ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.toolbar .form-control, .toolbar .custom-select { width: auto; min-width: 160px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.tabs-x { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs-x a { padding: .65rem 1rem; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-x a:hover { color: var(--ink); }
.tabs-x a.active { color: var(--navy-700); border-color: var(--gold-400); }
.tabs-x .count { background: var(--line-2); border-radius: 999px; padding: 0 .45rem; font-size: 12px; margin-left: .3rem; }

.pagination .page-link { border-color: var(--line); color: var(--ink-2); font-weight: 600; font-size: 13px; }
.pagination .page-item.active .page-link { background: var(--navy-700); border-color: var(--navy-700); }
.pagination .page-item:first-child .page-link { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.pagination .page-item:last-child .page-link { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.progress-x { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress-x > span { display: block; height: 100%; border-radius: 999px; background: var(--navy-500); }
.progress-x.gold > span { background: var(--gold-400); }
.progress-x.green > span { background: var(--success); }
.progress-x.red > span { background: var(--danger); }

.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .55rem 1rem; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; word-break: break-word; }

.steps-x { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps-x li { position: relative; padding: 0 0 1.1rem 2.6rem; }
.steps-x li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-50); color: var(--navy-700); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.steps-x li.done::before { content: "\2713"; background: var(--success-bg); color: var(--success); }
.steps-x li strong { display: block; font-size: 14px; }
.steps-x li span { color: var(--muted); font-size: 13px; }

.modal-content { border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--line-2); padding: 1rem 1.25rem; }
.modal-title { font-weight: 700; font-size: 17px; }
.modal-footer { border-top: 1px solid var(--line-2); }
.dropdown-menu { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .4rem; font-size: 14px; }
.dropdown-item { border-radius: 6px; padding: .5rem .75rem; display: flex; align-items: center; gap: .6rem; color: var(--ink-2); }
.dropdown-item i { width: 16px; color: var(--muted); }
.dropdown-item:hover { background: var(--navy-50); color: var(--navy-800); }
.dropdown-item.text-danger i { color: var(--danger); }

/* =====================================================================
   App shell (staff console + teacher portal)
   ===================================================================== */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #c7d3e6; position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; flex-direction: column;
  transition: transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar-brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; padding: 2px; }
.sidebar-brand strong { color: #fff; font-size: 16px; letter-spacing: .02em; display: block; line-height: 1.1; }
.sidebar-brand span { font-size: 11.5px; color: #8ea3c4; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .75rem 1.5rem; }
.sidebar-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #6d84a8; font-weight: 700; padding: 1rem .75rem .4rem; }
.sidebar-link { display: flex; align-items: center; gap: .8rem; padding: .6rem .75rem; border-radius: 9px; color: #c7d3e6; font-size: 14px; font-weight: 500; margin-bottom: 2px; position: relative; }
.sidebar-link i { width: 18px; text-align: center; color: #8ea3c4; font-size: 15px; }
.sidebar-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-link:hover i { color: #fff; }
.sidebar-link.active { background: rgba(246, 185, 40, .12); color: #fff; }
.sidebar-link.active i { color: var(--gold-400); }
.sidebar-link.active::before { content: ""; position: absolute; left: -.75rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-400); }
.sidebar-link .count { margin-left: auto; background: var(--gold-400); color: var(--navy-950); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 .45rem; }
.sidebar-foot { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.06); font-size: 12px; color: #6d84a8; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; position: sticky; top: 0; z-index: 1030; }
.topbar-title { font-weight: 700; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem .3rem .3rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.user-chip:hover { border-color: var(--navy-100); background: var(--navy-50); }
.user-chip .avatar { width: 32px; height: 32px; font-size: 12px; }
.user-chip .name { font-size: 13.5px; font-weight: 600; line-height: 1.1; }
.user-chip .role { font-size: 11.5px; color: var(--muted); }
.menu-toggle { display: none; }
.content { padding: 1.75rem 1.75rem 3rem; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 24px; margin: 0; }
.page-head p { color: var(--muted); margin: .25rem 0 0; font-size: 14px; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: .35rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--navy-700); }
.crumbs i { font-size: 10px; margin: 0 .4rem; opacity: .6; }
.app-footer { padding: 1rem 1.75rem; color: var(--subtle); font-size: 12.5px; border-top: 1px solid var(--line); background: #fff; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.backdrop { display: none; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 26, 48, .45); z-index: 1035; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 1.25rem 1rem 2.5rem; }
  .topbar { padding: 0 1rem; }
  .user-chip .meta { display: none; }
  .page-head h1 { font-size: 21px; }
}

/* welcome banner */
.hello { background: radial-gradient(1200px 300px at 100% 0%, rgba(246,185,40,.25), transparent 60%), linear-gradient(120deg, var(--navy-800), var(--navy-600)); color: #fff; border-radius: var(--radius-lg); padding: 1.6rem 1.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; box-shadow: var(--shadow); }
.hello h2 { color: #fff; font-size: 22px; margin: 0 0 .25rem; }
.hello p { color: #d2ddf0; margin: 0; }

/* =====================================================================
   Public site
   ===================================================================== */
.pub-nav { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); }
.pub-nav .inner { display: flex; align-items: center; gap: 1.5rem; height: 70px; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand strong { display: block; font-size: 17px; line-height: 1.1; letter-spacing: .02em; }
.brand span { display: block; font-size: 12px; color: var(--muted); }
.pub-links { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.pub-links a.link { color: var(--ink-2); font-weight: 600; font-size: 14px; padding: .5rem .8rem; border-radius: 8px; }
.pub-links a.link:hover { background: var(--navy-50); color: var(--navy-800); }
.pub-toggle { display: none; margin-left: auto; }
@media (max-width: 767.98px) {
  .pub-toggle { display: inline-flex; }
  .pub-links { display: none; position: absolute; top: 70px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: .75rem 16px 1rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .pub-links.open { display: flex; }
  .brand span { display: none; }
}

.hero { position: relative; overflow: hidden; background: radial-gradient(900px 420px at 85% 10%, rgba(246,185,40,.22), transparent 60%), linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 55%, var(--navy-700) 100%); color: #fff; padding: 5.5rem 0 6rem; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-400); background: rgba(246,185,40,.1); border: 1px solid rgba(246,185,40,.25); padding: .35rem .8rem; border-radius: 999px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.1; font-weight: 800; margin: 1.1rem 0 1rem; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero p.lead { color: #c9d6ec; font-size: 1.12rem; max-width: 560px; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.hero .btn-light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.hero .btn-light:hover { background: rgba(255,255,255,.16); color: #fff; }
.hero-card { background: rgba(255,255,255,.97); color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.6rem; }
.hero-card h3 { font-size: 18px; }
.trust { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 2.5rem; color: #9fb3d4; font-size: 13px; }
.trust strong { display: block; color: #fff; font-size: 22px; font-weight: 800; }

.section { padding: 5rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; height: 100%; transition: transform .2s, box-shadow .2s, border-color .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--navy-100); }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-600); font-size: 20px; margin-bottom: 1rem; }
.feature h3 { font-size: 17px; margin-bottom: .4rem; }
.feature p { color: var(--muted); font-size: 14.5px; margin: 0; }
.journey { counter-reset: j; }
.journey-step { position: relative; padding: 1.5rem 1.25rem 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); height: 100%; }
.journey-step::before { counter-increment: j; content: counter(j); position: absolute; top: -16px; left: 1.25rem; width: 34px; height: 34px; border-radius: 50%; background: var(--gold-400); color: var(--navy-950); font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 5px var(--canvas); }
.journey-step h4 { font-size: 16px; margin: .5rem 0 .35rem; }
.journey-step p { color: var(--muted); font-size: 14px; margin: 0; }
.cta-band { background: linear-gradient(120deg, var(--navy-800), var(--navy-600)); border-radius: var(--radius-lg); color: #fff; padding: 2.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h3 { color: #fff; margin: 0 0 .3rem; }
.cta-band p { color: #d2ddf0; margin: 0; }
.pub-footer { background: var(--navy-950); color: #8ea3c4; padding: 3rem 0 1.5rem; font-size: 14px; }
.pub-footer h5 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.pub-footer a { color: #c7d3e6; }
.pub-footer a:hover { color: var(--gold-400); }
.pub-footer ul { list-style: none; padding: 0; margin: 0; }
.pub-footer li { margin-bottom: .5rem; }
.pub-footer .bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 2rem; padding-top: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: 13px; }

/* auth split screen */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { background: radial-gradient(700px 360px at 90% 0%, rgba(246,185,40,.22), transparent 60%), linear-gradient(150deg, var(--navy-950), var(--navy-700)); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-aside h2 { color: #fff; font-size: 2rem; font-weight: 800; line-height: 1.2; max-width: 460px; }
.auth-aside p { color: #c9d6ec; max-width: 460px; }
.auth-aside ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.auth-aside li { display: flex; gap: .7rem; margin-bottom: .8rem; color: #dbe5f5; }
.auth-aside li i { color: var(--gold-400); margin-top: 4px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 16px; background: var(--canvas); }
.auth-box { width: 100%; max-width: 420px; }
.auth-box.wide { max-width: 760px; }
.auth-box h1 { font-size: 26px; font-weight: 800; }
@media (max-width: 991.98px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}

/* license verification */
.verify-card { max-width: 640px; margin: 0 auto; }
.verify-status { display: flex; gap: 1rem; align-items: center; padding: 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; }
.verify-status i { font-size: 30px; }
.verify-status.valid { background: var(--success-bg); color: #0b6b4a; }
.verify-status.invalid { background: var(--danger-bg); color: #9b2424; }

/* =====================================================================
   Exam room
   ===================================================================== */
.exam-body { background: var(--canvas); }
.exam-top { position: sticky; top: 0; z-index: 1030; background: var(--navy-900); color: #fff; height: 64px; display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem; box-shadow: var(--shadow); }
.exam-top .who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.exam-top .who img { width: 36px; height: 36px; border-radius: 50%; background: #fff; }
.exam-top .who strong { display: block; font-size: 14px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-top .who span { font-size: 12px; color: #9fb3d4; }
.exam-top .spacer { flex: 1; }
.net { display: inline-flex; align-items: center; gap: .4rem; font-size: 12.5px; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; background: rgba(15,157,107,.18); color: #6ee7b7; }
.net.off { background: rgba(210,59,59,.2); color: #fca5a5; }
.net.saving { background: rgba(246,185,40,.18); color: var(--gold-400); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: .25rem .8rem; display: flex; align-items: center; gap: .5rem; }
.timer i { color: var(--gold-400); font-size: 15px; }
.timer.low { background: var(--danger); border-color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .75; } }
.exam-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; max-width: 1280px; margin: 0 auto; padding: 1.25rem; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.75rem; }
.q-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.q-num { font-size: 13px; font-weight: 700; color: var(--navy-600); text-transform: uppercase; letter-spacing: .06em; }
.q-text { font-size: 18px; line-height: 1.6; color: var(--ink); font-weight: 500; margin-bottom: 1.5rem; white-space: pre-line; word-break: break-word; }
.opt { display: flex; gap: .9rem; align-items: flex-start; width: 100%; text-align: left; padding: .95rem 1.1rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: .7rem; cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; font-size: 16px; color: var(--ink); }
.opt:hover { border-color: var(--navy-500); background: var(--navy-50); }
.opt .key { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; color: var(--ink-2); background: #fff; }
.opt .txt { padding-top: 4px; word-break: break-word; }
.opt.selected { border-color: var(--navy-600); background: var(--navy-50); box-shadow: 0 0 0 3px rgba(47,100,173,.12); }
.opt.selected .key { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.q-nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; position: sticky; top: 84px; }
.panel h6 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.grid-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.grid-nav button { aspect-ratio: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); position: relative; cursor: pointer; padding: 0; }
.grid-nav button.answered { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.grid-nav button.flagged::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-400); }
.grid-nav button.current { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold-400); }
.legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: .9rem 0; }
.legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1.5px solid var(--line); }
.legend .l-ans::before { background: var(--navy-700); border-color: var(--navy-700); }
.legend .l-flag::before { background: var(--gold-400); border-color: var(--gold-400); border-radius: 50%; }
.overlay { position: fixed; inset: 0; background: rgba(10,26,48,.86); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 16px; }
.overlay.show { display: flex; }
.overlay-box { background: #fff; border-radius: var(--radius-lg); padding: 2rem; max-width: 460px; text-align: center; box-shadow: var(--shadow-lg); }
.overlay-box .empty-icon { width: 72px; height: 72px; font-size: 28px; }
@media (max-width: 991.98px) {
  .exam-wrap { grid-template-columns: 1fr; padding: 1rem 16px; }
  .panel { position: static; }
  .q-card { padding: 1.25rem; }
  .q-text { font-size: 16.5px; }
  .exam-top .who span, .net .lbl { display: none; }
}

/* result screen */
.score-ring { --p: 0; --c: var(--success); width: 168px; height: 168px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-2) 0); display: grid; place-items: center; margin: 0 auto; }
.score-ring > div { width: 136px; height: 136px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
.score-ring strong { font-size: 34px; font-weight: 800; display: block; line-height: 1; }
.score-ring span { font-size: 12px; color: var(--muted); }

/* =====================================================================
   Print (licenses & reports)
   ===================================================================== */
.print-bar { background: var(--navy-900); color: #fff; padding: .75rem 16px; display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.print-sheet { background: #fff; margin: 1.5rem auto; box-shadow: var(--shadow-lg); }
.license { width: 297mm; height: 210mm; padding: 9mm; position: relative; overflow: hidden; color: var(--navy-950); }
.license-frame { position: absolute; inset: 9mm; border: 2.5mm solid var(--navy-800); outline: .6mm solid var(--gold-400); outline-offset: -4.5mm; border-radius: 2mm; }
.license-inner { position: relative; height: 100%; padding: 13mm 17mm 11mm; display: flex; flex-direction: column; }
.license-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.license-watermark img { width: 105mm; opacity: .06; }
.license-head { display: flex; align-items: center; gap: 6mm; border-bottom: .4mm solid var(--line); padding-bottom: 4mm; }
.license-head img { width: 24mm; height: 24mm; }
.license-head .org { flex: 1; }
.license-head .org div:first-child { font-size: 11pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-700); }
.license-head .org div:last-child { font-size: 9pt; color: var(--muted); }
.license-no { text-align: right; font-size: 9pt; color: var(--muted); }
.license-no strong { display: block; font-size: 13pt; color: var(--navy-900); font-family: ui-monospace, Menlo, Consolas, monospace; }
.license-title { text-align: center; margin: 6mm 0 3mm; }
.license-title h1 { font-family: Georgia, "Times New Roman", serif; font-size: 30pt; font-weight: 700; color: var(--navy-900); margin: 0; letter-spacing: .02em; }
.license-title div { color: var(--gold-600); font-weight: 700; letter-spacing: .3em; font-size: 10pt; text-transform: uppercase; margin-top: 1mm; }
.license-body { display: flex; gap: 9mm; align-items: center; flex: 1; }
.license-photo { width: 34mm; height: 42mm; border: .6mm solid var(--navy-100); border-radius: 2mm; object-fit: cover; background: var(--navy-50); display: grid; place-items: center; font-size: 22pt; font-weight: 800; color: var(--navy-600); flex-shrink: 0; }
.license-text { flex: 1; font-size: 12pt; line-height: 1.6; }
.license-text .name { font-family: Georgia, "Times New Roman", serif; font-size: 22pt; font-weight: 700; color: var(--navy-800); border-bottom: .4mm solid var(--gold-400); display: inline-block; padding: 0 2mm 1mm; margin: 1mm 0 3mm; }
.license-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2mm 6mm; margin-top: 4mm; font-size: 9.5pt; }
.license-grid div span { display: block; color: var(--muted); font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; }
.license-grid div strong { color: var(--navy-950); }
.license-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; margin-top: 4mm; }
.license-sign { text-align: center; min-width: 60mm; font-size: 9.5pt; }
.license-sign .line { border-top: .4mm solid var(--navy-900); margin-bottom: 1mm; padding-top: 1mm; }
.license-qr { text-align: center; font-size: 7.5pt; color: var(--muted); }
.license-qr img { width: 26mm; height: 26mm; display: block; margin: 0 auto 1mm; }
.license-seal { width: 26mm; height: 26mm; border-radius: 50%; border: .8mm double var(--gold-500); display: grid; place-items: center; text-align: center; font-size: 6.5pt; font-weight: 800; color: var(--gold-600); letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; }
.license.revoked::before { content: "REVOKED"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 80pt; font-weight: 900; color: rgba(210,59,59,.22); transform: rotate(-18deg); z-index: 5; }

.report-sheet { width: 210mm; min-height: 297mm; padding: 14mm; font-size: 10pt; }
.report-sheet h1 { font-size: 18pt; }
.report-sheet .table-x td, .report-sheet .table-x th { padding: 5px 7px; font-size: 9pt; }

@page { margin: 0; }
@media print {
  body { background: #fff !important; }
  .no-print, .print-bar { display: none !important; }
  .print-sheet { margin: 0; box-shadow: none; }
  .license { page-break-after: always; }
  .report-sheet { width: auto; min-height: 0; padding: 12mm; }
  .report-sheet .card-x { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media screen and (max-width: 1100px) {
  .print-sheet.license { transform-origin: top left; }
}
