/* VidhiOn on the phone (VOnApp/web, 27-10-2026) - the look of the reminder page (tools/vidhion_remind), light and dark */
:root {
  --ink: #0f172a; --soft: #64748b; --faint: #94a3b8; --line: #e2e8f0; --bg: #f1f5f9; --card: #ffffff;
  --brand: #4f46e5; --brand-soft: #eef2ff; --go: #059669; --go-soft: #ecfdf5; --warn: #d97706; --warn-soft: #fffbeb;
  --bad: #dc2626; --bad-soft: #fef2f2; --nav: #ffffff; --shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e2e8f0; --soft: #94a3b8; --faint: #64748b; --line: #1e293b; --bg: #0f172a; --card: #1e293b;
    --brand: #818cf8; --brand-soft: #1e1b4b; --go: #34d399; --go-soft: #064e3b; --warn: #fbbf24; --warn-soft: #451a03;
    --bad: #f87171; --bad-soft: #450a0a; --nav: #1e293b; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --ink: #e2e8f0; --soft: #94a3b8; --faint: #64748b; --line: #1e293b; --bg: #0f172a; --card: #1e293b;
  --brand: #818cf8; --brand-soft: #1e1b4b; --go: #34d399; --go-soft: #064e3b; --warn: #fbbf24; --warn-soft: #451a03;
  --bad: #f87171; --bad-soft: #450a0a; --nav: #1e293b; --shadow: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
#app { min-height: 100vh; min-height: 100dvh; padding: 0 16px calc(72px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
#app.bare { padding-bottom: 24px; }
a { color: var(--brand); text-decoration: none; }
button { font: inherit; }
h1 { font-size: 22px; margin: 18px 0 4px; }
h2 { font-size: 17px; margin: 18px 0 8px; }
h3 { font-size: 15px; margin: 14px 0 6px; color: var(--soft); font-weight: 600; }
p { margin: 6px 0; }
.soft { color: var(--soft); } .faint { color: var(--faint); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.right { text-align: right; } .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dr { color: var(--bad); } .cr { color: var(--go); }
.card { background: var(--card); border-radius: 14px; padding: 14px; margin: 10px 0; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card.tap { cursor: pointer; }
.card.tap:active { background: var(--brand-soft); }
.row { display: flex; align-items: center; gap: 12px; }
.row > .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.list .item:first-child { border-top: 0; }
.list .item .grow { flex: 1; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 10px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.tile .label { font-size: 12px; color: var(--soft); }
.tile .value { font-size: 19px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; word-break: break-word; }
.tile .sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.tile.bad .value { color: var(--bad); } .tile.good .value { color: var(--go); }
.chip { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.good { background: var(--go-soft); color: var(--go); } .chip.plain { background: var(--line); color: var(--soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 12px; border: 1px solid var(--brand);
       background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.quiet { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: 13px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; width: 100%; min-height: 44px; }
input:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
textarea { resize: vertical; line-height: 1.4; }
.wrap-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
input.code { font-size: 24px; letter-spacing: .18em; text-align: center; text-transform: uppercase; font-family: ui-monospace, Menlo, Consolas, monospace; }
input.pin { font-size: 26px; letter-spacing: .5em; text-align: center; }
.field { margin: 12px 0; } .field label { display: block; font-size: 13px; color: var(--soft); margin-bottom: 5px; }
.search { position: sticky; top: 0; background: var(--bg); padding: 10px 0 6px; z-index: 2; }
.tabs { display: flex; gap: 6px; margin: 10px 0; }
.tabs button { flex: 1; padding: 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--soft); cursor: pointer; }
.tabs button.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 600; }
.status { font-size: 13px; color: var(--soft); display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--go); display: inline-block; }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.off { background: var(--faint); }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 0 4px; }
.topbar .back { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); font-size: 20px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.topbar h1 { margin: 0; font-size: 19px; flex: 1; min-width: 0; }
nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; background: var(--nav); border-top: 1px solid var(--line); display: flex; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
nav.bottom a { flex: 1; text-align: center; color: var(--soft); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; }
nav.bottom a.on { color: var(--brand); font-weight: 600; }
nav.bottom a .ico { font-size: 20px; line-height: 1; }
.table-wrap { overflow-x: auto; margin: 8px -14px; padding: 0 14px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 7px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--soft); font-weight: 600; border-top: 0; font-size: 12px; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.bold td { font-weight: 700; }
.ledger td.part { max-width: 180px; } .ledger .narr { color: var(--faint); font-size: 12px; }
.bars { display: grid; gap: 6px; margin: 8px 0; }
.bar { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; align-items: center; font-size: 12px; }
.bar .track { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--brand); border-radius: 5px; }
.bar .lbl { color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--soft); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg);
         padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 9; max-width: 90vw; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.center { text-align: center; } .pad { padding: 24px 0; }
.brandmark { width: 96px; height: 96px; border-radius: 22px; background: #fff; display: inline-flex; align-items: center; justify-content: center; margin: 24px auto 8px; overflow: hidden; border: 1px solid var(--line); }
.brandmark img { width: 84px; height: 84px; display: block; }
.blocks p.note { color: var(--faint); font-size: 13px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.switch:first-child { border-top: 0; }
.pre { white-space: pre-wrap; font-size: 14px; }
.sheet { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: flex-end; z-index: 8; }
.sheet .box { background: var(--card); width: 100%; max-width: 720px; margin: 0 auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.muted-box { background: var(--brand-soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--brand); }

/* the first-time download's progress (progressHtml): one figure for the whole sync */
.pbar { height: 10px; border-radius: 5px; background: rgba(127, 127, 127, .25); margin: 14px 0 6px; overflow: hidden; }
.pbar .pfill { height: 100%; background: var(--brand); border-radius: 5px; transition: width .2s; }
