/* ---------- Phông chữ Be Vietnam Pro (lưu trên máy chủ, SIL OFL) ---------- */
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/be-vietnam-pro-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/be-vietnam-pro-vietnamese-500-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/be-vietnam-pro-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/be-vietnam-pro-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/be-vietnam-pro-vietnamese-700-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/be-vietnam-pro-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/be-vietnam-pro-vietnamese-800-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/be-vietnam-pro-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand: #0a5bb5;
  --brand-dark: #073e7e;
  --brand-deep: #052c5c;
  --brand-soft: #eaf2fc;
  --accent: #d62828;
  --gold: #f6c33b;
  --ok: #138a4b;
  --ok-soft: #e7f6ee;
  --warn: #a8640a;
  --warn-soft: #fff5de;
  --err: #c0262d;
  --err-soft: #fdeded;
  --text: #17222e;
  --muted: #5d6b7a;
  --line: #e4ebf3;
  --bg: #f7faff;
  --card: #ffffff;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 35, 65, .06);
  --shadow: 0 1px 2px rgba(15, 35, 65, .04), 0 10px 30px rgba(30, 80, 150, .07);
  --shadow-lg: 0 4px 10px rgba(15, 35, 65, .08), 0 18px 40px rgba(15, 35, 65, .12);
  --font: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3, h4 { letter-spacing: -.01em; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Header ---------- */
.topbar { background: linear-gradient(90deg, var(--brand), #2f86e0); color: #e8f2ff; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; flex-wrap: wrap; }
.topbar b { color: #fff; }
.site-header { background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 3px solid var(--accent); box-shadow: 0 4px 18px rgba(15, 35, 65, .06); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { width: 88px; height: 88px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .12)); transition: transform .25s; }
.brand:hover img { transform: rotate(-4deg) scale(1.03); }
.brand-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.brand-org { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: .4px; text-transform: uppercase; }
.brand-name { font-size: 22px; font-weight: 800; color: var(--brand-dark); line-height: 1.25; text-transform: uppercase; }
.nav { margin-left: auto; display: flex; gap: 6px; }
.nav a { text-decoration: none; color: var(--text); font-weight: 600; padding: 10px 16px; border-radius: 999px; white-space: nowrap; transition: background .15s, color .15s; }
.nav a:hover { background: var(--brand-soft); color: var(--brand); }
.nav a[aria-current="page"] { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: 0 4px 12px rgba(10, 91, 181, .3); }
.nav-toggle { display: none; margin-left: auto; background: var(--brand-soft); border: 0; border-radius: 12px; padding: 10px 14px; font-size: 20px; color: var(--brand); cursor: pointer; }

/* ---------- Hero (nền sáng) ---------- */
.hero { color: var(--text); position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 88% 15%, rgba(246, 195, 59, .28), transparent 32%),
    radial-gradient(circle at 5% 95%, rgba(214, 40, 40, .10), transparent 35%),
    radial-gradient(circle at 60% 120%, rgba(47, 134, 224, .18), transparent 45%),
    linear-gradient(135deg, #e6f1ff 0%, #f6faff 50%, #fff8e8 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .7;
  background-image: radial-gradient(rgba(10, 91, 181, .10) 1px, transparent 1px); background-size: 22px 22px; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; background: var(--bg); clip-path: ellipse(75% 100% at 50% 100%); }
.hero .container { padding: 60px 0 96px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #d6e5f8; color: var(--brand-dark); padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; margin-bottom: 18px; box-shadow: 0 2px 8px rgba(10, 91, 181, .08); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(214, 40, 40, .15); }
.hero h1 { font-size: clamp(28px, 3.8vw, 46px); line-height: 1.18; margin: 0 0 16px; font-weight: 800; color: var(--brand-dark); }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 18px; color: #42566c; margin: 0 0 28px; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-panel { position: relative; background: rgba(255, 255, 255, .85); border: 1px solid #fff; border-radius: 24px; padding: 28px; backdrop-filter: blur(10px); box-shadow: 0 20px 50px rgba(30, 80, 150, .14); text-align: center; }
.hero-logo { width: 168px; height: 168px; margin: -4px auto 16px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: 0 0 0 8px #eaf3ff, 0 14px 30px rgba(30, 80, 150, .18); }
.hero-logo img { width: 148px; height: 148px; }
.hero-panel h2 { margin: 0 0 18px; font-size: 17px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; line-height: 1.4; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-stat { background: linear-gradient(180deg, #f3f8ff, #e9f2fe); border: 1px solid #d9e7f8; border-radius: 14px; padding: 14px 10px; }
.hero-stat + .hero-stat { background: linear-gradient(180deg, #fff9ec, #fff1d2); border-color: #f6e2b3; }
.hero-stat b { display: block; font-size: 30px; line-height: 1.1; font-weight: 800; color: var(--brand); }
.hero-stat + .hero-stat b { color: #c47f00; }
.hero-stat span { color: #4b5d71; font-size: 13.5px; line-height: 1.45; display: block; margin-top: 4px; }

.page-head { color: var(--text); position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid #e3edf9;
  background: radial-gradient(circle at 92% 0%, rgba(246, 195, 59, .25), transparent 30%), linear-gradient(135deg, #e6f1ff, #f7fbff 60%, #fff8e8); }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .7; background-image: radial-gradient(rgba(10, 91, 181, .10) 1px, transparent 1px); background-size: 22px 22px; }
.page-head .container { padding: 32px 0 36px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(23px, 3vw, 32px); font-weight: 800; color: var(--brand-dark); }
.page-head p { margin: 0; color: #42566c; }
.page-head .h1-sub { display: inline-block; margin-top: 6px; font-size: .62em; font-weight: 700; color: var(--accent); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--brand); text-decoration: none; border-bottom: 1px dashed rgba(10, 91, 181, .4); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 22px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: 0 4px 14px rgba(10, 91, 181, .28); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(10, 91, 181, .38); }
.btn-accent { background: var(--gold); color: #3a2900; box-shadow: 0 6px 18px rgba(246, 195, 59, .35); }
.btn-accent:hover { background: #ffd35a; }
.btn-ghost { background: #fff; color: var(--brand-dark); border: 1.5px solid #c9dcf3; box-shadow: 0 2px 8px rgba(10, 91, 181, .08); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: var(--brand-soft); color: var(--brand); }
.btn-light:hover { background: #d9e8f9; }
.btn-ok { background: linear-gradient(135deg, #18a05a, var(--ok)); color: #fff; box-shadow: 0 4px 14px rgba(19, 138, 75, .25); }
.btn-danger { background: var(--err-soft); color: var(--err); }
.btn-danger:hover { background: #f9d7d8; }
.btn-sm { padding: 7px 13px; font-size: 14px; border-radius: 9px; box-shadow: none; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Cards / sections ---------- */
main { padding-bottom: 56px; }
.section { padding: 44px 0 0; }
.hero + .section { padding-top: 8px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 26px; color: var(--brand-dark); font-weight: 800; position: relative; padding-left: 16px; }
.section-title h2::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 3px; background: linear-gradient(var(--accent), var(--gold)); }
.section-title p { margin: 4px 0 0; color: var(--muted); padding-left: 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-pad { padding: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.feature { padding: 30px; display: grid; grid-template-columns: 64px 1fr; gap: 6px 20px; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden; }
.feature::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--brand), #3d8fe6); }
.feature.alt::after { background: linear-gradient(90deg, var(--accent), var(--gold)); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfdcec; }
.feature .icon { grid-row: span 3; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #e3eefc, #cfe1f8); color: var(--brand); }
.feature.alt .icon { background: linear-gradient(135deg, #fdecec, #fbd9d3); color: var(--accent); }
.feature h3 { margin: 2px 0 0; font-size: 21px; color: var(--brand-dark); font-weight: 800; }
.feature p { margin: 0; color: var(--muted); }
.feature .go { margin-top: 8px; font-weight: 700; color: var(--brand); display: inline-flex; gap: 6px; transition: gap .2s; }
.feature:hover .go { gap: 12px; }
.feature.alt .go { color: var(--accent); }

/* ---------- Public list ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th, table.list td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: #f4f8fd; color: var(--brand-dark); font-weight: 700; white-space: nowrap; font-size: 13.5px; text-transform: uppercase; letter-spacing: .3px; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { transition: background .12s; }
table.list tbody tr:nth-child(even) { background: #fbfcfe; }
table.list tbody tr:hover { background: #f1f7ff; }
table.list .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.masked { font-weight: 600; letter-spacing: .4px; color: var(--brand-deep); }
.empty { text-align: center; color: var(--muted); padding: 36px !important; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.list-summary { display: flex; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fbfdff, #f5f9fe); border-radius: var(--radius) var(--radius) 0 0; font-size: 15px; }
.list-summary span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; }
.list-summary b { color: var(--brand-dark); }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.badge.moi { background: var(--warn-soft); color: var(--warn); }
.badge.da_xac_nhan { background: var(--brand-soft); color: var(--brand); }
.badge.da_kham { background: var(--ok-soft); color: var(--ok); }
.badge.huy { background: #eef0f3; color: #6b7480; }

/* ---------- Forms ---------- */
.form-layout { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.form-section { padding: 26px 28px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 0; }
.form-section h3 { margin: 0 0 18px; font-size: 18px; color: var(--brand-dark); display: flex; align-items: center; gap: 12px; font-weight: 700; }
.form-section h3 .n { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; font-size: 15px; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(10, 91, 181, .25); }
.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 20px; }
.fields.cols-3 { grid-template-columns: repeat(3, 1fr); }
.fields.cols-5 { grid-template-columns: repeat(5, 1fr); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 14.5px; color: #26384b; }
.field label .req { color: var(--err); }
.field .hint { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; padding: 12px 14px; border: 1.5px solid #d8e2ee; border-radius: 12px; background: #fff; color: var(--text); width: 100%; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b7c7d9; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(10, 91, 181, .14); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err); background: #fffafa; }
.field .error { color: var(--err); font-size: 13.5px; font-weight: 600; display: none; }
.field.has-error .error { display: block; }
.form-actions { padding: 20px 28px; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; background: #f8fafd; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.aside { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 16px; }
.aside .card { padding: 22px; }
.aside h4 { margin: 0 0 10px; color: var(--brand-dark); font-size: 16px; }
.aside ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.aside li { margin-bottom: 7px; }
.aside li::marker { color: var(--accent); }
.contact-line { display: flex; gap: 8px; align-items: center; font-size: 15px; margin-top: 6px; }
.aside-logo { display: flex; align-items: center; gap: 14px; }
.aside-logo img { width: 64px; height: 64px; }
.aside-logo b { color: var(--brand-dark); font-size: 15px; line-height: 1.35; }

.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; display: none; }
.alert.show { display: block; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #b8e3c9; }
.alert.err { background: var(--err-soft); color: var(--err); border: 1px solid #f3c2c4; }

.success { text-align: center; padding: 44px 24px; display: none; }
.success.show { display: block; animation: pop .35s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.success .tick { width: 80px; height: 80px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 14px; box-shadow: 0 0 0 10px rgba(19, 138, 75, .08); }
.success h2 { margin: 0 0 6px; color: var(--ok); font-weight: 800; }
.success .code { display: inline-block; margin: 10px 0 18px; font-size: 24px; font-weight: 800; letter-spacing: 2px; background: var(--brand-soft); color: var(--brand-dark); padding: 10px 22px; border-radius: 12px; border: 1.5px dashed #9fc0e6; }

.toast { position: fixed; right: 20px; bottom: 20px; background: #17222e; color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: .25s; z-index: 200; pointer-events: none; max-width: calc(100% - 40px); }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--err); }

/* ---------- Footer (nền sáng) ---------- */
.site-footer { background: linear-gradient(180deg, #eef5ff, #e3eefc); color: #4b5d71; padding: 40px 0 22px; font-size: 14.5px; border-top: 4px solid var(--accent); }
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: var(--brand-dark); margin: 0 0 12px; font-size: 15px; }
.site-footer a { color: var(--brand); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.copyright { border-top: 1px solid #d3e2f4; margin-top: 22px; padding-top: 16px; text-align: center; grid-column: 1 / -1; line-height: 1.7; color: var(--brand-dark); font-weight: 600; }
.foot-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.foot-brand img { width: 64px; height: 64px; background: #fff; border-radius: 50%; padding: 3px; box-shadow: 0 4px 12px rgba(30, 80, 150, .15); }
.foot-brand b { color: var(--brand-dark); text-transform: uppercase; font-size: 15px; }

/* ---------- Admin ---------- */
.admin-body { background: var(--bg); }
.login-wrap { min-height: calc(100vh - 130px); display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(circle at 20% 20%, #dbe8f8, transparent 40%), radial-gradient(circle at 80% 80%, #f9e1dc, transparent 40%); }
.login-card { width: min(430px, 100%); padding: 36px 34px; box-shadow: var(--shadow-lg); }
.login-card .logo { width: 116px; height: 116px; display: block; margin: 0 auto 14px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .15)); }
.login-card h1 { text-align: center; font-size: 22px; margin: 0 0 4px; color: var(--brand-dark); font-weight: 800; }
.login-card p.sub { text-align: center; color: var(--muted); margin: 0 0 22px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; margin-top: 6px; }

.admin-shell { display: none; }
.admin-shell.show { display: block; }
.admin-bar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.admin-bar .container { display: flex; gap: 6px; padding: 10px 0; align-items: center; flex-wrap: wrap; }
.tab { background: transparent; border: 0; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 999px; cursor: pointer; color: var(--muted); transition: background .15s, color .15s; }
.tab[aria-selected="true"] { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: 0 4px 12px rgba(10, 91, 181, .28); }
.tab:hover:not([aria-selected="true"]) { background: var(--brand-soft); color: var(--brand); }
.admin-user { margin-left: auto; display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.panel { display: none; padding-top: 26px; }
.panel.show { display: block; }
.kpi { padding: 20px 22px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--brand-soft); }
.kpi.k2::after { background: #fdecec; }
.kpi.k3::after { background: var(--ok-soft); }
.kpi span, .kpi b, .kpi small { position: relative; z-index: 1; }
.kpi span { color: var(--muted); font-size: 14px; font-weight: 600; }
.kpi b { display: block; font-size: 32px; color: var(--brand-dark); line-height: 1.2; margin-top: 6px; font-weight: 800; }
.kpi small { color: var(--muted); }
.kpi.k2 b { color: var(--accent); }
.kpi.k3 b { color: var(--ok); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; padding: 18px; border-bottom: 1px solid var(--line); }
.toolbar .field { min-width: 150px; }
.toolbar .field input, .toolbar .field select { padding: 10px 12px; }
.toolbar .grow { flex: 1; min-width: 220px; }
.toolbar .spacer { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
table.list td.actions { white-space: nowrap; }
table.list select.status { font: inherit; font-size: 14px; padding: 6px 9px; border-radius: 9px; border: 1px solid var(--line); background: #fff; }
details.row-detail summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 4px 16px; font-size: 14px; margin-top: 8px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0 0 4px; font-weight: 600; }

/* ---------- Tiện ích (thay cho style nội tuyến do CSP) ---------- */
.req-light { color: var(--accent); }
.center { text-align: center; }
.card-title { margin-top: 0; color: var(--brand-dark); }
.muted { color: var(--muted); margin-top: 0; }
.mt20 { margin-top: 22px; }
.mb { margin-bottom: 12px; }
.narrow { max-width: 520px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hint-note { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .brand img { width: 72px; height: 72px; }
  .brand-name { font-size: 19px; }
}
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; padding-bottom: 96px; }
  .hero-panel { max-width: 460px; }
  .form-layout { grid-template-columns: 1fr; }
  .aside { position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .fields.cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0, 0, 0, .08); }
  .nav.open { display: flex; }
  .site-header .container { position: relative; padding: 10px 0; }
  .brand { gap: 10px; }
  .brand img { width: 60px; height: 60px; }
  .brand-name { font-size: 15px; }
  .brand-org { font-size: 11px; }
  .hero .container { padding: 40px 0 84px; gap: 28px; }
  .hero p { font-size: 16px; }
  .hero-logo { width: 128px; height: 128px; }
  .hero-logo img { width: 112px; height: 112px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 52px 1fr; padding: 22px; }
  .feature .icon { width: 52px; height: 52px; border-radius: 14px; }
  .fields, .fields.cols-3 { grid-template-columns: 1fr; }
  .fields.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { grid-template-columns: 1fr; }
  .card-pad, .form-section { padding: 20px; }
  .form-actions { padding: 16px 20px; }
  .topbar .hide-sm { display: none; }
  .section-title h2 { font-size: 22px; }
  /* Danh sách công khai: mỗi dòng thành một thẻ gọn */
  #public-list thead { display: none; }
  #public-list tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  #public-list tbody tr:last-child { border-bottom: 0; }
  #public-list tbody td { padding: 0; border: 0; text-align: left; }
  #public-list tbody td:nth-child(1) { display: none; }
  #public-list tbody td:nth-child(2) { grid-column: 1; grid-row: 1; }
  #public-list tbody td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
  #public-list tbody td:nth-child(4) b { display: inline-block; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 2px 10px; font-size: 14px; }
  #public-list tbody td:nth-child(4) b::after { content: " người"; font-weight: 600; }
  #public-list tbody td:nth-child(3) { grid-column: 1; grid-row: 2; }
  #public-list tbody td:nth-child(5) { grid-column: 2; grid-row: 2; text-align: right; color: var(--muted); font-size: 13px; }
  #public-list tbody td.empty { grid-column: 1 / -1; display: block; }
  .list-summary span { flex: 1 1 100%; text-align: center; }

  /* Đầu trang gọn hơn */
  .brand-org { font-size: 10.5px; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-name { font-size: 14px; line-height: 1.3; }
  .brand img { width: 56px; height: 56px; }
  .topbar .container { justify-content: center; text-align: center; }

  /* Nút to, dễ bấm */
  .hero-actions .btn { flex: 1 1 100%; }
  .hero h1 { font-size: 27px; }
  .eyebrow { font-size: 12.5px; }
  .section-title .btn { width: 100%; }
  .form-actions .btn { flex: 1; }
  .page-head .container { padding: 24px 0 26px; }
  .toolbar .spacer { margin-left: 0; width: 100%; }
  .toolbar .spacer .btn { flex: 1; }
  .toolbar .field { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .toolbar .grow { flex-basis: 100%; }
  .btn { white-space: nowrap; }
  .admin-bar .container { gap: 4px; }
  .admin-user { margin-left: 0; width: 100%; justify-content: space-between; }
  .tab { padding: 8px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .topbar, .site-footer, .nav-toggle, .form-actions, .admin-bar { display: none !important; }
}

.pad-x { padding: 12px 18px 0; margin: 0; }
.inline-input { font: inherit; width: 100%; min-width: 220px; padding: 7px 10px; border: 1.5px solid transparent; border-radius: 9px; background: transparent; }
.inline-input:hover { border-color: var(--line); }
.inline-input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(10, 91, 181, .15); }
