/* Certificate Verification Portal */
:root {
  --brand: #0D2B4E;
  --accent: #D9962B;
  --ink: #142033;
  --ink-2: #4A5668;
  --muted: #6B7686;
  --line: #E3E7ED;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --ok: #157F4A;
  --ok-bg: #E6F4EC;
  --warn: #A35F00;
  --warn-bg: #FFF3DC;
  --bad: #B42318;
  --bad-bg: #FDECEA;
  --info: #1D5FA8;
  --info-bg: #E8F1FB;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.55; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
code { background: #EEF1F5; padding: .1em .35em; border-radius: 4px; font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
img { max-width: 100%; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: .01em; }
.hint { color: var(--muted); font-size: .82rem; margin: .3rem 0 0; display: block; font-weight: 400; }
.ico { width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--brand); color: #fff; border: 1px solid var(--brand); padding: .62rem 1.1rem; border-radius: 9px; font: 600 .92rem var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .15s, background .15s; }
.btn:hover { color: #fff; filter: brightness(1.15); }
.btn-outline { background: transparent; color: var(--brand); border-color: #C9D1DC; }
.btn-outline:hover { background: #fff; color: var(--brand); border-color: var(--brand); filter: none; }
.btn-sm { padding: .4rem .75rem; font-size: .84rem; border-radius: 7px; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-warn { background: var(--warn); border-color: var(--warn); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0; }
.btn-stack { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.link { background: none; border: 0; color: var(--brand); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link.danger, a.danger { color: var(--bad); }
.icon-btn { background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--ink); display: none; }

/* Alerts and badges */
.alert { padding: .8rem 1rem; border-radius: 10px; margin: 0 0 1rem; border: 1px solid transparent; font-size: .93rem; }
.alert-success { background: var(--ok-bg); color: #0E5A34; border-color: #BFE3CE; }
.alert-error { background: var(--bad-bg); color: #8A1C12; border-color: #F5C6C0; }
.alert-info { background: var(--info-bg); color: #164A84; border-color: #C5DAF2; }
.badge { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; background: #EEF1F5; color: var(--ink-2); white-space: nowrap; }
.badge-valid, .badge-active { background: var(--ok-bg); color: var(--ok); }
.badge-expired, .badge-pending { background: var(--warn-bg); color: var(--warn); }
.badge-revoked, .badge-blocked, .badge-not_found, .badge-mismatch { background: var(--bad-bg); color: var(--bad); }
.badge-suspended { background: #FFE9D6; color: #B54708; }
.tag { display: inline-block; font-size: .7rem; padding: .05rem .4rem; border-radius: 4px; background: #EEF1F5; color: var(--muted); font-weight: 600; vertical-align: middle; }

/* Forms */
.form label { display: block; font-weight: 600; font-size: .86rem; color: var(--ink-2); margin-bottom: .9rem; }
.form input:not([type=checkbox]):not([type=radio]):not([type=color]), .form select, .form textarea, .toolbar input, .toolbar select, .copy-row input {
  display: block; width: 100%; margin-top: .35rem; padding: .62rem .75rem; border: 1px solid #CBD3DD; border-radius: 8px; font: 400 .95rem var(--font); color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.form input:focus, .form select:focus, .form textarea:focus, .toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.form input:disabled, .form input[readonly] { background: #F3F5F8; color: var(--muted); }
.form input[type=color] { display: block; margin-top: .35rem; width: 100%; height: 42px; border: 1px solid #CBD3DD; border-radius: 8px; padding: 3px; background: #fff; }
.form input[type=file] { padding: .5rem; }
.form label.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; color: var(--ink); }
.form label.check input { margin-top: .25rem; width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.form label.check.inline { display: inline-flex; margin: 0; }
.form label.align-end { align-self: end; }
.form h3 { margin: 1.4rem 0 .8rem; padding-top: .4rem; border-top: 1px solid var(--line); font-size: .95rem; }
.form h3:first-of-type { border-top: 0; padding-top: 0; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .4rem; }
.form-actions.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 1rem 0 .6rem; z-index: 5; }
.grid-2, .grid-3 { display: grid; gap: 0 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.narrow { max-width: 520px; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-top: .4rem; }
.logo-preview { display: flex; align-items: center; gap: 1rem; margin-top: .6rem; }
.logo-preview img { max-height: 48px; background: #F3F5F8; padding: 4px; border-radius: 6px; }

/* Private preview strip */
.preview-strip { background: var(--accent); color: #1B1405; text-align: center; font-size: .82rem; font-weight: 700; padding: .4rem 16px; }

/* Public header/footer */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-logo { height: 42px; width: auto; max-width: 160px; object-fit: contain; }
.brand-initials { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; font-size: 1rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: .76rem; }
.brand-text .name-short { display: none; }
h1.mono { font-size: 1.45rem; }
.topnav { display: flex; align-items: center; gap: 1.1rem; }
.topnav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.topnav a:not(.btn):hover { color: var(--brand); }
.site-footer { background: var(--brand); color: rgba(255, 255, 255, .82); margin-top: 3rem; padding: 2rem 0 1rem; font-size: .9rem; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-inner p { margin: .4rem 0 0; }
.footer-contact { display: flex; flex-direction: column; gap: .3rem; }
.footer-note { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .8rem; color: rgba(255, 255, 255, .6); }

/* Hero / verify */
.hero { background: var(--brand); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(115deg, #000 20%, transparent 75%); -webkit-mask-image: linear-gradient(115deg, #000 20%, transparent 75%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .8rem; }
.hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: #fff; margin-bottom: .7rem; }
.hero p { color: rgba(255, 255, 255, .8); font-size: 1.05rem; }
.hero-points { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .55rem; }
.hero-points li { display: flex; gap: .55rem; align-items: center; color: rgba(255, 255, 255, .9); }
.hero-points .ico { color: var(--accent); }
.verify-box { background: #fff; color: var(--ink); border-radius: 16px; padding: 1.6rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.verify-box h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.verify-box label { display: block; font-weight: 600; font-size: .86rem; color: var(--ink-2); margin-bottom: .9rem; }
.verify-box input { display: block; width: 100%; margin-top: .35rem; padding: .75rem .85rem; border: 1px solid #CBD3DD; border-radius: 9px; font: 500 1rem var(--font); }
.verify-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.verify-box .btn { background: var(--accent); border-color: var(--accent); color: #1B1405; margin-top: .3rem; }
.verify-box .hint { text-align: center; margin-top: .8rem; }
.result-wrap { padding-top: 2.2rem; scroll-margin-top: 80px; }
.result-empty { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid #F5C6C0; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); max-width: 760px; margin: 0 auto; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.info-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.info-tile p { color: var(--ink-2); margin: 0; font-size: .92rem; }
.step { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, #fff); color: var(--brand); font-weight: 800; margin-bottom: .7rem; }
.cta-strip { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.cta-strip p { margin: 0; color: var(--ink-2); }
.cta-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* Certificate result card */
.cert-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; max-width: 760px; margin: 0 auto 1rem; }
.cert-card-head { display: flex; gap: 1rem; align-items: center; padding: 1.3rem 1.5rem; background: var(--ok-bg); border-bottom: 1px solid #BFE3CE; }
.cert-card-head h2 { margin: 0 0 .15rem; font-size: 1.25rem; }
.cert-card-head p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.cert-status-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ok); color: #fff; flex: none; }
.cert-status-icon .ico { width: 24px; height: 24px; stroke-width: 2.6; }
.cert-status-icon.bad { background: var(--bad); }
.status-expired .cert-card-head { background: var(--warn-bg); border-color: #F3D9A8; }
.status-expired .cert-status-icon { background: var(--warn); }
.status-revoked .cert-card-head { background: var(--bad-bg); border-color: #F5C6C0; }
.status-revoked .cert-status-icon { background: var(--bad); }
.status-suspended .cert-card-head { background: #FFE9D6; border-color: #F8CBA4; }
.status-suspended .cert-status-icon { background: #B54708; }
.cert-card-body { display: flex; gap: 1.5rem; padding: 1.5rem; align-items: flex-start; }
.cert-photo { width: 110px; height: 135px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.cert-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 0; flex: 1; }
.cert-details dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.cert-details dd { margin: .15rem 0 0; font-weight: 600; word-break: break-word; }
.cert-details dd.big { font-size: 1.15rem; }
.cert-details .span-2 { grid-column: span 2; }
.cert-card-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.5rem; border-top: 1px dashed var(--line); background: #FAFBFC; font-size: .85rem; }
.disclaimer { max-width: 760px; margin: 0 auto 1rem; font-size: .8rem; color: var(--muted); text-align: center; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem 16px; background: var(--bg); }
.narrow-page { padding-top: 2.5rem; }
.auth-card { width: 100%; max-width: 440px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 2rem; box-shadow: var(--shadow); }
.narrow-page .auth-card { max-width: 560px; }
.auth-card.wide { max-width: 720px; }
.auth-head { text-align: center; margin-bottom: 1.4rem; }
.auth-logo { height: 54px; width: auto; margin: 0 auto .8rem; display: block; }
.auth-logo.brand-initials { display: grid; width: 54px; height: 54px; }
.checklist { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: 0 0 1.2rem; font-size: .88rem; }
.checklist li { display: flex; gap: .4rem; align-items: center; }
.checklist .ok .ico { color: var(--ok); }
.checklist .bad { color: var(--bad); }

/* Student area */
.student-wrap { padding-top: 1.6rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs a { padding: .7rem 1rem; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--accent); }
.cert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.cert-tile { display: block; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--ok); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; }
.cert-tile:hover { transform: translateY(-2px); color: var(--ink); }
.cert-tile.status-expired { border-top-color: var(--warn); }
.cert-tile.status-revoked { border-top-color: var(--bad); }
.cert-tile.status-suspended { border-top-color: #B54708; }
.cert-tile-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .7rem; font-size: .85rem; color: var(--muted); }
.cert-tile h3 { margin: 0; }
.cert-tile p { margin: 0 0 .7rem; font-size: .85rem; }
.cert-tile dl { display: flex; gap: 1.5rem; margin: 0; font-size: .85rem; }
.cert-tile dt { color: var(--muted); font-size: .75rem; }
.cert-tile dd { margin: 0; font-weight: 600; }
.warn-note { color: var(--warn) !important; font-weight: 600; margin: .7rem 0 0 !important; }
.empty-state { text-align: center; background: #fff; border: 1px dashed #C9D1DC; border-radius: var(--radius); padding: 2.5rem 1.5rem; }
.empty-state p { max-width: 480px; margin: 0 auto 1rem; color: var(--ink-2); }

/* Admin layout */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: none; background: var(--brand); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.1rem 1.2rem; color: #fff; text-decoration: none; font-weight: 700; line-height: 1.2; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sidebar-brand small { display: block; font-weight: 500; font-size: .74rem; color: rgba(255, 255, 255, .6); }
.sidebar-brand .brand-logo { height: 36px; max-width: 90px; background: #fff; border-radius: 6px; padding: 3px; }
.sidebar-brand .brand-initials { width: 36px; height: 36px; background: var(--accent); color: var(--brand); padding: 0; }
.sidebar nav { padding: .8rem .6rem; display: grid; gap: 2px; }
.sidebar a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 8px; color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 500; font-size: .9rem; }
.sidebar a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar a.active { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.sidebar-foot .version { display: block; padding: .3rem .8rem; color: rgba(255,255,255,.45); font-size: .72rem; }
.sidebar-foot { margin-top: auto; padding: .6rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #fff; border-bottom: 1px solid var(--line); padding: .7rem 1.6rem; position: sticky; top: 0; z-index: 10; }
.admin-user { display: flex; gap: 1.1rem; align-items: center; font-size: .88rem; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.admin-content { padding: 1.6rem; max-width: 1280px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.page-head h1 { margin-bottom: .15rem; }
.page-head p { margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .9rem; }
.panel-head h2 { margin: 0; font-size: 1rem; }
.panel-head a { font-size: .85rem; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1.2rem; align-items: start; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .15rem; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; color: var(--brand); line-height: 1.15; }
.stat-sub { font-size: .8rem; color: var(--ink-2); }
.stat-grid.small .stat-value { font-size: 1.5rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: .5rem; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar span { display: block; width: 100%; min-height: 3px; background: var(--brand); border-radius: 4px 4px 0 0; opacity: .85; }
.bar:hover span { background: var(--accent); }
.bar small { font-size: .68rem; color: var(--muted); }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .87rem; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list small { margin-left: auto; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.toolbar input, .toolbar select { margin-top: 0; width: auto; flex: 1 1 160px; max-width: 320px; padding: .5rem .7rem; font-size: .9rem; }
.toolbar input[name=q] { flex-basis: 260px; }
.table-wrap { overflow-x: auto; margin: 0 -1.3rem; padding: 0 1.3rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: .55rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFD; }
.table.compact td { padding: .5rem .7rem; }
.table .empty { text-align: center; color: var(--muted); padding: 2rem; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions form { display: inline; margin-left: .7rem; }
.pager { display: flex; gap: .3rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager .current { min-width: 34px; text-align: center; padding: .35rem .6rem; border-radius: 7px; border: 1px solid var(--line); text-decoration: none; font-size: .85rem; }
.pager .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .muted { margin-left: .6rem; font-size: .85rem; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: .5rem .8rem; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.qr-box { display: flex; justify-content: center; padding: .8rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: .8rem 0; min-height: 60px; }
.qr-box img, .qr-box canvas { max-width: 180px; }
.copy-row { display: flex; gap: .4rem; align-items: center; margin: .6rem 0; }
.copy-row input { margin: 0; font-size: .8rem; padding: .45rem .6rem; font-family: var(--mono); }
.help ol { padding-left: 1.2rem; margin: 0; font-size: .9rem; color: var(--ink-2); }
.help li { margin-bottom: .5rem; }
.report h3 { margin-top: 1rem; }

@media (max-width: 960px) {
  .hero-inner, .grid-2-1 { grid-template-columns: 1fr; }
  .hero-inner { gap: 2rem; padding-top: 2.2rem; padding-bottom: 2.2rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 .span-2 { grid-column: 1 / -1; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 30px rgba(0, 0, 0, .2); }
  .nav-open .sidebar { transform: none; }
  .icon-btn { display: inline-flex; }
  .admin-content, .admin-top { padding-left: 16px; padding-right: 16px; }
  .table-wrap { margin: 0 -1.3rem; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .grid-2, .grid-3, .info-grid, .checklist { grid-template-columns: 1fr; }
  .span-2, .grid-3 .span-2 { grid-column: auto; }
  .topnav a:not(.btn) { display: none; }
  .topnav { gap: .5rem; }
  .brand-text .name-long { display: none; }
  .brand-text .name-short { display: block; }
  .cert-card-body { flex-direction: column; }
  .cert-details { grid-template-columns: 1fr; }
  .cert-details .span-2 { grid-column: auto; }
  .auth-card { padding: 1.4rem; }
  .panel { padding: 1rem; }
  .table-wrap { margin: 0 -1rem; padding: 0 1rem; }
  .admin-user > span { display: none; }
  .stat-value { font-size: 1.5rem; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .5rem; }
}
@media print {
  .topbar, .site-footer, .no-print, .tabs, .hero, .sidebar, .admin-top, .verify-box { display: none !important; }
  body { background: #fff; }
  .cert-card { box-shadow: none; }
}
