/* Vridam Collections — one stylesheet for the office desk (desktop-first) and the Sales phone app (mobile-first).
   Warm paper, black ink, Vridam orange used sparingly; ruled tables with tabular figures, like a ledger. */

:root {
  --paper: #f7f4ef;
  --card: #ffffff;
  --ink: #1d1a16;
  --ink-2: #4d4740;
  --ink-3: #847b70;
  --line: #e6dfd4;
  --line-2: #f0ebe3;
  --brand: #ee7d1a;
  --brand-ink: #a9520a;
  --brand-wash: #fdf0e3;
  --side: #1f1b17;
  --side-ink: #cfc6ba;
  --green: #15803d; --green-wash: #e7f5ec;
  --red: #b42318;   --red-wash: #fdecea;
  --amber: #a15c07; --amber-wash: #fdf3e1;
  --blue: #1d4f9c;  --blue-wash: #e8f0fb;
  --violet: #5b30a6; --violet-wash: #f1ebfb;
  --grey: #5e574f;  --grey-wash: #efebe5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(29, 26, 22, .06), 0 2px 8px rgba(29, 26, 22, .04);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans Devanagari", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 var(--font); }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 13.5px; font-weight: 650; }
p { margin: 0 0 10px; }
small, .muted { color: var(--ink-3); }
.num, td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num, th.num { text-align: right; }
.ic { width: 18px; height: 18px; flex: none; }
.ic-lg { width: 30px; height: 30px; }
.mono { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 12.5px; letter-spacing: .01em; }
.hidden, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------------ office shell */
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; font-weight: 650; letter-spacing: .01em; }
.side .brand img { width: 34px; height: 34px; border-radius: 8px; background: #fff; padding: 3px; }
.side .brand small { display: block; color: var(--side-ink); font-weight: 400; font-size: 11.5px; }
.side .group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #8c8378; padding: 14px 10px 4px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-ink); font-size: 13.5px; }
.side a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.side a.on { background: rgba(238, 125, 26, .16); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.side a .count { margin-left: auto; background: var(--brand); color: #1d1a16; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; min-width: 20px; text-align: center; }
.side .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top form.search { flex: 1; max-width: 560px; position: relative; }
.top form.search .ic { position: absolute; left: 10px; top: 9px; color: var(--ink-3); }
.top form.search input { width: 100%; padding-left: 34px; background: var(--paper); border-color: transparent; }
.top .who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.bell { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--ink-2); }
.bell:hover { background: var(--paper); }
.bell b { position: absolute; top: 3px; right: 3px; background: var(--red); color: #fff; font-size: 10px; border-radius: 99px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; }
.page { padding: 22px 24px 48px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h .sub { color: var(--ink-3); margin: 4px 0 0; }
.page-h .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.demo-band { background: repeating-linear-gradient(-45deg, #fde7c8, #fde7c8 12px, #fbdcb0 12px, #fbdcb0 24px); color: #7a3b05; text-align: center; font-weight: 650; font-size: 12.5px; padding: 6px 10px; letter-spacing: .02em; }

/* ------------------------------------------------------------------ cards, KPI tiles */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card, .card + .grid, .grid + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card-h .sub { color: var(--ink-3); font-size: 12.5px; }
.card-b { padding: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px 12px; box-shadow: var(--shadow); color: var(--ink); display: block; position: relative; }
a.kpi:hover { text-decoration: none; border-color: #d6cbbb; }
.kpi .k { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 23px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.kpi.hot { border-color: #f3c08d; background: linear-gradient(180deg, #fff, var(--brand-wash)); }
.kpi.hot .v { color: var(--brand-ink); }
.kpi.bad .v { color: var(--red); }
.kpi.good .v { color: var(--green); }
.kpi .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; position: relative; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fbf9f6; white-space: nowrap; position: sticky; top: 0; }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: #fcfaf7; }
.t tr.row-link { cursor: pointer; }
.t td.wrap { white-space: normal; min-width: 180px; }
.t tfoot td { font-weight: 650; border-top: 2px solid var(--line); background: #fbf9f6; }
.t .party { font-weight: 600; }
.t .sub2 { font-size: 12px; color: var(--ink-3); }
.t .flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.t tr.sel td { background: var(--brand-wash) !important; }
.list-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: 12.5px; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------------ badges, meters */
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 1px 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.b-green { background: var(--green-wash); color: var(--green); }
.b-red { background: var(--red-wash); color: var(--red); }
.b-amber { background: var(--amber-wash); color: var(--amber); }
.b-blue { background: var(--blue-wash); color: var(--blue); }
.b-violet { background: var(--violet-wash); color: var(--violet); }
.b-grey { background: var(--grey-wash); color: var(--grey); }
.b-amber-soft { background: transparent; color: var(--amber); box-shadow: inset 0 0 0 1px #ebc98f; }
.b-red-soft { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px #f0b4ae; }
.b-violet-soft { background: transparent; color: var(--violet); box-shadow: inset 0 0 0 1px #cdb8ef; }
.conf { display: inline-block; width: 46px; height: 6px; background: var(--line-2); border-radius: 9px; overflow: hidden; vertical-align: middle; }
.conf i { display: block; height: 100%; border-radius: 9px; }
.conf-ok i { background: var(--green); } .conf-mid i { background: #d99a2b; } .conf-low i { background: var(--red); }
.conf-n { font-size: 11.5px; color: var(--ink-3); margin-left: 6px; font-variant-numeric: tabular-nums; }
.score { display: inline-flex; align-items: baseline; justify-content: center; gap: 1px; white-space: nowrap; padding: 4px 6px 0; min-width: 46px; height: 28px; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score small { font-size: 10px; font-weight: 600; }
.s-green { background: var(--green-wash); color: var(--green); }
.s-blue { background: var(--blue-wash); color: var(--blue); }
.s-amber { background: var(--amber-wash); color: var(--amber); }

/* ------------------------------------------------------------------ forms & buttons */
label { font-weight: 600; font-size: 12.5px; color: var(--ink-2); display: block; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=tel], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #d9d1c5; border-radius: 8px; padding: 8px 10px; min-height: 38px; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid #f6b26b; outline-offset: 1px; border-color: var(--brand); }
input[readonly] { background: var(--paper); }
.fld { margin-bottom: 14px; min-width: 0; }
.fld .help { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.fld-check label { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.fld-check input { width: 17px; height: 17px; accent-color: var(--brand); }
.req { color: var(--red); }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span2 { grid-column: 1 / -1; }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line-2); background: #fcfaf7; border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: 13.5px; border-radius: 8px; padding: 8px 14px; min-height: 38px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:disabled, .btn[aria-busy=true] { opacity: .55; cursor: progress; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-brand { background: var(--brand); color: #1d1a16; }
.btn-brand:hover { background: #f08c33; }
.btn-ghost { background: #fff; color: var(--ink); border-color: #d9d1c5; }
.btn-ghost:hover { border-color: #b9ad9c; background: #fdfcfa; }
.btn-good { background: var(--green); color: #fff; }
.btn-good:hover { background: #116432; }
.btn-bad { background: #fff; color: var(--red); border-color: #efc1bc; }
.btn-bad:hover { background: var(--red-wash); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.btn-lg { min-height: 48px; font-size: 15px; padding: 10px 18px; }
.btn-block { width: 100%; }
form.inline { display: inline; }
kbd { font: 11px/1 var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; color: var(--ink-2); background: #fff; }

/* filter bar */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: #fcfaf7; border-radius: var(--radius) var(--radius) 0 0; }
.filters .fld { margin: 0; min-width: 130px; flex: 0 1 auto; }
.filters .fld.grow { flex: 1 1 220px; }
.filters label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 3px; }
.filters input, .filters select { min-height: 34px; padding: 5px 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px 0; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; font-size: 12.5px; color: var(--ink-2); background: #fff; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:hover { text-decoration: none; border-color: #c9bfb0; }
.chip b { font-variant-numeric: tabular-nums; margin-left: 4px; }

/* flashes, empty */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; border: 1px solid; }
.flash.ok { background: var(--green-wash); border-color: #bfe3cb; color: #0f5a2b; }
.flash.warn { background: var(--amber-wash); border-color: #f1d39d; color: #73420a; }
.flash.bad { background: var(--red-wash); border-color: #f2c3be; color: #8a1c13; }
.flash .ic { margin-top: 2px; }
.empty { text-align: center; padding: 38px 16px; color: var(--ink-3); }
.empty .ic { color: #c7bcab; }
.empty b { display: block; color: var(--ink-2); margin: 8px 0 4px; font-size: 14.5px; }
.pager { display: flex; gap: 4px; }
.pager a, .pager span { padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-2); background: #fff; }
.pager .cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.note { background: var(--paper); border-left: 3px solid var(--line); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 13px; margin: 8px 0; }
.note.warn { border-color: #e5a541; background: var(--amber-wash); }
.note.bad { border-color: #e2776d; background: var(--red-wash); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--ink-3); font-size: 12.5px; }
dl.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ verification split screen */
.verify { display: grid; grid-template-columns: minmax(320px, 44%) 1fr; gap: 16px; align-items: start; }
.viewer { position: sticky; top: 68px; height: calc(100vh - 90px); background: #2a2622; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.viewer .vbar { display: flex; gap: 4px; padding: 6px; background: #1f1b17; align-items: center; color: #cfc6ba; font-size: 12px; }
.viewer .vbar button, .viewer .vbar a { background: transparent; border: 0; color: #e8e1d7; width: 32px; height: 30px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.viewer .vbar button:hover, .viewer .vbar a:hover { background: rgba(255, 255, 255, .1); }
.viewer .vbar .sp { flex: 1; }
.viewer .stage { flex: 1; overflow: hidden; position: relative; cursor: grab; touch-action: none; }
.viewer .stage.drag { cursor: grabbing; }
.viewer .stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; max-width: none; }
.viewer iframe { flex: 1; border: 0; background: #fff; }
.viewer:fullscreen { height: 100vh; border-radius: 0; }
.viewer .docs { display: flex; gap: 6px; padding: 6px; background: #1f1b17; }
.viewer .docs a { font-size: 11.5px; color: #cfc6ba; border: 1px solid #3d3732; border-radius: 6px; padding: 2px 8px; }
.viewer .docs a.on { border-color: var(--brand); color: #fff; }
.fieldtab { width: 100%; border-collapse: collapse; }
.fieldtab td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.fieldtab td:first-child { color: var(--ink-3); font-size: 12.5px; width: 34%; }
.fieldtab tr.warn td { background: #fffaf0; }
.fieldtab tr.warn td:first-child { color: var(--amber); font-weight: 600; }
.fieldtab .was { font-size: 11.5px; color: var(--amber); }
.decide { display: flex; gap: 8px; flex-wrap: wrap; }
.decide .btn { flex: 1 1 auto; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); margin-left: 6px; position: relative; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--line); }
.timeline li.k-clarify::before, .timeline li.k-reject::before { border-color: var(--red); }
.timeline li.k-reply::before { border-color: var(--blue); }
.timeline .when { font-size: 11.5px; color: var(--ink-3); }
.match-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 8px; }
.match-card.best { border-color: #9fd4b2; background: #f8fdf9; }
.reasons { list-style: none; padding: 0; margin: 4px 0 0; font-size: 12px; }
.reasons li { color: var(--ink-3); }
.reasons li.plus { color: var(--green); }
.reasons li.minus { color: var(--red); }
.pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.pair .side-a, .pair .side-b { background: var(--paper); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.pair .arrow { color: var(--ink-3); }

dialog { border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--ink); }
dialog::backdrop { background: rgba(29, 26, 22, .45); }
dialog .card-h { border-bottom: 1px solid var(--line-2); }
dialog .card-b { max-height: 70vh; overflow-y: auto; }

/* ------------------------------------------------------------------ sales phone app */
body.app { background: #f3efe9; }
.phone { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 86px; }
.app-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.app-top img { width: 30px; height: 30px; }
.app-top .t { font-weight: 650; font-size: 15.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-body { padding: 16px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.tabbar nav { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; max-width: 560px; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 9px; font-size: 11.5px; color: var(--ink-3); position: relative; }
.tabbar a.on { color: var(--ink); font-weight: 600; }
.tabbar a:hover { text-decoration: none; }
.tabbar a.add .ic { background: var(--brand); color: #1d1a16; border-radius: 14px; width: 44px; height: 30px; padding: 5px 12px; }
.tabbar a b { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--red); color: #fff; font-size: 10px; border-radius: 99px; min-width: 16px; padding: 0 4px; text-align: center; }
.hello { margin: 4px 0 14px; }
.hello h1 { font-size: 20px; }
.big-add { display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.big-add:hover { text-decoration: none; background: #000; }
.big-add .plus { width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #1d1a16; display: grid; place-items: center; }
.big-add b { font-size: 16px; display: block; }
.big-add small { color: #cfc6ba; }
.minis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; color: var(--ink); }
.mini:hover { text-decoration: none; }
.mini .v { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.mini .k { font-size: 12px; color: var(--ink-3); }
.mini.alert { border-color: #f0b4ae; background: #fff8f7; }
.mini.alert .v { color: var(--red); }
.plist { display: flex; flex-direction: column; gap: 8px; }
.pitem { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; color: var(--ink); }
.pitem:hover { text-decoration: none; border-color: #d6cbbb; }
.pitem .nm { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pitem .am { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.pitem .meta { font-size: 12px; color: var(--ink-3); }
.pitem .st { text-align: right; }
.sec-h { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 8px; }
.sec-h h2 { font-size: 14px; }

/* the add-payment flow (both phone and desk) */
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps span.on { background: var(--brand); }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.step h2 { margin-bottom: 4px; }
.step .lead { color: var(--ink-3); font-size: 13px; margin-bottom: 12px; }
.party-pick { position: relative; }
.party-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); max-height: 320px; overflow-y: auto; margin-top: 4px; }
.party-results button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 10px 12px; font: inherit; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.party-results button:hover, .party-results button.hi { background: var(--brand-wash); }
.party-results small { display: block; }
.chosen { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--brand-wash); border: 1px solid #f3c08d; border-radius: 10px; padding: 10px 12px; }
.chosen b { display: block; }
.amount-in { font-size: 26px !important; font-weight: 650; font-variant-numeric: tabular-nums; min-height: 54px !important; }
.pick-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-btns label { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed #d1c6b6; border-radius: 12px; padding: 18px 8px; cursor: pointer; color: var(--ink); background: #fffdfa; font-size: 13.5px; text-align: center; }
.pick-btns label:hover { border-color: var(--brand); background: var(--brand-wash); }
.pick-btns input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.preview { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; }
.preview img { width: 92px; height: 140px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); }
.progress { height: 6px; background: var(--line-2); border-radius: 6px; overflow: hidden; margin: 8px 0 4px; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .25s; }
.ocr-tab { width: 100%; border-collapse: collapse; }
.ocr-tab td { padding: 6px 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.ocr-tab td:first-child { width: 34%; color: var(--ink-3); font-size: 12.5px; padding-right: 8px; }
.ocr-tab td:last-child { width: 26px; text-align: right; }
.ocr-tab input, .ocr-tab select { min-height: 36px; }
.ocr-tab tr.warn input, .ocr-tab tr.warn select { border-color: #e5a541; background: #fffaf0; }
.ocr-tab .why { display: block; font-size: 11.5px; color: var(--amber); margin-top: 2px; }
.tick { color: var(--green); } .warnmark { color: #d48806; }
.bills { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.bills label { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line-2); margin: 0; font-weight: 500; color: var(--ink); cursor: pointer; }
.bills label:last-child { border-bottom: 0; }
.bills input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.bills .due { font-variant-numeric: tabular-nums; text-align: right; }
.bills small { display: block; color: var(--ink-3); font-weight: 400; }
.sticky-submit { position: sticky; bottom: 70px; background: linear-gradient(180deg, rgba(243, 239, 233, 0), #f3efe9 30%); padding: 14px 0 4px; }
.done { text-align: center; padding: 26px 10px; }
.done .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--green-wash); color: var(--green); display: grid; place-items: center; margin: 0 auto 12px; }
.done .ok .ic { width: 34px; height: 34px; }

/* ------------------------------------------------------------------ auth pages */
body.bare { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.auth { width: min(400px, 100%); }
.auth .logo { display: block; width: 150px; margin: 0 auto 18px; }
.auth .card-b { padding: 22px; }
.auth h1 { font-size: 19px; margin-bottom: 4px; }
.qr { display: block; margin: 10px auto; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: Consolas, monospace; background: var(--paper); padding: 12px; border-radius: 8px; }

/* bars (dashboard) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 8px 4px 0; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.bars .b i { display: block; background: #e9dfd1; border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .b i.v { background: var(--brand); position: absolute; bottom: 0; left: 0; right: 0; border-radius: 4px 4px 0 0; }
.bar-lbl { display: flex; gap: 6px; font-size: 10.5px; color: var(--ink-3); padding: 4px 4px 0; }
.bar-lbl span { flex: 1; text-align: center; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .verify { grid-template-columns: 1fr; }
  .viewer { position: relative; top: 0; height: 70vh; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .menu-btn { display: grid !important; }
  .page { padding: 16px; }
  .top { padding: 8px 16px; }
  .g2, .g3, .form-grid { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
  .pair .arrow { transform: rotate(90deg); justify-self: center; }
}
.menu-btn { display: none; place-items: center; width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
@media print {
  .side, .top, .filters, .actions, .tabbar, .btn { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* web installer (packaging/install.php) */
.auth-logo { display: block; width: 160px; margin: 0 0 14px; }
.plainlist { margin: 0; line-height: 1.9; }
.t-bad { color: var(--red); }

/* payment type choice (Add payment) */
.types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.type-opt { margin: 0; display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; background: #fff; font-weight: 500; color: var(--ink); }
.type-opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.type-opt b { display: block; font-size: 14px; }
.type-opt small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.type-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-wash); }
.type-opt.suggested::after { content: "suggested"; margin-left: auto; font-size: 10.5px; color: var(--brand-ink); font-weight: 600; }
.b-type-new { background: var(--blue-wash); color: var(--blue); }
.b-type-old { background: #f3e8de; color: #7a3b05; }
.b-type-half { background: var(--violet-wash); color: var(--violet); }
@media (max-width: 560px) { .types { grid-template-columns: 1fr; } }
.b-late { box-shadow: inset 0 0 0 1.5px var(--red); }
