/* =========================================================
   AHA Education — App design system (multi-page, light/dark)
   Khung web-app hiện đại: navbar + shell + component library.
   ========================================================= */

:root {
  /* Bảng màu tham khảo tuhoc365.vn — xanh lá (primary #8cc644) */
  --brand: #5f971f;
  --brand-2: #3f660f;
  --brand-3: #9ed35f;
  --brand-ink: #26400f;
  --brand-soft: #eaf6d9;

  --bg: #f1f6ea;
  --bg-2: #e9f2dd;
  --surface: #ffffff;
  --surface-2: #f5f9ef;
  --text: #0f1b33;
  --muted: #5c6b86;
  --faint: #8a97ad;
  --line: #e6ecf5;
  --line-2: #eef2f8;

  --star: #f5a516;
  --success: #12b76a;
  --danger: #f04438;
  --warn: #f79009;

  --shadow-xs: 0 1px 2px rgba(16, 30, 60, .06);
  --shadow-sm: 0 2px 8px rgba(16, 30, 60, .06), 0 1px 2px rgba(16, 30, 60, .04);
  --shadow-md: 0 8px 24px rgba(16, 30, 60, .08);
  --shadow-lg: 0 20px 50px rgba(16, 30, 60, .14);
  --shadow-brand: 0 10px 22px rgba(95, 151, 31, .30);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --container: 1240px;
  --nav-h: 68px;
  --sidebar-w: 300px;

  --ff: "Be Vietnam Pro", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

:root[data-theme="dark"] {
  --brand: #8ecb46;
  --brand-2: #a9d96a;
  --brand-3: #6aa329;
  --brand-ink: #d6ecb0;
  --brand-soft: #1b2a10;

  --bg: #0a1120;
  --bg-2: #0d1526;
  --surface: #121b2e;
  --surface-2: #0f1829;
  --text: #e8eef9;
  --muted: #9fb0cc;
  --faint: #6b7a97;
  --line: #22304a;
  --line-2: #1b2740;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-md: 0 10px 26px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  --shadow-brand: 0 10px 24px rgba(120, 180, 60, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 320px;
  font-family: var(--ff); color: var(--text);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 12%, var(--bg)) 0%, var(--bg) 460px);
  background-attachment: fixed; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background .25s ease, color .25s ease;
}
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.18; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px; font-weight: 700; font-size: 14px; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: var(--shadow-brand); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--brand-soft); color: var(--brand-2); }
.btn-white { background: #fff; color: var(--brand-2); box-shadow: var(--shadow-md); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ============ Navbar / shell ============ */
.app-nav {
  position: sticky; top: 0; z-index: 80;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.app-nav-inner { display: flex; align-items: center; gap: 18px; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-3)); color: #fff; font-weight: 900; font-size: 18px; box-shadow: var(--shadow-brand); overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-txt strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.brand-txt span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.nav-links a { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; transition: .16s ease; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--brand); background: var(--brand-soft); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 18px; transition: .16s ease; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.nav-toggle { display: none; }

/* Auth control */
.auth-slot { display: inline-flex; align-items: center; }
.btn-google { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow-xs); transition: .16s ease; }
.btn-google:hover { border-color: var(--brand); transform: translateY(-1px); }
.btn-google svg { width: 18px; height: 18px; }
.user-menu { position: relative; }
.user-chip { display: inline-flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-xs); }
.user-chip:hover { border-color: var(--brand); }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); border: 2px solid var(--line); }
.user-chip .u-name { font-size: 13.5px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: none; z-index: 90; }
.user-menu.open .user-menu-panel { display: block; }
.user-menu-panel .um-info { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu-panel .um-info strong { display: block; font-size: 13.5px; }
.user-menu-panel .um-info small { color: var(--muted); font-size: 12px; word-break: break-all; }
.user-menu-panel a, .user-menu-panel button { display: flex; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; font-size: 13px; font-weight: 600; color: var(--text); }
.user-menu-panel a:hover { background: var(--surface-2); }
.user-menu-panel button { color: var(--danger); }
.user-menu-panel button:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }

/* Mobile drawer */
.nav-scrim { position: fixed; inset: 0; background: rgba(6, 15, 35, .5); backdrop-filter: blur(2px); z-index: 89; opacity: 0; visibility: hidden; transition: .2s ease; }
.nav-scrim.open { opacity: 1; visibility: visible; }
.mobile-drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(320px, 86vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 90; transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column; padding: 18px; gap: 6px; }
.mobile-drawer.open { transform: none; }
.mobile-drawer .md-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mobile-drawer a.md-link { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 12px; font-weight: 700; color: var(--text); }
.mobile-drawer a.md-link:hover, .mobile-drawer a.md-link.active { background: var(--brand-soft); color: var(--brand); }
.mobile-drawer .md-auth { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.mobile-drawer .md-auth .btn-google, .mobile-drawer .md-auth .user-chip { width: 100%; justify-content: center; }

/* ============ Page header ============ */
.page-head { padding: 40px 0 8px; }
.page-head .eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.page-head .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-3); }
.page-head h1 { margin: 14px 0 10px; font-size: clamp(28px, 4vw, 42px); }
.page-head p { color: var(--muted); font-size: 16px; max-width: 680px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { opacity: .6; }

.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head .eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 12px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 16px; }

/* ============ Footer ============ */
.app-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--surface); }
.app-footer .foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding: 48px 0 30px; }
.app-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 14px; }
.app-footer a { display: block; color: var(--muted); font-size: 14px; padding: 6px 0; }
.app-footer a:hover { color: var(--brand); }
.app-footer .foot-about p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 320px; }
.app-footer .foot-bottom { border-top: 1px solid var(--line); padding: 18px 0; color: var(--faint); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .app-footer .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .app-footer .foot-grid { grid-template-columns: 1fr; } }

/* ============ Home hero ============ */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 15% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%), radial-gradient(50% 70% at 100% 10%, color-mix(in srgb, var(--brand-3) 14%, transparent), transparent 55%); pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; padding: 56px 0 44px; }
.hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--brand-2); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: var(--shadow-xs); }
.hero-copy .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-3) 22%, transparent); }
.hero-copy h1 { margin: 20px 0 16px; font-size: clamp(34px, 5vw, 56px); line-height: 1.08; }
.hero-copy h1 .grad { background: linear-gradient(120deg, var(--brand), var(--brand-3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-copy .lead { color: var(--muted); font-size: 17px; max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.hero-search { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding: 8px 8px 8px 18px; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
.hero-search .hs-ic { color: var(--brand); font-size: 19px; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 15px; }
.hero-trust { display: flex; align-items: center; gap: 16px; margin-top: 22px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.hero-trust b { color: var(--text); }

.hero-visual { position: relative; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 20px; }
.hero-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hero-card-top strong { font-size: 15px; }
.hero-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-metric { padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); }
.hero-metric b { display: block; font-size: 26px; font-weight: 900; letter-spacing: -.03em; background: linear-gradient(120deg, var(--brand), var(--brand-3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-metric span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 30px; } .hero-visual { order: -1; } }

/* ============ Stat strip ============ */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.stat-cell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.stat-cell b { display: block; font-size: 30px; font-weight: 900; letter-spacing: -.03em; }
.stat-cell span { color: var(--muted); font-size: 13px; font-weight: 600; }
@media (max-width: 720px) { .stat-strip { grid-template-columns: 1fr 1fr; } }

/* ============ Feature cards ============ */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card { display: flex; flex-direction: column; gap: 12px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.feature-ic { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; font-size: 26px; background: var(--brand-soft); }
.feature-card h3 { font-size: 18px; }
.feature-card p { color: var(--muted); font-size: 14px; flex: 1; }
.feature-card .go { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: 14px; }
.feature-card .go::after { content: "→"; transition: transform .2s ease; }
.feature-card:hover .go::after { transform: translateX(4px); }

/* ============ Doc cards (bank + featured) ============ */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.doc-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s ease, border-color .22s ease; }
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.dc-top { display: flex; align-items: flex-start; gap: 12px; }
.dc-ic { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--brand-soft); font-size: 22px; }
.dc-headings { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dc-group { color: var(--brand-2); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.dc-cat { color: var(--muted); font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-badge { flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--brand-soft); color: var(--brand-2); white-space: nowrap; }
.dc-badge.bt-blue { background: color-mix(in srgb, #2f6fe0 15%, transparent); color: #2f6fe0; }
.dc-badge.bt-amber { background: color-mix(in srgb, #e08a1e 18%, transparent); color: #b5730f; }
.dc-badge.bt-green { background: var(--brand-soft); color: var(--brand-2); }
:root[data-theme="dark"] .dc-badge.bt-blue { color: #7fb0ff; }
:root[data-theme="dark"] .dc-badge.bt-amber { color: #f0b45a; }
.dc-title { font-size: 16.5px; font-weight: 800; line-height: 1.34; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-sum { color: var(--muted); font-size: 13.5px; line-height: 1.55; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-stats { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; }
.dc-stats .star { color: var(--star); font-weight: 800; }
.dc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 13px; border-top: 1px solid var(--line); }
.dc-price { font-size: 16.5px; font-weight: 900; color: var(--text); letter-spacing: -.02em; }
.dc-price s { color: var(--faint); font-weight: 600; font-size: 12.5px; margin-left: 5px; }
.dc-price.free { color: var(--success); }
.dc-more { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--brand-2); font-weight: 800; font-size: 13px; cursor: pointer; }
.dc-more:hover { color: var(--brand); gap: 8px; }

/* ============ Cert cards ============ */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.cert-card { display: flex; flex-direction: column; gap: 9px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.cert-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 34%, var(--line)); }
.cert-logo { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--brand-soft); border: 1px solid var(--line); color: var(--brand-2); font-size: 13px; font-weight: 900; }
.cert-card h3 { font-size: 16.5px; }
.cert-card p { color: var(--muted); font-size: 12.5px; line-height: 1.55; flex: 1; }
.cert-tag { margin-top: 4px; display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-size: 12px; font-weight: 800; }
.cert-tag::after { content: "→"; transition: transform .2s ease; }
.cert-card:hover .cert-tag::after { transform: translateX(3px); }

/* ============ Bank layout (list + sidebar) ============ */
.bank { display: grid; grid-template-columns: minmax(0, 1fr) var(--sidebar-w); gap: 28px; align-items: start; padding-top: 8px; }
.bank-main { min-width: 0; }
@media (max-width: 1000px) { .bank { grid-template-columns: 1fr; } .bank-side { order: -1; } }

/* Big search (kiểu tuhoc365) */
.bank-search { margin-bottom: 16px; }
.bank-search-box { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: border-color .18s ease, box-shadow .18s ease; }
.bank-search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.bank-search-box .bs-ic { color: var(--brand); font-size: 20px; }
.bank-search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); }
.bank-search-box .btn { min-height: 46px; padding: 0 24px; }
.bank-hint { margin: 8px 2px 0; color: var(--faint); font-size: 12.5px; }
.bank-hint b { color: var(--brand-2); }

/* Chip bar theo môn/nhóm — thanh trắng bo tròn, chip có icon */
.chipbar { display: flex; align-items: center; gap: 8px; padding: 8px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow-x: auto; scrollbar-width: none; }
.chipbar::-webkit-scrollbar { display: none; }
.groupbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.grp-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 700; white-space: nowrap; transition: .16s ease; }
.chipbar .grp-chip { flex: 0 0 auto; }
.grp-chip .gc-ic { font-size: 16px; }
.grp-chip:hover { border-color: var(--brand); color: var(--brand); }
.grp-chip.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; box-shadow: var(--shadow-brand); }

.toolbar { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.field { position: relative; display: flex; align-items: center; }
.field .fi { position: absolute; left: 14px; color: var(--brand); font-size: 16px; pointer-events: none; }
.toolbar input, .toolbar select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 500; appearance: none; transition: .16s ease; }
.field input { padding-left: 40px; }
.toolbar select { cursor: pointer; padding-right: 38px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235c6b86' stroke-width='2' stroke-linecap='round'><path d='M4 6l4 4 4-4'/></svg>"); background-repeat: no-repeat; background-position: right 13px center; }
.toolbar input:focus, .toolbar select:focus { outline: 0; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
@media (max-width: 620px) { .toolbar { grid-template-columns: 1fr; } }

.quickchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.qchip { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; transition: .16s ease; }
.qchip:hover { border-color: var(--brand); color: var(--brand); }
.qchip.active { background: var(--brand-soft); border-color: transparent; color: var(--brand-2); }
.result-count { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.result-count b { color: var(--text); }

/* Sidebar widgets */
.bank-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--nav-h) + 16px); }
@media (max-width: 1000px) { .bank-side { position: static; flex-direction: row; flex-wrap: wrap; } .bank-side .side-card { flex: 1 1 240px; } }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 20px; }
.side-title { font-size: 14px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.side-stats { display: flex; flex-direction: column; gap: 10px; }
.side-stats .row { display: flex; align-items: center; gap: 10px; }
.side-stats .ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); font-size: 16px; }
.side-stats .lb { color: var(--muted); font-size: 13px; }
.side-stats .vl { margin-left: auto; font-weight: 800; font-size: 14px; }
.side-tips { display: flex; flex-direction: column; gap: 11px; }
.side-tips .tip { position: relative; padding-left: 24px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.side-tips .tip::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 10px; font-weight: 900; }
.side-cta { background: linear-gradient(150deg, var(--brand-ink), var(--brand-2)); border: 0; color: #fff; }
.side-cta .badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.side-cta strong { display: block; margin: 12px 0 6px; font-size: 17px; }
.side-cta p { color: rgba(255,255,255,.85); font-size: 13px; margin-bottom: 16px; }
.side-cta .btn { width: 100%; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 30px; }
.pg-btn { min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--brand-2); font-weight: 800; font-size: 14px; transition: .16s ease; }
.pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pg-btn.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.empty { padding: 54px 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }

/* ============ Exclusive (gated) ============ */
.exclusive-shell { position: relative; overflow: hidden; border-radius: var(--r-xl); background: radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--brand-3) 40%, transparent), transparent 55%), linear-gradient(150deg, var(--brand-ink), var(--brand-2)); color: #fff; padding: clamp(28px, 5vw, 54px); box-shadow: var(--shadow-lg); }
.exclusive-shell .badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.exclusive-shell h2 { margin: 18px 0 12px; font-size: clamp(24px, 3.4vw, 38px); max-width: 640px; }
.exclusive-shell .lead { color: rgba(255,255,255,.86); font-size: 16px; max-width: 560px; margin-bottom: 24px; }
.exclusive-hello { color: #ffe08a; font-weight: 800; margin-bottom: 4px; }
.exclusive-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.ex-doc { padding: 20px; border-radius: var(--r-lg); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); transition: .2s ease; }
.ex-doc:hover { background: rgba(255,255,255,.16); transform: translateY(-3px); }
.ex-doc .ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.16); font-size: 22px; margin-bottom: 10px; }
.ex-doc h4 { font-size: 15px; margin-bottom: 5px; }
.ex-doc p { color: rgba(255,255,255,.82); font-size: 12.5px; line-height: 1.5; }
.ex-doc a.open { margin-top: 10px; display: inline-flex; gap: 6px; color: #ffe08a; font-weight: 700; font-size: 13px; }

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(6, 15, 35, .6); backdrop-filter: blur(5px); }
.modal.open { display: flex; animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity: 0 } to { opacity: 1 } }
.modal-card { width: min(680px, 100%); max-height: 88vh; overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.modal-cover { position: relative; padding: 28px; color: #fff; background: linear-gradient(150deg, var(--brand), var(--brand-ink)); }
.modal-cover .c-ic { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: rgba(255,255,255,.16); font-size: 30px; margin-bottom: 8px; }
.modal-cover h3 { font-size: 23px; margin: 8px 0 6px; }
.modal-cover .m-meta { color: rgba(255,255,255,.85); font-size: 13px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 20px; }
.modal-close:hover { background: rgba(255,255,255,.32); }
.modal-body { padding: 26px; display: flex; flex-direction: column; gap: 20px; }
.modal-body .m-sum { color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.modal-body h4 { font-size: 15px; margin-bottom: 10px; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.modal-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; color: var(--muted); font-size: 14px; }
.modal-list li { position: relative; padding-left: 26px; }
.modal-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 900; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease var(--d, 0ms), transform .6s cubic-bezier(.2,.7,.2,1) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.in { opacity: 1; transform: none; transition: none; } }

.toolbar.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .toolbar.two { grid-template-columns: 1fr; } }

/* Responsive nav */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-actions .auth-slot, .nav-actions .btn-cta { display: none; }
  .nav-toggle { display: grid; }
}
