/* Cổng thông tin Khu phố 22 — giao diện cổng công khai.
   Bố cục: báo địa phương (tiêu đề serif, ảnh lớn) + quầy dịch vụ cư dân (phản ánh, tra cứu, lịch). */
:root {
  --blue-900: #06305f;
  --blue-800: #083f7c;
  --blue-700: #0b4f9c;
  --blue-500: #2f7fd6;
  --blue-100: #d6e6f8;
  --blue-50: #ebf3fc;
  --red: #c8102e;
  --red-700: #a00c24;
  --red-50: #fdecef;
  --gold: #f2b705;
  --gold-50: #fff6d9;
  --green: #17803d;
  --green-50: #e6f5ec;
  --amber: #9a5b00;
  --amber-50: #fff1d6;
  --ink: #14202e;
  --ink-2: #33414f;
  --muted: #5b6878;
  --line: #dbe3ec;
  --bg: #f4f7fb;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(6, 48, 95, .06), 0 8px 24px rgba(6, 48, 95, .07);
  --font: "Be Vietnam Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Lora", "Noto Serif", Georgia, "Times New Roman", serif;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16.5px; line-height: 1.65; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
svg.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-700); color: #fff; }
.btn-primary:hover { background: var(--blue-900); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-700); color: #fff; }
.btn-gold { background: var(--gold); color: #3a2b00; }
.btn-gold:hover { background: #ffd04a; color: #3a2b00; }
.btn-line { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-line:hover { border-color: var(--blue-700); color: var(--blue-700); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: #fff; color: var(--blue-900); }
.btn-sm { padding: 7px 14px; font-size: .86rem; }

/* ---------- Nhãn ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .02em; line-height: 1.7; white-space: nowrap; background: var(--blue-50); color: var(--blue-700); }
.badge-urgent { background: var(--red); color: #fff; }
.badge-important { background: var(--amber-50); color: var(--amber); }
.badge-ok { background: var(--green-50); color: var(--green); }
.badge-muted { background: #eef1f5; color: var(--muted); }
.badge-gold { background: var(--gold-50); color: #7a5a00; }
.cat { font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--red); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: .86rem; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Đầu trang ---------- */
.topbar { background: var(--blue-900); color: #c9dcf2; font-size: .84rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding-block: 7px; }
.topbar a { color: #fff; }
.topbar a:hover { color: var(--gold); }
.topbar-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.topbar-links a, .topbar-info span { display: inline-flex; align-items: center; gap: 6px; }
.topbar-info { display: flex; gap: 18px; flex-wrap: wrap; }

.masthead { background: #fff; }
.masthead .wrap { display: flex; align-items: center; gap: 18px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: inherit; min-width: 0; }
.brand:hover { color: inherit; }
.brand-logo { width: 62px; height: 62px; flex: none; }
.brand-name { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: .01em; color: var(--blue-700); line-height: 1.15; text-transform: uppercase; }
.brand-name b { color: var(--red); font-weight: 800; }
.brand-sub { display: block; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.masthead-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search { display: flex; align-items: center; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 16px; width: 320px; max-width: 100%; }
.search:focus-within { border-color: var(--blue-500); background: #fff; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 7px 0; outline: none; font-size: .93rem; }
.search button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--blue-700); color: #fff; cursor: pointer; display: grid; place-items: center; }
.search button:hover { background: var(--blue-900); }

.nav { background: var(--blue-700); position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 10px rgba(6, 48, 95, .18); }
.nav .wrap { display: flex; align-items: stretch; }
.nav-list { display: flex; flex-wrap: wrap; flex: 1; min-width: 0; }
.nav-list.is-fit { flex-wrap: nowrap; } /* portal.js gom mục không đủ chỗ vào “Thêm” nên menu luôn một dòng */
.nav-list a { display: block; padding: 14px 13px; color: #fff; font-weight: 600; font-size: .92rem; position: relative; white-space: nowrap; }
.nav-list a:hover { background: var(--blue-800); color: #fff; }
.nav-list a.is-active { background: var(--blue-900); }
.nav-list a.is-active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 0; height: 3px; background: var(--gold); border-radius: 3px 3px 0 0; }
.nav-toggle { display: none; align-items: center; gap: 8px; background: none; border: 0; color: #fff; padding: 13px 0; font-weight: 700; cursor: pointer; }

.ticker { background: var(--red-50); border-bottom: 1px solid #f4c9d0; }
.ticker .wrap { display: flex; align-items: center; gap: 14px; padding-block: 9px; }
.ticker-label { display: inline-flex; align-items: center; gap: 6px; background: var(--red); color: #fff; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.ticker-items { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.ticker-items::-webkit-scrollbar { display: none; }
.ticker-items a { color: #7d0a1c; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.ticker-items a:hover { text-decoration: underline; }

/* ---------- Khung trang ---------- */
main { padding-block: 26px 64px; }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); position: relative; }
.section-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 3px; background: var(--red); }
.section-head h2 { font-size: 1.45rem; font-weight: 800; color: var(--blue-900); }
.section-head .more { font-size: .9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 22px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 30px; align-items: start; }
.stack { display: grid; gap: 22px; }
.widget-title { font-size: 1.02rem; font-weight: 800; color: var(--blue-900); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.widget-title a { font-size: .84rem; font-weight: 600; text-transform: none; letter-spacing: 0; }

.breadcrumb { font-size: .87rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #9aa7b6; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue-700); }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 2rem; font-weight: 800; color: var(--blue-900); }
.page-head p { color: var(--muted); max-width: 70ch; margin-top: 6px; }
.banner-head { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--blue-900); color: #fff; margin-bottom: 26px; }
.banner-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.banner-head .inner { position: relative; padding: 38px 34px; background: linear-gradient(90deg, rgba(6, 48, 95, .92), rgba(6, 48, 95, .35)); }
.banner-head h1 { color: #fff; font-size: 2.1rem; font-weight: 800; }
.banner-head p { color: #d6e6f8; max-width: 62ch; margin-top: 8px; }
.banner-head .breadcrumb, .banner-head .breadcrumb a { color: #b9d2ee; }

/* ---------- Trang chủ: banner + thông báo ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 24px; }
.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--blue-900); min-height: 440px; box-shadow: var(--shadow); }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-cap { position: absolute; inset: auto 0 0 0; padding: 90px 34px 34px; background: linear-gradient(transparent, rgba(4, 22, 46, .9)); color: #fff; }
.slide-cap .cat { color: var(--gold); }
.slide-cap h2 { font-family: var(--serif); font-size: 2.05rem; font-weight: 700; color: #fff; margin: 8px 0 8px; max-width: 22ch; }
.slide-cap p { color: #dbe7f5; max-width: 58ch; margin-bottom: 16px; }
.slider-nav { position: absolute; right: 22px; bottom: 26px; display: flex; align-items: center; gap: 8px; z-index: 2; }
.slider-nav button { border: 0; cursor: pointer; padding: 0; }
.dot { width: 26px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .4); }
.dot.is-active { background: var(--gold); }
.arrow { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; margin-left: 6px; }
.arrow:hover { background: #fff; color: var(--blue-900); }

.notice-panel { display: flex; flex-direction: column; }
.notice-panel .head { background: var(--blue-900); color: #fff; padding: 15px 20px; border-radius: var(--radius) var(--radius) 0 0; display: flex; justify-content: space-between; align-items: center; }
.notice-panel .head h2 { color: #fff; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 8px; }
.notice-panel .head a { color: var(--gold); font-size: .85rem; font-weight: 600; }
.notice-list { padding: 6px 20px 10px; flex: 1; }
.notice-item { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-item h3 { font-size: .97rem; font-weight: 600; line-height: 1.45; }
.notice-item h3 a { color: var(--ink); }
.notice-item h3 a:hover { color: var(--blue-700); }
.notice-item .meta { margin-top: 5px; font-size: .8rem; }
.datebox { width: 54px; height: 58px; border-radius: 10px; background: var(--blue-50); color: var(--blue-700); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; font-variant-numeric: tabular-nums; }
.datebox b { font-size: 1.4rem; font-weight: 800; }
.datebox span { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.datebox.is-red { background: var(--red); color: #fff; }
.datebox.is-gold { background: var(--gold-50); color: #7a5a00; }

/* ---------- Dịch vụ cư dân ---------- */
.services { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.service { background: #fff; border-radius: var(--radius); padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); box-shadow: var(--shadow); border: 1.5px solid transparent; transition: border-color .15s, transform .15s; }
.service:hover { border-color: var(--blue-500); transform: translateY(-3px); color: var(--ink); }
.service .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; }
.service .ico svg { width: 24px; height: 24px; }
.service.is-main { background: var(--red); color: #fff; }
.service.is-main .ico { background: rgba(255, 255, 255, .18); color: #fff; }
.service.is-main small { color: #ffd9de; }
.service b { font-size: 1rem; line-height: 1.3; }
.service small { color: var(--muted); font-size: .82rem; line-height: 1.4; }

/* ---------- Dải phản ánh ---------- */
.fb-band { margin-top: 44px; background: var(--blue-900); background-image: radial-gradient(circle at 92% 0%, rgba(47, 127, 214, .55), transparent 46%), radial-gradient(circle at 0% 100%, rgba(200, 16, 46, .35), transparent 40%); color: #fff; border-radius: var(--radius); padding: 38px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.fb-band h2 { color: #fff; font-family: var(--serif); font-size: 1.85rem; margin: 8px 0 10px; }
.fb-band p { color: #cfe0f4; max-width: 52ch; }
.fb-band .cat { color: var(--gold); }
.lookup { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.lookup input { flex: 1 1 220px; min-width: 0; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; letter-spacing: .03em; color: var(--ink); }
.lookup .hint { flex-basis: 100%; font-size: .82rem; color: #a9c5e6; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; counter-reset: step; }
.flow li { counter-increment: step; text-align: center; font-size: .84rem; font-weight: 600; color: #dbe7f5; position: relative; padding-top: 46px; }
.flow li::before { content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--blue-900); font-weight: 800; display: grid; place-items: center; z-index: 1; }
.flow li + li::after { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: rgba(255, 255, 255, .3); }
.fb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.fb-stat { background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; padding: 14px 16px; }
.fb-stat b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--gold); }
.fb-stat span { font-size: .82rem; color: #cfe0f4; }

/* ---------- Tin ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; align-items: center; }
.thumb { display: block; overflow: hidden; border-radius: var(--radius); background: var(--blue-100); aspect-ratio: 16 / 10; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
a.thumb:hover img, .news-card:hover .thumb img, .news-row:hover .thumb img { transform: scale(1.045); }
.lead h3 { font-family: var(--serif); font-size: 1.75rem; margin: 8px 0 10px; }
.lead h3 a, .news-card h3 a, .news-row h3 a { color: var(--ink); }
.lead h3 a:hover, .news-card h3 a:hover, .news-row h3 a:hover { color: var(--blue-700); }
.lead p { color: var(--ink-2); margin-bottom: 12px; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 24px; }
.news-card { display: flex; flex-direction: column; gap: 12px; }
.news-card h3 { font-family: var(--serif); font-size: 1.14rem; line-height: 1.4; margin: 4px 0 6px; }
.news-card p { color: var(--muted); font-size: .92rem; margin-bottom: 8px; }
.news-rows { display: grid; gap: 22px; }
.news-row { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.news-row:last-child { border-bottom: 0; padding-bottom: 0; }
.news-row h3 { font-family: var(--serif); font-size: 1.32rem; margin: 6px 0 8px; }
.news-row p { color: var(--ink-2); font-size: .95rem; margin-bottom: 10px; }
.mini-list { display: grid; gap: 14px; }
.mini { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 13px; align-items: center; }
.mini .thumb { aspect-ratio: 4 / 3; border-radius: 10px; }
.mini h4 { font-size: .93rem; font-weight: 600; line-height: 1.42; }
.mini h4 a { color: var(--ink); }
.mini h4 a:hover { color: var(--blue-700); }
.mini .meta { font-size: .78rem; margin-top: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--ink-2); font-size: .88rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--blue-700); color: var(--blue-700); }
.chip.is-active { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.chip small { font-weight: 500; opacity: .75; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1.5px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; }
.pager a:hover { border-color: var(--blue-700); color: var(--blue-700); }
.pager .is-active { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }

/* ---------- Lịch ---------- */
.event-item { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.event-item:last-child { border-bottom: 0; padding-bottom: 0; }
.event-item:first-child { padding-top: 0; }
.event-item h3, .event-item h4 { font-size: .97rem; font-weight: 600; line-height: 1.4; }
.event-item a { color: var(--ink); }
.event-item a:hover { color: var(--blue-700); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-head h2 { font-size: 1.3rem; color: var(--blue-900); }
.seg { display: inline-flex; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 16px; border-radius: 999px; font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--ink-2); }
.seg button.is-active { background: var(--blue-700); color: #fff; }
.cal-scroll { overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 700px; }
.cal .dow { padding: 9px 10px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 112px; padding: 7px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; background: #fff; }
.cal .day.is-out { background: #f8fafc; color: #a3aebb; }
.cal .day .n { font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.is-today .n { background: var(--red); color: #fff; }
.cal .ev { display: block; font-size: .78rem; line-height: 1.35; padding: 4px 7px; border-radius: 6px; background: var(--blue-50); color: var(--blue-900); font-weight: 600; border-left: 3px solid var(--blue-700); }
.cal .ev:hover { background: var(--blue-100); color: var(--blue-900); }
.cal .ev.t-green { background: var(--green-50); border-left-color: var(--green); color: #0d5226; }
.cal .ev.t-red { background: var(--red-50); border-left-color: var(--red); color: #7d0a1c; }
.cal .ev.t-gold { background: var(--gold-50); border-left-color: var(--gold); color: #5c4400; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .85rem; color: var(--muted); margin-top: 14px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; font-size: .84rem; font-variant-numeric: tabular-nums; }
.mini-cal .dow { font-size: .7rem; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.mini-cal span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; position: relative; }
.mini-cal .is-out { color: #b3bdc9; }
.mini-cal .has-ev { background: var(--blue-50); color: var(--blue-700); font-weight: 700; }
.mini-cal .is-today { background: var(--red); color: #fff; font-weight: 700; }

/* ---------- Tài liệu ---------- */
.doc-list { display: grid; }
.doc { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc h3, .doc h4 { font-size: .98rem; font-weight: 600; line-height: 1.42; }
.doc h3 a, .doc h4 a { color: var(--ink); }
.doc h3 a:hover, .doc h4 a:hover { color: var(--blue-700); }
.ftype { width: 44px; height: 52px; border-radius: 7px; background: var(--red-50); color: var(--red); font-size: .68rem; font-weight: 800; display: grid; place-items: end center; padding-bottom: 7px; position: relative; letter-spacing: .04em; }
.ftype::before { content: ""; position: absolute; top: 0; right: 0; border: 7px solid; border-color: var(--card) var(--card) currentColor currentColor; opacity: .35; border-radius: 0 0 0 4px; }
.ftype.docx { background: var(--blue-50); color: var(--blue-700); }
.ftype.xlsx { background: var(--green-50); color: var(--green); }

/* ---------- Thư viện ảnh ---------- */
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 190px; gap: 12px; }
.mosaic a { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--blue-100); display: block; color: #fff; }
.mosaic a:first-child { grid-column: span 2; grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mosaic a:hover img { transform: scale(1.05); }
.mosaic .cap { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(4, 22, 46, .88)); }
.mosaic .cap b { display: block; font-size: 1rem; line-height: 1.35; }
.mosaic a:first-child .cap b { font-family: var(--serif); font-size: 1.4rem; }
.mosaic .cap span { font-size: .8rem; color: #cfe0f4; }
.album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.album { color: var(--ink); display: flex; flex-direction: column; gap: 12px; }
.album .thumb { position: relative; aspect-ratio: 4 / 3; }
.album .count { position: absolute; right: 10px; bottom: 10px; background: rgba(4, 22, 46, .78); color: #fff; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; display: inline-flex; gap: 5px; align-items: center; }
.album h3 { font-size: 1.08rem; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.photo-grid button { border: 0; padding: 0; cursor: zoom-in; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--blue-100); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.photo-grid button:hover img { transform: scale(1.06); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(4, 14, 28, .94); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: #fff; }
.lightbox[hidden] { display: none; }
.lightbox .bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; font-size: .9rem; }
.lightbox .stage { display: grid; place-items: center; padding: 0 64px; min-height: 0; }
.lightbox .stage img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 8px; }
.lightbox .capt { text-align: center; padding: 14px 20px 22px; color: #cfe0f4; font-size: .92rem; }
.lightbox button { background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: #fff; color: var(--blue-900); }
.lightbox .prev, .lightbox .next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .prev { left: 14px; }
.lightbox .next { right: 14px; }

/* ---------- Bài viết ---------- */
.article-head { max-width: 860px; }
.article-head h1 { font-family: var(--serif); font-size: 2.45rem; line-height: 1.22; margin: 10px 0 14px; }
.article-head .sapo { font-size: 1.14rem; color: var(--ink-2); font-weight: 500; line-height: 1.6; }
.byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share { display: flex; gap: 8px; }
.share a, .share button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--blue-700); color: var(--blue-700); }
figure { margin: 0; }
figure img { width: 100%; border-radius: var(--radius); }
figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; text-align: center; font-style: italic; }
.prose { font-size: 1.08rem; line-height: 1.8; color: #1d2a39; display: grid; gap: 20px; }
.prose h2 { font-family: var(--serif); font-size: 1.5rem; margin-top: 10px; }
.prose ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 6px; }
.prose blockquote { margin: 0; padding: 18px 24px; background: var(--blue-50); border-radius: var(--radius); font-family: var(--serif); font-size: 1.2rem; font-style: italic; color: var(--blue-900); }
.prose blockquote cite { display: block; margin-top: 8px; font-family: var(--font); font-size: .88rem; font-style: normal; font-weight: 600; color: var(--muted); }
.fig-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fig-pair img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.fig-pair > div { display: grid; gap: 6px; }
.fig-pair em { font-size: .86rem; color: var(--muted); text-align: center; }
.factbox { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: #fff; font-size: .98rem; }
.factbox h3 { font-size: .86rem; text-transform: uppercase; letter-spacing: .07em; color: var(--red); margin-bottom: 10px; }
.factbox dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; }
.factbox dt { color: var(--muted); }
.factbox dd { margin: 0; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags a { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 11px; font-size: .85rem; color: var(--ink-2); }
.attach { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1.5px dashed var(--blue-100); border-radius: var(--radius); background: #fff; }
.attach div { flex: 1; min-width: 0; }
.attach b { display: block; font-size: .97rem; }

/* ---------- Thông báo ---------- */
.notice-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.notice-row:last-child { border-bottom: 0; }
.notice-row.is-urgent { background: linear-gradient(90deg, var(--red-50), transparent 60%); }
.notice-row h3 { font-size: 1.06rem; font-weight: 700; margin-bottom: 4px; }
.notice-row h3 a { color: var(--ink); }
.notice-row h3 a:hover { color: var(--blue-700); }
.notice-row p { color: var(--muted); font-size: .92rem; margin-bottom: 6px; }
.notice-row.is-expired h3 a, .notice-row.is-expired p { color: var(--muted); }
.doc-paper { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px 52px; }
.doc-paper .letterhead { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; text-align: center; font-size: .9rem; font-weight: 700; text-transform: uppercase; line-height: 1.5; padding-bottom: 18px; }
.doc-paper .letterhead small { display: block; font-weight: 500; text-transform: none; font-style: italic; margin-top: 8px; }
.doc-paper .letterhead u { text-underline-offset: 5px; }
.doc-paper h1 { text-align: center; font-size: 1.5rem; margin: 18px 0 4px; text-transform: uppercase; }
.doc-paper .sub { text-align: center; font-weight: 700; margin-bottom: 22px; }
.doc-paper .sign { margin-top: 30px; margin-left: auto; width: 280px; text-align: center; font-weight: 700; }
.doc-paper .sign small { display: block; font-weight: 400; font-style: italic; color: var(--muted); margin-top: 60px; }

/* ---------- Biểu mẫu ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label, .field legend { font-weight: 600; font-size: .92rem; padding: 0; }
.field label i { color: var(--red); font-style: normal; }
.field small { color: var(--muted); font-size: .82rem; }
.input, .field select, .field textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-500); outline: 3px solid var(--blue-50); }
.field textarea { min-height: 150px; resize: vertical; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.opt-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: .84rem; font-weight: 600; color: var(--ink-2); line-height: 1.3; height: 100%; }
.opt span svg { width: 22px; height: 22px; color: var(--blue-700); }
.opt input:checked + span { border-color: var(--blue-700); background: var(--blue-50); color: var(--blue-900); }
.opt input:focus-visible + span { outline: 3px solid var(--gold); }
.opt-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-inline .opt span { flex-direction: row; padding: 8px 16px; border-radius: 999px; }
.opt.lv-urgent input:checked + span { border-color: var(--red); background: var(--red-50); color: var(--red-700); }
.drop { border: 2px dashed var(--blue-100); border-radius: var(--radius); background: var(--blue-50); padding: 24px; text-align: center; color: var(--ink-2); display: grid; gap: 6px; justify-items: center; }
.drop svg { width: 30px; height: 30px; color: var(--blue-700); }
.uploads { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.uploads img { width: 92px; height: 70px; object-fit: cover; border-radius: 8px; }
.note { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--radius); background: var(--gold-50); color: #5c4400; font-size: .92rem; }
.note svg { margin-top: 3px; }
.note.is-blue { background: var(--blue-50); color: var(--blue-900); }
.success { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 44px 24px; }
.success .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; }
.success .tick svg { width: 36px; height: 36px; stroke-width: 2.4; }
.code { font-size: 1.8rem; font-weight: 800; letter-spacing: .06em; color: var(--blue-900); background: var(--blue-50); border: 2px dashed var(--blue-500); border-radius: 12px; padding: 10px 26px; font-variant-numeric: tabular-nums; }

/* ---------- Tra cứu: tiến trình ---------- */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 8px 0 4px; }
.steps li { text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted); position: relative; padding-top: 40px; line-height: 1.3; }
.steps li::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--line); z-index: 1; }
.steps li + li::after { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 4px; background: var(--line); }
.steps li.is-done { color: var(--green); }
.steps li.is-done::before { background: var(--green); border-color: var(--green); }
.steps li.is-done + li.is-done::after, .steps li.is-done + li.is-now::after { background: var(--green); }
.steps li.is-now { color: var(--blue-900); }
.steps li.is-now::before { border-color: var(--blue-700); box-shadow: 0 0 0 6px var(--blue-50); }
.timeline { display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 132px 20px minmax(0, 1fr); gap: 14px; padding-bottom: 22px; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline time { font-size: .84rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; padding-top: 2px; }
.timeline .pt { width: 14px; height: 14px; border-radius: 50%; background: var(--blue-700); margin: 6px 3px 0; position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--blue-50); }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 155px; top: 14px; bottom: -6px; width: 2px; background: var(--line); }
.timeline b { display: block; font-size: .97rem; }
.timeline p { color: var(--ink-2); font-size: .93rem; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 22px; font-size: .95rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

/* ---------- Hỏi đáp ---------- */
.faq { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 17px 4px; font-weight: 600; font-size: 1.03rem; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--blue-700); line-height: 1; flex: none; }
.faq[open] summary::after { content: "–"; }
.faq[open] summary { color: var(--blue-700); }
.faq .ans { padding: 0 4px 18px; color: var(--ink-2); max-width: 75ch; }

/* ---------- Giới thiệu / liên hệ ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 2rem; font-weight: 800; color: var(--blue-700); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .9rem; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; align-items: center; }
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.person { background: #fff; border-radius: var(--radius); padding: 20px 16px; text-align: center; box-shadow: var(--shadow); }
.person .ava { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; }
.person b { display: block; font-size: .98rem; }
.person span { color: var(--muted); font-size: .86rem; }
.contact-list { display: grid; gap: 16px; }
.contact-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.contact-list .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; }
.contact-list small { display: block; color: var(--muted); font-size: .82rem; }
.contact-list b { font-size: 1rem; }
.map { position: relative; border-radius: var(--radius); overflow: hidden; background: #e8eef3; min-height: 380px; box-shadow: var(--shadow); }
.map svg { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.map .pin-list { position: absolute; left: 14px; bottom: 14px; background: #fff; border-radius: 12px; padding: 12px 16px; font-size: .84rem; box-shadow: var(--shadow); display: grid; gap: 4px; }
.map .pin-list i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; }

/* ---------- Chân trang ---------- */
.footer { background: var(--blue-900); color: #c9dcf2; font-size: .93rem; }
.footer .wrap { padding-block: 46px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 34px; }
.footer h3 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }
.footer a { color: #c9dcf2; }
.footer a:hover { color: var(--gold); }
.footer li { margin-bottom: 8px; display: flex; gap: 9px; align-items: flex-start; }
.footer li svg { margin-top: 5px; color: var(--gold); }
.footer .brand-name { color: #fff; font-size: 1.25rem; }
.footer .brand-name b { color: var(--gold); }
.footer .brand-sub { color: #a9c5e6; }
.footer .about { margin-top: 14px; max-width: 40ch; }
.footer-bottom { margin-top: 32px; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; font-size: .84rem; color: #a9c5e6; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero, .cols { grid-template-columns: minmax(0, 1fr); }
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fb-band { grid-template-columns: minmax(0, 1fr); padding: 30px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { width: 240px; }
  .opt-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .masthead .wrap { flex-wrap: wrap; }
  .masthead-tools { width: 100%; margin-left: 0; }
  .search { flex: 1; width: auto; }
  .nav-toggle { display: inline-flex; }
  .nav .wrap { flex-direction: column; }
  .nav-list { display: none; flex-direction: column; padding-bottom: 8px; }
  .nav-list.is-open { display: flex; }
  .nav-list a { padding: 11px 4px; border-top: 1px solid rgba(255, 255, 255, .14); }
  .nav-list a.is-active { background: none; color: var(--gold); }
  .nav-list a.is-active::after { display: none; }
  .topbar-info span:nth-child(2) { display: none; }
  .slider { min-height: 380px; }
  .slide-cap { padding: 70px 20px 62px; }
  .slide-cap h2 { font-size: 1.5rem; }
  .slider-nav { right: auto; left: 20px; bottom: 18px; }
  .lead, .split { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .news-grid, .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-row { grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: start; }
  .news-row h3 { font-size: 1.08rem; margin-top: 2px; }
  .news-row p { display: none; }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-head h1 { font-size: 1.75rem; }
  .page-head h1, .banner-head h1 { font-size: 1.6rem; }
  .banner-head .inner { padding: 26px 20px; }
  .stat-row, .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .opt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .doc-paper { padding: 26px 20px; }
  .doc-paper .letterhead { grid-template-columns: 1fr; }
  .steps { grid-auto-flow: row; grid-template-columns: 1fr; gap: 0; }
  .steps li { text-align: left; padding: 6px 0 6px 36px; font-size: .9rem; }
  .steps li::before { left: 0; top: 6px; transform: none; }
  .steps li + li::after { top: -14px; right: auto; left: 9px; width: 4px; height: 22px; }
  .timeline li { grid-template-columns: 20px minmax(0, 1fr); }
  .timeline time { grid-column: 2; text-align: left; order: -1; }
  .timeline .pt { grid-row: span 2; }
  .timeline li:not(:last-child)::before { left: 9px; }
  .notice-row { grid-template-columns: 54px minmax(0, 1fr); padding: 16px; }
  .notice-row > .btn { grid-column: 2; justify-self: start; }
  .fb-band h2 { font-size: 1.45rem; }
  .flow li { font-size: .74rem; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 16px; }
  .brand-logo { width: 50px; height: 50px; }
  .brand-name { font-size: 1.2rem; }
  .masthead-tools .btn span { display: none; }
  .masthead-tools .btn { padding: 11px; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .news-grid, .album-grid { grid-template-columns: minmax(0, 1fr); }
  .news-row { grid-template-columns: 112px minmax(0, 1fr); }
  .fb-band { padding: 24px 18px; }
  .fb-stats { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fig-pair { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: 44px minmax(0, 1fr); }
  .doc > .btn { grid-column: 2; justify-self: start; }
  .lightbox .stage { padding: 0 8px; }
  .lightbox .prev, .lightbox .next { top: auto; bottom: 70px; transform: none; }
  .code { font-size: 1.3rem; padding: 10px 16px; }
  .section-head h2 { font-size: 1.22rem; }
}
/* ============================================================
   Bổ sung cho bản chạy thật (dữ liệu từ CMS, biểu mẫu, Google Drive)
   ============================================================ */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: #3a2b00; padding: 8px 14px; z-index: 200; font-weight: 700; }
.skip-link:focus { left: 8px; top: 8px; }
.inline-form { display: inline; margin: 0; }
.topbar-links .inline-form button { background: none; border: 0; color: #fff; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: inherit; }
.topbar-links .inline-form button:hover { color: var(--gold); }
.row-between { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.mt { margin-top: 18px; }
.mb0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.small { font-size: .88rem; }
.brand-logo-img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; flex: none; }

/* Menu có mục con (CMS cho phép menu nhiều cấp) */
.nav-list > li { position: relative; }
.nav-list ul { display: none; position: absolute; left: 0; top: 100%; min-width: 230px; background: #fff; box-shadow: var(--shadow); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 6px 0; z-index: 50; }
.nav-list li:hover > ul, .nav-list li:focus-within > ul { display: block; }
.nav-list ul a { color: var(--ink); padding: 10px 18px; font-weight: 500; }
.nav-list ul a:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-list .caret { font-size: .7rem; margin-left: 4px; opacity: .8; }
/* Trang chủ: biểu tượng ngôi nhà trên máy tính, có chữ trên điện thoại */
.nav-home > a { display: flex; align-items: center; height: 100%; padding-inline: 15px; }
.nav-home .i { width: 1.25em; height: 1.25em; vertical-align: 0; }
.nav-home-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* “Thêm ▾”: các mục không đủ chỗ trên một dòng */
.nav-more > button { display: block; height: 100%; padding: 14px 13px; background: none; border: 0; color: #fff; font: inherit; font-weight: 600; font-size: .92rem; white-space: nowrap; cursor: pointer; position: relative; }
.nav-more > button:hover, .nav-more.is-open > button { background: var(--blue-800); }
.nav-more > button.is-active { background: var(--blue-900); }
.nav-more > ul { left: auto; right: 0; }
.nav-more.is-open > ul { display: block; }
.nav-more ul ul { position: static; display: block; min-width: 0; box-shadow: none; border-radius: 0; padding: 0 0 4px 14px; }
.nav-more ul .caret { display: none; }
.nav-more ul a.is-active { background: var(--blue-50); color: var(--blue-700); }
.nav-more ul a.is-active::after { display: none; }

/* Thông báo hệ thống (flash) */
.alert { display: flex; gap: 10px; padding: 13px 18px; border-radius: var(--radius); margin-bottom: 18px; border: 1.5px solid transparent; font-size: .95rem; }
.alert-success { background: var(--green-50); border-color: #b9e2c7; color: #0f5a2a; }
.alert-error { background: var(--red-50); border-color: #f3c0c7; color: #7d0a1c; }
.alert-info { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-900); }
.alert-warn { background: var(--gold-50); border-color: #f0d49a; color: #5c4400; }

/* Biểu mẫu */
.field .hint { color: var(--muted); font-size: .82rem; margin: 0; }
.field .error { color: var(--red-700); font-size: .86rem; font-weight: 600; margin: 0; }
.field .req { color: var(--red); }
.field.has-error .input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field .check, label.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.field input[type=file].input { padding: 9px 12px; background: var(--blue-50); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.btn[disabled], .btn.is-busy { opacity: .65; cursor: progress; }
.hp { position: absolute; left: -5000px; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 22px; }
.filters .field { flex: 1 1 160px; }
.filters .field.grow { flex: 2 1 240px; }
.file-list { display: grid; gap: 6px; margin: 4px 0 0; font-size: .88rem; }
.file-list li { display: flex; gap: 10px; align-items: center; padding: 7px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.file-list li span:last-child { margin-left: auto; color: var(--muted); }
.drop { cursor: pointer; }
.drop:hover, .drop.is-over { border-color: var(--blue-500); background: #e3effb; }
.drive-note { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--green); font-weight: 600; }
.upload-state { font-size: .9rem; color: var(--blue-900); display: flex; gap: 10px; align-items: center; }
.upload-state[hidden] { display: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--blue-100); border-top-color: var(--blue-700); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Nội dung soạn từ CMS (HTML đã lọc) */
.prose img { border-radius: var(--radius); height: auto; margin-inline: auto; }
.prose h3 { font-family: var(--serif); font-size: 1.25rem; }
.prose ol { list-style: decimal; padding-left: 1.3em; display: grid; gap: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--blue-50); }
.prose iframe, .prose video { max-width: 100%; border-radius: var(--radius); }
.prose-sm { font-size: 1rem; line-height: 1.7; gap: 12px; }
.article-head .byline .meta { gap: 6px 18px; }
.cap-note { font-size: .86rem; color: var(--muted); }

/* Dòng thời gian rút gọn (không có cột giờ) */
.timeline.simple li { grid-template-columns: 20px minmax(0, 1fr); }
.timeline.simple li:not(:last-child)::before { left: 9px; }

/* Danh sách tài liệu, tệp */
.attach-list { display: grid; gap: 10px; }
.doc .doc-desc { color: var(--muted); font-size: .9rem; margin: 2px 0 4px; }
.doc-cats a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .94rem; }
.doc-cats a span { margin-left: auto; color: var(--muted); font-weight: 500; }
.doc-cats a:hover { background: var(--blue-50); color: var(--blue-700); }
.doc-cats a.is-active { background: var(--blue-700); color: #fff; }
.doc-cats a.is-active span { color: #d6e6f8; }
.ftype.xlsx, .ftype.ppt { }
.ftype.ppt { background: var(--amber-50); color: var(--amber); }

/* Lịch (tháng / tuần) dựng ở máy chủ */
.seg a { display: inline-block; padding: 6px 16px; border-radius: 999px; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.seg a.is-active { background: var(--blue-700); color: #fff; }
.seg a:hover:not(.is-active) { color: var(--blue-700); }
.cal .day .n { color: inherit; }
.cal .day a.n:hover { background: var(--blue-50); }
.cal .day.is-today a.n:hover { background: var(--red-700); }
.cal .ev.is-past { opacity: .6; }
.cal .ev.is-cancelled { text-decoration: line-through; opacity: .7; }
.event-item .datebox.is-past { background: #eef1f5; color: var(--muted); }
.cal-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Thư viện ảnh / video */
.photo-grid a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--blue-100); cursor: zoom-in; }
.photo-grid a:hover img { transform: scale(1.06); }
.album-grid .album .thumb .count svg { width: 1em; height: 1em; }
.video-embed { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; display: block; }
.video-card { display: flex; flex-direction: column; gap: 12px; }
.video-card h3 { font-size: 1.05rem; }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0a1b33; color: #fff; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video-thumb .play span { width: 62px; height: 62px; border-radius: 50%; background: rgba(200, 16, 46, .92); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.video-thumb .play svg { width: 28px; height: 28px; fill: #fff; stroke: none; margin-left: 3px; }

/* Bản đồ (Leaflet) */
.map-live { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 420px; background: #e8eef3; }
.pin-list-side li { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.pin-list-side li:last-child { border-bottom: 0; }

/* Tra cứu */
.lookup input.num { text-transform: uppercase; }
.err-box { background: var(--red-50); color: #7d0a1c; border-radius: var(--radius); padding: 14px 18px; font-weight: 600; margin-top: 16px; }
.fb-band .err-box { background: rgba(200, 16, 46, .25); color: #ffd9de; }
.result-box { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 20px; background: #fff; }
.evidence { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.evidence a { display: block; }
.evidence img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* Bảng tài khoản */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .94rem; }
.tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Đăng nhập, lỗi */
.auth-card { max-width: 480px; margin: 12px auto; padding: 32px; }
.auth-card.wide { max-width: 760px; }
.center-card { max-width: 640px; margin: 40px auto; text-align: center; padding: 40px 28px; display: grid; gap: 14px; justify-items: center; }
.center-card h1 { font-size: 1.7rem; color: var(--blue-900); }
.search-hit { padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-hit:last-child { border-bottom: 0; }
.search-hit h3 { font-size: 1.05rem; margin: 4px 0; }
.search-hit h3 a { color: var(--ink); }
.search-hit h3 a:hover { color: var(--blue-700); }
.search-hit p { color: var(--muted); font-size: .92rem; }
.pager .gap { border: 0; background: none; min-width: 20px; padding: 0; }
.pager .pager-total { border: 0; background: none; color: var(--muted); font-weight: 500; }
.hl { background: var(--gold-50); }

@media (max-width: 820px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .nav-list ul { position: static; box-shadow: none; background: rgba(255, 255, 255, .08); border-radius: 0; padding: 0 0 0 14px; display: block; }
  .nav-list ul a { color: #fff; padding: 9px 4px; font-weight: 500; }
  .nav-list ul a:hover { background: none; color: var(--gold); }
  .nav-home > a { padding: 11px 4px; gap: 8px; }
  .nav-home .i { display: none; }
  .nav-home-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav-more { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .masthead-tools, .nav, .ticker, .footer, .no-print { display: none !important; }
  body { background: #fff; }
}

/* Bản đồ thật (Leaflet); danh sách điểm cộng đồng nằm bên dưới bản đồ để không che bản đồ */
.map-wrap { display: grid; gap: 14px; align-content: start; min-width: 0; }
.map-wrap .pin-list { background: #fff; border-radius: var(--radius); padding: 16px 20px; font-size: .9rem; box-shadow: var(--shadow); }
.map-wrap .pin-list b { display: block; margin-bottom: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.map-wrap .pin-list ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 20px; }
.map-wrap .pin-list a { color: var(--ink); text-decoration: none; }
.map-wrap .pin-list a:hover { color: var(--blue-700); text-decoration: underline; }
.map-wrap .pin-list i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; }

/* Popup công khai (lịch hoạt động, đặt câu hỏi…) */
dialog.pmodal { border: 0; padding: 0; border-radius: 16px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 80px rgba(8, 20, 40, .35); color: var(--ink); background: #fff; overflow: visible; }
dialog.pmodal[open] { display: flex; flex-direction: column; }
dialog.pmodal::backdrop { background: rgba(8, 20, 40, .55); }
dialog.pmodal-lg { width: min(860px, calc(100vw - 24px)); }
.pmodal-close { position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: #334155; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.pmodal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pmodal-close:hover { background: #e7edf4; }
.pmodal-body { overflow-y: auto; border-radius: 16px; padding: 28px; min-height: 0; flex: 1; }
.pmodal-body.is-loading { min-height: 160px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pmodal-body.is-busy { opacity: .6; pointer-events: none; }
.pmodal-body .event-detail { overflow: visible !important; }
.pmodal-body .event-detail > img { display: block; max-width: none; margin: -28px -28px 20px; width: calc(100% + 56px) !important; border-radius: 16px 16px 0 0; }
.pmodal-body .event-detail .pad { padding: 0 !important; }
.pmodal-head { padding-right: 36px; }
/* Khóa cuộn trang nền nhưng giữ chỗ thanh cuộn để giao diện không bị giật khi mở popup */
.has-pmodal { overflow: hidden; }
.has-pmodal.has-scrollbar { scrollbar-gutter: stable; }
.captcha { min-height: 78px; }
.captcha.has-error .error { margin-top: 6px; }
@media (max-width: 640px) { .pmodal-body { padding: 20px 16px; } .pmodal-body .event-detail { overflow: visible !important; }
.pmodal-body .event-detail > img { margin: -20px -16px 16px; width: calc(100% + 32px) !important; } }

/* Sơ đồ cổng thông tin (/so-do-trang) */
.sitemap { columns: 3 300px; column-gap: 22px; margin-bottom: 32px; }
.sitemap .card { break-inside: avoid; margin-bottom: 22px; padding: 22px 24px; }
.sitemap ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .95rem; }
.sitemap a { color: var(--ink); }
.sitemap a:hover { color: var(--blue-700); }

/* Lịch tháng thu gọn ở cột phải trang chi tiết sự kiện: ngày có lịch được tô màu, nhấn để xem trong popup */
.mini-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.mini-cal-head h2 { margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--blue-900); text-transform: uppercase; letter-spacing: .04em; }
.mini-cal-head a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--blue-700); border: 1.5px solid var(--line); }
.mini-cal-head a:hover { background: var(--blue-50); }
.mini-cal-head svg { width: 16px; height: 16px; }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.mini-cal-grid .wd { font-size: .74rem; font-weight: 700; color: var(--muted); padding: 2px 0 6px; }
.mini-cal-grid > span:not(.wd), .mini-cal-grid > a { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--ink-2); text-decoration: none; }
.mini-cal-grid .is-out { color: #b8c2cf; }
.mini-cal-grid .is-today { box-shadow: inset 0 0 0 1.5px var(--blue-500); font-weight: 700; }
.mini-cal-grid a.has-event { background: var(--blue-700); color: #fff; font-weight: 700; cursor: pointer; transition: transform .12s, background .12s; }
.mini-cal-grid a.has-event:hover { background: var(--blue-900); transform: translateY(-1px); }
.mini-cal-grid a.has-event.is-selected { background: var(--red); }
.mini-cal-grid a.has-event:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.mini-cal-grid a i { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: var(--blue-900); font-size: .66rem; font-style: normal; line-height: 17px; }
.mini-cal-note { display: flex; gap: 8px; align-items: baseline; margin: 12px 0 0; font-size: .82rem; color: var(--muted); }
.mini-cal-note .dot { flex: 0 0 10px; height: 10px; border-radius: 3px; background: var(--blue-700); }

/* Popup "tất cả lịch trong ngày" */
.day-events .pmodal-head { margin-bottom: 18px; }
.day-events .pmodal-head h2 { margin: 0 0 4px; font-size: 1.5rem; }
.day-events .pmodal-head p { margin: 0; font-size: .9rem; }
.day-events .event-detail { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; overflow: hidden !important; }
.day-events .event-detail + .event-detail { margin-top: 16px; }
.pmodal-body .day-events .event-detail > img { margin: -18px -20px 16px; width: calc(100% + 40px) !important; max-height: 220px; border-radius: 0; }
.day-events .event-detail h2 { font-size: 1.35rem !important; }

/* ---------------------------------------------------------------- Đoàn thể – An ninh */
.row { display: flex; align-items: center; gap: 8px; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.org-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; color: var(--ink-2); border: 1.5px solid transparent; transition: border-color .15s, transform .15s; }
.org-card:hover { border-color: var(--blue-700); color: var(--blue-900); transform: translateY(-1px); }
.org-card b { display: block; color: var(--blue-900); font-size: 1.02rem; }
.org-card small { color: var(--muted); font-size: .84rem; }
.org-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); }
.org-icon .i { width: 24px; height: 24px; }
.org-card.is-security .org-icon { background: var(--red-50); color: var(--red); }
.org-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.org-list { display: grid; gap: 2px; }
.org-list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .94rem; }
.org-list a span { flex: 1; }
.org-list a small { color: var(--muted); font-weight: 500; }
.org-list a:hover, .org-list .is-active a { background: var(--blue-50); color: var(--blue-900); }
.review-item { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.review-item h3 { font-size: 1.1rem; margin: 4px 0; }
.review-actions { display: grid; gap: 10px; align-content: start; }
.review-reject { display: grid; gap: 8px; }
@media (max-width: 720px) {
  .review-item { grid-template-columns: 1fr; }
}
