/* Smart HUB SSO · ธีมเขียวมิ้นต์ · ไฟล์เดียว ไม่มีขั้น build (สเปก: docs/superpowers/specs/2026-11-13-ui-redesign-design.md) */

/* ---------- ฟอนต์ ---------- */
@font-face { font-family: "Anuphan"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/anuphan/anuphan-thai-400-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Anuphan"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/anuphan/anuphan-thai-600-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Anuphan"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/anuphan/anuphan-thai-700-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Anuphan"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/anuphan/anuphan-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Anuphan"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/anuphan/anuphan-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Anuphan"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/anuphan/anuphan-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- tokens (สว่าง) ---------- */
:root {
  --primary: #0f766e;
  --primary-strong: #115e59;
  --on-primary: #ffffff;
  --accent: #14b8a6;
  --tint: #ccfbef;
  --on-tint: #0f766e;
  --hero-from: #d9fbf1;
  --hero-to: #b9f3e4;
  --bg: #f2fbf8;
  --surface: #ffffff;
  --surface-2: #f6fbfa;
  --border: #e3efec;
  --text: #0f172a;
  --muted: #64748b;
  --danger: #b4232a;
  --danger-bg: #fff1f1;
  --danger-border: #ffd5d6;
  --warn: #8a4b06;
  --warn-bg: #fff8e8;
  --warn-border: #fde3a7;
  --ok: #0f6b4f;
  --ok-bg: #e9fbf3;
  --ok-border: #c5f0dd;
  --off-bg: #eef2f6;
  --off-text: #556274;
  --ring: rgba(20, 184, 166, .28);
  --focus: #0f766e;
  --input-border: #7a948e;
  --shadow: 0 6px 20px rgba(15, 118, 110, .07);
  --shadow-btn: 0 6px 14px rgba(15, 118, 110, .25);
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 18px;
  --font: "Anuphan", system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif;
  color-scheme: light;
}

/* ---------- tokens (มืด) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #2dd4bf;
    --primary-strong: #5eead4;
    --on-primary: #042f2b;
    --accent: #2dd4bf;
    --tint: #123d37;
    --on-tint: #7ff0dc;
    --hero-from: #0f2f2a;
    --hero-to: #134a42;
    --bg: #0b1715;
    --surface: #12221f;
    --surface-2: #0f1d1a;
    --border: #1f3532;
    --text: #e6f2ef;
    --muted: #93aaa5;
    --danger: #ffb4b6;
    --danger-bg: #3a1416;
    --danger-border: #5c1f22;
    --warn: #fcd38a;
    --warn-bg: #33240a;
    --warn-border: #5a4012;
    --ok: #9ff0cd;
    --ok-bg: #0f2e22;
    --ok-border: #1b4a37;
    --off-bg: #1b2b28;
    --off-text: #93aaa5;
    --ring: rgba(45, 212, 191, .35);
    --focus: #2dd4bf;
    --input-border: #5f7f79;
    --shadow: 0 6px 20px rgba(0, 0, 0, .35);
    --shadow-btn: 0 6px 14px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--primary); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
img, svg { display: block; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; word-break: break-all; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 18px; }
.mt-5 { margin-top: 28px; }
.center { text-align: center; }
.note-pad { padding: 12px 14px 0; }
.stack > * + * { margin-top: 12px; }
.spacer { flex: 1; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1.5px solid transparent; font: 700 1rem/1.25 var(--font); cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); font-weight: 600; }
.btn-secondary:hover { border-color: var(--accent); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { border-color: var(--danger); }
.btn-link { background: none; border: 0; min-height: 0; padding: 0; color: var(--primary); font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-block { width: 100%; }
.btn-lg { min-height: 48px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.mb { margin-bottom: 16px; }

/* ---------- การ์ด / แจ้งเตือน / ป้าย ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.card-flush { padding: 0; overflow: hidden; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 700; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: .95rem; }
.alert .icon { margin-top: 2px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.flash { display: grid; gap: 10px; margin-bottom: 16px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-off { background: var(--off-bg); color: var(--off-text); }
.badge-bad { background: var(--danger-bg); color: var(--danger); }
.badge-tint { background: var(--tint); color: var(--on-tint); }

/* ---------- ฟอร์ม ---------- */
.field + .field { margin-top: 14px; }
.label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; }
.input, .textarea, .select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--input-border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: 400 1rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 88px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--ring); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 76px; }
.reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--primary); font: 600 .9rem var(--font); cursor: pointer; }
.hint { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.field-error { margin-top: 6px; font-size: .85rem; color: var(--danger); }
.meter { height: 6px; margin-top: 8px; border-radius: 9px; background: var(--off-bg); overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .2s; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.switch { position: relative; flex: none; width: 40px; height: 24px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--off-bg); border: 1px solid var(--border); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.icon-picker label { position: relative; }
.icon-picker input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.icon-picker span { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: var(--radius-sm); border: 1.5px solid var(--input-border); background: var(--surface); color: var(--muted); }
.icon-picker input:checked + span { border-color: var(--accent); background: var(--tint); color: var(--on-tint); box-shadow: 0 0 0 3px var(--ring); }
.icon-picker input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- แบรนด์ / ไอคอนบริการ ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 2px 8px rgba(15, 23, 42, .14); }
.brand-sm img { width: 32px; height: 32px; border-radius: 10px; }
.brand b { display: block; font-size: 1rem; line-height: 1.2; }
.brand small { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
.hero .brand small { color: var(--on-tint); }
.svc-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; border-radius: 14px; background: linear-gradient(135deg, #0d9488, #0f766e); color: #fff; }
.svc-icon .icon { width: 24px; height: 24px; }
.svc-icon-sm { width: 34px; height: 34px; border-radius: 10px; }
.svc-icon-sm .icon { width: 18px; height: 18px; }
.svc-icon-off { background: var(--off-bg); color: var(--off-text); }
.svc-icon-c-blue { background: linear-gradient(135deg, #1e40af, #1d4ed8); }
.svc-icon-c-violet { background: linear-gradient(135deg, #5b21b6, #6d28d9); }
.svc-icon-c-orange { background: linear-gradient(135deg, #b45309, #c2410c); }
.svc-icon-c-rose { background: linear-gradient(135deg, #be123c, #9f1239); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--surface); color: var(--primary); font-weight: 700; box-shadow: 0 1px 4px rgba(15, 23, 42, .1); }
.avatar-tint { background: var(--tint); color: var(--on-tint); box-shadow: none; }

/* ---------- ฝั่งนักเรียน ---------- */
.auth { position: relative; max-width: 440px; margin: 0 auto; padding: 28px 18px 40px; }
.auth::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 320px; z-index: -1; background: radial-gradient(120% 90% at 0% 0%, var(--hero-from) 0%, transparent 70%); }
.auth-title { margin-top: 26px; font-size: 1.6rem; font-weight: 700; }
.consent-title { text-align: center; font-size: 1.3rem; }
.auth-sub { margin-top: 4px; color: var(--muted); }
.auth .card { margin-top: 20px; }
.auth-foot { margin-top: 28px; text-align: center; font-size: .8rem; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 6px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.option:hover { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.option:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.option-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--tint); color: var(--on-tint); }
.option b { display: block; }
.option small { color: var(--muted); }
.option + form, form + form .option { margin-top: 10px; }
.go { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--tint); color: var(--on-tint); }
.hero { padding: 18px 18px 54px; background: linear-gradient(160deg, var(--hero-from), var(--hero-to)); border-radius: 0 0 26px 26px; }
.hero-inner, .portal { max-width: 720px; margin: 0 auto; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.greet { margin-top: 18px; font-size: .9rem; color: var(--on-tint); }
.hero-name { font-size: 1.5rem; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); background: color-mix(in srgb, var(--surface) 78%, transparent); color: var(--on-tint); font-size: .85rem; font-weight: 600; }
.chip .icon { width: 16px; height: 16px; }
.portal { padding: 0 18px 40px; margin-top: -38px; }
.services { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .services { grid-template-columns: 1fr 1fr; } }
/* ธีมสีบริการ (ขาวบนสีผ่าน 4.5:1 ทั้งสองปลาย) */
.swatch.c-teal, .svc-card.c-teal { --g1: #115e59; --g2: #0f766e; background: linear-gradient(135deg, var(--g1), var(--g2)); --cta: var(--g1); }
.swatch.c-blue, .svc-card.c-blue { --g1: #1e40af; --g2: #1d4ed8; background: linear-gradient(135deg, var(--g1), var(--g2)); --cta: var(--g1); }
.swatch.c-violet, .svc-card.c-violet { --g1: #5b21b6; --g2: #6d28d9; background: linear-gradient(135deg, var(--g1), var(--g2)); --cta: var(--g1); }
.swatch.c-orange, .svc-card.c-orange { --g1: #b45309; --g2: #c2410c; background: linear-gradient(135deg, var(--g1), var(--g2)); --cta: var(--g1); }
.swatch.c-rose, .svc-card.c-rose { --g1: #be123c; --g2: #9f1239; background: linear-gradient(135deg, var(--g1), var(--g2)); --cta: var(--g1); }
.svc-card { position: relative; display: flex; flex-direction: column; gap: 6px; overflow: hidden; padding: 18px; border-radius: 20px; color: #fff; box-shadow: 0 8px 20px rgba(15, 23, 42, .18); font-weight: 400; }
.svc-card::after { content: ""; position: absolute; top: -34px; right: -34px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none; }
a.svc-card { transition: transform .15s, box-shadow .15s; }
a.svc-card:hover { text-decoration: none; color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(15, 23, 42, .3); }
.services > .svc-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.svc-card .svc-icon { width: 52px; height: 52px; margin-bottom: 6px; background: rgba(255, 255, 255, .2); }
.svc-card .svc-icon .icon { width: 28px; height: 28px; }
.svc-name { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.svc-desc { font-size: .8125rem; line-height: 1.45; color: #fff; }
.svc-cta { display: block; margin-top: 12px; padding: 11px 14px; border-radius: 12px; background: #fff; color: var(--cta); font-weight: 700; font-size: .9375rem; text-align: center; }
.svc-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.section-title { margin: 26px 2px 10px; font-size: .95rem; font-weight: 700; color: var(--muted); }
.svc { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--border); border-radius: var(--radius-lg); background: transparent; color: var(--muted); font-weight: 400; }
.svc b { display: block; font-size: 1.05rem; color: var(--text); }
.svc small { display: block; color: var(--muted); font-size: .85rem; }
.soon { margin-left: auto; }
.color-picker { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0; }
.color-picker label { position: relative; }
.color-picker input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch { display: block; width: 40px; height: 40px; border-radius: 50%; border: 2px solid transparent; }
.color-picker input:checked + .swatch { outline: 3px solid var(--text); outline-offset: 2px; }
.color-picker input:focus-visible + .swatch { outline: 3px solid var(--focus); outline-offset: 2px; }
.portal .alert { margin-bottom: 12px; }
.menu-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; padding: 0 4px; }
.menu-links form { display: inline; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); }
.consent-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }
.consent-head img { width: 46px; height: 46px; border-radius: 14px; }
.consent-head .swap { color: var(--muted); }
.who { display: flex; align-items: center; gap: 12px; }
.scopes { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.scopes li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .95rem; }
.scopes .icon { color: var(--primary); margin-top: 2px; }
.actions { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- ฝั่งแอดมิน ---------- */
.admin-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.admin-logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; white-space: nowrap; }
.admin-logo img { width: 28px; height: 28px; border-radius: 8px; }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.admin-nav a:hover { text-decoration: none; color: var(--text); background: var(--surface-2); }
.admin-nav a[aria-current="page"] { background: var(--tint); color: var(--on-tint); }
.admin-nav a:focus-visible, .table-wrap :focus-visible, .card-flush :focus-visible { outline-offset: -3px; }
.admin-nav .icon { width: 18px; height: 18px; }
.admin-user { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--muted); font-size: .9rem; }
.admin-user form { display: inline; }
.admin-main { max-width: 1120px; margin: 0 auto; padding: 22px 18px 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.page-head .crumb { color: var(--muted); font-weight: 600; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.stat { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--tint); color: var(--on-tint); }
.stat small { display: block; color: var(--muted); font-size: .8rem; }
.stat b { display: block; font-size: 1.5rem; line-height: 1.2; }
.stat b.stat-text { font-size: 1rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: .95rem; }
.table td.mono, .table td .badge, .table td b { white-space: nowrap; }
.table th { padding: 10px 12px; text-align: left; font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table .end { text-align: right; white-space: nowrap; }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell small { display: block; color: var(--muted); font-size: .8rem; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1.2fr 1fr; } }
.kv { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 10px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.secret { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: #0f172a; color: #a7f3d0; border: 1px solid var(--border); }
.secret code { font-size: .95rem; }
.searchbar { display: flex; gap: 8px; margin-bottom: 14px; }
.searchbar .input-wrap { flex: 1; }
.searchbar .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbar .input { padding-left: 40px; padding-right: 12px; }
.pager { display: flex; justify-content: space-between; gap: 10px; padding: 12px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.danger-zone { border-color: var(--danger-border); }

@media (max-width: 640px) {
  .admin-bar { flex-wrap: wrap; }
  .admin-nav { order: 3; flex-basis: 100%; }
  .admin-user .who-name { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  a.svc-card:hover { transform: none; }
}
@media (prefers-color-scheme: dark) {
  .svc-card { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 20px rgba(15, 23, 42, .18); }
  a.svc-card:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 14px 28px rgba(15, 23, 42, .3); }
}
