:root {
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc; --line: #e3e8ef; --line-2: #cfd7e3;
  --ink: #142033; --ink-2: #4a5a70; --ink-3: #7b8aa0;
  --brand: #1d4ed8; --brand-ink: #ffffff; --brand-soft: #e8efff;
  --ok: #0f7a4a; --ok-soft: #e3f5ec; --warn: #9a5b00; --warn-soft: #fff3dc; --bad: #b42318; --bad-soft: #fde8e7;
  --violet: #6d28d9; --violet-soft: #f0e9ff; --grey-soft: #eef1f5;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --nav-w: 232px; --top-h: 60px; --bottom-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1420; --surface: #141d2b; --surface-2: #192335; --line: #243146; --line-2: #31415a;
    --ink: #e6ecf5; --ink-2: #a9b6c9; --ink-3: #7d8ca3;
    --brand: #5b8cff; --brand-ink: #0b1220; --brand-soft: #1b2a4a;
    --ok: #4ccf8f; --ok-soft: #12301f; --warn: #f2b155; --warn-soft: #33260f; --bad: #ff7b72; --bad-soft: #3a1714;
    --violet: #b79bff; --violet-soft: #271c45; --grey-soft: #1f2a3b;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
h1 { font-size: 1.45rem; margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 1rem; margin: 28px 0 10px; color: var(--ink-2); font-weight: 600; }
h3 { font-size: 1rem; margin: 0 0 10px; }
h4 { margin: 8px 0 6px; font-size: .92rem; }
a { color: var(--brand); text-decoration: none; }
p { margin: 0 0 8px; }
code { font: 500 .88em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--grey-soft); padding: 1px 5px; border-radius: 5px; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.muted { color: var(--ink-3); } .small { font-size: .85rem; } small { font-size: .8rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ic.big { width: 40px; height: 40px; color: var(--ink-3); }
[hidden] { display: none !important; }

/* buttons */
button, .btn { font: inherit; font-weight: 600; font-size: .92rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: 9px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; text-decoration: none; transition: background .12s, border-color .12s; }
button:hover, .btn:hover { border-color: var(--ink-3); }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.primary:hover { filter: brightness(1.08); border-color: var(--brand); }
.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.ghost { background: transparent; }
.sm { min-height: 34px; padding: 6px 12px; font-size: .85rem; }
.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--brand); font-weight: 500; }
.danger-t { color: var(--bad) !important; } .ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 80px 0; color: var(--ink-3); }

/* layout */
.app { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.brand b { display: block; font-size: 1.02rem; } .brand small { display: block; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.logo.xl { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px; } .logo.xl .ic { width: 30px; height: 30px; }
.logo.warn { background: var(--warn-soft); color: var(--warn); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; border: 0; padding: 0; min-height: 0; flex: none; }
.avatar.lg { width: 48px; height: 48px; font-size: 1rem; }
#main { padding: 20px 16px 110px; max-width: 1100px; margin: 0 auto; }
.nav a { display: flex; align-items: center; gap: 10px; color: var(--ink-2); padding: 9px 12px; border-radius: 9px; font-weight: 500; position: relative; }
.nav a:hover { background: var(--grey-soft); }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: .7rem; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; margin-left: auto; }
.sidebar { display: none; }
.bottombar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: space-around; }
.bottombar a { flex: 1; flex-direction: column; gap: 2px; font-size: .7rem; padding: 8px 2px; border-radius: 0; justify-content: center; }
.bottombar a.active { background: none; }
.bottombar .badge { position: absolute; top: 4px; left: 52%; margin: 0; }
.nav.sheet { display: grid; gap: 4px; }
.fab { position: fixed; right: 18px; bottom: calc(var(--bottom-h) + 18px + env(safe-area-inset-bottom)); z-index: 21; width: 56px; height: 56px; border-radius: 18px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(29, 78, 216, .35); }
.fab .ic { width: 26px; height: 26px; }
.hide-mobile { display: none; }
@media (min-width: 900px) {
  .sidebar { display: flex; flex-direction: column; gap: 2px; position: fixed; top: var(--top-h); left: 0; bottom: 0; width: var(--nav-w); padding: 14px 12px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
  .bottombar, .fab { display: none; }
  .hide-mobile { display: inline-flex; }
  #main { margin-left: var(--nav-w); padding: 28px 32px 60px; max-width: calc(1100px + var(--nav-w)); }
  .brand small { max-width: 300px; }
}
.demo-bar { background: #1e293b; color: #e2e8f0; font-size: .82rem; padding: 6px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.demo-bar select { font: inherit; padding: 2px 6px; border-radius: 6px; }

/* page */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; justify-content: space-between; }
.page-head .grow { flex: 1 1 280px; min-width: min(280px, 100%); } /* the title keeps its width; buttons wrap below */
.back { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); flex: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
section.card { margin-bottom: 14px; }
.cards { display: grid; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; } .row.gap { gap: 10px; } .row.end { justify-content: flex-end; flex-wrap: wrap; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); }
.empty h3 { margin: 10px 0 4px; }
.err { color: var(--bad); background: var(--bad-soft); padding: 8px 12px; border-radius: 8px; font-size: .9rem; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--ink); display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.tile span { font-size: .82rem; color: var(--ink-2); } .tile b { font-size: 1.7rem; line-height: 1.2; font-variant-numeric: tabular-nums; } .tile small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tile.amber { border-left: 4px solid #e8a317; } .tile.blue { border-left: 4px solid var(--brand); } .tile.red { border-left: 4px solid var(--bad); }

/* request card */
.req { color: var(--ink); display: block; transition: border-color .12s; }
.req:hover { border-color: var(--line-2); }
.req.urgent { border-left: 4px solid var(--bad); }
.req-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.reqno { font: 600 .8rem ui-monospace, Menlo, monospace; color: var(--ink-2); margin-right: auto; }
.req-main { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.payee { font-weight: 600; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.req-meta { color: var(--ink-3); font-size: .82rem; margin-top: 2px; }
.prog { display: block; height: 6px; background: var(--grey-soft); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.prog > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.prog.sm { width: 90px; margin: 0; height: 5px; }

/* chips & statuses */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--grey-soft); color: var(--ink-2); white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; vertical-align: 0; }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.st-pending_approval { background: var(--warn-soft); color: var(--warn); }
.st-approved { background: var(--brand-soft); color: var(--brand); }
.st-part_paid { background: var(--violet-soft); color: var(--violet); }
.st-paid { background: var(--ok-soft); color: var(--ok); }
.st-rejected { background: var(--bad-soft); color: var(--bad); }
.st-withdrawn, .st-closed { background: var(--grey-soft); color: var(--ink-2); }
.next { padding: 10px 14px; border-radius: 10px; font-weight: 600; margin-bottom: 14px; font-size: .92rem; }

/* toolbar, segmented */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--grey-soft); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button, .seg label { border: 0; background: transparent; min-height: 34px; padding: 6px 12px; font-weight: 500; border-radius: 8px; font-size: .86rem; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on, .seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.seg.col { flex-direction: column; display: flex; } .seg.col label { justify-content: flex-start; }
.seg.wrap { display: flex; }
.search { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; flex: 1 1 220px; color: var(--ink-3); }
.search input { border: 0; outline: 0; background: transparent; padding: 9px 0; font: inherit; color: var(--ink); width: 100%; }

/* forms */
.form fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.form legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; min-width: 0; }
.field > span { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; width: 100%; min-height: 42px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }
textarea { resize: vertical; }
.grid2, .grid3, .grid4 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } .grid4 { grid-template-columns: repeat(4, 1fr); } }
.check { display: flex; gap: 8px; align-items: center; font-size: .92rem; cursor: pointer; }
.check input, .seg input { width: 17px; height: 17px; accent-color: var(--brand); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.drop { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 22px 12px; color: var(--ink-2); cursor: pointer; text-align: center; background: var(--surface-2); }
.drop input { display: none; }
.files { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.files li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: .9rem; }
.files li > span, .files li > button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.sticky-actions { position: sticky; bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); background: var(--surface); padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 8px; }
@media (min-width: 900px) { .sticky-actions { bottom: 0; } }

/* detail */
.detail { display: grid; gap: 14px; }
@media (min-width: 900px) { .detail { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); align-items: start; } .col-side { position: sticky; top: calc(var(--top-h) + 16px); } }
.amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; }
.amounts > * { min-width: 0; } .amounts b { white-space: nowrap; }
.amounts span { display: block; font-size: .78rem; color: var(--ink-3); } .amounts b { font-size: 1.12rem; font-variant-numeric: tabular-nums; } .amounts b.hl { color: var(--brand); }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; margin: 0; font-size: .92rem; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv.bank dd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.copy { border: 0; background: none; min-height: 0; padding: 2px; color: var(--ink-3); }
.action { border-color: var(--brand); border-width: 1.5px; }
.pending-box { margin-top: 12px; border: 1.5px dashed #e8a317; border-radius: 10px; padding: 12px; background: var(--warn-soft); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 12px; font-size: .9rem; }
.timeline li::before { content: ''; position: absolute; left: -23px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink-3); }
.tl-approved::before, .tl-payment::before { border-color: var(--ok) !important; background: var(--ok) !important; }
.tl-rejected::before, .tl-payment_cancelled::before, .tl-withdrawn::before { border-color: var(--bad) !important; }
.tl-part_approved::before { border-color: var(--violet) !important; }
.wa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.wa-list li { display: flex; gap: 8px; align-items: flex-start; }
.wa-list .ic { color: #25a85a; margin-top: 2px; }
.wa-failed .ic { color: var(--bad); } .wa-logged .ic { color: var(--ink-3); }
.label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: 0 0 6px; }

/* tables */
.table-wrap { overflow-x: auto; padding: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.void td { color: var(--ink-3); } .tbl tr.void td:first-child, .tbl tr.void .num { text-decoration: line-through; }

/* payees */
.payee-row { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.payee-row b { display: block; } .payee-row small { display: block; }
.payee-row.inactive { opacity: .6; }

/* modal & toast */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 16, 28, .5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--surface); width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .18s ease-out; }
.modal.modal-wide { max-width: 640px; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 20px; } .modal { border-radius: 16px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.modal ol { padding-left: 20px; }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-h) + 20px); z-index: 60; display: grid; gap: 8px; width: min(92vw, 420px); }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast { background: #1f2937; color: #fff; padding: 11px 14px; border-radius: 10px; font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); transition: opacity .3s; }
.toast-error { background: #b42318; } .toast-ok { background: #0f7a4a; } .toast.out { opacity: 0; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 24px; width: 100%; max-width: 400px; text-align: center; box-shadow: var(--shadow); }
.login-card h1 { margin-bottom: 6px; }
.login-card > p { margin-bottom: 20px; }
.google { width: 100%; min-height: 48px; margin-bottom: 12px; }
.persona { width: 100%; justify-content: flex-start; text-align: left; gap: 12px; padding: 10px 12px; }
.persona b, .persona small { display: block; } .persona small { color: var(--ink-3); font-weight: 400; }

body.on-form .fab { display: none; }
.demo-bar label { display: inline-flex; align-items: center; gap: 6px; }
.page-head .back + h1 { flex: 1; }

/* ── v2 additions ── */
.left { text-align: left; }
.big { width: 100%; min-height: 48px; font-size: 1rem; }
.mt { margin-top: 10px; }
.row.between { justify-content: space-between; flex-wrap: wrap; }
.row.wrapr { flex-wrap: wrap; }
.phone-in { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); overflow: hidden; }
.phone-in b { padding: 0 10px; color: var(--ink-2); border-right: 1px solid var(--line); align-self: stretch; display: grid; place-items: center; background: var(--surface-2); }
.phone-in input { border: 0 !important; outline: 0 !important; font-size: 1.1rem !important; letter-spacing: .05em; }
.otp { font-size: 1.5rem !important; letter-spacing: .5em; text-align: center; }
.big-in { font-size: 1.4rem !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.comp-sel { font: inherit; font-size: .8rem; color: var(--ink-3); border: 0; background: transparent; padding: 0; min-height: 0 !important; max-width: 46vw; }
a.avatar { text-decoration: none; }
.notice { background: var(--brand-soft); border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.notice.warn, .card.notice.warn { background: var(--warn-soft); }
.notice.ok, .card.notice.ok { background: var(--ok-soft); color: var(--ok); }
.card.notice { margin-bottom: 14px; }
.push-card .row { margin-bottom: 6px; }
.steps { padding-left: 20px; margin: 6px 0 10px; } .steps li { margin-bottom: 4px; }
.attn { margin-bottom: 14px; }
.attn-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tiles.two { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 14px; }
.tile.violet { border-left: 4px solid var(--violet); } .tile.green { border-left: 4px solid var(--ok); }
.seg.scroll { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
#scope { margin-bottom: 12px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 12px; scrollbar-width: none; }
.chips button { flex: none; min-height: 34px; padding: 5px 12px; border-radius: 999px; font-weight: 500; font-size: .85rem; }
.chips button small { color: var(--ink-3); margin-left: 2px; }
.chips button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chips button.on small { color: inherit; opacity: .8; }
.choices { display: grid; gap: 8px; }
@media (min-width: 640px) { .choices { grid-template-columns: repeat(3, 1fr); } }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 12px; cursor: pointer; background: var(--surface); }
.choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.choice b { display: block; } .choice small { display: block; color: var(--ink-3); line-height: 1.35; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.seg label.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tracker { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 0 0 16px; counter-reset: s; }
.tracker li { position: relative; text-align: center; font-size: .78rem; padding-top: 26px; color: var(--ink-3); }
.tracker li i { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); z-index: 1; }
.tracker li::before { content: ''; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.tracker li:first-child::before { display: none; }
.tracker li b { display: block; color: var(--ink-2); font-size: .82rem; } .tracker li small { display: block; min-height: 1em; }
.ts-done i { background: var(--ok); border-color: var(--ok); } .ts-done::before { background: var(--ok) !important; }
.ts-now i { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); } .ts-now b { color: var(--brand) !important; }
.ts-back i { background: var(--warn); border-color: var(--warn); } .ts-back b, .ts-back small { color: var(--warn) !important; }
.ts-fail i { background: var(--bad); border-color: var(--bad); } .ts-fail b, .ts-fail small { color: var(--bad) !important; }
.tl-sent_back::before { border-color: var(--warn) !important; } .tl-resubmitted::before { border-color: var(--brand) !important; }
.preview { max-width: 100%; max-height: 70vh; border-radius: 10px; display: block; margin: 0 auto; background: var(--grey-soft); }
.card.list { padding: 4px 12px; }
.payee-row.line { padding: 10px 0; border-bottom: 1px solid var(--line); }
.payee-row.line:last-child { border-bottom: 0; }
.user-row { display: flex; gap: 12px; align-items: flex-start; }
.user-row.inactive { opacity: .65; }
.role-pick { display: grid; gap: 8px; }
.role-pick .check { align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.role-pick .check span b, .role-pick .check span small { display: block; }
.role-pick .check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
h3.pad { padding: 14px 12px 0; }
details summary { cursor: pointer; color: var(--brand); margin: 6px 0; }
.st-sent_back { background: var(--warn-soft); color: var(--warn); outline: 1px solid var(--warn); }
.tile.amber small, .tile.red small { color: var(--ink-3); }

.maker { font-size: .8rem; color: var(--ink-3); margin-top: -4px; }
.powered { text-align: center; font-size: .75rem; color: var(--ink-3); padding: 0 16px calc(var(--bottom-h) + 24px + env(safe-area-inset-bottom)); } /* iPhone home bar: footer stays above the bottom bar (27 Oct 2026) */
@media (min-width: 900px) { .powered { margin-left: var(--nav-w); padding-bottom: 24px; } }
#main { padding-bottom: 24px; }

.xbox { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; background: var(--surface-2); }
.xbox summary { font-weight: 600; font-size: .9rem; }
.xbox[open] summary { margin-bottom: 8px; }

.chainview { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; }
.steps-ap { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps-ap li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.steps-ap .lv { font-weight: 700; font-size: .75rem; color: var(--ink-3); background: var(--bg-2, #eef1f5); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.steps-ap li br + small { flex-basis: 100%; padding-left: 2px; }

.files .pv { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; min-height: 0; text-align: left; font-weight: 500; flex: 1; min-width: 0; cursor: pointer; color: var(--ink); }
.files .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; background: var(--grey-soft); }
.thumb.pdf { display: grid; place-items: center; font: 700 .7rem system-ui; color: var(--bad); background: var(--bad-soft); }

/* ══ v3 polish – Zentra look: product themes, softer depth, fluid motion ══ */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-up: 0 4px 10px rgba(16, 24, 40, .06), 0 14px 30px rgba(16, 24, 40, .08);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --brand-2: #4f46e5;
}
/* Invexa (billing) – teal theme; PayFlow keeps blue */
:root[data-prod="billing"] { --brand: #0f766e; --brand-2: #0891b2; --brand-soft: #e3f4f1; }
@media (prefers-color-scheme: dark) {
  :root { --shadow: none; --shadow-up: 0 10px 30px rgba(0, 0, 0, .35); --brand-2: #8b7bff; }
  :root[data-prod="billing"] { --brand: #2dd4bf; --brand-2: #38bdf8; --brand-soft: #0f2f2c; --brand-ink: #04211e; }
}
body { font-family: var(--font); font-feature-settings: "cv11", "ss01"; letter-spacing: -.005em; }
h1 { font-weight: 800; letter-spacing: -.02em; }
.tile b, .amt, .amounts b { letter-spacing: -.02em; }

/* smooth everything that changes colour/position */
a, button, .btn, .card, .tile, .chip, .nav a, input, select, textarea { transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), box-shadow .22s var(--ease), transform .18s var(--ease), opacity .18s; }
button:active:not(:disabled), .btn:active { transform: scale(.97); }
.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 30%, transparent); }
.primary:hover { filter: brightness(1.06); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); border-color: transparent; }

/* page enter */
#main.enter > * { animation: rise .32s var(--ease) backwards; } /* backwards, not both: a kept transform would pin fixed bars (total bar) to the page instead of the screen */
#main.enter > *:nth-child(2) { animation-delay: .03s; } #main.enter > *:nth-child(3) { animation-delay: .06s; } #main.enter > *:nth-child(4) { animation-delay: .09s; } #main.enter > *:nth-child(n+5) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* top bar – frosted glass */
.topbar { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }
.logo { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: 10px; box-shadow: 0 3px 10px color-mix(in srgb, var(--brand) 35%, transparent); }
.brand b { font-weight: 800; letter-spacing: -.01em; }
.comp-sel { cursor: pointer; } .comp-sel:hover { color: var(--brand); }

/* sidebar */
.sidebar { background: var(--surface); }
.nav a { border-radius: 10px; }
.nav a:hover { transform: translateX(2px); }
.nav.sidebar a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav.sidebar a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav a.switch { border-radius: 0 0 10px 10px; padding-top: 14px !important; }
/* bottom bar – floating pill feel */
.bottombar { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bottombar a .ic { transition: transform .2s var(--ease); }
.bottombar a.active { color: var(--brand); }
.bottombar a.active .ic { transform: translateY(-2px) scale(1.12); }
.fab { background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 40%, transparent); }
.fab:active { transform: scale(.92); }

/* cards & tiles */
.card { border-color: color-mix(in srgb, var(--line) 80%, transparent); }
a.card:hover, .req:hover, a.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); border-color: var(--line-2); }
.tile { position: relative; overflow: hidden; padding: 16px; gap: 4px; border-left-width: 1px !important; }
.tile::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tile-c, transparent); }
.tile.amber { --tile-c: #e8a317; } .tile.blue { --tile-c: var(--brand); } .tile.red { --tile-c: var(--bad); } .tile.violet { --tile-c: var(--violet); } .tile.green { --tile-c: var(--ok); }
.tile.amber, .tile.blue, .tile.red, .tile.violet, .tile.green { border-left: 1px solid var(--line); }
.tile b { font-size: 1.6rem; font-weight: 800; }
.tile span { font-weight: 500; }

/* tables */
.tbl tbody tr { transition: background-color .15s; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl th { background: var(--surface-2); }
.table-wrap.card { overflow: hidden; } .table-wrap { overflow-x: auto; }

/* segmented & chips */
.seg { background: var(--grey-soft); border-radius: 12px; }
.seg button.on, .seg label:has(input:checked), .seg label.on, .seg a.on { color: var(--brand) !important; }
.chip { font-weight: 600; letter-spacing: .01em; }
.chips button.on { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; }

/* inputs */
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.sticky-actions { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* modal & toast */
.modal-backdrop { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .18s ease-out; }
.modal { animation: up .26s var(--ease); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
@keyframes fade { from { opacity: 0; } }
.toast { border-radius: 12px; animation: up .25s var(--ease); backdrop-filter: blur(8px); }

/* loading – shimmer skeleton instead of a lone spinner */
#main > .loading { padding: 0; display: grid; gap: 12px; place-items: stretch; }
#main > .loading .spinner { display: none; }
#main > .loading::before, #main > .loading::after { content: ''; display: block; border-radius: var(--radius); background: linear-gradient(90deg, var(--grey-soft) 25%, var(--surface-2) 50%, var(--grey-soft) 75%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
#main > .loading::before { height: 92px; } #main > .loading::after { height: 260px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* login – suite welcome */
.login { background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, #1d4ed8 18%, transparent), transparent 60%), radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, #0f766e 18%, transparent), transparent 60%), var(--bg); }
.login-card { border-radius: 22px; box-shadow: var(--shadow-up); animation: rise .4s var(--ease) both; padding: 36px 26px; }
.suite-mark { background: conic-gradient(from 210deg, #1d4ed8, #4f46e5, #0f766e, #0891b2, #1d4ed8); color: #fff; font: 800 1.7rem/1 var(--font); letter-spacing: -.04em; box-shadow: 0 10px 26px rgba(29, 78, 216, .3); }
.login-card h1 { font-size: 1.7rem; }
.login-card .maker { margin: 0 0 24px; }
.prod-pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px 0 22px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.pill .ic { width: 15px; height: 15px; vertical-align: 0; }
.pill.pay { background: #e8efff; color: #1d4ed8; } .pill.bill { background: #e3f4f1; color: #0f766e; }
@media (prefers-color-scheme: dark) { .pill.pay { background: #1b2a4a; color: #8fb0ff; } .pill.bill { background: #0f2f2c; color: #5eead4; } }
.powered b { background: linear-gradient(135deg, #1d4ed8, #0f766e); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* respect users who turn motion off */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* Zentra Admin (PG Dynamics owner console) – indigo theme */
:root[data-prod="stock"] { --brand: #b45309; --brand-2: #d97706; --brand-soft: #fdf0dc; }
@media (prefers-color-scheme: dark) { :root[data-prod="stock"] { --brand: #f59e0b; --brand-2: #fbbf24; --brand-soft: #3a2a10; --brand-ink: #1f1300; } }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--surface-2); }
:root[data-prod="admin"] { --brand: #4338ca; --brand-2: #7c3aed; --brand-soft: #eef0ff; }
@media (prefers-color-scheme: dark) { :root[data-prod="admin"] { --brand: #8b93ff; --brand-2: #c084fc; --brand-soft: #23264a; --brand-ink: #0b0d24; } }
.search input:not([type=checkbox]) { border: 0 !important; box-shadow: none !important; min-height: 0 !important; padding: 9px 0 !important; background: transparent !important; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }

/* v3.1 – bars are fully solid again (the see-through top / bottom bars let scrolling content show behind them) */
.topbar, .bottombar, .sticky-actions { background: var(--surface) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.topbar { border-bottom-color: var(--line); box-shadow: 0 1px 0 var(--line), 0 2px 8px rgba(16, 24, 40, .04); }
html, body { background: var(--bg); overscroll-behavior-y: none; } /* no rubber-band gap when pulling past the top */
/* table headings in normal case – easier to read than spaced capitals */
.tbl th { text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--ink-2); }
.seg.scroll > a, .seg.scroll > button { white-space: nowrap; flex: none; } /* tab rows scroll sideways on phones */
/* custom date range: never wider than the screen */
.range-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; max-width: 560px; }
.range-row input { min-width: 0; }
@media (max-width: 560px) { .range-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .range-row span { display: none; } .range-row button { grid-column: 1 / -1; } }
/* safety net: one wide element must never shrink the whole page on a phone */
html, body { max-width: 100%; overflow-x: hidden; }
/* 'clip' stops sideways overflow without turning <body> into its own scroll box – with 'hidden' some laptop
   touchpads (two-finger scroll) and Safari lock onto <body> and the page does not move */
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
input, select, textarea { max-width: 100%; }
.comp-sel { field-sizing: content; width: auto; padding-right: 2px !important; } /* company picker hugs the name */
/* payment type picker: name only, two per row on phones */
.type-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .type-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.type-pick .choice { align-items: center; padding: 12px; }
.type-pick .choice input { margin-top: 0; }
/* detail pages on phones: columns may shrink, long names wrap instead of widening the page */
.detail, .detail > *, .stack > *, .card, .cards > * { min-width: 0; }
@media (max-width: 899px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.files li > *, .files .pv { min-width: 0; }
.page-head h1, .kv dd, .kv dd small { overflow-wrap: anywhere; }
.files { grid-template-columns: minmax(0, 1fr); } .files li { min-width: 0; } /* long file names get "…" instead of widening the page */
@media (max-width: 479px) { .type-pick { grid-template-columns: minmax(0, 1fr); gap: 6px; } .type-pick .choice { padding: 11px 12px; } } /* phones: one clean list, names never break */
.legal { font-size: .72rem; line-height: 1.45; color: var(--ink-3); margin: 18px 0 0; text-align: center; }
.legal a { color: var(--ink-2); text-decoration: underline; display: inline-block; padding: 6px 4px 0; }

/* Storix */
.tbl .hm { display: none; } @media (min-width: 700px) { .tbl .hm { display: table-cell; } }
.stx-filters { display: grid; gap: 8px 10px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; align-items: end; }
.stx-filters .field { margin: 0; min-width: 0; } .stx-filters > :first-child { grid-column: 1 / -1; }
@media (min-width: 700px) { .stx-filters { grid-template-columns: minmax(200px, 260px) 1fr minmax(160px, 220px); } .stx-filters > :first-child { grid-column: auto; } }
.stx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (max-width: 559px) { .stx-tiles .tile { padding: 10px 10px 10px 14px; } .stx-tiles .tile b { font-size: 1.15rem; } .stx-tiles .tile span { font-size: .74rem; } .stx-tiles .tile small { font-size: .7rem; } }
.nw { white-space: nowrap; }

/* Storix: Excel-style grid */
.grid-wrap { overflow-x: auto; margin: 0 -4px; }
.xgrid { border-collapse: collapse; width: 100%; font-size: .88rem; }
.xgrid th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; padding: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.xgrid td { padding: 0; border: 1px solid var(--line); background: var(--surface); }
.xgrid td input, .xgrid td select { width: 100%; min-width: 0; border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 8px 8px; min-height: 38px; font: inherit; color: var(--ink); box-shadow: none !important; }
.xgrid td input:focus, .xgrid td select:focus { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--brand-soft) !important; }
.xgrid td.gnum input { text-align: right; font-variant-numeric: tabular-nums; }
.xgrid .gn { width: 34px; text-align: center; color: var(--ink-3); font-size: .75rem; background: var(--surface-2); }
.xgrid .gx { width: 34px; text-align: center; background: var(--surface-2); }
.xgrid .gx button { border: 0; background: none; min-height: 30px; padding: 0 8px; color: var(--ink-3); font-size: 1.1rem; }
.xgrid tr.gbad td { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.xgrid tr.glock td { background: var(--surface-2, #f3f5f9); }
.xgrid tr.glock input, .xgrid tr.glock select { color: var(--muted, #6b7280); }
.gi-info { display: block; padding: 6px 8px; font-size: .78rem; color: var(--ink-3); min-width: 140px; }
.grid-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 4px 0; }
.grid-pop { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); max-height: 300px; overflow: auto; }
.grid-pop .gp-opt { padding: 7px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.grid-pop .gp-opt small { color: var(--ink-3); white-space: nowrap; } .grid-pop .gp-opt.on, .grid-pop .gp-opt:hover { background: var(--brand-soft); }
.grid-pop .gp-none { padding: 10px; color: var(--ink-3); }
/* qty inputs in tables (beats the global input width) */
.qin, input.qin:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { width: 90px; text-align: right; padding: 6px 8px; min-height: 34px; }
.rep-form { display: grid; gap: 8px 12px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; align-items: end; }
.rep-form .field { margin: 0; min-width: 0; }
@media (min-width: 900px) { .rep-form { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
@media (min-width: 900px) { .dash-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .dash-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dash-tiles .tile { text-decoration: none; }
@media (max-width: 559px) { .dash-tiles .tile b { font-size: 1.2rem; } }
.tbl tr.tot td { background: var(--surface-2); }
.tbl .mo { display: table-cell; } @media (min-width: 700px) { .tbl .mo { display: none; } }
/* Dense desktop screens (computer only): more rows per screen */
@media (min-width: 900px) {
  :root[data-prod="stock"] .tbl { font-size: .84rem; }
  :root[data-prod="stock"] .tbl th { padding: 7px 10px; font-size: .72rem; }
  :root[data-prod="stock"] .tbl td { padding: 6px 10px; }
  :root[data-prod="stock"] .tbl td small { font-size: .74rem; }
  :root[data-prod="stock"] .page-head { margin-bottom: 10px; }
  :root[data-prod="stock"] .xgrid td input, :root[data-prod="stock"] .xgrid td select { min-height: 32px; padding: 5px 8px; }
  .tbl.dense td { padding: 5px 10px; }
}
@media (max-width: 559px) { .tbl.dense th, .tbl.dense td { padding: 8px 6px; } .tbl.dense { font-size: .84rem; } }
@media (min-width: 700px) { .only-m { display: none !important; } }
.xgrid th { min-width: calc(var(--w, 60px) * .6); } @media (min-width: 700px) { .xgrid th { min-width: var(--w, 60px); } }
@media (max-width: 559px) { .gi-info { min-width: 110px; font-size: .74rem; } }
.test-bar { background: #b91c1c !important; color: #fff !important; font-weight: 600; }
/* grid: auto-calculated values (amount = qty × rate, expiry = date + shelf life) shown in the cell itself, in a softer tone */
.xgrid td input.g-auto::placeholder { color: var(--ink-2); opacity: 1; }
.xgrid td input[type=date].g-auto { color: var(--ink-2); font-style: italic; }
.gi-info { white-space: normal; line-height: 1.3; }
/* FG day-end sheet: dense table on desktop, one card per item on phones */
.de-tbl td { vertical-align: middle; }
.de-tbl input.de-in { width: 110px !important; max-width: 100%; min-height: 36px; padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.de-tbl tr.de-bad td { background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.de-tbl [data-left] { font-variant-numeric: tabular-nums; }
#retBox.de-need select { outline: 2px solid var(--warn); outline-offset: 1px; }
@media (max-width: 700px) {
  .de-tbl thead { display: none; }
  .de-tbl, .de-tbl tbody, .de-tbl tr, .de-tbl td { display: block; width: 100%; }
  .de-tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .de-tbl td { border: 0 !important; padding: 0 !important; text-align: left !important; }
  .de-tbl td[data-l="Item"] { grid-column: 1 / -1; }
  .de-tbl td:not([data-l="Item"])::before { content: attr(data-l); display: block; font-size: .72rem; color: var(--ink-3); margin-bottom: 2px; }
  .de-tbl input.de-in { width: 100% !important; text-align: left; }
}
/* PayFlow admin breakdown (by raiser / approver / type / location): identical column grid in every table */
.tbl.brk { table-layout: fixed; width: 100%; min-width: 640px; }
.tbl.brk col.c-name { width: 28%; } .tbl.brk col.c-n { width: 11%; }
.tbl.brk td:first-child { overflow-wrap: anywhere; }
.tbl.brk th { white-space: normal; }
@media (max-width: 700px) {
  .de-tbl tr.de-bad td { background: none; }
  .de-tbl tr.de-bad { background: color-mix(in srgb, var(--bad) 6%, var(--surface)); box-shadow: inset 3px 0 0 var(--bad); }
}
/* grouped menu (Storix) */
.nav-h { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 12px 12px 4px; }
.nav > .nav-h:first-child { padding-top: 2px; }
button.nav-fold { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; min-height: 0; border-radius: 8px; cursor: pointer; font-family: inherit; text-align: left; }
button.nav-fold:hover { color: var(--ink-2); background: var(--grey-soft); }
.nav-car { flex: none; transition: transform .18s var(--ease); }
button.nav-fold[aria-expanded="true"] .nav-car { transform: rotate(90deg); }
.nav-grp { display: flex; flex-direction: column; gap: 2px; }
.nav-grp[hidden] { display: none; }
.nav.sheet .nav-h { padding-left: 4px; }
/* Store Keepers / Requisitioners: value columns of reports are hidden (the server sends no values to them) */
.noval .vc { display: none !important; }
.dsp-tbl input.qin { width: 90px; }
@media (max-width: 560px) { .dsp-tbl th, .dsp-tbl td { padding-left: 6px; padding-right: 6px; } .dsp-tbl input.qin:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { width: 70px; } }
/* DayClose */
:root[data-prod="dayclose"] { --brand: #15803d; --brand-2: #16a34a; --brand-soft: #e6f5ea; }
@media (prefers-color-scheme: dark) { :root[data-prod="dayclose"] { --brand: #22c55e; --brand-2: #4ade80; --brand-soft: #0f2a18; --brand-ink: #03140a; } }
.dc-sum { margin: 6px 0 0; font-size: .95rem; } .dc-sum b { font-variant-numeric: tabular-nums; }
.dc-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.4fr) auto auto; gap: 6px; align-items: center; }
.dc-row .dc-file { white-space: nowrap; }
.dc-den { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.dc-den .field span { font-variant-numeric: tabular-nums; }
.dc-cash { margin-top: 10px; }
.dc-cash dd, .kv dd { font-variant-numeric: tabular-nums; }
td.click { cursor: pointer; }
@media (max-width: 700px) {
  .dc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dc-row [data-k="note"], .dc-row [data-k="ref"] { grid-column: 1 / -1; }
  .dc-den { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.kv.dc-cash { grid-template-columns: minmax(0, 300px) minmax(0, 160px); max-width: 480px; }
.kv.dc-cash dd { text-align: right; }
:root[data-prod="dayclose"] .kv { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
:root[data-prod="dayclose"] .kv.dc-cash { grid-template-columns: minmax(0, 300px) minmax(0, 160px); }
.chip.dc-entry { text-decoration: none; font-weight: 500; padding: 4px 10px; }
.de-done tr.tot td { border-top: 1px solid var(--line-2); }
/* attachment viewer: PDF inline, download next to each file */
.file-frame { width: 100%; height: min(70vh, 720px); border: 1px solid var(--line); border-radius: 10px; background: #fff; }
ul.files li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
ul.files .file-dl { margin-left: auto; min-height: 30px; padding: 4px 10px; }
ul.files .file-dl svg { width: 14px; height: 14px; }
/* PayFlow: TDS / adjustment before payment */
details.pay-ded { border: 1px dashed var(--line-2); border-radius: 10px; padding: 8px 12px; }
details.pay-ded summary { color: var(--ink); }
/* in-app camera */
.cam-box { background: #0b1220; border-radius: 12px; overflow: hidden; min-height: 180px; display: grid; place-items: center; }
.cam-box video { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.cam-box .cam-msg { color: #cbd5e1; padding: 14px; text-align: center; margin: 0; }
.cam-box video:not([hidden]) + .cam-msg { position: absolute; }
.cam .cam-box { position: relative; }
.cam .cam-box video:not([hidden]) ~ .cam-msg { bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.45); font-size: .8rem; }

/* Payroll – salary sheets */
.sal-wrap { overflow: auto; max-height: 72vh; padding: 0; margin-bottom: 12px; }
.sal { min-width: 1100px; }
.sal th { position: sticky; top: 0; z-index: 2; }
.sal td, .sal th { padding: 6px 8px; }
.sal td input { padding: 4px 6px; font-size: .85rem; min-height: 0; text-align: right; }
.sal td input[data-in="remarks"] { text-align: left; }
.sal .sal-name { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 170px; }
.sal th.sal-name { left: 0; z-index: 3; }
.sal tr.warnrow td { background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.sal tr.tot td { background: var(--surface-2); border-top: 1px solid var(--line); }
.sal .sal-ex { margin-top: 3px; font-size: .7rem; padding: 1px 6px; cursor: help; }
.sal thead tr.grp th { position: static; text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); background: var(--surface-2); }
.sal .g1 { border-left: 2px solid var(--line-2); }
.sal td.b { font-weight: 600; }
.sal td.ed, .sal td.ed input { background: var(--warn-soft) !important; }
.sal td input { width: 70px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); min-height: 0 !important; height: 30px; padding: 3px 6px !important; font-size: .85rem; box-shadow: none; }
.sal td input::placeholder { color: var(--ink-2); opacity: .9; }
.sal td input.code { width: 62px !important; border: 0 !important; background: transparent !important; text-align: left; font-size: .82rem; color: var(--ink-2); padding: 2px 0 !important; cursor: cell; height: auto; }
.sal input.code:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-radius: 4px; }
.mhead, .page-head:has(details.dd) { position: relative; z-index: 19; } /* below the top bar (20) when scrolled, above the tiles */
.mhead h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mhead h1 .chip { font-size: .75rem; font-weight: 500; }
.mhead h1 button.chip { cursor: pointer; border: 0; }
details.dd { position: relative; }
details.dd > summary { list-style: none; margin: 0; color: inherit; }
details.dd > summary::-webkit-details-marker { display: none; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.14); padding: 4px; display: flex; flex-direction: column; }
.dd-menu button, .dd-menu a, .dd-menu label { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer; min-height: 0; justify-content: flex-start; }
.dd-menu button:hover, .dd-menu a:hover, .dd-menu label:hover { background: var(--grey-soft); }
.rep-card { display: grid; gap: 10px; }
.rep-card .row { gap: 10px; align-items: end; flex-wrap: wrap; }

/* Payroll – Excel-like sheet (sheet-grid.js) */
.sg { position: relative; overflow: auto; max-height: max(360px, calc(100vh - 300px)); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; outline: none; }
.sg-kb { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; resize: none; }
.sg-t { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; min-width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.sg-t th, .sg-t td { height: 29px; padding: 0 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; box-sizing: border-box; }
.sg-t thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; white-space: normal; line-height: 1.2; vertical-align: bottom; padding: 6px 8px; height: auto; }
.sg-grp .sg-t thead tr.sg-h th { top: 26px; }
.sg-t thead tr.sg-h th { cursor: pointer; user-select: none; }
.sg-t thead tr.sg-h th:hover { background: var(--grey-soft); }
.sg-sort { margin-left: 4px; color: var(--brand); font-size: 10px; }
table.tbl th[data-sort] { cursor: pointer; user-select: none; }
table.tbl th[data-sort]:hover { color: var(--ink); }
.tsort { margin-left: 4px; color: var(--brand); font-size: 10px; }
.sg-t thead tr.sg-g th { height: 26px; text-align: center; text-transform: uppercase; font-size: 10.5px; letter-spacing: .05em; color: var(--ink-3); background: var(--grey-soft); vertical-align: middle; padding: 0 6px; }
.sg-t .tl { text-align: left; }
.sg-t .fz { position: sticky; z-index: 2; background: var(--surface); text-align: left; }
.sg-t .fz0 { left: 0; color: var(--ink-2); }
.sg-t .fz1 { left: 74px; border-right: 2px solid var(--line-2); width: var(--namew, 210px); min-width: var(--namew, 210px); max-width: var(--namew, 210px); }
.sg-t .fz0 { width: 74px; min-width: 74px; max-width: 74px; }
.sg-t thead .fz { z-index: 4; background: var(--surface-2); }
.sg-t thead tr.sg-g .fz { background: var(--grey-soft); }
.sg-t td.in { background: var(--surface); cursor: cell; }
.sg-t td.in.z, .sg-t td.ro.z { color: var(--ink-3); opacity: .7; }
.sg-t td.au { color: var(--ink-3); font-style: italic; }
.sg-t td.calc, .sg-t td.ro { background: var(--surface-2); }
.sg-t td.b { font-weight: 600; background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); }
.sg-t td.cat { color: var(--ink-3); font-size: 12px; text-align: left; }
.sg-t td.ed { background: var(--warn-soft) !important; }
.sg-t td.neg { color: var(--bad); font-weight: 600; }
.sg-t td.sel { background: var(--brand-soft) !important; }
.sg-t td.act { outline: 2px solid var(--brand); outline-offset: -2px; }
.sg-t td.fz1.warnrow { box-shadow: inset 3px 0 0 var(--warn); }
.sg-t td.fz1.leftrow { color: var(--bad); }
.sg-t td.fz1.badrow { box-shadow: inset 4px 0 0 var(--bad); background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.sg-note { color: var(--ink-3); font-size: 11.5px; }
.sg-t .g1 { border-left: 2px solid var(--line-2); }
.sg-t tr.sp td { padding: 0; border: 0; height: auto; }
.sg-t tfoot td { position: sticky; bottom: 0; z-index: 2; background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface-2)); font-weight: 700; border-top: 2px solid var(--line-2); }
.sg-t tfoot td.fz { z-index: 4; background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface-2)); }
.sg-ed { position: absolute; z-index: 6; border: 2px solid var(--brand) !important; border-radius: 0 !important; padding: 0 6px !important; font: inherit; font-size: 13px; background: var(--surface) !important; color: var(--ink); min-height: 0 !important; box-shadow: 0 2px 8px rgba(16,24,40,.18) !important; outline: none; }
.sg-menu { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.18); padding: 4px; display: flex; flex-direction: column; min-width: 250px; }
.sg-menu button { border: 0; background: none; text-align: left; padding: 8px 12px; border-radius: 7px; font: inherit; font-size: .88rem; color: var(--ink); cursor: pointer; min-height: 0; justify-content: flex-start; }
.sg-menu button:hover { background: var(--grey-soft); }
.mstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); margin: 4px 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.mstrip > div { padding: 9px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.mstrip > div:last-child { border-right: 0; }
.mstrip b { display: block; font-size: 17px; color: var(--ink); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mstrip small { display: block; font-size: 11px; color: var(--ink-3); text-transform: none; letter-spacing: 0; margin-top: 1px; white-space: nowrap; }
.mstrip > div.warn b { color: var(--warn); }
.mstrip b .muted { font-size: 14px; font-weight: 500; }
.mbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.mbar .seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.mbar input[type=search], .mbar select { min-height: 34px; padding: 5px 10px; width: auto; flex: 0 0 auto; }
.mbar input[type=search] { width: 220px; }
.mbar .check { flex: 0 0 auto; }
.mbar .gbtn { color: var(--brand); }
.guide .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .guide .two { grid-template-columns: 1fr; } }
.guide .way { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.guide .wt { font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.guide .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; }
.guide ol { margin: 0 0 10px; padding-left: 20px; font-size: .9rem; } .guide li { margin: 3px 0; }
.guide .ex { display: grid; grid-template-columns: auto auto; gap: 4px 10px; align-items: center; background: var(--surface-2); border-radius: 8px; padding: 10px; font-size: 12px; }
.guide .el { color: var(--ink-3); font-size: 11px; } .guide .ar { grid-column: 1 / -1; text-align: center; color: var(--ink-3); }
.guide .mini { border-collapse: collapse; font-size: 12px; } .guide .mini td, .guide .mini th { border: 1px solid var(--line-2); padding: 3px 8px; text-align: right; background: var(--surface); }
.guide .mini th { background: var(--grey-soft); font-size: 11px; } .guide .mini td.hl { background: var(--brand-soft); } .guide .mini td.tg { background: var(--ok-soft); font-weight: 600; }
.guide .kn { margin-top: 12px; font-size: .88rem; color: var(--ink-2); background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; line-height: 1.6; }

/* month sheet: more room for the grid */
#main.sheetpage { max-width: none; padding-top: 12px; padding-bottom: 8px; }
@media (min-width: 900px) { body.wide .sidebar { display: none; } body.wide #main { margin-left: 0; } #main.sheetpage { padding-left: 20px; padding-right: 20px; } }
.mhead.one { margin-bottom: 6px; }
.mhead.one h1 { font-size: 1.2rem; margin: 0; gap: 8px; align-items: baseline; }
.mhead.one .back-l { font-size: 1rem; color: var(--ink-3); margin-right: 2px; }
.mhead.one .mst { font-size: 11.5px; font-weight: 400; }
.mstrip.mini { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; padding: 5px 12px; margin: 0 0 8px; font-size: 12px; color: var(--ink-3); border-radius: 8px; }
.mstrip.mini > span { white-space: nowrap; border: 0; padding: 0; text-transform: none; letter-spacing: 0; font-size: 12px; }
.mstrip.mini b { display: inline; font-size: 13.5px; margin-left: 5px; }
.mstrip.mini > span.warn b { color: var(--warn); }
.mstrip .mx { margin-left: auto; background: none; border: 0; color: var(--brand); font-size: 12px; cursor: pointer; padding: 2px 4px; min-height: 0; }
.mstrip .mx-cell { display: flex; align-items: center; justify-content: flex-end; }
#main.sheetpage .mbar { margin-bottom: 8px; }
#main.sheetpage .mbar input[type=search], #main.sheetpage .mbar select { min-height: 32px; height: 32px; padding: 3px 10px; font-size: 13px; }
#main.sheetpage .mbar .seg button, #main.sheetpage .mbar button.sm, #main.sheetpage .mbar label.check { min-height: 32px; padding-top: 3px; padding-bottom: 3px; font-size: 13px; }
#main.sheetpage .mhead .btn.sm, #main.sheetpage .mhead button.sm { min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
.mstrip.mini small { display: inline; font-size: 11px; margin-left: 3px; }

/* ── Resolvix: one clean, Excel-like sheet ───────────────────────────── */
:root[data-prod="resolvix"] { --brand: #b4233c; --brand-2: #d63a55; --brand-soft: #fdf0f2; }
@media (prefers-color-scheme: dark) { :root[data-prod="resolvix"] { --brand: #fb7185; --brand-2: #f43f5e; --brand-soft: #3b1219; --brand-ink: #24060c; } }
.chip.rx-cl { background: #e8f0fe; color: #1f5fbf; } .chip.rx-co { background: #f2edfb; color: #6b3fb5; }
.rxs { --rl: var(--line); font-size: 13px; margin: -6px -4px 0; }
.rxs .mu { color: var(--ink-3); } .rxs .rd { color: var(--bad); }
.rx-sum { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; padding: 2px 2px 10px; }
.rx-sum a { color: var(--ink-2); cursor: pointer; white-space: nowrap; text-decoration: none; }
.rx-sum a b { color: var(--ink); font-size: 1.15rem; font-weight: 700; margin-right: 5px; font-variant-numeric: tabular-nums; }
.rx-sum a.od b { color: var(--bad); } .rx-sum a:hover b, .rx-sum a.on, .rx-sum a.on b { color: var(--brand); }
.rx-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 2px 8px; }
.rx-bar .sp, .rx-tabs .sp { flex: 1; } .rx-bar .lb { color: var(--ink-3); font-size: 12px; } .rx-bar .ct { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.rx-bar .clr { color: var(--brand); cursor: pointer; font-size: 12px; }
.rx-in { border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; background: var(--surface); color: var(--ink); font: inherit; min-height: 0; height: auto; width: auto; }
#rxQ { width: 220px; } .rx-in.sm { padding: 3px 6px; font-size: 12.5px; max-width: 100%; }
.rx-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 5px 11px; cursor: pointer; white-space: nowrap; font: inherit; min-height: 0; }
.rx-btn:hover { background: var(--grey-soft); } .rx-btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; } .rx-btn.gh { border-color: transparent; color: var(--ink-2); }
.rx-wrap { overflow: auto; max-height: calc(100vh - 250px); min-height: 240px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.rx-t { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.rx-t th, .rx-t td { padding: 0 10px; height: 30px; border-bottom: 1px solid var(--rl); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: var(--w); min-width: var(--w); max-width: var(--w); }
.rx-t th { position: sticky; top: 0; z-index: 3; background: var(--bg, #f6f8fa); font-weight: 600; color: var(--ink-2); font-size: 12px; height: 32px; border-bottom-color: var(--line); user-select: none; }
.rx-t th .h { display: flex; align-items: center; gap: 4px; }
.rx-t th .f { margin-left: auto; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; padding: 1px 5px; border-radius: 4px; font-size: 11px; min-height: 0; }
.rx-t th .f:hover { background: var(--grey-soft); color: var(--ink); } .rx-t th .f.on { color: #fff; background: var(--brand); }
.rx-t tbody tr.pt td { background: var(--surface); } .rx-t tbody tr.pt:nth-child(even) td { background: color-mix(in srgb, var(--ink) 2.5%, var(--surface)); }
.rx-t tbody tr.pt:hover td { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); cursor: pointer; }
.rx-t tbody tr.pt.cur td { background: color-mix(in srgb, #2563eb 11%, var(--surface)); }
.rx-t .c0 { position: sticky; left: 0; z-index: 2; } .rx-t th.c0 { z-index: 4; }
.rx-t .c1 { position: sticky; left: 86px; z-index: 2; box-shadow: 1px 0 0 var(--line); } .rx-t th.c1 { z-index: 4; }
.rx-t td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rx-t .rx-no { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rx-t tr.grp td { background: color-mix(in srgb, var(--ink) 5%, var(--surface)) !important; font-weight: 600; cursor: pointer; max-width: none; }
.rx-t tr.grp .n { color: var(--ink-3); font-weight: 500; margin-left: 8px; } .rx-t tr.grp .car { display: inline-block; width: 15px; color: var(--ink-3); }
.rx-t .empty-row { height: 90px; text-align: center; color: var(--ink-3); white-space: normal; max-width: none; }
.tg { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; line-height: 19px; }
.t-cl { background: #e8f0fe; color: #1f5fbf; } .t-co { background: #f2edfb; color: #6b3fb5; } .t-own { background: #fff4dc; color: #8a5a00; }
.t-int { background: var(--grey-soft); color: var(--ink-2); } .t-od { background: var(--bad-soft); color: var(--bad); } .t-res { background: var(--ok-soft); color: var(--ok); }
@media (prefers-color-scheme: dark) { .t-cl { background: #172554; color: #93c5fd; } .t-co { background: #2e1065; color: #d8b4fe; } .t-own { background: #3a2a05; color: #fcd34d; } }
.rx-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 0 2px; }
.rx-tabs button { border: 0; background: transparent; color: var(--ink-2); padding: 7px 14px; cursor: pointer; border-top: 2px solid transparent; font: inherit; min-height: 0; border-radius: 0; }
.rx-tabs button.on { color: var(--ink); font-weight: 600; border-top-color: var(--brand); background: var(--surface); }
.rx-tabs .n { color: var(--ink-3); font-weight: 500; margin-left: 5px; } .rx-tabs a { color: var(--ink-2); font-size: 12.5px; margin-left: 14px; }
.rx-pop { position: fixed; z-index: 60; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 8px; display: none; font-size: 13px; }
.rx-pop.on { display: block; }
.rx-pop .srt { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.rx-pop .srt button { border: 0; background: transparent; text-align: left; padding: 5px 6px; border-radius: 5px; cursor: pointer; font: inherit; color: var(--ink); min-height: 0; }
.rx-pop .srt button:hover { background: var(--grey-soft); }
.rx-pop .q { width: 100%; margin-bottom: 6px; }
.rx-pop .vals { max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 4px 2px; }
.rx-pop label { display: flex; gap: 7px; align-items: center; padding: 3px 6px; border-radius: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; }
.rx-pop label:hover { background: var(--grey-soft); } .rx-pop label .c { margin-left: auto; color: var(--ink-3); font-size: 11px; }
.rx-pop input[type=checkbox] { width: auto; min-height: 0; margin: 0; }
.rx-pop .qk { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.rx-pop .qk button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 2px 9px; cursor: pointer; font-size: 12px; color: var(--ink); min-height: 0; }
.rx-pop .qk button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.rx-pop .ft { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 6px; }
.rx-side { position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100%; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgba(0,0,0,.08); z-index: 55; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .18s ease; font-size: 13px; }
.rx-side.on { transform: none; }
.rx-side .hd { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.rx-side .x { float: right; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-3); min-height: 0; padding: 0 4px; }
.rx-side .no { color: var(--ink-3); font-size: 12px; }
.rx-side h2 { margin: 3px 0 10px; font-size: 15px; line-height: 1.4; font-weight: 600; }
.rx-side .ti { width: 100%; margin: 4px 0 10px; font: 600 14px/1.4 inherit; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; resize: vertical; background: transparent; color: var(--ink); }
.rx-side .ti:hover, .rx-side .ti:focus { border-color: var(--line); background: var(--surface); }
.rx-side .kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; align-items: center; }
.rx-side .kv > span { color: var(--ink-3); font-size: 12px; }
.rx-side .ck { font-size: 12px; color: var(--ink-2); margin-left: 6px; white-space: nowrap; } .rx-side .ck input { width: auto; min-height: 0; margin: 0 3px 0 0; vertical-align: -1px; }
.rx-side .sv-row { display: flex; gap: 8px; margin-top: 10px; }
.rx-side .bd { flex: 1; overflow: auto; padding: 12px 16px; }
.rx-side .msg { display: flex; gap: 9px; margin-bottom: 14px; }
.rx-side .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.rx-side .av.co { background: #f2edfb; color: #6b3fb5; } .rx-side .av.cl { background: #e8f0fe; color: #1f5fbf; }
.rx-side .meta { font-size: 12px; color: var(--ink-3); } .rx-side .meta b { color: var(--ink); font-weight: 600; }
.rx-side .ev { font-size: 11.5px; color: var(--ink-2); background: var(--grey-soft); border-radius: 4px; padding: 1px 6px; display: inline-block; margin-top: 3px; }
.rx-side .tx { margin-top: 3px; white-space: pre-wrap; line-height: 1.45; }
.rx-side .fl { display: inline-flex; gap: 5px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; margin: 5px 5px 0 0; font-size: 12px; background: var(--surface); color: var(--ink); cursor: pointer; min-height: 0; }
.rx-side .fl:hover { border-color: var(--brand); }
.rx-side .rp { border-top: 1px solid var(--line); padding: 10px 16px 14px; }
.rx-side textarea#sTxt { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; resize: vertical; min-height: 64px; font: inherit; }
.rx-side .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; } .rx-side .row .sp { flex: 1; }
.rx-side .acts { border-top: 1px dashed var(--line); padding-top: 8px; }
.rx-add .rx-att { border: 1px dashed var(--line); background: transparent; border-radius: 5px; padding: 1px 7px; cursor: pointer; font-size: 12px; color: var(--ink-2); min-height: 0; }
.rx-cat input[data-cn] { min-height: 0; }
@media (max-width: 760px) {
  .rxs .hm, .rx-t .hm { display: none; }
  .rx-t .c0 { display: none; } .rx-t .c1 { left: 0; --w: 210px !important; width: 210px; min-width: 210px; max-width: 210px; }
  .rx-wrap { max-height: calc(100vh - 290px); } #rxQ { width: 100%; flex: 1 1 100%; }
  .rx-side { width: 100%; }
}
.rx-t th, .rx-t td { font-size: 13px; line-height: 1.3; }
.rx-t td .tg { font-size: 11.5px; }
.rxs .rx-in, .rx-side .rx-in, .rx-pop .rx-in { min-height: 0 !important; height: auto !important; font-size: 12.5px !important; padding: 4px 8px; line-height: 1.4; }
.rx-side input[type=date].rx-in { width: auto; }
.modal:has(.rx-add) { width: min(1240px, 96vw); max-width: min(1240px, 96vw); }
.rx-add .xgrid td input, .rx-add .xgrid td select { min-height: 0; height: 32px; font-size: 13px; }

/* ── Payroll monthly inputs (Overtime, Leaves, Approvals, OT ledger) ── */
.intabs { margin: 0 0 10px; } .intabs a { border: 0; background: transparent; min-height: 34px; padding: 6px 14px; font-weight: 500; border-radius: 8px; font-size: .9rem; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.intabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.inbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; }
.inbar .grow { flex: 1; min-width: 120px; }
.mpick input:not([type=checkbox]) { min-height: 34px; padding: 4px 8px; width: auto; }
.inbar input[type=search], .lvnote input[type=search] { min-height: 34px; padding: 5px 10px; width: 140px; }
.lvpanel input:not([type=checkbox]) { width: auto; }
.saved-ok { color: var(--ok); font-weight: 600; font-size: .8rem; white-space: nowrap; transition: transform .2s; } .saved-ok.on { transform: scale(1.08); }
input.cellin:not([type=checkbox]) { width: 76px !important; min-height: 30px; padding: 4px 8px; text-align: right; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-variant-numeric: tabular-nums; background: var(--surface); }
input.cellin.wide:not([type=checkbox]) { width: 100% !important; min-width: 140px; text-align: left; } input.cellin:disabled { background: transparent; border-color: transparent; color: var(--ink-2); }
.cellin:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.intbl td { vertical-align: middle; }
.lvnote { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; font-size: .86rem; }
.lvnote.ok { background: var(--ok-soft); color: var(--ok); } .lvnote.info { background: var(--brand-soft); color: var(--brand); } .lvnote.bad { background: var(--bad-soft); color: var(--bad); }
.lvpanel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 2px solid var(--brand); margin-bottom: 8px; padding: 10px 12px; }
.lvpanel input { min-height: 34px; }
.attwrap, .table-wrap.card.attwrap { overflow: auto; max-height: calc(100vh - 230px); padding: 0; } /* .table-wrap.card hides overflow – the grid must scroll both ways */
table.att { border-collapse: separate; border-spacing: 0; font-size: .82rem; }
table.att th { position: sticky; top: 0; background: var(--surface); z-index: 2; font-size: .72rem; color: var(--ink-3); padding: 6px 2px; border-bottom: 1px solid var(--line); }
table.att th.dh { width: 30px; min-width: 30px; text-align: center; } table.att th.dh small { display: block; font-weight: 500; }
table.att th.sun, table.att td.sun { background: var(--surface-2); } table.att th.hol { background: var(--warn-soft); color: var(--warn); }
table.att td { padding: 2px 1px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
table.att td.num, table.att th.num { padding: 4px 10px; text-align: right; }
table.att .stk { position: sticky; left: 0; background: var(--surface); z-index: 1; text-align: left; padding: 4px 10px; min-width: 190px; } table.att thead .stk { z-index: 3; }
.dc { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; border-radius: 6px; border: 0; font: 700 .68rem/1 inherit; font-style: normal; background: var(--grey-soft); color: var(--ink-3); position: relative; padding: 0; cursor: pointer; vertical-align: middle; }
.dc.c-FD { background: var(--ok-soft); color: var(--ok); } .dc.c-HD { background: var(--warn-soft); color: var(--warn); } .dc.c-A { background: var(--bad-soft); color: var(--bad); } .dc.c-WO { background: var(--grey-soft); color: var(--ink-3); } .dc.c-n { background: transparent; }
.dc:disabled { cursor: default; } .dc.chd { box-shadow: 0 0 0 2px var(--violet); } .dc.adj { box-shadow: 0 0 0 2px #e8a317; } .dc.sel { outline: 2px solid var(--ink); outline-offset: 1px; }
.dc.flg::after { content: ''; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: #e8a317; border: 2px solid var(--surface); }
.dc.big { width: 44px; height: 32px; font-size: .78rem; }
.lg .dc { margin: 0 2px 0 8px; cursor: default; }
.ticks { width: auto; } .ticks td, .ticks th { padding: 6px 14px; text-align: center; } .ticks td:first-child { text-align: left; }
@media (max-width: 720px) { .inbar { padding: 6px; } .inbar .grow { flex-basis: 100%; order: 9; } table.att .stk { min-width: 130px; } }
.sm-only { display: block; } @media (min-width: 700px) { .sm-only { display: none; } }
/* ✨ Read WhatsApp */
.btn.ai, button.ai { border-color: #cdbff8; color: var(--violet); background: var(--violet-soft); }
.aiwrap textarea { width: 100%; }
.aiscroll { max-height: min(60vh, 560px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.aitbl td { vertical-align: top; } .aitbl select.aisel { min-height: 32px; padding: 3px 6px; font-size: .82rem; width: 200px; }
.aimsg { white-space: pre-wrap; font: 11.5px/1.4 ui-monospace, monospace; color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 6px 8px; margin: 4px 0 0; max-width: 360px; }
.aiflag { white-space: normal; margin: 2px 4px 0 0; }

/* ── Zentra look – Payroll and PayFlow (html.zen; other products keep their look until moved over) ── */
:root.zen {
  --brand: #5b3fd9; --brand-2: #7c5cf0; --brand-soft: #efebff; --bg: #f3f5fa; --surface-2: #f7f8fc;
  --ink: #1b1f3b; --ink-2: #4b5170; --ink-3: #8a90ab; --line: #e7e9f2; --line-2: #d6d9e6;
  --ok: #12a37f; --ok-soft: #e3f6f0; --warn: #a96a06; --warn-soft: #fdf2dc; --bad: #e5484d; --bad-soft: #fdeceb;
  --violet: #5b3fd9; --violet-soft: #efebff; --grey-soft: #eef0f6;
  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px; --shadow: 0 1px 2px rgba(27, 31, 59, .05);
}
@media (prefers-color-scheme: dark) {
  :root.zen { --brand: #a594ff; --brand-2: #c4b8ff; --brand-soft: #2a2350; --brand-ink: #120c2e; --bg: #0f1120; --surface: #171a2e; --surface-2: #1d2138; --line: #272b45; --line-2: #343a5a; --ink: #eceefa; --ink-2: #b4b9d4; --ink-3: #868ba8; --violet: #a594ff; --violet-soft: #2a2350; --grey-soft: #21253d; }
}
:root.zen body { font-feature-settings: normal; letter-spacing: -.003em; }
.zmark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #5b3fd9, #12a37f); display: grid; place-items: center; color: #fff; font: 800 15px/1 var(--font); }
:root.zsw .brand .logo { background: none; padding: 0; width: auto; height: auto; }
:root.zsw .brand b { font-weight: 800; letter-spacing: -.02em; }
:root.zsw .topbar { justify-content: flex-start; }
:root.zsw .top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.prod-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 5px 10px 5px 6px; min-height: 36px; font: 700 13.5px/1 var(--font); color: var(--ink); cursor: pointer; }
.prod-pill .pp-ic { width: 24px; height: 24px; border-radius: 7px; background: var(--brand); color: #fff; display: grid; place-items: center; } .prod-pill .pp-ic .ic { width: 15px; height: 15px; }
.prod-pill .pp-car { color: var(--ink-3); font-size: 11px; }
.me-txt { display: none; text-align: right; line-height: 1.2; } .me-txt b { display: block; font-size: 13px; } .me-txt small { color: var(--ink-3); font-size: 11.5px; }
@media (min-width: 900px) { .me-txt { display: block; } }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pcard { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; color: var(--ink); font-size: 13px; text-align: center; }
.pcard:hover, .pcard.on { background: var(--grey-soft); } .pcard small { color: var(--ink-3); font-size: 11px; }
.pcard .pc-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--pc); color: #fff; display: grid; place-items: center; } .pcard .pc-ic .ic { width: 20px; height: 20px; }
:root.zen .sidebar .nav-h { margin: 6px 10px 8px; font-size: 11.5px; color: var(--ink-3); font-weight: 700; text-transform: none; letter-spacing: 0; }
:root.zen .nav a { font-weight: 600; font-size: 13.5px; border-radius: 10px; }
.nav-note { margin: 18px 10px 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
:root.zen .card, :root.zen .table-wrap.card { border-radius: var(--radius); border-color: transparent; box-shadow: var(--shadow); }
:root.zen .tbl th { text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--ink-3); background: var(--surface-2); }
:root.zen button.primary, :root.zen .btn.primary { border-radius: 10px; }
:root.zen h1 { font-size: 1.5rem; letter-spacing: -.02em; }
/* My work */
.mywork > p { margin: 2px 0 18px; }
.tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.task { background: var(--surface); border-radius: var(--radius); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); color: var(--ink); transition: transform .12s ease; }
.task:hover { transform: translateY(-2px); }
.task .pt { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--brand); } .task .pt i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.task h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; } .task p { margin: 0; color: var(--ink-2); font-size: 13px; }
.task .go { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--brand); }
.task.hot { box-shadow: 0 0 0 2px var(--brand), 0 8px 24px rgba(91, 63, 217, .15); }
.mywork .mini { display: flex; gap: 10px; margin: 24px 0 10px; align-items: baseline; } .mywork .mini h2 { margin: 0; font-size: 15px; color: var(--ink); }
.feed { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.feed div { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; } .feed div:last-child { border: 0; }
.feed small { color: var(--ink-3); margin-left: auto; white-space: nowrap; }
@media (max-width: 720px) { .feed div { flex-wrap: wrap; } .feed small { margin-left: 0; } }
:root.zen .intbl td { padding: 5px 12px; vertical-align: middle; }
:root.zen input.cellin:not([type=checkbox]) { min-height: 32px !important; padding: 3px 8px; border-radius: 8px; }
:root.zen .inbar { border: 0; box-shadow: var(--shadow); border-radius: 14px; }
:root.zen .intabs { background: transparent; padding: 0; gap: 4px; border-bottom: 1px solid var(--line); border-radius: 0; width: 100%; }
:root.zen .intabs a { border-radius: 0; box-shadow: none; padding: 8px 4px; margin-right: 14px; border-bottom: 2px solid transparent; }
:root.zen .intabs a.on { background: none; color: var(--brand); border-bottom-color: var(--brand); box-shadow: none; }

/* ── ✨ Read bill (PayFlow) ── */
.spark { font-size: 1.05em; }
.aihead { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; } .aihead h3 { margin: 0; }
.aicard { border-left: 0; } .aicard .table-wrap { margin: 8px 0 4px; box-shadow: none; }
.aibills td, .aibills th { vertical-align: top; } .aibills tr.aifl td { padding-top: 0; border-top: 0; }
.aiflags { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.aiflags li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; padding: 6px 10px; border-radius: 10px; background: var(--grey-soft); color: var(--ink-2); }
.aiflags li b { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--ink-3); color: #fff; margin-top: 1px; }
.aiflags li.lv-bad { background: var(--bad-soft); color: var(--bad); } .aiflags li.lv-bad b { background: var(--bad); }
.aiflags li.lv-warn { background: var(--warn-soft); color: var(--warn); } .aiflags li.lv-warn b { background: var(--warn); }
.aitds { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); font-size: 13px; display: grid; gap: 6px; }
.aitds .row { justify-content: space-between; }
.aifoot { margin: 10px 0 0; }
.aistrip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); }
.aires { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.aires .table-wrap { margin: 6px 0; }
.mywork .notice.mt { margin-top: 14px; }
.aifill { background: var(--brand-soft) !important; border-color: var(--brand-2) !important; }
#nf fieldset { min-width: 0; } /* a fieldset grows to its widest child by default – keeps the AI table inside on phones */
.aires, .aicard { min-width: 0; } .aires .table-wrap, .aicard .table-wrap { overflow-x: auto; max-width: 100%; }
.aibills .show-m { display: block; } @media (min-width: 700px) { .aibills .show-m { display: none; } }
@media (max-width: 699px) { .aibills td, .aibills th { padding: 8px 6px; } }

/* ── Request payment (PayFlow) ── */
.paycards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.paycard { display: flex; gap: 14px; align-items: center; padding: 18px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); border: 1px solid var(--line); }
.paycard:hover { border-color: var(--brand-2); }
.paycard .pc-i { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; } .paycard .pc-i .ic { width: 22px; height: 22px; }
.paycard b { display: block; font-size: 16px; } .paycard small { color: var(--ink-3); font-size: 13px; }
.pline { display: grid; gap: 10px; padding: 14px; }
.pl-top { display: flex; gap: 10px; align-items: flex-start; }
.pl-n { width: 24px; height: 24px; border-radius: 50%; background: var(--grey-soft); color: var(--ink-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; margin-top: 8px; }
.pl-who { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding-top: 6px; } .pl-who b { font-size: 15px; } .pl-who small { color: var(--ink-3); }
.pl-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pl-amt { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; background: var(--surface); flex: 1 1 140px; max-width: 220px; }
.pl-amt span { color: var(--ink-3); font-weight: 600; } .pl-amt input { border: 0 !important; box-shadow: none !important; padding: 8px 0 !important; min-height: 40px; width: 100%; font-weight: 600; font-size: 16px; background: transparent; }
.pl-amt.sm { flex: 0 0 140px; } .pl-amt.sm input { font-size: 14px; min-height: 34px; }
.pl-file { cursor: pointer; }
.pl-files, .pl-ai { margin: -4px 0 0; } .pl-note { font-size: 13px; }
.icon-btn { border: 0; background: transparent; padding: 6px; color: var(--ink-3); min-height: 0; } .icon-btn .ic { width: 18px; height: 18px; }
.tahead { position: relative; } .ta-in { width: 100%; font-size: 16px; }
.ta-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 10px 30px rgba(27, 31, 59, .14); overflow: hidden; max-height: 320px; overflow-y: auto; }
.ta-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 10px 12px; min-height: 0; color: var(--ink); }
.ta-list button:hover, .ta-list button:focus { background: var(--brand-soft); } .ta-list button small { color: var(--ink-3); font-size: 12px; } .ta-list .ta-new { flex-direction: row; gap: 6px; color: var(--brand); }
.pchips { display: grid; gap: 8px; }
.pchip { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.pc-adv { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 8px; }
.paybar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin: 4px -4px 0; background: var(--surface); border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -6px 20px rgba(27, 31, 59, .06); }
.paybar span { display: flex; flex-direction: column; line-height: 1.2; } .paybar small { color: var(--ink-3); font-size: 12px; } .paybar b { font-size: 17px; }
@media (max-width: 720px) { .paybar { bottom: 64px; } }
.bline.off { opacity: .55; } .bline input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.listcard { border-left: 0; box-shadow: 0 0 0 2px var(--brand-soft); }

/* bill corrections */
.ai-ed { color: var(--warn); display: block; }
tr.bedit td { background: var(--surface-2); }
.bedit-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; margin: 4px 0 10px; }
.bedit-g label { display: grid; gap: 3px; font-size: 12px; color: var(--ink-3); font-weight: 600; } .bedit-g label.wide { grid-column: 1 / -1; }
.bedit-g input { min-height: 36px; font-size: 14px; }
.ai-log { margin-top: 8px; } .ai-log ul { margin: 6px 0 0; padding-left: 18px; } .ai-log li { margin: 3px 0; }
/* phones: Zentra top bar – brand and company shrink, product switcher shows its icon only (no overlap) */
@media (max-width: 720px) {
  :root.zsw .topbar { gap: 8px; padding: 0 10px; }
  :root.zsw .brand { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  :root.zsw .brand > span:last-child { min-width: 0; overflow: hidden; display: block; }
  :root.zsw .brand small, :root.zsw .comp-sel { max-width: 100%; width: 100%; field-sizing: fixed; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #prodPill { flex: none; }
  .prod-pill { padding: 5px 7px 5px 6px; gap: 4px; } .prod-pill b { display: none; }
  :root.zsw .top-actions { flex: none; gap: 6px; }
}

.ptr { position: fixed; top: calc(var(--top-h) + 4px); left: 50%; z-index: 60; transform: translate(-50%, 0); padding: 6px 14px; border-radius: 999px; background: var(--surface); color: var(--brand); font: 600 13px/1.2 var(--font); box-shadow: 0 4px 16px rgba(27, 31, 59, .15); pointer-events: none; opacity: 0; }

/* My work, light (24 Oct 2026): greeting, the lists that need action, one-line status rows */
.mywork > h1 { margin-bottom: 14px; }
.mywork .attn { margin-top: 12px; } .mywork .attn:first-of-type { margin-top: 0; }
.qrows { margin-top: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.qrow { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
.qrow:last-child { border-bottom: 0; }
.qrow span { flex: 1; min-width: 0; display: grid; gap: 2px; } .qrow b { font-size: 14px; } .qrow small { color: var(--ink-2); font-size: 12.5px; }
.qrow i { font-style: normal; font-size: 22px; color: var(--ink-3); line-height: 1; }

/* Pay vendors – clean line (24 Oct 2026): bill first, read on attach */
.pl-head { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 -2px; }
.pl-head .pl-n { width: auto; height: auto; border-radius: 999px; padding: 3px 10px; margin: 0; font-size: 12px; }
.pl-billbtn { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px dashed var(--brand-2, #8b7cf0); border-radius: 14px; background: var(--brand-soft); color: var(--brand); cursor: pointer; }
.pl-billbtn .ic { width: 26px; height: 26px; flex: none; }
.pl-billbtn span { display: grid; gap: 2px; } .pl-billbtn b { font-size: 15px; } .pl-billbtn small { color: var(--ink-2); font-size: 12.5px; }
.pl-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-th { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--grey-soft); display: grid; place-items: center; border: 1px solid var(--line); }
.pl-th img { width: 100%; height: 100%; object-fit: cover; } .pl-th > b { font-size: 12px; color: var(--ink-2); }
.pl-th button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; background: rgba(27, 31, 59, .7); color: #fff; border: 0; display: grid; place-items: center; }
.pl-th button .ic { width: 13px; height: 13px; }
.pl-th.add { border-style: dashed; color: var(--brand); cursor: pointer; background: var(--surface); }
.pl-stl { margin-top: 2px; }
.pl-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.pl-st.busy { color: var(--brand); } .pl-st.ok { color: var(--ok, #0f8a5f); } .pl-st.warn { color: var(--warn); } .pl-st.bad { color: var(--bad); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
.pl-iss summary { font-size: 13px; color: var(--warn); cursor: pointer; }
.pl-newv { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--soft, #f4f6fb); border: 1px dashed var(--line, #d6dbe6); display: grid; gap: 6px; } .pl-newv p { margin: 0; }
.pl-iss ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; } .pl-iss li.lv-bad { color: var(--bad); } .pl-iss li.lv-warn { color: var(--warn); }
.pl-addnote { justify-self: start; }
.pline .pl-amt { max-width: none; }

.prod-pill.solo { cursor: default; }
.mywork > h1 { margin-bottom: 2px; } .mywork .hello-role { margin: 0 0 14px; color: var(--ink-3); font-size: 13px; font-weight: 500; }
/* AI-filled amount: the whole box gets the light colour, not just the inner field */
.pl-amt:has(input.aifill) { background: var(--brand-soft); border-color: var(--brand-2, #8b7cf0); } .pl-amt input.aifill { background: transparent !important; }
/* Phone forms with a total bar (Pay vendors / Pay staff): the bar stays put just above the bottom menu while
   scrolling – before, at the end of the page it rode up with the "Zentra ©" line under it */
@media (max-width: 720px) {
  body.on-form .paybar { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); margin: 0; z-index: 15; border-radius: 14px 14px 0 0; }
  body.on-form:has(.paybar) #main { padding-bottom: 96px; }
  body.on-form:has(.paybar) .powered { display: none; }
}

/* a finished vendor / person in the list: one line with Edit and × */
.pmini { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.pmini .grow { min-width: 0; display: grid; gap: 2px; } .pmini b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pmini small { color: var(--ink-2); font-size: 12.5px; }
.pmini.in { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 10px 12px; }

/* Dashboard on a phone: everything in one screen – small tiles, count and amount on one line */
@media (max-width: 720px) {
  .dash > h1 { margin: 0 0 8px; }
  .dash .toolbar { margin-bottom: 8px; gap: 4px; }
  .dash .seg { margin-bottom: 8px; }
  .dash .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash .tile { padding: 9px 12px; gap: 0 8px; flex-direction: row; flex-wrap: wrap; align-items: baseline; }
  .dash .tile span { flex-basis: 100%; font-size: 12px; }
  .dash .tile b { font-size: 1.25rem; }
  .dash .tile small { font-size: 12.5px; }
}

/* Pay vendors – kind of payment (Bill / Advance / Rent deposit / Utility) */
.pl-types { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -2px 0 2px; } .pl-types::-webkit-scrollbar { display: none; }
.pl-types button { flex: none; min-height: 32px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.pl-types button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pl-billbtn.soft { border-color: var(--line-2, #c9cbe0); background: var(--surface); color: var(--ink); }
.pl-util { margin-top: 8px; }

/* lists with the round "+" button: room under the last card so the button never covers it */
@media (max-width: 720px) { body.has-fab #main { padding-bottom: 96px; } }
/* computer screens: forms and the home column at a readable width instead of the full screen */
@media (min-width: 900px) {
  :root.zen body.on-form #main > * { max-width: 680px; margin-left: auto; margin-right: auto; } /* PayFlow forms only – Storix / DayClose keep their wide grids */
  .mywork, .paycards { max-width: 760px; }
  .paycards { grid-template-columns: 1fr; }
}

/* request card – three short lines (24 Oct 2026) */
.req-meta.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-no { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.req-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .8rem; color: var(--ink-3); min-width: 0; }
.req-foot > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-foot .nowwith { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* who has it now (27 Oct 2026) */
.req-by { font-size: .78rem; color: var(--ink-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* request page – who is paid and how much first */
.rq-h { margin-bottom: 2px; overflow-wrap: anywhere; }
.rq-amt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 4px; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.rq-amt .chip { font-size: .74rem; }
.page-head:has(.rq-h) { align-items: flex-start; } .page-head:has(.rq-h) .back { margin-top: 4px; }

.bline .chip { white-space: normal; text-align: left; } /* on-hold reason was cut on phones */

/* PDF pages drawn as pictures (phones cannot show a PDF inside the app) */
.pdf-pages { display: grid; gap: 10px; max-height: 70vh; overflow: auto; background: var(--grey-soft); padding: 8px; border-radius: 12px; }
.pdf-page { width: 100%; height: auto; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.pl-th .pl-pv { all: unset; width: 100%; height: 100%; display: grid; place-items: center; cursor: pointer; }
.pl-th .pl-pv img { width: 100%; height: 100%; object-fit: cover; }

/* ══ Zentra brand (Oct 2026) – PayFlow and the login: navy ink, blue → teal marks, blue actions ══
   Palette from the brand sheet: navy #0E1A3A · blue #1A5FE0 / #2F86FF · teal #12B39B · mint #8FE3D0.
   Payroll and the other products keep their own look for now. */
:root.zen[data-prod="payments"], .login {
  --brand: #1a5fe0; --brand-2: #2f86ff; --brand-soft: #e8f0fe; --brand-ink: #ffffff;
  --bg: #f3f6fb; --surface-2: #f6f8fc; --ink: #0e1a3a; --ink-2: #45506e; --ink-3: #8590ab; --line: #e5e9f2; --line-2: #d3d9e6;
  --ok: #0f9e86; --ok-soft: #e1f6f1; --violet: #1a5fe0; --violet-soft: #e8f0fe; --grey-soft: #eef1f7; --teal: #12b39b;
}
@media (prefers-color-scheme: dark) {
  :root.zen[data-prod="payments"], .login {
    --brand: #5ea0ff; --brand-2: #7cb6ff; --brand-soft: #15284d; --brand-ink: #06122b;
    --bg: #0a1326; --surface: #101c34; --surface-2: #15223e; --line: #203052; --line-2: #2c3e66;
    --ink: #e8eefb; --ink-2: #b0bcd8; --ink-3: #7f8bab; --ok: #34d1b4; --ok-soft: #0e2f2c; --violet: #5ea0ff; --violet-soft: #15284d; --grey-soft: #18264a; --teal: #34d1b4;
  }
}
.zmark { background: none; width: 30px; height: 30px; display: grid; place-items: center; }
.zmark .zsvg, .brand-z .zsvg { display: block; }
.brand-z { display: grid; place-items: center; margin: 0 auto 10px; filter: drop-shadow(0 8px 18px rgba(26, 95, 224, .25)); }
.prod-pill .pp-ic.pm { background: none; width: 24px; height: 24px; } .prod-pill .pp-ic.pm .psvg { width: 24px; height: 24px; display: block; }
:root.zen[data-prod="payments"] .ts-done i { background: var(--teal); border-color: var(--teal); }
:root.zen[data-prod="payments"] .fab { background: linear-gradient(135deg, var(--brand), var(--teal)); box-shadow: 0 8px 22px rgba(26, 95, 224, .32); }
:root.zen[data-prod="payments"] .paycard .pc-i { background: linear-gradient(135deg, var(--brand-soft), var(--ok-soft)); color: var(--brand); }
:root.zen[data-prod="payments"] .avatar { background: var(--brand-soft); color: var(--brand); }

/* Payments on a phone: each payment as a small two-column card instead of a wide table */
@media (max-width: 640px) {
  .paytbl thead { display: none; }
  .paytbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
  .paytbl td { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; min-width: 0; overflow-wrap: anywhere; }
  .paytbl td[data-l]:not([data-l=""])::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--ink-3); }
}

/* Phones: no row of buttons hides part of itself off the screen – filters, tabs and kinds wrap onto a second line
   (people did not see that the row could be swiped) */
@media (max-width: 640px) {
  .chips, .pl-types, .seg.scroll { flex-wrap: wrap; overflow-x: visible; }
  .chips { padding: 8px 0 10px; }
  .seg.scroll > a, .seg.scroll > button { flex: 0 1 auto; }
}

/* Payment types (Masters) on a phone: one card per type instead of an 8-column table */
@media (max-width: 640px) {
  .mtbl thead { display: none; }
  .mtbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px; border-top: 1px solid var(--line); }
  .mtbl td { display: flex; align-items: center; gap: 8px; padding: 0 !important; border: 0 !important; text-align: left !important; min-width: 0; }
  .mtbl td.c-no { display: none; }
  .mtbl td.c-name, .mtbl td.c-wide, .mtbl td.c-doc { grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 4px; }
  .mtbl td.c-wide { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
  .mtbl td input:not([type=checkbox]) { min-width: 0 !important; width: 100%; }
  .mtbl td[data-l]::before { content: attr(data-l); font-size: 12px; color: var(--ink-3); }
  .mtbl td.c-wide::before { width: 100%; }
  .mtbl td.c-chk { justify-content: space-between; }
}

/* Dashboard tables (by raiser / approver / type / location) on a phone: one small card per row */
@media (max-width: 640px) {
  .dtbl colgroup, .dtbl thead { display: none; }
  .tbl.dtbl, .dtbl tbody { display: block; width: 100%; min-width: 0; }
  .dtbl tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
  .dtbl td { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; min-width: 0; overflow-wrap: anywhere; }
  .dtbl td.c-name { grid-column: 1 / -1; font-weight: 700; }
  .dtbl td[data-l]::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
}
/* copy buttons: big enough for a thumb */
.copy-btn, button[data-copy] { min-width: 32px; min-height: 32px; }

/* Phones: plain tables as small cards (labels come from the column names – see stackTables in main.js) */
@media (max-width: 640px) {
  .table-wrap.card { overflow-x: auto; }
  table.stk thead, table.stk colgroup { display: none; }
  table.stk, table.stk tbody, table.stk tfoot { display: block; width: 100%; }
  table.stk tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
  table.stk td, table.stk th { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; min-width: 0; overflow-wrap: anywhere; white-space: normal !important; }
  table.stk td:first-child { grid-column: 1 / -1; font-weight: 600; }
  table.stk td[colspan] { grid-column: 1 / -1; }
  table.stk td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
  table.stk td:empty { display: none; }
  table.stk tfoot tr { background: var(--surface-2); }
}
@media (max-width: 640px) { table.stk .chip, table.stk .st, table.stk span { white-space: normal; max-width: 100%; } }

/* ── Phone: Excel-style entry grids become one card per row (labelled fields, nothing scrolls sideways) ── */
@media (max-width: 720px) {
  .grid-wrap { overflow: visible; margin: 0; }
  .xgrid, .xgrid tbody { display: block; width: 100%; }
  .xgrid thead { display: none; }
  .xgrid tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; position: relative; padding: 34px 12px 12px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .xgrid td { display: block; border: 0; padding: 0; background: transparent; min-width: 0; }
  .xgrid td.gwide { grid-column: 1 / -1; }
  .xgrid td[data-l]::before { content: attr(data-l); display: block; font-size: .74rem; color: var(--ink-3); margin: 0 0 3px; }
  .xgrid td input, .xgrid td select { border: 1px solid var(--line) !important; border-radius: 8px !important; background: var(--surface) !important; min-height: 42px; padding: 8px 10px; }
  .xgrid td input:focus, .xgrid td select:focus { outline-offset: 0; }
  .xgrid td.gnum input { text-align: left; }
  .xgrid .gn { position: absolute; top: 9px; left: 12px; width: auto; background: none; font-weight: 600; font-size: .78rem; }
  .xgrid .gn::before { content: 'Entry '; }
  .xgrid .gx { position: absolute; top: 2px; right: 2px; width: auto; background: none; }
  .xgrid .gx button { min-height: 32px; min-width: 32px; }
  .xgrid tr.gbad { border-color: var(--bad); } .xgrid tr.gbad td { background: transparent; }
  .xgrid tr.glock { background: var(--surface-2, #f3f5f9); } .xgrid tr.glock td { background: transparent; }
  .gi-info { min-width: 0; padding: 0; }
  .xgrid td.gwide .gi-info:empty { display: none; }
  .grid-foot { padding: 2px 0 0; }
}

/* ── Payroll Leaves on a phone: workers as cards, one worker's month as a calendar ── */
.lvcards { display: grid; gap: 8px; }
.lvcard { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; padding: 12px 14px; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.lvc-n { line-height: 1.35; } .lvc-n .chip { margin-left: 2px; }
.lvc-v { display: flex; gap: 16px; align-items: flex-end; font-size: .78rem; color: var(--ink-3); }
.lvc-v > span:not(.lvc-go) { display: flex; flex-direction: column; } .lvc-v b { font-size: 1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.lvc-go { margin-left: auto; font-size: 1.4rem; color: var(--ink-3); line-height: 1; }
.lvnav { gap: 6px; margin: 0 0 8px; }
.lvone { display: flex; flex-direction: column; gap: 10px; }
.lvone .lvpanel { margin: 0; }
.lvcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.lvdow { text-align: center; font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.dc.cal { width: 100%; height: 50px; flex-direction: column; gap: 2px; font-size: .78rem; border-radius: 8px; }
.dc.cal small { font-weight: 500; font-size: .66rem; opacity: .8; }
.dc.cal.c-n { background: var(--surface-2); }

/* ── Salary sheet on a phone: one card per person; tap → every line, inputs as fields ── */
.sgp { display: grid; gap: 8px; }
.sgp-list { display: grid; gap: 8px; }
.sgp-tot { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--surface-2); }
.sgc { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; text-align: left; padding: 12px 14px; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.sgc-n { line-height: 1.35; } .sgc .sg-note { font-size: .78rem; color: var(--warn); }
.sgc.badrow { border-color: var(--bad); } .sgc.warnrow { border-color: var(--warn); } .sgc.leftrow .sgc-n b { color: var(--bad); }
.sgc-v { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-end; font-size: .76rem; color: var(--ink-3); }
.sgc-v > span:not(.sgc-go) { display: flex; flex-direction: column; } .sgc-v b { font-size: 1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.sgc-go { margin-left: auto; font-size: .82rem; color: var(--brand); font-weight: 600; }
.sgform h3 { margin: 0; } .sgf-list { display: grid; gap: 8px; }
.sgf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 9.5rem); gap: 10px; align-items: center; margin: 0; }
.sgf > span { font-size: .86rem; color: var(--ink-2); }
.sgf input { margin: 0; min-height: 40px; text-align: right; }
.sgf.ro { padding: 2px 0; } .sgf.ro b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; } .sgf.ro.b b { font-weight: 700; }
.sgf-g { margin: 8px 0 0; font-size: .8rem; color: var(--ink-3); border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.lvcard { align-items: stretch; }
.sgc, .lvcard { font-weight: 400; justify-content: flex-start; }
.otrph { display: none; } @media (max-width: 699px) { .otrph { display: block; width: 100%; margin-top: 6px; } }
/* phone: loose checkboxes (in tables / lists) big enough to tap */
@media (max-width: 720px) { #main input[type=checkbox]:not(.check input):not(.choice input), .modal input[type=checkbox]:not(.check input):not(.choice input) { width: 22px; height: 22px; accent-color: var(--brand); flex: none; } }

/* ── Requests filters on a phone: one row of 4 equal tiles (3 for this person's role + More ▾ sheet) ── */
.ftiles { display: none; }
@media (max-width: 720px) {
  #chips { display: none; }
  .ftiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 0 12px; }
  .ftiles button { position: relative; flex-direction: column; justify-content: center; gap: 1px; height: 60px; min-height: 60px; padding: 5px 3px; border-radius: 12px; font-weight: 500; }
  .ftiles button b { font-size: 1.05rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
  .ftiles button span { font-size: .72rem; line-height: 1.15; color: var(--ink-2); text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ftiles button.on { background: linear-gradient(135deg, var(--brand), var(--brand-2, var(--brand))); border-color: transparent; color: var(--brand-ink, #fff); }
  .ftiles button.on span { color: inherit; opacity: .9; }
  .ftiles button.z0:not(.on) b { color: var(--ink-3); opacity: .7; }
  .ft-dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #f08a00; }
}
.ft-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 14px; text-align: center; }
.linkbtn { border: 0; background: none; min-height: 32px; padding: 4px 8px; color: var(--brand); font-weight: 600; }
.ftsheet h3 { margin: 0; }
.ft-row { display: flex; width: 100%; align-items: center; justify-content: flex-start; gap: 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 12px 4px; min-height: 48px; font-weight: 500; text-align: left; }
.ft-row i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.ft-row.on i { border: 6px solid var(--brand); }
.ft-row em { margin-left: auto; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; } .ft-row em.z0 { color: var(--ink-3); }

/* ── Bill: AI could not read it / no bill (inline choices, owner 25 Oct 2026) ── */
.nbx { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft, #fff4dc); border: 1px solid color-mix(in srgb, var(--warn, #a86a00) 25%, transparent); }
.nbx p { margin: 0; }
.nbx.nb-decl { background: var(--bad-soft, #fdecec); border-color: color-mix(in srgb, var(--bad, #c62828) 22%, transparent); }
.nb-top { align-items: center; gap: 8px; } .nb-top b { font-size: .95rem; }
.nb-note { margin: -4px 0 0; }
.nbx .nb-f { margin: 0; } .nbx .nb-f select, .nbx .nb-f input { min-height: 42px; margin: 0; width: 100%; }
.nb-ok { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; margin: 2px 0 0; line-height: 1.35; }
.nb-ok input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--brand); }
.nb-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.nb-g label { display: grid; gap: 3px; font-size: .78rem; color: var(--ink-2); min-width: 0; margin: 0; }
.nb-g label.wide { grid-column: 1 / -1; }
.nb-g input, .nb-why { min-height: 40px; margin: 0; width: 100%; min-width: 0; }
.nb-c { min-height: 32px; padding: 4px 12px; border-radius: 999px; font-weight: 500; font-size: .82rem; }
.nbx-link { margin-top: 4px; }
.nb-flag { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; font-size: .9rem; margin: 6px 0; }
.nb-flag.bad { background: var(--bad-soft); color: var(--bad); } .nb-flag.bad small { color: var(--ink-3); }
.nb-flag.warn { background: var(--warn-soft); color: var(--warn); }
.rs-keep li { display: flex; align-items: center; gap: 8px; } .rs-keep li .fname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rs-keep li.gone .fname { text-decoration: line-through; color: var(--ink-3); }

/* Pay vendors / My expense kinds: equal segments on a phone (no orphan on a second row) */
@media (max-width: 720px) {
  .pl-types { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); flex-wrap: nowrap; gap: 6px; }
  .pl-types button { padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Bill details (AI could not read the photo): white card, amber fields – as approved 25 Oct */
.nbx.nb-det { background: var(--surface); border: 1px solid var(--line); }
.nbx.nb-det .nb-g input { border-color: color-mix(in srgb, var(--warn, #a86a00) 45%, var(--line)); }
/* Missing bill declaration: neutral, not an error */
.nbx.nb-decl { background: var(--surface-2); border: 1px solid var(--line); }

button.block { width: 100%; min-height: 48px; }

/* phones keep :hover after a tap – no grey block left on a tab ("More" looked selected on every screen) */
@media (hover: none) { .nav a:hover, .bottombar a:hover { background: none; transform: none; } }

/* 26 Oct 2026 quick wins: placeholders never in capitals; Log out is a quiet red text button */
input::placeholder, textarea::placeholder { text-transform: none; }
button.link.logout { color: #b42318; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; padding: 6px 0; }
/* date boxes: the app's date style (20-Oct-2026) on top of the phone's own calendar */
.dwrap { position: relative; display: block; min-width: 0; }
.range-row .dwrap { display: inline-block; flex: 1 1 0; }
.dwrap > input[type=date] { width: 100%; color: transparent; -webkit-text-fill-color: transparent; }
/* Android Chrome / Samsung Internet draw the value in ::-webkit-date-and-time-value and ignore the input colour – hide it there too (15 Nov 2026: two dates overlapped on a phone) */
.dwrap > input[type=date]::-webkit-date-and-time-value { color: transparent; -webkit-text-fill-color: transparent; opacity: 0; }
.dwrap > input[type=date]::-webkit-datetime-edit { opacity: 0; }
.dwrap > input[type=date]::-webkit-datetime-edit { color: transparent; }
.dwrap > input[type=date]:focus::-webkit-datetime-edit { color: transparent; }
.dwrap > input[type=date]::-webkit-datetime-edit-day-field, .dwrap > input[type=date]::-webkit-datetime-edit-month-field, .dwrap > input[type=date]::-webkit-datetime-edit-year-field, .dwrap > input[type=date]::-webkit-datetime-edit-text { color: transparent; }
.scr-range .dwrap > input[type=date] { min-width: 150px; }
.dwrap > .dshow { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink); font: inherit; white-space: nowrap; }
.dwrap > .dshow.empty { color: var(--ink-3); }
/* dashboard groups: on a phone the table head is hidden, so the group name shows as a heading */
.dt-h { display: none; margin: 0 0 8px; font-size: 1rem; }
@media (max-width: 720px) { .dt-h { display: block; } }
/* messages sit above a form's send bar, and the + button never hides the last request card */
@media (max-width: 720px) { body:has(.paybar) #toasts { bottom: calc(var(--bottom-h) + 92px); } #lst { padding-bottom: 72px; } }
/* imprest check list: the action buttons sit on their own line under the bill */
.tbl tr:has(+ .actrow) > td { border-bottom: 0; padding-bottom: 4px; }
.tbl .actrow > td { padding-top: 2px; }
/* my imprest: Add expense full width, the two others side by side; Accounts check list: equal buttons */
.impact { display: grid; gap: 8px; margin: 4px 0 14px; }
.impact > .primary { width: 100%; }
.impact2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.impact2 > * { width: 100%; text-align: center; justify-content: center; }
.actbtns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.actbtns > button { width: 100%; }

/* ── MIS (30 Oct 2026) – graphite with a ledger-gold accent: reads like a board pack ───────────── */
:root[data-prod="mis"] { --brand: #1f2a37; --brand-2: #a87a1b; --brand-soft: #f3ecdc; --gold: #a87a1b; --gold-soft: #f6efdf; }
@media (prefers-color-scheme: dark) { :root[data-prod="mis"] { --brand: #e0b45a; --brand-2: #f0cd84; --brand-soft: #2d2615; --brand-ink: #1a1305; --gold: #e0b45a; --gold-soft: #2d2615; } }
.mis-clients { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mis-client { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.mis-tabs { display: flex; gap: 4px; overflow-x: auto; margin: -2px 0 14px; padding-bottom: 2px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.mis-tabs::-webkit-scrollbar { display: none; }
.mis-tabs a { flex: none; padding: 9px 12px; color: var(--ink-2); font-weight: 500; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.mis-tabs a.on { color: var(--ink); border-bottom-color: var(--gold, var(--brand)); font-weight: 600; }
.mis-ctrl { gap: 8px; margin-bottom: 12px; align-items: center; }
.mis-ctrl select { width: auto; min-width: 140px; }
.mis-kpis .tile b { font-variant-numeric: tabular-nums; }
.mis-sheet { padding: 0; }
.mis-tbl { font-size: .86rem; }
.mis-tbl th, .mis-tbl td { white-space: nowrap; padding: 8px 10px; }
.mis-tbl thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.mis-tbl tbody th, .mis-tbl thead th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 2; text-align: left; font-weight: 500; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: .86rem; min-width: 190px; max-width: 260px; white-space: normal; }
.mis-tbl thead th:first-child { color: var(--ink-3); font-size: .74rem; text-transform: uppercase; z-index: 3; }
.mis-tbl th.tot, .mis-tbl td.tot { background: var(--surface-2); }
.mis-tbl tr.kid th { padding-left: 22px; color: var(--ink-2); font-weight: 400; }
.mis-tbl tr.kid td { color: var(--ink-2); }
.mis-tbl tr.grp th { font-weight: 600; color: var(--ink-3); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; padding-top: 14px; }
.mis-tbl tr.grp td { border-bottom-color: transparent; }
.mis-tbl tr.sub th, .mis-tbl tr.sub td { font-weight: 650; border-top: 1px solid var(--line-2); }
.mis-tbl tr.sub th { color: var(--ink); }
.mis-tbl tr.final th, .mis-tbl tr.final td { border-top: 2px solid var(--gold, var(--line-2)); background: var(--gold-soft, var(--surface-2)); }
.mis-tbl tr.pct th, .mis-tbl tr.pct td { color: var(--ink-3); font-size: .78rem; padding-top: 2px; border-bottom-style: dashed; }
.mis-tbl tr.pct th { font-weight: 400; padding-left: 22px; }
.mis-tbl td.drill { cursor: pointer; }
.mis-tbl td.drill:hover { color: var(--gold, var(--brand)); text-decoration: underline; text-underline-offset: 3px; }
.mis-tbl tr.head th, .mis-tbl tr.head th .link { color: var(--ink); font-weight: 600; }
.mis-bridge-card, .mis-check { margin-top: 14px; }
.mis-bridge svg, .mis-trend svg { width: 100%; height: auto; display: block; overflow: visible; }
.mis-bridge .b.tot { fill: var(--brand); } .mis-bridge .b.neg { fill: var(--bad); } .mis-bridge .b.cost { fill: var(--gold, var(--brand-2)); opacity: .35; }
.mis-bridge .axis { stroke: var(--line-2); stroke-width: 1; }
.mis-bridge text, .mis-trend text { font: 500 11px var(--font, system-ui); fill: var(--ink-2); text-anchor: middle; }
.mis-bridge text.v { fill: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.mis-bridge text.v.neg { fill: var(--bad); }
.mis-trend .rev { fill: var(--brand); opacity: .85; } .mis-trend .cm3 { fill: none; stroke: var(--gold, var(--brand-2)); stroke-width: 2.5; } .mis-trend .cm3d { fill: var(--surface); stroke: var(--gold, var(--brand-2)); stroke-width: 2; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; } .key.rev { background: var(--brand); } .key.cm3 { background: var(--gold, var(--brand-2)); border-radius: 50%; }
.mis-find { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.mis-find:first-child { border-top: 0; }
.mis-find small { color: var(--ink-2); }
.mis-find.bad b { color: var(--bad); } .mis-find.warn b { color: var(--warn); }
.mis-stmt td { vertical-align: top; }
@media (max-width: 640px) {
  .mis-tbl tbody th, .mis-tbl thead th:first-child { min-width: 136px; max-width: 150px; font-size: .8rem; }
  .mis-tbl th, .mis-tbl td { padding: 7px 8px; font-size: .8rem; }
  .mis-bridge text { font-size: 15px; } .mis-bridge text.v { font-size: 14px; } .mis-trend text { font-size: 15px; }
  .mis-ctrl select { min-width: 0; flex: 1 1 100%; }
}

.mis-tbl th .link { text-align: left; justify-content: flex-start; }
.mis-kpis .tile, .mis-led .tile { border-left-color: var(--gold, var(--line)); }
.mis-bridge-list { display: none; }
.mis-bridge-list tr.sub td { font-weight: 650; }
.mis-bridge-list tr.kid td:first-child { padding-left: 22px; color: var(--ink-2); }
@media (max-width: 640px) {
  .mis-bridge { display: none; } .mis-bridge-card .small.muted { display: none; } .mis-bridge-list { display: table; }
  .mis-trend text { font-size: 24px; }
  .mis-led .tile b, .mis-kpis .tile b { font-size: 1.15rem; }
  #mapForm table.stk td:nth-child(n+3) { grid-column: 1 / -1; } #mapForm select, #mapForm .map-sub { width: 100%; }
  .map-bar #mapQ { flex-basis: 100%; } .map-btns { width: 100%; } .map-btns button { flex: 1 1 0; }
  .map-bar #mapF { display: flex; width: 100%; } .map-bar #mapF button { flex: 1 1 auto; white-space: nowrap; padding-inline: 8px; }
}

.mis-tabsel { display: none; }
@media (max-width: 640px) {
  .mis-tabs { display: none; }
  .mis-tabsel { display: block; margin: 0 0 12px; } .mis-tabsel select { width: 100%; font-weight: 600; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* MIS P&L: lines open to Tally groups, groups to ledgers */
.mis-tbl .exp { display: inline-flex; align-items: flex-start; gap: 4px; color: inherit; font: inherit; text-align: left; }
.mis-tbl .exp .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ink-2); stroke-width: 2.2; transition: transform .15s; }
.mis-tbl .exp[aria-expanded="true"] .ic { transform: rotate(90deg); }
.mis-tbl tr.grpx th { padding-left: 34px; font-weight: 500; color: var(--ink-2); }
.mis-tbl tr.grpx td { color: var(--ink-2); }
.mis-tbl tr.kid2 th { padding-left: 58px; font-weight: 400; }
.mis-tbl tr.kid2 th .link { color: var(--ink-2); font-weight: 400; }
.mis-tbl tr.kid2 td { color: var(--ink-3); font-size: .82rem; }
.mis-tbl tr.grpx th, .mis-tbl tr.grpx td, .mis-tbl tr.kid2 th, .mis-tbl tr.kid2 td { background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { .mis-tbl .exp .ic { transition: none; } }
.mis-tbl tr.kid2 th .link, .mis-tbl tr.grpx th .link { font-size: inherit; }
@media (max-width: 600px) { .mis-tbl tr.kid2 th { padding-left: 44px; } .mis-tbl tr.grpx th { padding-left: 26px; } .mis-tbl .exp { gap: 2px; } }
.mis-sub .nw { white-space: nowrap; }
.mis-sub a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.page-head .mis-sync { flex: none; align-self: center; }
@media (max-width: 600px) { .page-head:has(.mis-sync) { flex-wrap: wrap; } .page-head .mis-sync { width: 100%; } .page-head .mis-sync button { flex: 1; } }
/* MIS format line, format picker, top parties */
.mis-format { margin: 0 0 12px; color: var(--ink-2); }
.mis-format b { color: var(--ink); }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--gold, var(--brand)); background: var(--gold-soft, var(--surface-2)); }
.radio-card input { margin-top: 3px; }
.radio-card span { display: flex; flex-direction: column; gap: 2px; }
.mis-top { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mis-top h4 { margin: 0 0 6px; font-size: .86rem; }
.mis-toplist td { padding: 6px 4px; font-size: .84rem; }
@media (max-width: 700px) { .mis-top { grid-template-columns: 1fr; } }
.mis-format .link { text-decoration: underline; text-underline-offset: 2px; color: var(--brand); font-weight: 500; }
.mis-trend text.v { font-size: 11px; font-weight: 600; fill: var(--ink); }
.mis-trend text.p { font-size: 10.5px; font-weight: 600; fill: var(--gold, var(--brand-2)); }
@media (max-width: 640px) { .mis-trend text.v { font-size: 23px; } .mis-trend text.p { font-size: 22px; } .mis-trend text.l { font-size: 24px; } }
@media (min-width: 1100px) { .mis-kpis.t5 { grid-template-columns: repeat(5, 1fr); } .mis-kpis.t4 { grid-template-columns: repeat(4, 1fr); } }
.mis-format { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 0 0 12px; }
.mis-format details { display: contents; }
.mis-format summary { cursor: pointer; color: var(--brand); text-decoration: underline; text-underline-offset: 2px; list-style: none; }
.mis-format summary::-webkit-details-marker { display: none; }
.mis-format details p { flex-basis: 100%; order: 3; margin: 0; color: var(--ink-2); }
.mis-format details[open] summary { font-weight: 600; }
.mis-ckview { margin: 0 0 12px; flex-wrap: wrap; }
.mis-acts { margin-top: 6px; align-items: center; }
.mis-tbl tr.subx th { padding-left: 22px; font-weight: 500; color: var(--ink-2); }
.mis-ns select { min-width: 170px; }
/* MIS Ask box */
.mis-ask { display: flex; gap: 8px; margin: 0 0 6px; }
.mis-ask input { flex: 1; min-width: 0; }
.mis-ask-try { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.mis-ask-try .chip { cursor: pointer; border: 1px solid var(--line); background: var(--surface); }
.mis-ask-res { margin-bottom: 14px; }
@media (max-width: 640px) { .mis-ask { flex-wrap: wrap; } .mis-ask input { flex-basis: 100%; } .mis-ask button { flex: 1; } }
/* MIS edits: before / after, bulk bar */
.mis-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.mis-ba h4 { margin: 0 0 4px; font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.mis-ba tr.gone td { text-decoration: line-through; color: var(--ink-3); }
.mis-ba tr.new td { font-weight: 600; color: var(--ink); background: var(--gold-soft, var(--surface-2)); }
.new-t { color: var(--ink); font-weight: 600; }
.mis-pick { width: 34px; text-align: center; }
.mis-pick input { width: 18px; height: 18px; }
.mis-bulkbar { position: sticky; top: 8px; z-index: 5; gap: 8px; padding: 10px 12px; margin: 10px 0; border-radius: 12px; background: var(--surface); box-shadow: 0 6px 20px rgba(0,0,0,.12); border: 1px solid var(--line); }
.mis-batch { border-left: 4px solid var(--gold, var(--brand)); }
@media (max-width: 640px) { .mis-ba { grid-template-columns: 1fr; } }
/* MIS – TDS summary on the Checks tab */
.mis-tds { margin-bottom: 12px; }
.mis-tds summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mis-tds-tbl td small { display: block; }
.mis-tds-tbl tbody th { min-width: 160px; }

/* ══ MIS look (30 Oct 2026, v2) – a management-accounts pack for any client ═════════════════════════
   Oxford-navy ink, brass for marks and totals, cool mist paper. Numbers are the heroes: tabular figures,
   statement rules (a single rule over subtotals, a double rule under the final total), hairline grids.
   Everything is scoped to the MIS product so PayFlow, Payroll and the other products keep their look. */
:root[data-prod="mis"] {
  --bg: #edf0f4; --surface: #ffffff; --surface-2: #f6f7fa; --line: #dfe3ea; --line-2: #c4cbd6;
  --ink: #111a2c; --ink-2: #445066; --ink-3: #78829a;
  --brand: #14213d; --brand-2: #14213d; --brand-ink: #ffffff; --brand-soft: #e5e9f2;
  --gold: #a8740f; --gold-soft: #f7eedb; --mis-up: #1d7a58; --mis-loss: #b42318; --mis-amber: #9a5800; --mis-amber-soft: #fcf0dc;
  --mis-fig: "Plus Jakarta Sans", var(--font);
  --radius: 14px; --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root[data-prod="mis"] {
    --bg: #0a0f19; --surface: #111927; --surface-2: #162032; --line: #233049; --line-2: #34435f;
    --ink: #e9eef6; --ink-2: #aab5c8; --ink-3: #7d8aa1;
    --brand: #d9ab45; --brand-2: #d9ab45; --brand-ink: #161004; --brand-soft: #2a2414;
    --gold: #d9ab45; --gold-soft: #2a2414; --mis-up: #4fc596; --mis-loss: #ff8a80; --mis-amber: #f0b456; --mis-amber-soft: #33270f;
  }
}
:root[data-prod="mis"] #main { max-width: 1240px; }
@media (min-width: 900px) { :root[data-prod="mis"] #main { max-width: calc(1240px + var(--nav-w)); } }
:root[data-prod="mis"] #main h1 { font-family: var(--mis-fig); font-size: clamp(1.45rem, 2.4vw, 1.95rem); font-weight: 800; letter-spacing: -.025em; }
:root[data-prod="mis"] #main h3, :root[data-prod="mis"] .modal h3 { font-family: var(--mis-fig); font-weight: 700; letter-spacing: -.01em; }
:root[data-prod="mis"] .card { box-shadow: none; border-color: var(--line); }
:root[data-prod="mis"] .primary { background: var(--brand); box-shadow: none; }
:root[data-prod="mis"] .primary:hover { box-shadow: none; filter: brightness(1.15); }
:root[data-prod="mis"] .ghost { border-color: var(--line-2); }
:root[data-prod="mis"] .seg { background: var(--surface); border: 1px solid var(--line); }
:root[data-prod="mis"] .seg button.on { background: var(--brand); color: var(--brand-ink) !important; box-shadow: none; }
:root[data-prod="mis"] .chip { font-weight: 600; }
:root[data-prod="mis"] .next { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; }

/* clients */
:root[data-prod="mis"] .mis-clients { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
:root[data-prod="mis"] .mis-client { padding: 18px; gap: 10px; border-radius: 16px; }
:root[data-prod="mis"] .mis-client:hover { border-color: var(--ink-3); }
.mis-mono { width: 42px; height: 42px; border-radius: 11px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font: 700 .95rem var(--mis-fig, inherit); letter-spacing: .02em; }
:root[data-prod="mis"] .mis-client b { font-family: var(--mis-fig); font-size: 1.02rem; }

/* masthead: client, sync state, actions */
:root[data-prod="mis"] .mis-mast { margin-bottom: 10px; align-items: flex-start; }
:root[data-prod="mis"] .mis-mast .back { margin-top: 4px; }
.mis-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 0; font-size: .8rem; }
.mis-status .pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; font-weight: 500; }
.mis-status .pill.ok { color: var(--mis-up); border-color: color-mix(in srgb, var(--mis-up) 35%, var(--line)); }
.mis-status .pill.warn { color: var(--mis-amber); border-color: color-mix(in srgb, var(--mis-amber) 35%, var(--line)); }
.mis-status a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; white-space: nowrap; }
:root[data-prod="mis"] .mis-sync button { min-width: 112px; }

/* tabs */
:root[data-prod="mis"] .mis-tabs { gap: 0; margin: 4px 0 16px; border-bottom: 1px solid var(--line-2); }
:root[data-prod="mis"] .mis-tabs a { padding: 11px 14px; color: var(--ink-3); font-weight: 600; font-size: .9rem; border-bottom-width: 3px; }
:root[data-prod="mis"] .mis-tabs a:hover { color: var(--ink); }
:root[data-prod="mis"] .mis-tabs a.on { color: var(--ink); border-bottom-color: var(--gold); }
:root[data-prod="mis"] .mis-tabsel select { font-family: var(--mis-fig); font-weight: 700; border-color: var(--ink-3); }

/* Ask bar */
:root[data-prod="mis"] .mis-ask { background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 5px; gap: 6px; margin-bottom: 8px; }
:root[data-prod="mis"] .mis-ask:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
:root[data-prod="mis"] .mis-ask input { border: 0; min-height: 40px; background: transparent; outline: 0; padding-left: 10px; }
:root[data-prod="mis"] .mis-ask input:focus { outline: 0; }
:root[data-prod="mis"] .mis-ask button { min-height: 40px; }
:root[data-prod="mis"] .mis-ask .ghost { border-color: transparent; color: var(--ink-2); }
:root[data-prod="mis"] .mis-ask-try { gap: 6px; margin-bottom: 14px; }
:root[data-prod="mis"] .mis-ask-try .chip { background: transparent; border: 1px dashed var(--line-2); color: var(--ink-2); font-weight: 500; font-size: .76rem; padding: 4px 10px; min-height: 0; }
:root[data-prod="mis"] .mis-ask-try .chip:hover { border-style: solid; color: var(--ink); }
:root[data-prod="mis"] .mis-ask-res { border-top: 3px solid var(--gold); }

/* format line and controls */
:root[data-prod="mis"] .mis-format { font-size: .85rem; color: var(--ink-2); padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
:root[data-prod="mis"] .mis-format .link, :root[data-prod="mis"] .mis-format summary { color: var(--ink); font-weight: 600; }
:root[data-prod="mis"] .mis-ctrl { gap: 8px; margin: 0 0 14px; }

/* KPI strip: one hairline grid, big tabular figures */
:root[data-prod="mis"] .mis-kpis, :root[data-prod="mis"] .mis-led { gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root[data-prod="mis"] .mis-kpis .tile, :root[data-prod="mis"] .mis-led .tile { border: 0; border-radius: 0; box-shadow: none; padding: 16px 18px; gap: 3px; min-width: 0; }
:root[data-prod="mis"] .mis-kpis .tile span, :root[data-prod="mis"] .mis-led .tile span { font-size: .78rem; font-weight: 600; color: var(--ink-2); }
:root[data-prod="mis"] .mis-kpis .tile b, :root[data-prod="mis"] .mis-led .tile b { font-family: var(--mis-fig); font-size: clamp(1.35rem, 2.3vw, 1.9rem); font-weight: 750; letter-spacing: -.03em; line-height: 1.15; overflow-wrap: anywhere; }
:root[data-prod="mis"] .mis-kpis .tile small, :root[data-prod="mis"] .mis-led .tile small { font-size: .76rem; color: var(--ink-3); }
:root[data-prod="mis"] .mis-kpis .tile.red b { color: var(--mis-loss); }
:root[data-prod="mis"] .mis-kpis .tile:first-child { background: linear-gradient(var(--surface), var(--surface)) padding-box; box-shadow: inset 0 3px 0 var(--gold); }
@media (min-width: 760px) {
  :root[data-prod="mis"] .mis-kpis.t5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  :root[data-prod="mis"] .mis-kpis.t4, :root[data-prod="mis"] .mis-led { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* charts */
:root[data-prod="mis"] .mis-bridge-card, :root[data-prod="mis"] #main section.card { padding: 18px 20px; border-radius: 16px; }
:root[data-prod="mis"] .mis-bridge .b.tot { fill: var(--brand); }
:root[data-prod="mis"] .mis-bridge .b.cost { fill: var(--gold); opacity: .32; }
:root[data-prod="mis"] .mis-bridge .b.neg { fill: var(--mis-loss); }
:root[data-prod="mis"] .mis-trend .rev { fill: var(--brand); opacity: .88; }
:root[data-prod="mis"] .mis-trend .cm3 { stroke: var(--gold); }
:root[data-prod="mis"] .mis-trend .cm3d { stroke: var(--gold); }
:root[data-prod="mis"] .mis-trend text.p { fill: var(--gold); }
:root[data-prod="mis"] .key.rev { background: var(--brand); } :root[data-prod="mis"] .key.cm3 { background: var(--gold); }
:root[data-prod="mis"] .mis-toplist td { border-bottom-color: var(--line); }

/* statement tables */
:root[data-prod="mis"] .table-wrap.mis-sheet { border-radius: 16px; padding: 0;
  background: linear-gradient(to left, var(--surface) 40%, transparent) right / 36px 100% no-repeat local,
    radial-gradient(farthest-side at 100% 50%, rgba(17, 26, 44, .16), transparent) right / 14px 100% no-repeat scroll, var(--surface); }
:root[data-prod="mis"] .mis-tbl { font-size: .85rem; }
:root[data-prod="mis"] .mis-tbl td { font-variant-numeric: tabular-nums; color: var(--ink); border-bottom-color: var(--line); }
:root[data-prod="mis"] .mis-tbl thead th { background: var(--surface-2); color: var(--ink-2); font-size: .76rem; font-weight: 700; text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--line-2); padding-top: 11px; padding-bottom: 11px; }
:root[data-prod="mis"] .mis-tbl thead th:first-child { text-transform: none; color: var(--ink-3); font-weight: 600; background: var(--surface-2); }
:root[data-prod="mis"] .mis-tbl tbody th { background: var(--surface); }
:root[data-prod="mis"] .mis-tbl td.tot, :root[data-prod="mis"] .mis-tbl th.tot { background: var(--surface-2); font-weight: 600; }
:root[data-prod="mis"] .mis-tbl tr.top th, :root[data-prod="mis"] .mis-tbl tr.top td { font-weight: 700; }
:root[data-prod="mis"] .mis-tbl tr.sub th, :root[data-prod="mis"] .mis-tbl tr.sub td { font-weight: 700; border-top: 1px solid var(--ink-3); }
:root[data-prod="mis"] .mis-tbl tr.final th, :root[data-prod="mis"] .mis-tbl tr.final td { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); background: var(--gold-soft); font-weight: 800; }
:root[data-prod="mis"] .mis-tbl tr.pct th, :root[data-prod="mis"] .mis-tbl tr.pct td { font-style: italic; color: var(--ink-3); border-bottom-style: solid; font-size: .76rem; }
:root[data-prod="mis"] .mis-tbl tr.grp th { text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--ink); background: var(--surface-2); padding-top: 12px; }
:root[data-prod="mis"] .mis-tbl tr.grp td { background: var(--surface-2); }
:root[data-prod="mis"] .mis-tbl td.drill:hover { color: var(--gold); text-decoration-color: var(--gold); }
:root[data-prod="mis"] .mis-tbl tr.subx th { padding-left: 24px; font-weight: 500; color: var(--ink-2); box-shadow: inset 2px 0 0 var(--gold); }
:root[data-prod="mis"] .mis-tbl tr.grpx th, :root[data-prod="mis"] .mis-tbl tr.grpx td, :root[data-prod="mis"] .mis-tbl tr.kid2 th, :root[data-prod="mis"] .mis-tbl tr.kid2 td { background: var(--surface-2); }
:root[data-prod="mis"] .mis-tbl .exp .ic { color: var(--gold); }
:root[data-prod="mis"] .tbl th { text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--ink-2); }
@media (hover: hover) { :root[data-prod="mis"] .tbl tr.click:hover td { background: var(--surface-2); } }
:root[data-prod="mis"] .mis-stmt tr:has([data-pick]:checked), :root[data-prod="mis"] .mis-stmt tr:has([data-pick]:checked) td { background: var(--gold-soft); }

/* checks, findings, decisions */
:root[data-prod="mis"] .mis-check h3 { font-size: 1rem; }
:root[data-prod="mis"] .mis-find { border-left: 3px solid var(--line-2); padding: 12px 0 12px 14px; margin-left: -2px; }
:root[data-prod="mis"] .mis-find.bad { border-left-color: var(--mis-loss); }
:root[data-prod="mis"] .mis-find.warn { border-left-color: var(--mis-amber); }
:root[data-prod="mis"] .mis-find.bad b, :root[data-prod="mis"] .mis-find.warn b { color: var(--ink); }
:root[data-prod="mis"] .mis-find + .mis-find { border-top: 1px solid var(--line); }
:root[data-prod="mis"] .mis-ckview { margin-bottom: 14px; }
:root[data-prod="mis"] .mis-tds summary { font-family: var(--mis-fig); }

/* corrections and edits */
:root[data-prod="mis"] .mis-batch { border-left: 0; border-top: 3px solid var(--gold); }
:root[data-prod="mis"] .mis-ba tr.new td { background: var(--gold-soft); }
:root[data-prod="mis"] .mis-bulkbar { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 10px 28px rgba(17, 26, 44, .28); }
:root[data-prod="mis"] .mis-bulkbar button { border-color: color-mix(in srgb, var(--brand-ink) 40%, transparent); background: transparent; color: var(--brand-ink); }
:root[data-prod="mis"] .mis-bulkbar button.primary { background: var(--gold); border-color: var(--gold); color: #fff; }

/* modals */
:root[data-prod="mis"] .modal { border-top: 3px solid var(--gold); }

/* phone */
@media (max-width: 700px) {
  :root[data-prod="mis"] .table-wrap.mis-sheet::before { content: "Swipe sideways for every month"; display: block; position: sticky; left: 0; width: max-content; padding: 8px 12px; font-size: .74rem; color: var(--ink-3); }
  :root[data-prod="mis"] .mis-kpis .tile, :root[data-prod="mis"] .mis-led .tile { padding: 13px 14px; }
  :root[data-prod="mis"] .mis-format { padding: 9px 12px; }
  :root[data-prod="mis"] .mis-mast .back { margin-top: 2px; }
}
@media (prefers-reduced-motion: reduce) { :root[data-prod="mis"] * { transition: none !important; animation: none !important; } }
@media (max-width: 700px) {
  :root[data-prod="mis"] .mis-ask { padding: 4px; }
  :root[data-prod="mis"] .mis-ask input { flex-basis: 100%; min-height: 40px; }
  :root[data-prod="mis"] .mis-ask button { min-height: 38px; }
  :root[data-prod="mis"] .mis-ask-try { flex-wrap: wrap; margin-bottom: 12px; }
  :root[data-prod="mis"] .mis-ask-try .chip:nth-child(n+3) { display: none; } /* two examples on a phone: no sideways scroll */
  :root[data-prod="mis"] .mis-format { background: transparent; border: 0; padding: 0 2px; }
  :root[data-prod="mis"] .mis-ctrl select { flex: 1 1 140px; }
  :root[data-prod="mis"] .mis-status { margin-top: 6px; }
}
/* MIS provisional adjustments */
.mis-prov { gap: 8px; align-items: center; }
.mis-prov-note { margin-top: 12px; border-left: 3px solid var(--warn, #b7791f); }
.mis-prov-note h3 { margin: 0 0 4px; font-size: .95rem; }
.mis-prov-note ul { margin: 6px 0 0; padding-left: 18px; font-size: .86rem; }

/* MIS – Ledger scrutiny (30 Oct 2026): TB → ledger → months → entries; one pane on a phone, two or three on wider screens */
.scr-grid { display: grid; gap: 12px; align-items: start; }
.scr-pane { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 12px; min-width: 0; }
.scr-pane.on { display: block; }
.scr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.scr-head h3 { margin: 0; font-size: 1rem; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.scr-find { flex: 1 1 180px; max-width: 260px; }
.scr-back { font-size: .84rem; white-space: nowrap; }
.scr-row { cursor: pointer; outline: none; }
.scr-row:focus { box-shadow: inset 3px 0 0 var(--gold, var(--brand)); background: var(--gold-soft, var(--surface-2)); }
.scr-row.sel th, .scr-row.sel td { font-weight: 600; }
.scr-tb tr.grp th { font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: .86rem; padding-top: 8px; }
.scr-tw { display: inline-block; width: 14px; color: var(--ink-3); }
.scr-list { display: flex; flex-direction: column; }
.scr-ent { padding: 10px 8px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.scr-ent-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.scr-party { min-width: 0; overflow-wrap: anywhere; }
.scr-nar { margin: 2px 0 0 18px; overflow-wrap: anywhere; }
.scr-flag { margin: 4px 0 0 18px; }
.scr-flag.bad { color: var(--mis-loss, var(--bad)); } .scr-flag.warn { color: var(--mis-amber, var(--warn)); } .scr-flag.info { color: var(--ink-2); }
.scr-q { margin: 4px 0 0 18px; padding: 4px 8px; background: var(--surface-2); border-radius: 6px; }
.scr-acts { margin: 6px 0 0 18px; }
.scr-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; align-self: center; background: transparent; border: 1px solid var(--line-2); }
.scr-dot.bad { background: var(--mis-loss, var(--bad)); border-color: transparent; } .scr-dot.warn { background: var(--mis-amber, var(--warn)); border-color: transparent; } .scr-dot.info { background: var(--ink-3); border-color: transparent; }
.scr-pane .mis-tbl th, .scr-pane .mis-tbl td { padding-left: 8px; padding-right: 8px; }
.scr-pane[data-pane="months"] .mis-tbl { font-size: .82rem; }
.scr-all { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
@media (min-width: 760px) {
  .scr-grid.lvl-tb .scr-pane[data-pane="tb"] { display: block; }
  .scr-grid.lvl-months { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .scr-grid.lvl-months .scr-pane[data-pane="tb"], .scr-grid.lvl-months .scr-pane[data-pane="months"] { display: block; }
  .scr-grid.lvl-entries { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.5fr); }
  .scr-grid.lvl-entries .scr-pane[data-pane="months"], .scr-grid.lvl-entries .scr-pane[data-pane="entries"] { display: block; }
  .scr-grid.lvl-entries .scr-pane[data-pane="tb"] { display: none; }
}
@media (min-width: 1500px) {
  .scr-grid.lvl-entries { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.05fr) minmax(0, 1.4fr); }
  .scr-grid.lvl-entries .scr-pane[data-pane="tb"] { display: block; }
}
/* Scrutiny on phones: the trial balance shows the ledger and its closing (opening / debit / credit are in the month view) */
@media (max-width: 640px) {
  .scr-tb th:nth-child(2), .scr-tb td:nth-child(2), .scr-tb th:nth-child(3), .scr-tb td:nth-child(3), .scr-tb th:nth-child(4), .scr-tb td:nth-child(4) { display: none; }
  .scr-tb tbody th { max-width: none; white-space: normal; word-break: normal; overflow-wrap: anywhere; }
}

/* ── MIS top tidy (30 Oct 2026): sections in the side menu on a computer, one line of status, one bar for
   year / units / provisional / Ask – the top used to take half the screen ── */
@media (min-width: 900px) { :root[data-prod="mis"] .mis-tabs { display: none; } }
:root[data-prod="mis"] .mis-mast { margin-bottom: 14px; align-items: center; }
:root[data-prod="mis"] .mis-mast .back { margin-top: 0; }
:root[data-prod="mis"] .mis-mast h1 { font-size: 1.45rem; line-height: 1.2; margin: 0; }
:root[data-prod="mis"] .mis-status { margin-top: 4px; }
.mis-status button.pill.mis-fmt { min-height: 0; padding: 3px 10px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.mis-status button.pill.mis-fmt:hover { border-color: var(--ink-3); }
.mis-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 14px; }
.mis-bar .mis-ctrl { margin: 0; flex: 0 1 auto; }
.mis-askbox { flex: 1 1 360px; min-width: 0; }
:root[data-prod="mis"] .mis-askbox .mis-ask { margin: 0; padding: 3px; }
:root[data-prod="mis"] .mis-askbox .mis-ask input, :root[data-prod="mis"] .mis-askbox .mis-ask button { min-height: 36px; }
#misAskOut:not(:empty) { margin-bottom: 14px; }
@media (max-width: 640px) { .mis-askbox { flex-basis: 100%; } }
@media (max-width: 640px) {
  :root[data-prod="mis"] .mis-mast { gap: 10px; align-items: flex-start; }
  :root[data-prod="mis"] .mis-mast .grow { flex: 1 1 0; min-width: 0; }
  :root[data-prod="mis"] .mis-mast h1 { font-size: 1.2rem; text-align: left; }
  :root[data-prod="mis"] .mis-askbox .mis-ask { flex-wrap: nowrap; }
  :root[data-prod="mis"] .mis-askbox .mis-ask input { flex: 1 1 auto; min-width: 0; }
  :root[data-prod="mis"] .mis-askbox .mis-ask button { flex: none; padding: 0 12px; }
}

/* ── Scrutiny like Tally (30 Oct 2026): one screen at a time – Trial balance › Monthly summary › Ledger vouchers ── */
.scr-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex: 1 1 auto; min-width: 0; font-size: 1rem; }
.scr-crumb b { overflow-wrap: anywhere; } .scr-crumb > span { color: var(--ink-3); }
.scr-crumb .link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.scr-filt { align-items: center; }
.scr-filt .chip { cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); min-height: 32px; }
.scr-filt .chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.scr-reg { table-layout: fixed; width: 100%; }
.scr-reg .scr-d { width: 82px; } .scr-reg .scr-v { width: 128px; }
.scr-reg th.num, .scr-reg td.num { width: 112px; }
.scr-reg tbody td, .scr-reg tbody th { vertical-align: top; }
.scr-reg td.scr-part span { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-reg td.scr-part small { display: block; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-reg td.muted { overflow: hidden; text-overflow: ellipsis; }
.scr-reg tr.scr-ent { border-radius: 0; }
.scr-reg tr.scr-ent.sel td { background: var(--gold-soft, var(--surface-2)); }
.scr-reg .scr-dot { display: inline-block; margin-right: 6px; vertical-align: -1px; }
.scr-ob th, .scr-ob td { color: var(--ink-2); font-style: italic; font-weight: 500; }
.scr-det > td { background: var(--surface-2); padding: 8px 12px 10px 92px !important; }
.scr-det .scr-flag, .scr-det .scr-q, .scr-det .scr-acts { margin-left: 0; }
.scr-lines { width: auto; min-width: 60%; margin: 0 0 6px; font-size: .85rem; border-collapse: collapse; }
.scr-lines td { padding: 2px 16px 2px 0; } .scr-lines td.num { width: auto; min-width: 100px; text-align: right; }
.scr-mon { max-width: 760px; }
@media (max-width: 640px) {
  .scr-reg .scr-v, .scr-reg tbody tr > *:nth-child(4) { display: none; }
  .scr-reg .scr-d { width: 58px; } .scr-reg th.num, .scr-reg td.num { width: 84px; }
  .scr-reg { min-width: 520px; }
  .scr-det > td { padding-left: 12px !important; }
  .scr-filt { width: 100%; } .scr-filt .scr-find { flex: 1 1 100%; max-width: none; }
}
/* the row you are on: whole line tinted with a gold bar on the left (box-shadow on a table row does not paint in Chrome) */
.scr-row:focus { box-shadow: none; background: transparent; }
.scr-row:hover > th, .scr-row:hover > td { background: var(--surface-2); }
.scr-row.cur > th, .scr-row.cur > td { background: var(--gold-soft, var(--brand-soft)) !important; }
.scr-row.cur > :first-child { box-shadow: inset 4px 0 0 var(--gold, var(--brand)); }
.scr-row.cur > th, .scr-row.cur > td { font-weight: 600; }
.scr-qbtn { flex: none; }
:root[data-prod="mis"] #misScrutiny .scr-pane { margin-top: 0; }
@media (max-width: 640px) {
  .scr-reg { min-width: 0; }
  .scr-reg .scr-d { width: 74px; }
  .scr-reg thead th:nth-child(7), .scr-reg tbody tr > *:nth-child(7) { display: none; }
  .scr-reg td.nw { white-space: nowrap; }
}
@media (max-width: 640px) {
  .scr-reg { table-layout: auto; width: 100%; }
  .scr-reg .scr-d, .scr-reg th.num, .scr-reg td.num { width: auto; }
  .scr-reg td.scr-part span, .scr-reg td.scr-part small { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
}
/* review fixes (30 Oct 2026) */
.scr-pa { display: none !important; } /* the amount inside Particulars – phones only, where Dr / Cr / balance hide */
.scr-ln td { background: var(--surface-2); font-size: .86rem; color: var(--ink-2); padding-top: 4px !important; padding-bottom: 4px !important; }
.scr-det > td[colspan] { padding-left: 92px !important; }
.scr-filt .chip, .scr-filt .scr-find input, .scr-qbtn { min-height: 38px; }
.scr-pane tr.sub > th, .scr-pane tr.sub > td { background: var(--surface-2); border-top: 2px solid var(--line-2); }
.scr-mon { max-width: none; }
.scr-row:hover > th, .scr-row:hover > td { background: transparent; }
@media (hover: hover) { .scr-row:hover > th, .scr-row:hover > td { background: var(--surface-2); } }
@media (max-width: 640px) {
  .scr-reg thead th:nth-child(5), .scr-reg thead th:nth-child(6), .scr-reg tbody tr > *:nth-child(5), .scr-reg tbody tr > *:nth-child(6) { display: none; }
  .scr-reg .scr-pa { display: block !important; font-weight: 600; color: var(--ink); font-style: normal; }
  .scr-mon th:nth-child(2), .scr-mon td:nth-child(2), .scr-mon th:nth-child(3), .scr-mon td:nth-child(3) { display: none; }
  .scr-det > td[colspan] { padding-left: 12px !important; }
}

.scr-reg .scr-pk { width: 34px; padding-left: 6px !important; padding-right: 0 !important; }
.scr-reg .scr-pk input { width: 18px; height: 18px; margin: 2px 0 0; cursor: pointer; }
.scr-det > td[colspan] { padding-left: 126px !important; }
.scr-bulk { margin: 0 0 8px; padding: 8px 10px; background: var(--gold-soft, var(--surface-2)); border-radius: 10px; gap: 8px; align-items: center; }
@media (max-width: 640px) { .scr-det > td[colspan] { padding-left: 12px !important; } }
@media (max-width: 640px) {
  .scr-reg { table-layout: fixed; width: 100% !important; min-width: 0 !important; }
  .scr-reg .scr-pk { width: 30px; } .scr-reg .scr-d { width: 66px; }
  .scr-reg td.nw { white-space: nowrap; overflow: hidden; }
}
/* open entry as one block joined to its row (30 Oct 2026) */
.scr-reg tr.scr-det > td { background: color-mix(in srgb, var(--gold-soft, var(--surface-2)) 60%, var(--surface)) !important; border-top: 0 !important; border-bottom: 0 !important; }
.scr-reg tr.scr-det > td:first-child { box-shadow: inset 4px 0 0 var(--gold, var(--brand)); }
.scr-reg tr.scr-ent.open > td, .scr-reg tr.scr-ent.open > th { border-bottom: 0 !important; }
.scr-reg tr.scr-ln > td { font-size: .84rem; color: var(--ink-2); padding-top: 3px !important; padding-bottom: 3px !important; font-style: normal; }
.scr-reg tr.scr-act > td { padding: 6px 8px 10px 134px !important; border-bottom: 1px solid var(--line) !important; }
.scr-actrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.scr-pills { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 260px; min-width: 0; }
.scr-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); }
.scr-pill.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.scr-pill.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.scr-pill.q { background: var(--surface); color: var(--ink); font-weight: 500; }
.scr-btns { display: flex; gap: 6px; flex: none; }
.scr-btns button { min-height: 32px; padding: 0 12px; font-size: .82rem; background: var(--surface); }
@media (max-width: 640px) { .scr-reg tr.scr-act > td { padding-left: 12px !important; } }
.scr-reg tr.scr-ln > td { padding-left: 8px !important; padding-right: 8px !important; }
.scr-reg tr.scr-ln > td:nth-child(3) { padding-left: 22px !important; }
.scr-reg tr.scr-ln.cr > td:nth-child(3) { padding-left: 46px !important; }
.scr-reg tr.scr-ln.me > td { color: var(--ink); font-weight: 600; }
.scr-reg tr.scr-ln:first-of-type > td, .scr-reg tr.scr-ent.open + tr.scr-ln > td { padding-top: 8px !important; }
/* actions as quiet text links instead of boxed buttons */
.scr-btns { gap: 18px; }
.scr-btns button { min-height: 28px; padding: 0; border: 0 !important; background: none !important; box-shadow: none; color: var(--brand); font-weight: 600; font-size: .84rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.scr-btns button:hover { text-decoration-color: currentColor; }
.scr-range { gap: 8px 12px; align-items: center; margin: 0 0 10px; }
.scr-range label { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--ink-2); }
.scr-range input[type=date] { width: auto; min-height: 36px; }
/* Scrutiny: the ledger screens use the full width and a larger, easier-to-read type (30 Oct 2026) */
@media (min-width: 900px) { #main:has(#misScrutiny) { max-width: none; } }
#misScrutiny .scr-pane { padding: 16px 18px; }
#misScrutiny .scr-pane .mis-tbl, #misScrutiny .scr-pane[data-pane="months"] .mis-tbl { font-size: .98rem; }
#misScrutiny .scr-pane .mis-tbl th, #misScrutiny .scr-pane .mis-tbl td { padding-top: 10px; padding-bottom: 10px; }
#misScrutiny .scr-reg td.scr-part small { font-size: .84rem; }
#misScrutiny .scr-reg .scr-d { width: 96px; } #misScrutiny .scr-reg .scr-v { width: 150px; }
#misScrutiny .scr-reg th.num, #misScrutiny .scr-reg td.num { width: 130px; }
#misScrutiny .scr-crumb { font-size: 1.08rem; }

/* ── Feel: PayFlow + MIS (30 Oct 2026) ─────────────────────────────
   1) every tap answers: hover lifts what opens, press sinks what acts;
   2) parts of a page load as grey shimmer bars, then fade in. */
.skel { display: grid; gap: 12px; padding: 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
:is(.card, .modal, .table-wrap) .skel { padding: 6px 0; background: none; box-shadow: none; border-radius: 0; }
.skel i { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--grey-soft) 25%, color-mix(in srgb, var(--grey-soft) 35%, var(--surface)) 50%, var(--grey-soft) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skel i:nth-child(1) { height: 36px; border-radius: 10px; }
.skel i:nth-child(2) { width: 92%; } .skel i:nth-child(3) { width: 78%; } .skel i:nth-child(4) { width: 64%; }
.mis-top > .skel { grid-column: 1 / -1; }
#drillV > .skel { min-width: min(520px, 80vw); }
@keyframes zfade { from { opacity: 0; transform: translateY(3px); } }
:is(#misChecks, #misFlow, #misTop, #tdsBody, #gstBody, #drillV, #misAskOut) > :not(.skel) { animation: zfade .24s var(--ease) backwards; }

:root:is([data-prod="payments"], [data-prod="mis"]) :is(.nav a, .chip, .pill, .seg button, .tabs a, .mis-tabs a, .linkbtn, .scr-btns button) { transition: background-color .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), box-shadow .2s var(--ease), transform .14s var(--ease); }
:root:is([data-prod="payments"], [data-prod="mis"]) :is(.nav a, .chip, button.pill, .seg button, a.card, .paycard, .tbl tr.click):active { transform: scale(.985); }
:root:is([data-prod="payments"], [data-prod="mis"]) .tbl tr.click:active { transform: none; }
:root:is([data-prod="payments"], [data-prod="mis"]) .tbl tr.click:active td { background: var(--grey-soft); }
@media (hover: hover) { :root:is([data-prod="payments"], [data-prod="mis"]) :is(button.primary, button.ghost, button.sm, .btn):not(:disabled):not(table *):not(.seg *):hover { transform: translateY(-1px); } }
:root:is([data-prod="payments"], [data-prod="mis"]) button:active:not(:disabled), :root:is([data-prod="payments"], [data-prod="mis"]) .btn:active { transform: translateY(0) scale(.97); transition-duration: .06s; }
:root[data-prod="payments"] .paycard { transition: transform .2s var(--ease), box-shadow .22s var(--ease), border-color .18s var(--ease); }
@media (hover: hover) {
  :root[data-prod="payments"] .paycard:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
  :root[data-prod="payments"] .paycard:hover .pc-i { transform: scale(1.06); }
  :root[data-prod="mis"] .mis-client:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
}
:root[data-prod="payments"] .paycard .pc-i { transition: transform .2s var(--ease); }
.scr-row > th, .scr-row > td { transition: background-color .14s var(--ease); }
.scr-det { animation: zfade .2s var(--ease) backwards; }
:root:is([data-prod="payments"], [data-prod="mis"]) :focus-visible { transition: outline-offset .12s var(--ease); }
@media (hover: none) { :root:is([data-prod="payments"], [data-prod="mis"]) :is(button, .btn, a.card, .paycard, .mis-client):hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } :root:is([data-prod="payments"], [data-prod="mis"]) :is(button, .btn, a.card, .paycard, .paycard .pc-i, .mis-client, .chip, .pill, .nav a):is(:hover, :active) { transform: none; } }
/* Scrutiny: the row label cell shades with its row (hover, totals) – the sticky label kept white before */
@media (hover: hover) { :root[data-prod="mis"] .mis-tbl tr.scr-row:hover > th { background: var(--surface-2); } }
:root[data-prod="mis"] .scr-pane .mis-tbl tr.sub > th { background: var(--surface-2); }
.scr-crumb { flex-wrap: nowrap; } .scr-crumb > b, .scr-crumb > button:last-child { min-width: 0; overflow-wrap: anywhere; } /* a long ledger name wraps inside its own box; the › never sits alone */
@media (max-width: 600px) { .scr-head > .scr-crumb { flex-basis: 100%; } }
.scr-crumb > a, .scr-crumb > button.link { white-space: nowrap; flex: none; }
@media (max-width: 600px) { .scr-range label { display: grid; grid-template-columns: 44px 1fr; width: 100%; } .scr-range .dwrap > input[type=date] { width: 100%; } }
/* MIS report tables (30 Oct 2026, owner: "group wale ke border bigad rahe hai"): every row line runs the full width –
   separate borders, because a sticky first column hides collapsed borders; no gold bar on bucket rows; the row label
   shades with its row; the row with the keyboard cursor is marked */
:root[data-prod="mis"] .mis-tbl { border-collapse: separate; border-spacing: 0; }
:root[data-prod="mis"] .mis-tbl tbody th, :root[data-prod="mis"] .mis-tbl tbody td { border-bottom: 1px solid var(--line); }
:root[data-prod="mis"] .mis-tbl tr.subx th { box-shadow: none; }
@media (hover: hover) { :root[data-prod="mis"] .mis-tbl tbody tr:hover > th { background: var(--surface-2); } }
:root[data-prod="mis"] .mis-tbl tbody tr.kcur > th, :root[data-prod="mis"] .mis-tbl tbody tr.kcur > td { background: var(--gold-soft); }
:root[data-prod="mis"] .mis-tbl tbody tr.kcur > th { box-shadow: inset 3px 0 0 var(--gold); }
:root[data-prod="mis"] .mis-tbl tbody th .link:focus-visible { outline: none; }
/* Ask has its own tab (30 Oct 2026) */
.mis-askpage { margin-top: 4px; }
.mis-ask-start { padding: 6px 2px; } .mis-ask-ex { cursor: pointer; }
.mis-ask-how { margin-top: 10px; } .mis-ask-how summary { cursor: pointer; color: var(--ink-2); } .mis-ask-how ol { margin: 6px 0 0; padding-left: 20px; }
/* Payroll → employee → Monthly pay lines (19 Nov 2026: on a phone the date box ran over the amount). Phone: date | amount | ×,
   the note below; wider: one line. */
.pay-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.pay-line > [data-k=note] { grid-column: 1 / -1; }
.pay-line > .dwrap, .pay-line > input { min-width: 0; width: 100%; }
.pay-line > [data-rm] { align-self: stretch; min-width: 44px; }
@media (max-width: 699px) { .pay-line { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 40px; border: 1px solid var(--line, #e3e1ec); border-radius: 12px; padding: 8px; } .pay-line > [data-rm] { min-width: 0; padding: 0; } #pays { gap: 10px !important; } }
@media (min-width: 700px) { .pay-line { grid-template-columns: 170px 140px minmax(0, 1fr) auto; } .pay-line > [data-k=note] { grid-column: 3; grid-row: 1; } .pay-line > [data-rm] { grid-column: 4; grid-row: 1; } }

/* ── hr.css ── */
/* HR & Payroll → Employee master (owner, 26 Nov 2026). Built on the shared tokens only, so it follows today's look
   and the new shell (data-shell="v2") without its own colours. Phone first: 44 px targets under 720 px. */

/* status chips and red / amber lines */
.chip.hr-st.hr-grey { background: var(--grey-soft); color: var(--ink-2); }
.chip.hr-st.hr-blue { background: var(--brand-soft); color: var(--brand); }
.chip.hr-st.hr-amber { background: var(--warn-soft); color: var(--warn); }
.chip.hr-st.hr-red { background: var(--bad-soft); color: var(--bad); }
.chip.hr-st.hr-green { background: var(--ok-soft); color: var(--ok); }
.hr-flag { display: block; font-size: .78rem; line-height: 1.35; margin-top: 3px; font-weight: 500; }
.hr-flag.red { color: var(--bad); } .hr-flag.amber { color: var(--warn); }
.hr-flags { display: flex; flex-direction: column; gap: 2px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hr-flags .hr-flag { margin: 0; font-size: .86rem; }
.hr-left { display: block; margin-top: 4px; color: var(--warn); font-weight: 600; }

.hr-h { font-size: .95rem; margin: 18px 0 8px; color: var(--ink-2); font-weight: 650; }
.hr-acts { gap: 8px; }

/* overview */
.hr-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (max-width: 720px) { .hr-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hr-stat.red { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; } }
.hr-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.hr-stat b { font-size: 1.25rem; font-variant-numeric: tabular-nums; } .hr-stat span { font-size: .8rem; color: var(--ink-3); }
.hr-stat.red b { color: var(--bad); }
.hr-stat.todo { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); } .hr-stat.todo b { color: var(--warn); }
.hr-spocs .hr-tot-row td { font-weight: 650; border-top: 1px solid var(--line-2); }
.hr-stat:hover { border-color: var(--line-2); }
.hr-list { padding: 0; overflow: hidden; }
.hr-row { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 48px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.hr-row:last-child { border-bottom: 0; }
.hr-row > span:first-child { flex: 1; min-width: 0; }
.hr-row .ic { width: 16px; height: 16px; color: var(--ink-3); }
.hr-n { font-weight: 700; font-variant-numeric: tabular-nums; } .hr-n.amber { color: var(--warn); } .hr-n.red { color: var(--bad); }
.hr-home { max-width: 560px; }
.hr-add { margin-top: 16px; width: 100%; min-height: 48px; }

/* list: filters, wide table on a laptop, cards on a phone */
.hr-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.hr-filter .field { margin: 0; flex: 0 1 180px; }
.hr-filter .hr-q { flex: 1 1 260px; }
.hr-bulk { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 6px 12px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .88rem; }
.hr-tbl td, .hr-tbl th { font-size: .84rem; padding: 8px 8px; vertical-align: top; }
.hr-tbl .hr-id { white-space: normal; overflow-wrap: anywhere; min-width: 90px; } .hr-tbl .chip { white-space: nowrap; }
.hr-tbl .hr-nm { min-width: 130px; } .hr-tbl .hr-old { display: block; font-size: .74rem; }
.hr-stc { white-space: nowrap; } .hr-stc .chip + .chip { margin-left: 4px; }
.hr-flagchip { font-weight: 650; }
/* Columns picker */
.hr-colpick { position: relative; align-self: flex-end; } .hr-colpick > summary.btn { min-height: 40px; display: inline-flex; align-items: center; }
.hr-colpick > summary { list-style: none; cursor: pointer; } .hr-colpick > summary::-webkit-details-marker { display: none; }
.hr-colmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.12)); }
.hr-colmenu .check { min-height: 36px; margin: 0; }
.hr-tbl td b { font-weight: 600; }
.hr-tbl .hr-ck { width: 28px; } .hr-tbl .hr-ck input { width: 18px; height: 18px; }
.hr-wide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.hr-cards { display: none; }
@media (max-width: 720px) {
  .hr-wide, .hr-bulk { display: none !important; }
  .hr-cards { display: flex; flex-direction: column; gap: 8px; }
  .hr-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
  .hr-card-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .hr-card-t b { min-width: 0; overflow-wrap: anywhere; }
  .hr-card-c { display: inline-flex; gap: 4px; flex: none; }
  .hr-colpick { display: none; }
  .hr-filter .field, .hr-filter .hr-q { flex: 1 1 100%; }
}

/* one employee */
.hr-note { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); margin: 0 0 12px; font-size: .88rem; }
.hr-note.red { background: var(--bad-soft); color: var(--bad); } .hr-note.green { background: var(--ok-soft); color: var(--ok); } .hr-note.grey { background: var(--grey-soft); color: var(--ink-2); }
.hr-note span { color: var(--ink-2); }
.hr-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.hr-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 92px; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; overflow: hidden; }
.hr-tile b { font-size: .82rem; } .hr-tile small { font-size: .72rem; color: var(--ink-3); }
.hr-tile img { width: 100%; height: 44px; object-fit: cover; object-position: top; border-radius: 6px; }
.hr-tile-ic .ic { width: 22px; height: 22px; }
.hr-tile.done { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); } .hr-tile.done .hr-tile-ic, .hr-tile.done small { color: var(--ok); }
.hr-tile.unclear, .hr-tile.redo { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); background: var(--warn-soft); } .hr-tile.unclear .hr-tile-ic, .hr-tile.unclear small, .hr-tile.redo .hr-tile-ic, .hr-tile.redo small { color: var(--warn); }
.hr-tile.missing .hr-tile-ic { color: var(--brand); }
.hr-tile.na { opacity: .7; }
.hr-tile.busy::after { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.hr-tile-btn { position: absolute; inset: 0; margin: 0; padding: 0; border: 0; min-height: 0; background: transparent; cursor: pointer; border-radius: inherit; }
.hr-tile-btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.hr-tile-btn:focus-within, .hr-tile-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.hr-ai-msg { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--radius); font-size: .86rem; background: var(--grey-soft); color: var(--ink-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hr-ai-msg.green { background: var(--ok-soft); color: var(--ok); } .hr-ai-msg.amber { background: var(--warn-soft); color: var(--warn); } .hr-ai-msg.red { background: var(--bad-soft); color: var(--bad); }
.hr-ai-msg span { flex: 1 1 200px; }
.hr-group { padding: 0; overflow: hidden; }
.hr-field { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.hr-field:last-child { border-bottom: 0; }
.hr-okic { display: inline-flex; vertical-align: -3px; margin-left: 6px; color: var(--ok); } .hr-okic .ic { width: 14px; height: 14px; }
.hr-field.conflict { background: var(--warn-soft); }
.hr-fl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hr-lab { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.hr-val { font-size: .95rem; overflow-wrap: break-word; font-variant-numeric: tabular-nums; }
.hr-val.hr-num { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
.hr-nw { white-space: nowrap; }
.hr-src { font-size: .74rem; color: var(--ink-3); } .hr-src.ai { color: var(--violet); } .hr-src.red { color: var(--bad); }
.hr-fa { display: grid; grid-template-columns: 84px 108px; gap: 6px; align-items: center; flex: none; }
.hr-slot { display: flex; } .hr-slot > button { width: 100%; justify-content: center; min-height: 34px; padding: 4px 8px; }
.hr-srcl { align-self: flex-start; background: none; border: 0; padding: 0; min-height: 0; font: inherit; font-size: .74rem; color: var(--violet); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
.hr-ex select { max-width: 220px; }
.hr-tick .ic { width: 16px; height: 16px; }
.hr-fl > button.hr-full, .hr-meta > button.hr-srcl { align-self: flex-start; background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0; min-height: 28px; font: inherit; font-size: .76rem; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.hr-fl > button.hr-full { font-size: .8rem; font-weight: 600; color: var(--brand); }
.hr-fl > button.hr-full:hover, .hr-meta > button.hr-srcl:hover { background: transparent; }
.hr-tick.on { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.hr-diff { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: .86rem; }
.hr-diff-b { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; } .hr-diff-b button { min-height: 34px; flex: 1 1 120px; }
.hr-why, .hr-third, .hr-prev { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); }
.hr-hold { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--bad-soft); }
.hr-hold > div { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; font-size: .88rem; } .hr-hold b { color: var(--bad); } .hr-hold span { color: var(--ink-2); }
.hr-more { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.hr-more .hr-del { margin-left: auto; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.hr-more .hr-del:hover { background: var(--bad-soft); }
.hr-redo { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px 8px; margin: 0; display: flex; flex-direction: column; } .hr-redo legend { font-size: .84rem; font-weight: 600; color: var(--ink-2); padding: 0 4px; } .hr-redo .check { min-height: 36px; margin: 0; }
.hr-pulse { animation: hrPulse 1.4s ease-out; }
@keyframes hrPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .hr-pulse { animation: none; outline: 2px solid var(--warn); } }
.hr-hist { margin-top: 16px; padding: 10px 14px; }
.hr-hist summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.hr-hist ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hr-hist li { display: flex; flex-direction: column; font-size: .86rem; border-left: 2px solid var(--line); padding-left: 10px; }
.hr-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; z-index: 5; }
.hr-bar-n { margin-right: auto; font-size: .86rem; font-weight: 600; color: var(--warn); } .hr-bar-n.ok { color: var(--ok); }

/* Finance verify: the document beside the details on a laptop */
.hr-verify { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.hr-docview { position: sticky; top: 76px; padding: 10px; max-height: calc(100vh - 92px); overflow: auto; }
.hr-dv-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.hr-dv-tabs button { min-height: 32px; padding: 3px 10px; } .hr-dv-tabs button.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.hr-dv-img img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; background: var(--surface-2); }
.hr-fake { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 1.6; border-radius: 10px; border: 1px dashed var(--line-2); background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); color: var(--ink-3); }
.hr-fake b { color: var(--ink-2); }
.hr-main { min-width: 0; }
@media (max-width: 1023px) { .hr-verify { grid-template-columns: minmax(0, 1fr); } .hr-docview { position: static; } }

/* add, import, settings */
.hr-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 4px 14px; }
.hr-form .hr-form-b, .hr-form .hr-dup, .hr-form .hr-tot, .hr-form .hr-drop { grid-column: 1 / -1; }
.hr-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 14px 12px; margin-bottom: 10px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--surface-2); text-align: center; }
.hr-drop.has { border-color: var(--brand); background: var(--brand-soft); }
.hr-drop-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; cursor: pointer; padding: 6px 0; }
.hr-drop-in .ic { width: 28px; height: 28px; color: var(--brand); }
.hr-drop-in b { overflow-wrap: anywhere; }
.hr-drop-in input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.hr-drop-in:focus-within { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
.hr-tpl { background: none; border: 0; min-height: 36px; padding: 4px 8px; color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; gap: 6px; }
.hr-totok { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok); font-size: .9rem; margin: 0; } .hr-totok .ic { width: 16px; height: 16px; flex: none; }
.hr-nis { margin-top: 18px; padding: 0; overflow: hidden; }
.hr-nis > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; cursor: pointer; font-weight: 600; list-style: none; } .hr-nis > summary::-webkit-details-marker { display: none; }
.hr-nis > summary > span:first-child { flex: 1; color: var(--ink); }
.hr-chg { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.hr-nis[open] .hr-chg { display: none; }
.hr-nis-p { margin: 0; padding: 0 14px 8px; }
.hr-nis .hr-group { border-top: 1px solid var(--line); }

.hr-form .hr-form-b { gap: 8px; }
.hr-dup { padding: 10px 12px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); display: flex; flex-direction: column; gap: 6px; }
.hr-dup span { color: var(--ink-2); }
.hr-dup button { align-self: flex-start; }
.hr-tot { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 0 14px; margin: 0; min-width: 0; }
.hr-tot legend { font-size: .84rem; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.hr-totr { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); align-items: baseline; }
.hr-totr:last-child { border-bottom: 0; }
.hr-totr > span:first-child { flex: 1 1 200px; color: var(--ink-2); }
.hr-totr.ok { background: color-mix(in srgb, var(--ok-soft) 50%, transparent); } .hr-totr.bad { background: var(--bad-soft); } .hr-totr.bad b { color: var(--bad); }
.hr-miss-c { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; } .hr-miss-c select { max-width: 220px; }
.hr-set td { vertical-align: middle; }
.hr-sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; min-height: 32px; }
.hr-sw input { width: 18px; height: 18px; }
.hr-last { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border-radius: var(--radius); background: var(--grey-soft); font-size: .86rem; }
.hr-last span { flex: 1 1 260px; }
.hr-lists textarea { min-height: 120px; resize: vertical; }
/* settings rules: title, description below, switch on the right */
.hr-rule { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; margin: 0; }
.hr-rule:last-child { border-bottom: 0; }
.hr-rule-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .hr-rule-t b { font-weight: 600; } .hr-rule-t small { font-size: .82rem; line-height: 1.35; }
.hr-tog { position: relative; flex: none; width: 44px; height: 26px; }
.hr-tog input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.hr-tog span { position: absolute; inset: 0; border-radius: 13px; background: var(--line-2); transition: background .15s; }
.hr-tog span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.hr-tog input:checked + span { background: var(--brand); } .hr-tog input:checked + span::after { transform: translateX(18px); }
.hr-tog input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.hr-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 14px; align-items: end; }
.hr-nums .field { margin: 0; }

@media (max-width: 720px) {
  .hr-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hr-tile { min-height: 84px; }
  .hr-field { flex-wrap: wrap; }
  .hr-fa { grid-template-columns: 74px 100px; gap: 4px; }
  .hr-slot > button, .hr-full, .hr-diff-b button, .hr-bar button, .hr-dup button, .hr-ai-msg button, .hr-more button, .hr-hold button { min-height: 44px; }
  .hr-bar button { flex: 1 1 0; }
  .hr-bar-n { flex: 1 1 100%; margin: 0; }
  .hr-miss-c, .hr-ex { width: 100%; } .hr-miss-c select, .hr-ex select, .hr-miss-c input { max-width: none; flex: 1 1 140px; width: 100%; }
  .hr-more { display: grid; grid-template-columns: 1fr 1fr; } .hr-more .hr-del { grid-column: 1 / -1; margin: 6px 0 0; }
  .hr-hold button { width: 100%; }
  .hr-nums { grid-template-columns: minmax(0, 1fr); }
  .hr-acts { width: 100%; } .hr-acts > * { flex: 1 1 140px; } .hr-acts > .chip { flex: none; }
}
@media (pointer: coarse) { .hr-slot > button, .hr-full, .hr-tpl, .hr-colmenu .check, .hr-diff-b button, .hr-bar button, .hr-dv-tabs button, .hr-filter select, .hr-filter input { min-height: 44px; } }
@media (pointer: coarse) { .hr-meta > button.hr-srcl, .hr-fl > button.hr-full { min-height: 44px; margin: 0; } }
/* new look (shell v2): its card padding and button fill must not reach the HR lists and inline links */
:root[data-shell="v2"] #main :is(.card.hr-group, .card.hr-list, .card.hr-nis, .card.hr-hist) { padding: 0; }
:root[data-shell="v2"] #main .card.hr-hist { padding: 10px 14px; }
:root[data-shell="v2"] #main :is(.hr-fl, .hr-meta) > button:is(.hr-srcl, .hr-full) { background: transparent; border: 0; box-shadow: none; padding: 0; font-size: .76rem; }
:root[data-shell="v2"] #main .hr-tbl :is(td, th) { padding: 8px 8px; }
@media (max-width: 720px) { .hr-dv-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } .hr-dv-tabs button { white-space: normal; line-height: 1.15; padding: 3px 4px; font-size: .8rem; } }

/* the page ends above the action bar: room = the bar + 16 px (phone bottom bar included) */
:root[data-prod="hr"] #main:has(.hr-bar:not([hidden])) { padding-bottom: calc(var(--hr-bar-h, 76px) + var(--bottom-h, 0px) + env(safe-area-inset-bottom) + 16px) !important; }
@media (max-width: 720px) { :root[data-prod="hr"] #main { padding-bottom: calc(var(--bottom-h, 64px) + env(safe-area-inset-bottom) + 24px); } }
/* Send / Approve while something is left: grey, a tap still shows what is left */
#main .hr-bar button.primary.hr-off { background: var(--grey-soft); border-color: var(--line-2); color: var(--ink-3); box-shadow: none; background-image: none; }
/* Cancel and the main button of a form the same width */
.hr-pair > * { flex: 0 0 180px; justify-content: center; }
@media (max-width: 720px) { .hr-pair > * { flex: 1 1 0; } }
/* By SPOC: the full table on a laptop, a short list on a phone */
.hr-spocs-m { display: none; }
.hr-m-done { color: var(--ink-3); font-size: .86rem; margin-right: 6px; }
.hr-spocs-m .hr-n { min-width: 72px; text-align: right; }
@media (max-width: 720px) {
  .hr-spocs-w { display: none !important; }
  .hr-spocs-m { display: block; }
  /* case rows: the value across the row, the actions on their own line at the right */
  .hr-fl { flex: 1 1 100%; }
  .hr-fa { display: flex; margin-left: auto; gap: 6px; }
  .hr-fa .hr-slot { width: 100px; } .hr-fa .hr-slot:first-child { width: 84px; } .hr-fa .hr-slot:empty { display: none; }
}

/* a case row: label and value; under them where the value came from; the actions at the right */
.hr-field.hr-cf { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "fl fa" "meta fa"; column-gap: 10px; row-gap: 0; align-items: center; }
.hr-cf > .hr-fl { grid-area: fl; } .hr-cf > .hr-meta { grid-area: meta; display: flex; align-items: center; min-width: 0; } .hr-cf > .hr-fa { grid-area: fa; }
@media (max-width: 720px) { .hr-field.hr-cf { grid-template-areas: "fl fl" "meta fa"; row-gap: 4px; } .hr-cf > .hr-fa { justify-self: end; } }

/* ── mcp-consent.css ── */
/* Connect Claude – the owner's consent page for the Claude-app connector (web/src/mcp-consent.js) */
.mcpc { max-width: 760px; }
.mcpc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.mcpc h3 { margin: 0 0 6px; font-size: 15px; }
.mcpc ul { margin: 0 0 8px; padding-left: 18px; }
.mcpc li { margin: 4px 0; line-height: 1.4; }
.mcpc-to { margin: 10px 0; overflow-wrap: anywhere; }
.mcpc-act { display: flex; gap: 10px; margin-top: 14px; }
.mcpc-act button { flex: 1 1 0; max-width: 220px; }
@media (max-width: 560px) {
  .mcpc-cols { grid-template-columns: 1fr; }
  .mcpc-act button { max-width: none; }
}

/* ── mis-ask-fails.css ── */
/* MIS Ask: "Questions that failed (n)" link under the question bar and its list (7 Nov 2026) */
:root[data-prod="mis"] #main .mis-ask-fails { margin: 2px 2px 0; font-size: 13px; line-height: 1.3; }
:root[data-prod="mis"] #main .mis-ask-fails .link { min-height: 32px; padding: 0; color: var(--ink-2); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
@media (hover: hover) { :root[data-prod="mis"] #main .mis-ask-fails .link:hover { color: var(--brand); text-decoration-color: currentColor; } }
.mis-ask-flist td { vertical-align: middle; }
.mis-ask-flist td small { display: inline-block; margin-top: 2px; line-height: 1.35; }

/* ── mis-billrefs.css ── */
/* MIS → Reports → Bill references (20 Nov 2026; UI review the same day) – calm vendor list, navy / teal like the rest of
   MIS (zz-mis-theme.css). One summary line on top (no tiles – the tabs carry the counts), chips that say what to check. */
:root[data-prod="mis"] .br-head { padding: 16px 20px; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 12px; }
:root[data-prod="mis"] .br-title { flex: 1; min-width: 0; }
:root[data-prod="mis"] .br-title h3 { margin: 0 0 2px; color: var(--mis-head-ink); }
:root[data-prod="mis"] .br-title p { margin: 0; }
:root[data-prod="mis"] .br-found { margin-top: 6px !important; color: var(--ink-2); }
:root[data-prod="mis"] :is(.br-head, .br-dlg) .nw { white-space: nowrap; }
:root[data-prod="mis"] .br-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 12px; max-width: 520px; }
:root[data-prod="mis"] .br-seg button { white-space: nowrap; }
:root[data-prod="mis"] .br-seg .br-n { opacity: .7; font-variant-numeric: tabular-nums; }
:root[data-prod="mis"] .br-list { padding: 4px 0; overflow: hidden; }
/* the table fills the card: Vendor takes the room, then Bills · Opening · Balance now with the last column at the card
   edge; "Approved" is a chip under the vendor's name, as on a phone (UI review, 21 Nov 2026) */
:root[data-prod="mis"] .br-hrow, :root[data-prod="mis"] .br-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 150px 150px; gap: 16px; align-items: center; padding: 10px 24px; }
:root[data-prod="mis"] .br-hrow > span:empty { display: none; }
@media (min-width: 641px) {
  :root[data-prod="mis"] .br-st { display: none; }
  :root[data-prod="mis"] .br-tags .br-okm { display: inline-flex; }
  :root[data-prod="mis"] .br-tags:has(> .br-okm) { display: flex; }
}
:root[data-prod="mis"] .br-hrow { font-size: .8rem; font-weight: 600; color: var(--ink-3); text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--line); } /* sentence case, like every table */
:root[data-prod="mis"] .br-hrow .num { text-align: right; } /* over its numbers, the same right edge */
:root[data-prod="mis"] .br-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font: inherit; color: var(--ink); cursor: pointer; border-radius: 0; }
:root[data-prod="mis"] .br-row:last-child { border-bottom: 0; }
:root[data-prod="mis"] .br-row:hover, :root[data-prod="mis"] .br-row:focus-visible { background: var(--surface-2); }
:root[data-prod="mis"] .br-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
:root[data-prod="mis"] .br-name b { overflow-wrap: anywhere; font-weight: 600; }
:root[data-prod="mis"] .br-tags { display: flex; flex-wrap: wrap; gap: 4px; }
:root[data-prod="mis"] .br-tags:empty { display: none; }
:root[data-prod="mis"] .br-tags .br-okm { display: none; } /* phone only – the laptop shows it in its own column */
:root[data-prod="mis"] .br-tags:not(:has(> :not(.br-okm))) { display: none; }
:root[data-prod="mis"] .br-tags .chip { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; } /* one line */
:root[data-prod="mis"] .br-bw { color: var(--ink-2); line-height: 1.35; } /* bill-by-bill off: what to do in Tally (no-break hyphens and spaces in the names) */
:root[data-prod="mis"] .br-row .num { text-align: right; font-variant-numeric: tabular-nums; }
:root[data-prod="mis"] .br-l { display: none; }
:root[data-prod="mis"] .br-st { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
:root[data-prod="mis"] .br-go { display: none; color: var(--ink-3); font-size: 1.3rem; line-height: 1; }
:root[data-prod="mis"] .br-none { padding: 16px; margin: 0; }
:root[data-prod="mis"] .br-foot { margin: 10px 2px 0; }
:root[data-prod="mis"] .br-empty { padding: 20px; max-width: 640px; }
:root[data-prod="mis"] .br-empty h3 { margin-top: 0; color: var(--mis-head-ink); }

/* ready to approve: on a laptop one line in the top card (under "N of M invoice no. found"); on a phone its own block */
:root[data-prod="mis"] .br-ready-l { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; color: var(--ink); }
:root[data-prod="mis"] .br-ready-l .linkbtn { padding: 4px 2px; min-height: 0; }
:root[data-prod="mis"] .br-ready-l .primary { min-width: 108px; }
:root[data-prod="mis"] .br-dot { color: var(--ink-3); }
/* Work out again and Approve all together on the right, the same size */
:root[data-prod="mis"] .br-acts { display: flex; gap: 8px; flex: none; align-items: center; }
:root[data-prod="mis"] .br-acts > button { min-width: 136px; min-height: 40px; justify-content: center; }
@media (min-width: 641px) and (max-width: 899px) {
  :root[data-prod="mis"] .br-hrow, :root[data-prod="mis"] .br-row { grid-template-columns: minmax(0, 1fr) 48px 124px 124px; gap: 12px; padding: 10px 16px; }
  /* the dates on two lines – no "·" left at a line end (UI review 3) */
  :root[data-prod="mis"] .br-sep { display: none; }
  :root[data-prod="mis"] .br-when { display: block; }
}
:root[data-prod="mis"] .br-clean { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 16px; margin: 0 0 12px; border-left: 3px solid var(--mis-teal); }
:root[data-prod="mis"] .br-clean p { flex: 1 1 auto; margin: 0; color: var(--ink); }
:root[data-prod="mis"] .br-clean-act { display: flex; gap: 8px; }
:root[data-prod="mis"] .br-clean-act > button { min-width: 108px; }
:root[data-prod="mis"] .br-clist { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
:root[data-prod="mis"] .br-clist li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
:root[data-prod="mis"] .br-clist li span:first-child { overflow-wrap: anywhere; min-width: 0; }
:root[data-prod="mis"] .br-clist .num { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* the vendor panel */
:root[data-prod="mis"] .br-dlg h3 { margin: 0 0 6px; color: var(--mis-head-ink); overflow-wrap: anywhere; }
:root[data-prod="mis"] .br-dlg h4 { margin: 18px 0 6px; font-size: .9rem; color: var(--ink-2); }
:root[data-prod="mis"] .br-line { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: .9rem; color: var(--ink-2); }
:root[data-prod="mis"] .br-line b { color: var(--ink); font-variant-numeric: tabular-nums; }
:root[data-prod="mis"] .br-t td, :root[data-prod="mis"] .br-t th { vertical-align: top; }
:root[data-prod="mis"] .br-t .br-sub { display: block; font-size: .72rem; }
:root[data-prod="mis"] .br-t .br-inv { overflow-wrap: anywhere; }
:root[data-prod="mis"] .br-t .br-tds { display: table; margin: 4px 0 0 auto; font-size: .7rem; }
:root[data-prod="mis"] .br-t tr.br-warn td:first-child { box-shadow: inset 3px 0 0 var(--mis-amber); }
:root[data-prod="mis"] .br-left { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; padding: 10px 12px; background: var(--mis-teal-soft); border-radius: 10px; font-size: .86rem; }
:root[data-prod="mis"] .br-left span:first-child { font-weight: 600; color: var(--mis-teal); width: 100%; }
:root[data-prod="mis"] .br-left b { font-variant-numeric: tabular-nums; }
:root[data-prod="mis"] .br-todo { margin: 14px 0 0; padding: 10px 12px 10px 28px; background: var(--mis-amber-soft); border-radius: 10px; font-size: .86rem; color: var(--ink); }
:root[data-prod="mis"] .br-todo li + li { margin-top: 4px; }
:root[data-prod="mis"] .br-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
:root[data-prod="mis"] .br-act > button { min-width: 132px; }

/* phone: the button gets its own row, rows stack, Close and Approve half the row each */
@media (max-width: 640px) {
  :root[data-prod="mis"] .br-head { padding: 14px 16px; flex-direction: column; align-items: stretch; }
  /* one summary card in the laptop's order: "N vendors ready to approve", the dates on two lines,
     "12 of 14 invoice no. found · See list", then Work out again | Approve all (UI review 3) */
  :root[data-prod="mis"] .br-sep { display: none; }
  :root[data-prod="mis"] .br-when { display: block; }
  :root[data-prod="mis"] .br-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  :root[data-prod="mis"] .br-acts:not(:has(.br-ap)) { display: flex; }
  :root[data-prod="mis"] .br-acts > button { min-height: 44px; min-width: 0; white-space: nowrap; }
  :root[data-prod="mis"] .br-b { display: none; }
  :root[data-prod="mis"] .br-seg { max-width: none; }
  :root[data-prod="mis"] .br-seg button { padding-left: 4px; padding-right: 4px; font-size: .84rem; }
  :root[data-prod="mis"] .br-hrow { display: none; }
  :root[data-prod="mis"] .br-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 20px; gap: 6px 12px; padding: 12px 14px; }
  :root[data-prod="mis"] .br-name { grid-column: 1 / 3; }
  :root[data-prod="mis"] .br-st { grid-column: 3; grid-row: 1 / span 2; justify-content: flex-end; }
  :root[data-prod="mis"] .br-st .chip { display: none; }
  :root[data-prod="mis"] .br-tags .br-okm { display: inline-flex; }
  :root[data-prod="mis"] .br-tags:has(> .br-okm) { display: flex; }
  :root[data-prod="mis"] .br-go { display: block; }
  :root[data-prod="mis"] .br-row .num { text-align: left; }
  :root[data-prod="mis"] .br-l { display: block; font-size: .72rem; color: var(--ink-3); }
  :root[data-prod="mis"] .br-t thead { display: none; }
  :root[data-prod="mis"] .br-t, :root[data-prod="mis"] .br-t tbody { display: block; }
  :root[data-prod="mis"] .br-t tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  :root[data-prod="mis"] .br-t td { display: block; padding: 0; border: 0; background: transparent !important; }
  :root[data-prod="mis"] .br-t td.num { text-align: right; }
  :root[data-prod="mis"] .br-t tr.br-warn td:first-child { box-shadow: none; }
  :root[data-prod="mis"] .br-t tr.br-warn { box-shadow: inset 3px 0 0 var(--mis-amber); padding-left: 8px; }
  :root[data-prod="mis"] .br-act > button { flex: 1 1 0; min-width: 0; }
  :root[data-prod="mis"] .br-ready-l .linkbtn { min-height: 44px; margin: -12px 0; padding: 0 4px; } /* a finger-sized link that adds no height */
  :root[data-prod="mis"] .br-clean { padding: 10px 14px; }
  :root[data-prod="mis"] .br-clean-act { flex: 1 1 100%; }
  :root[data-prod="mis"] .br-clean-act > button { min-width: 0; min-height: 44px; flex: 1 1 0; white-space: nowrap; }
}

/* bill-by-bill off (UI review, 21 Nov 2026): the reason right under the vendor name, red; nothing green above it; the
   disabled Approve says why; a single thing to check has no bullet; phone lines carry their own label */
:root[data-prod="mis"] .br-bwbox { margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft, #fdecec); border-left: 3px solid var(--bad, #b3261e); }
:root[data-prod="mis"] .br-bwbox p { margin: 6px 0 0; font-size: .9rem; line-height: 1.4; color: var(--ink); }
:root[data-prod="mis"] .br-bwbox .br-bwrun { display: none; }
:root[data-prod="mis"] .br-left.br-left-off { background: var(--surface-2); }
:root[data-prod="mis"] .br-left.br-left-off span:first-child { color: var(--ink-2); }
:root[data-prod="mis"] p.br-todo-1 { padding-left: 12px; }
:root[data-prod="mis"] .br-act { align-items: center; }
:root[data-prod="mis"] .br-act .br-why { margin-right: 4px; }
:root[data-prod="mis"] .br-t .br-ph { display: none; }
@media (max-width: 640px) {
  :root[data-prod="mis"] .br-bwbox .br-bwrun { display: inline-flex; min-height: 44px; margin: 0 0 -10px; padding: 0 2px; align-items: center; font-weight: 600; }
  :root[data-prod="mis"] .br-act { flex-wrap: wrap; }
  :root[data-prod="mis"] .br-act .br-why { flex: 1 1 100%; margin: 0; text-align: right; }
  :root[data-prod="mis"] .br-t .br-lap { display: none; }
  :root[data-prod="mis"] .br-t .br-ph { display: inline; }
  /* the Reports tab strip: a wide fade on the edge with more tabs, so no tab shows cut in half */
  :root[data-prod="mis"] #main .mis-sub.zr-fl { -webkit-mask-image: linear-gradient(to right, transparent, #000 64px); mask-image: linear-gradient(to right, transparent, #000 64px); }
  :root[data-prod="mis"] #main .mis-sub.zr-fr { -webkit-mask-image: linear-gradient(to left, transparent, #000 64px); mask-image: linear-gradient(to left, transparent, #000 64px); }
  :root[data-prod="mis"] #main .mis-sub.zr-fl.zr-fr { -webkit-mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent); }
}
/* what Posting to Tally sends next (bills before their payments) and entries held for the owner (21 Nov 2026) */
:root[data-prod="mis"] .br-next { margin: 6px 0 0 !important; color: var(--ink); font-weight: 600; }
:root[data-prod="mis"] .br-held { margin: 4px 0 0 !important; color: var(--warn); }

/* ── mis-book.css ── */
/* MIS – Book entries on the Corrections tab (31 Oct 2026): request box, one question, the draft Journals, saved requests. */
.mis-book { margin-bottom: 16px; min-width: 0; }
:root[data-prod="mis"] .mis-book { border-top: 3px solid var(--gold); }
.mb-head h2 { font-size: 1.05rem; font-weight: 650; margin: 0; color: var(--ink); }
.mb-head p { margin: 2px 0 10px; }
.mb-ask { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.mb-ask textarea { flex: 1; min-width: 0; resize: vertical; min-height: 44px; font: inherit; }
.mb-ask .primary { flex: none; align-self: flex-start; min-height: 44px; }

.mb-start, .mb-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; min-width: 0; }
.mb-start .chip, .mb-saved > span.small { flex: none; }
.mb-start .mb-ex { cursor: pointer; border: 0; font: inherit; font-size: .8rem; white-space: normal; text-align: left; max-width: 100%; }
.mb-rec { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.mb-run { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 10px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.mb-run b { font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.mb-run span { font-size: .76rem; color: var(--brand); font-weight: 600; }
.mb-x { flex: none; width: 34px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--ink-3); font-size: 1.1rem; cursor: pointer; }
@media (hover: hover) { .mb-run:hover, .mb-x:hover { background: var(--surface-2); } }

#bkOut:not(:empty) { margin-top: 14px; }
.mb-wait { margin: 0; }
.mb-msg { background: var(--warn-soft); color: var(--ink); margin: 0; }
.mb-q { padding: 12px 14px; border-radius: 10px; background: var(--gold-soft, var(--brand-soft)); border-left: 3px solid var(--gold, var(--brand)); }
.mb-q-h { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.mb-q-t { margin: 4px 0 10px; font-weight: 600; color: var(--ink); }
.mb-q-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mb-q-opts .chip { cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: .84rem; padding: 6px 12px; white-space: normal; text-align: left; }
.mb-q-f { display: flex; gap: 8px; min-width: 0; }
.mb-q-f input { flex: 1; min-width: 0; }

.mb-rh { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.mb-steps { margin: 0 0 8px; font-size: .86rem; color: var(--ink-2); }
.mb-steps summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.mb-steps ul { margin: 6px 0 0; padding-left: 18px; }
.mb-note { margin: 0 0 8px; font-weight: 500; }
.mb-none { margin: 4px 0 0; color: var(--ink-2); }
.mb-newled { padding: 10px 12px; margin-bottom: 10px; border-radius: 10px; background: var(--warn-soft); }
.mb-newled p { margin: 0 0 8px; }
.mb-nl { margin: 0 0 6px; max-width: 420px; }
.mb-nl span { overflow-wrap: anywhere; }

.mb-wrap { margin: 0; }
.mb-tbl { width: 100%; font-size: .86rem; }
.mb-tbl td { vertical-align: top; }
.mb-tbl .mb-date { white-space: nowrap; }
.mb-tbl td[data-l="Dr"] { min-width: 170px; }
.mb-tbl td[data-l="Cr"] { min-width: 140px; }
.mb-led { display: block; overflow-wrap: anywhere; }
.mb-led + .mb-led { margin-top: 4px; }
.mb-led small { display: block; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mb-led .chip { margin-left: 2px; font-size: .68rem; padding: 1px 6px; }
.mb-amt { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.mb-nar { min-width: 180px; overflow-wrap: anywhere; color: var(--ink-2); }
.mb-src { white-space: nowrap; font-size: .84rem; padding: 0; }
.mb-act { white-space: nowrap; text-align: right; }
.mb-act .sm + .sm { margin-left: 4px; }
.mb-tbl tfoot td { border-top: 2px solid var(--line-2); }
.mb-btns { display: flex; gap: 8px; margin-top: 12px; }
.mb-btns button { min-width: 140px; }
.mb-foot { margin: 8px 0 0; }

/* phone: each draft is a small card – date and amount on top, then Dr, Cr, narration, source bill, the two buttons */
@media (max-width: 760px) {
  .mb-ask { flex-direction: column; }
  .mb-ask .primary { align-self: stretch; }
  .mb-wrap { overflow: visible; border: 0; }
  .mb-tbl, .mb-tbl tbody, .mb-tbl tfoot { display: block; }
  .mb-tbl thead { display: none; }
  .mb-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .mb-tbl td { display: block; padding: 0; border: 0; min-width: 0; }
  .mb-tbl td[data-l="Dr"], .mb-tbl td[data-l="Cr"], .mb-tbl td[data-l="Narration"], .mb-tbl td[data-l="Source bill"], .mb-tbl td.mb-act { grid-column: 1 / -1; }
  .mb-tbl td[data-l="Dr"]::before, .mb-tbl td[data-l="Cr"]::before, .mb-tbl td[data-l="Source bill"]::before { content: attr(data-l); display: inline-block; width: 2.6em; color: var(--ink-3); font-size: .74rem; font-weight: 700; }
  .mb-tbl td[data-l="Source bill"]::before { width: auto; margin-right: 6px; }
  .mb-tbl td[data-l="Dr"], .mb-tbl td[data-l="Cr"] { display: flex; flex-wrap: wrap; align-items: baseline; }
  .mb-tbl td[data-l="Dr"] .mb-led, .mb-tbl td[data-l="Cr"] .mb-led { flex: 1 1 auto; max-width: calc(100% - 2.6em); }
  .mb-tbl td[data-l="Dr"] .mb-led + .mb-led, .mb-tbl td[data-l="Cr"] .mb-led + .mb-led { margin-left: 2.6em; }
  .mb-nar { min-width: 0; }
  .mb-tbl td.mb-date { grid-row: 1; grid-column: 1; font-weight: 600; }
  .mb-tbl td.mb-amt { grid-row: 1; grid-column: 2; text-align: right; }
  .mb-act { display: flex !important; gap: 8px; justify-content: flex-start; }
  .mb-act .sm { flex: 1; }
  .mb-act .sm + .sm { margin-left: 0; }
  .mb-tbl tfoot tr { border-bottom: 0; }
  .mb-tbl tfoot td { border-top: 0; }
  .mb-tbl tfoot td[colspan="3"]:last-child { grid-column: 1 / -1; }
  .mb-btns button { flex: 1; min-width: 0; white-space: nowrap; padding-left: 10px; padding-right: 10px; }
  .mb-nl { max-width: none; }
}

/* equal action buttons on phones (design review 31 Oct 2026) */
@media (max-width: 600px) { .mb-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .mb-btns button { width: 100%; } }

/* ── mis-bs.css ── */
/* MIS balance sheet (30 Oct 2026): Schedule III or Tally groups, rows open level by level like the P&L */
.bs-opts { gap: 8px 18px; align-items: center; margin: 0 0 12px; }
.bs-opts .check { font-size: .88rem; color: var(--ink-2); min-height: 36px; }

.bs-tbl th .bs-leaf { display: inline-block; padding-left: 20px; }
.bs-tbl tr.bs-d0 th, .bs-tbl tr.bs-d0 td { color: var(--ink); font-weight: 600; }
.bs-tbl tr.bs-d1 th { padding-left: 24px; }
.bs-tbl tr.bs-d2 th { padding-left: 42px; }
.bs-tbl tr.bs-d3 th { padding-left: 62px; }
.bs-tbl tr.bs-d0 th .link, .bs-tbl tr.bs-d1 th .link, .bs-tbl tr.bs-d2 th .link, .bs-tbl tr.bs-d3 th .link { font-size: inherit; }

/* Schedule III: section bold, line medium; Tally groups and ledgers on the tinted band as in the P&L */
.bs-s3 tr.bs-sec th, .bs-s3 tr.bs-sec td { font-weight: 650; }
.bs-s3 tr.bs-line th, .bs-s3 tr.bs-line td { font-weight: 500; color: var(--ink); }
:root[data-prod="mis"] :is(.bs-s3 tr.bs-d2, .bs-s3 tr.bs-d3, .bs-tally tr.bs-d1, .bs-tally tr.bs-d2) > :is(th, td) { background: var(--surface-2); color: var(--ink-2); font-weight: 400; }.bs-tbl tr.bs-led th .link { color: var(--ink-2); font-weight: 400; }
.bs-tbl tr.bs-led td { color: var(--ink-3); font-size: .82rem; }
.bs-tally tr.bs-d1 th { font-weight: 500; }
.bs-s3 tr.bs-d2 th { font-weight: 500; }

/* last year end: the shaded column at the right */
.bs-tbl thead th.bs-ly { line-height: 1.2; }
.bs-tbl thead th.bs-ly small { display: block; font-weight: 400; color: var(--ink-3); text-transform: none; letter-spacing: 0; }

@media (max-width: 640px) {
  .bs-opts { gap: 4px 14px; }
  .bs-opts .seg { flex: 1 1 100%; display: flex; }
  .bs-opts .seg button { flex: 1; justify-content: center; }
  .bs-tbl tr.bs-d1 th { padding-left: 14px; }
  .bs-tbl tr.bs-d2 th { padding-left: 24px; }
  .bs-tbl tr.bs-d3 th { padding-left: 34px; }
  .bs-tbl th .bs-leaf { padding-left: 18px; }
}

/* ── mis-checks.css ── */
/* MIS – Checks as an inbox (30 Oct 2026): level sections, level filter chips, who decided, amount on each finding */
.ck-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.ck-filters .mis-ckview { margin: 0; }
.ck-filters .mis-ckview button { gap: 0; }
.ck-n::before { content: '\00a0·\00a0'; }
.ck-lv { display: flex; flex-wrap: wrap; gap: 6px; }
.ck-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: .84rem; font-weight: 500; cursor: pointer; }
.ck-chip b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ck-chip.on { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.ck-chip.on b { color: inherit; }
.ck-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ink-3); }
.ck-dot.bad { background: var(--mis-loss, var(--bad)); }
.ck-dot.warn { background: var(--mis-amber, var(--warn)); }
.ck-chip.on .ck-dot { box-shadow: 0 0 0 2px var(--surface); }
.ck-sec .row h3 + .chip { flex: none; }
.ck-top { display: flex; align-items: baseline; gap: 10px; }
.ck-top b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ck-amt { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); font-family: var(--mis-fig, inherit); }
.ck-kind { font-size: .72rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.ck-kind:empty { display: none; }
.ck-dec { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ck-by { font-size: .74rem; color: var(--ink-3); }
.mis-find.info { border-left-color: var(--line-2); }
:root[data-prod="mis"] .ck-sec.bad { border-top: 3px solid var(--mis-loss); }
:root[data-prod="mis"] .ck-sec.warn { border-top: 3px solid var(--mis-amber); }
:root[data-prod="mis"] .ck-sec.info { border-top: 3px solid var(--line-2); }
:root[data-prod="mis"] .ck-sec .chip.warn { background: var(--mis-amber-soft); color: var(--mis-amber); }
/* side menu: open checks count */
:root[data-prod="mis"] .sidebar .badge[data-badge="misCk"] { background: var(--mis-loss); }
@media (max-width: 640px) {
  .ck-filters { flex-direction: column; align-items: stretch; }
  .ck-filters .mis-ckview { display: grid; grid-template-columns: repeat(3, 1fr); }
  .ck-filters .mis-ckview button { flex-direction: column; gap: 0; justify-content: center; text-align: center; padding: 6px 4px; line-height: 1.2; font-size: .8rem; }
  .ck-filters .mis-ckview .ck-n::before { content: none; }
  .ck-filters .mis-ckview .ck-n { font-weight: 700; }
  .mis-find .ck-kind { flex-basis: 100%; }
  .ck-chip { flex: 1 1 0; justify-content: center; padding: 4px 8px; }
}

/* ── mis-dash.css ── */
/* MIS Overview as a dashboard (7 Nov 2026) – web/src/mis-dash.js. Colours follow the MIS theme (zz-mis-theme.css):
   navy #0b2a7a, logo blue #1650d8, mint #11b79c, teal #0c6e5f; amber #f0a33a only for marketing spend bars. */
.mdash { display: flex; flex-direction: column; gap: 16px; }
.mdash .md-fig { font-family: var(--mis-fig, inherit); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mdash .md-h { margin: 12px 0 0; font-family: var(--mis-fig, inherit); font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.mdash .md-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1240px) { .mdash .md-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.mdash .md-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow); min-width: 0; }
.mdash .md-tl { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.mdash .md-tile b { font-size: 1.55rem; font-weight: 800; color: var(--ink); }
.mdash .md-tile small { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.mdash .up { color: var(--mis-up, #2e7d32) !important; } .mdash .down { color: var(--mis-loss, #c62828) !important; }
.mdash .md-spark { display: block; margin-top: 2px; }
.mdash .md-row { display: flex; flex-wrap: wrap; gap: 16px; }
.mdash .md-card { margin: 0; padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.mdash .md-card h3 { margin: 0; font-size: .95rem; font-weight: 700; }
.mdash .md-wide { flex: 2 1 540px; } .mdash .md-side { flex: 1 1 300px; }
.mdash .md-ch { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; align-items: baseline; }
.mdash .md-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .78rem; color: var(--ink-2); }
.mdash .md-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mdash .md-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; } .mdash .md-legend i.ln { width: 14px; height: 3px; border-radius: 2px; }
.mdash .md-chart { display: block; width: 100%; height: auto; }
.mdash .md-chart .md-grid { stroke: var(--line); } .mdash .md-chart .md-ax { font-size: 11px; fill: var(--ink-3); } .mdash .md-chart .md-m { font-size: 12px; fill: var(--ink-2); }
.mdash .md-chart .md-val { font-size: 11px; font-weight: 700; fill: var(--mis-head-ink, #0b2a7a); }
.mdash .md-card > p { margin: 0; }
.mdash .md-step { display: flex; flex-direction: column; gap: 5px; }
.mdash .md-step-h { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; } .mdash .md-step-h span { font-weight: 600; }
.mdash .md-step-h em { font-style: normal; color: var(--ink-2); font-weight: 600; }
.mdash .md-track { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; } .mdash .md-track i { display: block; height: 100%; border-radius: 999px; }
.mdash .md-big { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.mdash .md-pair { display: flex; flex-wrap: wrap; gap: 18px; } .mdash .md-pair div { display: flex; flex-direction: column; } .mdash .md-pair small { font-size: .8rem; color: var(--ink-2); }
.mdash .md-stack { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-2); } .mdash .md-stack i { display: block; height: 100%; }
.mdash .md-li { display: flex; align-items: center; gap: 10px; font-size: .85rem; min-width: 0; }
.mdash .md-li > i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.mdash .md-li > .link, .mdash .md-li > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; justify-content: flex-start; }
.mdash .md-li > b { flex: none; } .mdash .md-li > em { flex: none; width: 46px; text-align: right; font-style: normal; color: var(--ink-2); }
.mdash .md-ccc { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; }
.mdash .md-ccc > div:first-child { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; } .mdash .md-ccc span, .mdash .md-ccc small { font-size: .8rem; color: var(--ink-2); }
.mdash .md-cccbar { flex: 3 1 480px; display: flex; flex-wrap: wrap; gap: 6px; }
.mdash .md-cccbar i { font-style: normal; min-width: 96px; border-radius: 10px; padding: 10px 12px; font-size: .82rem; font-weight: 700; }
.mdash .md-cccbar .st { background: var(--brand-soft, #e8eefb); color: var(--mis-head-ink, #0b2a7a); } .mdash .md-cccbar .db { background: var(--mis-teal-soft, #e3f7f2); color: var(--mis-teal, #0c6e5f); } .mdash .md-cccbar .cr { background: var(--mis-amber-soft, #fcf0dc); color: var(--mis-amber, #9a5800); }
.mdash .md-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.mdash .md-ch > b { font-size: .82rem; }
.mdash .md-ages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.mdash .md-ages div { display: flex; flex-direction: column; } .mdash .md-ages span { font-size: .72rem; color: var(--ink-2); } .mdash .md-ages b { font-size: .82rem; }
.mdash .md-age small { display: block; margin-top: 6px; }
.mdash .md-top { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; } .mdash .md-top > span { font-size: .76rem; font-weight: 700; color: var(--ink-2); }
.mdash .md-load { font-size: .82rem; color: var(--ink-3); }
.mdash .md-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; } .mdash .md-topcol { display: flex; flex-direction: column; gap: 7px; }
:root .mdash .md-card.md-dark, :root[data-prod] .mdash .md-card.md-dark { background: var(--mis-band, #0b2a7a); color: #fff; border: 0; }
.mdash .md-dark span, .mdash .md-dark small { color: #c9d6f5; font-size: .82rem; }
.mdash .md-hero { font-size: 2.6rem; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; color: #fff; }
.mdash .md-run { display: flex; gap: 3px; margin-top: 6px; } .mdash .md-run i { flex: 1 1 0; height: 20px; border-radius: 4px; background: rgba(255, 255, 255, .16); } .mdash .md-run i.on { background: #1fd0ae; }
.mdash .md-run-l { display: flex; justify-content: space-between; }
.mdash .md-mini { display: flex; align-items: flex-end; gap: 6px; height: 96px; }
.mdash .md-mini > div { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.mdash .md-mini i { display: block; width: 100%; max-width: 26px; background: #5f86e3; border-radius: 4px 4px 0 0; }
.mdash .md-mini span { font-size: .7rem; color: var(--ink-3); }
@media (max-width: 640px) {
  .mdash .md-tiles { display: none; } /* the phone summary above shows these on a phone */
  .mdash .md-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mdash .md-tile { padding: 12px 12px 6px; } .mdash .md-tile b { font-size: 1.25rem; }
  .mdash .md-wide, .mdash .md-side { flex-basis: 100%; }
  .mdash .md-card { padding: 14px; }
  .mdash .md-hero { font-size: 2.1rem; }
  .mdash .md-cccbar { flex-basis: 100%; }
}
/* Customise dashboard */
.mdash .md-top-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mdash .md-tile.own { border-color: var(--mis-mint, #11b79c); }
.md-cust h4 { margin: 0 0 8px; font-size: .9rem; }
.md-cust .mdc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 12px; }
.md-cust .mdc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.md-cust .mdc-row.off { color: var(--ink-3); }
.md-cust .mdc-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1 1 auto; min-width: 0; }
.md-cust .mdc-mv { display: flex; gap: 4px; flex: none; } .md-cust .mdc-mv button { min-width: 40px; }
.md-cust .mdc-why { background: var(--mis-teal-soft, #e3f7f2); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; font-size: .85rem; }
.md-cust .mdc-foot { margin-top: 16px; gap: 8px; }
@media (max-width: 640px) { .md-cust .mdc-foot > button { flex: 1 1 45%; } .md-cust .mdc-foot .grow { display: none; } }
/* rows inside rows on the P&L (7 Nov 2026): a group inside a group, and its ledgers one step further in */
.mis-tbl tr.grp2 th { padding-left: 40px !important; }
.mis-tbl tr.grp2 th .link { color: var(--ink); font-weight: 600; }
.mis-tbl tr.kid3 th { padding-left: 78px !important; }
@media (max-width: 600px) { .mis-tbl tr.grp2 th { padding-left: 34px !important; } .mis-tbl tr.kid3 th { padding-left: 58px !important; } }

/* key ratios under the P&L (7 Nov 2026) */
.mis-kr-h { margin: 22px 0 8px; font-size: 1rem; font-weight: 800; font-family: var(--mis-fig, inherit); }
.mis-kr td.neg { color: var(--mis-loss, #c62828); }

/* ── mis-entries.css ── */
/* MIS – Today's entries (6 Nov 2026, approved sample: period chips, four figure cards, "Need a look" by area, by voucher
   type and by person). Inside the MIS look (zz-mis-theme.css tokens): navy / teal, white cards, red and amber marks. */
.te { display: grid; gap: 16px; --te-amber: var(--mis-amber, var(--warn)); }
/* the theme keeps its dark amber in dark mode; a rail on a dark card needs the light one */
@media (prefers-color-scheme: dark) { :root[data-prod="mis"] .te { --te-amber: var(--warn); } }
.te .card { margin: 0; }
:root[data-prod="mis"] #main .te section.card, :root[data-prod="mis"] #main .te .te-top { margin-bottom: 0; }
.te-top { padding: 16px 20px; display: grid; gap: 12px; }
.te-cap { margin: 0; color: var(--ink-2); font-size: .84rem; }
.te-per, .te-areas { display: flex; flex-wrap: wrap; gap: 8px; }
.te-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 4px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.te-chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.te-chip.on { background: var(--mis-teal-soft, var(--brand-soft)); border-color: var(--mis-mint, var(--brand)); color: var(--mis-head-ink, var(--brand)); box-shadow: inset 0 0 0 1px var(--mis-mint, var(--brand)); }
.te-chip.on b { color: inherit; }
.te-per .te-chip { gap: 0; }
.te-sep { margin: 0 .35em; }
.te-range { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.te-range .field { margin: 0; flex: 1 1 200px; min-width: 0; }
.te-range input { width: 100%; min-width: 0; }
.te-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.te-btns:empty { display: none; }

/* figure cards: an icon square, the figure, a line under; a coloured edge at the foot */
.te-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.te-kpi { position: relative; overflow: hidden; display: grid; gap: 2px; padding: 16px 18px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); --c: var(--mis-link, var(--brand)); }
.te-kpi::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); }
/* Tax at stake is money at risk: the MIS loss colour, like Need a look */
.te-kpi.k2 { --c: var(--mis-mint, var(--ok)); } .te-kpi.k3, .te-kpi.k4 { --c: var(--mis-loss, var(--bad)); }
.te-ic { width: 34px; height: 34px; margin-bottom: 8px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: var(--surface); font-weight: 800; font-size: .95rem; }
.te-kpi small { color: var(--ink-3); font-weight: 600; font-size: .78rem; }
.te-kpi b { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--mis-head-ink, var(--ink)); font-variant-numeric: tabular-nums; }
.te-kpi em { font-style: normal; font-size: .76rem; font-weight: 600; color: var(--ink-3); }
.te-kpi.k2 em { color: var(--mis-up, var(--ok)); } .te-kpi.k3 em { color: var(--mis-loss, var(--bad)); }
.te-own { margin: -6px 2px 0; }

/* Need a look */
.te-look { padding: 0 !important; overflow: hidden; }
.te-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.te-h h3 { margin: 0; font-size: 1rem; }
.te-look > .te-h { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.te-look > .te-areas { padding: 12px 20px; border-bottom: 1px solid var(--line); }
.te-askrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.te-askrow .small { flex: 1 1 260px; }
.te-none { margin: 0; padding: 14px 20px; }
.te-f { display: grid; gap: 4px; padding: 13px 20px 14px 22px; border-bottom: 1px solid var(--line); position: relative; }
.te-f:last-child { border-bottom: 0; }
.te-f::before { content: ''; position: absolute; left: 10px; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--ink-3); }
.te-f.red::before { background: var(--mis-loss, var(--bad)); } .te-f.amber::before { background: var(--te-amber); }
/* handled (no action needed, or in corrections): a soft background, the text stays readable */
.te-f.done { background: var(--surface-2); }
.te-f.done::before { background: var(--line-2); }
.te-t { font-size: .9rem; color: var(--ink); overflow-wrap: anywhere; }
.te-m { color: var(--ink-2); font-size: .82rem; overflow-wrap: anywhere; }
.te-area { color: var(--mis-head-ink, var(--brand)); font-weight: 700; }
.te-do { color: var(--ink); font-size: .84rem; overflow-wrap: anywhere; }
.te-ref { color: var(--ink-3); font-size: .76rem; overflow-wrap: anywhere; }
.te-ai { font-size: .82rem; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 6px 10px; }
.te-dec { font-size: .8rem; color: var(--ink-2); }
.te-f .te-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.te-f .te-acts > * { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
@media (min-width: 641px) { .te-f .te-acts > * { min-width: 9.5rem; } } /* even buttons on a desktop */
.te-f .chip { justify-self: start; }

/* by voucher type, by person */
.te-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.te-tab { padding: 16px 20px !important; display: grid; gap: 10px; }
.te-tab .table-wrap { margin: 0; }
.te-tab tfoot td { font-weight: 800; background: var(--mis-teal-soft, var(--surface-2)); }
.te-bad { color: var(--mis-loss, var(--bad)); font-weight: 700; }
.te-law { margin: 0; }
.te-tbl th, .te-tbl td { white-space: nowrap; }

@media (max-width: 900px) { .te-two { grid-template-columns: 1fr; } .te-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .te-top { padding: 14px 16px; }
  /* period: two even rows; the two buttons share one line */
  .te-per { display: grid; grid-template-columns: 1fr 1fr; }
  .te-per .te-chip { padding: 4px 8px; text-align: center; line-height: 1.25; flex-direction: column; }
  .te-when { display: block; } .te-sep { display: none; } /* the time on its own line, no "·" */
  .te-range > button { flex: 1 1 100%; min-height: 38px; } /* Show entries: full width, not an orphan */
  .te-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .te-btns button { min-height: 38px; }
  .te-kpis { gap: 8px; }
  .te-kpi { padding: 12px 13px 14px; }
  .te-kpi b { font-size: 1.25rem; }
  .te-ic { width: 30px; height: 30px; margin-bottom: 6px; }
  /* area chips: three on the first row, two on the second, all even */
  .te-look > .te-areas { display: grid; grid-template-columns: repeat(6, 1fr); padding: 12px 16px; }
  .te-areas .te-chip { grid-column: span 2; padding: 4px 6px; }
  .te-areas .te-chip:nth-child(n+4) { grid-column: span 3; }
  .te-look > .te-h, .te-askrow, .te-none { padding-left: 16px; padding-right: 16px; }
  .te-f { padding: 12px 16px 13px 22px; }
  .te-f::before { left: 9px; }
  /* actions: Make a correction full width, the other two side by side */
  .te-f .te-acts { display: grid; grid-template-columns: 1fr 1fr; }
  .te-f .te-acts > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
  .te-f .te-acts > * { justify-content: center; min-height: 38px; }
  .te-tab { padding: 14px 16px !important; }
  .te-tbl th, .te-tbl td { padding-left: 8px; padding-right: 8px; }
  .te-tbl td:first-child { white-space: normal; }
}

/* ── mis-fund.css ── */
/* MIS – Fund flow tab (30 Oct 2026): a P&L-style statement. Line → parties / ledgers → entries. */
.ff-bar { gap: 8px; margin-bottom: 10px; }
.ff-tbl tr.ff-bal th, .ff-tbl tr.ff-bal td { border-top: 0; }
.ff-tbl tr.ff-line th { padding-left: 14px; }
.ff-tbl tr.ff-zero th, .ff-tbl tr.ff-zero td { color: var(--ink-3); font-weight: 400; }
.ff-tbl tr.ff-zero th { padding-left: 34px; } /* lines up with the labels that have a chevron */
.ff-tbl tr.ff-acc th { padding-left: 34px; }
.ff-tbl tr.ff-acc th, .ff-tbl tr.ff-acc td { background: var(--surface-2); color: var(--ink-2); }
.ff-tbl tr.ff-net th, .ff-tbl tr.ff-net td { border-top-style: dashed; }
.ff-tbl tr.ff-party th { padding-left: 30px; }
.ff-tbl tr.ff-ent th { padding-left: 56px; }
.ff-tbl tr.ff-ent th .link { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; color: var(--ink-2); font-weight: 400; }
.ff-tbl tr.ff-ent th .link small { color: var(--ink-3); font-size: .74rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ff-tbl tr.ff-ent th, .ff-tbl tr.ff-ent td { background: var(--surface); }
.ff-tbl tr.ff-more th .link { color: var(--gold, var(--brand)); font-size: .78rem; }
.ff-tbl th .link { font-size: inherit; }
.ff-tbl tr.ff-acc th .link { color: var(--ink-2); font-weight: 400; }
.ff-warn { background: var(--bad-soft); color: var(--bad); }
:root[data-prod="mis"] .ff-tbl tr.ff-ent th { background: var(--surface); }
:root[data-prod="mis"] .ff-tbl tr.ff-acc th { background: var(--surface-2); }
/* the statement's rule as a grey line under the table (UX review 3, 9 Nov 2026: no orphan "i" after "₹ lakh") */
:root[data-prod="mis"] #main .ff-rule { margin: 8px 0 0; font-size: .8rem; color: var(--ink-3); }
:root[data-prod="mis"] #main .ff-rule + #ffCheck { margin-top: 4px; }
@media (max-width: 600px) {
  .ff-tbl tr.ff-line th { padding-left: 8px; }
  .ff-tbl tr.ff-zero th, .ff-tbl tr.ff-acc th { padding-left: 26px; }
  .ff-tbl tr.ff-party th { padding-left: 20px; }
  .ff-tbl tr.ff-ent th { padding-left: 26px; }
  .ff-tbl tr.ff-ent th .link small { -webkit-line-clamp: 1; line-clamp: 1; }
}

/* ── mis-gst1-bridge.css ── */
/* GSTR-1 Summary bridge (10 Nov 2026): Shopify export → filed; plain rows, the subtotals and the final figure in bold,
   the check row under a rule. A phone shows Particulars, Taxable and Total GST only. */
#misGst1 .g1-bridge table{width:100%}
#misGst1 .g1-bridge td:first-child{min-width:12em}
#misGst1 .g1-bridge .g1-b-sub td,#misGst1 .g1-bridge .g1-b-total td{font-weight:600;border-top:1px solid var(--line-2)}
#misGst1 .g1-bridge .g1-b-total td{border-top:2px solid var(--line-2)}
#misGst1 .g1-bridge .g1-b-check td{color:var(--ink-3);font-size:13px}
#misGst1 .g1-bridge .g1-b-check.is-bad td{color:var(--bad);font-weight:600}
@media (max-width: 640px){
  #misGst1 .g1-bridge .g1-bh{display:none}
  #misGst1 .g1-bridge td:first-child{min-width:0}
}

/* ── mis-gst1.css ── */
/* MIS → GSTR-1 from base files (10 Nov 2026). Markup: web/src/mis-gst1.js. Laptop first (1366 / 1440): the step tabs and
   the month bar are the same white band as the other MIS pages' tabs (mis-ux-r2.css); hairlines, one primary per area.
   Phone: the tabs become a list (mis-ux-menu.css), rows stack. */
:root[data-prod="mis"] #misGst1 { --g1-gap: 12px; }
#misGst1 .g1-n { font-size: .78rem; font-weight: 600; color: var(--ink-3); margin-left: 2px; font-variant-numeric: tabular-nums; }
#misGst1 .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#misGst1 h3 { font-size: 1rem; margin: 0 0 10px; }
#misGst1 h4 { font-size: .9rem; margin: 18px 0 6px; color: var(--ink-2); }
#misGst1 .card { padding: 16px 18px; margin: 0 0 14px; }

/* ── step tabs and the month bar ── */
#misGst1 .g1-steps .g1-tab-rs { margin-left: auto; }
#misGst1 .g1-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 32px; flex: 1 1 auto; width: 100%; }
#misGst1 :is(.g1-ctl, .g1-exf, .g1-rr) select { padding-top: 0; padding-bottom: 0; line-height: 30px; }
#misGst1 .g1-ctl select { width: auto; min-width: 0; flex: none; }
#misGst1 .g1-state { font-size: .86rem; color: var(--ink-3); min-width: 0; }
#misGst1 .g1-state.is-closed { color: var(--mis-teal, var(--ok)); font-weight: 600; }
#misGst1 .g1-acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#misGst1 .g1-acts .sm, #misGst1 .g1-act .sm { height: 32px; min-height: 32px; display: inline-flex; align-items: center; }
#misGst1 .mis-bar.g1-bar { margin: 0 0 14px; }
@media (min-width: 900px) {
  :root[data-prod="mis"] #main > #misGst1 > .mis-sub { margin: -28px -32px 0; padding: 4px 32px 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
  :root[data-prod="mis"] #main > #misGst1 > .mis-bar.g1-bar { margin: 0 -32px 18px; padding: 6px 32px 5px; min-height: 44px; box-sizing: border-box; background: var(--surface); border-bottom: 1px solid var(--line); }
  :root[data-prod="mis"] #main > #misGst1 .g1-ctl select { height: 32px; min-height: 32px; padding: 0 4px 0 8px; font-size: .86rem; border-radius: 8px; }
}
#misGst1 .g1-empty { text-align: center; padding: 28px 18px; }
#misGst1 .g1-empty p { margin: 0 0 12px; color: var(--ink-2); }
#misGst1 .g1-closed { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--mis-teal-soft, var(--ok-soft)); color: var(--ink); }
#misGst1 .g1-old { margin: 0 0 12px; }

/* ── Upload: a row per file, grouped by channel ── */
#misGst1 .g1-slots { padding: 0; overflow: hidden; }
#misGst1 .g1-ch { display: grid; grid-template-columns: 200px minmax(0, 1fr); border-top: 1px solid var(--line); }
#misGst1 .g1-ch:first-child { border-top: 0; }
#misGst1 .g1-chh { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; white-space: nowrap; }
#misGst1 .g1-chh small { font-size: .8rem; }
#misGst1 .g1-slot.is-books .g1-fn { grid-column: 2 / -1; display: block; }
#misGst1 .g1-ref { white-space: nowrap; }
#misGst1 .g1-slot { display: grid; grid-template-columns: 188px minmax(0, 1fr) 96px 118px 92px; gap: 12px; align-items: center; padding: 8px 16px 8px 0; min-height: 40px; border-top: 1px solid var(--line); }
#misGst1 .g1-chl .g1-slot:first-child { border-top: 0; }
#misGst1 .g1-sl { font-weight: 500; font-size: .9rem; white-space: nowrap; }
/* "2 left out": the documents and why, on hover / focus */
#misGst1 .g1-tipx { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
#misGst1 #g1State a { font-weight: 600; }
#misGst1 .g1-fn { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; }
#misGst1 .g1-fn .g1-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#misGst1 .g1-fn small { font-size: .78rem; }
#misGst1 .g1-rows, #misGst1 .g1-tot { font-size: .88rem; }
#misGst1 .g1-act { display: flex; justify-content: flex-end; }
#misGst1 .g1-act label.btn { cursor: pointer; width: 80px; justify-content: center; }

/* ── Exceptions ── */
#misGst1 .g1-exbar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
#misGst1 .g1-grp { padding-bottom: 6px; }
#misGst1 .g1-ex { display: grid; grid-template-columns: minmax(0, 1fr) 104px 420px; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
@media (min-width: 1400px) { #misGst1 .g1-ex { grid-template-columns: minmax(0, 1fr) 112px 460px; gap: 14px; } }
#misGst1 .g1-ext { display: flex; flex-direction: column; min-width: 0; }
#misGst1 .g1-ext b { font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
#misGst1 .g1-ext small { font-size: .8rem; overflow-wrap: anywhere; }
#misGst1 .g1-exa { font-size: .9rem; }
#misGst1 .g1-exd { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
/* choice | value | Save decision on every row; without a value box the choice spans both */
#misGst1 .g1-exf { display: grid; grid-template-columns: minmax(0, 1fr) 92px 122px; gap: 6px 8px; align-items: center; width: 100%; }
#misGst1 .g1-exf.g1-nov select { grid-column: span 2; }
#misGst1 .g1-exf select { width: 100%; min-width: 0; height: 32px; min-height: 32px; font-size: .86rem; }
#misGst1 .g1-exf input { width: 100%; min-width: 0; height: 32px; min-height: 32px; font-size: .86rem; }
#misGst1 .g1-exf > button.sm { width: 100%; justify-content: center; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
#misGst1 .g1-exf .g1-undo { grid-column: 1 / -1; justify-self: end; }
#misGst1 .g1-exf .sm, #misGst1 .g1-exd .sm { height: 32px; min-height: 32px; }
#misGst1 .g1-dec { font-size: .88rem; color: var(--ink-2); text-align: right; }
#misGst1 .g1-ex.is-done .g1-ext b { color: var(--ink-2); font-weight: 500; }

/* ── Overrides ── */
#misGst1 .g1-ovh { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
#misGst1 .g1-ovh h3 { margin: 0; }
#misGst1 .g1-ovfs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
@media (min-width: 900px) { #misGst1 .g1-ovfs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
#misGst1 .g1-ovfs .field { margin: 0; min-width: 0; }
#misGst1 .g1-ovfs .g1-wide { grid-column: span 2; }
#misGst1 .g1-ovgo { display: flex; align-items: flex-end; align-self: end; }
#misGst1 .g1-ovgo .sm { height: 36px; min-height: 36px; padding-left: 16px; padding-right: 16px; }
#misGst1 .g1-ovfs input[type=date] { text-align: left; }
#misGst1 .g1-tab td.g1-nw { white-space: nowrap; }
#misGst1 .g1-ovfs .dwrap > .dshow { left: 12px; margin: 0; padding: 0; font-weight: 400; font-size: inherit; }
#misGst1 .g1-ov { display: grid; grid-template-columns: minmax(0, 1fr) auto 92px; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
#misGst1 .g1-ov:first-child { border-top: 0; }
#misGst1 .g1-ovt { display: flex; flex-direction: column; min-width: 0; }
#misGst1 .g1-ovt small { overflow-wrap: anywhere; }
#misGst1 .g1-ov.is-off { opacity: .6; }
#misGst1 .g1-ov.is-off b { text-decoration: line-through; }
#misGst1 .g1-ov .sm { justify-self: end; }

/* ── Summary ── */
#misGst1 .g1-tab { font-size: .86rem; width: 100%; }
#misGst1 .g1-tab th, #misGst1 .g1-tab td { padding: 6px 10px; }
#misGst1 .g1-tab tfoot th { border-top: 1px solid var(--line-2); font-weight: 700; }
#misGst1 .g1-sumc .table-wrap, #misGst1 .g1-gt .table-wrap, #misGst1 .g1-pend .table-wrap { overflow-x: auto; }
#misGst1 .g1-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; }
@media (min-width: 1560px) { #misGst1 .g1-two { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
#misGst1 .g1-ck { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--line); align-items: baseline; }
#misGst1 .g1-ck:first-child { border-top: 0; }
#misGst1 .g1-ckt { font-size: .76rem; font-weight: 700; text-align: center; border-radius: 6px; padding: 1px 0; }
#misGst1 .g1-ckt.ok { color: var(--ok); background: var(--ok-soft); }
#misGst1 .g1-ckt.bad { color: var(--mis-amber, #9a5800); background: var(--mis-amber-soft, #fcf0dc); }
#misGst1 .g1-ckl2 { font-size: .9rem; }
#misGst1 .g1-ckd { grid-column: 2; font-size: .8rem; overflow-wrap: anywhere; }
#misGst1 .g1-gth { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#misGst1 .g1-gth h3 { margin: 0; }
#misGst1 .g1-gsn { font-size: .8rem; }
#misGst1 .g1-pend h4 { margin: 14px 0 4px; }
#misGst1 .g1-pend h3 + h4 { margin-top: 4px; }
#misGst1 .g1-ptab td:first-child { min-width: 150px; }
#misGst1 .g1-fold a { font-weight: 600; }
#misGst1 .g1-sumc td:first-child { white-space: nowrap; }

/* ── Rule set ── */
#misGst1 .g1-rgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; }
@media (min-width: 1100px) { #misGst1 .g1-rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
#misGst1 .g1-rr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
/* rows and the new row on the same columns: name | value | button (Remove / Add, one width) */
#misGst1 #g1Wh .g1-rr { grid-template-columns: minmax(0, 1fr) 190px 64px; }
#misGst1 .g1-rs.g1-rs-ch { grid-column: 1 / -1; }
@media (min-width: 641px) { #misGst1 .g1-rs .g1-chtab td:first-child, #misGst1 .g1-rs .g1-chtab td:last-child { white-space: nowrap; } }
#misGst1 #g1Hsn .g1-rr { grid-template-columns: minmax(0, 1fr) 110px 82px; }
#misGst1 .g1-rr > button.sm { width: 100%; justify-content: center; height: 32px; min-height: 32px; }
#misGst1 .g1-rk2 { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px; min-width: 0; }
#misGst1 .g1-rr:first-child { border-top: 0; }
#misGst1 .g1-rr select, #misGst1 .g1-rr input { height: 32px; min-height: 32px; font-size: .86rem; width: 100%; min-width: 0; }
#misGst1 .g1-rk { font-size: .9rem; overflow-wrap: anywhere; }
#misGst1 .g1-dl { margin: 0; }
#misGst1 .g1-dl dt { font-size: .82rem; font-weight: 600; color: var(--ink-3); }
#misGst1 .g1-dl dd { margin: 2px 0 10px; font-size: .9rem; overflow-wrap: anywhere; }

/* ── phone ── */
@media (max-width: 640px) {
  /* two buttons to a row; the main one first across the full width (an odd one left alone too) */
  #misGst1 .g1-acts { margin-left: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #misGst1 .g1-acts > * { justify-content: center; min-width: 0; }
  #misGst1 .g1-acts > .g1-main { order: -1; grid-column: 1 / -1; }
  #misGst1 .g1-acts > .g1-full { grid-column: 1 / -1; }
  #misGst1 .g1-slot.is-books .g1-fn { grid-column: 1 / -1; }
  #misGst1 .g1-exf { grid-template-columns: minmax(0, 1fr) 110px; }
  #misGst1 .g1-exf.g1-nov select { grid-column: 1 / -1; }
  #misGst1 .g1-exf > button.sm { grid-column: 1 / -1; }
  #misGst1 .g1-ovfs .g1-ovgo .sm { width: 100%; justify-content: center; }
  #misGst1 .g1-rk2 { grid-template-columns: minmax(0, 1fr); }
  /* the pending list stacks: the item and its detail across the card, amount and with side by side */
  #misGst1 table.g1-ptab.stk td[data-l="Item"], #misGst1 table.g1-ptab.stk td[data-l="Detail"] { grid-column: 1 / -1; }
  #misGst1 table.g1-ptab.stk td.num { text-align: left; }
  #misGst1 .g1-ch { grid-template-columns: minmax(0, 1fr); }
  #misGst1 .g1-chh { padding: 12px 14px 4px; flex-direction: row; align-items: baseline; gap: 8px; }
  #misGst1 .g1-slot { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'sl act' 'fn fn' 'rows tot'; padding: 8px 14px; gap: 4px 10px; }
  #misGst1 .g1-sl { grid-area: sl; } #misGst1 .g1-fn { grid-area: fn; } #misGst1 .g1-rows { grid-area: rows; text-align: left; } #misGst1 .g1-tot { grid-area: tot; } #misGst1 .g1-act { grid-area: act; }
  #misGst1 .g1-slot.is-books { grid-template-areas: 'sl sl' 'fn fn'; }
  #misGst1 .g1-ex { grid-template-columns: minmax(0, 1fr) auto; }
  #misGst1 .g1-exd { grid-column: 1 / -1; justify-content: flex-start; }
  #misGst1 .g1-exbar .seg { flex: 1 1 auto; }
  #misGst1 .g1-ovfs { grid-template-columns: minmax(0, 1fr); }
  #misGst1 .g1-ovfs .g1-wide { grid-column: auto; }
  #misGst1 .g1-ovh .seg { width: 100%; }
  #misGst1 .g1-ovh .seg button { flex: 1 1 0; font-size: .8rem; padding-left: 4px; padding-right: 4px; }
  #misGst1 .g1-ov { grid-template-columns: minmax(0, 1fr) auto; }
  #misGst1 .g1-ov .g1-ovw { grid-column: 1; grid-row: 2; }
  #misGst1 .g1-ov .sm { grid-row: 1 / span 2; grid-column: 2; }
  #misGst1 .g1-rr, #misGst1 #g1Wh .g1-rr, #misGst1 #g1Hsn .g1-rr { grid-template-columns: minmax(0, 1fr); }
  #misGst1 #g1Hsn .g1-rr:not(.g1-new) { grid-template-columns: minmax(0, 1fr) 82px; }
  #misGst1 #g1Hsn .g1-rr:not(.g1-new) .g1-rk { grid-column: 1 / -1; }
  #misGst1 #g1Wh .g1-rr > span:empty { display: none; }
  #misGst1 .card { padding: 14px; }
}
#misGst1 .g1-gin { text-transform: uppercase; font-variant-numeric: tabular-nums; }
#misGst1 .g1-ckh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 6px; }
#misGst1 .g1-ckh h3 { margin: 0; }

/* Upload all files (owner, 10 Nov 2026) */
#misGst1 .g1-drop{display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 16px;margin:0 0 12px;border:1.5px dashed var(--line-2);border-radius:10px;background:var(--surface);cursor:pointer;text-align:center}
#misGst1 .g1-drop:hover,#misGst1 .g1-drop.is-over,#misGst1 .g1-drop:focus-within{border-color:var(--brand);background:var(--brand-soft)}
#misGst1 .g1-drop b{font-size:15px}
#misGst1 .g1-drop .muted{font-size:13px}

/* Shopify report to GSTR-1 (owner, 10 Nov 2026) */
#misGst1 .g1-recon table{width:100%}
#misGst1 .g1-recon .g1-rtot td{font-weight:600;border-top:1px solid var(--line-2)}
#misGst1 .g1-recon tr:last-child td{border-top:2px solid var(--line-2)}
#misGst1 .g1-cdir .g1-cdrows { margin-top: 12px; }
#misGst1 .g1-cdir .g1-cdrows td.small { white-space: normal; min-width: 220px; }

/* ── mis-ly.css ── */
/* MIS – P&L and Cash flow "vs last year" (30 Oct 2026) */
.mis-ly .mis-tbl thead th small { display: block; font-weight: 400; color: var(--ink-3); font-size: .72rem; text-transform: none; letter-spacing: 0; margin-top: 1px; }
.mis-ly .mis-tbl td.num, .mis-ly .mis-tbl thead th.num { min-width: 84px; }
.mis-ly .mis-tbl td.ly-chg { color: var(--ink-2); }
.mis-ly .mis-tbl td.ly-pct { color: var(--ink-2); }
.mis-ly .mis-tbl td.ly-pct.ly-up { color: var(--mis-up, var(--ok)); font-weight: 600; }
.mis-ly .mis-tbl td.ly-pct.ly-down { color: var(--mis-loss, var(--bad)); font-weight: 600; }
.mis-ly .mis-tbl tr.pct td.ly-pct.ly-up, .mis-ly .mis-tbl tr.pct td.ly-pct.ly-down { font-weight: 500; }
.mis-ly-note { margin: 0 0 12px; }
.mis-ly-part { margin: 8px 0 0; }
/* phone: four amount columns beside the line names, without side-scrolling where it fits */
@media (max-width: 700px) {
  :root[data-prod="mis"] .table-wrap.mis-sheet.mis-ly::before { content: none; display: none; } /* no month columns to swipe to */
  :root[data-prod="mis"] .mis-ly .mis-tbl td.num, :root[data-prod="mis"] .mis-ly .mis-tbl thead th.num { min-width: 0; padding-left: 4px; padding-right: 4px; font-size: .76rem; }
  :root[data-prod="mis"] .mis-ly .mis-tbl thead th.num { white-space: normal; vertical-align: bottom; }
  :root[data-prod="mis"] .mis-ly .mis-tbl td.ly-pct { white-space: normal; min-width: 46px; }
  :root[data-prod="mis"] .mis-ly .mis-tbl tbody th, :root[data-prod="mis"] .mis-ly .mis-tbl thead th:first-child { min-width: 92px; max-width: none; width: 100px; font-size: .76rem; padding-left: 8px; padding-right: 6px; -webkit-hyphens: auto; hyphens: auto; } /* a long one-word name widens its column, never runs into the amounts */
  :root[data-prod="mis"] .mis-ly .mis-tbl tr.kid th, :root[data-prod="mis"] .mis-ly .mis-tbl tr.pct th { padding-left: 12px; }
  :root[data-prod="mis"] .mis-ly .mis-tbl tr.grpx th { padding-left: 20px; }
  :root[data-prod="mis"] .mis-ly .mis-tbl tr.kid2 th { padding-left: 30px; }
  :root[data-prod="mis"] .mis-ly .mis-tbl .exp { gap: 1px; }
  :root[data-prod="mis"] .mis-ly .mis-tbl .exp .ic { width: 14px; height: 14px; }
  :root[data-prod="mis"] .mis-ly .mis-tbl thead th small { font-size: .62rem; white-space: nowrap; letter-spacing: -.01em; }
}

/* ── mis-notes.css ── */
/* MIS review notes (30 Oct 2026): a mint corner on an amount with a note; the note form and the list of notes */
:root[data-prod="mis"] { --note-mint: #4fcfb3; --note-soft: #e3f7f2; }
@media (prefers-color-scheme: dark) { :root[data-prod="mis"] { --note-mint: #8fe3d0; --note-soft: #12302b; } }

.mis-tbl td.has-note { position: relative; }
.mis-tbl td.has-note::after { content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 9px 9px 0; border-color: transparent var(--note-mint) transparent transparent; pointer-events: none; }
/* a note inside a closed row: a small dot on the row that opens it */
.mis-tbl th.mis-note-in > button::after, .mis-tbl th.mis-note-in:not(:has(button))::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--note-mint); vertical-align: middle; }
.mis-tbl td.note-flash { animation: mis-note-flash 1.8s ease-out; }
@keyframes mis-note-flash { 0%, 35% { background: var(--note-soft); box-shadow: inset 0 0 0 2px var(--note-mint); } 100% { box-shadow: inset 0 0 0 2px transparent; } }
@media (hover: none) { .mis-tbl td[data-nk] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }

.mis-note-btn .mis-note-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--note-soft); color: var(--ink); font-size: .74rem; font-weight: 700; }

.mis-note-f h3 { margin: 0; }
.mis-note-at { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--note-mint); }
.mis-note-at b { flex: 1 1 100%; overflow-wrap: anywhere; }
.mis-note-at span { color: var(--ink-3); font-size: .86rem; }
.mis-note-at .mis-note-amt { margin-left: auto; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.mis-note-at .mis-note-amt small { color: var(--ink-3); font-weight: 500; }
.mis-note-f textarea { min-height: 96px; resize: vertical; }
.mis-note-by { margin: -4px 0 0; }
.mis-note-acts { gap: 8px; flex-wrap: wrap; }
.mis-note-acts .danger { color: var(--bad); }

.mis-note-how { margin: 4px 0 12px; }
.mis-note-grp h4 { margin: 12px 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.mis-note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mis-note-item { all: unset; box-sizing: border-box; display: grid; gap: 3px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--note-mint); border-radius: 10px; cursor: pointer; }
.mis-note-item:hover { border-color: var(--ink-3); border-left-color: var(--note-mint); }
.mis-note-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mis-note-where { font-size: .86rem; color: var(--ink-2); overflow-wrap: anywhere; }
.mis-note-where b { color: var(--ink); }
.mis-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .mis-tbl td.note-flash { animation: none; box-shadow: inset 0 0 0 2px var(--note-mint); } }

/* ── mis-pack.css ── */
/* MIS pack screen (7 Nov 2026): pages, order, commentary per page, Draft with Claude, Download PDF / PowerPoint */
.mpk { max-width: 1080px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.mpk .mpk-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.mpk .mpk-head h2 { margin: 0; font-size: 1.35rem; font-weight: 800; font-family: var(--mis-fig, inherit); }
.mpk .mpk-btns { gap: 8px; }
.mpk .mpk-btns button { min-height: 40px; height: 40px; min-width: 120px; }
.mpk .mpk-ok { margin: 0; background: var(--mis-teal-soft, #e3f7f2); color: #0c4f45; border-radius: 12px; padding: 12px 14px; font-size: .9rem; }
.mpk .mpk-page { margin: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.mpk .mpk-page.off { opacity: .62; }
.mpk .mpk-row { display: flex; align-items: center; gap: 12px; }
.mpk .mpk-no { font-weight: 800; color: var(--ink-3); width: 22px; flex: none; font-family: var(--mis-fig, inherit); }
.mpk .mpk-name { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; cursor: pointer; font-size: .98rem; flex-wrap: wrap; min-height: 44px; }
.mpk .mpk-name input { width: 20px; height: 20px; flex: none; margin: 0; }
.mpk .mpk-name small { font-weight: 500; }
.mpk .mpk-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.mpk .mpk-mv { display: flex; gap: 6px; flex: none; }
.mpk .mpk-mv button { width: 44px; min-height: 40px; padding: 0; font-size: 1rem; }
.mpk .mpk-note { padding-left: 34px; margin: 0; }
.mpk .mpk-opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-left: 34px; }
.mpk .mpk-opt .seg button { min-height: 40px; }
.mpk .mpk-imp { display: block; } .mpk .mpk-imp .field { margin: 0 0 4px; max-width: 420px; } .mpk .mpk-imp p { margin: 0; }
.mpk .mpk-note textarea { width: 100%; box-sizing: border-box; resize: vertical; line-height: 1.5; }
.mpk .mpk-foot { position: sticky; bottom: 0; z-index: 2; background: var(--bg, #f3f6fb); padding: 12px 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; border-top: 1px solid var(--line); }
.mpk .mpk-foot > span { flex: 1 1 260px; }
.mpk .mpk-foot button { min-height: 44px; height: 44px; min-width: 180px; }
@media (max-width: 640px) {
  .mpk .mpk-btns { width: 100%; } .mpk .mpk-btns button { flex: 1 1 45%; }
  .mpk .mpk-note { padding-left: 0; }
  .mpk .mpk-opt { padding-left: 0; } .mpk .mpk-opt .seg { flex: 1 1 100%; display: flex; } .mpk .mpk-opt .seg button { flex: 1 1 0; }
  .mpk .mpk-foot button { flex: 1 1 100%; }
  .mpk .mpk-foot > span { flex-basis: 100%; }
  .mpk .mpk-foot { position: static; }
  .mpk .mpk-t { flex-direction: column; gap: 2px; }
  .mpk .mpk-name { flex-wrap: nowrap; }
}
/* colour choice for the PowerPoint (7 Nov 2026) */
.mpk .mpk-theme { padding-left: 0; }
.mpk .mpk-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mpk .mpk-sw-navy { background: #0a2240; } .mpk .mpk-sw-petrol { background: #0e4a54; } .mpk .mpk-sw-burgundy { background: #5e1a2b; }
.mpk .mpk-sw-charcoal { background: linear-gradient(90deg, #262a30 60%, #a9823a 60%); }
@media (max-width: 640px) { .mpk .mpk-theme .seg { flex-wrap: wrap; } .mpk .mpk-theme .seg button { flex: 1 1 45%; } }
.mpk .mpk-sw-ocean { background: linear-gradient(90deg, #0b3c5d 60%, #1d9a96 60%); } .mpk .mpk-sw-emerald { background: linear-gradient(90deg, #0f5132 60%, #b8860b 60%); }
.mpk .mpk-sw-indigo { background: linear-gradient(90deg, #2e2a6e 60%, #e4572e 60%); }
.mpk .mpk-btns { align-items: center; }
.mpk .mpk-state { min-width: 64px; text-align: right; }
@media (max-width: 640px) { .mpk .mpk-state { flex: 1 1 100%; text-align: left; min-width: 0; } }
/* the download bar (UX review 3, 9 Nov 2026: "the sticky footer still sits over card 2"): a white bar across the whole
   page column with a hairline on top, so the cards pass under a toolbar instead of being cut by a grey strip; the room
   under the last card equals the bar (≈69 px), so at the end of the scroll no card is under it */
@media (min-width: 641px) {
  :root[data-prod="mis"] #main .mpk { --mpk-foot-h: 69px; padding-bottom: 0; }
  :root[data-prod="mis"] #main .mpk .mpk-foot { background: none; border-top: 0; min-height: var(--mpk-foot-h); box-sizing: border-box; padding: 12px 0; margin-top: 6px; }
  :root[data-prod="mis"] #main .mpk .mpk-foot::before { content: ''; position: absolute; z-index: -1; inset: 0 -16px; background: var(--surface, #fff); border-top: 1px solid var(--line);
    /* on a screen wider than the page column the bar runs on to the right edge of the screen: the white with its hairline
       is painted as a border image pushed out to the right – painted only, so the page never scrolls sideways */
    border-image: linear-gradient(to bottom, var(--line) 0 1px, var(--surface, #fff) 1px) fill 1 0 0 0 / 1px 0 0 0 / 0 100vmax 0 0; }
  :root[data-prod="mis"] #main .mpk .mpk-foot > span { color: var(--ink-2); }
}
@media (min-width: 900px) { :root[data-prod="mis"] #main .mpk .mpk-foot::before { inset: 0 -32px; } } /* #main's side padding */

/* ── mis-phone.css ── */
/* MIS Overview – phone summary above the tables (30 Oct 2026). Hidden on wider screens. */
.mis-phone { display: none; }
@media (max-width: 600px) {
  .mis-phone { display: block; margin: 0 0 16px; }
  .mis-phone .mp-h { font-size: 1rem; font-weight: 700; margin: 2px 0 10px; color: var(--ink); display: flex; align-items: baseline; gap: 8px; }
  .mis-phone .mp-h small, .mis-phone .mp-chart h3 small { font-size: .78rem; font-weight: 500; color: var(--ink-3); }
  .mis-phone .mp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .mis-phone .mp-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 11px 12px; display: flex; flex-direction: column; gap: 2px; }
  .mis-phone .mp-card > span { font-size: .78rem; font-weight: 500; color: var(--ink-2); }
  .mis-phone .mp-card b { font-size: 1.35rem; font-weight: 800; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; font-family: var(--mis-fig, inherit); }
  .mis-phone .mp-card.neg b { color: var(--mis-loss, var(--bad)); }
  .mis-phone .mp-d { font-size: .76rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 1.2em; }
  .mis-phone .mp-d.good { color: var(--mis-up, var(--ok)); }
  .mis-phone .mp-d.bad { color: var(--mis-loss, var(--bad)); }
  .mis-phone .mp-d span { font-size: .66rem; }
  .mis-phone .mp-s { font-size: .74rem; color: var(--ink-3); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .mis-phone .mp-chart { margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 11px 12px 8px; }
  .mis-phone .mp-chart h3 { font-size: .86rem; font-weight: 600; margin: 0 0 6px; color: var(--ink-2); display: flex; align-items: baseline; gap: 8px; }
  .mis-phone svg { width: 100%; height: auto; display: block; overflow: visible; }
  .mis-phone .mp-axis { stroke: var(--line-2); stroke-width: 1; }
  .mis-phone .mp-bar { fill: var(--brand); opacity: .55; }
  .mis-phone .mp-bar.last { fill: var(--gold, var(--brand)); opacity: 1; }
  .mis-phone .mp-hit { fill: transparent; }
  .mis-phone g:hover .mp-bar { opacity: .85; }
  .mis-phone g:hover .mp-bar.last { opacity: 1; }
  .mis-phone text { font: 500 10px var(--font, system-ui); fill: var(--ink-3); text-anchor: middle; font-variant-numeric: tabular-nums; }
  .mis-phone text.last { fill: var(--ink); font-weight: 700; }
  .mis-phone text.mp-v { fill: var(--ink); font-weight: 700; font-size: 11px; }
}

/* ── mis-pl3.css ── */
/* MIS P&L in Schedule III (31 Oct 2026): "MIS | Schedule III" switch; rows open line → part → Tally group → ledger */
.pl3-opts { gap: 8px 18px; align-items: center; margin: 0 0 12px; }

.pl3-tbl th .pl3-h { display: flex; align-items: flex-start; gap: 2px; }
.pl3-tbl th .pl3-no { flex: none; width: 2.4em; color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.pl3-tbl th .pl3-leaf { display: inline-block; padding-left: 20px; }
.pl3-tbl th .link { font-size: inherit; }

/* Schedule III lines medium; IV Expenses as a heading with its items set in under it */
.pl3-tbl tr.pl3-line th, .pl3-tbl tr.pl3-line td { color: var(--ink); font-weight: 500; }
.pl3-tbl tr.pl3-head th { color: var(--ink); font-weight: 600; }
.pl3-tbl tr.pl3-head td { border-bottom-color: transparent; }
.pl3-tbl tr.pl3-exp th .pl3-no { width: 3em; }
.pl3-tbl tr.sub th .pl3-leaf, .pl3-tbl tr.pl3-head th .pl3-leaf { padding-left: 0; }

/* parts (other expenses, tax), Tally groups and ledgers: on the tinted band, as in the MIS view and the balance sheet */
.pl3-tbl tr.pl3-d1 th { padding-left: 64px; }
.pl3-tbl tr.pl3-d2 th { padding-left: 82px; }
.pl3-tbl tr.pl3-d3 th { padding-left: 100px; }
.pl3-tbl tr.pl3-part th { font-weight: 500; }
:root[data-prod="mis"] :is(.pl3-tbl tr.pl3-d1, .pl3-tbl tr.pl3-d2, .pl3-tbl tr.pl3-d3) > :is(th, td) { background: var(--surface-2); color: var(--ink-2); font-weight: 400; }
:root[data-prod="mis"] .pl3-tbl tr.pl3-part > th { font-weight: 500; }
.pl3-tbl tr.pl3-led th .link { color: var(--ink-2); font-weight: 400; }
.pl3-tbl tr.pl3-led td { color: var(--ink-3); font-size: .82rem; }

@media (max-width: 640px) {
  .pl3-opts { gap: 4px 14px; }
  .pl3-opts .seg { flex: 1 1 100%; display: flex; }
  .pl3-opts .seg button { flex: 1; justify-content: center; }
  .pl3-tbl tbody th, .pl3-tbl thead th:first-child { min-width: 164px; max-width: 172px; }
  .pl3-tbl th .pl3-no { width: 2.7em; font-size: .74rem; padding-top: 1px; }
  .pl3-tbl tr.pl3-exp th .pl3-no { width: 3.2em; }
  .pl3-tbl tr.pl3-d1 th { padding-left: 54px; }
  .pl3-tbl tr.pl3-d2 th { padding-left: 66px; }
  .pl3-tbl tr.pl3-d3 th { padding-left: 78px; }
  .pl3-tbl th .pl3-leaf { padding-left: 18px; }
}

/* P&L: Hide zero rows (6 Nov 2026) */
:root[data-prod="mis"] .mis-tbl tr.zhide { display: none !important; }

/* ── mis-range.css ── */
/* MIS – From – to months next to the financial year (6 Nov 2026). Two month lists that look like the year list,
   joined by a dash; on a phone they share one full line under the year and the units. */
:root[data-prod="mis"] .mis-range { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
:root[data-prod="mis"] .mis-ctrl .mis-range select { min-width: 104px; width: auto; }
:root[data-prod="mis"] .mis-range-dash { color: var(--ink-2); font-weight: 600; }

@media (max-width: 640px) {
  :root[data-prod="mis"] .mis-ctrl > .mis-range { order: 2; flex: 1 1 100%; display: flex; min-width: 0; }
  :root[data-prod="mis"] .mis-ctrl .mis-range select { flex: 1 1 0; min-width: 0; }
}

/* ── mis-reports.css ── */
/* MIS – Reports tab (30 Oct 2026): ready reports, no AI. Cards by group; the picked report's form above its answer. */
.mis-reps { margin-top: 4px; min-width: 0; }
.mis-rep-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 16px; margin-bottom: 16px; }
.mis-rep-grp { min-width: 0; }
.mis-rep-h { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.mis-rep-list { display: flex; flex-direction: column; gap: 6px; }
.mis-rep-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-width: 0; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.mis-rep-card b { font-size: .92rem; font-weight: 600; }
.mis-rep-card span { font-size: .8rem; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }
@media (hover: hover) { .mis-rep-card:hover { border-color: var(--line-2); background: var(--surface-2); } }
.mis-rep-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.mis-rep-card.on { border-color: var(--gold, var(--brand)); box-shadow: inset 3px 0 0 var(--gold, var(--brand)); background: var(--gold-soft, var(--brand-soft)); }
.mis-rep-hint { margin: 0 0 10px; }
.mis-rep-form { margin-bottom: 14px; scroll-margin-top: 70px; }
:root[data-prod="mis"] .mis-rep-form { border-top: 3px solid var(--gold); }
.mis-rep-fh { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.mis-rep-fh h2 { font-size: 1.05rem; font-weight: 650; color: var(--ink); margin: 0; }
.mis-rep-fh p { margin: 2px 0 0; }
.mis-rep-all { display: none; flex: none; }
.mis-rep-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 210px)); gap: 10px 14px; align-items: end; }
.mis-rep-fields .field { margin: 0; min-width: 0; }
.mis-rep-fields .field input, .mis-rep-fields .field select { width: 100%; min-width: 0; }
.mis-rep-fields .seg { align-self: flex-start; }
.mis-rep-go { display: flex; align-items: flex-end; }
@media (max-width: 600px) {
  .mis-rep-groups { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mis-reps.picked .mis-rep-groups { display: none; }
  .mis-reps.picked .mis-rep-all { display: inline-flex; }
  .mis-rep-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mis-rep-fields .field:has(select[name="fy"]) { grid-column: 1 / -1; }
  .mis-rep-fields .field:has(.seg), .mis-rep-fields .field:has(select[name="ledger"]) { grid-column: 1 / -1; }
  .mis-rep-go { grid-column: 1 / -1; margin-top: 4px; }
  .mis-rep-go .primary { width: 100%; }
}

/* ── mis-review.css ── */
/* MIS – Review (7 Nov 2026, laptop UX review): status tabs, one find bar, one list of findings, the entry form in a side
   panel, the Entry log. White surface, hairlines, the MIS navy as the one accent (zz-mis-theme.css tokens); severity is
   a small dot, not a coloured card. Selectors carry #main / :root so the older MIS rules loaded later do not win. */
.rv { display: grid; gap: 10px; min-width: 0; }

/* status tabs + tools */
.rv-head { display: flex; align-items: flex-end; gap: 12px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.rv-tabs { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rv-tabs::-webkit-scrollbar { display: none; }
#main .rv-tabs button { flex: none; border: 0; border-radius: 0; background: none; box-shadow: none; min-height: 40px; padding: 7px 12px; margin-bottom: -1px; gap: 7px; font-size: .9rem; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; transform: none; }
#main .rv-tabs button:hover { color: var(--ink); }
#main .rv-tabs button.on { color: var(--mis-head-ink, var(--ink)); font-weight: 650; border-bottom-color: var(--mis-head-ink, var(--brand)); }
.rv-tabsel { display: none; } /* the status tabs as a list on a phone */
.rv-n { font-variant-numeric: tabular-nums; font-size: .8em; font-weight: 600; color: var(--ink-3); }
.rv-tools { flex: none; display: flex; align-items: center; gap: 16px; padding-bottom: 6px; }
#main .rv-tools .link { font-size: .86rem; font-weight: 600; color: var(--mis-link, var(--brand)); }

/* find bar: scope · Today · Yesterday · type · Severity ▾ – wraps only where the row does not fit */
.rv-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.rv-seg { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); flex: none; }
.rv-seg::-webkit-scrollbar { display: none; }
#main .rv-seg button, .rv-pnl .rv-seg button { flex: none; border: 0; border-radius: 0; background: none; box-shadow: none; min-height: 32px; height: 32px; padding: 4px 10px; gap: 6px; font-size: .84rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; transform: none; }
#main .rv-seg button + button, .rv-pnl .rv-seg button + button { border-left: 1px solid var(--line-2); }
#main .rv-seg button.on, .rv-pnl .rv-seg button.on { background: var(--brand-soft); color: var(--mis-head-ink, var(--brand)); font-weight: 650; }
#main .rv-seg button.on .rv-n { color: inherit; }
/* Today · Yesterday: small views inside New since last seen, after a thin divider */
.rv-days { display: flex; align-items: center; gap: 2px; padding-left: 10px; border-left: 1px solid var(--line-2); flex: none; }
#main .rv-days button { min-height: 32px; height: 32px; padding: 4px 8px; gap: 5px; border: 0; border-radius: 6px; background: none; box-shadow: none; font-size: .84rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; transform: none; }
#main .rv-days button.on { background: var(--brand-soft); color: var(--mis-head-ink, var(--brand)); font-weight: 650; }
#main .rv-days button.on .rv-n { color: inherit; }
#main .rv-days button:disabled { opacity: .45; cursor: default; background: none; }
.rv-types { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
#main .rv-chip { min-height: 32px; height: 32px; padding: 4px 9px; gap: 6px; border-radius: 8px; border-color: var(--line-2); background: var(--surface); box-shadow: none; font-size: .84rem; font-weight: 500; color: var(--ink-2); }
#main .rv-chip.on { border-color: var(--mis-head-ink, var(--brand)); background: var(--brand-soft); color: var(--mis-head-ink, var(--brand)); font-weight: 650; }
#main .rv-chip.on .rv-n { color: inherit; }
#main .rv-chip:disabled { opacity: .45; cursor: default; background: var(--surface); } /* a type with nothing in this list */
.rv-lv { display: block; margin: 0; }
#main .rv-lv select { min-height: 32px; height: 32px; padding: 4px 28px 4px 10px; font-size: .84rem; border-radius: 8px; width: auto; }
.rv-find > .rv-i { margin-left: auto; }
#main .rv-sev select { max-width: 170px; }
.rv-typesel { display: none; }

/* the "i": a rule that must stay visible, as a tooltip */
.rv-i { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink-3); background: var(--surface); font: italic 700 10.5px/1 Georgia, 'Times New Roman', serif; cursor: help; vertical-align: -2px; }
.rv-i:focus-visible { outline: 2px solid var(--mis-link, var(--brand)); outline-offset: 1px; }

/* one list */
.rv-list { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; overflow: hidden; }
.rv-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) 118px minmax(232px, max-content); align-items: start; gap: 2px 14px; padding: 11px 16px; border-top: 1px solid var(--line); }
/* findings: one fixed action column in every scope (Fix, More), so Fix and More always line up; a row is about 52 px */
.rv-list.fx .rv-row, .rv-colh { grid-template-columns: 8px minmax(0, 1fr) 118px 156px; }
.rv-list.fx .rv-row { padding: 6px 16px; align-items: center; row-gap: 0; }
.rv-list.fx .rv-dot { margin-top: 0; align-self: start; margin-top: 7px; }
.rv-list.fx .rv-main { gap: 0; }
.rv-list.fx .rv-t { line-height: 1.3; }
.rv-list.fx .rv-m { line-height: 1.35; }
.rv-list.fx .rv-amt { padding-top: 0; align-self: start; }
.rv-list.fx .rv-acts { align-self: center; }
.rv-row:first-child, .rv-sub + .rv-row, .rv-batch + .rv-row, .rv-colh + .rv-row { border-top: 0; }
.rv-colh { display: grid; gap: 0 14px; padding: 5px 16px 0; line-height: 1.1; }
.rv-colh span { font-size: .7rem; font-weight: 600; color: var(--ink-3); text-align: right; }
.rv-nw { white-space: nowrap; }
.rv-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--line-2); }
.rv-dot.bad { background: var(--mis-loss, var(--bad)); }
.rv-dot.warn { background: var(--mis-amber, var(--warn)); }
.rv-dot.info { background: var(--ink-3); opacity: .55; }
.rv-dot.done { background: var(--mis-mint, var(--ok)); }
.rv-main { display: grid; gap: 2px; min-width: 0; }
#main .rv-t { display: block; width: fit-content; max-width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; text-align: left; font-size: .92rem; font-weight: 600; line-height: 1.35; color: var(--ink); cursor: pointer; transform: none; overflow-wrap: anywhere; }
@media (hover: hover) { #main .rv-t:hover { color: var(--mis-link, var(--brand)); } } /* no colour stuck on a tapped title */
#main .rv-t:focus-visible { outline: 2px solid var(--mis-link, var(--brand)); outline-offset: 2px; border-radius: 2px; }
.rv-m { font-size: .82rem; color: var(--ink-3); overflow-wrap: anywhere; }
.rv-dec, .rv-ai, .rv-q { font-size: .82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.rv-ai b, .rv-q b { color: var(--ink); font-weight: 600; }
.rv-amt { padding-top: 1px; text-align: right; white-space: nowrap; font-size: .95rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.rv-acts { display: flex; justify-content: flex-end; gap: 6px; }
#main .rv-acts > button { min-height: 32px; height: 32px; padding: 4px 12px; font-size: .84rem; }
#main .rv-acts > .primary { min-width: 62px; white-space: nowrap; } /* the tick box beside it must not wrap "Approve and post" (UI review, 21 Nov 2026) */
.rv-acts { flex-shrink: 0; }
#main .rv-acts.fx > [data-rv-fix] { width: 64px; }
#main .rv-acts.fx > .rv-more { width: 86px; }
#main .rv-more::after { content: ''; width: 6px; height: 6px; margin: -3px 0 0 2px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); opacity: .7; }
.rv-det { grid-column: 2 / -1; margin-top: 4px; display: grid; gap: 6px; font-size: .84rem; color: var(--ink-2); min-width: 0; }
.rv-det[hidden] { display: none; }
.rv-det p { margin: 0; }
.rv-refs { display: flex; flex-wrap: wrap; gap: 2px 14px; }
#main .rv-refs .link { font-size: .82rem; }
.rv-det .table-wrap { margin: 0; }
.rv-det .mis-ba { margin: 0; }
.rv-tbl td { padding-top: 5px; padding-bottom: 5px; }
.rv-none { margin: 0; padding: 22px 16px; color: var(--ink-3); font-size: .9rem; }
.rv-err { margin: 0; background: var(--bad-soft); color: var(--bad); }
.rv-sub, .rv-batch { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: .86rem; }
#main .rv-sub button, #main .rv-batch button { min-height: 32px; height: 32px; }
.rv-sub .grow, .rv-batch .grow { flex: 1; min-width: 0; }

/* Period: TDS summary, ageing and GST returns under the list */
#rvExtra { display: grid; gap: 12px; min-width: 0; }
#rvExtra:empty { display: none; }
:root[data-prod="mis"] #main #rvExtra > .card, :root[data-prod="mis"] #main #rvExtra .mis-tds, :root[data-prod="mis"] #main #rvExtra .mis-gst { margin: 0; box-shadow: none; border-radius: 12px; }
.rv-age summary { cursor: pointer; }
.rv-age .table-wrap { margin-top: 10px; }

/* More menu */
.rv-menu { position: absolute; z-index: 46; min-width: 190px; padding: 4px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(14, 26, 58, .16); }
.rv-menu button { justify-content: flex-start; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 6px; background: none; box-shadow: none; font-size: .88rem; font-weight: 500; color: var(--ink); transform: none; }
.rv-menu button:hover, .rv-menu button:focus-visible { background: var(--surface-2); outline: none; }
.rv-menu .rv-danger { color: var(--bad); }

/* side panel: right side on a laptop, the full screen on a phone; modals (confirm, Ask client) open above it */
.rv-pnl-bg { position: fixed; inset: 0; z-index: 45; display: flex; justify-content: flex-end; background: rgba(10, 16, 28, .32); animation: rv-fade .15s ease-out; }
.rv-pnl { width: min(560px, 100vw); height: 100%; display: flex; flex-direction: column; background: var(--surface); box-shadow: -12px 0 32px rgba(14, 26, 58, .18); animation: rv-in .18s ease-out; }
.rv-pnl.wide { width: min(1120px, calc(100vw - 120px)); }
@keyframes rv-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes rv-fade { from { opacity: 0; } to { opacity: 1; } }
.rv-pnl-h { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.rv-pnl-h h3 { flex: 1; min-width: 0; margin: 0; font-size: 1.02rem; color: var(--ink); overflow-wrap: anywhere; }
.rv-pnl-h .ghost { min-height: 32px; height: 32px; }
.rv-x { flex: none; width: 34px; min-height: 34px; padding: 0; border: 0; background: none; font-size: 1.45rem; font-weight: 400; line-height: 1; color: var(--ink-3); }
.rv-pnl-b { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 16px 20px 0; }
.rv-pnl-b > * { min-width: 0; }
.el-per { align-self: flex-start; }
.rv-pnl-f { position: sticky; bottom: 0; margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 0 16px; background: var(--surface); border-top: 1px solid var(--line); }
.rv-pnl-f button { min-height: 38px; }
.rv-jf { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.rv-jf[hidden] { display: none; }
.rv-jf .field { margin: 0; }
.rv-work { display: grid; gap: 4px; }
.rv-why { margin: 0; font-size: .86rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* "7 bills ▾": the bills behind the TDS working */
.rv-bills summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: .84rem; font-weight: 600; color: var(--mis-link, var(--brand)); }
.rv-bills summary::-webkit-details-marker { display: none; }
.rv-bills summary::after { content: ''; width: 6px; height: 6px; margin-top: -3px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); }
.rv-bills[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.rv-bills .table-wrap { margin: 6px 0 0; }
.rv-btbl { font-size: .82rem; }
.rv-btbl th { font-size: .74rem; font-weight: 600; color: var(--ink-3); }
.rv-btbl th, .rv-btbl td { padding: 4px 8px; }
.rv-btbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-btbl tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); }
.rv-hd { margin: 0; }
.rv-hd input { width: 100%; min-width: 0; }
.rv-hdwhy { margin: -6px 0 0; font-size: .82rem; color: var(--ink-3); }
.rv-how { margin: 0; display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--ink-3); }
.rv-two { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
.rv-two input, .rv-two textarea { width: 100%; min-width: 0; }
.rv-two textarea { resize: vertical; min-height: 0; line-height: 1.4; }
.rv-lhead, .rv-line { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.rv-lhead { margin-bottom: 4px; }
.rv-lhead span { font-size: .74rem; font-weight: 600; color: var(--ink-3); }
.rv-lhead span + span { text-align: right; padding-right: 10px; }
.rv-lines { display: grid; gap: 6px; }
.rv-line input { width: 100%; min-width: 0; }
.rv-line input[name^="dr"], .rv-line input[name^="cr"] { text-align: right; font-variant-numeric: tabular-nums; }
.rv-jf #rvAdd { width: fit-content; margin-top: 6px; }
.rv-sum { margin: 0; }
#rvBook { padding-bottom: 16px; }
#rvBook[hidden] { display: none; }
#rvBook .mb-ask.mb-in { margin-top: 0; }

/* Entry log */
.el { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.el #elBody { display: grid; gap: 10px; }
.el-since { margin: -4px 0 0; font-size: .82rem; color: var(--ink-3); }
.el-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.el-range .field { flex: 1 1 180px; min-width: 0; margin: 0; }
.el-range input { width: 100%; min-width: 0; }
.el-range button { min-height: 40px; }
.el-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.el-stat { display: grid; gap: 1px; padding: 10px 14px; border-top: 1px solid var(--line); }
.el-stat:nth-child(-n+2) { border-top: 0; }
.el-stat:nth-child(2n) { border-left: 1px solid var(--line); }
.el-stat small { font-size: .76rem; font-weight: 600; color: var(--ink-3); }
.el-stat b { font-size: 1.2rem; font-weight: 750; color: var(--mis-head-ink, var(--ink)); font-variant-numeric: tabular-nums; }
.el-stat span { font-size: .76rem; color: var(--ink-3); }
.el-stat.bad b { color: var(--mis-loss, var(--bad)); }
.el-own { margin: 0; }
.el h4 { margin: 6px 0 0; font-size: .86rem; color: var(--ink); }
.el .table-wrap { margin: 0; }
.el-tbl tfoot td { font-weight: 700; }

/* phone: the panel takes the screen; a row stacks – title and amount, then the buttons across */
@media (max-width: 720px) {
  .rv-head { flex-direction: column-reverse; align-items: stretch; gap: 4px; }
  .rv-tools { justify-content: space-between; padding: 0; }
  .rv-find { gap: 8px; }
  .rv-head { border-bottom: 0; }
  #main .rv-t:hover { color: var(--ink); } /* a tapped title keeps the colour of the others */
  /* status: the laptop names in a list (one name per action), not shortened tabs */
  .rv-tabs { display: none; }
  .rv-tabsel { display: block; margin: 0; }
  #main .rv-tabsel select { width: 100%; min-height: 40px; font-weight: 600; }
  /* scope: the three in one row, Today · Yesterday below in one row – no orphan */
  .rv-seg { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; background: var(--line-2); }
  #main .rv-seg button { display: block; height: auto; min-height: 44px; padding: 5px 4px; font-size: .78rem; line-height: 1.25; white-space: normal; text-align: center; background: var(--surface); border-left: 0; }
  #main .rv-seg button .rv-n { margin-left: 4px; white-space: nowrap; }
  #main .rv-seg button.on { background: var(--brand-soft); }
  #main .rv-seg button + button { border-left: 0; }
  .rv-days { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 0; border: 0; }
  .rv-days:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #main .rv-days button { justify-content: center; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .rv-types { display: none; } /* a phone gets the types as a list, beside the severity */
  .rv-typesel { display: block; }
  .rv-lv { flex: 1 1 0; min-width: 0; }
  #main .rv-lv select { width: 100%; }
  #main .rv-sev select { max-width: none; }
  #main .rv-acts > button { padding: 4px 8px; white-space: nowrap; }
  .rv-find > .rv-i { display: none; }
  .rv-row, .rv-list.fx .rv-row { grid-template-columns: 8px minmax(0, 1fr) auto; padding: 12px; gap: 2px 10px; }
  .rv-colh { display: none; }
  .rv-colh + .rv-row { border-top: 0; }
  .rv-acts { grid-column: 2 / -1; grid-row: 3; justify-content: stretch; margin-top: 8px; }
  .rv-det { grid-row: 2; }
  #main .rv-acts > button { flex: 1 1 0; }
  /* findings: Fix and More half and half; a lone More takes the right half */
  .rv-list.fx .rv-row { padding: 12px; align-items: start; }
  .rv-list.fx .rv-acts { align-self: auto; }
  .rv-acts.fx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .rv-acts.fx > .rv-more { grid-column: -2 / -1; }
  #main .rv-acts.fx > [data-rv-fix], #main .rv-acts.fx > .rv-more { width: auto; }
  .rv-amt { min-width: 0; }
  .rv-pnl, .rv-pnl.wide { width: 100vw; }
  .rv-pnl-h { padding: 10px 14px; }
  .rv-pnl-b { padding: 14px 14px 0; }
  .rv-two { grid-template-columns: minmax(0, 1fr); }
  .el-range button { flex: 1 1 100%; }
  .rv-det .mis-ba { grid-template-columns: minmax(0, 1fr); }
}
/* a posted entry changed in Tally afterwards (18 Nov 2026) */
.rv-changed { border-left: 3px solid var(--warn, #b7791f); background: rgba(183, 121, 31, 0.07); padding: 6px 10px; margin: 0 0 8px; border-radius: 6px; }
.rv-changed ul { margin: 4px 0 0; padding-left: 18px; }
.rv-changed li { overflow-wrap: anywhere; }
.rv-chg-pill { display: table; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #8a5a12; background: rgba(183, 121, 31, 0.14); white-space: nowrap; }
.rv-changed p.muted { margin: 4px 0 0; }
/* Approve and post ticked (21 Nov 2026): a tick box before Approve and post on each new journal waiting */
.rv-tick { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; margin-right: 2px; }
.rv-tick input, .rv-batch .check input { width: 18px; height: 18px; }
.rv-batch .check { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.rv-batch .check { flex: 1 1 220px; }
@media (max-width: 480px) { .rv-batch .check, .rv-batch #rvPostSel { flex: 1 1 100%; } }
/* "Approve and post" keeps its whole label beside the tick box and More (owner, 22 Nov 2026: button and text overlapping) */
#main .rv-acts > button, #main .rv-acts > .rv-more, .rv-tick { flex-shrink: 0; }
/* Delete ticked beside Approve and post ticked */
#main .rv-batch .danger { color: var(--zr-red, #c62828); border-color: currentColor; }
@media (max-width: 720px) { .rv-batch .check { flex: 1 1 100%; } #main .rv-batch > button { flex: 1 1 0; white-space: nowrap; } }
@media (max-width: 720px) { #main .rv-acts > [data-rv-post] { flex: 2 1 auto; padding: 4px 14px; } #main .rv-acts > .rv-more { flex: 1 1 auto; } }

/* ── mis-tb.css ── */
/* Trial balance that tallies (UX review 3, 9 Nov 2026 – web/src/mis-scrutiny.js): the opening Profit & Loss A/c, a red
   "Difference in opening balances" row as in Tally, a bold Total row with both sides of each balance. */
:root[data-prod="mis"] #main .scr-tb tr.scr-x > th { font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: .86rem; padding-left: 26px; }
:root[data-prod="mis"] #main .scr-tb tr.scr-diff > th, :root[data-prod="mis"] #main .scr-tb tr.scr-diff > td { color: var(--bad); }
:root[data-prod="mis"] #main .scr-tb tfoot tr.scr-tot > th, :root[data-prod="mis"] #main .scr-tb tfoot tr.scr-tot > td {
  font-weight: 700; color: var(--ink); background: var(--surface); border-top: 1px solid var(--ink-3); border-bottom: 1px solid var(--ink-3);
  text-transform: none; letter-spacing: 0; font-size: .9rem; vertical-align: top; padding-top: 10px; padding-bottom: 10px;
}
:root[data-prod="mis"] #main .scr-tb tfoot tr.scr-tot > th { padding-left: 26px; }
:root[data-prod="mis"] #main .scr-tb .scr-tt { display: block; white-space: nowrap; }
:root[data-prod="mis"] #main .scr-tb .scr-tt + .scr-tt { margin-top: 2px; }
/* a group's open findings: a quiet count (its ledgers carry the links to Review) */
:root[data-prod="mis"] #main .scr-tb .scr-fn.scr-fng { color: var(--ink-3); font-weight: 600; }
/* a ledger at the top level (Tally's Profit & Loss A/c, a ledger outside any group): set like the groups, its name in line with theirs */
:root[data-prod="mis"] #main .scr-tb tr.led.scr-top > th { font-weight: 600; color: var(--ink); padding-left: 26px !important; }
/* the headings carry a date: kept on one line on a laptop */
@media (min-width: 900px) { :root[data-prod="mis"] #main .scr-tb thead th { white-space: nowrap; } }
/* a phone: the date on its own line under Closing */
@media (max-width: 899px) {
  :root[data-prod="mis"] #main .scr-tb thead .scr-at { display: block; white-space: nowrap; }
  :root[data-prod="mis"] #main .scr-tb thead .scr-sep { display: none; }
}

/* ── mis-ux-head.css ── */
/* ══ MIS – app bar and report control bar (UX review, 7 Nov 2026) ═══════════════════════════════════════════
   The navy band went. One white 56 px app bar: logo → client switcher "MCMLXX Retail Pvt Ltd ▾" → "● Synced 4m ago"
   (green = matched with Tally, red = not matched / not synced) → Sync · Open Tally · product · avatar.
   Report pages (Overview, P&L, Balance sheet, Cash flow, Fund flow, MIS pack): one 44 px control bar that stays under
   the app bar on a laptop. Markup: head() / topBar() and the control row in mis.js viewClient(), #topCtx / #topTools in
   main.js. Rules carry :root[data-prod="mis"] #main (or .topbar) so they win over the older sheets that load after. */

/* ── demo notice: a slim strip (every product) ── */
.demo-bar { min-height: 24px; padding: 0 12px; gap: 4px 10px; font-size: 12px; line-height: 1.2; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.demo-bar > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.demo-bar select { height: 20px; min-height: 0; padding: 0 4px; font-size: 12px; line-height: 1; border-radius: 5px; width: auto; }
@media (max-width: 480px) { .demo-bar .db-more { display: none; } }
.demo-bar.test-bar { flex-wrap: wrap; white-space: normal; padding: 3px 12px; } /* the test app's strip keeps its Load dummy data link */
.demo-bar button.link { min-height: 0; padding: 0; font-size: 12px; }
/* it stays on top; the app bar and the side menu sit under it (main.js sets --demo-h: its height, 0 when hidden) */
body > .demo-bar { position: sticky; top: 0; z-index: 21; }
.topbar { top: var(--demo-h, 0px); }
@media (min-width: 900px) { .sidebar { top: calc(var(--top-h) + var(--demo-h, 0px)); } }

/* ── app bar on an MIS client page ── */
:root[data-prod="mis"] { --top-h: 56px; }
.topbar .top-ctx { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 0 1 auto; }
.topbar .top-ctx[hidden] { display: none; }
.topbar.has-ctx { gap: 12px; }
.topbar.has-ctx .brand { flex: none; order: 0; }
.topbar.has-ctx .brand > span:last-child { display: none; } /* one name on screen: the client's */
.topbar.has-ctx .top-ctx { order: 1; }
.topbar.has-ctx .top-actions { display: contents; }
.topbar.has-ctx #topTools { order: 3; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar.has-ctx #topNew, .topbar.has-ctx #meTxt { display: none; }
.topbar.has-ctx #prodPill { order: 4; flex: none; }
.topbar.has-ctx .prod-pill { min-height: 32px; padding: 3px 7px 3px 4px; gap: 4px; } .topbar.has-ctx .prod-pill b { display: none; }
.topbar.has-ctx .avatar { order: 5; flex: none; }
.topbar #topTools button { min-height: 32px; height: 32px; padding: 0 14px; border-radius: 9px; font-size: .84rem; font-weight: 600; white-space: nowrap; }
.topbar #topTools:empty { display: none; }

/* client switcher: the name with ▾; the native list lies over it, so a click on the name opens it */
.topbar .top-client { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 420px; padding: 4px 8px; margin-left: -8px; border-radius: 8px; }
.topbar .top-client .mm-nm { font-size: 1rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar .top-client .mm-car { flex: none; color: var(--ink-3); font-size: 11px; }
.topbar .top-client .mm-car[hidden] { display: none; }
.topbar .top-client select.mm-cs { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.topbar .top-client select.mm-cs[hidden] { display: none; }
.topbar .top-client.mm-can:hover { background: var(--grey-soft, var(--surface-2)); }
.topbar .top-client.mm-can:has(select:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }

/* "● Synced 4m ago": opens the Tally connection */
.topbar .top-sync { flex: none; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: .82rem; font-weight: 500; white-space: nowrap; text-decoration: none; padding: 4px 6px; border-radius: 7px; }
.topbar .top-sync:hover { color: var(--ink); background: var(--grey-soft, var(--surface-2)); }
.topbar .top-sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.topbar .top-sync.ok .dot { background: var(--mis-up, #2e7d32); }
.topbar .top-sync.bad .dot { background: var(--mis-loss, #c62828); }

/* Today's entries: the app bar's Sync is the one way to read Tally again */
:root[data-prod="mis"] #main #teSync { display: none; }

/* ── control bar ── */
:root[data-prod="mis"] #main .mis-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
:root[data-prod="mis"] #main .mis-bar .mis-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; flex: 1 1 auto; min-width: 0; }
:root[data-prod="mis"] #main .mis-ctrl .mc-per { display: flex; align-items: center; gap: 6px; min-width: 0; }
:root[data-prod="mis"] #main .mis-ctrl .mis-prov { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
:root[data-prod="mis"] #main .mis-ctrl .mis-prov-edit { font-size: .84rem; font-weight: 600; color: var(--mis-link, var(--brand)); white-space: nowrap; }
:root[data-prod="mis"] #main .mis-ctrl .mis-prov-edit:hover { text-decoration: underline; text-underline-offset: 3px; }
:root[data-prod="mis"] #main .mis-ctrl .mc-unit { display: flex; }
:root[data-prod="mis"] #main .mis-ctrl #misNotes { margin-left: auto; }
:root[data-prod="mis"] #main .mis-ctrl .mis-fmt { margin-left: auto; font-size: .84rem; font-weight: 600; color: var(--mis-link, var(--brand)); }

/* switches: a quiet grey track, the chosen side white – no filled navy buttons in the bar */
:root[data-prod="mis"] #main :is(.mis-bar, .mis-cap, .bs-opts) .seg { background: var(--surface-2); border: 1px solid var(--line); }
:root[data-prod="mis"] #main :is(.mis-bar, .mis-cap, .bs-opts) .seg button { color: var(--ink-2); }
:root[data-prod="mis"] #main :is(.mis-bar, .mis-cap, .bs-opts) .seg button.on { background: var(--surface); color: var(--mis-head-ink) !important; font-weight: 700; box-shadow: 0 1px 2px rgba(14, 26, 58, .10), 0 0 0 1px var(--line-2); }

/* Export ▾ */
:root[data-prod="mis"] #main .mis-exp { position: relative; flex: none; }
:root[data-prod="mis"] #main .mis-exp .mc-car { font-size: 10px; color: var(--ink-3); }
:root[data-prod="mis"] #main .mis-exp-menu:not([hidden]) { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; display: flex; flex-direction: column; min-width: 168px; padding: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-up, 0 8px 24px rgba(14, 26, 58, .14)); }
:root[data-prod="mis"] #main .mis-exp-menu button { justify-content: flex-start; width: 100%; min-height: 34px; padding: 0 12px; border: 0; border-radius: 7px; background: none; font-size: .86rem; font-weight: 500; color: var(--ink); box-shadow: none; transform: none; }
:root[data-prod="mis"] #main .mis-exp-menu button:is(:hover, :focus-visible) { background: var(--brand-soft); outline: 0; }

/* laptop: one row, 32 px controls, the bar stays under the app bar on report pages */
@media (min-width: 900px) {
  /* one row from 1366 px up even with Books + provisional, its Edit link and vs last year; narrower, it wraps (never overlaps) */
  :root[data-prod="mis"] #main .mis-bar { gap: 8px; }
  :root[data-prod="mis"] #main .mis-bar .mis-ctrl { display: contents; } /* its pieces and Export share one row */
  :root[data-prod="mis"] #main .mis-bar .mis-exp { margin-left: auto; }
  :root[data-prod="mis"] #main .mis-bar:has(#misNotes) .mis-exp { margin-left: 0; }
  :root[data-prod="mis"] #main .mis-bar .mis-ctrl .mis-prov { gap: 6px; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky {
    position: sticky; top: calc(var(--top-h) + var(--demo-h, 0px)); z-index: 14; min-height: 44px; margin: -28px -32px 16px; padding: 6px 32px 5px; box-sizing: border-box;
    background: var(--surface); border-bottom: 1px solid var(--line);
  }
  :root[data-prod="mis"] #main .mis-bar .mc-per { flex: none; }
  :root[data-prod="mis"] #main .mis-bar select { width: auto; min-width: 0; height: 32px; min-height: 32px; padding: 0 4px 0 8px; font-size: .85rem; border-radius: 8px; flex: none; }
  :root[data-prod="mis"] #main .mis-bar .mis-range select { min-width: 0; width: auto; }
  :root[data-prod="mis"] #main .mis-bar .seg { flex-wrap: nowrap; padding: 2px; border-radius: 9px; flex: none; }
  :root[data-prod="mis"] #main .mis-bar .seg button { min-height: 26px; height: 26px; padding: 0 9px; border-radius: 7px; font-size: .82rem; white-space: nowrap; }
  :root[data-prod="mis"] #main .mis-bar button.sm { min-height: 32px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: .84rem; white-space: nowrap; flex: none; }
  :root[data-prod="mis"] #main .mis-bar button.sm .ic { width: 16px; height: 16px; }
}
@media (min-width: 900px) and (max-width: 1300px) {
  :root[data-prod="mis"] #main .mis-bar .seg button { padding: 0 8px; }
}

/* ── P&L: MIS | Schedule III, Hide zero rows and the format sit on the table's top edge (the Balance sheet's own
   options row – Schedule III | Tally groups, Hide zero rows, Show last year end – gets the same look) ── */
:root[data-prod="mis"] #main :is(.pl3-opts.mis-cap, .bs-opts) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0; padding: 7px 12px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
:root[data-prod="mis"] #main :is(.pl3-opts.mis-cap, .bs-opts) .seg { padding: 2px; border-radius: 9px; }
:root[data-prod="mis"] #main :is(.pl3-opts.mis-cap, .bs-opts) .seg button { min-height: 26px; padding: 0 10px; font-size: .82rem; border-radius: 7px; }
:root[data-prod="mis"] #main :is(.pl3-opts.mis-cap, .bs-opts) .check { font-size: .84rem; color: var(--ink-2); gap: 6px; }
:root[data-prod="mis"] #main .pl3-opts.mis-cap .mis-fmt { margin-left: auto; font-size: .84rem; font-weight: 600; color: var(--mis-link, var(--brand)); }
:root[data-prod="mis"] #main :is(.pl3-opts.mis-cap, .bs-opts) + .mis-sheet { border-top-left-radius: 0; border-top-right-radius: 0; }


/* ── phone and tablet: the bar wraps (not sticky); the app bar keeps the name, a status dot and Sync ── */
@media (max-width: 899px) {
  /* every control is a piece of one wrapping row: year + units, From – to, Books | Books + provisional, Months | vs last
     year, then Notes and Export sharing the last line */
  :root[data-prod="mis"] #main .mis-bar :is(.mis-ctrl, .mc-per) { display: contents; }
  :root[data-prod="mis"] #main .mis-ctrl #misFy { order: 1; flex: 1 1 120px; min-width: 0; }
  :root[data-prod="mis"] #main .mis-ctrl .mc-unit { order: 1; flex: 1 1 110px; }
  :root[data-prod="mis"] #main .mis-ctrl .mc-unit select { width: 100%; min-width: 0; }
  :root[data-prod="mis"] #main .mis-ctrl .mis-range { order: 2; flex: 1 1 100%; display: flex; min-width: 0; }
  :root[data-prod="mis"] #main .mis-ctrl .mis-range select { flex: 1 1 0; min-width: 0; }
  :root[data-prod="mis"] #main .mis-ctrl .mis-prov { order: 3; flex: 1 1 100%; }
  :root[data-prod="mis"] #main .mis-ctrl .mis-prov .seg { flex: 1 1 auto; }
  :root[data-prod="mis"] #main .mis-ctrl .mis-prov-edit { flex: none; min-height: 40px; min-width: 44px; padding: 0 10px; } /* big enough to tap */
  :root[data-prod="mis"] #main .mis-ctrl #misLy { order: 4; flex: 1 1 100%; }
  :root[data-prod="mis"] #main .mis-ctrl :is(#misLy, .mis-prov .seg) { display: flex; flex-wrap: nowrap; }
  :root[data-prod="mis"] #main .mis-ctrl :is(#misLy, .mis-prov .seg) button { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
  :root[data-prod="mis"] #main .mis-ctrl #misNotes { order: 5; margin-left: 0; flex: 1 1 0; min-height: 40px; justify-content: center; white-space: nowrap; }
  :root[data-prod="mis"] #main .mis-bar .mis-exp { order: 5; flex: 1 1 0; }
  :root[data-prod="mis"] #main .mis-bar .mis-exp > button { width: 100%; min-height: 40px; }
  :root[data-prod="mis"] #main .mis-bar .mis-fmt { order: 1; flex: none; margin-left: auto; }
}
@media (max-width: 720px) {
  .topbar.has-ctx { gap: 8px; padding: 0 10px; }
  .topbar.has-ctx .top-ctx { flex: 1 1 auto; gap: 6px; }
  .topbar .top-client { max-width: none; margin-left: 0; padding: 4px 4px; }
  .topbar .top-client .mm-nm { font-size: .95rem; }
  .topbar .top-sync { padding: 4px; }
  .topbar .top-sync .ts-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* the dot only; the words stay for screen readers */
  .topbar.has-ctx #topTools { gap: 6px; }
  .topbar #topTools button { padding: 0 10px; }
  .topbar #topTools #misOpenTally { display: none; } /* Tally's remote screen is for the laptop */
}

/* ── mis-ux-menu.css ── */
/* MIS – the new left menu, the page tabs and the avatar menu (UX review, 7 Nov 2026).
   Menu: Clients · Overview, Ask · Reports (P&L, Balance sheet, Cash flow, Reports) · Review · Setup (Mapping, Connection).
   Page tabs: Cash flow | Fund flow; Reports: Standard, Trial balance, TDS summary, GST returns, Ageing, MIS pack.
   Calm: hairlines, no fills, the one accent only on the active marker. Phones get a list (select) instead of the tabs. */

/* ── side menu: small group headings, a hairline between the client list and this client's pages ── */
:root[data-prod="mis"] .sidebar .nav-sep { height: 1px; background: var(--line); margin: 8px 12px; }
:root[data-prod="mis"] .sidebar .nav-h { margin: 14px 12px 4px; padding: 0; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
:root[data-prod="mis"] .nav.sheet .nav-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ── page tabs (Cash flow | Fund flow, the Reports tabs): text tabs on one hairline ── */
.mis-sub { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.mis-sub a { padding: 9px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 500; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.mis-sub a:hover { color: var(--ink); }
.mis-sub a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.mis-sub a:focus-visible { outline: 2px solid var(--brand-2, var(--brand)); outline-offset: -2px; border-radius: 6px; }
:root[data-prod="mis"] .mis-sub { border-bottom-color: var(--line-2); }
:root[data-prod="mis"] .mis-sub a.on { color: var(--mis-head-ink); border-bottom-color: var(--mis-head-ink); }
.mis-subsel { display: none; }
@media (max-width: 640px) {
  .mis-sub { display: none; }
  .mis-subsel { display: block; margin: 0 0 12px; }
  .mis-subsel select { width: 100%; font-weight: 600; }
}

/* ── Review (placeholder until the Review page lands) ── */
#misReview #teSync { display: none; } /* Sync in the header is the one way to read Tally */

/* ── avatar menu: My account, Switch product ── */
.top-actions { position: relative; }
.av-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; max-width: calc(100vw - 24px); padding: 6px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(14, 26, 58, .14); }
.av-menu .av-who { display: grid; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.av-menu .av-who b { font-size: .92rem; color: var(--ink); }
.av-menu .av-who small { color: var(--ink-3); }
.av-menu a, .av-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: .92rem; text-align: left; text-decoration: none; cursor: pointer; }
.av-menu a:hover, .av-menu button:hover, .av-menu a:focus-visible, .av-menu button:focus-visible { background: var(--surface-2, #f6f8fc); outline: none; }
.av-menu .ic { width: 18px; height: 18px; color: var(--ink-3); flex: none; }

/* ── mis-ux-quiet.css ── */
/* MIS – the quiet look on the report and setup screens (UX review, 7 Nov 2026, quick win 4): no sentence above every
   control (a small "i" instead – web/src/mis-tip.js), plain figure cards, hairlines instead of boxes inside boxes, one
   accent colour, no gradients, buttons in a row the same height. Loads before zz-mis-theme.css, so the rules that must
   win over the theme carry #main (pages) or .modal (dialogs). */

/* ── the "i" ── */
.mis-tip {
  display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; margin: 0 2px; vertical-align: 1px;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--ink-3);
  font: italic 700 10.5px/1 Georgia, 'Times New Roman', serif; letter-spacing: 0; text-transform: none; cursor: help; user-select: none;
}
.mis-tip::before { content: 'i'; }
.mis-tip:hover { color: var(--ink); border-color: var(--ink-3); }
.mis-tip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (hover: none) { .mis-tip { width: 20px; height: 20px; font-size: 12px; } }

/* ── Overview: figure cards in one white strip with hairlines; label, big number, one grey line ── */
:root[data-prod="mis"] #main .mdash .md-tiles { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
:root[data-prod="mis"] #main .mdash .md-tile { background: none; border: 0; border-radius: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); padding: 14px 16px 15px; gap: 4px; }
:root[data-prod="mis"] #main .mdash .md-tl { font-size: .8rem; font-weight: 500; color: var(--ink-2); }
:root[data-prod="mis"] #main .mdash .md-tile b { font-size: 1.45rem; line-height: 1.8rem; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-prod="mis"] #main .mdash .md-tile b.md-word { font-size: 1.1rem; }
:root[data-prod="mis"] #main .mdash .md-tile small { font-size: .78rem; font-weight: 400; color: var(--ink-3); line-height: 1.35; }
:root[data-prod="mis"] #main .mdash .md-tile small i { font-style: normal; font-size: .7rem; }
:root[data-prod="mis"] #main .mdash .md-top-bar .small { color: var(--ink-3); }
/* margins: one colour */
:root[data-prod="mis"] #main .mdash .md-track { height: 8px; background: var(--surface-2); }
:root[data-prod="mis"] #main .mdash .md-track i { background: var(--mis-navy, var(--brand)); }
/* cash conversion cycle: three plain parts, no coloured pills */
:root[data-prod="mis"] #main .mdash .md-cccbar { gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
:root[data-prod="mis"] #main .mdash .md-cccbar i { background: none; color: var(--ink-2); border-radius: 0; font-weight: 600; border-left: 1px solid var(--line); }
:root[data-prod="mis"] #main .mdash .md-cccbar i:first-child { border-left: 0; }
/* runway: a white card like the others, no navy gradient */
:root[data-prod="mis"] #main .mdash .md-card.md-dark { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
:root[data-prod="mis"] #main .mdash .md-dark span, :root[data-prod="mis"] #main .mdash .md-dark small { color: var(--ink-3); }
:root[data-prod="mis"] #main .mdash .md-hero { font-size: 2rem; font-weight: 700; color: var(--ink); }
:root[data-prod="mis"] #main .mdash .md-run i { height: 14px; border-radius: 3px; background: var(--surface-2); }
:root[data-prod="mis"] #main .mdash .md-run i.on { background: var(--mis-navy, var(--brand)); }
:root[data-prod="mis"] #main .mdash .md-card h3 { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
/* Customise dashboard: Claude's reason as a quiet line */
.md-cust h3 { display: flex; align-items: center; gap: 4px; }
.md-cust .mdc-why { background: none; border-left: 2px solid var(--line-2); border-radius: 0; padding: 2px 0 2px 10px; color: var(--ink-2); }

/* ── Mapping: one bar; the two helpers and the search the same height ── */
:root[data-prod="mis"] #main .map-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
:root[data-prod="mis"] #main .map-bar #mapQ { flex: 1 1 220px; min-width: 0; height: 40px; min-height: 40px; }
:root[data-prod="mis"] #main .map-bar .map-btns { display: flex; align-items: center; gap: 8px; }
:root[data-prod="mis"] #main .map-bar .map-btns button { height: 40px; min-height: 40px; padding: 0 14px; font-size: .86rem; }
:root[data-prod="mis"] #main .map-bar .seg { padding: 2px; }
:root[data-prod="mis"] #main .map-bar .seg button { min-height: 34px; }
/* under the table: the rule as one grey line on the left, Save mapping on the right (UX review 3: no orphan "i") */
:root[data-prod="mis"] #main .map-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 10px; }
:root[data-prod="mis"] #main .map-foot .map-rule { margin: 0; flex: 1 1 260px; min-width: 0; color: var(--ink-3); font-size: .8rem; }
:root[data-prod="mis"] #main .map-foot button { flex: none; }
:root[data-prod="mis"] #main .map-sub::placeholder { color: var(--ink-3); }
@media (max-width: 640px) {
  :root[data-prod="mis"] #main .map-foot { flex-wrap: wrap; }
  :root[data-prod="mis"] #main .map-foot button { flex: 1 1 100%; }
  :root[data-prod="mis"] #main .map-bar .map-btns { width: 100%; }
  :root[data-prod="mis"] #main .map-bar .map-btns button { flex: 1 1 0; padding: 0 8px; white-space: nowrap; }
}
/* dialogs with sections: a hairline between the P&L lines, no nested boxes */
.modal .mis-quiet-dlg h3 { display: flex; align-items: center; gap: 4px; margin: 0; }
.modal .mis-dlg-sec { border-top: 1px solid var(--line); padding-top: 10px; }
.modal .mis-dlg-sec h4 { margin: 0 0 8px; font-size: .9rem; font-weight: 600; }
.modal .ai-sub-g { margin-bottom: 10px; }
.modal .ai-sub-g input { width: 100%; }
.modal .ai-sub-g small { display: block; margin-top: 3px; }

/* ── Reports: one white box; each report a row with a hairline, its description in grey under it ── */
:root[data-prod="mis"] #main .mis-rep-groups { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 16px; gap: 14px 28px; }
:root[data-prod="mis"] #main .mis-rep-h { font-size: .8rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-2); margin: 0 0 4px; }
:root[data-prod="mis"] #main .mis-rep-list { gap: 0; border-top: 1px solid var(--line); }
:root[data-prod="mis"] #main .mis-rep-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none; padding: 8px 8px 8px 10px; gap: 1px; }
:root[data-prod="mis"] #main .mis-rep-card b { color: var(--ink); font-size: .9rem; font-weight: 600; }
/* the description wraps (UX review 3, 9 Nov 2026: six of ten were cut with "…" while the box had room below) */
:root[data-prod="mis"] #main .mis-rep-card span { display: block; width: 100%; color: var(--ink-3); font-size: .78rem; line-height: 1.4; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
@media (hover: hover) { :root[data-prod="mis"] #main .mis-rep-card:hover { background: var(--surface-2); border-color: var(--line); } }
:root[data-prod="mis"] #main .mis-rep-card.on { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--mis-navy, var(--brand)); border-color: var(--line); }
:root[data-prod="mis"] #main .mis-rep-card.on b { color: var(--mis-head-ink, var(--ink)); }
/* the picked report and every answer: a plain card, no coloured top line */
:root[data-prod="mis"] #main .mis-rep-form, :root[data-prod="mis"] #main .mis-ask-res { border-top: 1px solid var(--line); box-shadow: var(--shadow); }
:root[data-prod="mis"] #main .mis-rep-fh h2 { display: flex; align-items: center; gap: 6px; }

/* ── Fund flow, TDS summary, GST returns: the "i" sits in the bar with the buttons ── */
.ff-bar, .mis-tds-ctrl { align-items: center; }
:root[data-prod="mis"] #main :is(.ff-bar, .mis-tds-ctrl) .seg { padding: 2px; }
:root[data-prod="mis"] #main :is(.ff-bar, .mis-tds-ctrl) .seg button { min-height: 32px; }
:root[data-prod="mis"] #main :is(.ff-bar, .mis-tds-ctrl) > :is(button, select) { min-height: 38px; height: 38px; }
:root[data-prod="mis"] #main #ffCheck { margin: 10px 0 0; }
:root[data-prod="mis"] #main .mis-tds-ctrl > select { width: auto; flex: 0 1 auto; min-width: 0; }
.mis-gst h3 { display: inline-flex; align-items: center; gap: 6px; }
.mis-gst > .row:first-child > :is(.btn, button) { min-height: 34px; }

/* ── Ask: the "i" at the end of the box; examples as plain small buttons, not pills ── */
:root[data-prod="mis"] #main .mis-ask { align-items: center; }
:root[data-prod="mis"] #main .mis-ask .mis-tip { margin: 0 8px 0 2px; }
:root[data-prod="mis"] #main .mis-ask-res b + .mis-tip { margin-left: 4px; }
:root[data-prod="mis"] #main .mis-ask-ex { border-radius: 8px; font-weight: 500; color: var(--ink-2); box-shadow: none; min-height: 32px; padding: 4px 12px; }
.mis-ask-start { padding-top: 2px; }
:root[data-prod="mis"] #main .mis-askpage #misAskOut { margin-top: 12px; }
@media (max-width: 640px) {
  :root[data-prod="mis"] #main .mis-askbox .mis-ask .mis-tip { order: 3; margin: 0 6px; }
}

/* ── Scrutiny: one box, no shadow on the pane ── */
:root[data-prod="mis"] #main .scr-pane { box-shadow: none; }
:root[data-prod="mis"] #main .scr-tb thead .mis-tip { margin-right: 4px; }
:root[data-prod="mis"] #main .scr-head :is(input, button.ghost), :root[data-prod="mis"] #main .scr-range :is(input, button) { min-height: 38px; height: 38px; }

/* ── Provisional adjustments: the note under the report is a plain card ── */
:root[data-prod="mis"] #main .mis-prov-note h3 { display: flex; align-items: center; gap: 6px; }
.modal h3 > .mis-tip { margin-left: 4px; }
#provF .field > span .mis-tip { margin-left: 4px; }

/* ── mis-ux-r2.css ── */
/* MIS – second UX review (7 Nov 2026): one switch look, the MIS pack screen, Trial balance, Fund flow and Mapping bars,
   page tabs flush at the top. Loads after mis-ux-head / -menu / -quiet and before zz-mis-theme.css, so the rules that
   must win over the theme carry #main (pages) or .modal (dialogs). Markup: mis.js viewClient / mapView, mis-packui.js,
   mis-scrutiny.js, mis-fund.js. */

/* ── one switch look everywhere: a quiet grey track, the chosen side a white pill (as Books | Books + provisional).
   Filled navy is kept for the one primary action of an area. ── */
:root[data-prod="mis"] :is(#main, .modal) .seg { background: var(--surface-2); border: 1px solid var(--line); padding: 2px; border-radius: 9px; gap: 2px; }
:root[data-prod="mis"] :is(#main, .modal) .seg :is(button, label, a) { color: var(--ink-2); background: transparent; box-shadow: none; }
:root[data-prod="mis"] :is(#main, .modal) .seg :is(button.on, label.on, label:has(input:checked), a.on) {
  background: var(--surface); color: var(--mis-head-ink, var(--ink)) !important; font-weight: 700; box-shadow: 0 1px 2px rgba(14, 26, 58, .10), 0 0 0 1px var(--line-2);
}
:root[data-prod="mis"] :is(#main, .modal) .seg :is(button, label, a):not(.on):hover { color: var(--ink); }

/* ── page tabs (Cash flow | Fund flow, the Reports tabs): flush under the app bar on a laptop, the first tab in line
   with the control bar's first control; the bar under them joins the same white band ── */
@media (min-width: 900px) {
  :root[data-prod="mis"] #main > .mis-sub { margin: -28px -32px 16px; padding: 4px 32px 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
  :root[data-prod="mis"] #main > .mis-sub:has(~ .mis-bar) { margin-bottom: 0; }
  :root[data-prod="mis"] #main > .mis-sub ~ .mis-bar { margin: 0 -32px 16px; padding: 6px 32px 5px; min-height: 44px; box-sizing: border-box; background: var(--surface); border-bottom: 1px solid var(--line); }
  :root[data-prod="mis"] #main > .mis-sub ~ .mis-bar:not(.mis-sticky) select { width: auto; min-width: 0; height: 32px; min-height: 32px; padding: 0 4px 0 8px; font-size: .85rem; border-radius: 8px; flex: none; }
}

/* ── control bar pieces new in review 2 ── */
/* Trial balance: Find a ledger next to the year */
:root[data-prod="mis"] #main .mis-bar .mc-find { display: flex; flex: 0 1 280px; min-width: 0; }
:root[data-prod="mis"] #main .mis-bar .mc-find .scr-find { flex: 1 1 auto; min-width: 0; margin: 0; }
:root[data-prod="mis"] #main .mis-bar .mc-find input { width: 100%; min-width: 0; }
@media (min-width: 900px) { :root[data-prod="mis"] #main .mis-bar .mc-find input { height: 32px; min-height: 32px; font-size: .86rem; border-radius: 8px; } }
/* the open findings of a ledger after its name: a quiet link to Review */
:root[data-prod="mis"] #main .scr-tb .scr-fn { margin-left: 4px; font-size: .8rem; font-weight: 600; color: var(--mis-link, var(--brand)); text-decoration: none; white-space: nowrap; }
:root[data-prod="mis"] #main .scr-tb .scr-fn:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Review opened for one ledger */
:root[data-prod="mis"] #main .mis-rv-for { margin: 0 0 10px; color: var(--ink-2); }
/* Overview: no subtitle (UX review 2); Customise dashboard on the right of its row */
:root[data-prod="mis"] #main .mdash .md-top-bar { justify-content: flex-end; }
/* Fund flow: the rule's "i" in the table's corner cell */
:root[data-prod="mis"] #main #ffT thead th:first-child .mis-tip { margin-left: 4px; }
@media (max-width: 899px) {
  :root[data-prod="mis"] #main .mis-ctrl .mc-find { order: 1; flex: 2 1 160px; }
  :root[data-prod="mis"] #main .mis-ctrl #ffPer { order: 3; flex: 1 1 100%; display: flex; flex-wrap: nowrap; }
  :root[data-prod="mis"] #main .mis-ctrl #ffPer button { flex: 1 1 0; justify-content: center; }
}

/* ── MIS pack: title row, then Colours ▾ and Design on one row; Download PowerPoint (outline) and Download PDF pack
   (filled) the same height; the page ends below the sticky footer ── */
.mpk .mpk-look { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.mpk .mpk-look .mpk-opt { gap: 8px; }
.mpk .mpk-pick { position: relative; }
.mpk .mpk-pick-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; min-height: 36px; padding: 0 10px 0 12px; font-size: .88rem; font-weight: 500; border-radius: 9px; white-space: nowrap; }
.mpk .mpk-pick-btn .mpk-sw { margin-right: 0; }
.mpk .mpk-sw-slate { background: linear-gradient(90deg, #11333b 60%, #c58a1e 60%); } /* the board-pack palette had no swatch */
.mpk .mpk-car { font-size: 10px; color: var(--ink-3); }
.mpk .mpk-menu:not([hidden]) { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; display: flex; flex-direction: column; min-width: 220px; padding: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-up, 0 8px 24px rgba(14, 26, 58, .14)); }
.mpk .mpk-menu button { display: flex; align-items: center; gap: 0; justify-content: flex-start; width: 100%; min-height: 36px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ink); font-size: .88rem; font-weight: 500; box-shadow: none; transform: none; text-align: left; }
.mpk .mpk-menu button:is(:hover, :focus-visible) { background: var(--brand-soft); outline: 0; }
.mpk .mpk-menu button.on { font-weight: 700; }
.mpk .mpk-menu button.on::after { content: '✓'; margin-left: auto; padding-left: 12px; color: var(--mis-head-ink, var(--ink)); }
.mpk .mpk-look .seg button { min-height: 30px; height: 30px; padding: 0 12px; }
.mpk .mpk-opt .seg button { min-height: 32px; }
.mpk .mpk-head .mpk-btns button { height: 36px; min-height: 36px; }
.mpk .mpk-foot button { height: 44px; min-height: 44px; }
.mpk .mpk-foot button.mpk-ppt, .mpk .mpk-foot button.mpk-ppt:hover { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.mpk { padding-bottom: 12px; }
html:has(#main .mpk-foot) { scroll-padding-bottom: 84px; } /* a box reached with Tab never hides under the footer */
@media (max-width: 640px) {
  .mpk .mpk-look { gap: 10px; }
  .mpk .mpk-look .mpk-opt { flex: 1 1 100%; }
  .mpk .mpk-look .mpk-pick { flex: 1 1 auto; }
  .mpk .mpk-pick-btn { width: 100%; justify-content: flex-start; height: 40px; }
  .mpk .mpk-pick-btn .mpk-car { margin-left: auto; }
  .mpk .mpk-menu:not([hidden]) { left: 0; right: 0; min-width: 0; }
  .mpk .mpk-look .seg { flex: 1 1 auto; flex-wrap: nowrap; }
  .mpk .mpk-look .seg button { flex: 1 1 0; height: 36px; padding: 0 6px; white-space: nowrap; }
  html:has(#main .mpk-foot) { scroll-padding-bottom: 0; }
}

/* ── Mapping: year, P&L | Balance sheet, search, Show changed only and the helpers on one row; rows about 44 px ── */
:root[data-prod="mis"] #main .map-bar > select { width: auto; min-width: 0; flex: none; height: 40px; min-height: 40px; }
:root[data-prod="mis"] #main .map-bar #mapQ { flex: 1 1 140px; } /* the row fits at 1366 px with Change format at its end */
:root[data-prod="mis"] #main .map-bar .seg button { min-height: 34px; height: 34px; padding: 0 12px; }
:root[data-prod="mis"] #main .map-bar .map-chg { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .86rem; color: var(--ink-2); white-space: nowrap; min-height: 40px; }
:root[data-prod="mis"] #main .map-bar .mis-fmt { font-size: .84rem; font-weight: 600; color: var(--mis-link, var(--brand)); white-space: nowrap; }
:root[data-prod="mis"] #main #mapForm .tbl td { padding-top: 4px; padding-bottom: 4px; vertical-align: middle; line-height: 1.25; }
:root[data-prod="mis"] #main #mapForm .tbl td small { line-height: 1.2; }
:root[data-prod="mis"] #main #mapForm .tbl td :is(select, input) { height: 34px; min-height: 34px; padding-top: 0; padding-bottom: 0; font-size: .88rem; }
@media (max-width: 640px) {
  :root[data-prod="mis"] #main .map-bar > select { flex: 1 1 120px; }
  :root[data-prod="mis"] #main .map-bar .seg { flex: 1 1 auto; flex-wrap: nowrap; }
  :root[data-prod="mis"] #main .map-bar .seg button { flex: 1 1 0; justify-content: center; }
}

/* ── mis-ux-r3.css ── */
/* ══ MIS – phone report controls, header product switch, phone Overview (UX review 2, 7 Nov 2026, R3) ══════════════
   Phone (up to 640 px) report pages: one row – "FY 26-27 · Apr–Oct · ₹ lakh ▾" opens a bottom sheet holding the year,
   From – to, Books | Books + provisional, Months | vs last year and the units (the same controls, moved, not copied);
   Notes and Export sit beside it as icon buttons. Wider screens: #misSet is display: contents, so the controls stay in
   the bar exactly as before. Markup: mis.js viewClient() ctrl. */

/* the button, the sheet's head and its scrim exist only for the phone */
:root[data-prod="mis"] #main .mis-set { display: contents; }
:root[data-prod="mis"] #main :is(.mis-set-btn, .ms-head, .ms-scrim) { display: none; }

/* MIS: the product switch is in the avatar menu – no empty slot for the old tile */
.topbar #prodPill:empty { display: none; }

/* tablet (641–899 px): the laptop's pieces at their own width, wrapping into two rows – no full-width rows of one switch */
@media (min-width: 641px) and (max-width: 899px) {
  :root[data-prod="mis"] #main .mis-bar.mis-sticky { gap: 8px; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky :is(#misFy, .mc-unit, .mis-range, .mis-prov, #misLy, #misNotes, .mis-exp) { order: 0; flex: none; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .mc-unit select { width: auto; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .mis-range select { flex: none; width: auto; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky :is(select, #misNotes, .mis-exp > button) { min-height: 38px; height: 38px; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky :is(#misNotes, .mis-exp > button) { width: auto; padding: 0 12px; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .seg button { min-height: 32px; padding: 0 12px; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .mis-exp { margin-left: auto; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky:has(#misNotes) #misNotes { margin-left: auto; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky:has(#misNotes) .mis-exp { margin-left: 0; }
}

@media (max-width: 640px) {
  /* report pages: less air above the numbers – the first P&L figure sits above 300 px on a 390 × 844 phone */
  :root[data-prod="mis"] #main:has(> .mis-bar.mis-sticky) { padding-top: 8px; }
  :root[data-prod="mis"] #main:has(> .mis-bar.mis-sticky) .mis-tabsel { margin-bottom: 8px; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky { flex-wrap: nowrap; gap: 8px; margin-bottom: 10px; }
  /* the table's top edge: MIS | Schedule III (or Schedule III | Tally groups), Hide zero rows and the format in one row
     where they fit (they wrap, never overlap, when a longer name does not) */
  :root[data-prod="mis"] #main :is(.pl3-opts.mis-cap, .bs-opts) { flex-wrap: wrap; gap: 6px 8px; padding: 6px 8px; }
  :root[data-prod="mis"] #main :is(.pl3-opts.mis-cap, .bs-opts) .seg { flex: none; display: flex; }
  :root[data-prod="mis"] #main :is(.pl3-opts.mis-cap, .bs-opts) .seg button { flex: none; min-height: 28px; padding: 0 7px; font-size: .78rem; }
  :root[data-prod="mis"] #main :is(.pl3-opts.mis-cap, .bs-opts) :is(.check, .mis-fmt) { font-size: .78rem; gap: 5px; white-space: nowrap; }
  :root[data-prod="mis"] #main .table-wrap.mis-sheet::before { padding: 4px 12px; }
  :root[data-prod="mis"] #main .mis-sheet > table > thead th { padding-top: 8px; padding-bottom: 8px; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .mis-set-btn {
    display: flex; align-items: center; gap: 8px; order: 0; flex: 1 1 auto; min-width: 0; min-height: 40px; margin: 0; padding: 4px 12px;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: none; transform: none;
    color: var(--mis-head-ink, var(--ink)); font: 600 .9rem/1.2 var(--font, inherit); text-align: left; cursor: pointer;
  }
  :root[data-prod="mis"] #main .mis-set-btn .ms-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
  :root[data-prod="mis"] #main .mis-set-btn :is(.ms-sum, .ms-sub) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  :root[data-prod="mis"] #main .mis-set-btn .ms-sub { font-size: .74rem; font-weight: 500; color: var(--mis-link, var(--brand)); }
  :root[data-prod="mis"] #main .mis-set-btn .mc-car { flex: none; font-size: 10px; color: var(--ink-3); }
  :root[data-prod="mis"] #main .mis-set-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

  /* the sheet: closed = not shown; open = fixed to the bottom over a scrim, above the bottom menu, under modals */
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .mis-set { display: none; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky.ms-on .mis-set {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
    max-height: 85vh; overflow-y: auto; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); box-sizing: border-box;
    background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 28px rgba(14, 26, 58, .18); animation: up .18s ease-out;
  }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky.ms-on .ms-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(10, 16, 28, .45); }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .ms-head { display: flex; order: 0; flex: 1 1 100%; align-items: center; justify-content: space-between; gap: 12px; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .ms-head b { font-size: 1rem; color: var(--ink); }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .ms-head button { min-height: 40px; padding: 0 16px; }

  /* Notes and Export: 40 px icon buttons (the words stay as their names for screen readers) */
  :root[data-prod="mis"] #main .mis-bar.mis-sticky #misNotes { order: 5; flex: none; position: relative; width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; margin: 0; justify-content: center; font-size: 0; gap: 0; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky #misNotes :is(svg, .ic) { width: 18px; height: 18px; margin: 0; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky #misNotes .mis-note-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: 11px; line-height: 18px; text-align: center; background: var(--mis-head-ink, var(--brand)); color: #fff; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .mis-exp { order: 6; flex: none; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .mis-exp > button { width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; gap: 0; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .mis-exp > button :is(.mc-lbl, .mc-car) { display: none; }
  :root[data-prod="mis"] #main .mis-bar.mis-sticky .mis-exp > button .ic { width: 18px; height: 18px; margin: 0; }

  /* Overview: the laptop's headline cards for the same period, one under the other, hairlines between them */
  :root[data-prod="mis"] #main .mdash .md-tiles { display: grid; grid-template-columns: 1fr; gap: 0; margin-bottom: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 12px); overflow: hidden; }
  :root[data-prod="mis"] #main .mdash .md-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 1px; align-items: center; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  :root[data-prod="mis"] #main .mdash .md-tile:last-child { border-bottom: 0; }
  :root[data-prod="mis"] #main .mdash .md-tile .md-tl { grid-column: 1; grid-row: 1; }
  :root[data-prod="mis"] #main .mdash .md-tile > small { grid-column: 1; grid-row: 2; }
  :root[data-prod="mis"] #main .mdash .md-tile > b { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-size: 1.2rem; white-space: nowrap; }
  :root[data-prod="mis"] #main .mdash .md-tile > b.md-word { font-size: 1rem; }
}

/* phone: the P&L caption stays one row – the format link lives on the Mapping bar there (9 Nov 2026) */
@media (max-width: 640px) { #main .pl3-opts .mis-fmt { display: none; } }

/* ── payflow-theme.css ── */
/* ══ PayFlow – new look (30 Oct 2026) ══════════════════════════════════════════════════════════════════
   Same family as the new MIS look the owner approved: navy greeting band, white cards with soft shadows,
   mint marks. PayFlow keeps blue as its lead colour (buttons, links); mint is only for marks
   (selected menu item, success chips, progress, highlights). Colours from the Zentra logo:
   navy #0B2A7A · ink #0E1A3A · blue #1A5FE0 · mint #11B79C / #1FD0AE · mint soft #E3F7F2.
   All text pairs below meet WCAG AA (4.5:1; 3:1 for the large greeting). Scoped to PayFlow only. */
:root.zen[data-prod="payments"] {
  --pf-navy: #0b2a7a; --pf-ink: #0e1a3a; --mint: #1fd0ae; --mint-2: #11b79c; --mint-soft: #e3f7f2; --mint-ink: #0a7563;
  --brand: #1a5fe0; --brand-soft: #eaf1fe; --brand-ink: #ffffff;
  --pf-grad: linear-gradient(135deg, #1a5fe0, #0f6bb0); /* white text ≥ 5.5:1 on both ends */
  --pf-hero: radial-gradient(90% 120% at 100% 100%, rgba(31, 208, 174, .30), transparent 55%), linear-gradient(120deg, #0e1a3a 0%, #0b2a7a 52%, #1650c8 100%);
  --bg: #f3f6fb; --surface: #ffffff; --surface-2: #f7f9fd; --line: #e5e9f2; --line-2: #d3d9e6;
  --ink: #0e1a3a; --ink-2: #45506e; --ink-3: #646f8b; /* was #8590ab – too light for small text */
  --ok: #0a7563; --ok-soft: #e3f7f2; --warn: #8a5a00; --warn-soft: #fff4df; --bad: #c4262e; --bad-soft: #fdecec;
  --violet: #1a5fe0; --violet-soft: #eaf1fe; --grey-soft: #eef1f7; --teal: #11b79c;
  --k-back: #c2780a; --k-appr: #1a5fe0; --k-pay: #1fd0ae;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(14, 26, 58, .04), 0 6px 20px rgba(14, 26, 58, .06);
  --shadow-up: 0 2px 6px rgba(14, 26, 58, .06), 0 14px 32px rgba(14, 26, 58, .11);
}
@media (prefers-color-scheme: dark) {
  :root.zen[data-prod="payments"] {
    --pf-navy: #e8eefb; --mint-soft: #0f2f30; --mint-ink: #5be3c6;
    --brand: #5ea0ff; --brand-soft: #15284d; --brand-ink: #06122b;
    --pf-grad: linear-gradient(135deg, #5ea0ff, #4fb3ff); /* dark text on light blue */
    --pf-hero: radial-gradient(90% 120% at 100% 100%, rgba(31, 208, 174, .22), transparent 55%), linear-gradient(120deg, #091228 0%, #0b2466 52%, #1446ae 100%);
    --bg: #0a1326; --surface: #101c34; --surface-2: #15223e; --line: #203052; --line-2: #2c3e66;
    --ink: #e8eefb; --ink-2: #b0bcd8; --ink-3: #8e9ab9;
    --ok: #34d1b4; --ok-soft: #0e2f2c; --warn: #f2b155; --warn-soft: #33260f; --bad: #ff8a80; --bad-soft: #3a1714;
    --violet: #5ea0ff; --violet-soft: #15284d; --grey-soft: #18264a; --teal: #34d1b4;
    --k-back: #f2b155; --k-appr: #5ea0ff; --k-pay: #1fd0ae;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 6px 20px rgba(0, 0, 0, .28);
    --shadow-up: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 14px 32px rgba(0, 0, 0, .4);
  }
}

/* ── menu: selected item = mint soft + mint bar (as in the MIS sample) ── */
:root.zen[data-prod="payments"] .nav.sidebar a { color: var(--ink-2); }
:root.zen[data-prod="payments"] .nav.sidebar a.active { background: var(--mint-soft); color: var(--pf-navy); font-weight: 700; box-shadow: inset 3px 0 0 var(--mint); }
:root.zen[data-prod="payments"] .nav.sidebar a.active::before { display: none; }
:root.zen[data-prod="payments"] .nav.sidebar a.active .ic { color: var(--mint-ink); }
:root.zen[data-prod="payments"] .bottombar a.active { color: var(--brand); }
:root.zen[data-prod="payments"] .bottombar a.active::before { content: ''; position: absolute; top: 0; left: 50%; width: 28px; margin-left: -14px; height: 3px; border-radius: 0 0 3px 3px; background: var(--mint); }
:root.zen[data-prod="payments"] .avatar { background: var(--mint-soft); color: var(--pf-navy); }

/* ── buttons and filters: blue lead ── */
:root.zen[data-prod="payments"] .primary { background: var(--pf-grad); color: var(--brand-ink); border-color: transparent; box-shadow: 0 4px 12px color-mix(in srgb, #1a5fe0 26%, transparent); }
:root.zen[data-prod="payments"] .chips button.on, :root.zen[data-prod="payments"] .ftiles button.on { background: var(--pf-grad); color: var(--brand-ink); border-color: transparent; }
:root.zen[data-prod="payments"] .pl-types button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
:root.zen[data-prod="payments"] .chips button, :root.zen[data-prod="payments"] .ftiles button { border-color: var(--line); background: var(--surface); }
:root.zen[data-prod="payments"] .back { border-radius: 12px; border-color: var(--line); box-shadow: var(--shadow); }

/* ── cards: white, soft shadow, 16 px; request cards 14 px ── */
:root.zen[data-prod="payments"] .card, :root.zen[data-prod="payments"] .table-wrap.card, :root.zen[data-prod="payments"] .paycard, :root.zen[data-prod="payments"] .qrows, :root.zen[data-prod="payments"] .tile { background: var(--surface); border-color: transparent; border-radius: 16px; box-shadow: var(--shadow); }
:root.zen[data-prod="payments"] .card.req { border-radius: 14px; }
:root.zen[data-prod="payments"] :is(a.card, .req, .paycard):hover { box-shadow: var(--shadow-up); border-color: transparent; }
:root.zen[data-prod="payments"] .req .amt { color: var(--ink); }
:root.zen[data-prod="payments"] .notice.ok, :root.zen[data-prod="payments"] .card.notice.ok { background: var(--mint-soft); color: var(--mint-ink); box-shadow: inset 3px 0 0 var(--mint); }
:root.zen[data-prod="payments"] .tbl th { background: var(--surface-2); color: var(--ink-3); font-weight: 700; }
:root.zen[data-prod="payments"] .search input { border-color: var(--line); background: var(--surface); }

/* ── chips: one shape everywhere; status chips get a small dot ── */
:root.zen[data-prod="payments"] .chip { padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; line-height: 1.5; }
:root.zen[data-prod="payments"] .chip[class*="st-"]::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
:root.zen[data-prod="payments"] .chip.st-paid::before { background: var(--mint-2); }
:root.zen[data-prod="payments"] .st-paid, :root.zen[data-prod="payments"] .chip.ok { background: var(--mint-soft); color: var(--mint-ink); }
:root.zen[data-prod="payments"] .st-approved, :root.zen[data-prod="payments"] .st-part_paid { background: var(--brand-soft); color: var(--brand); }
:root.zen[data-prod="payments"] .st-sent_back { outline: 0; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }

/* ── marks in mint: progress, finished steps, round + button ── */
:root.zen[data-prod="payments"] .prog > i { background: linear-gradient(90deg, var(--mint-2), var(--mint)); }
:root.zen[data-prod="payments"] .ts-done i { background: var(--mint-2); border-color: var(--mint-2); }
:root.zen[data-prod="payments"] .ts-done::before { background: var(--mint-2) !important; }
:root.zen[data-prod="payments"] .fab { background: linear-gradient(135deg, #1a5fe0, #11b79c); color: #fff; }

/* ── Request payment: coloured icon squares (like the MIS figure cards) ── */
:root.zen[data-prod="payments"] .paycard { border: 0; position: relative; overflow: hidden; }
:root.zen[data-prod="payments"] .paycard .pc-i { background: var(--pc, #1a5fe0); color: #fff; border-radius: 12px; }
:root.zen[data-prod="payments"] .paycard:nth-child(3n+2) { --pc: #0d8a78; }
:root.zen[data-prod="payments"] .paycard:nth-child(3n) { --pc: #0b2a7a; }
@media (prefers-color-scheme: dark) { :root.zen[data-prod="payments"] .paycard:nth-child(3n) { --pc: #3b5bb8; } }
:root.zen[data-prod="payments"] .paycard::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--pc, #1a5fe0); }
:root.zen[data-prod="payments"] .pline, :root.zen[data-prod="payments"] .pchip { border-radius: 14px; }

/* ── Dashboard: figure cards with a coloured bottom line ── */
:root.zen[data-prod="payments"] .tile, :root.zen[data-prod="payments"] .tile:is(.amber, .blue, .red, .violet, .green) { border: 0; }
:root.zen[data-prod="payments"] .tile::after { top: auto; right: 0; bottom: 0; width: auto; height: 3px; }
:root.zen[data-prod="payments"] .tile.green { --tile-c: var(--mint); }
:root.zen[data-prod="payments"] .tile:not(.amber, .blue, .red, .violet, .green) { --tile-c: var(--line-2); }
:root.zen[data-prod="payments"] .tile span { color: var(--ink-3); font-weight: 600; }

/* ── My work: greeting band ── */
:root.zen[data-prod="payments"] .mywork.pf-home { max-width: none; }
.pf-hero { position: relative; margin: -20px -16px 0; padding: 18px 16px 64px; background: var(--pf-hero); color: #fff; border-radius: 0 0 24px 24px; }
.pf-hero .pf-day { display: block; color: #9fd8e8; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.pf-hero h1 { margin: 4px 0 2px; color: #fff; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.pf-hero h1 span { color: #1fd0ae; }
.mywork .pf-hero .hello-role { margin: 0; color: #d6e2f7; font-size: 13.5px; font-weight: 500; }
.pf-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pf-cnt { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.pf-cnt:is(.back, .appr)::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #f5b544; }
.pf-cnt.appr::before { background: #8ab8ff; }
.pf-cnt.pay { background: rgba(31, 208, 174, .18); border-color: rgba(31, 208, 174, .5); color: #bdf5e8; }
.pf-cnt.st { color: #e4ecfa; font-weight: 500; }
.pf-body { position: relative; margin-top: -44px; }
.pf-body > :first-child { margin-top: 0; }
/* the lists that need action: white card, coloured top line and a small sign per kind */
.pf-body .attn { position: relative; overflow: hidden; padding-top: 18px; --k: var(--brand); }
.pf-body .attn.k-back { --k: var(--k-back, #c2780a); } .pf-body .attn.k-appr { --k: var(--k-appr, #1a5fe0); } .pf-body .attn.k-pay { --k: var(--k-pay, #1fd0ae); }
.pf-body .attn::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--k); }
.pf-body .attn-h { gap: 10px; margin-bottom: 12px; }
.pf-body .attn-h b { font-size: 15px; letter-spacing: -.01em; }
.pf-body .attn-h::before { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--k); color: #fff; font: 800 14px/1 var(--font); }
.pf-body .attn.k-back .attn-h::before { content: '↩'; }
.pf-body .attn.k-appr .attn-h::before { content: '✓'; }
.pf-body .attn.k-pay .attn-h::before { content: '₹'; color: #0e1a3a; }
@media (prefers-color-scheme: dark) { .pf-body .attn:is(.k-back, .k-appr) .attn-h::before { color: #06122b; } }
.pf-body .attn .attn-h .chip { background: var(--grey-soft); color: var(--ink-2); }
.pf-body .attn .chip.warn { background: var(--warn-soft); color: var(--warn); }
.pf-body .attn .attn-h .chip::before { display: none; }
.pf-body .attn .req, .pf-body .attn .listcard { box-shadow: none; border: 1px solid var(--line); border-radius: 14px; }
.pf-body .attn .req:hover { box-shadow: var(--shadow-up); border-color: var(--line); }
.pf-body .qrows { margin-top: 14px; }
.pf-body .qrow:hover { background: var(--surface-2); }
@media (min-width: 900px) {
  .pf-hero { margin: -28px -32px 0; padding: 28px 32px 76px; border-radius: 0 0 28px 28px; }
  .pf-hero h1 { font-size: 30px; }
  .pf-body { margin-top: -50px; }
  .pf-body .attn .cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
}

/* ── payroll-kyc.css ── */
/* Payroll → Employee details (web/src/emp-details.js). Everything is under .kq so nothing else changes. */
.kq { --kq-r: 14px; }
#main.enter > .kq { animation-name: fade; } /* no transform while it plays – it would pin the bottom bar to the page */
.kq-narrow { max-width: 560px; margin: 0 auto; }
.kq-wide { max-width: 1240px; }
.kq .card { border-radius: var(--kq-r); }
.kq h3 { font-size: 1rem; }

/* page head: back arrow + title */
.kq-head { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
.kq-head h1 { font-size: 1.6rem; line-height: 1.2; overflow-wrap: anywhere; }
.kq-head p { margin: 4px 0 0; }
.kq-back { font-size: 2rem; line-height: 1.05; font-weight: 600; color: var(--brand); padding: 0 6px 0 0; text-decoration: none; }
.kq-acts { display: flex; gap: 10px; flex: none; }
.kq-acts > * { min-width: 120px; }

/* phone bottom bar: equal buttons, above the app's bottom menu */
.kq-bar { margin-top: 18px; }
.kq-bar-in { display: grid; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); gap: 12px; }
.kq-bar-in > .btn, .kq-bar-in > button { min-height: 50px; font-size: 1rem; width: 100%; }
.kq-bar .btn.off { pointer-events: none; opacity: .5; }
.kq-bar-note { margin: 8px 0 0; text-align: center; color: var(--ink-3); font-size: .86rem; }
@media (max-width: 720px) {
  body.kq-on #main { padding-bottom: 150px; }
  body.kq-on .powered { display: none; }
  .kq-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); z-index: 15; margin: 0; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(27, 31, 59, .06); }
  .kq-head h1 { font-size: 1.5rem; }
  .kq-desk { display: none !important; }
  body.kq-on:has(.kq-bar) #toasts { bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom) + 92px); } /* above the action bar */
  body.kq-on:has(.kq-bar-note:not(:empty)) #toasts { bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom) + 118px); }
}
@media (min-width: 721px) { .kq-mob { display: none !important; } .kq-narrow .kq-bar-in { max-width: 560px; margin-left: auto; } }

/* alerts */
.kq-alert { border-radius: var(--kq-r); padding: 12px 14px; margin: 0 0 14px; border: 1px solid transparent; line-height: 1.5; }
.kq-alert small { display: block; color: var(--ink-3); margin-top: 4px; }
.kq-alert.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.kq-alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.kq-alert.info { background: var(--brand-soft); }
.kq-alert p { margin: 0 0 10px; }
.kq-alert select { background: var(--surface); }
.kq-bad { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.kq-alert .kq-bad { color: var(--bad); }

/* label / value rows */
.kq-kv { margin: 0; }
.kq-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kq-kv > div:last-child { border-bottom: 0; }
.kq-kv dt { color: var(--ink-2); flex: none; }
.kq-kv dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.kq-kv dd b { font-weight: 700; }
.kq-kv dd small { display: block; font-size: .84rem; }
.kq-kv dd .link { margin-left: 6px; }
.kq-edit { display: flex; gap: 8px; align-items: center; }
.kq-edit input { min-width: 0; }

/* steps: five segments with names */
.kq-steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 16px; padding: 0; }
.kq-steps li { text-align: center; font-size: .78rem; line-height: 1.25; color: var(--ink-3); }
.kq-steps i { display: block; height: 5px; border-radius: 99px; background: var(--line); margin-bottom: 6px; }
.kq-steps li.done i { background: var(--ok); }
.kq-steps li.on i { background: var(--brand); }
.kq-steps li.on { color: var(--brand); font-weight: 700; }

/* camera frame */
.kq-cam { background: #0f141f; color: #fff; border-radius: 18px; padding: 16px 20px 18px; text-align: center; }
.kq-cam b { color: #c3c9d6; font-weight: 600; }
.kq-cam p { margin: 12px 0 0; }
.kq-frame { margin: 12px auto 0; aspect-ratio: 1.58; border: 3px solid #fff; border-radius: 16px; background: #161d2e; display: grid; place-content: center; gap: 8px; color: #c3c9d6; }
.kq-cam.face .kq-frame { aspect-ratio: .8; max-width: 70%; border-radius: 45%; }
.kq-frame .spinner { margin: 0 auto; }

/* photos */
.kq-ph, .kq-img { display: block; width: 100%; border-radius: 12px; }
.kq-ph { aspect-ratio: 1.6; display: grid; place-items: center; color: var(--ink-3); font-size: .86rem; background: repeating-linear-gradient(135deg, var(--grey-soft) 0 12px, color-mix(in srgb, var(--grey-soft) 60%, var(--surface)) 12px 24px); }
.kq-img { object-fit: cover; aspect-ratio: 1.6; background: var(--grey-soft); }
.kq-shot { margin: 0 0 6px; }
.kq-shot .kq-img { object-fit: contain; max-height: 320px; }
.kq-res h3 { margin-bottom: 12px; }
.kq-res .kq-shot .kq-img, .kq-res .kq-shot .kq-ph { aspect-ratio: auto; height: 170px; max-height: 170px; object-fit: contain; }

/* review: thumbnails */
.kq-rev h3 { margin-bottom: 12px; }
.kq-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.kq-th { display: block; width: 100%; position: relative; padding: 0; border: 0; background: none; min-height: 0; text-align: center; font-weight: 500; color: var(--ink-2); }
.kq-th .kq-ph, .kq-th .kq-img { aspect-ratio: .8; font-size: 0; border-radius: 10px; }
.kq-th i { position: absolute; right: 4px; top: calc(100% - 46px); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .72rem; font-weight: 700; color: #fff; }
.kq-th i.ok { background: var(--ok); } .kq-th i.bad { background: var(--bad); }
.kq-th span { display: block; font-size: .78rem; margin-top: 4px; }
.kq-more { display: grid; gap: 4px; margin-top: 14px; }
/* Check and approve: each item that stops Approve, with its box (or Take photo) right under the heading */
.kq-fixes { display: grid; gap: 12px; margin: 10px 0 16px; }
.kq-fixes .field { margin: 0; }
.kq-fixes .field small { display: block; margin: -2px 0 6px; font-size: .84rem; }
.kq-fixrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.kq-fixrow > button { flex: none; min-width: 112px; }
.kq-again.link { color: var(--bad); font-weight: 700; padding: 0; margin: 0; }
.kq-more .field { margin: 0; }
.kq-why select { width: 100%; }

/* SPOC home */
.kq-ring { display: flex; align-items: center; gap: 18px; position: relative; margin-bottom: 14px; }
.kq-ring svg { width: 92px; height: 92px; flex: none; transform: rotate(-90deg); }
.kq-ring circle { fill: none; stroke-width: 10; }
.kq-ring .bg { stroke: var(--line); } .kq-ring .fg { stroke: var(--ok); stroke-linecap: round; }
.kq-pct { position: absolute; left: 16px; width: 92px; text-align: center; font-size: 1.15rem; }
.kq-ring h2 { margin: 0; color: var(--ink); font-size: 1.25rem; }
.kq-ring p { margin: 2px 0 0; }
.kq-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.kq-cnt { display: grid; grid-template-columns: 1fr auto; color: var(--ink); text-decoration: none; }
.kq-cnt span { font-size: 1rem; } .kq-cnt b { font-size: 1.9rem; line-height: 1.2; grid-row: 2; } .kq-cnt i { color: var(--brand); font-style: normal; font-size: 1.4rem; grid-row: 1; grid-column: 2; line-height: 1; }
.kq-cnt.bad { background: var(--bad-soft); } .kq-cnt.bad b { color: var(--bad); }
.kq-fix-h { color: var(--bad); margin: 6px 0 10px; }
.kq-sec-h { margin: 6px 0 10px; }
.kq-rows + .kq-sec-h, .kq-rows + .kq-fix-h { margin-top: 20px; }
.kq-rows { display: grid; gap: 10px; }
.kq-row { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; padding: 14px 16px; }
.kq-row b { display: block; font-weight: 500; font-size: 1.02rem; }
.kq-row small { color: var(--ink-3); font-size: .9rem; }
.kq-row > i { color: var(--brand); font-style: normal; font-size: 1.5rem; line-height: 1; }
.kq-all { text-align: center; margin: 16px 0 0; }
.kq-none { text-align: center; padding: 18px 0; }

/* filters */
.kq-filt { display: flex; gap: 10px; align-items: end; margin-bottom: 12px; }
.kq-filt .field { margin: 0; }
.kq-filt select { width: auto; min-width: 140px; }
.kq-filt.three .kq-q { flex: 1 1 260px; }
@media (max-width: 720px) {
  .kq-filt .grow { flex: 1 1 0; min-width: 0; }
  .kq-filt:not(.three) select { min-width: 0; width: 128px; }
  .kq-filt.three { flex-wrap: wrap; }
  .kq-filt.three .kq-q { flex-basis: 100%; }
  .kq-filt.three .field:not(.kq-q) { flex: 1 1 0; min-width: 0; }
  .kq-filt.three select { width: 100%; min-width: 0; }
}
.kq-selbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--brand-soft); position: sticky; top: calc(var(--top-h) + 8px); z-index: 4; }
.kq-ck { width: 34px; }
.kq-ck input { width: 18px; height: 18px; }

/* dashboard (k1) */
.kq-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kq-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--kq-r); padding: 14px 16px; color: var(--ink); text-decoration: none; display: grid; gap: 2px; box-shadow: var(--shadow); }
.kq-tile span { font-size: .95rem; } .kq-tile b { font-size: 1.7rem; line-height: 1.2; }
.kq-tile.ok b { color: var(--ok); } .kq-tile.bad b { color: var(--bad); }
.kq-tile:hover { border-color: var(--line-2); }
@media (max-width: 720px) { .kq-tiles { grid-template-columns: 1fr 1fr; } .kq-tiles .all { grid-column: 1 / -1; } .kq-acts { width: 100%; } .kq-acts > * { flex: 1 1 0; min-width: 0; } }
.kq-tcard { padding: 0; margin-bottom: 14px; }
.kq-dash tfoot td { border-top: 2px solid var(--line-2); }
.kq-pill { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--bad-soft); color: var(--bad); font-weight: 600; font-size: .82rem; }
.kq-done { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.kq-done i { width: 110px; height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; display: block; }
.kq-done i b { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.kq-nospoc { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--ink); text-decoration: none; margin-bottom: 14px; border-left: 4px solid var(--warn); }
.kq-nospoc span { color: var(--brand); font-weight: 600; }
.kq-bank-h { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.kq-bank-h .btn { flex: none; }
.kq-cmp { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.kq-cmp > span { display: inline-flex; align-items: center; gap: 6px; }
.chip.kq-new { background: var(--brand-soft); color: var(--brand); }
.chip.kq-prog { background: var(--violet-soft); color: var(--violet); }
/* dashboard on a phone: one line per SPOC (name, bar, done %); tap opens the rest */
.kq-spl { padding: 2px 16px; margin-bottom: 14px; }
.kq-spr { border-bottom: 1px solid var(--line); }
.kq-spr:last-child { border-bottom: 0; }
.kq-spr summary, .kq-sptot { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.kq-spr summary { list-style: none; cursor: pointer; color: var(--ink); }
.kq-spr summary::-webkit-details-marker { display: none; }
.kq-spr summary::after { content: "›"; width: 14px; flex: none; text-align: center; color: var(--brand); font-size: 1.35rem; line-height: 1; transition: transform .15s; }
.kq-spr[open] summary::after { transform: rotate(90deg); }
.kq-sptot { padding-right: 24px; }
.kq-spn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.kq-spr .kq-done { flex: none; min-width: 118px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.kq-spr .kq-done i { width: 70px; }
.kq-spr .kq-kv > div { padding: 8px 0; }
.kq-spr > .btn { width: 100%; margin: 6px 0 14px; }
@media (max-width: 720px) { .kq-done i { width: 70px; } .kq-bank-h { flex-wrap: wrap; } .kq-bank-h .btn { width: 100%; } .kq-cmp { display: grid; grid-template-columns: 1fr 1fr; } }

/* verify (k4) */
.kq-cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
@media (max-width: 1000px) { .kq-cols { grid-template-columns: 1fr; } }
.kq-docs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kq-doc { display: grid; justify-content: stretch; justify-items: stretch; gap: 8px; padding: 12px; min-height: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; font-weight: 500; align-content: start; }
.kq-doc.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok-soft) 55%, var(--surface)); }
.kq-doc.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad-soft) 55%, var(--surface)); }
.kq-doc.wide { grid-column: 1 / -1; }
.kq-doc.wide .kq-img, .kq-doc.wide .kq-ph { aspect-ratio: 2.4; }
.kq-doc.wide .kq-img { object-fit: contain; }
.kq-det > div { align-items: center; }
.kq-det dt { flex: 0 0 172px; min-width: 0; }
.kq-det dd { text-align: left; flex: 1; }
.kq-det input { max-width: 260px; }
.kq-det .chip { margin-left: 4px; white-space: normal; }
.kq-ver .kq-alert { margin-top: 12px; }
@media (max-width: 720px) {
  .kq-det > div { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 0; }
  .kq-det dt { min-width: 0; font-size: .86rem; }
  .kq-det input { max-width: none; }
}

/* history */
.kq-hist { margin-top: 16px; }
.kq-tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.kq-tl li { position: relative; }
.kq-tl li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); border: 2px solid var(--surface); }
.kq-tl li.ok::before { background: var(--ok); } .kq-tl li.bad::before { background: var(--bad); }
.kq-tl small { color: var(--ink-3); }
.kq-chg { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; background: var(--grey-soft); border-radius: 6px; padding: 0 6px; overflow-wrap: anywhere; }
.kq-note { color: var(--ink-2); font-style: italic; }
.kq-sub { color: var(--ink-2); font-size: .9rem; margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.kq-links { display: block; margin-top: 4px; }
.kq-links .link { padding: 0; margin: 0; }

/* modals */
.kq-pick { display: grid; gap: 8px; }
.kq-pick button { justify-content: flex-start; }
.kq-2btn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kq-2btn.one { grid-template-columns: 1fr; }
.kq-wa-img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.kq-tk-h { display: block; margin: 12px 0 4px; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.kq-tks { display: grid; gap: 6px; }

/* WhatsApp report picture (drawn off screen, always light) */
.kq-wa { position: fixed; left: -10000px; top: 0; width: 640px; padding: 26px 28px 22px; background: #fff; color: #111; font: 15px/1.45 Arial, Helvetica, sans-serif; }
.kq-wa h2 { margin: 0; font-size: 21px; color: #111; }
.kq-wa > p { margin: 2px 0 12px; }
.kq-wa table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.kq-wa th, .kq-wa td { border: 1px solid #d9d9d9; padding: 7px 10px; text-align: left; }
.kq-wa th, .kq-wa tfoot td { background: #e2e2e2; font-weight: 700; }
.kq-wa .n { text-align: right; }
.kq-wa h3 { margin: 0 0 2px; font-size: 15px; }
.kq-wa h3 + p, .kq-wa p + p { margin: 0; }

/* more fields (14 Nov 2026): Personal / Work groups, Finance PF toggle, field settings */
.kq-more h3 { margin: 0 0 2px; }
.kq-more textarea, .kq-fixes textarea { width: 100%; resize: vertical; min-height: 64px; }
.kq-dh { margin: 18px 0 0; font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); text-transform: uppercase; }
.kq-yn { display: inline-grid; grid-template-columns: 1fr 1fr; flex-wrap: nowrap; }
.kq-yn label { justify-content: center; min-width: 72px; position: relative; }
.kq-yn input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.kq-yn label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }
.kq-yn label:has(input:disabled) { cursor: default; opacity: .7; }
.kq-finote { margin: 12px 0 0; }
.kq-finote:empty { display: none; }
/* field settings (Payroll Admin) */
.kq-fs { margin-top: 14px; }
.kq-fs > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.kq-fs > summary::-webkit-details-marker { display: none; }
.kq-fs > summary b { flex: 1 1 auto; }
.kq-fs > summary::after { content: "›"; width: 14px; flex: none; text-align: center; color: var(--brand); font-size: 1.35rem; line-height: 1; transition: transform .15s; }
.kq-fs[open] > summary::after { transform: rotate(90deg); }
.kq-fs-p { margin: 10px 0 4px; }
.kq-fsgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 28px; }
.kq-fsg { padding-top: 10px; }
.kq-fsh { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.kq-fsh span { font-size: .8rem; color: var(--ink-3); }
.kq-fsr { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; border-bottom: 1px solid var(--line); cursor: pointer; }
.kq-fsr > span { min-width: 0; overflow-wrap: anywhere; }
.kq-sw { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; margin: 0; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background-color .15s; }
.kq-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.kq-sw:checked { background: var(--brand); }
.kq-sw:checked::after { transform: translateX(18px); }
.kq-sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.kq-fs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.kq-fs-foot .primary { min-width: 180px; }
@media (max-width: 720px) { .kq-fs-foot { flex-direction: column; align-items: stretch; } .kq-fs-foot small { text-align: center; } }
.kq-fsr input.kq-sw { box-sizing: border-box; width: 44px; height: 26px; min-width: 44px; min-height: 0; max-width: 44px; padding: 0; border: 0; font-size: 0; }
/* UI review (14 Nov 2026): errors under the box, equal document labels, bank line 2, history "Show full history" */
.kq-ferr { display: block; color: var(--bad); font-size: .84rem; margin-top: 4px; }
.kq .field.bad input, .kq .field.bad textarea { border-color: var(--bad); }
.kq-doc > span { line-height: 1.3; min-height: calc(2 * 1.3em); }
.kq-bk { display: block; }
.kq-bk .nw { white-space: nowrap; }
.kq-hall { display: inline-block; margin-top: 12px; padding: 0; }
.kq-fs-last span { display: block; }
.kq-fs-last span + span { white-space: nowrap; }
/* Departments / Designations lists (Payroll Admin, in Field settings) */
.kq-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 28px; margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 4px; }
.kq-lst { padding-top: 10px; }
.kq-lsr { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); }
.kq-lsr > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.kq-lsa { display: inline-flex; gap: 16px; flex: none; }
.kq-lsa .link { padding: 0; margin: 0; }
.kq-lsnone { margin: 10px 0; }
.kq-lsadd { display: flex; align-items: end; gap: 10px; margin: 10px 0 6px; }
.kq-lsadd .field { flex: 1 1 auto; margin: 0; min-width: 0; }
.kq-lsadd button { flex: none; min-width: 0; min-height: 42px; }
@media (max-width: 720px) { .kq-lsadd { flex-direction: column; align-items: stretch; } .kq-lsadd button { width: 100%; } }
.kq-more select { width: 100%; }

/* ── Employee details: KYC master, Upload documents in bulk, where each value came from (18 Nov 2026) ── */
.kq-start { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.kq-start .grow { min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.kq-start .kq-2btn { flex: 0 1 460px; }
.kq-start .kq-2btn .btn { justify-content: center; text-align: center; }
.kq-dups { border-left: 4px solid var(--bad); margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.kq-dupr { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); padding: 6px 0; border-top: 1px solid var(--line); }
.kq-dept { border-left: 4px solid var(--warn); margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.kq-left { display: block; color: var(--warn-ink, #8a5300); font-size: 12.5px; margin-top: 3px; overflow-wrap: anywhere; }
.kq-mnote h3, .kq-sal h3 { margin: 0 0 8px; }
.kq-mnote dd, .kq-sal dd { overflow-wrap: anywhere; }
.kq-res2 { flex-direction: column; align-items: stretch; }
.kq-res2 .kq-2btn button, .kq-gross button { min-width: 0; }
.kq-gross { flex-direction: column; align-items: stretch; gap: 8px; }
.kq-gross .field { margin: 0; }
.kq-prov summary { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; cursor: pointer; }
.kq-prov table { margin-top: 8px; }
.kq-prov td { vertical-align: middle; overflow-wrap: anywhere; }
.kq-ptd { width: 76px; }
.kq-pth { display: inline-flex; width: 64px; height: 44px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--soft, #f3f5f9); padding: 0; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.kq-pth img, .kq-pth .kq-ph { width: 100%; height: 100%; object-fit: cover; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.kq-pth.none { border-style: dashed; }
.kq-zoom { overflow: auto; max-height: 70vh; border-radius: 8px; background: var(--soft, #f3f5f9); }
.kq-zoom img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.kq-zoom[data-z="4"] img { cursor: zoom-out; }
@media (max-width: 720px) {
  .kq-start .kq-2btn { flex: 1 1 100%; }
  .kq-prov table, .kq-prov tbody, .kq-prov tr, .kq-prov td { display: block; width: auto; }
  .kq-prov thead { display: none; }
  .kq-prov tr { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
  .kq-prov td { padding: 0; border: 0; }
  .kq-prov td.kq-ptd { grid-row: span 4; width: auto; }
}

/* bulk upload */
.kb-drop { border: 2px dashed var(--line); text-align: center; padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kb-drop.on { border-color: var(--brand); background: var(--soft, #f3f5f9); }
.kb-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 200px)); gap: 10px; justify-content: center; margin-top: 8px; }
.kb-picks .btn { justify-content: center; }
.kb-files .kb-picks { justify-content: start; }
.kb-work { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; }
.kb-files h3, .kb-sum h3 { margin: 0 0 8px; }
.kb-gl { display: flex; flex-direction: column; }
.kb-g { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.kb-g .grow { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.kb-est { margin: 10px 0 0; }
.kb-prog { margin: 14px 0; }
.kb-prog .kq-done i { width: 100%; max-width: 420px; }
.kb-sum { margin: 14px 0; }
.kb-cnt { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.kb-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; margin-top: 10px; }
.kb-tools .field { margin: 0; min-width: 180px; }
.kb-rep { align-items: flex-start; }
.kb-res { margin: 0 0 14px; }
.kb-t td { vertical-align: top; }
.kb-pg { display: flex; gap: 10px; align-items: flex-start; min-width: 200px; }
.kb-pg span { overflow-wrap: anywhere; font-size: 13px; }
.kb-th { flex: none; width: 64px; height: 84px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.kb-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.kb-rd, .kb-why { display: block; margin-top: 4px; font-size: 12.5px; overflow-wrap: anywhere; }
.kb-emp input, .kb-doc select { width: 100%; min-width: 0; }
.kb-emp { min-width: 210px; }
.kb-sug { font-weight: 600; }
.kb-acts { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.kb-st small { display: block; margin-top: 4px; }
.kb-more { text-align: center; }
@media (max-width: 720px) {
  .kb-tw { padding: 0; }
  .kb-t, .kb-t tbody, .kb-t tr, .kb-t td { display: block; width: auto; }
  .kb-t thead { display: none; }
  .kb-t tr { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 10px; padding: 12px; border-top: 1px solid var(--line); }
  .kb-t td { padding: 0; border: 0; min-width: 0; }
  .kb-t td.kb-pg { grid-column: 1 / -1; min-width: 0; }
  .kb-t td.kb-doc, .kb-t td.kb-emp, .kb-t td.kb-st, .kb-t td.kb-x { grid-column: 1 / -1; }
  .kb-emp { min-width: 0; }
  .kb-tools .field, .kb-tools .kb-rep { flex: 1 1 100%; }
}

/* KYC master import */
.km-pick { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.km-pick .grow { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.km-tiles .kq-tile { cursor: default; }
.km-left ul { margin: 6px 0; padding-left: 18px; }
.km-left, .km-new, .km-list { margin-bottom: 14px; }
.km-left h3, .km-new h3, .km-list h3 { margin: 0 0 6px; }
.km-newf { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 12px; }
.km-lh { display: flex; justify-content: space-between; align-items: end; gap: 10px; flex-wrap: wrap; }
.km-lh .field { margin: 0; min-width: 180px; }
.km-t td { vertical-align: top; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .km-pick .btn { width: 100%; justify-content: center; }
  .km-newf { grid-template-columns: 1fr; }
  .km-t, .km-t tbody, .km-t tr, .km-t td { display: block; width: auto; }
  .km-t thead { display: none; }
  .km-t tr { padding: 10px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; }
  .km-t td { padding: 0; border: 0; }
  .km-t td:nth-child(n+3) { grid-column: 1 / -1; }
  .km-lh .field { flex: 1 1 100%; }
}
.kq-newf { display: grid; gap: 12px; }
.kq-newf .field { margin: 0; }
.kq-newf select, .kq-newf input { width: 100%; }
.kq-row .chip.kq-new, td .chip.kq-new, h1 .chip.kq-new { margin-left: 6px; vertical-align: middle; font-size: 12px; }
/* three lists (Locations, Departments, Designations): one row of three, or one under the other – never two and one */
.kq-lists { grid-template-columns: 1fr; }
@media (min-width: 1000px) { .kq-lists { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* phone: the label of a detail row sits above its value – its desktop width must not become a height (found 18 Nov 2026) */
@media (max-width: 720px) { .kq-det > div > dt { flex: none; } }
/* bulk preview cards on the phone: the page beside its name; status and Skip on one line; Change under the name */
@media (max-width: 720px) {
  .kb-t tr { grid-template-columns: minmax(0, 1fr) auto; }
  .kb-t td.kb-pg { display: flex; gap: 10px; align-items: flex-start; }
  .kb-t td.kb-st { grid-column: 1 / 2; align-self: center; }
  .kb-t td.kb-x { grid-column: 2 / 3; align-self: center; text-align: right; }
}
.kb-emp > .link { display: block; margin-top: 4px; }
.kb-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.kb-bar b { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.kb-prog p { margin: 8px 0 0; }

/* ── UI review, 18 Nov 2026 ── */
/* Finance verify: Refer back · Approve in one bar at the bottom on every width (sticky on wide screens), equal, 44 px */
@media (min-width: 721px) {
  .kq-ver .kq-bar { position: sticky; bottom: 0; z-index: 6; margin: 18px -4px 0; padding: 12px 4px; background: var(--bg, #f6f7fb); border-top: 1px solid var(--line); }
  .kq-ver .kq-bar-in { max-width: 460px; margin-left: auto; }
}
.kq-ver .kq-bar-in > button { min-height: 44px; }
/* SPOC lists on the phone: Status full width under the search box */
@media (max-width: 720px) { .kq-narrow .kq-filt { flex-direction: column; align-items: stretch; } .kq-narrow .kq-filt > .field { width: 100%; flex: 1 1 auto; } .kq-narrow .kq-filt select { width: 100%; } }
/* thumbnails show the top of a scanned page, where the cards are */
.kq-pth img, .kq-doc img, .kq-th img, .kb-th img { object-position: top center; }
.kq-pcap { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; max-width: 120px; overflow-wrap: anywhere; }
.kq-ptd { width: 128px; }
/* the zoom opens fitted to the box */
.kq-zoom { display: flex; justify-content: center; }
.kq-zoom[data-z="1"] img { width: auto; max-width: 100%; max-height: 68vh; object-fit: contain; }
.kq-zoom:not([data-z="1"]) { display: block; }
/* bulk preview: Yes, <name> · Change · Skip – equal 44 px buttons */
.kb-btns { display: grid; gap: 8px; min-width: 130px; }
.kb-btns > button { min-height: 44px; white-space: normal; line-height: 1.2; padding: 6px 10px; }
@media (max-width: 720px) { .kb-btns { grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); min-width: 0; } .kb-t td.kb-x { grid-column: 1 / -1; } .kb-t td.kb-st { grid-column: 1 / -1; } }
/* KYC master rows: the name as the title, then "Line 5 · WH-107 → MF0027" */
.km-l2 { display: block; margin-top: 2px; }
@media (max-width: 720px) { .km-t tr { display: block; } .km-t td.km-none { display: none; } .km-t td:nth-child(2) { margin-top: 6px; } }
/* phone: "Yes, <name>" has the whole row (a name does not fit a third of 360 px); Change and Skip equal under it */
@media (max-width: 720px) { .kb-btns.three { grid-template-columns: 1fr 1fr; } .kb-btns.three > :first-child { grid-column: 1 / -1; } }
@media (max-width: 720px) { .km-t td { width: 100% !important; max-width: none !important; box-sizing: border-box; } .km-t td:nth-child(2) { display: block !important; } }
@media (max-width: 720px) { .km-t thead { display: none; } .km-t td:nth-child(2):not(.km-none)::before { content: 'To check'; display: block; font-size: 11.5px; color: var(--ink-3); } }

/* ── the SPOC's case screen (owner, 19 Nov 2026): documents, then one list – each row Edit · Approve · Not available ── */
.kq-dstrip h3, .kq-rlist h3 { margin: 0 0 8px; }
.kq-dts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kq-dt { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-width: 0; }
.kq-dt.ok { border-color: color-mix(in srgb, var(--ok, #12805c) 45%, transparent); }
.kq-dt.na { background: var(--surface-2, #f3f4f7); }
.kq-dth { display: flex; align-items: center; justify-content: center; height: 72px; border-radius: 6px; overflow: hidden; border: 0; padding: 0; background: var(--soft, #f3f5f9); color: var(--ink-3); font-size: 12px; }
.kq-dth img, .kq-dth .kq-ph { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.kq-dl { font-size: 13px; font-weight: 600; }
.kq-db { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.kq-db > button { min-height: 40px; padding: 4px 6px; white-space: normal; line-height: 1.15; }
.kq-rlist { padding: 4px 16px; }
.kq-r { padding: 12px 0; border-top: 1px solid var(--line); }
.kq-r:first-child { border-top: 0; }
.kq-r.ok .kq-rv { color: var(--ok, #12805c); }
.kq-r.na .kq-rl { opacity: .75; }
.kq-rh { display: flex; gap: 10px; align-items: flex-start; }
.kq-rl { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.kq-rl > small:first-child { color: var(--ink-3); font-size: 12.5px; }
.kq-rv { font-size: 15.5px; }
.kq-rs { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kq-rs.ok { color: var(--ok, #12805c); }
.kq-rth { flex: none; width: 56px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.kq-rth img, .kq-rth .kq-ph { width: 100%; height: 100%; object-fit: cover; object-position: top center; font-size: 10px; }
.kq-rb { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.kq-rb.two { grid-template-columns: 1fr 1fr; }
.kq-rb > button { min-height: 44px; padding: 4px 6px; white-space: normal; line-height: 1.15; }
.kq-rb > button[aria-pressed="true"][data-rok] { background: var(--ok, #12805c); border-color: var(--ok, #12805c); color: #fff; }
.kq-rb > button[aria-pressed="true"][data-rna] { background: var(--ink-3, #6b7280); border-color: var(--ink-3, #6b7280); color: #fff; }
.kq-redit { display: block; margin-top: 6px; }
.kq-redit input, .kq-redit select, .kq-redit textarea { width: 100%; }
.kq-na { color: var(--ink-3); font-weight: 600; }
@media (max-width: 720px) { .kq-dts { grid-template-columns: 1fr 1fr; } }
.kq-dts { grid-template-columns: 1fr 1fr; } .kq-dts > .kq-dt:last-child { grid-column: 1 / -1; } /* Employee photo: the whole row – no tile alone */
/* documents on the SPOC's case screen: one compact row of five (replaces the two-column tiles) */
.kq-dstrip { padding: 10px 12px; }
.kq-dts { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 6px; }
.kq-dts > .kq-dt { grid-column: auto !important; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-height: 44px; }
.kq-dt.ok { border-color: color-mix(in srgb, var(--ok, #12805c) 50%, transparent); }
.kq-dt.miss, .kq-dt.bad { border-style: dashed; border-color: var(--warn, #b45309); }
.kq-dt.na { background: var(--surface-2, #f3f4f7); }
.kq-dts .kq-dth { width: 100%; height: 40px; border-radius: 5px; font-size: 20px; color: var(--ink-3); }
.kq-dl { font-size: 11.5px; font-weight: 600; line-height: 1.1; }
.kq-dm { font-size: 11px; color: var(--ink-3); line-height: 1.1; }
.kq-dt.ok .kq-dm { color: var(--ok, #12805c); font-weight: 700; }
.kq-dt.miss .kq-dm, .kq-dt.bad .kq-dm { color: var(--warn, #b45309); font-weight: 700; }
.kq-dline { margin: 8px 0 0; color: var(--ink-2, #4b5563); }
.kq-dmenu > button { min-height: 44px; width: 100%; }
/* ── SPOC case screen, UI review (19 Nov 2026) ── */
.kq-rlist { margin-bottom: 12px; }
.kq-gh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 2px; }
.kq-gh h3 { margin: 0; font-size: 15px; }
.kq-gth { display: flex; gap: 6px; }
.kq-gth .kq-rth { width: 64px; height: 44px; }
.kq-r { padding: 10px 0; }
.kq-rb { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.kq-rb > button { font-size: 13px; padding: 2px 4px; white-space: nowrap; letter-spacing: 0; }
.kq-rb > button[aria-pressed="true"][data-rok] { background: var(--ok, #12805c); border-color: var(--ok, #12805c); color: #fff; }
.kq-rb > button[aria-pressed="true"][data-rna] { background: #6b7280; border-color: #6b7280; color: #fff; }
.kq-r.na .kq-rl { opacity: 1; }
/* one open row at a time (owner, 19 Nov 2026): closed rows show label, value and a status mark */
.kq-r { padding: 0; }
.kq-rh { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 0; cursor: pointer; color: var(--ink); }
.kq-rh:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.kq-rh .kq-rl { flex: 1 1 auto; }
.kq-mk { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; line-height: 1; box-sizing: border-box; }
.kq-mk.to { border: 2px solid var(--line-2, #c5cad3); }
.kq-mk.ok, .kq-mk.ed { background: var(--ok, #12805c); color: #fff; }
.kq-mk.na { background: #e5e7eb; color: #4b5563; font-size: 16px; }
.kq-mk.bad { background: #c0392b; color: #fff; }
.kq-r.ok .kq-rv { color: var(--ink); }
.kq-r.open { background: color-mix(in srgb, var(--brand) 5%, transparent); margin: 0 -10px; padding: 0 10px 12px; border-radius: 10px; border-top-color: transparent; }
.kq-r.open + .kq-r { border-top-color: transparent; }
.kq-ro { display: flex; flex-direction: column; gap: 6px; }
.kq-ro .kq-rb { margin-top: 2px; }
.kq-ro .kq-redit { display: block; }
.kq-ro .kq-redit > * { width: 100%; box-sizing: border-box; }
.kq-rb > button:disabled { opacity: .45; }
.kq-nf { font-weight: 500; font-size: 14px; }
.kq-accs { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; }
.kq-acc { display: block; font-size: 14px; overflow-wrap: anywhere; }
.kq-why .field { margin: 0; }
.kq-flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 45%, transparent); border-radius: 8px; }
.nw { white-space: nowrap; }
details.kq-hist > summary { cursor: pointer; list-style: revert; }
details.kq-hist > summary h3 { display: inline; margin: 0; }
details.kq-hist[open] > summary { margin-bottom: 8px; }
.kq-bar-note .link { font-size: inherit; }
@media (max-width: 720px) {
  .kq-mnote .kq-kv > div, .kq-sal .kq-kv > div { flex-direction: column; align-items: flex-start; gap: 2px; }
  .kq-mnote .kq-kv dd, .kq-sal .kq-kv dd { text-align: left; }
}
.kq-dupc { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.kq-dupc > button { min-height: 44px; }
.kq-r .kq-rh .kq-left { color: #c0392b; }
.km-nrs { display: flex; flex-direction: column; }
.km-nr { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.km-nr:first-child { border-top: 0; }
.km-nr .grow { min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.km-nr select { flex: none; width: 46%; max-width: 240px; min-height: 44px; }
.kq-catm .kq-lsr select { max-width: 55%; min-height: 40px; }
/* second review (19 Nov 2026): labels may wrap on a large phone font; Edited amber, Approved green */
.kq-rb > button { white-space: normal; min-height: 44px; padding: 4px 6px; line-height: 1.15; overflow-wrap: anywhere; }
.kq-mk.ed { background: #b45309; color: #fff; }
.kq-rb > button.ed[aria-pressed="true"][data-rok] { background: #b45309; border-color: #b45309; color: #fff; }
.kq-mk.none { visibility: hidden; }
.kq-why1 { margin-bottom: 12px; }
.kq-hmaster { display: flex; flex-direction: column; gap: 2px; padding: 8px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 14px; overflow-wrap: anywhere; }
.kq-r .kq-cf { color: #c0392b; }
/* "Approve N matching details" at a group header (owner, 19 Nov 2026) */
.kq-gm { width: 100%; min-height: 44px; margin: 4px 0 6px; white-space: normal; }

/* ── sales.css ── */
/* ══ Sales – Invoice / PI / Stock transfer (phase 1 demo, 20 Nov 2026; web/src/sales.js) ═══════════════════════════
   Follows the approved mocks (inv2.html phone, inv-laptop.html laptop): white cards, hairline borders, one chip per row,
   red only for problems, no green marks. Phone < 900 px: list and draft are separate pages; 900–1199 px: draft with the
   four boxes and the item table; 1200 px and up: the list on the left, the draft on the right. */
.sx { --sx-red: var(--bad, #b42318); --sx-redbg: var(--bad-soft, #fdecea); --sx-amb: #8a5a00; --sx-ambbg: #fff4dc; --sx-line: var(--line, #e6eaf2); --sx-ink3: var(--ink-3, #646f8b); --sx-navy: var(--brand, #0b2a7a); }
.sx .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sx .mut { color: var(--sx-ink3); } .sx .sx-small { font-size: 12px; } .sx .err { color: var(--sx-red); font-size: 12px; font-weight: 600; background: none; padding: 0; border-radius: 0; }
/* the app's button look is for action buttons; rows, chips and the date here are plain */
.sx .sx-sec, .sx .sx-date, .sx button.chip, .sx .sx-tot button.g, .sx .sx-plist button { min-height: 0; font-weight: inherit; }
.sx .sx-sec:active, .sx button.chip:active, .sx .sx-date:active { transform: none; }
.sx .chip.sx-blue { background: #e8efff; color: #1650d8; }
.sx button.chip { border: 0; cursor: pointer; font: inherit; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.sx-h4 { margin: 18px 0 8px; font-size: 12px; color: var(--sx-ink3); font-weight: 600; }
.sx-none { margin: 0; padding: 16px; color: var(--sx-ink3); text-align: center; }
.sx-lead { margin: 0 0 10px; font-size: 13px; }

/* top line of a page: back, title, draft number */
.sx-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; min-height: 36px; }
.sx-bar b { font-size: 18px; } .sx-bar .sp { flex: 1; }
.sx-bar .back { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-left: -6px; border-radius: 10px; color: var(--brand-2, #1650d8); }
.sx-bar .back .ic { width: 20px; height: 20px; }
.sx-addi { font-weight: 600; }

/* kind switch and Add the order */
.sx-seg { display: flex; background: var(--surface-2, #eef2f8); border: 1px solid var(--sx-line); border-radius: 12px; padding: 3px; margin: 0 0 14px; }
.sx-seg button { flex: 1; min-width: 0; padding: 9px 4px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.sx-seg button.on { background: var(--surface, #fff); color: var(--sx-navy); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.sx-addh { font-size: 15px; font-weight: 700; margin: 4px 0 10px; }
.sx-add3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sx-add3 button { height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--sx-line); border-radius: 12px; background: var(--surface, #fff); font: inherit; font-weight: 600; font-size: 13px; color: var(--ink); min-width: 0; }
.sx-add3 button .ic { width: 22px; height: 22px; color: var(--sx-navy); }
.sx-add3 button:hover { border-color: var(--line-2, #d3d9e6); }
.sx-addbtn { display: none; width: 100%; height: 44px; justify-content: center; margin: 0 0 12px; }
.sx-reading { align-items: center; text-align: center; padding: 12px 0; }
.sx-reading h3 { margin: 0; }

/* list rows */
.sx-list.card-ph, .sx-card { background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 14px; overflow: hidden; }
.sx-li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--sx-line); color: inherit; text-decoration: none; }
.sx-li:first-child { border-top: 0; }
.sx-li .m { flex: 1; min-width: 0; }
.sx-li .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-li .s { color: var(--sx-ink3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-li .r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sx-li .go, .sx-sec .go { color: #9aa6bd; font-size: 18px; line-height: 1; }
.sx-li.on { background: #eef3ff; box-shadow: inset 3px 0 0 var(--brand-2, #1650d8); }

/* draft – phone */
.sx-sum { background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 14px; padding: 14px; }
.sx-sum .p { font-size: 16px; font-weight: 700; }
.sx-sum .g, .sx-head .g { color: var(--sx-ink3); font-size: 12px; }
.sx-sum .big { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 8px; line-height: 1.2; min-height: 0; font-size: inherit; }
.sx-sum .sx-fix, .sx-sum .sx-st { margin-top: 12px; }
.sx-sum .big .amt { font-size: 22px; line-height: 1.15; }
.sx-sum .big > * { line-height: 1.2; min-height: 0; }
.sx-date { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.sx-date:hover { text-decoration: underline; text-underline-offset: 3px; }
.sx-sec.ro { cursor: default; } .sx-sec.ro:hover { background: none; }
.sx-fix { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.sx-st { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sx-sec { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; padding: 13px 14px; border: 0; border-radius: 0; border-top: 1px solid var(--sx-line); background: none; font: inherit; font-weight: 400; color: inherit; text-align: left; cursor: pointer; }
.sx-sec:hover { background: var(--surface-2, #f8fafd); }
.sx-sec:first-child { border-top: 0; }
.sx-sec .k { width: 96px; flex: none; color: var(--sx-ink3); font-size: 12px; font-weight: 600; }
.sx-sec .v { flex: 1; min-width: 0; }
.sx-sec .v > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx .v > .wrap2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sx-src { padding: 12px 14px; } .sx-src .t { font-weight: 600; } .sx-src .s { color: var(--sx-ink3); font-size: 12px; }
.sx-del { display: block; margin: 16px auto 0; }
.sx-note { border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-top: 12px; }
.sx-note.warn { background: var(--sx-ambbg); color: var(--sx-amb); } .sx-note.bad { background: var(--sx-redbg); color: var(--sx-red); }
.sx-setup { margin-top: 12px; background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 12px; padding: 10px 14px; }
.sx-setup summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sx-setup summary::-webkit-details-marker { display: none; }
.sx-setup summary .go { color: #9aa6bd; font-size: 18px; transition: transform .15s; }
.sx-setup[open] summary .go { transform: rotate(90deg); }
/* owner: Zentra's own setup work on approve – one quiet line; the owner's work in Tally – red, Approve waits */
.sx-quiet { margin: 12px 2px 0; color: var(--sx-ink3); font-size: 13px; }
.sx-need { margin-top: 12px; background: var(--sx-redbg); color: var(--sx-red); border-radius: 12px; padding: 10px 12px; font-size: 13px; display: grid; gap: 2px; }
.sx-setup ul { margin: 8px 0 2px; padding-left: 18px; font-size: 13px; }
.sx-entry { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.sx-entry td { padding: 6px 0; border-top: 1px solid var(--sx-line); }
.sx-entry td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 12px; }

/* items */
.sx-it { padding: 12px 14px; border-top: 1px solid var(--sx-line); }
.sx-it:first-child { border-top: 0; } .sx-it.tap { cursor: pointer; }
.sx-it .a { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.sx-it .b3 { color: var(--sx-ink3); font-size: 12px; margin-top: 2px; }
.sx-nt { background: var(--sx-redbg); border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.sx-nt .e { color: var(--sx-red); font-size: 12px; font-weight: 600; }
.sx-nt .sx-pick { display: grid; gap: 8px; margin-top: 8px; }
.sx-nt .sx-pick button { height: 40px; justify-content: center; width: 100%; white-space: normal; line-height: 1.2; }
.sx-totc { margin-top: 12px; }
.sx-tot { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 14px; font-size: 13px; }
.sx-tot .amt { text-align: right; } .sx-tot .g { color: var(--ink-2); }
.sx-tot .pr { display: contents; }
.sx-tot .last { font-weight: 800; font-size: 15px; }

/* bottom bar (sits above the phone menu, at the foot of the window on a laptop) */
.sx-foot { position: sticky; bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; gap: 10px; margin: 16px -16px 0; padding: 12px 16px; background: var(--surface, #fff); border-top: 1px solid var(--sx-line); }
.sx-foot > button, .sx-foot > .btn { flex: 1; height: 46px; justify-content: center; border-radius: 12px; font-weight: 700; }
.sx-foot .sx-off { background: #e3e8f1; color: #7a859e; border: 0; cursor: not-allowed; }
.sx-foot .src { color: var(--sx-ink3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sx-foot .sp { flex: 1; }

/* owner – the two count lines */
.sx-grp { margin-top: 12px; }
.sx-sidegrp { display: none; }
@media (min-width: 1200px) { .sx-sidegrp { display: block; } }
.sx-grp a { display: flex; align-items: center; justify-content: space-between; padding: 14px; font-weight: 600; color: inherit; text-decoration: none; border-top: 1px solid var(--sx-line); }
.sx-grp a:first-child { border-top: 0; } .sx-grp .n { color: var(--sx-ink3); }
.sx-one { max-width: 720px; margin: 0 auto; }

/* forms */
.sx-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sx-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.sx-btns button { width: 100%; }
.sx-dng { align-self: center; }
.sx-form textarea { resize: none; }
.sx-form .check { display: flex; gap: 8px; align-items: center; }
.sx-pickm .sx-q { width: 100%; }
.sx-plist { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.sx-plist button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; padding: 10px 12px; border: 1px solid var(--sx-line); border-radius: 10px; background: var(--surface, #fff); font: inherit; }

/* layout: which part shows where */
.sx-split[data-v="home"] .sx-pane { display: none; }
.sx-split[data-v="draft"] .sx-side { display: none; }
.sx .lt-only, .sx .sx-lt { display: none; }
.sx-side-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.sx-side-h b { font-size: 18px; } .sx-side-h .chip { margin-left: auto; }
@media (min-width: 900px) {
  .sx .sx-ph { display: none; }
  .sx .sx-lt { display: block; }
  .sx-foot { bottom: 0; margin: 20px 0 0; border: 1px solid var(--sx-line); border-radius: 14px; box-shadow: var(--shadow); }
  .sx-foot > button, .sx-foot > .btn { flex: 0 0 200px; padding: 0 16px; } /* the two buttons the same width */
  /* the totals stay in view above the bottom bar while the items scroll */
  .sx-tfoot { position: sticky; bottom: 76px; z-index: 2; background: var(--surface, #fff); border-top: 1px solid var(--sx-line); align-items: center !important; }
  .sx-tfoot .sx-links { flex-direction: row !important; gap: 16px !important; padding: 10px 0 !important; flex: none; }
  .sx-tfoot .sx-links .link { white-space: nowrap; }
  .sx-tfoot .sx-tot { width: auto !important; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; padding: 10px 0; }
  .sx-tfoot .sx-tot .pr { display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; }
  .sx-tfoot .sx-tot .last { font-size: 14px; }
  .sx .lt-only { display: inline-flex; }
  .sx-pane .sx-bar .back { display: none; }
  .sx-split[data-v="draft"] .sx-bar { display: none; }
  .sx-head { display: flex; align-items: flex-start; gap: 16px; }
  .sx-head .p { font-size: 20px; font-weight: 700; }
  .sx-head .grow { flex: 1; min-width: 0; }
  .sx-head .tot { text-align: right; } .sx-head .tot .amt { display: block; font-size: 26px; } .sx-head .tot .g { color: var(--sx-ink3); font-size: 13px; }
  .sx-lt { container-type: inline-size; }
  .sx-boxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
  .sx-box { background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 12px; padding: 12px 14px; min-height: 96px; min-width: 0; }
  .sx-box.bad { border-color: #f3b8b1; }
  .sx-box .k { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--sx-ink3); font-weight: 600; }
  .sx-box .k .link { font-size: 12px; font-weight: 600; padding: 0; }
  .sx-box .v { margin-top: 6px; } .sx-box .v > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sx-tbl { margin-top: 16px; }
  .sx-tbl table { width: 100%; border-collapse: collapse; }
  .sx-tbl th { font-size: 12px; color: var(--sx-ink3); font-weight: 600; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--sx-line); background: var(--surface-2, #f8fafd); }
  .sx-tbl td { padding: 11px 14px; border-bottom: 1px solid var(--sx-line); vertical-align: middle; }
  .sx-tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .sx-tbl tr.bad td { background: #fff8f7; }
  .sx-tbl tr.tap { cursor: pointer; } .sx-tbl tr.tap:hover td { background: var(--surface-2, #f8fafd); }
  .sx-tbl .sx-pick { gap: 8px; margin-top: 6px; flex-wrap: wrap; }
  .sx-tfoot { display: flex; align-items: flex-start; gap: 16px; padding: 4px 0; }
  .sx-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; }
  .sx-links .link { font-weight: 600; padding: 4px 0; }
  .sx-tfoot .sx-tot { width: 300px; margin-left: auto; }
  .sx-split[data-v="home"] .sx-pane { display: none; }
}
@container (min-width: 680px) { .sx-boxes { grid-template-columns: repeat(var(--n, 4), 1fr) !important; } .sx-box { min-height: 0 !important; } }
@media (min-width: 1200px) {
  .sx-split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
  .sx-split[data-v] .sx-side, .sx-split[data-v] .sx-pane { display: block; }
  .sx-side { position: sticky; top: calc(var(--top-h) + 12px); background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 14px; padding: 14px 0 0; max-height: calc(100vh - var(--top-h) - 40px); display: flex !important; flex-direction: column; overflow: hidden; }
  .sx-side > .sx-side-h, .sx-side > .sx-seg, .sx-side > .sx-addbtn { margin-left: 14px; margin-right: 14px; width: auto; }
  .sx-side .ph-only { display: none; }
  .sx-side .sx-addbtn { display: inline-flex; }
  .sx-split[data-v="home"] .sx-side .sx-addbtn { display: none; } /* the pane on the right has the three ways already */
  .sx-side .sx-list { overflow-y: auto; border-top: 1px solid var(--sx-line); border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; flex: 1; }
  .sx-side .sx-li { border-top: 0; border-bottom: 1px solid var(--sx-line); }
  .sx-side .sx-sidegrp { margin: 0; border-top: 1px solid var(--sx-line); }
  .sx-addpane { background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 14px; padding: 28px; max-width: 560px; }
  .sx-addpane h2 { margin: 0; font-size: 20px; color: var(--ink); } .sx-addpane p { margin: 4px 0 16px; }
}
@media (min-width: 641px) and (max-width: 899px) { .sx-split[data-v], .sx-one { max-width: 720px; margin: 0 auto; } }

/* vehicle after posting (phase 2): what to do in Tally once the vehicle is there; two fields side by side in the sheet */
.sx-note.info { background: var(--grey-soft); color: var(--ink); }
.sx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sx-two > .field { min-width: 0; margin: 0; }
.sx-two input, .sx-two select { width: 100%; min-width: 0; }

/* changes after posting (correct.js): full-width rows in normal ink; one that is not possible now is grey, no chevron,
   its reason under it (second review, 21 Nov 2026) */
.sx-chg .sx-sec .v { display: flex; flex-direction: column; gap: 2px; }
.sx-chg .sx-sec .t { color: var(--ink); font-weight: 500; }
.sx-chg .sx-sec.off { cursor: default; } .sx-chg .sx-sec.off:hover { background: none; }
.sx-chg .sx-sec.off .t { color: var(--ink-3); }
.sx-chg .sx-sec .w { color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }
/* a note that opens another document */
a.sx-note.sx-lnk { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; min-height: 44px; box-sizing: border-box; }
a.sx-note.sx-lnk .go { color: #9aa6bd; font-size: 18px; line-height: 1; }
/* a correction: In Tally ₹ before → after, and the changed lines */
.sx-diff { margin-top: 12px; background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.sx-diff .h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.sx-diff .h > span:first-child { color: var(--sx-ink3); }
.sx-diff ul { margin: 6px 0 0; padding-left: 18px; } .sx-diff li { margin: 2px 0; overflow-wrap: anywhere; } .sx-diff p { margin: 6px 0 0; }
/* the GSTR-1 question: a title and two equal answers */
.sx-ask h3 { margin: 0; }
.sx-ask .sx-btns button { min-height: 44px; white-space: normal; }

.sx-addv { display: block; margin: 10px 4px 0; padding: 8px 0; }
@media (min-width: 900px) { .sx-foot .sx-wide { white-space: nowrap; } }
/* second UI review (21 Nov 2026) */
.sx-li.own .r { flex: none; }
/* two answers whose words may be long: stacked full width on a phone (the action on top), side by side on a laptop */
@media (max-width: 640px) { .sx-btns.sx-stk { grid-template-columns: 1fr; } .sx-btns.sx-stk > .primary { order: -1; } }
.sx-btns.sx-stk button { min-height: 46px; white-space: normal; }
.modal-wide .sx-ask .sx-btns button { white-space: nowrap; }
/* the GSTR-1 question: two answers the same style, one under the other, and Cancel under them */
.sx-col { display: flex; flex-direction: column; gap: 10px; }
.sx-col > .ghost { width: 100%; min-height: 46px; }
.sx-col > .sx-cancel { align-self: center; min-height: 44px; padding: 8px 16px; }
.sx-diff .vb { margin: 6px 0 0; font-weight: 600; }
a.sx-sec { text-decoration: none; }
/* the date shown on top of a date box starts where the text of the other boxes starts */
.sx-form .dwrap > .dshow { left: 13px; right: 40px; text-align: left; }
/* items (phone): Done stays at the bottom of the screen, not in the middle of a short page */
@media (max-width: 899px) {
  .sx-items .sx-pane { display: flex; flex-direction: column; min-height: calc(100dvh - var(--top-h, 56px) - var(--bottom-h, 64px) - 32px); }
  .sx-items .sx-foot { margin-top: auto; }
}
/* third UI review (21 Nov 2026) */
/* 7: the list subtitle and the vehicle's second line wrap (two lines) instead of being cut off */
.sx-sec .v > div.sx-small, .sx-box .v > div.sx-small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 6 / 21: a linked document – its name, and its status chip on a second line */
.sx-chg .sx-sec .v > span:not(.t):not(.w) { display: block; }
a.sx-note.sx-lnk .sx-lt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
/* 16: every sheet on a phone – buttons stacked full width, the action on top, Cancel an outline button */
@media (max-width: 640px) { .sx-btns { grid-template-columns: 1fr; } .sx-btns > .primary, .sx-btns > [type=submit] { order: -1; } .sx-btns button { min-height: 46px; } }
.sx-col > .sx-cancel { align-self: stretch; width: 100%; min-height: 46px; padding: 9px 16px; }
/* 22: the date shown on a date box starts where the text of the other boxes starts; one gap between all rows */
.sx-form .dwrap > .dshow { left: 13px; padding-left: 0; }
.sx-form > .field { margin: 0; }
/* fourth UI review (21 Nov 2026) */
/* 4: list rows – the name with the amount on line 1; what / when and the chip on line 2, one line each */
.sx-li2 .m { display: flex; flex-direction: column; gap: 4px; }
.sx-li2 .l1, .sx-li2 .l2 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sx-li2 .l1 .t { flex: 1; min-width: 0; }
.sx-li2 .l1 .amt { flex: none; font-weight: 600; }
/* fifth review: the grey line is never cut – when the chip does not fit beside it, the chip goes on its own line under it */
.sx-li2 .l2 { flex-wrap: wrap; row-gap: 4px; }
.sx-li2 .l2 .s { flex: 1 0 auto; max-width: 100%; white-space: normal; overflow: visible; text-overflow: clip; }
.sx-li2 .l2 .chip { flex: none; margin-left: auto; }
/* 3: a grey link row uses the free width */
a.sx-note.sx-lnk .sx-lt { flex: 1; min-width: 0; }
/* 8: a chip on a grey row stands out */
a.sx-note.sx-lnk .chip { background: var(--surface, #fff); border: 1px solid var(--line, #e6eaf2); }
/* 6: the vehicle's transporter and LR each on a line */
.sx-sec .v > div.sx-small, .sx-box .v > div.sx-small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sx-diff .vl { margin: 2px 0 0; color: var(--sx-ink3); }
/* 15: the three kind tabs the same width, with room inside */
.sx-seg button { flex: 1 1 0; padding: 9px 10px; }
/* fifth UI review (21 Nov 2026) */
.sx-again { margin-top: 6px; }
.sx-addrow { display: flex; gap: 20px; margin: 10px 4px 0; }
.sx-addrow .link { padding: 8px 0; }
/* the owner's own invoice (21 Nov 2026): Add the order on the approvals page, Your drafts, the client picker */
.sx-sideh { margin: 14px 14px 6px; }
.sx-owadd { white-space: nowrap; flex: 0 0 auto; }
.sx-ownadd .sx-seg { margin: 0; }
.sx-ownadd select { width: 100%; }
/* a draft's parts open on the page (owner, 22 Nov 2026: "sab on face hi ajae") */
.sx-inl { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 12px 0; }
@media (min-width: 900px) { .sx-inl { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.sx-ib { padding: 14px; min-width: 0; }
.sx-ib.bad { border: 1px solid var(--sx-red); }
.sx-ibh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; }
.sx-ibh b { font-size: 15px; }
.sx-iform { gap: 10px; }
.sx-ibtn { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.sx-ibtn .primary { min-width: 96px; }

/* ── sales2-create.css ── */
/* ══ Create invoice (owner, 23 Nov 2026; web/src/sales-create.js) ══════════════════════════════════════════════════════
   Laptop and tablet landscape (1024 px and up): entry on the left in typing order, the money on the right (316 px, always in
   view). Below 1200 px the right panel becomes a bar at the bottom. Same look as the Sales draft: white cards, hairline
   borders, red only for problems, amber for "to check". Also: the live search list (combo.js) and the Rate switch. */

/* live search list (combo.js) – Create invoice and the draft page's item sheet */
.cb { position: relative; }
.cb-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); min-width: 280px; max-height: calc(8 * 44px); overflow-y: auto; background: var(--surface, #fff); border: 1px solid var(--line-2, #d3d9e6); border-radius: 12px; box-shadow: 0 10px 28px rgba(16, 24, 40, .14); padding: 4px; }
.cb-row { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 44px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.cb-row.on { background: var(--surface-2, #eef2f8); }
.cb-row .cb-n { font-weight: 600; font-size: 14px; color: var(--ink, #14213d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-row .cb-m { font-size: 12px; color: var(--ink-3, #646f8b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-row .cb-w { color: #8a5a00; font-weight: 600; }
.cb-row.new { border-top: 1px solid var(--line, #e6eaf2); border-radius: 0 0 8px 8px; }
.cb-row.new .cb-new { font-weight: 600; color: var(--brand-2, #1650d8); font-size: 14px; }
.cb-row.new small { font-size: 12px; color: var(--ink-3, #646f8b); }
.cb-none { padding: 12px 10px; font-size: 13px; color: var(--ink-3, #646f8b); }

/* Rate: Excl. GST | Incl. GST (draft page) */
.sx-rbar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.sx-rbar .g { font-size: 13px; color: var(--sx-ink3); font-weight: 600; }
.sx .sx-rseg { margin: 0; flex: 0 0 auto; width: 220px; }
.sx .sx-rseg button { padding: 6px 8px; }
.sx .sx-rline { margin: -4px 2px 10px; font-size: 13px; color: var(--ink-2, #2b3654); }
.sx-rph { margin: 0 0 8px; }
.sx-chk { margin-top: 12px; background: var(--sx-ambbg); color: var(--sx-amb); border-radius: 12px; padding: 10px 12px; font-size: 13px; display: grid; gap: 2px; }

/* Create invoice buttons: laptop only (1024 px and up) */
.sx-cibtn { display: none !important; }
.sx-ciway { display: none; }
@media (min-width: 1024px) {
  .sx-cibtn { display: inline-flex !important; align-items: center; gap: 6px; }
  .sx-side .sx-cibtn.sx-ciside { width: 100%; height: 44px; margin: 10px 0 4px; justify-content: center; } /* under the three ways (1024–1199 px) */
}
@media (min-width: 1200px) {
  .sx-side .sx-cibtn.sx-ciside { width: auto; margin: -4px 14px 12px; }
  .sx-ciway { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
  .sx-ciway .mut { font-size: 13px; }
}
.sx-cdl { padding: 24px 16px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.sx-cdl p { margin: 0; font-weight: 600; }

/* the screen */
.ci { --ci-panel: 316px; }
.ci-top { display: flex; align-items: center; gap: 12px; min-height: 40px; margin: 0 0 12px; flex-wrap: wrap; }
.ci-top > b { font-size: 18px; }
.ci-top .sp { flex: 1; }
.ci-top .back { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-left: -6px; border-radius: 10px; color: var(--brand-2, #1650d8); }
.ci-top .back .ic { width: 20px; height: 20px; }
.ci .sx-ckind { margin: 0; width: 320px; flex: 0 0 auto; }
.ci .sx-ckind button { padding: 7px 8px; }
.ci-top .link { font-size: 13px; }
.sx-cclient { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sx-ink3); }
.sx-cclient select { height: 36px; min-width: 180px; }
.ci-body { display: grid; grid-template-columns: minmax(0, 1fr) var(--ci-panel); gap: 16px; align-items: start; }
.ci-left { display: grid; gap: 12px; min-width: 0; }
.ci .fld { display: grid; gap: 4px; font-size: 12px; color: var(--sx-ink3); font-weight: 600; min-width: 0; }
.ci .fld input, .ci .fld select, .ci-box input, .ci-box select { height: 38px; font-size: 14px; font-weight: 400; width: 100%; min-width: 0; }
.ci .fld.bad select { border-color: #f3b6ae; }
.ci .fld input:disabled { background: var(--surface-2, #eef2f8); color: var(--sx-ink3); }
.ci-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ci-head:has(.w2) { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); }
.ci-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ci-boxes.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ci-box { background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.ci-box.bad { border-color: #f3b6ae; }
.ci-box > .k { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--sx-ink3); font-weight: 600; min-height: 22px; }
.ci-same { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink-2, #2b3654); cursor: pointer; }
.ci-same input { width: 16px; height: 16px; margin: 0; }
.ci-ship { display: grid; gap: 6px; }
.ci-2 { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 6px; }
.ci-sub { font-size: 12px; color: var(--ink-2, #2b3654); display: grid; gap: 2px; min-height: 16px; }
.ci-sub .wrap2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci .ci-new { font-size: 12px; color: var(--brand-2, #1650d8); font-weight: 600; }
.ci-rate { display: flex; align-items: center; gap: 10px; }
.ci-rate .g { font-size: 13px; color: var(--sx-ink3); font-weight: 600; }
.ci-rate .ci-rl { font-size: 13px; color: var(--ink-2, #2b3654); }

/* item grid */
.ci-grid { background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 14px; overflow: visible; }
.ci-t { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ci-t th { font-size: 12px; color: var(--sx-ink3); font-weight: 600; text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--sx-line); background: transparent; }
.ci-t th.n, .ci-t td.n { text-align: right; }
.ci-t td { padding: 4px 4px; border-bottom: 1px solid var(--sx-line); vertical-align: middle; font-size: 13px; }
.ci-t td.it { vertical-align: top; }
.ci-t .no { width: 30px; color: var(--sx-ink3); text-align: center; }
.ci-t th:nth-child(2) { width: auto; }
.ci-t:not(.tr) th:nth-last-child(1) { width: 32px; } /* × */
.ci-t:not(.tr) th:nth-last-child(2) { width: 96px; } /* Amount */
.ci-t:not(.tr) th:nth-last-child(3) { width: 44px; } /* GST */
.ci-t:not(.tr) th:nth-last-child(4) { width: 58px; } /* Disc % */
.ci-t:not(.tr) th:nth-last-child(5) { width: 96px; } /* Rate */
.ci-t:not(.tr) th:nth-last-child(6) { width: 48px; } /* Unit */
.ci-t:not(.tr) th:nth-last-child(7) { width: 76px; } /* Qty */
.ci-t:not(.tr) th:nth-last-child(8) { width: 70px; } /* HSN */
.ci-t.gd th:nth-child(3) { width: 150px; } /* Godown */
.ci-t.tr th:nth-last-child(1) { width: 36px; } .ci-t.tr th:nth-last-child(2) { width: 72px; } .ci-t.tr th:nth-last-child(3) { width: 110px; }
.ci-t input, .ci-t select { width: 100%; height: 34px; font-size: 13px; padding: 4px 8px; min-width: 0; border-color: transparent; background: transparent; }
.ci-t input:hover, .ci-t select:hover { border-color: var(--sx-line); }
.ci-t input:focus, .ci-t select:focus { border-color: var(--brand-2, #1650d8); background: var(--surface, #fff); }
.ci-t td.n input { text-align: right; }
.ci-t td.it small { display: block; padding: 0 8px 4px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-t tr.bad td.it input { color: var(--sx-red); }
.ci-t td.x { text-align: center; }
.ci-del { width: 28px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--sx-ink3); display: inline-grid; place-items: center; }
.ci-del:hover { background: var(--sx-redbg); color: var(--sx-red); }
.ci-del .ic { width: 16px; height: 16px; }
.ci-gfoot { display: flex; align-items: center; gap: 16px; padding: 10px 12px; font-size: 13px; }
.ci-gfoot .sp { flex: 1; }
.ci-gfoot .ci-cnt { color: var(--sx-ink3); }
.ci-gfoot .link { font-weight: 600; }
.ci-bottom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr); gap: 10px; }
.ci-bottom:has(> .fld:nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); }

/* right panel */
.ci-panel { position: sticky; top: 76px; background: var(--surface, #fff); border: 1px solid var(--sx-line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.ci-ph b { font-size: 15px; display: block; }
.ci-ph .g { font-size: 12px; color: var(--sx-ink3); margin-top: 2px; }
.ci-l { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; min-height: 26px; }
.ci-l .link { font-size: 13px; font-weight: 600; padding: 0; min-height: 0; }
.ci-fr label { color: inherit; }
.ci-rs { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ci .ci-panel .ci-fr input { width: 116px; flex: 0 0 116px; height: 30px; min-height: 0; padding: 2px 8px; text-align: right; font-size: 13px; }
.ci-sep { border-top: 1px solid var(--sx-line); padding-top: 8px; margin-top: 2px; }
.ci-tot { border-top: 1px solid var(--sx-line); padding-top: 8px; font-size: 16px; font-weight: 700; }
.ci-words { margin: 0; font-size: 12px; color: var(--sx-ink3); line-height: 1.35; }
.ci-fix, .ci-chk { border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; font-size: 13px; }
.ci-fix { background: var(--sx-redbg); color: var(--sx-red); } .ci-chk { background: var(--sx-ambbg); color: var(--sx-amb); }
.ci-fix button, .ci-chk button { display: flex; justify-content: space-between; gap: 8px; text-align: left; background: none; border: 0; padding: 3px 0; min-height: 0; font: inherit; color: inherit; font-weight: 500; cursor: pointer; }
.ci-fix button:hover span, .ci-chk button:hover span { transform: translateX(2px); }
.ci-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.ci-btns button { height: 44px; padding: 0 10px; white-space: nowrap; }
.ci-btns .sx-off { background: var(--surface-2, #eef2f8); color: var(--sx-ink3); border: 1px solid var(--sx-line); }
.ci-saved { font-size: 12px; text-align: right; min-height: 16px; }
.ci-keys table { width: 100%; font-size: 14px; } .ci-keys td { padding: 6px 4px; border-bottom: 1px solid var(--line, #e6eaf2); }
.ci-kclose { display: flex; justify-content: flex-end; } .ci-kclose button { min-width: 120px; }
.ci-keys kbd { font: inherit; font-size: 12px; font-weight: 600; background: var(--surface-2, #eef2f8); border: 1px solid var(--line, #e6eaf2); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }

/* 1024–1199 px: the right panel is a bar at the bottom (total, counts, buttons) */
@media (max-width: 1199px) {
  .ci-body { grid-template-columns: minmax(0, 1fr); padding-bottom: 84px; }
  .ci-panel { position: static; max-width: 440px; width: 100%; justify-self: end; }
  .ci-panel .ci-btns, .ci-panel .ci-saved { position: fixed; z-index: 30; bottom: 0; right: 0; }
  .ci-panel .ci-btns { left: var(--rail, 0px); padding: 12px 24px; background: var(--surface, #fff); border-top: 1px solid var(--sx-line); display: flex; justify-content: flex-end; margin: 0; }
  .ci-panel .ci-btns button { min-width: 160px; }
  .ci-panel .ci-saved { bottom: 26px; right: auto; left: calc(var(--rail, 0px) + 24px); }
  .ci-head { grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(2, minmax(0, 1fr)); }
}
/* sales ledger per invoice (24 Nov 2026): at the right end of the Rate row */
.ci-rate { flex-wrap: wrap; }
.ci-sl { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ci-sl select { width: auto; min-width: 220px; max-width: 320px; height: 42px; }

/* ── tally-posting.css ── */
/* Zentra Admin → client → Posting to Tally (web/src/tally-posting.js, 20 Nov 2026; UI review the same day) */
#postCard { gap: 12px; }
#postCard .pt-sec { border-top: 1px solid var(--line); padding-top: 12px; }
/* a section head: name, then the switch and the chip at the right */
#postCard .pt-h { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-height: 32px; }
#postCard .pt-h > b, #postCard .pt-h > h3 { margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
#postCard .pt-h .chip { flex: none; }
/* Stop all posting: small red outline, right of the title */
#postCard .pt-stop { flex: none; margin-left: auto; background: transparent; color: var(--bad); border: 1px solid var(--bad); min-height: 34px; padding: 4px 12px; font-size: .84rem; font-weight: 600; }
#postCard .pt-box { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 10px; }
#postCard .pt-box.warn { background: var(--warn-soft); }
#postCard .pt-box.bad { background: var(--bad-soft); }
#postCard .pt-box p, #postCard .pt-sec p { overflow-wrap: anywhere; }
#postCard .pt-soft { color: var(--ink-2); } /* darker than muted: readable on the beige / pink boxes */
#postCard .pt-counts { color: var(--ink); }
/* one button: full width on a phone, a fixed width on a laptop */
#postCard .pt-btns { display: grid; grid-template-columns: 1fr; gap: 8px; }
#postCard .pt-btns button { width: 100%; min-height: 40px; }
/* Undo in Tally: a red outline button 44 px tall, the same gap as the other buttons (third review: side by side on a laptop) */
#postCard .pt-back { background: transparent; color: var(--bad); border: 1px solid var(--bad); min-height: 44px; font-weight: 600; }
#postCard .pt-n { flex: none; }
#postCard .pt-ready { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; row-gap: 2px; }
#postCard .pt-ready .link { min-height: 28px; }
/* voucher type + read button: one row on a laptop, stacked on a phone */
#postCard .pt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
#postCard .pt-row input { width: 100%; }
#postCard .pt-row button { min-height: 40px; }
#postCard details summary { cursor: pointer; }
/* the on / off switch (a checkbox with role="switch") */
#postCard .pt-switch { position: relative; flex: none; display: inline-flex; align-items: center; height: 40px; cursor: pointer; }
#postCard .pt-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#postCard .pt-switch span { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); transition: background .15s; }
#postCard .pt-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
#postCard .pt-switch input:checked + span { background: var(--brand); }
#postCard .pt-switch input:checked + span::after { transform: translateX(16px); }
#postCard .pt-switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 520px) {
  #postCard .pt-row { grid-template-columns: 1fr; }
  #postCard .pt-row button { width: 100%; }
}
@media (min-width: 521px) {
  #postCard .pt-btns { grid-template-columns: minmax(0, 240px); }
  #postCard .pt-btns.two { grid-template-columns: repeat(2, minmax(0, 240px)); }
}
/* a confirm whose two buttons are the same width (confirmBox equal); stacked full width on a narrow phone */
.row.eq-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row.eq-btns > button { width: 100%; min-width: 0; white-space: normal; }
@media (max-width: 359px) { .row.eq-btns { grid-template-columns: 1fr; } }
/* second UI review (21 Nov 2026): the switch sits at the far right of every heading in one column; the status
   ("To check", "Posting…", "Different in Tally", "Stopped") is a chip on the step line under it */
#postCard .pt-h .pt-switch { margin-left: auto; width: 44px; justify-content: flex-end; }
#postCard .pt-step { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
#postCard .pt-step > span:empty { display: none; }
@media (max-width: 520px) { .row.eq-btns { grid-template-columns: 1fr; } .row.eq-btns > [data-ok] { order: -1; } }
.nw { white-space: nowrap; }
/* third UI review (21 Nov 2026) */
#postCard .pt-hist .pt-when { font-size: .78rem; }
#postCard .pt-btns button { min-height: 44px; }
/* a confirm's buttons: one height; a long label gets a wider dialog (ui.js confirmBox) */
.row.eq-btns { align-items: stretch; }
@media (min-width: 521px) { .modal-wide .row.eq-btns > button { white-space: nowrap; } }
/* Zentra Admin on a phone: "Back to apps" sits in the bar like the other tabs (no top line, same icon box) */
.bottombar a.switch { margin-top: 0 !important; border-top: 0 !important; padding: 8px 2px !important; border-radius: 0 !important; }
/* laptop: a toast sits over the main column, above its bottom bar */
/* laptop and tablet: toasts at the top of the content column, under the header bar – never over action buttons (phone stays at the bottom) */
@media (min-width: 768px) { #toasts { top: calc(var(--top-h) + 12px); bottom: auto; } }
/* fourth UI review (21 Nov 2026) */
/* the "Read another invoice" box: its button and an outline Cancel */
#postCard .pt-row { grid-template-columns: minmax(0, 1fr); }
#postCard .pt-rowb { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 521px) { #postCard .pt-rowb { grid-template-columns: repeat(2, minmax(0, 200px)); } #postCard .pt-rowb:has(> :only-child) { grid-template-columns: minmax(0, 240px); } }
/* no lone last word in check notes and dialogs */
#postCard .pt-box p, #postCard .pt-sec p, .modal p, .sx-note, .sx-diff { text-wrap: pretty; }

/* ── zz-mis-theme.css ── */
/* ══ MIS – new look (31 Oct 2026, approved by the owner) ═══════════════════════════════════════════════════
   CognixHR-style: clean white cards, a deep navy band at the top of each client with the logo's blue → teal,
   crisp tables, clear number colours (green up, red down), one spacing scale (8 / 12 / 16 / 20 px).
   Colours match the MIS exports (mis-excel.js, mis-pack.js): navy #0B2A7A [11,42,122] · teal #0C6E5F [12,110,95] ·
   soft teal #E3F7F2 [227,247,242] · green #2E7D32 [46,125,50]. Logo blue #1650D8 for links, logo mint #11B79C /
   #1FD0AE only for marks that are not text (bars, dots, the menu marker). No gold or brass: --gold is the teal.
   Text pairs meet WCAG AA. This file loads last (zz-), so it wins over the older MIS rules in styles.css.
   7 Nov 2026 (UX review): the navy band and the slim bar went – the client, sync status and Sync sit in the white app
   bar, and report pages have one control bar that stays at the top (css/mis-ux-head.css). */
:root[data-prod="mis"] {
  --mis-navy: #0b2a7a; --mis-navy-d: #0e1a3a; --mis-blue: #1650d8; --mis-teal: #0c6e5f; --mis-mint: #11b79c; --mis-mint-l: #1fd0ae;
  --mis-teal-soft: #e3f7f2; --mis-link: #1650d8; --mis-head-ink: #0b2a7a;
  --mis-band: radial-gradient(70% 160% at 100% 100%, rgba(31, 208, 174, .30), transparent 60%), linear-gradient(118deg, #0e1a3a 0%, #0b2a7a 58%, #1650c8 100%);
  --mis-grad: linear-gradient(90deg, #1650d8, #1fd0ae); /* the logo's blue → teal, for marks */
  --bg: #f3f6fb; --surface: #ffffff; --surface-2: #f6f8fc; --line: #e6eaf2; --line-2: #d3d9e6;
  --ink: #0e1a3a; --ink-2: #45506e; --ink-3: #646f8b;
  --brand: #0b2a7a; --brand-2: #1650d8; --brand-ink: #ffffff; --brand-soft: #e8eefb;
  --gold: #0c6e5f; --gold-soft: #e3f7f2;
  --mis-up: #2e7d32; --mis-loss: #c62828; --mis-amber: #9a5800; --mis-amber-soft: #fcf0dc;
  --ok: #2e7d32; --ok-soft: #e8f5e9; --bad: #c62828; --bad-soft: #fdecec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 26, 58, .04), 0 4px 16px rgba(14, 26, 58, .05);
  --shadow-up: 0 2px 6px rgba(14, 26, 58, .06), 0 14px 32px rgba(14, 26, 58, .11);
  --pin-h: 0px; /* the report control bar that stays under the app bar (laptop, report pages: below) */
}
@media (min-width: 900px) { :root[data-prod="mis"]:has(#main .mis-bar.mis-sticky) { --pin-h: 44px; } }
@media (prefers-color-scheme: dark) {
  :root[data-prod="mis"] {
    --mis-navy: #3b5bb8; --mis-teal: #34d1b4; --mis-mint: #34d1b4; --mis-teal-soft: #0f2f2c; --mis-link: #8db2ff; --mis-head-ink: #c9d6f5;
    --mis-band: radial-gradient(70% 160% at 100% 100%, rgba(31, 208, 174, .20), transparent 60%), linear-gradient(118deg, #091228 0%, #0b2466 58%, #123f9e 100%);
    --bg: #0a1326; --surface: #101c34; --surface-2: #15223e; --line: #203052; --line-2: #2c3e66;
    --ink: #e8eefb; --ink-2: #b0bcd8; --ink-3: #8e9ab9;
    --brand: #8db2ff; --brand-2: #8db2ff; --brand-ink: #06122b; --brand-soft: #16264a;
    --gold: #34d1b4; --gold-soft: #0f2f2c;
    --mis-up: #6ccb75; --mis-loss: #ff8a80; --ok: #6ccb75; --ok-soft: #12301f; --bad: #ff8a80; --bad-soft: #3a1714;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 6px 20px rgba(0, 0, 0, .28);
  }
}

/* ── side menu and bottom bar: soft teal fill, the logo's blue → teal as the marker ── */
:root[data-prod="mis"] .nav.sidebar a { color: var(--ink-2); }
:root[data-prod="mis"] .nav.sidebar a.active { background: var(--mis-teal-soft); color: var(--mis-head-ink); font-weight: 700; box-shadow: none; }
:root[data-prod="mis"] .nav.sidebar a.active::before { content: ''; display: block; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, #1650d8, #1fd0ae); }
:root[data-prod="mis"] .nav.sidebar a.active .ic { color: var(--mis-teal); }
:root[data-prod="mis"] .bottombar a.active { color: var(--mis-head-ink); }
:root[data-prod="mis"] .bottombar a.active::before { content: ''; position: absolute; top: 0; left: 50%; width: 28px; margin-left: -14px; height: 3px; border-radius: 0 0 3px 3px; background: var(--mis-grad); }
:root[data-prod="mis"] .avatar { background: var(--mis-teal-soft); color: var(--mis-head-ink); }

/* ── buttons navy ── */
:root[data-prod="mis"] .primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 8px color-mix(in srgb, var(--mis-navy) 22%, transparent); }
:root[data-prod="mis"] .primary:hover { filter: brightness(1.12); box-shadow: 0 4px 12px color-mix(in srgb, var(--mis-navy) 28%, transparent); }
:root[data-prod="mis"] .ghost { background: var(--surface); border-color: var(--line-2); }
:root[data-prod="mis"] .seg { background: var(--surface); border: 1px solid var(--line-2); }
:root[data-prod="mis"] .seg button.on { background: var(--brand); color: var(--brand-ink) !important; }
:root[data-prod="mis"] :is(select, input, textarea) { border-color: var(--line-2); }

/* ── cards: white, hairline border, soft shadow ── */
:root[data-prod="mis"] .card, :root[data-prod="mis"] .table-wrap.card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); }
:root[data-prod="mis"] .mis-format, :root[data-prod="mis"] .scr-pane, :root[data-prod="mis"] .next { border: 1px solid var(--line); box-shadow: var(--shadow); }
:root[data-prod="mis"] .mis-client:hover { border-color: var(--line-2); }
:root[data-prod="mis"] .mis-mono { background: var(--mis-band); color: #fff; }
:root[data-prod="mis"] .modal { border-top: 3px solid transparent; border-image: var(--mis-grad) 1; }
:root[data-prod="mis"] #main section.card, :root[data-prod="mis"] .mis-bridge-card { padding: 20px; margin-bottom: 16px; }
:root[data-prod="mis"] #main h3 { color: var(--ink); }

/* ── report tabs (tablet) and the report picker (phone) ── */
:root[data-prod="mis"] .mis-tabs { margin: 0 0 16px; border-bottom: 1px solid var(--line-2); }
:root[data-prod="mis"] .mis-tabs a { color: var(--ink-2); }
:root[data-prod="mis"] .mis-tabs a.on { color: var(--mis-head-ink); border-bottom-color: var(--mis-mint); font-weight: 700; }
:root[data-prod="mis"] .mis-tabsel { margin: 0 0 12px; }
:root[data-prod="mis"] .mis-tabsel select { border-color: var(--line-2); background-color: var(--surface); color: var(--mis-head-ink); box-shadow: var(--shadow); }

/* ── controls row (css/mis-ux-head.css has its layout) ── */
:root[data-prod="mis"] .mis-bar { margin: 0 0 16px; }

/* ══ Overview figure cards: separate white cards, navy figures, a blue → teal line on the first ═════════════ */
:root[data-prod="mis"] .mis-kpis, :root[data-prod="mis"] .mis-led { gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
:root[data-prod="mis"] .mis-kpis .tile, :root[data-prod="mis"] .mis-led .tile, :root[data-prod="mis"] .mis-kpis .tile:first-child {
  position: relative; overflow: hidden; padding: 16px 18px; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
:root[data-prod="mis"] .mis-kpis .tile:first-child::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--mis-grad); }
:root[data-prod="mis"] .mis-kpis .tile span, :root[data-prod="mis"] .mis-led .tile span { color: var(--ink-3); font-weight: 600; }
:root[data-prod="mis"] .mis-kpis .tile b, :root[data-prod="mis"] .mis-led .tile b { color: var(--mis-head-ink); }
:root[data-prod="mis"] .mis-kpis .tile.red b { color: var(--mis-loss); }
:root[data-prod="mis"] .mis-phone .mp-card, :root[data-prod="mis"] .mis-phone .mp-chart { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
:root[data-prod="mis"] .mis-phone .mp-card b { color: var(--mis-head-ink); }
:root[data-prod="mis"] .mis-phone .mp-card.neg b { color: var(--mis-loss); }

/* charts: navy totals and revenue, teal marks for costs and the margin line, red for a loss */
:root[data-prod="mis"] .mis-bridge .b.tot, :root[data-prod="mis"] .mis-trend .rev, :root[data-prod="mis"] .key.rev { fill: var(--mis-navy); }
:root[data-prod="mis"] .key.rev { background: var(--mis-navy); }
:root[data-prod="mis"] .mis-bridge .b.cost { fill: var(--mis-mint); opacity: .32; }
:root[data-prod="mis"] .mis-bridge .b.neg, :root[data-prod="mis"] .mis-bridge text.v.neg { fill: var(--mis-loss); }
:root[data-prod="mis"] .mis-trend .cm3, :root[data-prod="mis"] .mis-trend .cm3d { stroke: var(--mis-mint); }
:root[data-prod="mis"] .mis-trend text.p { fill: var(--mis-teal); }
:root[data-prod="mis"] .key.cm3 { background: var(--mis-mint); }
:root[data-prod="mis"] .mis-phone .mp-bar { fill: var(--mis-navy); opacity: .35; }
:root[data-prod="mis"] .mis-phone .mp-bar.last { fill: var(--mis-navy); opacity: 1; }

/* ══ crisp tables: navy header text on a pale band, hairline rows, tabular figures, teal total line ═════════ */
:root[data-prod="mis"] .table-wrap.mis-sheet { border-radius: var(--radius); }
:root[data-prod="mis"] .mis-tbl { font-size: .86rem; }
:root[data-prod="mis"] .mis-tbl thead th, :root[data-prod="mis"] .mis-tbl thead th:first-child {
  background: var(--surface-2); color: var(--mis-head-ink); font-size: .75rem; font-weight: 700; letter-spacing: .01em;
  border-bottom: 1px solid var(--line-2); padding-top: 11px; padding-bottom: 11px;
}
:root[data-prod="mis"] .mis-tbl tbody th, :root[data-prod="mis"] .mis-tbl tbody td { border-bottom: 1px solid var(--line); }
:root[data-prod="mis"] .mis-tbl td { font-variant-numeric: tabular-nums; }
:root[data-prod="mis"] .mis-tbl tr.sub th, :root[data-prod="mis"] .mis-tbl tr.sub td { border-top: 1px solid var(--line-2); color: var(--ink); }
:root[data-prod="mis"] .mis-tbl tr.final th, :root[data-prod="mis"] .mis-tbl tr.final td { background: var(--gold-soft); color: var(--mis-head-ink); border-top: 1px solid var(--mis-teal); border-bottom: 3px double var(--mis-teal); }
:root[data-prod="mis"] .mis-tbl tbody th .link { color: var(--ink); }
:root[data-prod="mis"] .mis-tbl tbody tr:is(.kid, .kid2, .grpx, .bs-led, .pl3-led, .ff-acc) th .link { color: var(--ink-2); }
:root[data-prod="mis"] .mis-tbl td.drill:hover { color: var(--mis-link); text-decoration-color: var(--mis-link); }
:root[data-prod="mis"] .mis-tbl .exp .ic { color: var(--mis-teal); }
:root[data-prod="mis"] .mis-tbl tr.subx th { box-shadow: none; }
:root[data-prod="mis"] .mis-tbl tbody tr.kcur > th, :root[data-prod="mis"] .mis-tbl tbody tr.kcur > td { background: var(--mis-teal-soft); }
:root[data-prod="mis"] .mis-tbl tbody tr.kcur > th { box-shadow: inset 3px 0 0 var(--mis-mint); }
@media (hover: hover) { :root[data-prod="mis"] .mis-tbl tbody tr:hover > :is(th, td):not(.tot) { background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); } }
:root[data-prod="mis"] .tbl thead th { color: var(--mis-head-ink); font-weight: 700; }
:root[data-prod="mis"] .tbl td { border-bottom-color: var(--line); }
:root[data-prod="mis"] .ff-tbl tr.ff-more th .link { color: var(--mis-link); }

/* ── clear number colours: green up, red down ── */
:root[data-prod="mis"] .mis-ly .mis-tbl td.ly-pct.ly-up, :root[data-prod="mis"] .mis-ly .mis-tbl td.ly-chg:has(+ td.ly-up) { color: var(--mis-up); font-weight: 600; }
:root[data-prod="mis"] .mis-ly .mis-tbl td.ly-pct.ly-down, :root[data-prod="mis"] .mis-ly .mis-tbl td.ly-chg:has(+ td.ly-down) { color: var(--mis-loss); font-weight: 600; }
:root[data-prod="mis"] .mis-phone .mp-d.good { color: var(--mis-up); }
:root[data-prod="mis"] .mis-phone .mp-d.bad { color: var(--mis-loss); }
:root[data-prod="mis"] .mis-status .pill.ok { color: var(--mis-up); }

/* ── selected chips and cards: soft teal with a teal edge ── */
:root[data-prod="mis"] .ck-chip.on, :root[data-prod="mis"] .scr-filt .chip.on { background: var(--mis-teal-soft); border-color: var(--mis-mint); color: var(--mis-head-ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--mis-mint); }
:root[data-prod="mis"] .ck-chip.on b { color: var(--mis-head-ink); }
:root[data-prod="mis"] .ck-chip.on .ck-dot { box-shadow: 0 0 0 2px var(--mis-teal-soft); }
:root[data-prod="mis"] .radio-card:has(input:checked) { border-color: var(--mis-mint); background: var(--mis-teal-soft); }
:root[data-prod="mis"] .mis-stmt tr:has([data-pick]:checked), :root[data-prod="mis"] .mis-stmt tr:has([data-pick]:checked) td { background: var(--mis-teal-soft); }

/* ── Checks ── */
:root[data-prod="mis"] .ck-sec { padding: 18px 20px; }

/* ── Reports ── */
:root[data-prod="mis"] .mis-rep-card { border-color: var(--line); border-radius: 12px; box-shadow: var(--shadow); }
@media (hover: hover) { :root[data-prod="mis"] .mis-rep-card:hover { border-color: var(--mis-mint); background: var(--surface); } }
:root[data-prod="mis"] .mis-rep-card b { color: var(--mis-head-ink); }
:root[data-prod="mis"] .mis-rep-card.on { border-color: var(--mis-mint); background: var(--mis-teal-soft); box-shadow: inset 3px 0 0 var(--mis-mint); }
:root[data-prod="mis"] .mis-rep-form, :root[data-prod="mis"] .mis-ask-res { border-top: 1px solid var(--line); box-shadow: var(--shadow), inset 0 3px 0 var(--mis-mint); }
:root[data-prod="mis"] .mis-rep-h { color: var(--ink-3); }

/* ── Ask: a white box with a blue focus ring; examples as quiet chips ── */
:root[data-prod="mis"] .mis-ask { background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow); }
:root[data-prod="mis"] .mis-ask:focus-within { border-color: var(--mis-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mis-blue) 18%, transparent); }
:root[data-prod="mis"] .mis-ask-ex { background: var(--surface); border: 1px solid var(--line-2); color: var(--mis-head-ink); }
@media (hover: hover) { :root[data-prod="mis"] .mis-ask-ex:hover { border-color: var(--mis-mint); background: var(--mis-teal-soft); } }

/* ── bars that follow the page sit under the app bar (and the report control bar) ── */
:root[data-prod="mis"] .mis-bulkbar { top: calc(var(--top-h) + var(--demo-h, 0px) + var(--pin-h) + 8px); background: var(--mis-navy-d); border-color: var(--mis-navy-d); color: #fff; }
:root[data-prod="mis"] .mis-bulkbar button { color: #fff; border-color: rgba(255, 255, 255, .4); background: transparent; }
:root[data-prod="mis"] .mis-bulkbar button.primary { background: var(--mis-mint-l); border-color: var(--mis-mint-l); color: #0e1a3a; box-shadow: none; }
:root[data-prod="mis"] { scroll-padding-top: calc(var(--top-h) + var(--demo-h, 0px) + var(--pin-h) + 12px); }

/* ══ phone ═══════════════════════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Ask: the question gets its own full line; Ask and Saved reports share the line below */
  :root[data-prod="mis"] .mis-askbox .mis-ask { flex-wrap: wrap; padding: 4px; }
  :root[data-prod="mis"] .mis-askbox .mis-ask input { flex: 1 1 100%; min-width: 0; min-height: 44px; }
  :root[data-prod="mis"] .mis-askbox .mis-ask button { flex: 1 1 0; min-height: 40px; padding: 0 12px; }
}
@media (max-width: 600px) {
  :root[data-prod="mis"] #main section.card, :root[data-prod="mis"] .mis-bridge-card { padding: 16px; }
  :root[data-prod="mis"] .mis-kpis .tile, :root[data-prod="mis"] .mis-led .tile, :root[data-prod="mis"] .mis-kpis .tile:first-child { padding: 13px 14px; }
  :root[data-prod="mis"] .mis-kpis, :root[data-prod="mis"] .mis-led { gap: 8px; }
  :root[data-prod="mis"] .ck-sec { padding: 14px 16px; }
}

/* Balance sheet on a laptop (UX review 2, 7 Nov 2026, R3): a wider label column, so a line such as "Property, plant and
   equipment and intangible assets" stays on one line where the table has room – from 1280 px, up to 8 amount columns
   (7 months + last year end); a full year of 12 months keeps the narrower column, so the table needs no side-scroll */
@media (min-width: 1280px) {
  :root[data-prod="mis"] .mis-tbl.bs-tbl:not(:has(thead th:nth-child(10))) :is(tbody th, thead th:first-child) { min-width: 25rem; }
}

/* ── zzz-review-fixes.css ── */
/* UI review fixes (31 Oct 2026, phone screenshots): losses in red, even button rows with no orphan, the report
   header that stays in view, row names that do not wrap to three lines. Loads after zz-mis-theme.css. */

/* ── P&L / Balance sheet: a result line below zero (CM1 … profit after tax, their %, Reserves and surplus) in red ── */
:root[data-prod="mis"] .mis-tbl tbody tr td.num.neg { color: var(--mis-loss); font-weight: 600; }

/* ── report header: moved down by stickyHeads() in mis.js while the page scrolls; a hairline shadow when it floats ── */
:root[data-prod="mis"] .mis-tbl thead th { will-change: transform; }
:root[data-prod="mis"] .mis-tbl thead.stuck th { box-shadow: 0 1px 0 var(--line-2), 0 6px 8px -6px rgba(14, 26, 58, .18); }

/* ── Checks: action buttons pushed to the right on wide screens ── */
.mis-acts > :is(button, a.btn):first-of-type { margin-left: auto; }

/* ── Overview: a heading with its period and unit as small text beside it ── */
.mis-h-sub small { font-size: .78rem; font-weight: 500; color: var(--ink-3); margin-left: 6px; white-space: nowrap; }

/* ── Zentra Admin → Claude for MIS: Save, Test and Remove the same width on one line ── */
#claudeKey .ck-btns { display: flex; gap: 8px; margin-top: 8px; }
#claudeKey .ck-btns.n3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#claudeKey .ck-btns.n3 button { justify-content: center; padding-left: 6px; padding-right: 6px; white-space: nowrap; }

/* ── Connect Claude: a page of its own, no bottom bar; the last line lines up with the text above ── */
:root:has(#main .mcpc) .bottombar { display: none; }
.mcpc .next { padding-left: 0; padding-right: 0; background: none; border: 0; }

/* ── demo bar: "View as" never breaks ── */
.demo-bar .demo-as { white-space: nowrap; }

/* Checks: the level chips carry the section names, so on a phone they sit two by two */
@media (max-width: 560px) {
  .ck-lv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ck-lv .ck-chip { justify-content: center; white-space: nowrap; }
}

@media (max-width: 480px) {
  /* P&L / Balance sheet: wider name column so a line name takes at most two lines */
  :root[data-prod="mis"] .mis-tbl tbody th, :root[data-prod="mis"] .mis-tbl thead th:first-child { min-width: 9.5rem; max-width: 10.5rem; }

  /* Checks: action buttons two to a row; an odd last one takes the full row */
  .mis-find .mis-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mis-find .mis-acts > :is(button, a.btn) { margin: 0; width: 100%; justify-content: center; padding-left: 6px; padding-right: 6px; }
  .mis-find .mis-acts > :is(.chip, .ck-dec) { grid-column: 1 / -1; justify-self: start; }
  .mis-find .mis-acts > :is(button, a.btn):last-child:nth-of-type(odd) { grid-column: 1 / -1; }
  /* entry links: one per line */
  .mis-find button.link[data-vch] { flex-basis: 100%; text-align: left; justify-content: flex-start; }

  /* GST returns: the two buttons share one row; the four views sit evenly across */
  .mis-gst > .row:first-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mis-gst > .row:first-child h3 { grid-column: 1 / -1; }
  .mis-gst > .row:first-child > :is(.btn, button) { width: 100%; justify-content: center; text-align: center; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
  .mis-gst #gstView { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 1 1 100%; }
  .mis-gst #gstView button { justify-content: center; padding-left: 4px; padding-right: 4px; font-size: .8rem; white-space: nowrap; }

  /* Ask: example questions two to a row; an odd last one takes the full row */
  .mis-ask-exs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .mis-ask-exs .mis-ask-ex { justify-content: center; text-align: center; white-space: normal; }
  .mis-ask-exs .mis-ask-ex:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ── DayClose / Storix dashboard tiles: titles wrap in even lines (tablet UI review, 16 Nov 2026 – all widths) ── */
.dash-tiles .tile > span { text-wrap: balance; }

/* ── zzzz-tablet.css ── */
/* Tablets (Android tab in Chrome, iPad – 768 px portrait, 1024 px landscape; 15 Nov 2026, tests/ui/layout-tablet.mjs).
   Phone (≤ 640 px) and laptop (≥ 1280 px) keep their own look. Loads last. */

/* ── plain tables wider than their box (fitTables in main.js): tighter cells, else small cards as on a phone ── */
@media (min-width: 641px) and (max-width: 1279px) {
  .tbl.fit-c th, .tbl.fit-c td { padding-left: 8px; padding-right: 8px; }
  .tbl.fit-c th { white-space: normal; }
  .table-wrap.card:has(> table.fit-t) { overflow: visible; }
  table.fit-t thead, table.fit-t colgroup { display: none; }
  table.fit-t, table.fit-t tbody, table.fit-t tfoot { display: block; width: 100%; }
  table.fit-t tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
  table.fit-t tbody tr:first-child { border-top: 0; }
  table.fit-t td, table.fit-t th { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; min-width: 0; overflow-wrap: anywhere; white-space: normal !important; }
  table.fit-t td:first-child { grid-column: 1 / -1; font-weight: 600; }
  table.fit-t td[colspan] { grid-column: 1 / -1; }
  table.fit-t td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
  table.fit-t td:empty { display: none; }
  table.fit-t tfoot tr { background: var(--surface-2); }
  table.fit-t .chip, table.fit-t .st, table.fit-t span { white-space: normal; max-width: 100%; }
}

/* ── filter chips and kinds: wrap onto a second line instead of hiding part of the row past the edge ── */
@media (min-width: 641px) and (max-width: 1279px) {
  .chips, .pl-types, .seg.scroll { flex-wrap: wrap; overflow-x: visible; }
  .seg.scroll > a, .seg.scroll > button { flex: 0 1 auto; }
}

/* ── MIS client tabs: portrait tablet has no side menu and the ten tabs do not fit – the list, as on a phone ── */
@media (min-width: 641px) and (max-width: 899px) {
  .mis-tabs { display: none; }
  .mis-tabsel { display: block; margin: 0 0 12px; } .mis-tabsel select { width: 100%; font-weight: 600; }
}

/* ── MIS Review: Entry log / + New journal on their own line above the status tabs, so all five tabs show ── */
@media (min-width: 721px) and (max-width: 1279px) {
  .rv-head { flex-direction: column-reverse; align-items: stretch; gap: 4px; }
  .rv-tools { justify-content: flex-end; padding: 0; }
}

/* ── Payment types (PayFlow masters): eight columns do not fit – one card per type, two lines of fields ── */
@media (min-width: 641px) and (max-width: 1279px) {
  .mtbl thead { display: none; }
  .mtbl tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 16px; padding: 14px 16px; border-top: 1px solid var(--line); }
  .mtbl tbody tr:first-child { border-top: 0; }
  .mtbl td { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 !important; border: 0 !important; text-align: left !important; min-width: 0; }
  .mtbl td.c-no { display: none; }
  .mtbl td.c-name, .mtbl td.c-doc { grid-column: span 3; align-items: stretch; }
  .mtbl td.c-wide { grid-column: span 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
  .mtbl td.c-wide::before { width: 100%; }
  .mtbl td input:not([type=checkbox]) { min-width: 0 !important; width: 100%; }
  .mtbl td[data-l]::before { content: attr(data-l); font-size: 12px; color: var(--ink-3); }
  .mtbl td.c-chk input[type=checkbox] { width: 22px; height: 22px; margin: 4px 0 0; }
}

/* ── MIS Trial balance (landscape tablet beside the side menu): date headings on two lines, tighter cells ── */
@media (min-width: 641px) and (max-width: 1279px) {
  :root[data-prod="mis"] #main table.scr-tb thead .scr-at { display: block; white-space: nowrap; } /* the date under Opening / Closing */
  :root[data-prod="mis"] #main table.scr-tb thead .scr-sep { display: none; }
  :root[data-prod="mis"] #main table.scr-tb :is(tbody th, tfoot th, thead th:first-child) { min-width: 150px; }
  :root[data-prod="mis"] #main table.scr-tb thead th, :root[data-prod="mis"] #main table.scr-tb td { padding-left: 8px; padding-right: 8px; }
}

/* ── MIS Ask: example questions three to a row (no question left alone on a line) ── */
@media (min-width: 641px) and (max-width: 1279px) {
  .mis-ask-exs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .mis-ask-exs .mis-ask-ex { justify-content: center; text-align: center; white-space: normal; }
}

/* ── GSTR-1 upload: the channel name above its files, so the file rows keep their columns ── */
@media (min-width: 641px) and (max-width: 1279px) {
  #misGst1 .g1-ch { grid-template-columns: minmax(0, 1fr); }
  #misGst1 .g1-chh { padding: 12px 16px 4px; flex-direction: row; align-items: baseline; gap: 8px; }
  #misGst1 .g1-slot { padding: 8px 16px; }
  #misGst1 .g1-chl .g1-slot:first-child { border-top: 0; }
}

/* ── Storix → Masters → Items: search across the row, the three buttons the same width below it ── */
@media (min-width: 641px) and (max-width: 1279px) {
  #main .row.wrapr:has(> #dl):has(> #ul):has(> #add) > label.field { flex: 1 1 100%; }
  #main .row.wrapr:has(> #dl):has(> #ul):has(> #add) > button { flex: 1 1 0; justify-content: center; }
}

/* ── tables as cards / payment type cards: no grey patches under the finger (row hover is for a mouse) ── */
@media (min-width: 641px) and (max-width: 1279px) {
  table.fit-t tbody tr:hover td, .mtbl tbody tr:hover td { background: none; }
}

/* ── Employee details → Verify, landscape beside the side menu: a narrower name column so the values do not wrap ── */
@media (min-width: 1001px) and (max-width: 1279px) {
  .kq-det dt { flex-basis: 112px; }
}

/* ── MIS Review: Severity fits beside the kinds on one line ── */
@media (min-width: 721px) and (max-width: 1279px) {
  #main .rv-sev select { max-width: 132px; }
}

/* ── a finger, not a mouse: every button, list and box at least 40 px tall (the laptop sizes are 26–34 px) ── */
@media (min-width: 641px) and (max-width: 1279px) and (pointer: coarse) {
  :is(#main, .topbar, .modal) :is(button, a.btn, label.btn):not(.link, .linkbtn, .rv-t, .avatar):not(:is(.grid-wrap, .sg, .attwrap, .lvcal, .kq-steps, .kq-thumbs, .ta-list) *) { min-height: 40px !important; min-width: 40px; }
  :is(#main, .modal) :is(select, input:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=range])):not(:is(.grid-wrap, .sg, .attwrap) *) { min-height: 40px !important; }
}

/* ── DayClose / Storix dashboard tiles: no tile left alone on the last line ── */
@media (min-width: 560px) and (max-width: 899px) {
  .dash-tiles > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; } /* two to a row: an odd last one across the row */
}
@media (min-width: 900px) and (max-width: 1199px) {
  .dash-tiles:is(:has(> .tile:nth-child(4):last-child), :has(> .tile:nth-child(7):last-child), :has(> .tile:nth-child(8):last-child)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash-tiles:has(> .tile:nth-child(4):last-child) .tile b { font-size: 1.35rem; }
}

/* ═══ UI review of the tablet screenshots (16 Nov 2026) ═══ */

/* 1 · Employees: a table, not cards – Code, Name, Status, Category, Location, Monthly pay, Edit (Joined, PF and
   PT state are in the employee's own page and on the laptop) */
@media (min-width: 641px) and (max-width: 1279px) {
  .tbl :is(th, td).tab-off { display: none; }
}

/* 2, 3 · the bar with the main button (Submit day-end, Save …, Send for approval): across the whole page width at the
   bottom of the screen, its buttons in line with the cards, and room under the page so the last boxes scroll above it */
@media (min-width: 641px) and (max-width: 1279px) {
  #main .sticky-actions, body.on-form #main .paybar { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); z-index: 15; margin: 0; padding: 10px 16px; border-radius: 0; border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -6px 20px rgba(27, 31, 59, .08); }
  body:has(#main .sticky-actions:not([hidden])) #main, body.on-form:has(#main .paybar) #main { padding-bottom: calc(110px + 72px); }
  body.on-form:has(#main .paybar) .powered { display: none; }
}
@media (min-width: 900px) and (max-width: 1279px) {
  #main .sticky-actions, body.on-form #main .paybar { left: var(--nav-w); bottom: 0; padding: 10px 32px; }
  body.wide #main .sticky-actions, body.wide.on-form #main .paybar { left: 0; }
  :root.zen body.on-form #main .paybar { padding-left: max(32px, calc((100vw - var(--nav-w) - 680px) / 2)); padding-right: max(32px, calc((100vw - var(--nav-w) - 680px) / 2)); } /* PayFlow forms are 680 px wide */
  body:has(#main .sticky-actions:not([hidden])) #main, body.on-form:has(#main .paybar) #main { padding-bottom: calc(60px + 72px); }
}

/* 4 · Verify (portrait): documents and details side by side, as on a laptop */
@media (min-width: 721px) and (max-width: 1000px) {
  .kq-cols { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .kq-det dt { flex-basis: 112px; }
}

/* 5 · DayClose: "Enter day-end" is on the page – no round + button for the same thing */
@media (min-width: 641px) and (max-width: 1279px) {
  body:has(#main a.btn.primary[href="#/dc/day"]) .fab { display: none !important; }
}

/* 6 · Payment types: every tick box on one line at the bottom of its field, whether its name takes one line or two */
@media (min-width: 641px) and (max-width: 1279px) {
  .mtbl td { justify-content: flex-end; }
  .mtbl td.c-wide { justify-content: flex-start; align-content: flex-end; }
}

/* 7 · a filter row of three (Employees: Category, Status, Search): three across, none alone on a second line */
@media (min-width: 641px) and (max-width: 899px) {
  .rep-form:has(> .field:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 8 · Salary sheet: a soft shadow on the right edge while more columns are to the right (.edge-r, main.js) */
@media (min-width: 641px) and (max-width: 1279px) {
  :has(> .sg.edge-r) { position: relative; }
  :has(> .sg.edge-r)::after { content: ""; position: absolute; top: 1px; right: 1px; bottom: 1px; width: 22px; border-radius: 0 8px 8px 0; background: linear-gradient(to left, rgba(20, 32, 51, .18), rgba(20, 32, 51, 0)); pointer-events: none; z-index: 5; }
}

/* 10 · MIS Review: the line under a finding breaks between its parts and in two even lines (no "bill ₹60,000" alone);
   the "i" is a 40 px target for a finger */
@media (min-width: 641px) and (max-width: 1279px) {
  .rv-m { display: block; text-wrap: balance; }
  .rv-m .rv-mp { white-space: nowrap; }
}
@media (min-width: 641px) and (max-width: 1279px) and (pointer: coarse) {
  .rv-i { position: relative; }
  .rv-i::before { content: ""; position: absolute; inset: -12px; }
}

/* 11 · Ledger by month: the Opening balance row one colour from the Month cell to the balance */
@media (min-width: 641px) and (max-width: 1279px) {
  :root[data-prod="mis"] #main .mis-tbl tr.scr-ob > :is(th, td) { background: var(--surface-2); }
}

/* 12 · Employee details: the same boxed back button as PayFlow */
@media (min-width: 641px) and (max-width: 1279px) {
  .kq-back { width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0 0 4px; margin-right: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink-2); font-size: 1.6rem; line-height: 1; }
}

/* ── zzzzz-nav-rail.css ── */
/* Zentra navigation (owner, 20 Nov 2026 – "Ha ye UI better hai"; mock and decisions: Zentra-Navigation-Decisions.md).
   Laptop and tablet (≥ 721 px): a 76 px rail with labels; the top line holds Product / Page, the company or client
   switcher and the page's own buttons; content up to 1280 px. Tablet (721–1099 px): short breadcrumb, icon-only
   buttons. Phone (≤ 720 px): a bottom bar (Home, All tools, Alerts, Me). All tools slides over the page (full screen
   on a phone). Markup: nav-rail.js and main.js renderShell(). Loads after every other sheet (name order), so the
   rules of the old side menu and app bar in the earlier sheets give way. */

:root {
  --rail: 0px; --bottom-h: 64px;
  --zr-teal: #0c6e5f; --zr-teal-soft: #e3f7f2; --zr-tint: #eef3fc; --zr-navy: #0b2a7a; --zr-tip: #0e1a3a; --zr-hover: #f3f6fb; --zr-red: #c62828;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --zr-teal: #5fd4bd; --zr-teal-soft: #123a33; --zr-tint: #1b2a4a; --zr-navy: #a9c1ff; --zr-tip: #26334a; --zr-hover: #1d2840; }
}
:root[data-theme="dark"] { --zr-teal: #5fd4bd; --zr-teal-soft: #123a33; --zr-tint: #1b2a4a; --zr-navy: #a9c1ff; --zr-tip: #26334a; --zr-hover: #1d2840; }

.zi { width: 20px; height: 20px; flex: none; }
.zbadge { position: absolute; top: -4px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--zr-red); color: #fff;
  font: 700 10.5px/14px var(--font, system-ui); text-align: center; border: 2px solid var(--surface); font-variant-numeric: tabular-nums; box-sizing: border-box; }
.zav { width: 30px; height: 30px; border-radius: 50%; background: var(--zr-teal-soft); color: var(--zr-teal); display: grid; place-items: center; font: 700 11.5px/1 var(--font, system-ui); letter-spacing: .02em; }

/* ── rail (laptop, tablet) ── */
.zrail { display: none; }
@media (min-width: 721px) {
  :root { --rail: 76px; --nav-w: 76px; --bottom-h: 0px; }
  .zrail { position: fixed; top: var(--demo-h, 0px); bottom: 0; left: 0; z-index: 30; width: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 12px 0; background: var(--surface); border-right: 1px solid var(--line); box-sizing: border-box; }
  .zrail .zr-logo { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 6px; flex: none; border-radius: 10px; }
  .zrail .zr-sep { width: 32px; height: 1px; background: var(--line); margin: 5px 0; flex: none; }
  .zrail .zr-pins { display: contents; }
  .zrail .zr-grow { flex: 1 1 auto; min-height: 8px; }
  .zrail .rb { position: relative; width: 68px; min-height: 0; padding: 4px 0 5px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-2);
    border: 0; border-radius: 12px; background: none; box-shadow: none; text-decoration: none; font: inherit; flex: none; cursor: pointer; }
  .zrail .rb .ib { position: relative; width: 44px; height: 32px; border-radius: 10px; display: grid; place-items: center; transition: background-color .12s; }
  .zrail .rb .zi { width: 22px; height: 22px; }
  .zrail .rb .lb { max-width: 68px; overflow: hidden; text-overflow: ellipsis; font: 600 11px/1.15 var(--font, system-ui); white-space: nowrap; }
  .zrail .rb:hover { color: var(--ink); }
  .zrail .rb:hover .ib { background: var(--zr-hover); }
  .zrail .rb.on { color: var(--zr-teal); }
  .zrail .rb.on .ib { background: var(--zr-teal-soft); }
  .zrail .rb:focus-visible { outline: 2px solid var(--brand); outline-offset: 0; }
  .zrail .ztip { position: absolute; left: 66px; top: 50%; transform: translateY(-50%); background: var(--zr-tip); color: #fff; padding: 7px 11px; border-radius: 8px;
    font: 600 13px/1.25 var(--font, system-ui); white-space: nowrap; text-align: left; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 5; }
  .zrail .ztip small { font-weight: 500; font-size: 13px; color: #aab6d3; }
  .zrail .ztip::before { content: ""; position: absolute; left: -4px; top: 50%; width: 8px; height: 8px; background: var(--zr-tip); transform: translateY(-50%) rotate(45deg); border-radius: 1px; }
  .zrail .rb:hover .ztip, .zrail .rb:focus-visible .ztip { opacity: 1; }
  /* a short laptop screen: smaller steps, then icons with their tip only */
  @media (max-height: 760px) {
    .zrail { padding: 8px 0; gap: 0; }
    .zrail .zr-logo { margin-bottom: 2px; }
    .zrail .rb { padding: 3px 0; gap: 2px; }
    .zrail .rb .ib { height: 28px; }
    .zrail .zr-sep { margin: 3px 0; }
  }
  @media (max-height: 620px) {
    .zrail .rb .lb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .zrail .rb { padding: 2px 0; }
  }
  @media (prefers-reduced-motion: reduce) { .zrail .ztip, .zrail .rb .ib { transition: none; } }

  /* the page sits right of the rail, centred, up to 1280 px */
  .app { padding-left: var(--rail); }
  :root[data-prod] #main:not(.sheetpage):not(:has(#misScrutiny)) { margin-left: auto; margin-right: auto; max-width: 1280px; }
  :root[data-prod] #main.sheetpage, :root[data-prod] #main:has(#misScrutiny) { margin-left: 0; margin-right: 0; max-width: none; }
  :root[data-prod] .powered { margin-left: 0; }
  /* Payroll's Full screen hides the rail too */
  body.wide .zrail { display: none; }
  body.wide .app { padding-left: 0; }
  body.wide #main .sticky-actions, body.wide.on-form #main .paybar { left: 0; }
}
/* 721–899 px used to be the phone layout (bottom bar); now it has the rail */
@media (min-width: 721px) and (max-width: 899px) {
  :root[data-prod] #main { padding: 24px 24px 48px; }
  #main .sticky-actions, body.on-form #main .paybar { left: var(--rail); }
  .fab { display: none; } /* the page's main button sits in the top line, as on a laptop */
  .hide-mobile { display: inline-flex; }
}

/* ── top line ── */
.topbar { display: block; height: auto; padding: 0; }
.topbar .top-in { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar .crumbs { display: flex; align-items: baseline; gap: 10px; min-width: 0; font: 600 22px/1.2 var(--font, system-ui); letter-spacing: -.015em; white-space: nowrap; color: var(--ink); }
.topbar .crumbs .c-prod { color: var(--ink-3); font-weight: 500; text-decoration: none; }
.topbar .crumbs .c-prod:hover { color: var(--ink); }
.topbar .crumbs .sl { color: var(--line-2); font-weight: 400; }
.topbar .crumbs .c-sec { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar .crumbs:empty { display: none; }
/* the page's own heading when it repeats the top line ("PayFlow / Requests" – UI review, 21 Nov 2026) */
#main .zr-dup { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; }
#main .page-head.zr-empty { margin: 0; min-height: 0; gap: 0; }
#main .sx-bar:has(> b.zr-dup:only-child) { display: none; } /* Sales: the bar held only the title */
.ztools .zt-edit { color: var(--zr-teal) !important; }
.topbar .top-push { flex: 1 1 auto; }
/* the company (several companies: a switcher) – the same box as the MIS client switcher */
.topbar .top-co, :root .topbar .top-client { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 40px; min-width: 0; max-width: 320px; margin: 0;
  padding: 0 12px 0 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font, system-ui); box-sizing: border-box; flex: 0 1 auto; }
.topbar .top-co[hidden] { display: none; }
.topbar .top-co:not(.can) { cursor: default; } /* one company: the same box, nothing to switch to */
.topbar :is(.top-co, .top-client) .cl { width: 28px; height: 28px; border-radius: 7px; background: var(--zr-navy); color: #fff; display: grid; place-items: center; font: 700 13px/1 var(--font, system-ui); flex: none; }
:root[data-theme="dark"] .topbar :is(.top-co, .top-client) .cl { color: #0b1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar :is(.top-co, .top-client) .cl { color: #0b1220; } }
.topbar .top-co .nm, :root .topbar .top-client .mm-nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px/1.2 var(--font, system-ui); color: var(--ink); letter-spacing: 0; }
.topbar .top-co .car, :root .topbar .top-client .mm-car .ic { width: 18px; height: 18px; color: var(--ink-3); flex: none; vertical-align: 0; }
:root .topbar .top-client .mm-car { display: inline-flex; font-size: 0; }
:root .topbar .top-client .mm-car[hidden] { display: none; }
.topbar .top-co select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.topbar .top-co.can:hover, :root .topbar .top-client.mm-can:hover { border-color: var(--ink-3); background: var(--surface); }
.topbar .top-co.can:has(select:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }
.topbar.has-ctx .top-co { display: none; } /* an MIS client page names the client, not the firm */
/* MIS: the client and "● Synced 4 min ago" sit in the line (main.js #topCtx is only their holder) */
:root .topbar .top-ctx:not([hidden]) { display: contents; }
:root .topbar .top-client { order: 1; }
:root .topbar .top-push { order: 2; }
:root .topbar .top-sync { order: 3; color: var(--ink-3); font-size: 13.5px; }
:root .topbar .top-actions { order: 4; display: flex; align-items: center; gap: 10px; flex: none; }
:root .topbar #topTools { display: flex; align-items: center; gap: 10px; margin: 0; }
:root .topbar #topTools:empty, :root .topbar #topNew:empty { display: none; }
:root .topbar #topTools button { height: 40px; min-height: 40px; padding: 0 16px; gap: 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
:root .topbar #topTools button:hover { border-color: var(--ink-3); }
:root .topbar #topTools button .ic { width: 18px; height: 18px; vertical-align: 0; }
:root .topbar #topNew .btn { min-height: 40px; height: 40px; border-radius: 10px; }

@media (min-width: 721px) {
  :root[data-prod] { --top-h: 68px; }
  :root .topbar { position: sticky; top: var(--demo-h, 0px); z-index: 20; }
  .topbar .top-in { max-width: 1280px; margin: 0 auto; height: var(--top-h); padding: 0 32px; box-sizing: border-box; }
  body.wide .topbar .top-in, .topbar:has(~ #main.sheetpage) .top-in { max-width: none; }
}
@media (min-width: 721px) and (max-width: 899px) { .topbar .top-in { padding: 0 24px; } }
/* tablet: the page name alone; Sync and Open Tally keep their words at 1024 and become icons below 900 px (their name
   stays for screen readers and the tip – one name for the action, UI review 3) */
@media (min-width: 721px) and (max-width: 1099px) {
  .topbar .crumbs .c-prod, .topbar .crumbs .sl { display: none; }
  .topbar .top-in { gap: 12px; }
  :root .topbar #topTools button { padding: 0 12px; }
  .topbar .top-co, :root .topbar .top-client { max-width: 280px; }
}
@media (min-width: 721px) and (max-width: 899px) {
  :root .topbar #topTools button { width: 40px; padding: 0; justify-content: center; }
  :root .topbar #topTools button .t { display: none; }
  :root .topbar .top-sync .ts-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ── phone: the top line stays at the top (as in the mock) – the page name, the client and Sync on MIS; a page that
   shows its own heading needs no top line (it is left out when it would be empty) ── */
@media (max-width: 720px) {
  :root .topbar { position: sticky; top: var(--demo-h, 0px); z-index: 20; }
  .topbar .top-in { flex-wrap: wrap; gap: 6px 10px; padding: 10px 16px 8px; }
  .topbar .crumbs { flex: 1 1 0; font-size: 20px; line-height: 26px; }
  .topbar .crumbs .c-prod, .topbar .crumbs .sl { display: none; }
  .topbar .crumbs.home { display: none; }
  .topbar .top-push { display: none; }
  /* two short rows: the page name with the sync dot; the client (or company) switcher with Sync beside it – the first
     number of a report stays above 300 px on a phone */
  .topbar .top-co, :root .topbar .top-client { order: 5; flex: 1 1 100%; max-width: none; height: 44px; }
  :root .topbar .top-sync { order: 1; flex: none; padding: 0; font-size: 12.5px; }
  :root .topbar .top-sync .ts-t { position: static; width: auto; height: auto; clip: auto; overflow: visible; } /* "● Synced 4m ago", not a lone dot */
  :root .topbar .top-actions { order: 1; } /* Sync on the title row, as in the mock */
  :root .topbar .crumbs + .top-co, :root .topbar .top-ctx { flex-basis: auto; }
  :root .topbar .top-in::after { content: ""; order: 2; flex-basis: 100%; height: 0; } /* the row break */
  :root .topbar #topTools button { width: 44px; height: 44px; padding: 0; }
  :root .topbar #topTools button .t { display: none; } /* icon only: its name and tip say Sync / Open Tally */
  .topbar:not(:has(.crumbs:not(:empty):not(.home))):not(:has(.top-co:not([hidden]))):not(:has(#topTools:not(:empty))):not(:has(.top-ctx:not([hidden]))) { display: none; }
}

/* ── phone bottom bar ── */
.zbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); box-sizing: border-box; }
.zbar > a, .zbar > button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 0; height: 100%; padding: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink-3); font: 600 11.5px/1 var(--font, system-ui); text-decoration: none; cursor: pointer; }
.zbar > .on { color: var(--zr-teal); }
.zbar .bi { position: relative; height: 24px; display: grid; place-items: center; }
.zbar .zi { width: 23px; height: 23px; }
.zbar .zbadge { top: -5px; right: -12px; }
.zbar .zav { width: 24px; height: 24px; font-size: 10px; }
@media (min-width: 721px) { .zbar { display: none; } }

/* ── All tools ── */
.zt-scrim { position: fixed; inset: var(--demo-h, 0px) 0 0 var(--rail); z-index: 24; background: rgba(14, 26, 58, .30); }
.ztools { position: fixed; top: var(--demo-h, 0px); bottom: 0; left: var(--rail); z-index: 25; width: min(900px, calc(100vw - var(--rail) - 80px)); display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); box-shadow: 24px 0 48px rgba(14, 26, 58, .14); animation: zt-in .18s ease-out; }
.ztools[hidden], .zt-scrim[hidden] { display: none; }
@keyframes zt-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ztools { animation: none; } }
.ztools .zt-h { display: flex; align-items: center; gap: 12px; padding: 20px 28px 0; }
.ztools .zt-h h2 { flex: 1 1 auto; }
.ztools .zt-edit { min-height: 40px; padding: 0 8px; border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 14px; }
.ztools .zt-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.ztools .zt-ph h3 { margin: 0 !important; }
.ztools .zt-pinned .zt-edit { min-height: 44px; margin: -12px -8px -12px 0; }
.ztools .zt-h h2 { margin: 0; color: var(--ink); font: 600 22px/1.2 var(--font, system-ui); letter-spacing: -.015em; }
.ztools .zt-x { width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); background: none; }
.ztools .zt-x:hover { background: var(--zr-hover); }
.ztools .zt-x .zi { width: 22px; height: 22px; }
.ztools .zt-search { margin: 14px 28px 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-3); box-sizing: border-box; }
.ztools .zt-search:focus-within { border-color: var(--brand); background: var(--surface); }
.ztools .zt-search input:not([type=checkbox]) { flex: 1; min-width: 0; height: 100%; min-height: 0; border: 0; border-radius: 0; outline: 0; background: transparent; font: 400 15px/1 var(--font, system-ui); color: var(--ink); padding: 0; box-shadow: none; }
.ztools .zt-search input::-webkit-search-cancel-button { cursor: pointer; }
.ztools .zt-body { flex: 1; overflow-y: auto; padding-bottom: 16px; overscroll-behavior: contain; }
.ztools .zt-pinned { display: none; padding: 16px 16px 18px; border-bottom: 1px solid var(--line); }
.ztools .zt-pinned h3 { margin: 0 0 8px; font: 600 15px/1.3 var(--font, system-ui); color: var(--ink); }
.ztools .zt-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.ztools .zt-tile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 2px 8px; border-radius: 12px; min-width: 0; color: var(--ink); text-decoration: none; }
.ztools .zt-tile:hover { background: var(--zr-hover); }
.ztools .zt-tile .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--zr-tint); color: var(--zr-navy); display: grid; place-items: center; margin-bottom: 8px; }
.ztools .zt-tile .ic .zi { width: 24px; height: 24px; }
.ztools .zt-tile b { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12.5px/17px var(--font, system-ui); letter-spacing: -.01em; margin-bottom: 2px; } /* one line */
.ztools .zt-tile small { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.ztools .zt-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; padding: 18px 28px 0; }
.ztools .zt-groups.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ztools .zt-groups.n1 { display: block; columns: 2; column-gap: 28px; } /* one product: its pages in two columns */
.ztools .zt-groups.n1 .zt-grp { break-inside: auto; }
.ztools .zt-groups.n1 .zt-grp h3 { column-span: all; }
.ztools .zt-grp { margin: 0 0 22px; break-inside: avoid; }
.ztools .zt-row { break-inside: avoid; }
.ztools .zt-grp[hidden] { display: none; }
.ztools .zt-grp h3 { margin: 0 0 2px; display: flex; align-items: baseline; gap: 8px; color: var(--zr-navy); font: 600 14.5px/1.3 var(--font, system-ui); }
.ztools .zt-grp h3 small { font: 500 12px/1 var(--font, system-ui); color: var(--ink-3); }
.ztools .zt-row { display: flex; align-items: center; height: 34px; margin: 0 -10px; border-radius: 8px; }
.ztools .zt-row[hidden] { display: none; }
.ztools .zt-row:hover { background: var(--zr-hover); }
.ztools .zt-row .go { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 0 0 10px; color: var(--ink); font-size: 14px; white-space: nowrap; text-decoration: none; border-radius: 8px; }
.ztools .zt-row .go .nm { overflow: hidden; text-overflow: ellipsis; }
.ztools .zt-row .go .hit { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.ztools .zt-row .go .zi { width: 19px; height: 19px; color: var(--ink-3); }
.ztools .zt-row .pin { width: 32px; height: 32px; min-height: 0; min-width: 0; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ink-3); opacity: 0; flex: none; }
.ztools .zt-row .pin .zi { width: 16px; height: 16px; }
@media (hover: hover) { .ztools .zt-row:hover .pin { opacity: 1; } }
.ztools .zt-row .pin:focus-visible, .ztools.editing .zt-row .pin { opacity: 1; }
.ztools .zt-row .pin:hover { background: var(--line); }
.ztools .zt-row.pinned .pin { opacity: 1; color: var(--zr-teal); }

.ztools .zt-row.pinned .pin .zi { fill: currentColor; fill-opacity: 1; }
.ztools.editing .zt-row:not(.pinned) .pin .zi { fill: none; }
@media (hover: none) { .ztools:not(.editing) .zt-row:not(.pinned) .pin { visibility: hidden; } .ztools:not(.editing) .zt-row .pin { pointer-events: none; } }
/* more below: a soft fade at the bottom of the list */
.ztools.more .zt-body { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); }
.ztools .zt-row.here { background: var(--zr-teal-soft); }
.ztools .zt-row.here .go { color: var(--zr-teal); font-weight: 600; }
.ztools .zt-row.here .go .zi { color: var(--zr-teal); }
.ztools .zt-empty { padding: 20px 28px; margin: 0; color: var(--ink-3); }
@media (max-width: 1099px) { .ztools { width: min(900px, calc(100vw - var(--rail) - 56px)); } }
@media (max-width: 899px) {
  .ztools .zt-groups { display: block; columns: 2; column-gap: 28px; }
  .ztools .zt-col { display: contents; }
}
/* search results fill from the left column */
.ztools.searching .zt-groups { display: block; columns: 3; column-gap: 28px; }
.ztools.searching .zt-col { display: contents; }
@media (max-width: 899px) { .ztools.searching .zt-groups { columns: 2; } }
@media (max-width: 720px) {
  .zt-scrim { display: none; }
  .ztools { top: 0; left: 0; width: 100%; bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); z-index: 29; border: 0; box-shadow: none; animation: none; }
  body.zt-open { overflow: hidden; }
  .ztools .zt-h { padding: 14px 8px 0 16px; }
  .ztools .zt-h h2 { font-size: 20px; }
  .ztools .zt-x { width: 44px; height: 44px; }
  .ztools .zt-search { margin: 10px 16px 0; }
  .ztools .zt-pinned { display: block; }
  .ztools .zt-h .zt-hb:not(:empty) { display: none; }
  .ztools .zt-pinned[hidden] { display: none; }
  .ztools .zt-groups, .ztools .zt-groups.n1 { columns: 1; padding: 16px 16px 0; }
  .ztools .zt-row { height: 44px; }
  .ztools .zt-row .go { font-size: 15px; }
  .ztools .zt-row .pin { width: 44px; height: 44px; }
}

/* ── Alerts and Settings pages: one list of rows ── */
:root .zl-list { padding: 4px 0; overflow: hidden; }
.zl-list .zs-h { margin: 10px 16px 4px; font-size: .92rem; color: var(--zr-navy); }
.zl-row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 16px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.zl-list > .zl-row:first-child, .zl-list > .zs-h + .zl-row { border-top: 0; }
.zl-row:hover { background: var(--zr-hover); }
.zl-row .zl-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--zr-tint); color: var(--zr-navy); display: grid; place-items: center; flex: none; }
.zl-row .zl-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zl-row .zl-t b { font-weight: 600; }
.zl-row .zl-t small { color: var(--ink-3); font-size: .8rem; }
.zl-row .zl-n { min-width: 28px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--zr-red); color: #fff; display: grid; place-items: center; font-size: .8rem; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.zl-row .zl-go { width: 18px; height: 18px; color: var(--ink-3); transform: rotate(-90deg); }
.zs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.zs-grid > .card { margin: 0; }

/* ── MIS: the client's page list (side menu, phone list) gave way to the rail and All tools; the tabs inside a page
   (Reports, Cash flow) scroll in their own strip on a tablet, the phone keeps its list of tabs ── */
:root[data-prod="mis"] #main .mis-tabs, :root[data-prod="mis"] #main .mis-tabsel { display: none; }
@media (min-width: 641px) {
  #main .mis-sub { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #main .mis-sub::-webkit-scrollbar { display: none; }
  #main .mis-sub a { flex: none; }
}
@media (min-width: 721px) and (max-width: 899px) {
  /* the rail takes 76 px of a portrait tablet: the Trial balance and the salary sheet's tool row get a little tighter */
  :root[data-prod="mis"] #main #misScrutiny table :is(th, td) { padding-left: 4px; padding-right: 4px; }
  :root[data-prod="mis"] #main:has(#misScrutiny) { padding-left: 16px; padding-right: 16px; }
  :root[data-prod="mis"] #main #misScrutiny table { font-size: .84rem; }
  #main.sheetpage .mbar #fq { width: 170px !important; }
  :root .topbar .top-sync { display: none; }
  :root[data-prod="mis"] #main > .mis-sub { margin: -24px -24px 16px; padding: 4px 24px 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
  :root[data-prod="mis"] #main:has(#misScrutiny) > .mis-sub { margin-left: -16px; margin-right: -16px; padding-left: 4px; }
}

/* MIS pack (laptop): its sticky footer is a white bar across the page column – the column is wider than the pack's
   cards (1080 px) now that the side menu is a slim rail */
@media (min-width: 900px) {
  :root[data-prod="mis"] #main:has(.mpk) { container-type: inline-size; }
  :root[data-prod="mis"] #main .mpk .mpk-foot { width: 100cqw; max-width: none; }
}

/* ── UI review of the navigation (21 Nov 2026) ── */
/* the white tab / filter strips under the top line run the full width (the page column stops short of the edges) */
@media (min-width: 900px) {
  :root[data-prod="mis"] #main > .mis-sub, :root[data-prod="mis"] #main > .mis-sub ~ .mis-bar, :root[data-prod="mis"] #main .mis-bar.mis-sticky,
  :root[data-prod="mis"] #main > #misGst1 > .mis-sub, :root[data-prod="mis"] #main > #misGst1 > .mis-bar.g1-bar {
    border-image: linear-gradient(to top, var(--line) 1px, var(--surface) 1px) fill 0 / 0 / 0 100vmax;
  }
}
/* a page's tabs (Reports, Cash flow): one strip that scrolls on a tablet and a phone, soft edges where there is more,
   the open tab scrolled into view (main.js edgeFades) – the phone's list of tabs gave way to the strip */
:root[data-prod="mis"] #main .mis-sub { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
:root[data-prod="mis"] #main .mis-sub::-webkit-scrollbar { display: none; }
:root[data-prod="mis"] #main .mis-sub a { flex: none; }
@media (max-width: 640px) {
  :root[data-prod="mis"] #main .mis-sub { display: flex; margin: 0 -16px 12px; padding: 0 8px; background: var(--surface); }
  :root[data-prod="mis"] #main .mis-subsel { display: none; }
}
.zr-fl { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px); mask-image: linear-gradient(to right, transparent, #000 28px); }
.zr-fr { -webkit-mask-image: linear-gradient(to left, transparent, #000 28px); mask-image: linear-gradient(to left, transparent, #000 28px); }
.zr-fl.zr-fr { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
/* the month tables on a phone: a soft fade on the edge with more months, not a "swipe" line */
:root[data-prod="mis"] .table-wrap.mis-sheet::before, :root[data-prod="mis"] #main .table-wrap.mis-sheet::before { content: none; display: none; }
/* Notes keeps its word on a phone */
@media (max-width: 640px) {
  :root[data-prod="mis"] #main .mis-bar.mis-sticky #misNotes { width: auto; min-width: 0; padding: 0 12px; gap: 6px; font-size: 13px; font-weight: 600; }
}
/* Payroll Overview cards: the light border of the mock, the waiting ones a touch stronger */
:root .tasks .task { box-shadow: 0 0 0 1px var(--line); }
:root .tasks .task.hot { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, var(--line)); }

/* ── UI review 2 of the navigation (21 Nov 2026) ── */
/* phone period button: the months alone, never cut ("Apr–Oct 2026"); the year and the units are in the sheet */
#main .mis-set-btn .ms-ph { display: none; }
@media (max-width: 640px) {
  :root[data-prod="mis"] #main .mis-set-btn .ms-ph { display: block; white-space: nowrap; }
  :root[data-prod="mis"] #main .mis-set-btn .ms-sum { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  /* P&L / Balance sheet row names: a wider name column, lines broken evenly (no word alone on a line) */
  :root[data-prod="mis"] #main .mis-sheet:not(.mis-ly) .mis-tbl :is(tbody th, thead th:first-child) { min-width: 170px; width: 170px; max-width: 176px; text-wrap: balance; }
}
/* MIS pack on a portrait tablet: the period on row 1; Books only | Books + provisional with ₹ lakh on row 2;
   the two downloads side by side at the same width */
@media (min-width: 641px) and (max-width: 899px) {
  :root[data-prod="mis"] #main:has(.mpk) .mis-bar.mis-sticky .mis-set::after { content: ""; order: 1; flex-basis: 100%; height: 0; } /* the row break */
  :root[data-prod="mis"] #main:has(.mpk) .mis-bar.mis-sticky :is(#misProv, #misProv ~ .mc-unit) { order: 2; }
  :root[data-prod="mis"] #main .mpk .mpk-foot { flex-wrap: wrap; }
  :root[data-prod="mis"] #main .mpk .mpk-foot > span { flex: 1 1 100%; }
  :root[data-prod="mis"] #main .mpk .mpk-foot button { flex: 1 1 0; min-width: 0; }
}
/* Payroll Overview: the cards use the page's full width */
@media (min-width: 900px) { :root .mywork:has(> .tasks) { max-width: none; } }
/* an overview named with its product where the product is not shown ("Payroll overview" on a tablet and a phone) */
.topbar .crumbs .c-s { display: none; }
@media (max-width: 1099px) { .topbar .crumbs .c-s { display: inline; } .topbar .crumbs .c-l { display: none; } }
:root .mywork:has(> .tasks) > h1 { margin-bottom: 14px; } /* the greeting, then the cards */
/* phase 2 toasts (laptop / tablet): at the top of the content column, under the top line – and under the demo / test strip */
@media (min-width: 768px) { #toasts { top: calc(var(--top-h) + var(--demo-h, 0px) + 12px); } }
/* a toast is as wide as its words (UI review 3) – several stack centred */
#toasts { justify-items: center; }
#toasts .toast { max-width: 100%; }
/* rail and bottom bar: the focus ring only after the keyboard – never left behind by a click */
:is(.zrail, .zbar) :is(a, button):focus:not(:focus-visible), :is(.zrail, .zbar) .zr-quiet:focus-visible { outline: none; }
.zrail .rb.zr-quiet:not(:hover) .ztip { opacity: 0; }
/* a tapped row on a touch screen: the whole row lights, the row name too – never half a row */
@media (hover: none) {
  :root[data-prod="mis"] .mis-tbl tbody tr:hover > :is(th, td):not(.tot) { background: var(--surface-2); }
}

/* ── UI review 3 of the navigation (21 Nov 2026) ── */
/* small phones: P&L / Balance sheet row names take about half the width, the amounts stay narrow – no word alone on a line */
@media (max-width: 400px) {
  :root[data-prod="mis"] #main .mis-sheet:not(.mis-ly) .mis-tbl :is(tbody th, thead th:first-child) { width: max(168px, 48vw); min-width: max(168px, 48vw); max-width: max(168px, 48vw); padding-right: 4px; }
  :root[data-prod="mis"] #main .mis-sheet:not(.mis-ly) .mis-tbl :is(tbody td, thead th:not(:first-child)) { min-width: 64px; padding-left: 6px; padding-right: 6px; }
  /* the MIS P&L: every row name on one line ("Other operating expenses") – the column takes what the longest needs */
  :root[data-prod="mis"] #main .mis-sheet.mis-plt .mis-tbl :is(tbody th, thead th:first-child) { width: auto; min-width: 160px; max-width: none; white-space: nowrap; }
}
/* tablet tab strips: a wider fade on the edge with more tabs, so a strip scrolled to its open tab shows there is more on the left */
@media (min-width: 641px) {
  :root[data-prod="mis"] #main .mis-sub.zr-fl { -webkit-mask-image: linear-gradient(to right, transparent, #000 64px); mask-image: linear-gradient(to right, transparent, #000 64px); }
  :root[data-prod="mis"] #main .mis-sub.zr-fr { -webkit-mask-image: linear-gradient(to left, transparent, #000 64px); mask-image: linear-gradient(to left, transparent, #000 64px); }
  :root[data-prod="mis"] #main .mis-sub.zr-fl.zr-fr { -webkit-mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent); }
}
/* Salary sheets: Open, Show and Excel at the height of the month boxes */
:root #main .sal-btn { height: 44px; min-height: 44px; }
/* phone Balance sheet: Schedule III | Tally groups alone on row 1, the two tick boxes side by side on row 2 */
@media (max-width: 640px) {
  :root[data-prod="mis"] #main #bsOpts { flex-wrap: wrap; column-gap: 16px; }
  :root[data-prod="mis"] #main #bsOpts::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
  :root[data-prod="mis"] #main #bsOpts > label.check { order: 2; white-space: nowrap; margin: 0; }
}
/* Payroll Overview cards: 3 across on a laptop, 2 on a portrait tablet – a card left alone on the last row takes the full row */
@media (min-width: 900px) {
  :root .mywork > .tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :root .mywork > .tasks > .task:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
}
@media (min-width: 560px) and (max-width: 899px) {
  :root .mywork > .tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root .mywork > .tasks > .task:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ── zzzzzz-approvals.css ── */
/* Approvals (owner, 22 Nov 2026: "a" – one page with tabs): Book entries · Sales · PI · Bill references.
   The tab bar sits above the page, in the page's column; each tab is the page it always was. */
.apv-bar { max-width: 1100px; margin: 0 auto; padding: 14px 16px 0; box-sizing: border-box; }
@media (min-width: 721px) { .apv-bar { max-width: 1280px; padding: 20px 24px 0; } }
@media (min-width: 900px) { .apv-bar { padding: 24px 32px 0; } }
body.has-apv #main { padding-top: 14px; }
.apv-tabs { display: flex; gap: 0 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.apv-tabs::-webkit-scrollbar { display: none; }
.apv-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 500; font-size: .95rem; text-decoration: none; white-space: nowrap; box-sizing: border-box; }
.apv-tabs a:hover { color: var(--ink); }
.apv-tabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.apv-tabs a:focus-visible { outline: 2px solid var(--brand-2, var(--brand)); outline-offset: -2px; border-radius: 6px; }
.apv-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--zr-red, #c62828); color: #fff; display: inline-grid; place-items: center; font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; box-sizing: border-box; }
:root[data-prod="mis"] .apv-tabs { border-bottom-color: var(--line-2); }
:root[data-prod="mis"] .apv-tabs a.on { color: var(--mis-head-ink); border-bottom-color: var(--mis-head-ink); }
@media (max-width: 720px) { .apv-tabs a { padding: 0 10px; font-size: .9rem; } }
/* a phone shows the short names (the rail's own: Book, Bills) so the four tabs fit without side-scrolling */
.apv-s { display: none; }
@media (max-width: 480px) { .apv-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .apv-s { display: inline; } .apv-tabs a { flex: 1 1 auto; justify-content: center; } }
/* Sales and PI line up with the tab bar instead of sitting in the middle */

/* Bill references is a tab of More reports: inside Approvals the reports' own tab strip is left out */
body.has-apv #main .mis-sub, body.has-apv #main .mis-subsel { display: none !important; }
/* whose: "All clients" on Sales and PI (Book entries and Bill references show the client picker above) */
.apv-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.apv-row .apv-tabs { border-bottom: 0; flex: 1 1 auto; min-width: 0; }
:root[data-prod="mis"] .apv-row { border-bottom-color: var(--line-2); }
.apv-who { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; background: var(--surface-2, #eef1f6); color: var(--ink-2); font-size: .8rem; font-weight: 500; white-space: nowrap; }
@media (max-width: 480px) { .apv-row { flex-wrap: wrap; gap: 0; } .apv-who { order: -1; margin: 0 0 8px; } }
/* Sales and PI fill the column like the other tabs; their own title repeats the tab and is left out */
@media (min-width: 900px) { body.has-apv #main .sx-one { max-width: none; } }
body.has-apv #main .sx-one > .sx-bar > b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Phone vs laptop (owner, 22 Nov 2026): a laptop-only page opened on a phone */
.desk-only .desk-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.desk-only .desk-acts > * { min-width: 140px; }
/* Approve and next (owner OK, 22 Nov 2026): the decision bar on a phone, above the bottom bar */
.dec-bar { display: none; }
@media (max-width: 720px) {
  .dec-bar { display: flex; align-items: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-h, 64px) + env(safe-area-inset-bottom, 0px)); z-index: 29; padding: 10px 16px; background: var(--surface, #fff); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgba(16, 24, 40, .06); transition: transform .18s ease, opacity .18s ease; }
  .dec-bar.off { transform: translateY(120%); opacity: 0; pointer-events: none; }
  .dec-bar .dec-amt { flex: 1 1 auto; min-width: 0; display: grid; line-height: 1.2; }
  .dec-bar .dec-amt b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
  .dec-bar .dec-amt small { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
  .dec-bar > button { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }
  #main:has(.dec-bar:not(.off)) { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) { .dec-bar { transition: none; } }
/* Undo in the toast (owner OK, 22 Nov 2026) */
.toast .toast-act { margin-left: 12px; padding: 2px 6px; min-height: 0; height: auto; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.toast .toast-act:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
/* Home → Recent (owner OK, 22 Nov 2026): unread in bold with a dot */
.zh-recent .zs-hr { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 16px 4px; }
.zh-recent .zs-hr + .zl-row { border-top: 0; }
.zh-recent .zs-hr .zs-h { margin: 0; }
.zh-recent .zl-row b { font-weight: 500; }
.zh-recent .zl-row.new b { font-weight: 700; }
.zh-recent .zl-row.new .zl-t { position: relative; padding-left: 14px; }
.zh-recent .zl-row.new .zl-t::before { content: ''; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand, #1b4fd8); }
.zh-recent .zl-when { flex: 0 0 auto; color: var(--ink-2); font-size: .78rem; white-space: nowrap; margin-left: 8px; }
.zh-recent .zl-t small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 720px) { .zh-recent .zl-row { flex-wrap: wrap; row-gap: 2px; } .zh-recent .zl-when { order: 3; margin: 0 0 0 14px; flex-basis: 100%; } .zh-recent .zl-row:not(.new) .zl-when { margin-left: 0; } }

/* ── zzzzzzz-shell-v2.css ── */
/* ══ Shell v2 – the clean, data-first look (owner, 26 Nov 2026 – Zentra-Structure-v2-Nov2026.md) ═════════════════════
   Meta-style: a white rail with the Zentra mark, grey icons, the page in light grey with the data on white panels, one
   action colour (the logo's blue #1A5FE0), status colours only for status (green done, amber pending, red problem).
   One look for every product – the product themes give way. Laptop is compact (28 px buttons, dense rows); a phone or
   a touch screen keeps 44 px targets. Everything here is scoped to :root[data-shell="v2"] (shell-v2.js applyShell),
   so with the switch off nothing in this file applies. Loads last (name order). */

:root[data-shell="v2"] {
  --bg: #f7f8fa !important; --surface: #ffffff !important; --surface-2: #f7f8fa !important; --line: #e4e6eb !important; --line-2: #d4d7dc !important;
  --ink: #1c2b33 !important; --ink-2: #4b5563 !important; --ink-3: #606770 !important;
  --brand: #1a5fe0 !important; --brand-2: #1a5fe0 !important; --brand-soft: #e8f0fe !important; --brand-ink: #ffffff !important;
  --ok: #0f7a4a !important; --ok-soft: #e3f5ec !important; --warn: #8a5200 !important; --warn-soft: #fff3dc !important; --bad: #b42318 !important; --bad-soft: #fde8e7 !important;
  --violet: #1a5fe0 !important; --violet-soft: #e8f0fe !important; --grey-soft: #eef0f3 !important; --teal: #0f7a4a !important;
  --gold: #1c2b33 !important; --gold-soft: #eef0f3 !important;
  --mis-navy: #1c2b33 !important; --mis-navy-d: #1c2b33 !important; --mis-blue: #1a5fe0 !important; --mis-teal: #1a5fe0 !important; --mis-teal-soft: #e8f0fe !important;
  --mis-link: #1a5fe0 !important; --mis-head-ink: #1c2b33 !important; --mis-grad: linear-gradient(90deg, #1a5fe0, #1a5fe0) !important; --mis-band: #ffffff !important;
  --zr-teal: #1a5fe0 !important; --zr-teal-soft: #e8f0fe !important; --zr-tint: #e8f0fe !important; --zr-navy: #1c2b33 !important; --zr-hover: #f2f3f5 !important;
  --radius: 8px !important; --shadow: none !important; --shadow-up: 0 4px 16px rgba(28, 43, 51, .10) !important;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important; --mis-fig: var(--font) !important;
  --v2-sel: #e8f0fe; --v2-sel-ink: #1a5fe0; --v2-icon: #606770; --v2-panel: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root[data-shell="v2"]:not([data-theme="light"]) {
    --bg: #101317 !important; --surface: #181c21 !important; --surface-2: #1e2329 !important; --line: #2a3037 !important; --line-2: #39404a !important;
    --ink: #e4e6eb !important; --ink-2: #b9bdc3 !important; --ink-3: #a1a6ad !important;
    --brand: #6c9cf5 !important; --brand-2: #6c9cf5 !important; --brand-soft: #1b2a4a !important; --brand-ink: #0b1220 !important;
    --ok: #4ccf8f !important; --ok-soft: #12301f !important; --warn: #f2b155 !important; --warn-soft: #33260f !important; --bad: #ff8a80 !important; --bad-soft: #3a1714 !important;
    --violet: #6c9cf5 !important; --violet-soft: #1b2a4a !important; --grey-soft: #23292f !important; --teal: #4ccf8f !important;
    --gold: #e4e6eb !important; --gold-soft: #23292f !important; --mis-navy: #e4e6eb !important; --mis-head-ink: #e4e6eb !important; --mis-teal: #6c9cf5 !important; --mis-teal-soft: #1b2a4a !important; --mis-link: #8db2ff !important; --mis-band: #181c21 !important;
    --zr-teal: #8db2ff !important; --zr-teal-soft: #1b2a4a !important; --zr-tint: #1b2a4a !important; --zr-navy: #b9bdc3 !important; --zr-hover: #23292f !important;
    --v2-sel: #1b2a4a; --v2-sel-ink: #8db2ff; --v2-icon: #a1a6ad; --v2-panel: #181c21; color-scheme: dark;
  }
}
:root[data-shell="v2"][data-theme="dark"] {
  --bg: #101317 !important; --surface: #181c21 !important; --surface-2: #1e2329 !important; --line: #2a3037 !important; --line-2: #39404a !important;
  --ink: #e4e6eb !important; --ink-2: #b9bdc3 !important; --ink-3: #a1a6ad !important;
  --brand: #6c9cf5 !important; --brand-2: #6c9cf5 !important; --brand-soft: #1b2a4a !important; --brand-ink: #0b1220 !important;
  --ok: #4ccf8f !important; --ok-soft: #12301f !important; --warn: #f2b155 !important; --warn-soft: #33260f !important; --bad: #ff8a80 !important; --bad-soft: #3a1714 !important;
  --violet: #6c9cf5 !important; --violet-soft: #1b2a4a !important; --grey-soft: #23292f !important; --teal: #4ccf8f !important;
  --gold: #e4e6eb !important; --gold-soft: #23292f !important; --mis-navy: #e4e6eb !important; --mis-head-ink: #e4e6eb !important; --mis-teal: #6c9cf5 !important; --mis-teal-soft: #1b2a4a !important; --mis-link: #8db2ff !important; --mis-band: #181c21 !important;
  --zr-teal: #8db2ff !important; --zr-teal-soft: #1b2a4a !important; --zr-tint: #1b2a4a !important; --zr-navy: #b9bdc3 !important; --zr-hover: #23292f !important;
  --v2-sel: #1b2a4a; --v2-sel-ink: #8db2ff; --v2-icon: #a1a6ad; --v2-panel: #181c21; color-scheme: dark;
}
:root[data-shell="v2"] body { background: var(--bg); color: var(--ink); font-family: var(--font); }

/* ── panels: hairline white boxes, no shadows, one radius ── */
:root[data-shell="v2"] #main :is(.card, .table-wrap.card, .tile, .mis-card) { background: var(--surface); border: 1px solid var(--line); box-shadow: none; border-radius: 8px; }
:root[data-shell="v2"] #main h1 { font-family: var(--font); font-weight: 600; letter-spacing: -.01em; }
:root[data-shell="v2"] #main :is(.chip) { border-radius: 999px; }
:root[data-shell="v2"] .fab { background: var(--brand) !important; box-shadow: 0 6px 16px rgba(26, 95, 224, .28) !important; }

/* ── rail ── */
@media (min-width: 721px) {
  :root[data-shell="v2"] { --rail: 64px; --nav-w: 64px; }
  :root[data-shell="v2"] .zrail { background: var(--surface); border-right: 1px solid var(--line); padding: 10px 0; }
  :root[data-shell="v2"] .zrail .zr-logo { width: 36px; height: 36px; margin-bottom: 4px; }
  :root[data-shell="v2"] .zrail .zr-logo svg { width: 28px; height: 28px; }
  :root[data-shell="v2"] .zrail .rb { width: 56px; padding: 3px 0 4px; gap: 2px; color: var(--v2-icon); border-radius: 8px; }
  :root[data-shell="v2"] .zrail .rb .ib { width: 40px; height: 28px; border-radius: 8px; }
  :root[data-shell="v2"] .zrail .rb .zi { width: 19px; height: 19px; }
  :root[data-shell="v2"] .zrail .rb .lb { max-width: 58px; font: 500 11px/1.15 var(--font); white-space: normal; text-align: center; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } /* the full name, two lines at most ("Salary sheets") */
  :root[data-shell="v2"] .zrail .rb { width: 60px; }
  :root[data-shell="v2"] .zrail .rb:hover .ib { background: var(--zr-hover); }
  :root[data-shell="v2"] .zrail .rb.on { color: var(--v2-sel-ink); }
  :root[data-shell="v2"] .zrail .rb.on .ib { background: var(--v2-sel); }
  :root[data-shell="v2"] .zrail .ztip { left: 58px; background: #1c2b33; }
  :root[data-shell="v2"] .zrail .ztip::before { background: #1c2b33; }
}
:root[data-shell="v2"] .zbar { background: var(--surface); border-top: 1px solid var(--line); }
:root[data-shell="v2"] .zbar > a, :root[data-shell="v2"] .zbar > button { color: var(--v2-icon); font-weight: 500; }
:root[data-shell="v2"] .zbar > .on { color: var(--v2-sel-ink); }
:root[data-shell="v2"] .zav { background: var(--v2-sel); color: var(--v2-sel-ink); }

/* ── top line: Back · the screen name · the client (where the page has one) · the page's own buttons ── */
.v2-back { display: none; }
:root[data-shell="v2"] .v2-back:not([hidden]) { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 30px; min-height: 30px; padding: 0 10px 0 6px; margin: 0;
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink); font: 500 13px/1 var(--font); cursor: pointer; }
:root[data-shell="v2"] .v2-back .ic { width: 16px; height: 16px; }
:root[data-shell="v2"] .v2-back:hover { border-color: var(--ink-3); }
:root[data-shell="v2"] .v2-back:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
:root[data-shell="v2"] .topbar { background: var(--bg); border-bottom: 1px solid var(--line); }
:root[data-shell="v2"] .topbar .crumbs { font: 600 17px/1.2 var(--font); letter-spacing: -.01em; }
:root[data-shell="v2"] .topbar .crumbs .c-prod, :root[data-shell="v2"] .topbar .crumbs .sl { display: none; } /* the screen name alone */
:root[data-shell="v2"] .topbar .top-co, :root[data-shell="v2"] .topbar .top-client { height: 32px; border-radius: 6px; font-size: 13px; padding: 0 10px 0 4px; gap: 8px; border-color: var(--line-2); }
:root[data-shell="v2"] .topbar :is(.top-co, .top-client) .cl { width: 22px; height: 22px; border-radius: 5px; background: var(--ink); font-size: 11px; }
:root[data-shell="v2"] .topbar .top-co .nm, :root[data-shell="v2"] .topbar .top-client .mm-nm { font: 500 13px/1.2 var(--font); }
@media (min-width: 721px) {
  :root[data-shell="v2"] .topbar #topTools button, :root[data-shell="v2"] .topbar #topNew .btn { height: 30px; min-height: 30px; border-radius: 6px; font-size: 13px; font-weight: 500; padding: 0 12px; }
  :root[data-shell="v2"][data-prod] { --top-h: 52px; }
  :root[data-shell="v2"] .topbar .top-in { gap: 10px; padding: 0 24px; }
}
/* the module tab row above a page (Approvals) – All tools lists each tab as its own row in v2 */
:root[data-shell="v2"] #apvBar { display: none !important; }
/* the page's own back arrow: the top line has Back */
@media (min-width: 721px) { :root[data-shell="v2"] #main .page-head > a.back { display: none; } }

/* ── laptop: compact (mouse) ── */
@media (min-width: 721px) and (pointer: fine) {
  :root[data-shell="v2"] #main { padding-top: 16px; }
  :root[data-shell="v2"] #main :is(button, .btn, summary.btn):not(.link):not(.pin):not(.zt-x):not(.persona):not([class*="tab"]):not([role="tab"]):not(.chip) { min-height: 28px !important; height: auto; padding-top: 4px; padding-bottom: 4px; font-size: 13px; font-weight: 500; border-radius: 6px; }
  :root[data-shell="v2"] #main :is(button.primary, .btn.primary) { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
  :root[data-shell="v2"] #main :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select) { height: 32px; min-height: 32px !important; padding-top: 0; padding-bottom: 0; font-size: 13px; border-radius: 6px; box-sizing: border-box; }
  :root[data-shell="v2"] #main .field > span { font-size: 12.5px; }
  :root[data-shell="v2"] #main .rep-form { align-items: end; } /* the labels line up (Search with Category and Status) */
  /* Payroll employees: the row opens the employee; a status shows only when it is not Active */
  :root[data-shell="v2"] #main #et tr[data-row] { cursor: pointer; }
  :root[data-shell="v2"] #main #et tr[data-row]:hover td { background: var(--zr-hover); }
  :root[data-shell="v2"] #main #et [data-edit] { display: none; }
  /* MIS: "₹ lakh" is in the toolbar – the table's corner stays quiet (the text stays for notes and screen readers) */
  :root[data-shell="v2"] #main .mis-sheet thead th:first-child { color: transparent; }
  :root[data-shell="v2"] #main .tbl :is(td, th) { padding: 6px 10px; font-size: 13px; }
  :root[data-shell="v2"] #main .tbl th { background: var(--surface); color: var(--ink-3); font-weight: 500; border-bottom: 1px solid var(--line-2); }
  :root[data-shell="v2"] #main .tbl td { border-bottom: 1px solid var(--line); }
  :root[data-shell="v2"] #main .card { padding: 14px 16px; }
}
/* ── phone and touch: 44 px targets ── */
@media (max-width: 720px), (pointer: coarse) {
  :root[data-shell="v2"] #main :is(button, .btn):not(.link):not(.pin) { min-height: 44px; }
  :root[data-shell="v2"] #main :is(input:not([type=checkbox]):not([type=radio]), select) { min-height: 44px; }
  :root[data-shell="v2"] .v2-back:not([hidden]) { height: 44px; min-height: 44px; padding: 0 12px 0 8px; font-size: 14px; }
}
@media (max-width: 720px) {
  :root[data-shell="v2"] .v2-back:not([hidden]) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  :root[data-shell="v2"] .v2-back:not([hidden]) { width: 44px; justify-content: center; padding: 0; }
  /* every screen: Back and the screen name on the first row, the client or company box on the second */
  :root[data-shell="v2"] .topbar .crumbs { font-size: 18px; }
  :root[data-shell="v2"] .topbar .crumbs.home { display: flex; }
  :root[data-shell="v2"] .topbar .top-co, :root[data-shell="v2"] .topbar .top-client { height: 44px; }
  :root[data-shell="v2"] .topbar #topTools button { width: 44px; height: 44px; min-height: 44px; }
  /* MIS on a phone: the Export button says Export; the table scrolls in its own box, the first column stays */
  :root[data-shell="v2"] #main .mis-exp > button .mc-lbl { display: inline !important; }
  :root[data-shell="v2"] #main .mis-exp > button { width: auto !important; padding: 0 12px !important; }
  /* the swipe cue: a fade on the right edge only while there is more to the right; never on the left (the first column stays) */
  :root[data-shell="v2"] #main .table-wrap.mis-sheet { overflow-x: auto; -webkit-mask-image: none !important; mask-image: none !important; }
  :root[data-shell="v2"] #main .table-wrap.mis-sheet.zr-fr { -webkit-mask-image: linear-gradient(to left, transparent, #000 44px) !important; mask-image: linear-gradient(to left, transparent, #000 44px) !important; }
  :root[data-shell="v2"] #main .mis-tbl tbody th, :root[data-shell="v2"] #main .mis-tbl thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 6px 0 8px -6px rgba(28, 43, 51, .25); min-width: 150px; max-width: 170px; }
  :root[data-shell="v2"] #main .mis-tbl tbody tr.pct th { background: var(--surface); }
  /* Payroll employees: Search full width, the filters behind one Filter button; two-line rows (name left, pay right) */
  :root[data-shell="v2"] #main #fl.rep-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
  :root[data-shell="v2"] #main #fl .field:has([name="s"]) { grid-column: 1; grid-row: 1; }
  :root[data-shell="v2"] #main #fl .v2-flt { display: inline-flex; grid-column: 2; grid-row: 1; min-height: 44px; }
  :root[data-shell="v2"] #main #fl .field:has(select) { display: none; grid-column: 1 / -1; }
  :root[data-shell="v2"] #main #fl.open .field:has(select) { display: flex; }
  :root[data-shell="v2"] #main #et.stk tr { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; min-height: 56px; }
  :root[data-shell="v2"] #main #et.stk td { display: none; }
  :root[data-shell="v2"] #main #et.stk td:nth-child(2) { display: block; grid-column: 1; grid-row: 1; font-weight: 400; }
  :root[data-shell="v2"] #main #et.stk td:nth-child(9) { display: block; grid-column: 2; grid-row: 1; text-align: right !important; font-weight: 600; }
  :root[data-shell="v2"] #main #et.stk td:nth-child(9)::before, :root[data-shell="v2"] #main #et.stk td:nth-child(2)::before { content: none; }
  :root[data-shell="v2"] #main #et.stk td:nth-child(9) small { font-weight: 400; }
  :root[data-shell="v2"] #main #et.stk td:nth-child(3):has(.chip:not(.st-active)) { display: block; grid-column: 1 / -1; }
}
.v2-flt { display: none; }
/* status pill only when the status is not Active (both sizes, v2) */
:root[data-shell="v2"] #main #et .st-active { display: none; }

/* ── All tools: Recent, and each page's tabs as rows ── */
:root[data-shell="v2"] .ztools { background: var(--surface); }
:root[data-shell="v2"] .ztools .zt-search { height: 40px; border-radius: 8px; }
:root[data-shell="v2"] .ztools .zt-row.here .go { background: var(--v2-sel); color: var(--v2-sel-ink); }
.ztools .zt-recent { padding: 14px 28px 4px; }
.ztools .zt-recent h3 { margin: 0 0 6px; font: 600 13px/1.3 var(--font, system-ui); color: var(--ink-3); }
.ztools .zt-rlist { display: flex; flex-wrap: wrap; gap: 6px; }
.ztools .zt-rec { display: inline-flex; flex-direction: column; justify-content: center; min-height: 40px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.25; }
.ztools .zt-rec small { color: var(--ink-3); font-size: 11.5px; }
.ztools .zt-rec:hover { border-color: var(--ink-3); }
/* a page's tabs: one per line, indented under the page */
.ztools .zt-subs { display: flex; flex-direction: column; gap: 0; padding: 0 0 4px 40px; }
.ztools .zt-subs[hidden], .ztools .zt-sub[hidden] { display: none; }
.ztools .zt-sub { display: flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 6px; color: var(--ink); font-size: 13.5px; text-decoration: none; }
.ztools .zt-sub:hover { background: var(--zr-hover); }
@media (max-width: 720px), (pointer: coarse) { .ztools .zt-sub { min-height: 44px; } .ztools .zt-recent { padding: 12px 16px 4px; } .ztools .zt-rec { min-height: 44px; } }
/* Pinned: the same section on a laptop and a phone – the tiles, then Edit pins under them */
:root[data-shell="v2"] .ztools .zt-h .zt-hb { display: none; }
:root[data-shell="v2"] .ztools .zt-pinned { display: flex; flex-direction: column; padding: 14px 28px 12px; }
:root[data-shell="v2"] .ztools .zt-pinned[hidden] { display: none; }
:root[data-shell="v2"] .ztools .zt-pinned .zt-ph { display: contents; }
:root[data-shell="v2"] .ztools .zt-pinned h3 { order: 0; margin: 0 0 6px; font: 600 13px/1.3 var(--font); color: var(--ink-3); }
:root[data-shell="v2"] .ztools .zt-pinned .zt-tiles { order: 1; display: flex; flex-wrap: wrap; gap: 6px; }
:root[data-shell="v2"] .ztools .zt-pinned .zt-edit { order: 2; align-self: flex-start; margin: 6px 0 0 -8px; min-height: 32px; }
:root[data-shell="v2"] .ztools .zt-tile { flex-direction: row; gap: 8px; align-items: center; text-align: left; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; min-height: 40px; }
:root[data-shell="v2"] .ztools .zt-tile .ic { width: auto; height: auto; background: none; margin: 0; color: var(--v2-icon); border-radius: 0; }
:root[data-shell="v2"] .ztools .zt-tile .ic .zi { width: 18px; height: 18px; }
:root[data-shell="v2"] .ztools .zt-tile b { font: 500 13px/1.25 var(--font); margin: 0; }
:root[data-shell="v2"] .ztools .zt-tile small { display: none; }
@media (max-width: 720px), (pointer: coarse) { :root[data-shell="v2"] .ztools .zt-pinned { padding: 12px 16px; } :root[data-shell="v2"] .ztools .zt-tile { min-height: 44px; } :root[data-shell="v2"] .ztools .zt-pinned .zt-edit { min-height: 44px; } }

/* ── Home ── */
.v2-home { display: flex; flex-direction: column; gap: 14px; }
.v2-home .v2h-hi { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.v2-home .v2h-hi h1 { margin: 0; font-size: 20px; }
.v2-home .v2h-date { color: var(--ink-3); font-size: 13px; }
.v2-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.v2-panel .v2p-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.v2-panel .v2p-h h2 { margin: 0; font: 600 14px/1.3 var(--font, system-ui); color: var(--ink); }
.v2-panel .v2p-n { color: var(--ink-3); font-size: 12.5px; }
.v2-tw { display: flex; flex-direction: column; }
.v2-tr { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1.6fr) 64px 14px; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13px; min-height: 36px; box-sizing: border-box; }
.v2-tr:last-child { border-bottom: 0; }
.v2-tr.v2-th { min-height: 0; padding-top: 6px; padding-bottom: 6px; color: var(--ink-3); font-size: 12px; }
a.v2-tr:hover { background: var(--brand-soft); } a.v2-tr:hover .v2-go { color: var(--brand); }
.v2-tr .v2-go { color: var(--ink-3); font-size: 16px; text-align: right; overflow: visible; }
.v2-tr .num { text-align: right; font-variant-numeric: tabular-nums; }
.v2-tr .num b { font-weight: 600; color: var(--ink); } /* dark text; red only for overdue, amber only for waiting (no such state yet) */
.v2-tr .v2-w { display: flex; align-items: center; gap: 8px; min-width: 0; }
.v2-tr .v2-w .zi { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.v2-tr > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-tr .v2-clm { display: none; }
.v2-ok { margin: 0; padding: 14px; color: var(--ok); font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.v2-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; }
.v2-chip { display: inline-flex; flex-direction: column; justify-content: center; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.25; }
.v2-chip small { color: var(--ink-3); font-size: 11.5px; }
.v2-msg { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13px; }
.v2-msg:last-child { border-bottom: 0; }
.v2-msg span { display: flex; flex-direction: column; min-width: 0; }
.v2-msg span b { font-weight: 500; }
.v2-msg.new span b { font-weight: 700; }
.v2-msg small { color: var(--ink-3); }
.v2-msg .v2-when { flex: none; font-size: 12px; }
@media (max-width: 720px) {
  .v2-tr { grid-template-columns: minmax(0, 1fr) auto 12px; grid-template-areas: "what num go" "work num go"; row-gap: 2px; padding: 10px 14px; min-height: 56px; }
  .v2-tr.v2-th { display: none; }
  .v2-tr > span:nth-child(1) { grid-area: work; color: var(--ink-3); font-size: 12px; }
  .v2-tr > span:nth-child(2) { display: none; }
  .v2-tr > span:nth-child(3) { grid-area: what; font-weight: 500; }
  .v2-tr > span:nth-child(4) { grid-area: num; font-size: 16px; }
  .v2-tr > span.v2-go { grid-area: go; }
  .v2-tr .v2-w .zi { display: none; }
  .v2-tr .v2-w { display: block; }
  .v2-tr .v2-clm { display: inline; } /* the client goes with the work on a phone (no Client column there) */
  .v2-chip { min-height: 44px; }
  .v2-msg { min-height: 52px; }
}

/* ── My account: switch company ── */
.v2-cos h3 { margin: 0 0 8px; }
.v2-co { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 40px; padding: 6px 10px; margin: 0 0 6px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.v2-co.on { border-color: var(--brand); background: var(--brand-soft); }
.v2-co small { color: var(--ink-3); }
@media (max-width: 720px), (pointer: coarse) { .v2-co { min-height: 48px; } }

/* ── welcome after login ── */
.v2-welcome { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--surface, #ffffff); color: var(--ink, #1c2b33); transition: opacity .25s ease; }
.v2-welcome b { font: 600 20px/1.3 var(--font, system-ui); }
.v2-welcome small { color: var(--ink-3, #606770); font-size: 13px; }
.v2-welcome .v2w-bar { display: block; width: 140px; height: 4px; border-radius: 3px; background: var(--line-2, #d4d7dc); overflow: hidden; margin-top: 8px; }
.v2-welcome .v2w-bar > i { display: block; height: 100%; width: 100%; background: var(--brand, #1a5fe0); transform-origin: left; animation: v2w-fill 1.3s ease-in-out both; }
.v2-welcome.out { opacity: 0; pointer-events: none; }
@keyframes v2w-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .v2-welcome, .v2-welcome .v2w-bar > i { animation: none; transition: none; } }

/* ── the mark while the app loads (index.html) ── */
.v2-boot { min-height: 100vh; display: grid; place-items: center; background: #ffffff; }
@media (prefers-color-scheme: dark) { .v2-boot { background: #101317; } }

/* ── choose a company ── */
.v2-choose { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); box-sizing: border-box; }
.v2-choose .v2c-in { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; }
.v2-choose h1 { margin: 6px 0 0; font: 600 20px/1.3 var(--font, system-ui); color: var(--ink); }
.v2-choose .v2c-sub { margin: 0; color: var(--ink-3); font-size: 13px; }
.v2-choose .v2c-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.v2-choose .v2c-co { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.v2-choose .v2c-co:hover { border-color: var(--brand); }
.v2-choose .v2c-co:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.v2-choose .v2c-t { display: flex; flex-direction: column; min-width: 0; }
.v2-choose .v2c-t b { font-weight: 600; }
.v2-choose .v2c-t small { color: var(--ink-3); font-size: 12.5px; }

/* ── landing (v2 login page) ── */
.v2-landing { min-height: 100vh; background: var(--surface-2); color: var(--ink); display: flex; flex-direction: column; }
.v2-landing .v2l-top { background: var(--surface); padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); }
.v2-landing .v2l-brand { display: inline-flex; align-items: center; gap: 8px; }
.v2-landing .v2l-brand b { font: 600 16px/1 var(--font, system-ui); }
.v2-landing .v2l-brand small { color: var(--ink-3); font-size: 12.5px; }
.v2-landing .v2l-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); max-width: 1120px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.v2-landing .v2l-pitch h1 { margin: 0 0 6px; font: 600 26px/1.25 var(--font, system-ui); letter-spacing: -.015em; text-wrap: balance; color: var(--ink); }
.v2-landing .v2l-pitch p { margin: 0 0 16px; color: var(--ink-3); font-size: 14.5px; }
.v2-landing .v2l-pic { max-width: 560px; }
.v2-landing .v2-desk { display: block; width: 100%; height: auto; border-radius: 12px; }
.v2-landing .v2l-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.v2-landing .v2l-h { margin: 0; font: 600 18px/1.3 var(--font, system-ui); color: var(--ink); }
.v2-landing .v2l-s { margin: 4px 0 14px; color: var(--ink-3); font-size: 13px; }
.v2-landing .v2l-card :is(button.primary) { width: 100%; min-height: 44px; background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 8px; }
.v2-landing .v2l-card .persona { width: 100%; }
.v2-landing .v2l-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 1120px; width: 100%; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); box-sizing: border-box; }
.v2-landing .v2l-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.v2-landing .v2l-tile b { font-weight: 600; }
.v2-landing .v2l-tile small { color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.v2-landing .v2l-ic { width: 30px; height: 30px; border-radius: 8px; margin-bottom: 6px; background: var(--brand-soft); }
.v2-landing .v2l-ic.hr { background: #e1f5f0; }
.v2-landing .v2l-ic.books { background: #eef0f6; }
.v2-landing .v2l-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 10px auto 0; padding: 12px 16px; color: var(--ink-3); font-size: 12.5px; border-top: 1px solid var(--line); max-width: 1120px; width: 100%; box-sizing: border-box; }
.v2-landing .v2l-trust span::before { content: "✓ "; color: var(--ok); }
.v2-landing .v2l-foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 14px 16px 18px; color: var(--ink-3); font-size: 12px; }
.v2-landing .v2l-foot a { color: var(--ink-3); }
@media (max-width: 820px) {
  .v2-landing .v2l-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 18px; }
  .v2-landing .v2l-card { order: -1; } /* the login first on a phone – no scrolling to log in */
  .v2-landing .v2l-pitch h1 { font-size: 21px; }
  .v2-landing .v2l-tiles { grid-template-columns: minmax(0, 1fr); }
}

/* ── UI review, 26 Nov 2026 ── */
/* the footer line inside the app goes (the login page keeps Terms and Privacy) */
:root[data-shell="v2"] .app > .powered { display: none; }
/* phone: a page's buttons stay on one row – "More" becomes a square ⋯ beside them (no button alone on a line) */
@media (max-width: 720px) {
  :root[data-shell="v2"] #main .page-head .row.wrapr { flex-wrap: nowrap; width: 100%; }
  :root[data-shell="v2"] #main .page-head .row.wrapr > :is(a.btn, button) { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
  :root[data-shell="v2"] #main .page-head .row.wrapr > .dd > summary.btn { width: 44px; padding: 0; font-size: 0; }
  :root[data-shell="v2"] #main .page-head .row.wrapr > .dd > summary.btn::before { content: "⋯"; font-size: 20px; line-height: 1; }
}
/* PayFlow: progress in the v2 green, Part paid in amber, no empty filters, one filter row on both sizes, no gradients */
:root[data-shell="v2"] #main .prog i { background: var(--ok) !important; }
:root[data-shell="v2"] #main .chip.st-part_paid { background: var(--warn-soft) !important; color: var(--warn) !important; }
:root[data-shell="v2"] #main .chips button.cz0:not(.on) { display: none; }
:root[data-shell="v2"] #main #ftiles { display: none !important; }
:root[data-shell="v2"] #main #chips { display: flex !important; flex-wrap: wrap; gap: 6px; }
:root[data-shell="v2"] #main #chips button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); background-image: none; }
:root[data-shell="v2"] #main :is(.ftiles button, .paycard .pc-i, .tile, .chips button) { background-image: none !important; }
@media (max-width: 720px) { /* one row that scrolls sideways – no filter left alone on a line */
  :root[data-shell="v2"] #main #chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding-right: 16px; }
  :root[data-shell="v2"] #main #chips::-webkit-scrollbar { display: none; }
  :root[data-shell="v2"] #main #chips button { min-height: 44px; flex: none; white-space: nowrap; }
}
/* login: sentence case for the demo list, roles never leave one word alone, the +91 box joins the field cleanly */
:root[data-shell="v2"] .v2-landing .label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
:root[data-shell="v2"] .v2-landing :is(.persona small, .v2l-s, #stepPhone p, .v2l-tile small, .v2l-pitch p) { text-wrap: pretty; }
:root[data-shell="v2"] .v2-landing .persona b { font-family: var(--font); font-weight: 600; }
:root[data-shell="v2"] .v2-landing .phone-in { border-radius: 8px; }
:root[data-shell="v2"] .v2-landing .phone-in input { box-shadow: none !important; border: 0 !important; background: var(--surface); }
:root[data-shell="v2"] .v2-landing .phone-in:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ── second UI review, 26 Nov 2026 ── */
/* the demo strip: neutral grey, not navy */
:root[data-shell="v2"] .demo-bar { background: #eef0f3; color: #1c2b33; border-bottom: 1px solid #e4e6eb; }
:root[data-shell="v2"] .demo-bar select { color: #1c2b33; }
/* top line: an unpinned screen reads "Payroll › Employees" */
:root[data-shell="v2"] .topbar .crumbs.v2-path .c-prod, :root[data-shell="v2"] .topbar .crumbs.v2-path .sl { display: inline; }
:root[data-shell="v2"] .topbar .crumbs.v2-path .c-prod { color: var(--ink-3); font-weight: 500; }
:root[data-shell="v2"] .topbar .crumbs.v2-path .sl { color: var(--ink-3); font-weight: 400; }
@media (max-width: 720px) { :root[data-shell="v2"] .topbar .crumbs.v2-path { font-size: 16px; } }
/* the company / client: a box with ▾ only where it can change; otherwise plain text */
:root[data-shell="v2"] .topbar .top-co:not(.can), :root[data-shell="v2"] .topbar .top-client:not(.mm-can) { border: 0; background: none; padding: 0; height: auto; gap: 6px; }
:root[data-shell="v2"] .topbar .top-co:not(.can) .cl, :root[data-shell="v2"] .topbar .top-client:not(.mm-can) .cl { display: none; }
:root[data-shell="v2"] .topbar .top-co:not(.can) .nm, :root[data-shell="v2"] .topbar .top-client:not(.mm-can) .mm-nm { color: var(--ink-3); font-weight: 500; }
:root[data-shell="v2"] .topbar .top-co.can, :root[data-shell="v2"] .topbar .top-client.mm-can { border: 1px solid var(--line-2); background: var(--surface); }
@media (max-width: 720px) { :root[data-shell="v2"] .topbar .top-co:not(.can), :root[data-shell="v2"] .topbar .top-client:not(.mm-can) { height: 24px; } }
/* PayFlow: the card's detail line may take two lines */
:root[data-shell="v2"] #main .card.req .req-meta.one { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Employees: the Status column only when someone shown is not Active; one "More" (⋯) on laptop and phone */
@media (min-width: 721px) { :root[data-shell="v2"] #main #et.all-active :is(th, td):nth-child(3) { display: none; } }
:root[data-shell="v2"] #main .page-head .dd > summary.btn { font-size: 0 !important; padding: 0 !important; width: 32px; justify-content: center; }
:root[data-shell="v2"] #main .page-head .dd > summary.btn::before { content: "⋯"; font-size: 18px; line-height: 1; }
@media (max-width: 720px), (pointer: coarse) { :root[data-shell="v2"] #main .page-head .dd > summary.btn { width: 44px; flex: none; } }
.v2-fchip { display: none; }
@media (max-width: 720px) {
  :root[data-shell="v2"] #main #fl .v2-fchip { display: inline-flex; grid-column: 1 / -1; justify-self: start; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--brand); background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 500; }
}
/* All tools: Recent and Pinned are the same chips; a short fade at the bottom */
:root[data-shell="v2"] .ztools .zt-rec { flex-direction: row; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px; border-radius: 8px; }
:root[data-shell="v2"] .ztools .zt-rec b { font: 500 13px/1.25 var(--font); }
:root[data-shell="v2"] .ztools .zt-rec small { font-size: 12px; }
:root[data-shell="v2"] .ztools .zt-rec small::before { content: "· "; }
:root[data-shell="v2"] .ztools .zt-recent h3 { font: 600 13px/1.3 var(--font); color: var(--ink-3); }
:root[data-shell="v2"] .ztools .zt-recent { padding-left: 28px; padding-right: 28px; }
@media (max-width: 720px) { :root[data-shell="v2"] .ztools .zt-recent { padding-left: 16px; padding-right: 16px; } :root[data-shell="v2"] .ztools .zt-rec { min-height: 44px; } }
:root[data-shell="v2"] .ztools.more .zt-body { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent); }
/* selects: one style – the same box and ▾ as the company / client switchers */
:root[data-shell="v2"] #main select:not([multiple]) { -webkit-appearance: none; appearance: none; border: 1px solid var(--line-2); border-radius: 6px; background-color: var(--surface); color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23606770' stroke-width='2.4' 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 10px center; background-size: 12px; padding-right: 30px !important; padding-left: 10px; }
/* phone Export: a gap between the icon and the word */
:root[data-shell="v2"] #main .mis-exp > button { gap: 6px; }
:root[data-shell="v2"] #main .mis-exp > button .mc-lbl { margin: 0; }
