@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/noto-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: "Noto Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/noto-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; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-latin-700-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: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/noto-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Tiro Kannada"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/tiro-kannada-latin-400-normal.woff2) format("woff2"); }

:root {
  --ink: #1c2a22; --muted: #5b6b60; --faint: #8a988e; --line: #e3ebe4; --rule: #c9d6cc; --paper: #ffffff; --wash: #f3f7f1; --wash-2: #e9f1e5;
  --leaf: #2f6b2f; --leaf-2: #5e9e3a; --leaf-ink: #ffffff; --turmeric: #c0841a; --red: #a3341c; --red-wash: #fbece8; --warn-bg: #fff4d6;
  --focus: #1f6fb2; --shadow: 0 10px 30px rgba(28, 42, 34, 0.16);
  --text: var(--ink); --soft: var(--wash); --accent: var(--leaf); --neg: var(--red); --pos: var(--leaf);
  --serif: "Tiro Kannada", "Noto Serif", Georgia, serif;
  --sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px; --rail: 236px; --tabbar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e4ece5; --muted: #a3b2a7; --faint: #75857a; --line: #26342b; --rule: #34463a; --paper: #111a14; --wash: #17221b; --wash-2: #1d2a21;
    --leaf: #7dbb5a; --leaf-2: #9fd17d; --leaf-ink: #0e1a10; --turmeric: #e0a640; --red: #f08a72; --red-wash: #3a1f19; --warn-bg: #3a3018;
    --focus: #79b8ff; --shadow: 0 10px 30px rgba(0, 0, 0, 0.5); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); font-variant-numeric: tabular-nums; }
a { color: var(--leaf); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { line-height: 1.2; }
h1 { font: 400 1.8rem/1.15 var(--serif); margin: 0 0 4px; letter-spacing: -0.005em; }
h2 { font: 400 1.35rem/1.2 var(--serif); margin: 26px 0 8px; }
h3 { font-size: 1rem; font-weight: 650; margin: 18px 0 6px; }
p { margin: 0 0 10px; }
.lede { color: var(--muted); margin-bottom: 18px; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.in { color: var(--leaf); }
.out { color: var(--ink); }
.neg { color: var(--red); }

.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 8px; }
.boot img { margin: 0 auto; }

/* Shell */
.app { min-height: 100vh; }
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.topbar .brand img { width: 30px; height: auto; }
.topbar .brand span { font: 400 1.12rem/1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.fy-select { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 4px 10px; font-size: 0.85rem; min-height: 34px; }
.rail { display: none; }
.main { padding: 16px 16px calc(var(--tabbar) + env(safe-area-inset-bottom) + 28px); max-width: 1120px; width: 100%; min-width: 0; overflow-x: clip; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabbar); color: var(--muted); text-decoration: none; font-size: 0.72rem; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--leaf); font-weight: 650; }
.tabbar a.add { color: var(--leaf-ink); }
.tabbar a.add .plus { width: 52px; height: 52px; border-radius: 50%; background: var(--leaf); display: grid; place-items: center; margin-top: -22px; box-shadow: 0 6px 16px rgba(47, 107, 47, 0.35); }
.tabbar a.add .plus svg { width: 26px; height: 26px; }
.tabbar a.add span:last-child { color: var(--leaf); font-weight: 650; }
@media (min-width: 960px) {
  .shell { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .topbar, .tabbar { display: none; }
  .rail { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); padding: 18px 12px; background: var(--wash); }
  .rail .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 8px 14px; text-decoration: none; color: var(--ink); }
  .rail .brand img { width: 150px; height: auto; }
  .rail .brand span { font: 400 1.05rem/1.2 var(--serif); color: var(--muted); }
  .rail .fy-select { margin: 0 8px 12px; }
  .rail .add-btn { margin: 0 8px 14px; }
  .rail nav { display: flex; flex-direction: column; gap: 1px; }
  .rail nav .nav-group { font-size: 0.75rem; color: var(--faint); margin: 12px 10px 4px; }
  .rail nav a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 0.95rem; }
  .rail nav a:hover { background: var(--wash-2); }
  .rail nav a[aria-current="page"] { background: var(--paper); color: var(--leaf); font-weight: 650; box-shadow: inset 3px 0 0 var(--leaf); }
  .rail .who { margin-top: auto; padding: 14px 10px 0; font-size: 0.85rem; color: var(--muted); }
  .main { padding: 28px 36px 60px; }
}

/* Page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-bottom: 14px; }
.page-head .grow { flex: 1 1 260px; min-width: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 6px; }
.back svg { width: 18px; height: 18px; flex: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--leaf); border-color: var(--leaf); color: var(--leaf-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--rule)); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--leaf); padding-inline: 8px; }
.btn.small { min-height: 34px; padding: 4px 10px; font-size: 0.88rem; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }

/* The accountant's summary: single rule above the total, double rule below. */
.abstract { max-width: 560px; margin: 4px 0 22px; }
.abstract .line { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.abstract .line .label { color: var(--muted); }
.abstract .line .value { font-weight: 600; }
.abstract .result { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0 8px; margin-top: 2px; border-top: 1.5px solid var(--ink); border-bottom: 4px double var(--ink); }
.abstract .result .label { font-weight: 650; }
.abstract .result .value { font: 650 1.75rem/1.1 var(--sans); font-variant-numeric: proportional-nums; letter-spacing: -0.01em; }
.abstract .note { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }

/* Ledger-ruled lists */
.rows { list-style: none; margin: 0 0 18px; padding: 0; }
.rows > li { border-bottom: 1px solid var(--line); }
.rows > li > a, .rows > li > .row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: inherit; text-decoration: none; min-height: 48px; }
.rows > li > a:hover { background: var(--wash); }
.rows .main-text { flex: 1; min-width: 0; }
.rows .title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .meta { display: block; color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .amount { font-weight: 650; white-space: nowrap; }
.rows .badge { font-size: 0.72rem; border: 1px solid var(--rule); border-radius: 999px; padding: 1px 7px; color: var(--muted); white-space: nowrap; }
.rows .cancelled .title, .rows .cancelled .amount { text-decoration: line-through; color: var(--faint); }
.day { position: sticky; top: 52px; z-index: 5; background: var(--paper); padding: 10px 2px 4px; font-size: 0.82rem; color: var(--muted); font-weight: 650; border-bottom: 1px solid var(--rule); }
@media (min-width: 960px) { .day { top: 0; } }

/* Bar list for top heads */
.bars { list-style: none; padding: 0; margin: 0 0 18px; max-width: 640px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 6px 0; }
.bars .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--wash-2); overflow: hidden; }
.bars .bar span { display: block; height: 100%; background: var(--turmeric); border-radius: 3px; }
.bars.income .bar span { background: var(--leaf-2); }
.bars a { color: inherit; text-decoration: none; }

.grid-2 { display: grid; gap: 8px 32px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.cash-list { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 6px; }
.cash-list a { text-decoration: none; color: inherit; }
.cash-list .label { color: var(--muted); font-size: 0.85rem; display: block; }
.cash-list .value { font-weight: 650; font-size: 1.1rem; }
.notice { background: var(--warn-bg); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; }
.notice.error { background: var(--red-wash); color: var(--red); }
.notice a { font-weight: 600; }

/* Forms */
.form { max-width: 640px; }
.form.wide-form { max-width: 920px; }
.table select.input { min-width: 104px; }
.table td .picker { min-width: 200px; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
.field > label, .field > .label { font-weight: 600; font-size: 0.92rem; }
.field .hint { color: var(--muted); font-size: 0.82rem; }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); font-size: 16px; }
textarea.input { min-height: 72px; resize: vertical; }
.input:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 25%, transparent); }
.row-fields { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.row-fields.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 520px) { .row-fields.three { grid-template-columns: 1fr 1fr; } }
.amount-field { position: relative; }
.amount-field .rupee { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--muted); pointer-events: none; }
.amount-field .input { font-size: 1.9rem; font-weight: 600; padding-left: 40px; min-height: 62px; letter-spacing: -0.01em; }
.amount-words { color: var(--muted); font-size: 0.82rem; min-height: 1.2em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); cursor: pointer; font-size: 0.95rem; }
.chip[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: var(--leaf-ink); font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--leaf); }
.err { color: var(--red); font-size: 0.88rem; margin: 6px 0; }
.sticky-actions { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--paper) 30%); padding: 16px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 960px) { .sticky-actions { bottom: 0; } }

/* What-happened chooser */
.kinds { display: grid; grid-template-columns: 1fr; gap: 0; max-width: 640px; border-top: 1px solid var(--line); }
.kinds a { display: grid; grid-template-columns: 44px 1fr; gap: 2px 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.kinds a:hover { background: var(--wash); }
.kinds .ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--wash-2); color: var(--leaf); }
.kinds .ico svg { width: 24px; height: 24px; }
.kinds .ico.out { color: var(--turmeric); }
.kinds strong { font-size: 1.05rem; }
.kinds span.d { color: var(--muted); font-size: 0.88rem; }

/* Account picker */
.picker { position: relative; }
.picker .list { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); max-height: 300px; overflow-y: auto; box-shadow: var(--shadow); position: absolute; left: 0; right: 0; z-index: 15; }
.picker .list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: block; line-height: 1.3; }
.picker .list li .g { display: block; color: var(--faint); font-size: 0.76rem; }
.picker .list li[aria-selected="true"], .picker .list li:hover { background: var(--wash-2); }
.picker .list .hdr { color: var(--faint); font-size: 0.75rem; cursor: default; padding: 8px 10px 2px; }
.picker .list .hdr:hover { background: none; }
.picker .list.floating { position: fixed; right: auto; z-index: 45; margin: 0; }
.field .hint.warn, .picker .hint.warn { color: var(--red); font-size: 0.82rem; margin-top: 4px; }

/* Journal grid */
.jgrid { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.jgrid th { text-align: left; font-size: 0.78rem; color: var(--muted); font-weight: 600; padding: 4px; }
.jgrid td { padding: 4px; vertical-align: top; }
.jgrid .input { min-height: 40px; padding: 6px 8px; }
.jgrid .amt { width: 120px; }
.jgrid .x { width: 34px; }
.jgrid .input { min-width: 0; }
@media (max-width: 720px) {
  .jgrid, .jgrid tbody { display: block; }
  .jgrid thead { display: none; }
  .jgrid tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; grid-template-areas: "acc acc x" "dr cr x" "cc qty x"; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .jgrid td { padding: 0; min-width: 0; }
  .jgrid td.acc { grid-area: acc; }
  .jgrid td.dr { grid-area: dr; }
  .jgrid td.cr { grid-area: cr; }
  .jgrid td.cc { grid-area: cc; }
  .jgrid td.qty { grid-area: qty; }
  .jgrid td.x { grid-area: x; align-self: start; }
  .jgrid td.cc:empty { display: none; }
  .jgrid .amt { width: 100%; }
}
.jtotal { display: flex; gap: 16px; justify-content: flex-end; font-weight: 600; margin: 4px 0 12px; }
.jtotal .bad { color: var(--red); }

/* Tables inside the app */
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: 0.78rem; color: var(--muted); font-weight: 600; border-bottom-color: var(--rule); }
.table td.num, .table th.num { text-align: right; }
.table .input { min-height: 38px; padding: 5px 8px; }
.table .input.amt { text-align: right; max-width: 150px; margin-left: auto; display: block; }
.table tr.total td { font-weight: 700; border-top: 1.5px solid var(--ink); }
.phone-only { display: none; }
@media (max-width: 560px) {
  .hide-phone { display: none; }
  .phone-only { display: block; }
  .table .input.amt { min-width: 92px; }
  /* Opening balances: the account name on its own line, the boxes below. */
  .table.openings, .table.openings tbody { display: block; }
  .table.openings thead { display: none; }
  .table.openings tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "name name" "dr cr" "cost cost"; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .table.openings tr.grp { display: block; padding: 10px 0 0; border-bottom: 0; }
  .table.openings td { border: 0; padding: 0; min-width: 0; }
  .table.openings td.name { grid-area: name; font-weight: 600; }
  .table.openings td.dr { grid-area: dr; } .table.openings td.cr { grid-area: cr; } .table.openings td.cost { grid-area: cost; }
  .table.openings td.cost:empty { display: none; }
  .table.openings .input.amt { max-width: none; width: 100%; min-width: 0; }
}

/* Report viewer */
.report-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0 0 14px; }
.report-controls .field { margin: 0; min-width: 0; flex: 1 1 140px; }
.report-controls .field.grow { flex: 2 1 220px; }
.report-controls > .btn { flex: none; }
.report-controls .input { min-height: 40px; }
.report-body { border-top: 1px solid var(--line); padding-top: 14px; }
.report-list { display: grid; gap: 4px 28px; grid-template-columns: 1fr; margin-bottom: 10px; }
@media (min-width: 760px) { .report-list { grid-template-columns: 1fr 1fr; } }
.report-list a { display: block; padding: 10px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.report-list a strong { display: block; }
.report-list a span { color: var(--muted); font-size: 0.85rem; }

/* Entry detail */
.attachments { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }
.attachments a { display: block; width: 96px; height: 96px; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--wash); text-decoration: none; color: var(--muted); font-size: 0.75rem; }
.attachments img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attachments .pdf { display: grid; place-items: center; height: 100%; padding: 6px; text-align: center; }
.history { list-style: none; padding: 0; margin: 0; font-size: 0.88rem; }
.history li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.history .when { color: var(--muted); }

/* Sheet (dialog) */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(15, 25, 18, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
.sheet h2 { margin-top: 0; }
@media (min-width: 720px) { .scrim { align-items: center; } .sheet { width: min(560px, 92vw); border-radius: 16px; } }

.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 14px); background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: min(92vw, 520px); display: flex; gap: 12px; align-items: center; }
.toast a { color: var(--leaf-2); font-weight: 650; }
@media (min-width: 960px) { .toast { bottom: 24px; } }

/* Sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--wash); }
.signin form { width: min(400px, 100%); background: var(--paper); padding: 28px 24px; border-radius: 16px; border: 1px solid var(--line); }
.signin .logo { width: 210px; max-width: 100%; height: auto; display: block; margin: 0 0 10px; }
.signin h1 { font-size: 1.5rem; margin-bottom: 18px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: 760px; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 22px 44px; border-left: 1px solid var(--rule); margin-left: 14px; }
.steps > li:last-child { border-left-color: transparent; }
.steps > li::before { content: counter(step); position: absolute; left: -15px; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--leaf); color: var(--leaf); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; }
.steps > li.done::before { content: "\2713"; background: var(--leaf); color: var(--leaf-ink); }
.steps h3 { margin-top: 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--rule); margin: 0 0 14px; }
.tabs button { border: 0; background: none; padding: 10px 12px; cursor: pointer; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs button[aria-selected="true"] { color: var(--leaf); border-bottom-color: var(--leaf); }
details.more { margin: 8px 0 14px; }
details.more summary { cursor: pointer; color: var(--leaf); font-weight: 600; padding: 6px 0; }
.empty { color: var(--muted); padding: 18px 0; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.5s; } * { scroll-behavior: auto !important; } }
/* Order inquiries */
.count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--turmeric); color: var(--paper);
  font-size: 0.75rem; font-weight: 700; line-height: 20px; text-align: center; vertical-align: 1px; }
.count[hidden], .tabbar .dot[hidden] { display: none; }
.tabbar a { position: relative; }
.tabbar .dot { position: absolute; top: 10px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--turmeric); }
.status { font-size: 0.75rem; font-weight: 650; border: 1px solid var(--rule); border-radius: 999px; padding: 1px 8px; color: var(--muted); white-space: nowrap; vertical-align: middle; }
h1 .status { font-size: 0.8rem; }
.status.new { background: var(--warn-bg); border-color: transparent; color: var(--ink); }
.status.contacted, .status.confirmed { background: var(--wash-2); border-color: transparent; color: var(--leaf); }
.status.delivered { color: var(--leaf); }
.status.cancelled, .status.spam { color: var(--faint); }
.search-row { display: flex; gap: 8px; margin: 0 0 12px; }
.search-row .input { flex: 1; min-width: 0; }
.kv { display: grid; gap: 6px 24px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 0 0 4px; }
.kv .label { display: block; color: var(--muted); font-size: 0.82rem; }
.order-message { white-space: pre-wrap; background: var(--wash); border-radius: var(--radius); padding: 10px 14px; max-width: 70ch; }
.history .note-text { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.devices .meta { white-space: normal; }

/* File viewer: saved PDFs and bills */
.file-actions { margin-top: 0; }
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 4px 0 24px; }
.pdf-pages img { display: block; width: 100%; max-width: 900px; height: auto; background: #fff; border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 2px 10px rgba(28, 42, 34, 0.12); }

@media print {
  .rail, .topbar, .tabbar, .page-head .actions, .report-controls, .no-print { display: none !important; }
  .main { padding: 0; }
  body { background: #fff; color: #000; }
}
