/* NTC Salary Self-Service Portal - interface styles.
   Fonts are self-hosted (no external requests) so the portal works on the hospital network. */

@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/public-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/public-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/newsreader-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/newsreader-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/newsreader-latin-700-normal.woff2") format("woff2"); }

/* Devanagari (Nepali-script) fallback for employee names, designations, departments, and any Admin-edited
   setting that uses Nepali text. Declared under the SAME family names as the Latin faces above, each with
   a unicode-range covering only the Devanagari block (U+0900-097F) -- the browser matches per character,
   so any element already styled with var(--sans) or var(--serif) picks this up automatically with no other
   CSS changes needed, and it's only ever downloaded if the page actually contains a Devanagari character. */
@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0900-097F; src: url("/assets/fonts/noto-sans-devanagari-devanagari-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0900-097F; src: url("/assets/fonts/noto-sans-devanagari-devanagari-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0900-097F; src: url("/assets/fonts/noto-sans-devanagari-devanagari-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0900-097F; src: url("/assets/fonts/noto-sans-devanagari-devanagari-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0900-097F; src: url("/assets/fonts/noto-sans-devanagari-devanagari-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0900-097F; src: url("/assets/fonts/noto-sans-devanagari-devanagari-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0900-097F; src: url("/assets/fonts/noto-sans-devanagari-devanagari-700-normal.woff2") format("woff2"); }

:root {
  --ink: #16222f;
  --slate: #4f6072;
  --faint: #7a8a9b;
  --paper: #f2f4f8;
  --surface: #ffffff;
  --rule: #d6dde6;
  --rule-strong: #b9c4d1;
  --navy: #10294a;
  --navy-2: #1a3a63;
  --navy-ink: #dfe7f2;
  --crimson: #a61b34;
  --link: #1b4b8a;
  --ok: #1d6f46;   --ok-bg: #e5f3ea;
  --warn: #8a5a05; --warn-bg: #fbf0d9;
  --bad: #ab2a22;  --bad-bg: #fbe7e5;
  --info: #1b4b8a; --info-bg: #e4ecf7;
  --radius: 4px;
  --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --side: 252px;
  --strip-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--sans); font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.012em; line-height: 1.2; margin: 0; color: var(--navy); }
h1 { font-size: 1.85rem; } h2 { font-size: 1.28rem; } h3 { font-size: 1.08rem; }
p { margin: 0 0 .8em; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }
.ic { flex: none; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--slate); } .faint { color: var(--faint); }
.small { font-size: .84rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.right { text-align: right; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; align-items: flex-end; }
.grow1 { flex: 1; }
.mt { margin-top: 1rem; }
.mt2 { margin-top: 1.6rem; }
.w-sm { max-width: 240px; }
.stack > * + * { margin-top: 1rem; }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 1.5rem 0; }

/* ---------- application shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--strip-h)); }
.side { background: var(--navy); color: var(--navy-ink); display: flex; flex-direction: column; position: sticky; top: var(--strip-h); height: calc(100vh - var(--strip-h)); overflow-y: auto; }
.brand { padding: 1.35rem 1.4rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand b { display: block; font: 600 1.22rem/1.15 var(--serif); color: #fff; }
.brand span { display: block; margin-top: .25rem; font-size: .8rem; color: #a9bad0; }
.brand::before { content: ""; display: block; width: 28px; height: 3px; background: var(--crimson); margin-bottom: .8rem; }
.menu { padding: .6rem .7rem 1rem; flex: 1; }
.menu h4 { font: 500 .78rem/1 var(--sans); color: #8ea3bd; margin: 1.15rem .7rem .4rem; letter-spacing: .01em; }
.menu a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: var(--radius); color: var(--navy-ink); text-decoration: none; font-size: .92rem; position: relative; }
.menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
.menu a[aria-current="page"] { background: rgba(255,255,255,.11); color: #fff; font-weight: 600; }
.menu a[aria-current="page"]::before { content: ""; position: absolute; left: -.7rem; top: .35rem; bottom: .35rem; width: 3px; background: var(--crimson); border-radius: 0 2px 2px 0; }
.side-foot { padding: .9rem 1.1rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; }
.side-foot .who { color: #fff; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .role { color: #9db0c7; }
.side-foot button { margin-top: .6rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; gap: .75rem; padding: .7rem 1rem; background: var(--navy); color: #fff; position: sticky; top: var(--strip-h); z-index: 20; }
.topbar b { font: 600 1.05rem var(--serif); }
.content { padding: 1.9rem clamp(1rem, 3vw, 2.6rem) 3rem; max-width: 1240px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head p { margin: .3rem 0 0; color: var(--slate); }
.page-foot { margin-top: auto; padding: 1rem clamp(1rem, 3vw, 2.6rem); font-size: .8rem; color: var(--faint); border-top: 1px solid var(--rule); }

@media (max-width: 920px) {
  .shell { display: block; }
  .topbar { display: flex; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(84vw, 300px); z-index: 40; transform: translateX(-102%); transition: transform .18s ease; box-shadow: 0 0 0 100vmax rgba(10, 20, 35, 0); }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 20, 35, .5); }
  .content { padding-top: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .58rem 1.05rem; font: 600 .92rem/1.2 var(--sans); border-radius: var(--radius); border: 1px solid var(--navy); background: var(--navy); color: #fff; text-decoration: none; cursor: pointer; min-height: 40px; }
.btn:hover { background: var(--navy-2); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--navy); border-color: var(--rule-strong); }
.btn.secondary:hover { border-color: var(--navy); background: #f7f9fc; color: var(--navy); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: #8f211b; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--link); padding-inline: .5rem; }
.btn.small { min-height: 32px; padding: .3rem .7rem; font-size: .84rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.side .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.side .btn.secondary:hover { background: rgba(255,255,255,.08); }

label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; color: var(--ink); }
.hint { font-size: .82rem; color: var(--slate); margin-top: .3rem; }
input[type=text], input[type=password], input[type=email], input[type=search], input[type=number], input[type=date], input[type=tel], select, textarea {
  width: 100%; min-height: 42px; padding: .55rem .7rem; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--link); outline-offset: 0; border-color: var(--link); }
input[type=file] { width: 100%; padding: .55rem; border: 1px dashed var(--rule-strong); border-radius: var(--radius); background: #fafbfd; font: inherit; }
input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--navy); margin-right: .5rem; vertical-align: -2px; }
.check { display: flex; align-items: flex-start; gap: .1rem; font-weight: 400; }
.field + .field { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1rem; }
.filters > div { flex: 1 1 150px; min-width: 130px; }
.filters .grow { flex: 2 1 220px; }
.filters .go { flex: 0 0 auto; }

/* ---------- panels, tables, messages ---------- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.panel + .panel, .panel + section, section + .panel { margin-top: 1.4rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem 1.2rem; border-bottom: 1px solid var(--rule); }
.panel-head h2, .panel-head h3 { font-size: 1.05rem; }
.panel-body { padding: 1.2rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 600; font-size: .8rem; color: var(--slate); padding: .6rem .9rem; border-bottom: 1px solid var(--rule-strong); background: #f8fafc; white-space: nowrap; }
td { padding: .65rem .9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tbody tr:hover td { background: #fafcff; }
tfoot td { font-weight: 700; border-top: 1px solid var(--rule-strong); background: #f8fafc; }
.empty { padding: 2.2rem 1.4rem; text-align: center; color: var(--slate); }
.empty b { display: block; font: 600 1.1rem var(--serif); color: var(--navy); margin-bottom: .3rem; }

.alert { display: flex; gap: .75rem; padding: .8rem 1rem; border-radius: var(--radius); border: 1px solid; border-left-width: 4px; margin-bottom: 1.1rem; font-size: .92rem; }
.alert.success { background: var(--ok-bg); border-color: #b6dcc5; border-left-color: var(--ok); color: #124d31; }
.alert.error { background: var(--bad-bg); border-color: #f0c1bd; border-left-color: var(--bad); color: #7d1d17; }
.alert.warning { background: var(--warn-bg); border-color: #ecd49c; border-left-color: var(--warn); color: #634004; }
.alert.info { background: var(--info-bg); border-color: #bcd0ea; border-left-color: var(--info); color: #163d70; }
.alert ul { margin: .25rem 0 0; padding-left: 1.1rem; }

.pill { display: inline-block; padding: .12rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); } .pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); } .pill-info { background: var(--info-bg); color: var(--info); }
.pill-muted { background: #e8edf3; color: var(--slate); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; border-top: 1px solid var(--rule); font-size: .87rem; color: var(--slate); }
.pager a, .pager span.cur { padding: .3rem .7rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); text-decoration: none; background: var(--surface); color: var(--navy); }
.pager span.off { opacity: .4; padding: .3rem .7rem; border: 1px solid var(--rule); border-radius: var(--radius); }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); margin: 0 0 1rem; overflow-x: auto; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--slate); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a[aria-current="true"] { color: var(--navy); border-bottom-color: var(--crimson); font-weight: 600; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.6rem; margin: 0; }
dl.facts dt { color: var(--slate); font-size: .88rem; }
dl.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.facts { grid-template-columns: 1fr; gap: 0; } dl.facts dd { margin-bottom: .7rem; } }

/* key figures: a plain strip separated by rules, not a row of boxes */
.figures { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.figures > div { flex: 1 1 150px; padding: 1rem 1.25rem; border-right: 1px solid var(--rule); }
.figures > div:last-child { border-right: 0; }
.figures .v { font: 600 1.7rem/1.1 var(--serif); color: var(--navy); }
.figures .l { color: var(--slate); font-size: .84rem; margin-top: .2rem; }
@media (max-width: 600px) { .figures > div { flex-basis: 50%; border-bottom: 1px solid var(--rule); } }

/* ---------- salary statement (employee dashboard) ---------- */
.statement { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.statement-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--rule); background: #fbfcfe; }
.statement-head h2 { font-size: 1.5rem; }
.statement-head .who { display: grid; grid-template-columns: repeat(3, auto); gap: .2rem 2rem; font-size: .88rem; }
.statement-head .who span { color: var(--slate); display: block; font-size: .78rem; }
.statement-head .who b { font-weight: 600; }
.ledgers { display: grid; grid-template-columns: 1fr 1fr; }
.ledgers.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) { .ledgers.three { grid-template-columns: 1fr 1fr; } .ledgers.three .ledger:nth-child(3) { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--rule); } }
.ledger { padding: 1.2rem 1.5rem 1.3rem; }
.ledger + .ledger { border-left: 1px solid var(--rule); }
.ledger h3 { font: 600 .95rem var(--sans); color: var(--slate); margin-bottom: .7rem; letter-spacing: 0; }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; align-items: baseline; gap: .6rem; padding: .32rem 0; }
.ledger li::after { content: none; }
.ledger li .dots { flex: 1; border-bottom: 1px dotted var(--rule-strong); transform: translateY(-4px); min-width: 12px; }
.ledger li .amt { font-variant-numeric: tabular-nums; }
.ledger li.total { margin-top: .45rem; padding-top: .6rem; border-top: 1px solid var(--rule-strong); font-weight: 700; color: var(--navy); }
.net { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 1.5rem; background: var(--navy); color: #fff; }
.net .k { color: #b7c7dc; font-size: .86rem; }
.net .v { font: 600 2.35rem/1.05 var(--serif); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.net .v small { font: 500 1rem var(--sans); color: #b7c7dc; margin-right: .35rem; letter-spacing: 0; }
@media (max-width: 760px) { .ledgers, .ledgers.three { grid-template-columns: 1fr; } .ledger + .ledger { border-left: 0 !important; border-top: 1px solid var(--rule); } .statement-head .who { grid-template-columns: 1fr 1fr; } .net .v { font-size: 1.9rem; } }

.year-strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; padding: 1rem 1.2rem 1.1rem; }
.year-strip a, .year-strip div { display: flex; flex-direction: column; align-items: stretch; text-decoration: none; color: var(--slate); font-size: .74rem; text-align: center; border-radius: 3px; padding: 2px 0 4px; }
.year-strip a:hover { background: #eef3fa; }
.year-strip a[aria-current="true"] { background: #e4ecf7; color: var(--navy); font-weight: 700; }
.year-strip svg { width: 100%; height: 84px; display: block; }
.year-strip .bar { fill: #9db3cf; } .year-strip .barnet { fill: var(--navy); }
.year-strip a[aria-current="true"] .bar { fill: #6f8fbb; }
.year-strip .none { fill: var(--rule); }
@media (max-width: 640px) { .year-strip { gap: 2px; padding-inline: .6rem; } .year-strip span { font-size: .62rem; } }

.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.2rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.linklist li:last-child a { border-bottom: 0; }
.linklist li a:hover { background: #f7f9fc; }
.linklist small { color: var(--slate); display: block; }

/* ---------- import steps ---------- */
.steps { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 0 0 1.3rem; padding: 0; list-style: none; font-size: .88rem; }
.steps li { color: var(--faint); display: flex; align-items: center; gap: .45rem; }
.steps li.done { color: var(--ok); } .steps li.now { color: var(--navy); font-weight: 700; }
.steps li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; }
.steps li.done::before { background: currentColor; } .steps li.now::before { background: var(--crimson); border-color: var(--crimson); }
.map-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.4fr); gap: 1rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--rule); }
.map-row:last-child { border-bottom: 0; }
.map-row .req { color: var(--crimson); font-weight: 700; }
.issue { margin: 0; padding-left: 1.05rem; font-size: .85rem; }
.issue li.e { color: var(--bad); } .issue li.w { color: var(--warn); }

/* ---------- public screens ---------- */
.public { min-height: calc(100vh - var(--strip-h)); display: grid; grid-template-columns: minmax(300px, 5fr) 6fr; }
.public-intro { background: var(--navy); color: var(--navy-ink); padding: clamp(1.6rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.public-intro .mark { width: 34px; height: 4px; background: var(--crimson); margin-bottom: 1.4rem; }
.public-intro h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.08; }
.public-intro h2 { color: #c9d6e7; font: 500 1.08rem var(--sans); margin-top: .9rem; letter-spacing: 0; }
.public-intro p { max-width: 36ch; color: #a9bad0; margin-top: 1.4rem; }
.public-intro .fine { font-size: .8rem; color: #8ea3bd; max-width: 46ch; }
.public-form { display: flex; align-items: center; justify-content: center; padding: clamp(1.4rem, 4vw, 3rem); }
.public-form .box { width: min(440px, 100%); }
.public-form h2 { font-size: 1.6rem; margin-bottom: .35rem; }
.public-form .lede { color: var(--slate); margin-bottom: 1.5rem; }
.public-links { margin-top: 1.4rem; display: flex; flex-direction: column; gap: .4rem; font-size: .92rem; }
.staff-login { margin-top: 1.8rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.staff-login summary { color: var(--slate); cursor: pointer; font-size: .92rem; font-weight: 600; }
.staff-login[open] summary { margin-bottom: 1rem; }
@media (max-width: 860px) { .public { display: block; } .public-intro { padding: 1.5rem 1.4rem 1.7rem; gap: 1rem; } .public-intro p, .public-intro .fine { display: none; } .public-form { padding: 1.6rem 1.2rem 2.5rem; align-items: flex-start; } }

.reg-steps { display: flex; gap: .4rem; margin-bottom: 1.4rem; }
.reg-steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--rule); }
.reg-steps span.on { background: var(--navy); }
.otp-input { font: 600 1.7rem var(--sans); letter-spacing: .5em; text-align: center; min-height: 54px; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); margin-bottom: .6rem; }
.choice b { display: block; font-variant-numeric: tabular-nums; }
.rules { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--slate); font-size: .84rem; }
.devbox { border: 1px dashed var(--warn); background: var(--warn-bg); color: var(--warn); padding: .55rem .8rem; border-radius: var(--radius); font-size: .84rem; margin-bottom: 1rem; }

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.error-page .box { max-width: 460px; }
.error-page .code { font: 600 4rem/1 var(--serif); color: var(--crimson); }
.error-page h1 { margin: .4rem 0 .6rem; font-size: 1.6rem; }

.secret { font: 600 1.35rem var(--sans); letter-spacing: .06em; padding: .8rem 1rem; background: #f6f8fb; border: 1px dashed var(--rule-strong); border-radius: var(--radius); user-select: all; display: inline-block; }

dialog { border: 1px solid var(--rule-strong); border-radius: 6px; padding: 1.4rem; max-width: 420px; width: calc(100% - 2rem); box-shadow: 0 18px 50px rgba(10, 20, 35, .28); }
dialog::backdrop { background: rgba(10, 20, 35, .5); }
dialog h3 { margin-bottom: .5rem; } dialog .row { justify-content: flex-end; margin-top: 1.2rem; }

@media print { .side, .topbar, .page-foot, .btn { display: none !important; } .shell { display: block; } body { background: #fff; } }
.w-md { max-width: 440px; }
.row.pad { padding: .85rem 1.2rem; }
.panel .figures { border: 0; border-radius: 0; }
td.nowrap, th.nowrap { white-space: nowrap; }
.tabs .count { color: var(--faint); font-weight: 400; margin-left: .3rem; }
.diff { font-size: .84rem; } .diff s { color: var(--faint); } .diff b { color: var(--navy); }
.inline-form { display: inline; }
.amount-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 640px) { .amount-grid { grid-template-columns: 1fr; } }
.pad-x { padding-inline: 1rem; }

.grid { align-items: start; }
dl.facts.pair { grid-template-columns: 1fr auto; }
@media (max-width: 520px) { dl.facts.pair { grid-template-columns: 1fr auto; gap: .55rem 1rem; } dl.facts.pair dd { margin-bottom: 0; } }

.issue { min-width: 260px; }

/* panels placed side by side must not inherit the vertical-stack margin */
.grid > .panel, .grid > div > .panel:first-child { margin-top: 0; }
.grid.stretch { align-items: stretch; }
.grid.stretch > .panel { display: flex; flex-direction: column; }
.grid.stretch > .panel > .table-wrap, .grid.stretch > .panel > .empty { flex: 1; }
.map-row label .hint { display: block; font-weight: 400; margin-top: .15rem; }

/* ---------- brand strip: Government of Nepal (left) / hospital (right) ---------- */
.brand-strip { background: var(--surface); border-bottom: 1px solid var(--rule); position: relative; z-index: 30; }
.brand-strip .inner { max-width: 1320px; margin: 0 auto; min-height: var(--strip-h); display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem clamp(.75rem, 3vw, 2.6rem); }
.brand-strip .brand-side { display: flex; align-items: center; gap: .6rem; min-width: 0; flex: none; }
.brand-strip .brand-side img { width: 44px; height: 44px; object-fit: contain; flex: none; display: block; }
.brand-strip .brand-side .t { line-height: 1.22; min-width: 0; }
.brand-strip .brand-side .t b { display: block; font: 600 .82rem var(--sans); color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-strip .brand-side .t span { display: block; font-size: .71rem; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-strip .brand-side.right { justify-content: flex-end; text-align: right; }
.brand-strip .mid { display: none; font: 600 .8rem var(--serif); color: var(--navy); text-align: center; flex: 1; }
@media (min-width: 760px) { .brand-strip .mid { display: block; } }
@media (max-width: 480px) { .brand-strip .brand-side .t span { display: none; } .brand-strip .brand-side img { width: 32px; height: 32px; } .brand-strip .brand-side .t b { font-size: .72rem; } }

/* ---------- colourful KPI tiles (dashboards) ---------- */
.figures.colorful { background: transparent; border: 0; gap: .9rem; }
.figures.colorful > div { flex: 1 1 165px; background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--accent, var(--navy)); border-radius: 9px; padding: 1rem 1.15rem 1.1rem; position: relative; overflow: hidden; }
.figures.colorful > div + div { border-left: 1px solid var(--rule); }
.figures.colorful > div::after { content: ""; position: absolute; right: -20px; top: -20px; width: 76px; height: 76px; border-radius: 50%; background: var(--accent-bg, transparent); }
.figures.colorful .tile-ic { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-bg, #eef1f5); color: var(--accent, var(--navy)); position: relative; z-index: 1; margin-bottom: .5rem; }
.figures.colorful .v { position: relative; z-index: 1; color: var(--accent-ink, var(--navy)); }
.figures.colorful .l { position: relative; z-index: 1; }
.figures.colorful .l a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 600px) { .figures.colorful > div { flex-basis: calc(50% - .45rem); border-left: 0 !important; } }

.tile-blue   { --accent: #2f6fed; --accent-bg: #e7eefd; --accent-ink: #1d4ed8; }
.tile-green  { --accent: #1d9a6c; --accent-bg: #e3f7ee; --accent-ink: #0f7a52; }
.tile-amber  { --accent: #c98a12; --accent-bg: #fbf0d9; --accent-ink: #8a5a05; }
.tile-purple { --accent: #7c4fd0; --accent-bg: #f0eafc; --accent-ink: #5f34ad; }
.tile-teal   { --accent: #0e8a82; --accent-bg: #e1f5f3; --accent-ink: #0b6b64; }
.tile-rose   { --accent: #d1447a; --accent-bg: #fbe8f0; --accent-ink: #a82f5f; }

/* small colour wash behind the page heading, one per role, to make each dashboard feel distinct */
.page-head.hero { border-radius: 10px; padding: 1.3rem 1.5rem; margin: -.2rem -.2rem 1.6rem; background: linear-gradient(120deg, var(--hero-a, #eef3fb), var(--hero-b, #f7f9fc)); border: 1px solid var(--rule); }
.page-head.hero h1 { color: var(--navy); }
.role-employee .page-head.hero { --hero-a: #e7eefd; --hero-b: #eaf8f1; }
.role-accounts .page-head.hero { --hero-a: #fbf0d9; --hero-b: #f0eafc; }
.role-admin    .page-head.hero { --hero-a: #e1f5f3; --hero-b: #fbe8f0; }

/* compact variant for the year-to-date tiles, which live in a half-width panel */
.figures.colorful.ytd > div { flex: 1 1 122px; padding: .75rem .85rem .8rem; }
.figures.colorful.ytd .v { font-size: 1.15rem; }
.figures.colorful.ytd .l { font-size: .76rem; }
.figures.colorful.ytd .tile-ic { width: 26px; height: 26px; margin-bottom: .35rem; }
@media (max-width: 460px) { .figures.colorful.ytd > div { flex-basis: calc(50% - .45rem); } }

.section-label { padding-top: 1rem !important; }

/* =====================================================================
   Motion and the employee dashboard.
   Motion is kept to: one entrance on the sign-in forms, a shake on a refused sign-in,
   feedback on things people press, and ONE orchestrated moment on the employee
   dashboard (net salary counts up, the year's bars rise). All of it is switched off
   by the prefers-reduced-motion rule above.
   ===================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-30px, 18px, 0); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.anim-in { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.anim-in.d1 { animation-delay: .04s; } .anim-in.d2 { animation-delay: .1s; } .anim-in.d3 { animation-delay: .16s; }
.anim-in.d4 { animation-delay: .22s; } .anim-in.d5 { animation-delay: .3s; } .anim-in.d6 { animation-delay: .38s; }
.shake { animation: shake .45s ease-in-out; }

/* sign-in pages: a slow-moving contour field behind the hospital name */
.public-intro { position: relative; overflow: hidden; isolation: isolate; }
.public-intro::before { content: ""; position: absolute; inset: -20% -20% -20% -20%; z-index: -1; opacity: .5;
  background: repeating-radial-gradient(circle at 18% 85%, transparent 0 34px, rgba(255, 255, 255, .055) 34px 35px);
  animation: drift 26s ease-in-out infinite alternate; }
.eyebrow { display: inline-block; margin-bottom: .55rem; padding: .18rem .65rem; border-radius: 99px; font-size: .8rem; font-weight: 600; background: var(--info-bg); color: var(--info); }
.eyebrow-employee { background: #e3f7ee; color: #0f7a52; }
.eyebrow-accounts { background: var(--warn-bg); color: var(--warn); }
.eyebrow-admin { background: #f0eafc; color: #5f34ad; }

/* things people press respond */
.btn { transition: background-color .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease; }
.btn:hover { box-shadow: 0 4px 12px rgba(16, 41, 74, .18); }
.btn:active { transform: translateY(1px) scale(.985); box-shadow: none; }
.btn.danger-outline { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.danger-outline:hover { background: var(--bad-bg); box-shadow: none; }
input, select, textarea { transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(27, 75, 138, .16); }
.menu a { transition: background-color .15s ease, padding-left .15s ease; }
.menu a:hover { padding-left: .95rem; }
.linklist li a { transition: background-color .15s ease, padding-left .15s ease; }
.linklist li a:hover { padding-left: 1.5rem; }
tbody tr td { transition: background-color .12s ease; }
.alert { animation: rise .35s ease both; }
dialog[open] { animation: rise .22s ease both; }

/* ---------- employee dashboard ---------- */
.emp-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 12px; color: #fff; padding: 1.6rem clamp(1.1rem, 3vw, 2rem) 1.5rem;
  background: linear-gradient(125deg, var(--navy) 0%, #17406f 62%, #1c5a73 100%); margin-bottom: 1.4rem; }
.emp-hero::before { content: ""; position: absolute; inset: -30% -10% -30% 35%; z-index: -1; opacity: .55;
  background: repeating-radial-gradient(circle at 90% 20%, transparent 0 30px, rgba(255, 255, 255, .06) 30px 31px); animation: drift 30s ease-in-out infinite alternate; }
.emp-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--crimson), #e0637b 40%, transparent); }
.emp-hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.emp-who { display: flex; align-items: center; gap: .95rem; min-width: 0; }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 600 1.15rem var(--serif); color: var(--navy); background: #e8f0fb; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.emp-who h1 { color: #fff; font-size: clamp(1.35rem, 2.6vw, 1.85rem); overflow-wrap: anywhere; }
.emp-who p { margin: .2rem 0 0; color: #b9cbe2; font-size: .9rem; }
.emp-hero select { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35); min-height: 38px; }
.emp-hero select option { color: var(--ink); }
.emp-hero-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem 2.4rem; align-items: end; margin-top: 1.5rem; }
.emp-net .k { color: #b9cbe2; font-size: .9rem; }
.emp-net .v { font: 600 clamp(2.3rem, 6vw, 3.5rem)/1.05 var(--serif); letter-spacing: -.015em; font-variant-numeric: tabular-nums; margin-top: .15rem; }
.emp-net .v small { font: 500 1rem var(--sans); color: #b9cbe2; margin-right: .4rem; letter-spacing: 0; }
.emp-net .cta { margin-top: 1rem; }
.emp-net .btn { background: #fff; color: var(--navy); border-color: #fff; }
.emp-net .btn:hover { background: #e8f0fb; }
.emp-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.emp-mini > div { background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); border-radius: 9px; padding: .7rem .8rem; min-width: 0; }
.emp-mini .l { color: #b9cbe2; font-size: .78rem; }
.emp-mini .n { font: 600 1.02rem/1.25 var(--serif); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 760px) { .emp-hero-body { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .emp-mini { grid-template-columns: 1fr; } }

/* the hero's own entrance: net figure first, then the three small ones */
.emp-hero .emp-net { animation: rise .6s cubic-bezier(.2, .7, .2, 1) .05s both; }
.emp-hero .emp-mini > div { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.emp-hero .emp-mini > div:nth-child(1) { animation-delay: .25s; } .emp-hero .emp-mini > div:nth-child(2) { animation-delay: .33s; } .emp-hero .emp-mini > div:nth-child(3) { animation-delay: .41s; }

/* the year's bars rise once, left to right */
.year-strip .bar, .year-strip .barnet { transform-box: fill-box; transform-origin: bottom; animation: grow-y .6s cubic-bezier(.2, .7, .2, 1) both; }
.year-strip > *:nth-child(1) rect { animation-delay: .35s; } .year-strip > *:nth-child(2) rect { animation-delay: .41s; } .year-strip > *:nth-child(3) rect { animation-delay: .47s; }
.year-strip > *:nth-child(4) rect { animation-delay: .53s; } .year-strip > *:nth-child(5) rect { animation-delay: .59s; } .year-strip > *:nth-child(6) rect { animation-delay: .65s; }
.year-strip > *:nth-child(7) rect { animation-delay: .71s; } .year-strip > *:nth-child(8) rect { animation-delay: .77s; } .year-strip > *:nth-child(9) rect { animation-delay: .83s; }
.year-strip > *:nth-child(10) rect { animation-delay: .89s; } .year-strip > *:nth-child(11) rect { animation-delay: .95s; } .year-strip > *:nth-child(12) rect { animation-delay: 1.01s; }
.year-strip a { transition: background-color .15s ease, transform .15s ease; } .year-strip a:hover { transform: translateY(-2px); }

/* statement lines and year-to-date tiles */
.role-employee .statement { border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 41, 74, .06); }
.role-employee .panel { border-radius: 12px; }
.role-employee .figures.colorful.ytd > div { transition: transform .15s ease, box-shadow .15s ease; }
.role-employee .figures.colorful.ytd > div:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(16, 41, 74, .1); }
.ledger li { transition: background-color .12s ease; }
.ledger li:hover { background: #f5f8fc; }

/* =====================================================================
   Phones and small tablets
   ===================================================================== */
.grid > *, .panel, .panel-body, .statement, .ledger { min-width: 0; }
.panel { max-width: 100%; }
input, select, textarea { max-width: 100%; }
td, th { overflow-wrap: anywhere; }
img, svg { max-width: 100%; }

@media (max-width: 640px) {
  :root { --strip-h: 56px; }
  body { font-size: 15px; }
  .content { padding: 1.1rem 1rem 2.5rem; }
  h1 { font-size: 1.5rem; }
  .page-head { gap: .7rem; margin-bottom: 1.1rem; }
  .page-head > .btn, .page-head > .row { width: 100%; }
  .page-head .row { gap: .5rem; }
  .page-head .row .btn { flex: 1 1 100%; }
  /* 16px stops iPhones zooming into a field when it is tapped; taller targets are easier on a thumb */
  input, select, textarea { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 40px; }
  .menu a { padding: .75rem .8rem; }
  .filters > div, .filters .grow { flex: 1 1 100%; min-width: 0; }
  .filters .go .btn { width: 100%; }
  .panel-head { flex-wrap: wrap; padding: .85rem 1rem; }
  .panel-body { padding: 1rem; }
  .pager { flex-wrap: wrap; justify-content: center; text-align: center; }
  .row.nowrap { flex-wrap: wrap; }
  .row.nowrap > .btn { width: 100%; }
  .grid.two > .field, .grid.two.field { grid-template-columns: 1fr; }
  .statement-head { padding: 1rem; }
  .ledger { padding: .9rem 1rem; }
  .emp-hero { padding: 1.2rem 1rem 1.2rem; border-radius: 10px; }
  .emp-hero select { width: 100%; }
  .emp-hero form.row { width: 100%; gap: .5rem; flex-wrap: nowrap; }
  .emp-hero form.row > div { flex: 1 1 0; min-width: 0; }
  .emp-net .btn { width: 100%; }
  .year-strip a, .year-strip div { min-width: 0; }
  dialog { padding: 1.1rem; }
  dialog .row { flex-direction: column-reverse; align-items: stretch; }
  dialog .row .btn { width: 100%; }
  .public-form .box { width: 100%; }
  .otp-input { font-size: 1.5rem; letter-spacing: .35em; }
}

/* Tables become one card per row on phones. app.js copies each column heading onto its cells (data-label),
   so no page needs its own mobile layout. Add class "keep-table" to a table to keep the normal grid. */
@media (max-width: 640px) {
  .table-wrap { overflow-x: visible; }
  .table-wrap table:not(.keep-table), .table-wrap table:not(.keep-table) tbody, .table-wrap table:not(.keep-table) tr, .table-wrap table:not(.keep-table) td, .table-wrap table:not(.keep-table) tfoot { display: block; width: 100%; }
  .table-wrap table:not(.keep-table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap table:not(.keep-table) tbody tr, .table-wrap table:not(.keep-table) tfoot tr { padding: .6rem 1rem; border-bottom: 8px solid var(--paper); }
  .table-wrap table:not(.keep-table) tr:last-child { border-bottom: 0; }
  .table-wrap table:not(.keep-table) td { display: grid; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr); gap: .15rem .8rem; padding: .4rem 0; border: 0; text-align: left; white-space: normal; }
  .table-wrap table:not(.keep-table) td[data-label]::before { content: attr(data-label); color: var(--slate); font-size: .78rem; font-weight: 600; padding-top: .1rem; }
  .table-wrap table:not(.keep-table) td:not([data-label]) { display: block; }
  .table-wrap table:not(.keep-table) td.num { text-align: left; }
  .table-wrap table:not(.keep-table) td.empty { display: block; padding: 1.6rem 0; text-align: center; }
  .table-wrap table:not(.keep-table) td.empty::before { content: none; }
  .table-wrap table:not(.keep-table) tbody tr:hover td { background: transparent; }
}
@media (max-width: 640px) { .map-row { grid-template-columns: minmax(0, 1fr); gap: .45rem; } }
@media (max-width: 400px) {
  .brand-strip .inner { gap: .4rem; padding-inline: .6rem; }
  .brand-strip .brand-side { flex: 1 1 0; min-width: 0; gap: .4rem; }
  .brand-strip .brand-side.right { flex-direction: row; }
  .brand-strip .brand-side .t b { font-size: .68rem; }
}

/* 50% service expansion allowance, shown on its own in the month it is received */
.alw-card { display: grid; gap: 8px; margin: 0 0 18px; padding: 16px 18px; border-radius: 14px; border: 1px solid #e3c98a; background: linear-gradient(135deg, #fff8e6, #fff); animation: rise .5s ease both; }
.alw-card .eyebrow { color: #8a5a00; font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.alw-card .alw-amt { font-size: 1.7rem; font-weight: 700; color: #1b2a4a; }
.alw-card .alw-amt small { font-size: .9rem; font-weight: 600; opacity: .7; }
.alw-card p { margin: 0; color: #4a5568; font-size: .92rem; }
.alw-card .alw-covers { margin-top: 4px; color: #5c4a1e; font-size: .9rem; }

.income-lines { margin-top: 14px; }

.sig-preview { margin-bottom: 12px; padding: 10px; border: 1px dashed var(--line, #cbd5e1); border-radius: 8px; background: #fff; display: inline-block; }
.sig-preview img { display: block; max-height: 70px; max-width: 220px; }

/* colourful donut charts on the employee dashboard */
.donut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 18px; }
.donut-card { margin: 0; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line, #e2e8f0); box-shadow: 0 1px 2px rgba(15,23,42,.04); animation: rise .5s ease both; }
.donut-card figcaption { display: grid; gap: 2px; margin-bottom: 8px; }
.donut-card figcaption span { color: #64748b; font-size: .82rem; }
.donut-wrap { position: relative; width: min(100%, 190px); margin: 0 auto; }
.donut { display: block; width: 100%; height: auto; transform: rotate(0deg); animation: donut-in .9s cubic-bezier(.2,.8,.2,1) both; }
.donut-hole { fill: #fff; }
.donut .seg { transition: stroke-width .18s ease; }
.donut .seg:hover { stroke-width: 7.4; }
.donut-centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-centre small { color: #64748b; font-size: .72rem; }
.donut-centre b { font-size: .98rem; color: #1b2a4a; }
.donut-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; font-size: .84rem; }
.donut-legend li { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 8px; }
.donut-legend b { color: #334155; font-variant-numeric: tabular-nums; }
.donut-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: block; }
.donut-empty { padding: 36px 0; text-align: center; }
.seg.c1 { stroke: #2563eb; } .seg.c2 { stroke: #f59e0b; } .seg.c3 { stroke: #10b981; } .seg.c4 { stroke: #ec4899; }
.seg.c5 { stroke: #8b5cf6; } .seg.c6 { stroke: #06b6d4; } .seg.c7 { stroke: #ef4444; } .seg.c8 { stroke: #84cc16; }
.dot.c1 { background: #2563eb; } .dot.c2 { background: #f59e0b; } .dot.c3 { background: #10b981; } .dot.c4 { background: #ec4899; }
.dot.c5 { background: #8b5cf6; } .dot.c6 { background: #06b6d4; } .dot.c7 { background: #ef4444; } .dot.c8 { background: #84cc16; }
@keyframes donut-in { from { opacity: 0; transform: rotate(-70deg) scale(.92); } to { opacity: 1; transform: rotate(0) scale(1); } }
@media (max-width: 900px) { .donut-grid { grid-template-columns: 1fr; } .donut-card { display: grid; grid-template-columns: minmax(120px, 170px) 1fr; gap: 6px 16px; align-items: center; } .donut-card figcaption { grid-column: 1 / -1; } .donut-wrap { width: 100%; } .donut-legend { margin: 0; } }
@media (max-width: 480px) { .donut-card { grid-template-columns: 1fr; } .donut-wrap { width: min(70%, 190px); margin: 0 auto; } }
@media (prefers-reduced-motion: reduce) { .donut, .donut-card { animation: none; } }

.income-lines { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.income-lines li { display: flex; align-items: baseline; gap: 8px; }
.income-lines .dots { flex: 1; border-bottom: 1px dotted #cbd5e1; transform: translateY(-3px); }
.income-lines .amt { font-variant-numeric: tabular-nums; }
.income-lines li.total { border-top: 1px solid #e2e8f0; padding-top: 8px; font-weight: 700; color: #1b2a4a; }
.emp-mini .n { white-space: nowrap; font-size: clamp(.9rem, 1.4vw, 1.05rem); }

.alw-card.fest-card { border-color: #f0b3c4; background: linear-gradient(135deg, #fff0f4, #fff); }
.fest-card .eyebrow { color: #a3173f; }
