/* =====================================================================
   myBNS — BNS visual system (Style Guideline BNS-DS-01)
   Teal family + electron green accent, cool off-white surfaces,
   Inter (UI) · Source Serif 4 (display).
   ===================================================================== */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); }

:root {
  --bns-teal: #2D8B96; --bns-teal-dark: #1A5F68; --bns-teal-deep: #0E3138;
  --bns-green: #9DCB35; --bns-green-dark: #6F9322; --bns-gray: #8C8C8C;
  --bns-mint: #2F7D5C; --bns-warn: #B6750F; --bns-rust: #B0301F;
  --ink: #0F1B1E; --slate-900: #1C2A2E; --slate-700: #3D4A4F; --slate-500: #6B7780; --slate-300: #B5BDC1; --slate-100: #E0E5E7; --slate-50: #EEF1F2;
  --bg: #F7F9F9; --surface: #FFFFFF; --border: #D9DEE0;
  --teal-50: #EAF4F5; --teal-100: #D2E9EC; --green-50: #F2F8E4; --amber-50: #FBF3E3; --rust-50: #F8E9E7; --mint-50: #E7F3EE;
  --radius: 12px; --radius-sm: 8px; --radius-xs: 6px;
  --shadow-sm: 0 1px 2px rgba(14, 49, 56, .06);
  --shadow: 0 1px 2px rgba(14, 49, 56, .05), 0 6px 20px -8px rgba(14, 49, 56, .14);
  --shadow-lg: 0 20px 50px -12px rgba(14, 49, 56, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sidebar: 268px; --topbar: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 15px/1.55 var(--font); color: var(--slate-900); background: var(--bg); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--bns-teal-dark); text-decoration-color: rgba(26,95,104,.35); text-underline-offset: 2px; }
a:hover { color: var(--bns-teal-deep); text-decoration-color: currentColor; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { color: var(--bns-teal-deep); line-height: 1.25; margin: 0 0 .5em; }
h1 { font: 600 30px/1.2 var(--serif); letter-spacing: -.01em; }
h2 { font: 600 20px/1.3 var(--serif); }
h3 { font-size: 16px; font-weight: 650; }
h4 { font-size: 14px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); }
p { margin: 0 0 .9em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--slate-50); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 26px; height: 26px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--slate-500); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mb-0 { margin-bottom: 0 } .mb-2 { margin-bottom: 16px }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-sidebar { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- App shell */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand-name { font: 700 19px/1 var(--font); color: var(--bns-teal-deep); letter-spacing: -.02em; }
.brand-name span { color: var(--bns-teal); }
.brand-sub { display: block; font-size: 11px; font-weight: 500; color: var(--slate-500); letter-spacing: .02em; margin-top: 3px; }
.nav { padding: 6px 12px 20px; flex: 1; }
.nav-section { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-500); padding: 16px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0; border-radius: var(--radius-sm); color: var(--slate-700); text-decoration: none; font-weight: 500; font-size: 14px; position: relative; transition: background .15s, color .15s; }
.nav a:hover { background: var(--slate-50); color: var(--bns-teal-deep); }
.nav a.active { background: var(--teal-50); color: var(--bns-teal-deep); font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--bns-green); }
.nav a .ic { color: var(--bns-teal); }
.nav .count { margin-left: auto; background: var(--bns-teal); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; min-width: 20px; text-align: center; }
.nav .count.warn { background: var(--bns-warn); }
.sidebar-foot { padding: 14px 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--slate-500); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); background: rgba(247, 249, 249, .86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 28px; }
.topbar .search { flex: 1; max-width: 460px; position: relative; }
.topbar .search input { padding-left: 38px; background: var(--surface); }
.topbar .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--slate-500); }
.topbar .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px var(--mono); color: var(--slate-500); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; background: var(--bg); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--slate-700); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface); border-color: var(--border); }
.icon-btn .dot { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; font-size: 9.5px !important; border-radius: 999px; background: var(--bns-rust); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); }
.menu-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.user-chip:hover { box-shadow: var(--shadow-sm); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; flex: none; background: var(--bns-teal); letter-spacing: .02em; }
.avatar-lg { width: 56px; height: 56px; font-size: 19px; }
.user-chip .who { line-height: 1.15; text-align: left; }
.user-chip .who small { display: block; color: var(--slate-500); font-size: 11.5px; }
.content { padding: 28px 32px 56px; max-width: 1360px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--bns-green-dark); margin-bottom: 4px; }
.page-head h1 { margin: 0; }
.page-head .lead { margin: 6px 0 0; color: var(--slate-500); max-width: 760px; }
.breadcrumbs { font-size: 13px; color: var(--slate-500); margin-bottom: 8px; }
.breadcrumbs a { color: var(--slate-500); }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar); transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(14,49,56,.35); z-index: 35; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 14px; }
  .content { padding: 20px 16px 48px; }
  .user-chip .who, .topbar .kbd { display: none; }
}

/* ---------------------------------------------------------------- Cards & tiles */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; min-width: 0; }
.card + .card { margin-top: 20px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -4px 0 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-head { padding: 18px 22px 0; margin: 0 0 12px; }
.card.accent { border-top: 3px solid var(--bns-teal); }
.card.hero { background: linear-gradient(135deg, var(--bns-teal-deep) 0%, #154750 60%, var(--bns-teal-dark) 100%); color: #DCEEF0; border: 0; position: relative; overflow: hidden; }
.card.hero h2, .card.hero h1, .card.hero strong { color: #fff; }
.card.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 2px solid rgba(157,203,53,.35); box-shadow: 0 0 0 28px rgba(255,255,255,.03), 0 0 0 56px rgba(255,255,255,.025); }
.card.hero .electron { position: absolute; right: 40px; top: 30px; width: 14px; height: 14px; border-radius: 50%; background: var(--bns-green); box-shadow: 0 0 0 6px rgba(157,203,53,.2); }
.kpi { position: relative; }
.kpi .label, .kpi .value { padding-right: 44px; }
.kpi .label { font-size: 12.5px; font-weight: 600; color: var(--slate-500); display: flex; align-items: center; gap: 6px; }
.kpi .value { font: 650 28px/1.15 var(--font); color: var(--bns-teal-deep); margin: 6px 0 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--slate-500); }
.kpi .ic-wrap { position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-50); color: var(--bns-teal); }
.kpi.green .ic-wrap { background: var(--green-50); color: var(--bns-green-dark); }
.kpi.amber .ic-wrap { background: var(--amber-50); color: var(--bns-warn); }
.kpi.rust .ic-wrap { background: var(--rust-50); color: var(--bns-rust); }
.progress { height: 8px; border-radius: 999px; background: var(--slate-50); overflow: hidden; margin-top: 10px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--bns-teal), var(--bns-green)); border-radius: 999px; }
.stat-list { list-style: none; padding: 0; margin: 0; }
.stat-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--slate-100); gap: 12px; }
.stat-list li:last-child { border-bottom: 0; }
.stat-list li strong { font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 36px 20px; color: var(--slate-500); }
.empty .ic { width: 38px; height: 38px; color: var(--slate-300); margin-bottom: 8px; }
.empty h3 { color: var(--slate-700); }

/* ---------------------------------------------------------------- Badges, alerts, help */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; border: 1px solid transparent; }
.badge-green { background: var(--mint-50); color: var(--bns-mint); border-color: #CBE5D9; }
.badge-amber { background: var(--amber-50); color: #8A5A0B; border-color: #EEDBB5; }
.badge-rust { background: var(--rust-50); color: var(--bns-rust); border-color: #EDCBC6; }
.badge-teal { background: var(--teal-50); color: var(--bns-teal-dark); border-color: var(--teal-100); }
.badge-slate { background: var(--slate-50); color: var(--slate-700); border-color: var(--slate-100); }
.badge-solid { background: var(--bns-teal); color: #fff; }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 16px; font-size: 14px; }
.alert .ic { margin-top: 2px; }
.alert p:last-child { margin-bottom: 0; }
.alert-info { background: var(--teal-50); border-color: var(--teal-100); color: var(--bns-teal-deep); }
.alert-success { background: var(--mint-50); border-color: #CBE5D9; color: #1F5A41; }
.alert-warning { background: var(--amber-50); border-color: #EEDBB5; color: #6E4808; }
.alert-error, .alert-danger { background: var(--rust-50); border-color: #EDCBC6; color: #7F2114; }
details.help { border: 1px solid var(--teal-100); background: linear-gradient(180deg, var(--teal-50), #F4FAFA); border-radius: var(--radius-sm); margin-bottom: 18px; }
details.help summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 11px 14px; font-weight: 600; color: var(--bns-teal-dark); font-size: 14px; }
details.help summary::-webkit-details-marker { display: none; }
details.help summary::after { content: "Show"; margin-left: auto; font-size: 12px; font-weight: 600; color: var(--bns-teal); }
details.help[open] summary::after { content: "Hide"; }
details.help .help-body { padding: 0 16px 14px 42px; color: var(--slate-700); font-size: 14px; }
details.help .help-body ul, details.help .help-body ol { padding-left: 18px; margin: 6px 0; }
.tip { position: relative; display: inline-flex; color: var(--slate-500); cursor: help; vertical-align: middle; }
.tip:hover::after, .tip:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 280px; background: var(--bns-teal-deep); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 450; line-height: 1.45; z-index: 60; box-shadow: var(--shadow); white-space: normal; text-transform: none; letter-spacing: 0; }

/* ---------------------------------------------------------------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font: 600 14px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s, border-color .15s; user-select: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(157,203,53,.6); outline-offset: 2px; }
.btn-primary { background: var(--bns-teal); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 1px 2px rgba(14,49,56,.2); }
.btn-primary:hover { background: var(--bns-teal-dark); color: #fff; }
.btn-accent { background: var(--bns-green); color: var(--bns-teal-deep); }
.btn-accent:hover { background: #8EBB2B; color: var(--bns-teal-deep); }
.btn-secondary { background: var(--surface); color: var(--bns-teal-deep); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--slate-300); background: var(--bg); color: var(--bns-teal-deep); }
.btn-ghost { background: transparent; color: var(--bns-teal-dark); }
.btn-ghost:hover { background: var(--teal-50); }
.btn-danger { background: var(--bns-rust); color: #fff; }
.btn-danger:hover { background: #8F2618; color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--bns-rust); border-color: #EDCBC6; }
.btn-danger-ghost:hover { background: var(--rust-50); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 7px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled, .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* ---------------------------------------------------------------- Forms */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; }
@media (max-width: 760px) { .form-grid > [class*="col-"] { grid-column: span 12; } }
.field label, .label { display: block; font-size: 13.5px; font-weight: 600; color: var(--slate-900); margin-bottom: 6px; }
.field .req { color: var(--bns-rust); margin-left: 2px; }
.field .hint { font-size: 12.5px; color: var(--slate-500); margin: 5px 0 0; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], input[type=url], input[type=search], input[type=time], input[type=file], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: 400 14.5px/1.4 var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; appearance: none;
}
input[type=file] { padding: 8px; background: var(--bg); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7780' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
textarea { min-height: 110px; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bns-teal); box-shadow: 0 0 0 3px rgba(45,139,150,.18); }
input:disabled, select:disabled, textarea:disabled, input[readonly] { background: var(--slate-50); color: var(--slate-500); }
.is-invalid { border-color: var(--bns-rust) !important; box-shadow: 0 0 0 3px rgba(176,48,31,.12) !important; }
.field-error { color: var(--bns-rust); font-size: 12.5px; margin: 5px 0 0; font-weight: 500; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--bns-teal); flex: none; }
.check small { display: block; color: var(--slate-500); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.choice { position: relative; display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 14px 14px 44px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--slate-300); }
.choice input { position: absolute; left: 14px; top: 16px; accent-color: var(--bns-teal); width: 18px; height: 18px; }
.choice strong { display: block; color: var(--bns-teal-deep); }
.choice span { font-size: 13px; color: var(--slate-500); }
.choice:has(input:checked) { border-color: var(--bns-teal); background: var(--teal-50); box-shadow: 0 0 0 1px var(--bns-teal) inset; }
.tags-select { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-check { position: relative; }
.tag-check input { position: absolute; opacity: 0; }
.tag-check span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; cursor: pointer; transition: all .15s; }
.tag-check input:checked + span { background: var(--bns-teal); border-color: var(--bns-teal); color: #fff; }
.tag-check input:focus-visible + span { outline: 2px solid var(--bns-green); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.input-group { position: relative; }
.input-group .toggle-pw { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--slate-500); cursor: pointer; padding: 6px; border-radius: 6px; }
.pw-meter { height: 5px; border-radius: 999px; background: var(--slate-50); margin-top: 8px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font: 600 17px/1.3 var(--serif); color: var(--bns-teal-deep); padding: 0; margin-bottom: 12px; }
.fieldset + .fieldset { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }

/* ---------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-500); background: var(--bg); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--slate-100); vertical-align: middle; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #FAFCFC; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 650; background: var(--bg); border-top: 1px solid var(--border); }
.table tr.total td { font-weight: 700; background: var(--slate-50); }
.table tr.section td { font-weight: 700; color: var(--bns-teal-deep); background: var(--teal-50); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.table .person { display: flex; align-items: center; gap: 10px; }
.table .person small { display: block; color: var(--slate-500); }
.row-link { cursor: pointer; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 220px; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 18px 0 4px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.pager .pager-cur { background: var(--bns-teal); color: #fff; border-color: var(--bns-teal); }
.pager .pager-gap { border: 0; background: transparent; }

/* ---------------------------------------------------------------- Tabs, timeline, stepper */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: transparent; font: 600 14px var(--font); color: var(--slate-500); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--bns-teal-deep); }
.tabs .active { color: var(--bns-teal-deep); border-bottom-color: var(--bns-teal); }
[data-panel] { display: none; }
[data-panel].active { display: block; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--slate-100); }
.timeline li { position: relative; padding: 0 0 18px 14px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--bns-teal); }
.timeline li:first-child::before { border-color: var(--bns-green); box-shadow: 0 0 0 4px rgba(157,203,53,.2); }
.timeline .when { font-size: 12px; color: var(--slate-500); }
.stepper { display: flex; gap: 0; margin: 4px 0 20px; counter-reset: step; flex-wrap: wrap; }
.stepper .step { flex: 1; min-width: 120px; position: relative; padding-top: 34px; text-align: center; font-size: 12.5px; color: var(--slate-500); font-weight: 600; }
.stepper .step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--slate-50); border: 2px solid var(--slate-100); display: grid; place-items: center; color: var(--slate-500); z-index: 1; font-size: 12.5px; }
.stepper .step::after { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: var(--slate-100); }
.stepper .step:first-child::after { display: none; }
.stepper .step.done { color: var(--bns-teal-dark); }
.stepper .step.done::before { content: "✓"; background: var(--bns-teal); border-color: var(--bns-teal); color: #fff; }
.stepper .step.done::after, .stepper .step.current::after { background: var(--bns-teal); }
.stepper .step.current { color: var(--bns-teal-deep); }
.stepper .step.current::before { background: var(--bns-green); border-color: var(--bns-green); color: var(--bns-teal-deep); box-shadow: 0 0 0 5px rgba(157,203,53,.22); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--slate-100); }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--slate-300); color: transparent; flex: none; }
.checklist li.done .tick { background: var(--bns-mint); border-color: var(--bns-mint); color: #fff; }
.checklist li.done a { color: var(--slate-500); text-decoration: line-through; }

/* ---------------------------------------------------------------- Lists, cards for people/jobs/news */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.person-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s, border-color .15s; }
.person-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--teal-100); color: inherit; }
.person-card .top { display: flex; gap: 12px; align-items: center; }
.person-card .name { font-weight: 650; color: var(--bns-teal-deep); }
.person-card .role { font-size: 13px; color: var(--slate-500); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--slate-50); color: var(--slate-700); border: 1px solid var(--slate-100); }
.chip.teal { background: var(--teal-50); color: var(--bns-teal-dark); border-color: var(--teal-100); }
.list-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--slate-100); text-decoration: none; color: inherit; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover .li-title { color: var(--bns-teal); }
.li-title { font-weight: 650; color: var(--bns-teal-deep); }
.li-meta { font-size: 13px; color: var(--slate-500); }
.li-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-50); color: var(--bns-teal); flex: none; }
.news-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.news-card .band { height: 6px; background: linear-gradient(90deg, var(--bns-teal), var(--bns-green)); }
.news-card .body { padding: 18px; }
.news-card h3 { font: 600 18px/1.3 var(--serif); color: var(--bns-teal-deep); margin: 6px 0 8px; }
.prose { max-width: 760px; font-size: 16px; line-height: 1.7; color: var(--slate-900); }
.prose h2 { margin-top: 1.6em; } .prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 1em 0; padding: 10px 16px; border-left: 3px solid var(--bns-green); background: var(--green-50); border-radius: 0 8px 8px 0; color: var(--slate-700); }
.dl { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--slate-500); font-weight: 500; }
.dl dd { margin: 0; color: var(--slate-900); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .dl { grid-template-columns: 1fr; } .dl dt { margin-top: 6px; } }
.state-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.state-ring { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 18px; color: var(--bns-teal-deep); background: conic-gradient(var(--bns-green) var(--p, 100%), var(--slate-100) 0); position: relative; flex: none; }
.state-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.state-ring span { position: relative; }
.money-big { font: 700 34px/1.1 var(--font); color: var(--bns-teal-deep); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qr { width: 140px; height: 140px; image-rendering: pixelated; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: #fff; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }

/* ---------------------------------------------------------------- Dropdowns, toasts, dialogs */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 70; }
.dropdown.open .dropdown-menu { display: block; animation: pop .14s ease-out; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 8px; color: var(--slate-700); text-decoration: none; font: 500 14px var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--slate-50); color: var(--bns-teal-deep); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-head { padding: 10px 12px 8px; font-size: 13px; color: var(--slate-500); }
.notif-list { max-height: 380px; overflow-y: auto; width: 360px; max-width: calc(100vw - 32px); }
.notif-item { display: flex !important; align-items: flex-start !important; }
.notif-item.unread { background: var(--teal-50); }
.notif-item small { display: block; color: var(--slate-500); font-size: 12px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.toasts { position: fixed; right: 20px; top: 76px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 32px); }
.toast { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--bns-teal); border-radius: 10px; padding: 13px 14px; box-shadow: var(--shadow-lg); font-size: 14px; animation: slidein .25s ease-out; }
.toast.success { border-left-color: var(--bns-mint); } .toast.success .ic { color: var(--bns-mint); }
.toast.error { border-left-color: var(--bns-rust); } .toast.error .ic { color: var(--bns-rust); }
.toast.warning { border-left-color: var(--bns-warn); } .toast.warning .ic { color: var(--bns-warn); }
.toast.info .ic { color: var(--bns-teal); }
.toast .close { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--slate-500); padding: 0 2px; font-size: 18px; line-height: 1; }
.toast.out { animation: slideout .2s ease-in forwards; }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes slideout { to { opacity: 0; transform: translateX(24px); } }
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: inherit; }
dialog.modal::backdrop { background: rgba(14,49,56,.45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: pop .16s ease-out; }
.modal-head { padding: 20px 22px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font: 600 19px var(--serif); }
.modal-body { padding: 14px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.loading-bar { position: fixed; left: 0; top: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--bns-teal), var(--bns-green)); z-index: 200; transition: width .3s ease, opacity .3s; opacity: 0; }
.loading-bar.on { opacity: 1; }
#page { transition: opacity .12s; }
#page.dim { opacity: .55; }

/* ---------------------------------------------------------------- Auth layout */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }
.auth-brand { background: radial-gradient(1200px 600px at -10% -10%, #1E6C75 0%, transparent 60%), linear-gradient(160deg, var(--bns-teal-deep), #0B2A30 70%); color: #CFE6E9; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand .orbit { position: absolute; border: 1.5px solid rgba(255,255,255,.12); border-radius: 50%; }
.auth-brand .orbit.o1 { width: 620px; height: 240px; right: -220px; top: 120px; transform: rotate(-24deg); }
.auth-brand .orbit.o2 { width: 520px; height: 200px; right: -160px; top: 150px; transform: rotate(18deg); border-color: rgba(157,203,53,.25); }
.auth-brand .nucleus { position: absolute; right: 70px; top: 178px; width: 16px; height: 16px; border-radius: 50%; background: var(--bns-green); box-shadow: 0 0 0 8px rgba(157,203,53,.18), 0 0 40px rgba(157,203,53,.5); }
.auth-logo { background: #fff; border-radius: 14px; padding: 12px 16px; display: inline-block; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.auth-logo img { height: 56px; display: block; }
.auth-brand h1 { color: #fff; font-size: 38px; margin: 34px 0 12px; max-width: 480px; }
.auth-brand p.lead { font-size: 17px; max-width: 460px; color: #B7D5D9; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; max-width: 460px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; }
.auth-points .ic { color: var(--bns-green); margin-top: 3px; }
.auth-foot { font-size: 12.5px; color: #8FB4B9; position: relative; }
.auth-foot a { color: #CFE6E9; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h2 { font-size: 28px; margin-bottom: 6px; }
.auth-card .sub { color: var(--slate-500); margin-bottom: 26px; }
.auth-card .field { margin-bottom: 16px; }
.auth-alt { text-align: center; margin-top: 22px; color: var(--slate-500); font-size: 14px; }
.cf-turnstile { margin: 6px 0 16px; min-height: 65px; }
.auth-wide .auth-card { max-width: 760px; }
@media (max-width: 920px) { .auth { grid-template-columns: 1fr; } .auth-brand { padding: 28px 24px; } .auth-brand h1 { font-size: 26px; margin-top: 20px; } .auth-points, .auth-brand .orbit, .auth-brand .nucleus { display: none; } }

/* ---------------------------------------------------------------- Print */
@media print { .sidebar, .topbar, .toasts, .no-print, details.help { display: none !important; } .app { display: block; } .content { padding: 0; } .card { box-shadow: none; } }

/* Native file inputs */
input[type=file] { font: inherit; font-size: 13px; color: var(--slate-500); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-size: 13px; font-weight: 600; margin-right: 10px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--bns-teal-dark); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--teal-50); }
