/* =====================================================================
   FORTIVA SECURITY ACADEMY — application stylesheet
   Navy / gold brand system. No framework.
   ===================================================================== */

:root {
  --navy: #0B1F3A;
  --navy-deep: #071527;
  --navy-700: #13305C;
  --navy-600: #1C3F74;
  --navy-100: #E6EBF3;
  --gold: #C29A3C;
  --gold-dark: #9C7A22;
  --gold-light: #E8D08F;
  --gold-50: #FBF6E8;
  --paper: #F3F2EE;
  --surface: #FFFFFF;
  --surface-2: #F8F7F4;
  --line: #DED9CE;
  --line-soft: #ECE8DF;
  --ink: #1B1F26;
  --ink-2: #3C4350;
  --muted: #6B7280;
  --ok: #1E7A4E;
  --ok-bg: #E4F3EA;
  --warn: #9A6B10;
  --warn-bg: #FBF0D5;
  --bad: #B3261E;
  --bad-bg: #FBE4E2;
  --info: #2A5CA8;
  --info-bg: #E3ECF9;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.06), 0 1px 1px rgba(11, 31, 58, 0.04);
  --shadow-lg: 0 12px 30px rgba(7, 21, 39, 0.18);
  --font: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", "Arial Narrow", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--navy-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; color: var(--navy); font-weight: 700; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
code, .mono { font-family: var(--font-mono); font-size: .92em; }
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- utilities */
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .78rem; }
.strong { font-weight: 600; }
.caps { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; color: var(--muted); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.flex { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
.mt { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb { margin-bottom: 1rem; }
.gold { color: var(--gold-dark); }
.navy { color: var(--navy); }
.hide { display: none !important; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .55rem 1rem; border-radius: var(--radius); border: 1px solid transparent;
  font: 600 .9rem/1 var(--font); letter-spacing: .02em; cursor: pointer;
  text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-700); }
.btn-gold { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }
.btn-gold:hover { background: #D1A94A; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy-100); }
.btn-ghost { background: transparent; color: var(--navy-600); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--navy-600); }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: var(--gold-50); }
.btn-danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-danger:hover { background: #911d17; }
.btn-ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-ok:hover { background: #16623e; }
.btn-sm { padding: .35rem .65rem; font-size: .8rem; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 1em; height: 1em; }
form.inline { display: inline; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-block; padding: .18rem .5rem; border-radius: 3px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3;
  border: 1px solid transparent;
}
.badge--ok { background: var(--ok-bg); color: var(--ok); border-color: #c4e5d1; }
.badge--bad { background: var(--bad-bg); color: var(--bad); border-color: #f1c6c3; }
.badge--warn { background: var(--warn-bg); color: var(--warn); border-color: #ecd9a3; }
.badge--info { background: var(--info-bg); color: var(--info); border-color: #c3d4ef; }
.badge--muted { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.badge--navy { background: var(--navy); color: #fff; }
.badge--gold { background: var(--gold-50); color: var(--gold-dark); border-color: var(--gold-light); }

/* ---------------------------------------------------------------- alerts */
.alert { padding: .75rem 1rem; border-radius: var(--radius); border: 1px solid; margin-bottom: 1rem; font-size: .92rem; display: flex; gap: .6rem; align-items: flex-start; }
.alert svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #c4e5d1; }
.alert-error { background: var(--bad-bg); color: var(--bad); border-color: #f1c6c3; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #c3d4ef; }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: #ecd9a3; }
.alert ul { margin: .25rem 0 0 1.1rem; padding: 0; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: .3rem; letter-spacing: .02em; }
.field label .req { color: var(--bad); }
.field .help { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.field .error { font-size: .8rem; color: var(--bad); margin-top: .3rem; font-weight: 600; }
.input, select, textarea, input[type=text], input[type=email], input[type=password], input[type=date], input[type=tel], input[type=number], input[type=search], input[type=url] {
  width: 100%; padding: .55rem .7rem; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236B7280' stroke-width='1.6'/></svg>"); background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(194, 154, 60, .25); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }
input[type=file] { font-size: .86rem; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--navy); }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.grid { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding-top: .5rem; border-top: 1px solid var(--line-soft); margin-top: .5rem; }
.input-group { display: flex; gap: .5rem; }
.input-group .input, .input-group input { flex: 1; }

/* ---------------------------------------------------------------- cards / panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1rem; letter-spacing: .01em; }
.panel-head h2::before, .panel-head h3::before { content: ""; display: inline-block; width: 4px; height: 1em; background: var(--gold); margin-right: .6rem; vertical-align: -2px; }
.panel-body { padding: 1.1rem; }
.panel-foot { padding: .75rem 1.1rem; border-top: 1px solid var(--line-soft); background: var(--surface-2); }
.panel + .panel { margin-top: 1.25rem; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: .6rem .9rem; border-bottom: 2px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: .65rem .9rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FCFBF8; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .mono { white-space: nowrap; }
.table td:first-child { min-width: 150px; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn + .btn, .table .actions form + .btn, .table .actions .btn + form { margin-left: .3rem; }
.table a.row-link { color: var(--navy); font-weight: 600; }
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink-2); margin-bottom: .25rem; }

/* ---------------------------------------------------------------- pagination */
.pagination { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; font-size: .86rem; }
.pagination a, .pagination span { padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--navy); }
.pagination span.current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination span.info { border: 0; background: none; color: var(--muted); }

/* ---------------------------------------------------------------- avatars / id cards */
.avatar { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--navy-100); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; flex: 0 0 auto; border: 1px solid var(--line); }
.avatar-lg { width: 112px; height: 112px; font-size: 2rem; }
.avatar-xl { width: 150px; height: 150px; font-size: 2.6rem; }
.id-tag { font-family: var(--font-mono); font-size: .8rem; background: var(--navy); color: var(--gold-light); padding: .15rem .5rem; border-radius: 3px; letter-spacing: .04em; white-space: nowrap; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: .45rem 1rem; margin: 0; font-size: .92rem; }
.dl dt { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; padding-top: .15rem; }
.dl dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: .95rem 1.1rem; box-shadow: var(--shadow); }
.tile .label { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tile .value { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--navy); line-height: 1.1; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.tile--navy { border-left-color: var(--navy); }

/* ---------------------------------------------------------------- progress / meter */
.meter { height: 8px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--navy); }
.meter.ok > span { background: var(--ok); }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }

/* ---------------------------------------------------------------- steps / timeline */
.steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; counter-reset: step; }
.step { padding: .6rem .5rem; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 3px; font-size: .78rem; text-align: center; color: var(--muted); position: relative; }
.step::before { counter-increment: step; content: counter(step); display: block; width: 22px; height: 22px; margin: 0 auto .3rem; border-radius: 50%; background: var(--line); color: var(--ink-2); font-weight: 700; line-height: 22px; font-size: .72rem; }
.step.done { background: var(--ok-bg); border-color: #c4e5d1; color: var(--ok); }
.step.done::before { background: var(--ok); color: #fff; content: "✓"; }
.step.current { background: var(--gold-50); border-color: var(--gold-light); color: var(--gold-dark); font-weight: 600; }
.step.current::before { background: var(--gold); color: var(--navy-deep); }

/* =====================================================================
   APP SHELL (admin + trainee)
   ===================================================================== */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--navy); color: #C9D3E3;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 3px solid var(--gold);
}
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.1rem .9rem; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; text-decoration: none !important; }
.brand img { width: 46px; height: 46px; }
.brand .name, .brand .sub { display: block; }
.brand .name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; line-height: 1; color: #fff; }
.brand .sub { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); margin-top: .25rem; }
.portal-tag { margin: .8rem 1.1rem 0; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); opacity: .9; }
.nav { padding: .5rem .6rem 1rem; flex: 1; }
.nav .group { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(201,211,227,.55); padding: .9rem .6rem .35rem; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: 3px; color: #D5DDEA; font-weight: 500; font-size: .92rem; text-decoration: none !important; border-left: 3px solid transparent; }
.nav a svg { width: 18px; height: 18px; opacity: .8; flex: 0 0 18px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(255,255,255,.09); color: #fff; border-left-color: var(--gold); }
.nav a.active svg { opacity: 1; }
.sidebar-foot { padding: .9rem 1.1rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .82rem; }
.sidebar-foot .who { color: #fff; font-weight: 600; }
.sidebar-foot .role { color: var(--gold-light); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-foot form { margin-top: .6rem; }
.sidebar-foot .btn { width: 100%; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.sidebar-foot .btn:hover { background: rgba(255,255,255,.14); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: .8rem 1.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar h1 { font-size: 1.25rem; margin: 0; }
.topbar .crumbs { font-size: .78rem; color: var(--muted); }
.topbar .crumbs a { color: var(--muted); }
.topbar .crumbs span::before { content: "›"; margin: 0 .4rem; }
.topbar .crumbs span:first-child::before { content: none; }
.topbar .user { display: flex; align-items: center; gap: .6rem; font-size: .86rem; }
.topbar .user .avatar { width: 34px; height: 34px; font-size: .8rem; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 3px; padding: .4rem .5rem; cursor: pointer; color: var(--navy); }
.menu-btn svg { width: 20px; height: 20px; display: block; }
.content { padding: 1.6rem; flex: 1; }
.content > .alert:first-child { margin-top: 0; }
.page-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar form { display: flex; gap: .5rem; flex: 1; min-width: 260px; }
.toolbar input[type=search] { flex: 1; }
.toolbar select { width: auto; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; align-items: start; }
.two-col-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.content-narrow { max-width: 860px; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(7,21,39,.55); z-index: 40; }

/* ---------------------------------------------------------------- record page */
.record-head { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.record-head .avatar { width: 64px; height: 64px; }
.cert-preview { border: 1px solid var(--line); background: #fff; padding: 1.2rem; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.cert-preview .qr svg { width: 120px; height: 120px; }
.status-strip { display: flex; gap: 1.2rem; flex-wrap: wrap; padding: .9rem 1.1rem; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }
.status-strip div { font-size: .8rem; color: var(--muted); }
.status-strip strong { display: block; font-size: 1rem; color: var(--navy); }

/* =====================================================================
   PUBLIC SITE
   ===================================================================== */
.site-header { background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); }
.site-header .inner { max-width: 1180px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header .brand { padding: 0; border: 0; }
.site-nav { display: flex; gap: .2rem; align-items: center; }
.site-nav a { color: #D5DDEA; padding: .5rem .8rem; border-radius: 3px; font-weight: 500; font-size: .92rem; text-decoration: none !important; }
.site-nav a:hover, .site-nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.site-nav .btn { margin-left: .5rem; }
.site-main { max-width: 1180px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.site-main.narrow { max-width: 760px; }
.site-footer { background: var(--navy-deep); color: #9FB0C8; border-top: 3px solid var(--gold); margin-top: 2rem; }
.site-footer .inner { max-width: 1180px; margin: 0 auto; padding: 2rem 1.25rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; font-size: .88rem; }
.site-footer h4 { color: #fff; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .6rem; }
.site-footer a { color: #D5DDEA; }
.site-footer .motto { color: var(--gold-light); letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; font-weight: 600; }
.site-footer .legal { max-width: 1180px; margin: 0 auto; padding: .9rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .76rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 520px; height: 520px; border: 60px solid rgba(255,255,255,.035); border-radius: 50%; pointer-events: none; }
.hero .inner { max-width: 1180px; margin: 0 auto; padding: 3.5rem 1.25rem 3rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; position: relative; }
.hero .kicker { color: var(--gold-light); letter-spacing: .2em; text-transform: uppercase; font-size: .74rem; font-weight: 700; margin-bottom: .8rem; }
.hero h1 { color: #fff; font-family: var(--font-display); font-size: 3.1rem; font-weight: 700; line-height: 1.05; letter-spacing: .01em; margin-bottom: 1rem; }
.hero p { color: #C9D3E3; font-size: 1.08rem; max-width: 560px; }
.hero .actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero .values { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 2rem; color: var(--gold-light); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.hero .values span::before { content: "◆"; font-size: .5rem; margin-right: .5rem; vertical-align: 2px; }
.hero .emblem { text-align: center; }
.hero .emblem img { width: 300px; margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.4)); }

.verify-box { background: #fff; color: var(--ink); border-radius: var(--radius); border-top: 4px solid var(--gold); padding: 1.4rem; box-shadow: var(--shadow-lg); }
.verify-box h2 { margin-bottom: .3rem; }
.verify-box form { display: flex; gap: .5rem; margin-top: .9rem; }
.verify-box input { font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }

.section { margin-top: 3rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin: 0; letter-spacing: .01em; }
.section-head .kicker { color: var(--gold-dark); letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; font-weight: 700; display: block; margin-bottom: .25rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.course-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: flex; flex-direction: column; gap: .5rem; border-top: 3px solid var(--navy); box-shadow: var(--shadow); }
.course-card .code { font-family: var(--font-mono); font-size: .74rem; color: var(--gold-dark); letter-spacing: .06em; font-weight: 600; }
.course-card h3 { margin: 0; font-size: 1.08rem; }
.course-card p { color: var(--ink-2); font-size: .9rem; margin: 0; flex: 1; }
.course-card .meta { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); padding-top: .6rem; border-top: 1px solid var(--line-soft); }
.course-card--featured { border-top-color: var(--gold); grid-column: span 3; display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.6rem; background: var(--navy); color: #fff; border-color: var(--navy); }
.course-card--featured h3, .course-card--featured p { color: #fff; }
.course-card--featured .code { color: var(--gold-light); }
.course-card--featured .meta { color: #C9D3E3; border-top-color: rgba(255,255,255,.12); }
.course-card--featured ul { margin: .5rem 0 0; padding-left: 1.1rem; color: #D5DDEA; font-size: .9rem; columns: 2; gap: 1.5rem; }
.pathway { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.pathway .p { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.pathway .p .n { font-family: var(--font-display); font-size: 2rem; color: var(--gold); font-weight: 700; line-height: 1; }
.pathway .p h3 { margin: .4rem 0 .3rem; font-size: 1rem; }
.pathway .p p { font-size: .88rem; color: var(--ink-2); margin: 0; }
.values-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.values-row .v { padding: 1.1rem; background: var(--navy); color: #fff; border-radius: var(--radius); border-left: 4px solid var(--gold); }
.values-row .v h3 { color: var(--gold-light); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .3rem; }
.values-row .v p { margin: 0; color: #C9D3E3; font-size: .9rem; }
.cta-band { margin-top: 3rem; background: var(--gold-50); border: 1px solid var(--gold-light); border-radius: var(--radius); padding: 1.6rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .2rem; }
.cta-band p { margin: 0; color: var(--ink-2); }

/* ---------------------------------------------------------------- verification result */
.verify-result { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.verify-status { padding: 1.4rem 1.6rem; color: #fff; display: flex; align-items: center; gap: 1rem; }
.verify-status .icon { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; flex: 0 0 46px; }
.verify-status .icon svg { width: 26px; height: 26px; }
.verify-status .t { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; letter-spacing: .06em; line-height: 1; }
.verify-status .d { opacity: .9; font-size: .9rem; margin-top: .25rem; }
.verify-status--valid { background: var(--ok); }
.verify-status--revoked { background: var(--bad); }
.verify-status--not_found { background: #4B5563; }
.verify-body { padding: 1.4rem 1.6rem; display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; }
.verify-body .qr svg { width: 128px; height: 128px; border: 1px solid var(--line); padding: 4px; }
.verify-note { padding: .9rem 1.6rem; background: var(--surface-2); border-top: 1px solid var(--line-soft); font-size: .82rem; color: var(--muted); }

/* =====================================================================
   AUTH PAGES
   ===================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.15fr; }
.auth-side { background: var(--navy); color: #fff; padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: space-between; border-right: 4px solid var(--gold); }
.auth-side img { width: 190px; }
.auth-side h2 { color: #fff; font-family: var(--font-display); font-size: 2.2rem; margin: 1.4rem 0 .5rem; }
.auth-side p { color: #C9D3E3; max-width: 420px; }
.auth-side .motto { color: var(--gold-light); letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; font-weight: 600; }
.auth-form { padding: 3rem 2.5rem; display: flex; align-items: center; justify-content: center; }
.auth-form .box { width: 100%; max-width: 640px; }
.auth-form .box.narrow { max-width: 420px; }
.auth-form h1 { font-size: 1.7rem; }
.auth-form .lead { color: var(--muted); margin-bottom: 1.5rem; }
.auth-form .foot { margin-top: 1.5rem; font-size: .9rem; color: var(--muted); }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem .2rem; margin-bottom: 1.2rem; background: #fff; }
.fieldset legend { padding: 0 .5rem; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); font-weight: 700; }
.photo-pick { display: flex; gap: 1rem; align-items: center; }
.photo-pick .avatar { width: 72px; height: 72px; }

/* ---------------------------------------------------------------- print */
@media print {
  .sidebar, .topbar, .site-header, .site-footer, .no-print, .page-actions { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-card--featured { grid-column: span 2; grid-template-columns: 1fr; }
  .pathway, .values-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-col { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; height: 100vh; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-backdrop { display: block; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: .7rem 1rem; }
  .topbar .user .name { display: none; }
  .content { padding: 1rem; }
  .two-col, .two-col-equal { grid-template-columns: 1fr; }
  .hero .inner { grid-template-columns: 1fr; padding: 2.5rem 1.25rem; }
  .hero h1 { font-size: 2.4rem; }
  .hero .emblem { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 1.6rem 1.25rem; border-right: 0; border-bottom: 4px solid var(--gold); }
  .auth-side img { width: 120px; }
  .auth-side h2 { font-size: 1.5rem; margin-top: .8rem; }
  .auth-side .spacer { display: none; }
  .auth-form { padding: 1.6rem 1.25rem; }
  .site-footer .inner { grid-template-columns: 1fr; gap: 1.2rem; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); padding: .6rem 1rem 1rem; border-bottom: 3px solid var(--gold); z-index: 30; }
  .site-nav.open .btn { margin: .4rem 0 0; }
  .site-header { position: relative; }
  .site-header .menu-btn { display: inline-flex; color: #fff; border-color: rgba(255,255,255,.3); }
  .verify-body { grid-template-columns: 1fr; }
  .verify-body .qr { order: -1; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .tile .value { font-size: 1.9rem; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .grid .span-2 { grid-column: auto; }
  .cards { grid-template-columns: 1fr; }
  .course-card--featured { grid-column: auto; }
  .course-card--featured ul { columns: 1; }
  .pathway, .values-row { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: .1rem .5rem; }
  .dl dt { margin-top: .5rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verify-box form { flex-direction: column; }
  .hero .values { gap: .6rem; }
  .cert-preview { grid-template-columns: 1fr; }
  .panel-head { padding: .75rem .9rem; }
  .panel-body { padding: .9rem; }
  .table th, .table td { padding: .5rem .6rem; }
  .toolbar form { min-width: 0; width: 100%; }
}
