/* Sewa Fund ledger. Mobile first; on a wide screen the app stays a 520px column. */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* The rupee sign lives in the extended subset. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }

:root {
  --ground: #EEF2EF;
  --surface: #FFFFFF;
  --ink: #12241D;
  --ink2: #4A5B54;
  --line: #D9E1DC;
  --line2: #E6ECE8;
  --ctl: #C5D0CA;
  --primary: #0B5D4B;
  --primary-dark: #08463A;
  --soft: #DCEEE7;
  --on-primary: #CFE5DD;
  --warn-bg: #FCEBCF;
  --warn: #7A4300;
  --out-bg: #F3E4D7;
  --out: #8A3B12;
  --grey-bg: #E3E9E5;
  --grey: #3B4A44;
  --bad: #A3271B;
  --bad-bg: #FBE4E0;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.4 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, p, ol, ul { margin: 0; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #1F8A70; outline-offset: 2px; }
.ic { flex: 0 0 auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- text helpers ---------- */
.strong { font-weight: 600; }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.muted { color: var(--ink2); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 0; min-width: 0; }
.center { text-align: center; }
.wrap { overflow-wrap: anywhere; }
.ok-text { color: var(--primary); }
.warn-text { color: var(--warn); }
.bad-text { color: var(--bad); }
.link { color: var(--primary); font-weight: 500; text-decoration: none; background: none; border: 0; padding: 0; }
/* A text link is small to look at but must be easy to hit: the padding makes it a 44px target, the margin gives the space back. */
a.link { display: inline-block; padding: 12px 8px; margin: -12px -8px; }
a.link.center { display: block; padding: 12px; margin: 0; }
button.link { min-height: 44px; padding: 0 6px; }
.slot { display: contents; }
.fine { font-size: 12px; color: var(--ink2); text-align: center; }

/* ---------- frame ---------- */
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.has-nav #page { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.main { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.two > .btn { padding: 0 10px; }

.hdr { display: flex; align-items: center; gap: 8px; padding: calc(16px + env(safe-area-inset-top)) 16px 10px 20px; min-height: 68px; }
.hdr:has(> .icon-btn:first-child) { padding-left: 8px; }
.hdr-text { flex: 1 1 0; min-width: 0; }
.hdr h1 { font-size: 21px; font-weight: 600; line-height: 27px; overflow-wrap: anywhere; }
.hdr p { font-size: 13px; color: var(--ink2); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink2); text-transform: uppercase; }
.icon-btn { width: 44px; height: 44px; flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 22px; background: transparent; color: var(--ink); text-decoration: none; }
.icon-btn.solid { background: var(--surface); border: 1px solid var(--line); }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; }

a.pill { min-height: 44px; }
.banner { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; font-size: 13px; font-weight: 500; text-align: left; text-decoration: none; }
.banner.ok { background: var(--primary); color: #fff; }
.banner.bad { background: var(--bad); color: #fff; }
.banner.grey { background: var(--grey-bg); color: var(--grey); }
#banners:not(:empty) { padding-top: env(safe-area-inset-top); }
#banners:not(:empty) + #page .hdr { padding-top: 14px; }

/* ---------- cards ---------- */
.card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card.soft { background: var(--soft); border-color: transparent; }
.card.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }
.card.alarm { background: var(--bad-bg); border-color: var(--bad); }
.card h2, .sheet h2 { font-size: 15px; font-weight: 600; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-head.pad { padding: 14px 16px 6px; }
.alarm-head { display: flex; align-items: center; gap: 10px; }
.alarm-head h2 { font-size: 18px; }
.card.alarm .alarm-head { color: var(--bad); }

.hero { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: var(--primary); color: #fff; }
.hero-label { font-size: 13px; color: var(--on-primary); }
.hero-amount { font-size: 40px; font-weight: 600; line-height: 46px; margin-top: -10px; overflow-wrap: anywhere; }
.hero-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hero-split > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--primary-dark); }
.hero-split span { font-size: 12px; color: var(--on-primary); }
.hero-split b { font-size: 16px; font-weight: 600; }
.hero-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--on-primary); }

.tile { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tile.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.tile-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.tile.warn .tile-top { color: inherit; }
.tile-num { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }

.alert { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 14px; border-radius: 14px; text-decoration: none; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.strip { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; border-radius: 14px; text-decoration: none; }
.strip.ok { background: var(--soft); color: var(--primary); }
.strip.ok .mono { color: var(--ink); }
.strip.bad { background: var(--bad); color: #fff; }
.empty { padding: 28px 16px; text-align: center; color: var(--ink2); }

.meter { display: flex; flex-direction: column; gap: 5px; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.bar { display: flex; height: 6px; border-radius: 3px; background: var(--grey-bg); overflow: hidden; }
.bar-fill { height: 6px; background: var(--primary); }
.bar-fill.pend { background: #D9A441; }
.bar-fill.over { background: var(--bad); }

/* ---------- rows and lists ---------- */
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 12px 14px; border-bottom: 1px solid var(--line2); color: var(--ink); text-decoration: none; }
.card > .row:last-child, .row.bare { border-bottom: 0; }
.row.tight { padding: 8px 0; }
.row.bare { padding: 0; }
.row.static { align-items: flex-start; }
.row.dead .row-title, .row.dead .amount { text-decoration: line-through; color: var(--ink2); }
.row-title { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.amount { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.big { font-size: 17px; }
.seq { flex: 0 0 34px; font-size: 12px; color: var(--ink2); padding-top: 2px; }

.badge { width: 36px; height: 36px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.badge.small { width: 28px; height: 28px; }
.badge.in, .badge.soft { background: var(--soft); color: var(--primary); }
.badge.out { background: var(--out-bg); color: var(--out); }
.badge.flat { background: var(--grey-bg); color: var(--grey); }
.avatar { width: 36px; height: 36px; flex: 0 0 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--grey-bg); font-size: 14px; font-weight: 600; }
.avatar.big { width: 44px; height: 44px; flex-basis: 44px; font-size: 17px; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.chip.big { padding: 6px 10px; font-size: 13px; }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.grey { background: var(--grey-bg); color: var(--grey); }
.chip.ok { background: var(--soft); color: var(--primary); }
.chip.out { background: var(--out-bg); color: #6E2E0C; }
.chip.line { background: var(--surface); border: 1px solid var(--line); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags .chip { padding: 4px 10px; font-size: 12px; }

.line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line2); font-size: 14px; }
.lines > .line:first-child, .card-head + .line, .line.plain { border-top: 0; }
.line.plain { padding: 5px 0; font-size: 13px; align-items: center; }
.line > span { color: var(--ink2); }
.line > b, .line > a { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.line.total { border-top: 2px solid var(--ink); font-size: 16px; }
.line.total > span { color: var(--ink); font-weight: 600; }
.line.total > b { font-weight: 600; }
.line.as-btn { width: 100%; min-height: 44px; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.line.plain.as-btn { border-top: 0; }
.line b .ic { vertical-align: -2px; margin-left: 4px; color: var(--ink2); }

.trow { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 4px; padding: 7px 0; border-top: 1px solid var(--line2); font-size: 13px; }
.trow > span { overflow-wrap: anywhere; }
.trow > span:not(:first-child) { text-align: right; }
@media (max-width: 400px) { .trow { grid-template-columns: minmax(0, 1.05fr) repeat(3, minmax(0, 1fr)); font-size: 12px; } }
.trow.thead { border-top: 0; padding: 0 0 4px; font-size: 12px; font-weight: 500; color: var(--ink2); }
.trow.total { border-top: 2px solid var(--ink); font-weight: 600; }

.tick { width: 22px; height: 22px; flex: 0 0 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--ctl); }
.tick.ok { background: var(--soft); border-color: var(--soft); color: var(--primary); }
.tick.warn { background: var(--warn-bg); border-color: var(--warn-bg); color: var(--warn); }
.tick.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.check-row { display: flex; align-items: flex-start; gap: 10px; }
.step { display: flex; align-items: flex-start; gap: 12px; }
.step-n { width: 24px; height: 24px; flex: 0 0 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; }
.step-n.hollow { background: var(--surface); border: 2px solid var(--ctl); color: var(--ink2); }
.verdict { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.member .link { flex: 0 0 auto; }
.member.off { color: var(--ink2); }
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps .ic { vertical-align: -3px; }
.plain-list { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- entry page ---------- */
.entry-top { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 4px; }
.entry-amount { font-size: 34px; font-weight: 600; line-height: 40px; overflow-wrap: anywhere; }
.proof { padding: 12px; }
.proof-wait { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 96px; border-radius: 10px; background: var(--grey-bg); }
.proof-img { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--grey-bg); }
.proof-img img { display: block; width: 100%; max-height: 240px; object-fit: cover; }
.proof-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; }
.proof-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: var(--ground); color: var(--ink); text-decoration: none; }
.zoomed { display: block; width: 100%; border-radius: 10px; }

/* ---------- forms ---------- */
.form { gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label, .label { font-size: 13px; font-weight: 500; color: var(--ink2); }
input:not([type=checkbox]):not([type=file]), select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--ctl); background: var(--surface); font-size: 16px; color: var(--ink); appearance: none; -webkit-appearance: none; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234A5B54' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
textarea { resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #6B7B74; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.hint { font-size: 12px; color: var(--ink2); }
.err { padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 13px; font-weight: 500; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink); font-weight: 400; }
.check input { width: 22px; height: 22px; flex: 0 0 22px; margin: 0; accent-color: var(--primary); }
.money { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 2px solid var(--primary); }
.money > span { font-size: 28px; font-weight: 500; color: var(--ink2); }
.money input:not([type=checkbox]):not([type=file]) { flex: 1; min-width: 0; min-height: 0; padding: 0; border: 0; background: transparent; font-size: 32px; font-weight: 600; outline: 0; }
.with-btn { display: flex; gap: 8px; }
.with-btn .btn { flex: 0 0 auto; }
.search { position: relative; color: var(--ink2); }
.search .ic { position: absolute; left: 14px; top: 15px; }
.search input:not([type=checkbox]):not([type=file]) { padding-left: 42px; }
.form-foot { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.lock-note { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 17px; color: var(--ink2); }
.lock-note .ic { margin-top: 1px; }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: #DDE5E0; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg button { height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 15px; font-weight: 500; }
.seg button.on { background: var(--surface); font-weight: 600; box-shadow: 0 1px 2px rgba(18, 36, 29, 0.14); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--ctl); background: var(--surface); font-size: 14px; font-weight: 500; }
.pick.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.proof-pick { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.proof-pick img { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 10px; object-fit: cover; background: var(--grey-bg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-size: 15px; font-weight: 600; text-decoration: none; text-align: center; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 52px; border-radius: 14px; font-size: 16px; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.outline { background: var(--surface); border-color: var(--ctl); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.danger { background: var(--bad); color: #fff; }
.busy { opacity: 0.55; pointer-events: none; }

/* ---------- sign-in and other full screens ---------- */
.auth { display: flex; flex-direction: column; gap: 14px; padding: calc(40px + env(safe-area-inset-top)) 20px 28px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 12px; text-align: center; }
.brand h1 { font-size: 24px; font-weight: 600; line-height: 30px; }
.brand p { font-size: 14px; color: var(--ink2); max-width: 30ch; }
.brand-mark { width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; border-radius: 20px; background: var(--primary); color: #fff; }
.brand-mark.warn { background: var(--warn-bg); color: var(--warn); }
.brand-mark.bad { background: var(--bad); color: #fff; }
@keyframes pulse { 50% { opacity: 0.55; } }
.brand-mark.spin { animation: pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .brand-mark.spin { animation: none; } }
.install { flex-direction: row; align-items: center; gap: 10px; padding: 10px 6px 10px 12px; }

/* ---------- bottom navigation ---------- */
.nav { position: fixed; z-index: 5; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 520px; display: flex; align-items: center; padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.nav-item { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: var(--ink2); font-size: 11px; font-weight: 500; text-decoration: none; }
.nav-item.on { color: var(--primary); font-weight: 600; }
.nav-fab { position: relative; flex: 0 0 52px; height: 52px; margin: 0 8px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; text-decoration: none; }
.nav-fab .dot { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: #D9A441; border: 2px solid var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; }

/* ---------- bottom sheets ---------- */
dialog.sheet { width: 100%; max-width: 520px; max-height: 92vh; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 20px 20px 0 0; background: var(--surface); color: var(--ink); overflow: auto; }
dialog.sheet::backdrop { background: rgba(18, 36, 29, 0.5); }
.sheet > form, .sheet > div { display: flex; flex-direction: column; gap: 14px; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet h2 { font-size: 18px; }
.sheet-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin-top: 4px; }
@media (min-width: 560px) { dialog.sheet { margin: auto; border-radius: 20px; } }

#toast { position: fixed; z-index: 30; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); width: max-content; max-width: min(92vw, 480px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

.boot { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.boot-mark { width: 64px; height: 64px; border-radius: 20px; background: var(--primary); }

/* ---------- print: only the report ---------- */
#print { display: none; }
@media print {
  body { background: #fff; }
  #app, #toast, dialog { display: none !important; }
  #print { display: block; font-size: 11pt; color: #000; }
  #print h1 { font-size: 18pt; margin-bottom: 6pt; }
  #print h2 { font-size: 13pt; margin: 14pt 0 4pt; }
  #print p { margin-bottom: 4pt; }
  #print table { width: 100%; border-collapse: collapse; }
  #print th, #print td { padding: 3pt 6pt 3pt 0; border-bottom: 0.5pt solid #999; text-align: left; vertical-align: top; }
  #print .r { text-align: right; white-space: nowrap; }
  #print .nw { white-space: nowrap; overflow-wrap: normal; }
  #print table.small { font-size: 9pt; }
  #print .mono { font-family: var(--mono); font-size: 8.5pt; overflow-wrap: anywhere; }
  #print tr { break-inside: avoid; }
}
