/* Labour Register – mobile-first styles. Colours are tokens; dark mode redefines them. */
:root {
  --bg: #f7f5f0; --surface: #ffffff; --surface-2: #f6f3ec; --ink: #1d1a16; --muted: #645d52; --line: #e6e0d4;
  --accent: #b8401a; --accent-ink: #ffffff; --accent-soft: #f6e3da;
  --ok: #1f7a3f; --ok-ink: #ffffff; --ok-soft: #dcefe2;
  --warn-bg: #fff4dc; --warn-ink: #7a4b00; --bad: #b42318; --bad-soft: #fde4e1;
  --gpay: #1a73e8; --gpay-ink: #ffffff;
  --chip-full: #dcefe2; --chip-half: #fbecc8; --chip-leave: #f9dcd8; --chip-none: #ece7dd;
  --shadow: 0 1px 2px rgba(40, 28, 10, .05), 0 4px 14px rgba(40, 28, 10, .06);
  --radius: 16px;
  --tabbar-h: 64px;
  --side-w: 248px;
  --fs: 19px; --fs-label: 16px; --fs-small: 15px; --tap: 56px;
}
:root[data-text="normal"] { --fs: 17px; --fs-label: 14px; --fs-small: 14px; --tap: 48px; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]) { --bg: #15120e; --surface: #221d17; --surface-2: #2a241d; --ink: #f2ece2; --muted: #a89f92; --line: #3a332a;
    --accent: #e0602f; --accent-ink: #ffffff; --accent-soft: #3a2418;
    --ok: #2f9a55; --ok-ink: #ffffff; --ok-soft: #1f3a28;
    --warn-bg: #3a2e14; --warn-ink: #f3d28f; --bad: #f07065; --bad-soft: #43231f;
    --gpay: #4c8df6; --gpay-ink: #ffffff;
    --chip-full: #1f3a28; --chip-half: #3d3216; --chip-leave: #43231f; --chip-none: #2f2a23;
    --shadow: 0 2px 10px rgba(0, 0, 0, .3); } }
:root[data-mode="dark"] { --bg: #15120e; --surface: #221d17; --surface-2: #2a241d; --ink: #f2ece2; --muted: #a89f92; --line: #3a332a;
    --accent: #e0602f; --accent-ink: #ffffff; --accent-soft: #3a2418;
    --ok: #2f9a55; --ok-ink: #ffffff; --ok-soft: #1f3a28;
    --warn-bg: #3a2e14; --warn-ink: #f3d28f; --bad: #f07065; --bad-soft: #43231f;
    --gpay: #4c8df6; --gpay-ink: #ffffff;
    --chip-full: #1f3a28; --chip-half: #3d3216; --chip-leave: #43231f; --chip-none: #2f2a23;
    --shadow: 0 2px 10px rgba(0, 0, 0, .3); }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "Noto Sans Tamil", "Nirmala UI", "Tamil Sangam MN", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs); line-height: 1.45; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 18px; }
h3 { font-size: 19px; margin-bottom: 10px; }
.icon { flex-shrink: 0; vertical-align: middle; }

.app { min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); }
.page { max-width: 640px; margin: 0 auto; padding: 8px 16px 24px; }
.page.has-savebar { padding-bottom: 96px; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.tiny { font-size: 12px; margin-top: 8px; }
.big { font-size: 20px; font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.neg { color: var(--bad); }
.empty { color: var(--muted); text-align: center; padding: 18px 0; margin: 0; }

.demo-ribbon { background: var(--accent); color: var(--accent-ink); text-align: center; font-size: 13px; font-weight: 600; padding: 3px 8px; padding-top: calc(3px + env(safe-area-inset-top)); }
.offline { background: var(--bad); color: #fff; text-align: center; font-size: 14px; padding: 6px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.demo-ribbon + .top, .demo-ribbon ~ .top { padding-top: 10px; }
.top-pad { width: 0; }
.top-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 2px; }
.top-title h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.top-title .co-pill { flex: none; margin: 0; gap: 6px; padding: 0 8px; }
.top-title .co-pill.plain { padding-left: 6px; }
.top-sub { font-size: 13.5px; color: var(--muted); flex: 1 0 100%; }
.co-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 8px 12px; }
.co-notice span { flex: 1 1 14em; min-width: 0; }
.co-notice .btn { min-height: var(--tap, 44px); flex: none; }
.top-right { display: flex; gap: 4px; }
.icon-btn { appearance: none; border: 0; background: transparent; color: var(--ink); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:active { background: var(--line); }
.icon-btn:disabled { opacity: .3; }
.icon-btn.accent { background: var(--accent); color: var(--accent-ink); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; box-shadow: var(--shadow); }
.card > h2 { margin-bottom: 8px; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.card-h h2 a { text-decoration: none; }
.card.paid { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.voice-hint { display: flex; gap: 12px; align-items: center; cursor: pointer; background: var(--accent-soft); border-color: transparent; }
.vh-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; }

.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { color: var(--muted); }
.kv > span:last-child { text-align: right; font-weight: 600; }
.kv.total > span:last-child { font-size: 19px; }

/* chips */
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--chip-none); white-space: nowrap; }
.chip.full { background: var(--chip-full); } .chip.half { background: var(--chip-half); } .chip.leave { background: var(--chip-leave); }
.chip-btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.chip-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }

/* buttons */
.btn { appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600;
  padding: 12px 14px; border-radius: 12px; cursor: pointer; min-height: var(--tap); text-align: center; overflow-wrap: anywhere; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.gpay { background: var(--gpay); border-color: var(--gpay); color: var(--gpay-ink); }
.btn.wide { width: 100%; margin-top: 8px; }
.btn.small-btn { min-height: 44px; padding: 8px 12px; font-size: 14.5px; }
.link-btn { appearance: none; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 8px; min-height: 48px; min-width: 48px; }
.two-btn, .actions .two-btn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.three-btn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.actions { display: grid; gap: 0; margin-top: 12px; }
.actions .btn.wide:first-child { margin-top: 0; }

.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.link-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; text-decoration: none; padding: 14px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; font-weight: 600; }

/* messages */
.note { background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: 8px; padding: 8px 12px; font-size: 14.5px; margin: 10px 0; }
.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 9px 12px; font-size: 15px; margin: 8px 0; }
.warn a { font-weight: 700; margin-left: 6px; }
.err-text { color: var(--bad); font-size: 14.5px; font-weight: 600; }

/* forms */
.form .field { display: block; margin: 10px 0; }
.field-l { display: block; font-size: var(--fs-label); color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.field-e { display: block; color: var(--bad); font-size: var(--fs-label); font-weight: 600; margin-top: 4px; }
.field-h { display: block; color: var(--muted); font-size: var(--fs-small); margin-top: 4px; }
input, select, textarea { width: 100%; font: inherit; font-size: var(--fs); padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); min-height: var(--tap); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
textarea { min-height: 80px; resize: vertical; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); }
.check-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 16px; min-height: 44px; }
.check-row input { width: 26px; height: 26px; flex: none; }
:root:not([data-text="normal"]) .check-row { min-height: var(--tap); font-size: var(--fs); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.two-col input { min-width: 0; padding-left: 8px; padding-right: 6px; }
.file-ready .btn { white-space: nowrap; flex-shrink: 0; }
.search { position: relative; margin: 8px 0; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; }

/* segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg-b { appearance: none; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; padding: 10px 6px; border-radius: 9px; cursor: pointer; min-height: var(--tap); }
.seg-b.on { background: var(--ink); color: var(--bg); }
.seg-b.full.on { background: var(--ok); color: #fff; }
.seg-b.half.on { background: #c98a12; color: #fff; }
.seg-b.leave.on { background: var(--bad); color: #fff; }
.seg-b:disabled { opacity: .45; cursor: not-allowed; }
.seg.small .seg-b { font-size: 14px; padding: 8px 4px; min-height: 42px; }

/* date navigation */
.date-nav { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.date-nav input { flex: 1; text-align: center; }
.date-label { flex: 1; text-align: center; font-weight: 600; }

/* attendance */
.att-list { list-style: none; padding: 0; margin: 8px 0; }
.att-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 8px 0; }
.att-list li.changed { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.att-name { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 8px; }
.att-name a { text-decoration: none; }
.lock { color: var(--muted); }
.att-switch { margin: 4px 0 6px; }

/* week grid and month calendar: tap boxes */
.att-grid { display: grid; grid-template-columns: minmax(0, 1fr) repeat(7, 36px); gap: 4px 2px; align-items: center; justify-items: center; margin: 10px -8px 0; }
.ag-corner { justify-self: stretch; }
.ag-day { display: flex; flex-direction: column; align-items: center; width: 36px; padding: 3px 0; border-radius: 8px; font-size: 12px; line-height: 1.2; color: var(--muted); }
.ag-day b { font-size: 14px; color: var(--ink); }
.ag-day.today { background: var(--accent-soft); }
.ag-day.hol, .ag-day.hol b { color: var(--muted); }
.ag-name { justify-self: stretch; display: flex; align-items: center; gap: 3px; min-width: 0; font-size: 14px; line-height: 1.2; font-weight: 600; text-decoration: none; padding-left: 8px; }
.ag-name > .ag-n { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.loading-box { display: grid; place-items: center; padding: 40px 0; }
.box { touch-action: manipulation; appearance: none; width: 34px; height: 34px; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font: inherit; font-size: 17px; font-weight: 700; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.box .ot { font-size: 11px; font-weight: 600; line-height: 1; margin-top: 1px; }
button.ag-day { appearance: none; border: 0; background: transparent; font: inherit; font-size: 12px; line-height: 1.2; cursor: pointer; touch-action: manipulation; }
button.ag-day.today { background: var(--accent-soft); }
button.ag-day:disabled { cursor: default; }
button.mc-n { appearance: none; border: 0; background: transparent; font: inherit; font-size: 12px; line-height: 1.2; color: var(--muted); cursor: pointer; padding: 2px 8px; min-width: 28px; touch-action: manipulation; text-decoration: underline; text-underline-offset: 2px; }
button.mc-n:disabled { cursor: default; text-decoration: none; }
.ot-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; }
.ot-btn { touch-action: manipulation; appearance: none; width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 28px; font-weight: 700; line-height: 1; cursor: pointer; }
.ot-btn:disabled { opacity: .4; cursor: not-allowed; }
.ot-val { min-width: 116px; text-align: center; font-size: 17px; font-weight: 600; color: var(--muted); }
.ot-val.on { color: var(--ink); }
.ot-note { margin: 6px 0 0; text-align: center; font-size: 13px; color: var(--warn-ink); }
.box.full { background: var(--chip-full); color: var(--ok); border-color: transparent; }
.box.half { background: var(--chip-half); color: var(--warn-ink); border-color: transparent; }
.box.leave { background: var(--chip-leave); color: var(--bad); border-color: transparent; }
.box.none.hol:not(.off) { background: var(--surface-2); border-style: dashed; }
.box.changed { box-shadow: 0 0 0 2px var(--accent); }
.box.locked { opacity: .55; cursor: not-allowed; }
.box.off { background: transparent; border-color: transparent; cursor: default; }
.box.off.full, .box.off.half, .box.off.leave { opacity: .5; }
.att-grid.month { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px 2px; margin: 10px 0 0; }
.mc { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0; border-radius: 10px; min-width: 0; }
.mc.today { background: var(--accent-soft); }
.mc-n { font-size: 12px; color: var(--muted); line-height: 1.2; }
.date-nav select { flex: 1; min-width: 0; }
.savebar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 25; display: grid; grid-template-columns: 1fr 2fr; gap: 8px;
  padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }

/* pay */
.deduct-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.deduct-row > span:first-child { color: var(--muted); }
.money-in { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.money-in input { width: 120px; text-align: right; font-weight: 700; }
/* pay slip lines: label left, amount right, boxes 120px */
.slip { margin: 6px 0 10px; }
.slip .sl { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.slip .sl-l { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.slip .sl-v { text-align: right; font-weight: 600; white-space: nowrap; }
.slip .sl.days .sl-l { font-weight: 700; }
.slip .sl.muted-line .sl-l, .slip .sl.muted-line .sl-v { color: var(--muted); font-weight: 400; }
.slip .sl.total-line { border-top: 2px solid var(--ink); border-bottom: 0; margin-top: 4px; padding-top: 9px; }
.slip .sl.total-line .sl-l, .slip .sl.total-line .sl-v { font-weight: 800; }
.slip .sl.final .sl-v { font-size: 20px; }
.slip .money-in.bad input { border-color: var(--bad); }
.slip .btn.small-btn { margin: 8px 0 2px; }
.slip .chip-btn { margin: 4px 0; }
.pick-list { display: grid; gap: 8px; margin-bottom: 10px; }
.pay-card .pay-name + .muted, .pay-card > .muted.small { margin-bottom: 4px; }

/* lists */
.list { list-style: none; padding: 0; margin: 8px 0; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; padding: 12px 14px; margin: 8px 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ledger { list-style: none; padding: 0; margin: 10px 0 0; }
.ledger li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ledger li:last-child { border-bottom: 0; }
.ledger li[role=button] { cursor: pointer; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; font-size: 13px; padding: 6px 0; border-radius: 10px; }
.wd.today { background: var(--accent-soft); }
.wd .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; background: var(--chip-none); }
.wd .dot.full { background: var(--chip-full); } .wd .dot.half { background: var(--chip-half); } .wd .dot.leave { background: var(--chip-leave); }
.ledger .right b { white-space: nowrap; }
.ledger li > div:first-child { min-width: 0; }

/* history */
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.h-top { display: flex; justify-content: space-between; gap: 8px; }
.h-changes { font-size: 14.5px; margin: 4px 0; }
.h-changes s { color: var(--muted); }

/* reports */
.report h2 { margin-bottom: 2px; }
.table-wrap { overflow-x: auto; margin: 8px -16px 0; padding: 0 16px; -webkit-overflow-scrolling: touch; }
.table-wrap table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.table-wrap th, .table-wrap td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-wrap th { background: var(--surface-2); font-weight: 600; position: sticky; top: 0; }
.table-wrap tr.tap-row { cursor: pointer; }
.table-wrap tr.tap-row:hover, .table-wrap tr.tap-row:active { background: var(--surface-2); }
.table-wrap tfoot td { font-weight: 700; background: var(--surface-2); }
th.left, td.left { text-align: left; } th.right, td.right { text-align: right; } th.center, td.center { text-align: center; }
.file-ready { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; background: var(--ok-soft); border-radius: 12px; font-size: 14px; word-break: break-all; }

/* bottom sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(20, 14, 6, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; background: var(--bg); border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: up .2s ease-out;
  padding-bottom: env(safe-area-inset-bottom); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 18px; }
.sheet-body { overflow-y: auto; padding: 4px 16px 20px; -webkit-overflow-scrolling: touch; }
@keyframes up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 20px; } }

/* voice */
.listen { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0 8px; text-align: center; }
.listen .warn { width: 100%; text-align: left; }
.listen-t { font-size: 19px; font-weight: 700; }
.mic-big { width: 128px; height: 128px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 18px rgba(184, 64, 26, .35); }
.mic-big.rec { background: var(--bad); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, .45); } 50% { box-shadow: 0 0 0 20px rgba(180, 35, 24, 0); } }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.type-box { text-align: center; margin-top: 6px; }
.type-box textarea { margin-top: 8px; }
.vcard .said { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 16px; }
.vcard .said b { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.day-lines { margin: 6px 0; }
.day-lines .kv { padding: 6px 0; }
.day-lines .chip { font-size: 13px; padding: 1px 7px; }
.pick { margin: 8px 0; padding: 10px; border: 1.5px dashed var(--accent); border-radius: 12px; }
.pick p { margin: 0 0 8px; font-weight: 600; color: var(--accent); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabbar-h); text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.tab.on { color: var(--accent); }
.tab span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.tab-mic { justify-self: center; align-self: center; width: 66px; height: 66px; margin-top: -26px; border-radius: 50%; border: 4px solid var(--bg); background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgba(184, 64, 26, .4); }
.tab-mic:active { transform: scale(.95); }

/* toasts */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; max-width: 520px; text-align: center; box-shadow: var(--shadow); }
.toast.err { background: var(--bad); color: #fff; }

/* splash + login */
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.login { max-width: 460px; margin: 0 auto; padding: calc(40px + env(safe-area-inset-top)) 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.login-top { text-align: center; margin-bottom: 8px; }
.login-top h1 { font-size: 26px; margin-top: 10px; }
.logo { width: 76px; height: 76px; border-radius: 20px; background: var(--accent); margin: 0 auto; position: relative; box-shadow: var(--shadow); }
.stick { position: absolute; left: 36px; top: 26px; width: 6px; height: 38px; background: #f3d9a4; border-radius: 3px; transform: rotate(18deg); }
.stick::before { content: ""; position: absolute; left: -4px; top: -10px; width: 14px; height: 16px; border-radius: 50% 50% 45% 45%; background: #5a1408; }

/* ---------------- company pill, switch sheet, form ---------------- */
.co-pill { appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; margin: 0 0 2px; padding: 0 12px 0 10px;
  border: 1px solid var(--line); border-left: 5px solid var(--co, var(--accent)); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.co-pill.plain { cursor: default; background: transparent; border-color: transparent; border-left-color: var(--co, var(--accent)); padding-left: 8px; }
.co-pill:not(.plain):active { background: var(--line); }
.co-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-caret { color: var(--muted); font-size: 14px; }
.co-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.co-dot.big { width: 22px; height: 22px; }
.co-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.co-row { appearance: none; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; text-align: left; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-left: 8px solid var(--co, var(--accent)); border-radius: 14px; cursor: pointer; }
.co-row.static { cursor: default; min-height: 56px; }
.co-row.on { border-color: var(--co, var(--accent)); background: var(--surface-2); }
.co-row:disabled { opacity: .6; }
.co-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 17px; }
.co-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.co-swatch { appearance: none; width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.co-swatch.on { border-color: var(--ink); }
.co-check { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 17px; }
.co-check input { width: 26px; height: 26px; flex: none; }
.no-company { gap: 16px; padding: 24px; text-align: center; }
.no-company-t { font-size: 20px; font-weight: 700; max-width: 22em; }
.btn.small-btn.co-edit { min-height: 44px; }
.co-logo { flex: none; width: 24px; height: 24px; border-radius: 6px; object-fit: contain; background: #fff; }

/* ---------------- photos, allowance types ---------------- */
.avatar-wrap { display: inline-block; flex: none; }
.avatar { flex: none; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; line-height: 1; overflow: hidden; padding: 0; border: 0; }
button.avatar { appearance: none; cursor: pointer; background: var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-full { display: block; width: 100%; height: auto; border-radius: 12px; }
.photo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.photo-box { flex: none; width: 96px; height: 96px; display: grid; place-items: center; overflow: hidden; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface-2); text-align: center; }
.photo-box.round { border-radius: 50%; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box:has(img) { border-style: solid; }
.photo-btns { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 8px; }
.photo-btns .btn { margin: 0; }
.hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.al-row { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; }
.al-row.off { opacity: .6; background: var(--surface-2); }
.al-row { flex-wrap: wrap; }
.al-row .co-row-t { flex: 1 1 100%; }          /* the name gets its own line; the state word and Edit sit under it */
.switch { appearance: none; flex: none; min-width: 72px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 2px solid var(--line); background: var(--surface-2); color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.switch.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.switch:disabled { opacity: .6; }

/* ---------------- step form ---------------- */
.step-head { margin: 8px 0 4px; }
.step-head > b { display: block; font-size: 18px; }
.dots { display: flex; gap: 8px; margin: 10px 0 6px; }
.dot-s { flex: 1; height: 8px; border-radius: 4px; background: var(--line); }
.dot-s.done { background: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.dot-s.on { background: var(--ok); }
.step-body { margin-top: 6px; }
.step-bar { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 16px; }
.step-bar .btn { margin: 0; }
.fill-marked { margin: 8px 0 0; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 12px; }
.quick-b { appearance: none; min-height: var(--tap); padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.quick-b.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stepform .check .card { margin: 10px 0; }
/* ---------------- employee master ---------------- */
.row-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.w-top { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.w-top.small { gap: 12px; }
.w-top-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* ---------------- photos beside names ---------------- */
.picker { display: flex; flex-direction: column; gap: 8px; }
.picker-q { width: 100%; }
.picker-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.picker-list li { border-bottom: 1px solid var(--line); }
.picker-list li:last-child { border-bottom: 0; }
.picker-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 12px; cursor: pointer; }
.picker-row:active, .picker-row:focus-visible { background: var(--surface-2); outline: none; }
.picker-chosen { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.picker-chosen .btn { margin-left: auto; margin-top: 0; margin-bottom: 0; }
.picker-t { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.pay-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.confirm-who { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; font-size: 20px; min-width: 0; overflow-wrap: anywhere; }
.who { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; text-align: right; }
.pick-opt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 6px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); font-weight: 600; cursor: pointer; }
.date-nav .avatar-wrap, .date-nav .avatar { flex: none; }
.w-emp { font-size: 20px; }
.w-wage { font-size: 24px; }
.al-editor { display: flex; flex-direction: column; gap: 8px; }
.al-edit { display: flex; align-items: flex-end; gap: 10px; }
.al-edit-f { flex: 1; min-width: 0; }
.al-edit-f .field { margin: 0; }
.al-edit .btn { margin: 0 0 2px; min-height: var(--tap); }
.al-pick { display: grid; gap: 8px; }
.al-pick .btn { margin: 0; }
.aadhaar-line { font-size: 22px; letter-spacing: .5px; padding: 6px 0; }
.edit-master .card > h2 { margin-bottom: 10px; }
.doc-list { list-style: none; padding: 0; margin: 0 0 8px; }
.doc-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.doc-row:last-child { border-bottom: 0; }
.doc-open { appearance: none; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 4px; border: 0; background: none;
  font: inherit; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.doc-open.off { opacity: .6; cursor: default; }
.doc-ic { flex: none; color: var(--accent); display: inline-flex; }
.doc-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-row .btn { margin: 0; }
.doc-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.doc-types .btn { margin: 0; }
.doc-types .btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.doc-file { margin: 8px 0 0; word-break: break-all; color: var(--muted); }

/* salary cycle */
.cycle-now { font-size: 1.1em; }
.cycle-plan { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; margin: 6px 0; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--accent); }
.chip.monthly { background: var(--surface-2); color: var(--accent); }

/* money needed for pay day */
.money-card .money-date { margin: 0 0 10px; }
.money-part { padding: 8px 0 4px; border-top: 1px solid var(--line); }
.money-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 2px solid var(--line); font-weight: 700; }
.money-big { font-size: 28px; font-weight: 800; text-align: right; }
.money-split { text-align: right; margin: 2px 0 8px; }
.money-spin { display: grid; place-items: center; padding: 14px 0; }
.money-others { margin: 10px 0; display: grid; gap: 8px; }
.money-co { padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.money-co-n { font-weight: 700; }
.money-co-v { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 16px; }
.money-card .two-btn { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

/* gifts */
.gift-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 12px; }
.gift-choice { appearance: none; min-height: 56px; padding: 8px 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.gift-choice.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tick-wrap { margin-top: 4px; }
.tick-count { margin: 10px 0 6px; }
.tick-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.tick-list li { border-bottom: 1px solid var(--line); }
.tick-list li:last-child { border-bottom: 0; }
.tick-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 12px; cursor: pointer; }
.tick-row:focus-visible { background: var(--surface-2); outline: none; }
.tick-t { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.tick-box { flex: none; width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; }
.tick-box.on { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); }
.gift-list .right { text-align: right; }
.gift-list .btn { margin-top: 6px; }.sheet .step-bar { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 4px; z-index: 1; }

/* send on WhatsApp */
.btn.wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; min-height: 56px; width: 100%; font-size: 18px; margin-top: 8px; }
.btn.wa.disabled { opacity: .4; cursor: not-allowed; }
.btn.small-btn.wa-small { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.send-who { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; min-width: 0; }
.send-who-t { min-width: 0; overflow-wrap: anywhere; font-size: 20px; }
.slip-prev { display: block; max-width: 100%; max-height: 240px; width: auto; height: auto; margin: 12px auto 0; border: 1px solid var(--line); border-radius: 8px; }
.send-list { list-style: none; margin: 0; padding: 0; }
.send-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.send-row:last-child { border-bottom: 0; }
.send-row-t { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.send-row-a { flex: none; width: 128px; text-align: center; }
.send-row-a .btn.wa { min-height: 48px; font-size: 16px; margin-top: 0; }
:root:not([data-text="normal"]) .send-row-a .btn.wa { min-height: 56px; }
.pay-list .right { text-align: right; }

/* bonus */
.bonus-master { margin: 4px 0 10px; overflow-wrap: anywhere; }
.bonus-days { margin: 2px 0; font-size: 18px; }
.bonus-prop { margin: 4px 0 8px; font-weight: 600; color: var(--ok, #1f8f4e); overflow-wrap: anywhere; }
.bonus-paid { margin: 6px 0; font-size: 18px; overflow-wrap: anywhere; }
.big-amount { margin: 10px 0; font-size: 32px; text-align: center; overflow-wrap: anywhere; }
/* Excel uploads */
.up-choice { display: flex; align-items: center; gap: 14px; min-height: 72px; margin: 12px 0; padding: 12px 16px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.up-choice > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.up-choice small { color: var(--muted); font-size: var(--fs-small); }
.up-company { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 600; overflow-wrap: anywhere; }
.up-input { display: none; }
.up-file { margin: 10px 0 4px; overflow-wrap: anywhere; }
.up-pick .btn { margin-top: 8px; }
.up-list { list-style: none; margin: 12px 0 0; padding: 0; }
.up-row { min-height: var(--tap); margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow-wrap: anywhere; }
.up-row > b { font-weight: 800; }
.up-row .up-name { font-weight: 600; }
.up-row.up-problem { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.up-row.up-skip { color: var(--muted); }
.up-big { text-align: center; }
.up-done .btn { margin-top: 10px; }
.up-month .btn { margin-top: 8px; }
.up-month-input { display: block; width: 100%; min-height: var(--tap); margin-top: 12px; font-size: inherit; }
.up-name-card { margin: 12px 0; }
.up-name-card .btn { margin-top: 8px; }
.up-file-name { margin: 0 0 6px; font-size: 1.25em; overflow-wrap: anywhere; }
.up-answer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; overflow-wrap: anywhere; }
.up-answer .btn { margin-top: 0; margin-left: auto; }
.up-cands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.up-cands .btn.up-cand { margin-top: 0; flex-direction: column; gap: 4px; min-width: 0; }
.up-cand > span { display: flex; flex-direction: column; min-width: 0; }
.bio-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.bio-file { font-weight: 600; }
.bio-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.bio-row .btn { margin-left: auto; }

/* ---- phase 6: shared sizes (design 6.7). Large is the default; Normal keeps 44 px taps. ---- */
.att-name a, .pay-name a, .card-h h2 a, .warn a, .note a { display: inline-flex; align-items: center; min-height: 44px; }
.ledger li[role=button] { min-height: 44px; align-items: center; }
:root[data-text="normal"] .chip-btn, :root[data-text="normal"] .seg.small .seg-b { min-height: 44px; }
:root:not([data-text="normal"]) .btn.small-btn { min-height: var(--tap); font-size: 16px; }
:root:not([data-text="normal"]) .chip-btn { min-height: var(--tap); padding: 0 16px; font-size: 16px; }
:root:not([data-text="normal"]) .seg.small .seg-b { min-height: var(--tap); font-size: 17px; }
:root:not([data-text="normal"]) .switch, :root:not([data-text="normal"]) .link-btn,
:root:not([data-text="normal"]) .pick-opt, :root:not([data-text="normal"]) .co-check { min-height: var(--tap); }
:root:not([data-text="normal"]) .date-nav .icon-btn { width: 56px; height: 56px; border: 1px solid var(--line); background: var(--surface); }
:root:not([data-text="normal"]) h2, :root:not([data-text="normal"]) .sheet-head h2 { font-size: 20px; }
:root:not([data-text="normal"]) .top-sub, :root:not([data-text="normal"]) .chip, :root:not([data-text="normal"]) .badge,
:root:not([data-text="normal"]) .day-lines .chip { font-size: 15px; }
:root:not([data-text="normal"]) .note, :root:not([data-text="normal"]) .warn, :root:not([data-text="normal"]) .err-text,
:root:not([data-text="normal"]) .h-changes, :root:not([data-text="normal"]) .tiny, :root:not([data-text="normal"]) .file-ready,
:root:not([data-text="normal"]) .link-card { font-size: var(--fs-small); }
:root:not([data-text="normal"]) .toast { font-size: 17px; }
:root:not([data-text="normal"]) .tab span { font-size: 13px; }
:root:not([data-text="normal"]) .vcard .said { font-size: var(--fs); }
:root:not([data-text="normal"]) .vcard .said b { font-size: var(--fs-small); }
:root:not([data-text="normal"]) .co-caret { font-size: 15px; }

/* ---- phase 6 task 4: attendance grids ---- */
/* Week day header sticks under the screen header; solid background so rows never show through. */
.att-grid.week .ag-day, .att-grid.week .ag-corner { position: sticky; top: var(--top-h, 64px); z-index: 5; background: var(--bg); }
.att-grid.week .ag-day.today { background: var(--accent-soft); }
:root:not([data-text="normal"]) .att-grid.week { grid-template-columns: repeat(7, 44px); justify-content: center; gap: 4px; margin: 10px 0 0; }
:root:not([data-text="normal"]) .att-grid.week .ag-corner { display: none; }
:root:not([data-text="normal"]) .att-grid.week .ag-name { grid-column: 1 / -1; min-height: 44px; padding: 8px 0 0; font-size: 17px; gap: 8px; }
:root:not([data-text="normal"]) .att-grid.week .ag-name .avatar-wrap, :root:not([data-text="normal"]) .att-grid.week .ag-name .avatar { flex: none; }
:root:not([data-text="normal"]) .att-grid.week .ag-day { width: 44px; min-height: 44px; }
:root:not([data-text="normal"]) .att-grid.week .ag-day span { font-size: 13px; }
:root:not([data-text="normal"]) .att-grid.week .ag-day b { font-size: 15px; }
:root:not([data-text="normal"]) .att-grid .box { width: 44px; height: 44px; font-size: 20px; }
:root:not([data-text="normal"]) .att-grid .box .ot { font-size: 12px; }
:root:not([data-text="normal"]) button.mc-n { min-width: 44px; min-height: 44px; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
:root:not([data-text="normal"]) .att-grid.month { gap: 6px 2px; }

/* ---- phase 6 task 5: everyday screens ---- */
/* Today's links: 2 x 2 at Normal, one column of rows at Large. */
.links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.link-card { min-height: 44px; overflow-wrap: anywhere; }
:root:not([data-text="normal"]) .links { grid-template-columns: minmax(0, 1fr); }
:root:not([data-text="normal"]) .link-card { flex-direction: row; justify-content: flex-start; text-align: left; gap: 14px; min-height: var(--tap); padding: 10px 16px; font-size: 17px; }
:root:not([data-text="normal"]) .link-card .icon { flex: none; }
/* search labels, report presets two to a row */
.find-field { display: block; margin: 8px 0; }
.find-field .search { margin: 0; }
.picker-ql { display: block; }
.quick.two-per-row .quick-b { flex: 1 1 calc(50% - 4px); min-width: 0; padding: 6px 10px; line-height: 1.25; overflow-wrap: anywhere; }
.quick.two-per-row { margin: 4px 0 12px; }
.table-wrap tr[role=button] td { padding: 12px 8px; }
/* worker page: phone link, week strip */
.kv a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 44px; }
a.link-btn { display: inline-flex; align-items: center; justify-content: center; }
.week-strip { gap: 0; }
.week-strip .wd { min-width: 0; min-height: 44px; }
:root:not([data-text="normal"]) .week-strip .wd { font-size: 15px; min-height: 56px; }
:root:not([data-text="normal"]) .week-strip .wd .dot { width: 36px; height: 36px; }
/* pay sheet, voice sheet, sheets */
:root:not([data-text="normal"]) .money-in input { width: 128px; font-size: var(--fs); }
:root:not([data-text="normal"]) .slip .chip-btn { border-radius: 12px; font-size: var(--fs); font-weight: 600; background: var(--surface); }
:root:not([data-text="normal"]) .listen-t { font-size: 21px; }
:root:not([data-text="normal"]) .sheet-body textarea { font-size: var(--fs); }
:root:not([data-text="normal"]) .sheet-body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }

/* ---- Today: one big attendance card, folded money card, six big tiles ---- */
.hero-n { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero-big { font-size: 44px; font-weight: 800; line-height: 1.1; }
.hero-big small { font-size: 24px; font-weight: 700; color: var(--muted); }
.bar { height: 12px; border-radius: 999px; background: var(--chip-none); overflow: hidden; margin: 10px 0 4px; }
.bar > i { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .3s; }
.done-line { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 700; margin: 4px 0 8px; }
.btn.big-btn { min-height: 64px; font-size: 20px; gap: 10px; }
.fold-h { appearance: none; width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; min-height: var(--tap); margin: 12px 0; box-shadow: var(--shadow); cursor: pointer; }
.fold-h .icon:first-child { color: var(--accent); flex: none; }
.fold-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fold-h[aria-expanded="true"] { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.fold-h[aria-expanded="true"] + .fold-b > .card:first-child { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.fold-b > .card:first-child > h2:first-child, .fold-b > .card:first-child > .card-h:first-child > h2:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.tile { appearance: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; text-decoration: none; font: inherit;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 8px; min-height: 112px; cursor: pointer; }
.tile:active { transform: translateY(1px); }
.tile-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.tile-t { font-weight: 700; font-size: var(--fs-small); overflow-wrap: anywhere; }
.tile-s { font-size: var(--fs-small); color: var(--muted); }
.tile:focus-visible, .fold-h:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .bar > i { transition: none; } .tile:active, .btn:active { transform: none; } }

/* =====================================================================
   Design v2: calmer surfaces, clear focus and hover, and one layout for phone, tablet and desktop.
   Phone (< 768): one column, tab bar at the bottom.  Tablet (>= 768): wider column, 3-up tiles.
   Desktop (>= 1024): left sidebar, wide page, two columns where a screen has them.
   ===================================================================== */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 75%, transparent); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
.btn, .chip-btn, .seg-b, .tile, .fold-h, .icon-btn, .list-row, .co-row, .link-card, .tab, input, select, textarea { transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
@media (hover: hover) {
  .btn:hover:not(:disabled) { border-color: var(--muted); background: var(--surface-2); }
  .btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ok) 88%, #000); border-color: transparent; }
  .tile:hover, .fold-h:hover, .list-row:hover, .link-card:hover, .co-row:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 4px 16px rgba(40, 28, 10, .10); }
  .icon-btn:hover { background: var(--line); }
}
.btn.primary { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
input, select, textarea { background: var(--surface); border-width: 1.5px; }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: var(--muted); }
.card { padding: 16px 18px; }
.card > h2, .card-h h2 { font-size: 19px; letter-spacing: .1px; }
.chip { font-weight: 700; }

/* header: long names wrap to two lines instead of being cut off */
.top-title h1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.25; }

/* brand mark (the same icon in the sidebar and on sign-in) */
.logo { display: grid; place-items: center; color: var(--accent-ink); }
.brand, .mic-label, .tab.side-only { display: none; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.brand b { line-height: 1.2; overflow-wrap: anywhere; }

/* sign-in */
.login { padding-top: calc(56px + env(safe-area-inset-top)); }
.login > .card.form, .login > .card { box-shadow: var(--shadow); }

/* Today */
.today-grid { display: block; }
.today-grid .col { min-width: 0; }

/* ---- tablet ---- */
@media (min-width: 768px) {
  .page { max-width: 760px; padding-left: 24px; padding-right: 24px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-big { font-size: 52px; }
  .table-wrap { margin-left: -24px; margin-right: -24px; padding: 0 24px; }
}

/* ---- desktop: sidebar ---- */
@media (min-width: 1024px) {
  .app { padding-left: var(--side-w); padding-bottom: 0; }
  .tabbar { top: 0; bottom: 0; left: 0; right: auto; width: var(--side-w); height: auto; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 20px 14px; border-top: 0; border-right: 1px solid var(--line); overflow-y: auto; }
  .brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; font-size: 17px; }
  .tab { order: 2; flex-direction: row; justify-content: flex-start; height: 52px; padding: 0 16px; gap: 14px; border-radius: 12px; font-size: 16px; }
  .tab span, :root:not([data-text="normal"]) .tab span { font-size: 16px; max-width: none; overflow: visible; text-overflow: clip; white-space: normal; padding: 0; }
  .tab:hover { background: var(--surface-2); }
  .tab.on { background: var(--accent-soft); color: var(--accent); }
  .tab.side-only { display: flex; }
  .tab-mic { order: 1; width: 100%; height: 56px; margin: 0 0 14px; border: 0; border-radius: 14px; display: flex; flex-direction: row; gap: 10px; justify-content: center; align-self: stretch;
    font: inherit; font-weight: 700; font-size: 17px; box-shadow: 0 4px 12px rgba(184, 64, 26, .28); }
  .mic-label { display: inline; }
  .tab-mic:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
  .top { padding: 18px 32px; padding-top: 18px; }
  .top-title h1 { font-size: 26px; }
  .page { max-width: 1120px; padding: 12px 32px 56px; }
  .page.has-savebar { padding-bottom: 110px; }
  .savebar { left: var(--side-w); bottom: 0; padding-left: 32px; padding-right: 32px; }
  .toasts { left: var(--side-w); bottom: 24px; }
  .co-notice { margin-left: 32px; margin-right: 32px; }
  .table-wrap { margin-left: 0; margin-right: 0; padding: 0; }
  .today-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .today-grid .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
  .phone-only { display: none !important; }
}
@media (min-width: 1440px) { .page { max-width: 1240px; } }

/* ---- screens: narrow forms, two-column card screens, list grids ---- */
.page.narrow, .form-narrow { max-width: 720px; }
.page.narrow { margin-left: auto; margin-right: auto; }
.form-narrow { margin-left: 0; margin-right: auto; }
@media (min-width: 768px) { .list, .att-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; } }
@media (min-width: 1440px) { .list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.list > li, .att-list > li { min-width: 0; }
.list-row { margin: 6px 0; }
@media (min-width: 1100px) {
  .page.cols { column-count: 2; column-gap: 28px; }
  .page.cols > * { break-inside: avoid; }
  .page.cols > .span-all { column-span: all; }
  /* week grid: the table layout again (names beside the seven boxes) */
  :root:not([data-text="normal"]) .att-grid.week { grid-template-columns: minmax(180px, 1fr) repeat(7, 56px); justify-content: stretch; gap: 6px 4px; }
  :root:not([data-text="normal"]) .att-grid.week .ag-corner { display: block; }
  :root:not([data-text="normal"]) .att-grid.week .ag-name { grid-column: auto; padding: 0 8px; min-height: 56px; }
  :root:not([data-text="normal"]) .att-grid.week .ag-day { width: 56px; }
  :root:not([data-text="normal"]) .att-grid .box { width: 52px; height: 52px; }
}
.att-grid.month { max-width: 640px; margin-left: auto; margin-right: auto; }
.page.has-savebar .att-grid.month { max-width: 640px; }

/* header text and page content share one left edge on wide screens, also when the page is narrow */
:root { --page-max: 1120px; }
@media (min-width: 1440px) { :root { --page-max: 1240px; } }
@media (min-width: 1024px) {
  .top { padding-left: max(32px, calc((100% - var(--page-max)) / 2 + 32px)); padding-right: max(32px, calc((100% - var(--page-max)) / 2 + 32px)); }
  .page { max-width: var(--page-max); }
  .page.narrow { margin-left: max(0px, calc((100% - var(--page-max)) / 2)); margin-right: auto; }
}

/* =====================================================================
   Design v3 (Pathivu): a calm ledger look. Deep-blue brand, saffron for the voice button, green only for "done / paid",
   white cards on a cool grey page, big round shapes, one colour per kind of action.
   Everything above still applies; this block only re-tokens and re-skins it.
   ===================================================================== */
:root {
  --bg: #eff3f6; --surface: #ffffff; --surface-2: #f5f8fa; --ink: #0f1d2b; --muted: #52636f; --line: #dbe3e9;
  --accent: #1f4fa3; --accent-ink: #ffffff; --accent-soft: #e3ecfa;
  --ok: #17803d; --ok-ink: #ffffff; --ok-soft: #dcf2e4;
  --warn-bg: #fff3d6; --warn-ink: #6b4400; --bad: #b42318; --bad-soft: #fde4e1;
  --voice: #f6a823; --voice-ink: #1b1200;
  --chip-full: #d6efdf; --chip-half: #fcebbd; --chip-leave: #fbdad5; --chip-none: #e6ecf0;
  --shadow: 0 1px 2px rgba(15, 29, 43, .06), 0 8px 24px rgba(15, 29, 43, .07);
  --radius: 20px;
  --brand-1: #17408a; --brand-2: #2b6cc4;
}
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]) { --bg: #0c1319; --surface: #151f28; --surface-2: #1b2732; --ink: #eaf1f6; --muted: #9bb0bf; --line: #2a3945;
    --accent: #7ba7f2; --accent-ink: #08111d; --accent-soft: #1c2d47;
    --ok: #3fae67; --ok-ink: #06140b; --ok-soft: #1c3527;
    --warn-bg: #3b2f14; --warn-ink: #f2d38f; --bad: #f2776c; --bad-soft: #432522;
    --voice: #f6a823; --voice-ink: #1b1200;
    --chip-full: #1e3a2a; --chip-half: #3d3417; --chip-leave: #44252a; --chip-none: #26323d;
    --shadow: 0 2px 12px rgba(0, 0, 0, .35);
    --brand-1: #12306a; --brand-2: #1f55a8; } }
:root[data-mode="dark"] { --bg: #0c1319; --surface: #151f28; --surface-2: #1b2732; --ink: #eaf1f6; --muted: #9bb0bf; --line: #2a3945;
    --accent: #7ba7f2; --accent-ink: #08111d; --accent-soft: #1c2d47;
    --ok: #3fae67; --ok-ink: #06140b; --ok-soft: #1c3527;
    --warn-bg: #3b2f14; --warn-ink: #f2d38f; --bad: #f2776c; --bad-soft: #432522;
    --voice: #f6a823; --voice-ink: #1b1200;
    --chip-full: #1e3a2a; --chip-half: #3d3417; --chip-leave: #44252a; --chip-none: #26323d;
    --shadow: 0 2px 12px rgba(0, 0, 0, .35);
    --brand-1: #12306a; --brand-2: #1f55a8; }
body { letter-spacing: 0; }
h1, h2, h3 { font-weight: 800; }

/* header: a clean white bar, the company as a colour dot */
.top { background: color-mix(in srgb, var(--surface) 94%, transparent); border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.top-title h1 { font-weight: 800; }
.co-pill.plain { border-left-width: 0; padding-left: 0; background: transparent; }
.icon-btn { border-radius: 14px; }

/* cards, buttons, inputs */
.card { border-color: transparent; box-shadow: var(--shadow); }
.btn { border-radius: 14px; font-weight: 700; border-color: var(--line); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent); }
@media (hover: hover) { .btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #000); } }
.btn.danger { background: var(--surface); }
input, select, textarea { border-radius: 12px; border-color: var(--line); background: var(--surface-2); }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--surface); }
.seg { background: var(--surface-2); border-color: var(--line); border-radius: 14px; }
.seg-b { border-radius: 11px; }
.seg-b.on { background: var(--accent); color: var(--accent-ink); }
.chip-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.note { border-left-color: var(--accent); }
.link-btn { color: var(--accent); }
.ok-text { color: var(--ok); font-size: 14.5px; font-weight: 600; }
.att-list li.changed, .box.changed { border-color: var(--accent); }
.att-list li.changed { box-shadow: 0 0 0 1px var(--accent) inset; }
.box.changed { box-shadow: 0 0 0 2px var(--accent); }
.list-row { border-color: transparent; box-shadow: var(--shadow); border-radius: 16px; }
.up-choice { border-color: transparent; }

/* bottom tab bar: white, a bar over the open tab, a saffron voice button that sits above the bar */
.tabbar { background: var(--surface); border-top: 0; box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(15, 29, 43, .06); }
.tab { position: relative; font-weight: 700; }
.tab.on { color: var(--accent); }
.tab.on::after { content: ""; position: absolute; top: 0; left: 50%; width: 30px; margin-left: -15px; height: 4px; border-radius: 0 0 4px 4px; background: var(--accent); }
.tab-mic { background: linear-gradient(160deg, #ffc24d, var(--voice)); color: var(--voice-ink); border-color: var(--surface);
  box-shadow: 0 6px 16px rgba(246, 168, 35, .45); }

/* Today: the attendance hero, the voice button, coloured tiles */
.hero { background: linear-gradient(145deg, var(--brand-1), var(--brand-2)); color: #fff; border-radius: 24px; padding: 18px 18px 16px; margin: 12px 0;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand-1) 40%, transparent); }
.hero-top { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 108px; height: 108px; flex: none; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring-bg, .ring-fg { fill: none; stroke-width: 10; }
.ring-bg { stroke: rgba(255, 255, 255, .22); }
.ring-fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.ring-n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 30px; font-weight: 800; line-height: 1; }
.ring-n small { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; opacity: .8; }
.hero-txt { min-width: 0; flex: 1; }
.hero-l { font-size: 17px; font-weight: 700; opacity: .95; }
.hero .chips-row { margin: 14px 0 0; }
.hero-left { margin-top: 6px; font-size: 16px; font-weight: 600; opacity: .9; }
.hero-left b { font-size: 20px; }
.hero .chip { background: rgba(255, 255, 255, .18); color: #fff; font-size: 14px; }
.hero .done-line { color: #fff; margin: 12px 0 0; }
.hero-btn { width: 100%; margin-top: 16px; min-height: 64px; font-size: 20px; background: #fff; color: var(--brand-1); border-color: transparent; gap: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
@media (hover: hover) { .hero-btn:hover:not(:disabled) { background: #f0f5ff; border-color: transparent; } }

.voice-cta { appearance: none; width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; font: inherit; cursor: pointer; margin: 12px 0; padding: 14px 16px;
  border: 0; border-radius: 22px; color: var(--voice-ink); background: linear-gradient(135deg, #ffd27a, var(--voice)); box-shadow: 0 8px 22px rgba(246, 168, 35, .35); min-height: 84px; }
.voice-cta:active { transform: translateY(1px); }
.vc-ico { width: 56px; height: 56px; border-radius: 50%; background: #fff; color: #b26a00; display: grid; place-items: center; flex: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.vc-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vc-txt b { font-size: 19px; font-weight: 800; }
.vc-txt small { font-size: var(--fs-small); font-weight: 600; opacity: .85; overflow-wrap: anywhere; }
.voice-cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.tile { border-color: transparent; border-radius: 20px; font-weight: 800; }
.tile-ico { width: 54px; height: 54px; border-radius: 18px; }
.t-amber { --tone: #b45309; --tone-soft: #fdecc8; }
.t-rose { --tone: #be185d; --tone-soft: #fde1ec; }
.t-sky { --tone: #0369a1; --tone-soft: #dbeefb; }
.t-violet { --tone: #6d28d9; --tone-soft: #ebe3fb; }
.t-slate { --tone: #475569; --tone-soft: #e5eaf0; }
.tile .tile-ico { background: var(--tone-soft, var(--accent-soft)); color: var(--tone, var(--accent)); }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]) .t-amber { --tone: #fbbf5c; --tone-soft: #3b2f14; } :root:not([data-mode="light"]) .t-rose { --tone: #f78db6; --tone-soft: #43202f; } :root:not([data-mode="light"]) .t-sky { --tone: #6cc0f2; --tone-soft: #17324a; } :root:not([data-mode="light"]) .t-violet { --tone: #b79cf5; --tone-soft: #2c2347; } :root:not([data-mode="light"]) .t-slate { --tone: #b3c0cf; --tone-soft: #26323d; } }
:root[data-mode="dark"] .t-amber { --tone: #fbbf5c; --tone-soft: #3b2f14; } :root[data-mode="dark"] .t-rose { --tone: #f78db6; --tone-soft: #43202f; } :root[data-mode="dark"] .t-sky { --tone: #6cc0f2; --tone-soft: #17324a; } :root[data-mode="dark"] .t-violet { --tone: #b79cf5; --tone-soft: #2c2347; } :root[data-mode="dark"] .t-slate { --tone: #b3c0cf; --tone-soft: #26323d; }
.tile:focus-visible, .fold-h:focus-visible, .voice-cta:focus-visible { outline-color: var(--accent); }
.fold-h { border-color: transparent; border-radius: 20px; font-weight: 800; }
.fold-h .icon:first-child { color: var(--accent); }

/* sign-in: a brand block on top */
.login-top { padding: 8px 0 4px; }
.logo { background: linear-gradient(145deg, var(--brand-1), var(--brand-2)); box-shadow: 0 8px 22px color-mix(in srgb, var(--brand-1) 40%, transparent); }
.login-top h1 { font-size: 30px; letter-spacing: .2px; }
.login .card.form { padding: 20px; }
.login-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; margin-top: 6px; }
.login-links .link-btn { text-decoration: none; padding: 8px 4px; font-size: 16px; }
.gate-logo { background: linear-gradient(145deg, #b26a00, var(--voice)); }

/* sheets: bigger top radius and a grab handle */
.sheet { border-radius: 26px 26px 0 0; }
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
@media (min-width: 700px) { .sheet { border-radius: 26px; } .sheet::before { display: none; } }

/* people, lock and customers cards */
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.code { font-size: 26px; letter-spacing: 3px; padding: 6px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.person { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person > div { min-width: 0; overflow-wrap: anywhere; }
.cust { display: grid; gap: 4px; }
.cust-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cust-btns { display: flex; gap: 8px; margin-top: 8px; }
.cust-btns .btn { flex: 1; }
.chip.st-pending { background: var(--chip-half); } .chip.st-active { background: var(--chip-full); } .chip.st-suspended { background: var(--chip-leave); }

/* desktop sidebar: brand block and quieter tabs */
@media (min-width: 1024px) {
  .tabbar { box-shadow: 1px 0 0 var(--line); background: var(--surface); }
  .brand-logo { background: linear-gradient(145deg, var(--brand-1), var(--brand-2)); }
  .brand b { font-size: 20px; font-weight: 800; }
  .tab.on { background: var(--accent-soft); color: var(--accent); }
  .tab.on::after { display: none; }
  .tab-mic { box-shadow: 0 6px 16px rgba(246, 168, 35, .4); }
  .tab-mic:hover { background: linear-gradient(160deg, #ffd27a, #f0a01a); }
  .hero { padding: 22px; }
}

.alert-card { display: flex; align-items: center; gap: 14px; margin: 12px 0; padding: 14px 16px; border-radius: 20px; text-decoration: none; color: var(--warn-ink); background: var(--warn-bg); box-shadow: var(--shadow); min-height: var(--tap); }
.alert-card span { display: flex; flex-direction: column; min-width: 0; }
.alert-card b { font-size: 18px; }
.alert-card small { font-size: var(--fs-small); font-weight: 600; opacity: .85; }
.lock-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: var(--fs-small); font-weight: 700; opacity: .92; }
.logo, .brand-logo { color: #fff; }
.hero, .hero-btn { --accent-ink: #fff; }

/* =====================================================================
   Attendance and pay (v3.1): one control card on top (tabs + a period stepper), a row of big counts,
   then cards with big colour buttons. Pay shows one tidy row per worker; the slip opens on a tap.
   ===================================================================== */
:root { --bad-ink: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]) { --bad-ink: #2a0a07; } }
:root[data-mode="dark"] { --bad-ink: #2a0a07; }

.ctl { padding: 0; overflow: hidden; margin-top: 12px; }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 1px solid var(--line); }
.tabs-b { appearance: none; border: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 800; color: var(--muted); min-height: var(--tap); padding: 12px 6px; position: relative; cursor: pointer; }
.tabs-b.on { color: var(--accent); }
.tabs-b.on::after { content: ""; position: absolute; left: 16%; right: 16%; bottom: -1px; height: 4px; border-radius: 4px 4px 0 0; background: var(--accent); }
@media (hover: hover) { .tabs-b:not(.on):hover { color: var(--ink); background: var(--surface-2); } }
.pnav { display: flex; align-items: center; gap: 6px; padding: 8px; }
.pnav-b { appearance: none; border: 0; flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pnav-b:disabled { opacity: .3; cursor: default; }
@media (hover: hover) { .pnav-b:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); } }
.pnav-mid { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.25; padding: 4px 8px; border-radius: 16px; min-height: 56px; }
.pnav-mid b { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
.pnav-mid small { font-size: var(--fs-small); color: var(--muted); font-weight: 600; }
.pnav-mid.pick { background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.pnav-mid.pick small { color: inherit; opacity: .85; }
.pnav-mid.pick .icon { position: absolute; right: 10px; top: 8px; opacity: .7; }
.pnav-date { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.jump { appearance: none; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 16px); margin: 0 8px 8px; min-height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 800; cursor: pointer; }
.wpick { display: flex; align-items: center; gap: 8px; padding: 0 8px 8px; }
.wpick select { flex: 1; min-width: 0; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.stat { display: flex; flex-direction: column; gap: 2px; text-align: center; padding: 10px 2px 8px; border-radius: 16px; background: var(--chip-none); }
.stat b { font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat span { font-size: 13px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
:root:not([data-text="normal"]) .stat span { font-size: 14px; }
.stat.full { background: var(--chip-full); color: var(--ok); } .stat.half { background: var(--chip-half); color: var(--warn-ink); } .stat.leave { background: var(--chip-leave); color: var(--bad); }

.fill-btn { width: 100%; margin: 0 0 12px; min-height: var(--tap); border-radius: 16px; gap: 10px; background: var(--surface); color: var(--ok); border: 2px dashed color-mix(in srgb, var(--ok) 55%, var(--line)); font-weight: 800; }
.done-pill { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; min-height: 48px; border-radius: 16px; background: var(--chip-full); color: var(--ok); font-weight: 800; }

/* day view: one card per worker, three big colour buttons */
.att-list.rows { margin: 0; }
.att-list.rows .arow { display: flex; flex-direction: column; gap: 12px; margin: 0 0 10px; padding: 14px; background: var(--surface); border: 0; border-radius: 20px; box-shadow: var(--shadow); }
.arow.is-full { box-shadow: inset 6px 0 0 var(--ok), var(--shadow); } .arow.is-half { box-shadow: inset 6px 0 0 #d98e04, var(--shadow); } .arow.is-leave { box-shadow: inset 6px 0 0 var(--bad), var(--shadow); }
.att-list.rows .arow.changed { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: -1px; }
.arow-h { display: flex; align-items: center; gap: 12px; padding-left: 4px; }
.arow-h a { flex: 1; min-width: 0; font-size: 19px; font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.st-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-b { appearance: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 66px; padding: 6px 4px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--surface-2); color: var(--ink); font: inherit; font-size: 16px; font-weight: 800; line-height: 1.2; cursor: pointer; touch-action: manipulation; overflow-wrap: anywhere; }
.st-sym { font-size: 26px; line-height: 1; }
.st-b:active { transform: scale(.97); }
.st-b.full.on { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); }
.st-b.half.on { background: #e5a40b; border-color: #e5a40b; color: #1b1200; }
.st-b.leave.on { background: var(--bad); border-color: var(--bad); color: var(--bad-ink); }
.st-b:disabled { opacity: .45; cursor: not-allowed; transform: none; }
@media (hover: hover) { .st-b:not(.on):not(:disabled):hover { border-color: var(--muted); } }
.arow .ot-row { justify-content: space-between; margin: 0; padding: 6px 8px 6px 14px; border-radius: 16px; background: var(--surface-2); }
.ot-l { font-weight: 800; color: var(--muted); }
.arow .ot-btn { width: 52px; height: 52px; background: var(--surface); }
.arow .ot-val { min-width: 0; flex: 1; }
.arow .ot-note { margin: 0; }

/* week view: a day header that stays on screen, one card per worker with seven boxes under it */
.wk-head { position: sticky; top: var(--top-h, 64px); z-index: 5; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 6px 14px; background: var(--bg); }
.wk-spacer { display: none; }
.wk-head .ag-day { width: auto; min-height: 48px; padding: 4px 0; border-radius: 12px; justify-self: stretch; position: static; }
.wk-head .ag-day span { font-size: 13px; font-weight: 700; }
.wk-head .ag-day b { font-size: 16px; }
.wk-head .ag-day.today { background: var(--accent-soft); color: var(--accent); }
.wk-head .ag-day.today b { color: var(--accent); }
.wk-card { margin: 0 0 10px; padding: 12px 14px 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.wk-card .ag-name { display: flex; align-items: center; gap: 10px; padding: 0 0 10px; min-height: 48px; font-size: 18px; font-weight: 800; text-decoration: none; justify-self: auto; }
.wk-card .ag-n { flex: 1; display: block; -webkit-line-clamp: unset; overflow-wrap: anywhere; }
.wk-tally { flex: none; margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--chip-full); color: var(--ok); font-size: 14px; font-weight: 800; white-space: nowrap; }
.wk-boxes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wk-boxes .box { width: 100%; max-width: 46px; height: 46px; margin: 0 auto; border-radius: 12px; font-size: 19px; }
@media (min-width: 1024px) {
  .wk-head { grid-template-columns: 276px repeat(7, minmax(0, 1fr)); }
  .wk-spacer { display: block; }
  .wk-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 16px; align-items: center; padding: 10px 14px; }
  .wk-card .ag-name { padding: 0; }
  .wk-boxes .box { max-width: 52px; height: 52px; }
}
.att-grid.month { margin-top: 12px; padding: 12px 8px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }

/* pay: a hero with the amount still to pay, then one row per worker */
.pay-hero { padding: 18px; }
.ph-l { display: flex; flex-direction: column; }
.ph-l small { font-size: 16px; font-weight: 700; opacity: .85; }
.ph-l b { font-size: 40px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.pay-hero .bar { background: rgba(255, 255, 255, .22); margin: 12px 0 6px; }
.pay-hero .bar > i { background: #fff; }
.ph-sub { font-size: 16px; font-weight: 700; }
.ph-stats { display: flex; gap: 10px; margin-top: 14px; }
.ph-stats span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, .14); font-size: 14px; overflow-wrap: anywhere; }
.ph-stats b { font-size: 18px; font-weight: 800; }
.pay-cards { display: grid; gap: 10px; align-items: start; }
.pay-cards .pay-card { margin: 0; padding: 0; overflow: hidden; }
.pay-row { appearance: none; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 14px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pr-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pr-mid b { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
.pr-amt { font-size: 21px; font-weight: 800; white-space: nowrap; }
.pay-card.paid .pr-amt { color: var(--ok); }
.pay-row > .icon:last-child { color: var(--muted); transition: transform .2s; }
.pay-card.open .pay-row > .icon:last-child { transform: rotate(90deg); }
.pay-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.badge.warn-b { background: var(--warn-bg); color: var(--warn-ink); }
@media (hover: hover) { .pay-row:hover { background: var(--surface-2); } }
@media (min-width: 1100px) { .pay-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pnav-mid.pick { padding-left: 34px; padding-right: 34px; }
.pnav-mid.pick b { font-size: 18px; }
.tabs-b { font-size: 16px; padding-left: 2px; padding-right: 2px; line-height: 1.2; overflow-wrap: anywhere; }
.pr-mid b { font-size: 18px; }
.pr-amt { font-size: 20px; }
.tabs-b { font-size: 15px; white-space: nowrap; overflow-wrap: normal; text-overflow: ellipsis; overflow: hidden; }
:root:not([data-text="normal"]) .tabs-b { font-size: 16px; }
.pay-hero { padding: 14px 16px; }
.ph-l b { font-size: 36px; }
.pay-hero .bar { margin: 10px 0 4px; }
.ph-stats { margin-top: 10px; }
.ph-stats span { padding: 6px 10px; }
.tabs-b, :root:not([data-text="normal"]) .tabs-b { font-size: 15px; padding-left: 0; padding-right: 0; }
/* Large text: labels stay at the project's 15 px floor, so the four counts sit two by two */
.stat span, .wk-tally, .ph-stats span, .wk-head .ag-day span { font-size: var(--fs-small); }
.arow-h a { display: flex; align-items: center; min-height: 44px; }
:root:not([data-text="normal"]) .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root:not([data-text="normal"]) .stat { flex-direction: row; align-items: center; justify-content: center; gap: 10px; padding: 8px 6px; }
:root:not([data-text="normal"]) .stat b { font-size: 28px; }
:root:not([data-text="normal"]) .stat span { font-size: var(--fs-small); }

/* =====================================================================
   Themes: a colour (data-theme) on top of day / night (data-mode, or the phone's own setting when auto).
   'indigo' is the base look; the others only change the brand colours.
   ===================================================================== */
:root[data-mode="light"] { color-scheme: light; } :root[data-mode="dark"] { color-scheme: dark; }
:root[data-theme="peacock"] { --accent: #0f766e; --accent-soft: #d8f1ed; --brand-1: #0b5d57; --brand-2: #169b88; }
:root[data-theme="terracotta"] { --accent: #b8401a; --accent-soft: #f8e1d8; --brand-1: #8f2f10; --brand-2: #d4561f; }
:root[data-theme="rose"] { --accent: #be185d; --accent-soft: #fde4ee; --brand-1: #9d174d; --brand-2: #db2777; }
:root[data-theme="violet"] { --accent: #6d28d9; --accent-soft: #ece4fb; --brand-1: #5b21b6; --brand-2: #7c3aed; }
:root[data-theme="graphite"] { --accent: #334155; --accent-soft: #e2e8f0; --brand-1: #1e293b; --brand-2: #475569; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"])[data-theme="peacock"] { --accent: #5ad1c0; --accent-soft: #123330; --accent-ink: #03201c; --brand-1: #0a3f3b; --brand-2: #0f6b61; } }
:root[data-mode="dark"][data-theme="peacock"] { --accent: #5ad1c0; --accent-soft: #123330; --accent-ink: #03201c; --brand-1: #0a3f3b; --brand-2: #0f6b61; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"])[data-theme="terracotta"] { --accent: #f08a5d; --accent-soft: #3d2016; --accent-ink: #230a02; --brand-1: #5e220c; --brand-2: #a1411a; } }
:root[data-mode="dark"][data-theme="terracotta"] { --accent: #f08a5d; --accent-soft: #3d2016; --accent-ink: #230a02; --brand-1: #5e220c; --brand-2: #a1411a; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"])[data-theme="rose"] { --accent: #f9a8d4; --accent-soft: #411829; --accent-ink: #2a0614; --brand-1: #6b1237; --brand-2: #a41b5c; } }
:root[data-mode="dark"][data-theme="rose"] { --accent: #f9a8d4; --accent-soft: #411829; --accent-ink: #2a0614; --brand-1: #6b1237; --brand-2: #a41b5c; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"])[data-theme="violet"] { --accent: #c4b5fd; --accent-soft: #2a2147; --accent-ink: #150a33; --brand-1: #3b1a80; --brand-2: #5b2fc0; } }
:root[data-mode="dark"][data-theme="violet"] { --accent: #c4b5fd; --accent-soft: #2a2147; --accent-ink: #150a33; --brand-1: #3b1a80; --brand-2: #5b2fc0; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"])[data-theme="graphite"] { --accent: #cbd5e1; --accent-soft: #1e293b; --accent-ink: #0b1220; --brand-1: #111827; --brand-2: #334155; } }
:root[data-mode="dark"][data-theme="graphite"] { --accent: #cbd5e1; --accent-soft: #1e293b; --accent-ink: #0b1220; --brand-1: #111827; --brand-2: #334155; }

/* theme picker */
.theme-btns { display: flex; gap: 2px; }
.mode-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 8px; }
.mode-b { appearance: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 4px; border-radius: 18px; border: 2px solid var(--line);
  background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.mode-b.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.look-h { margin: 14px 0 8px; font-size: var(--fs-label); color: var(--muted); }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.swatch { appearance: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; border-radius: 18px; border: 2px solid transparent; background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.swatch.on { border-color: var(--accent); background: var(--accent-soft); }
.sw-disc { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.sw-name { font-size: var(--fs-small); text-align: center; overflow-wrap: anywhere; }
.swatch:active, .mode-b:active { transform: scale(.97); }

/* the side foot (theme buttons + collapse) belongs to the desktop sidebar */
.side-foot { display: none; }

/* phone: the tab bar slips away while scrolling down; the voice button stays */
.tabbar, .tab { transition: background-color .2s, box-shadow .2s, opacity .2s; }
@media (max-width: 1023px) {
  .nav-hidden .tabbar { background: transparent; box-shadow: none; pointer-events: none; }
  .nav-hidden .tab { opacity: 0; pointer-events: none; }
  .nav-hidden .tab-mic { pointer-events: auto; box-shadow: 0 8px 22px rgba(246, 168, 35, .55); }
}

/* desktop: the sidebar can fold to an icon rail; pointing at it opens it over the page */
@media (min-width: 1024px) {
  :root[data-nav="collapsed"] { --side-w: 84px; }
  .app { transition: padding-left .22s ease; }
  .tabbar { transition: width .22s ease, box-shadow .22s ease; z-index: 40; }
  .side-foot { display: flex; flex-direction: column; gap: 6px; order: 9; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
  .side-foot .theme-btns { justify-content: space-between; }
  .side-foot .icon-btn { width: 100%; background: var(--surface-2); }
  .side-fold { appearance: none; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
  .side-fold:hover { background: var(--surface-2); color: var(--ink); }
  :root[data-nav="collapsed"] .tabbar:not(.peek):not(:has(:focus-visible)) { padding-left: 10px; padding-right: 10px; }
  :root[data-nav="collapsed"] .tabbar:not(.peek):not(:has(:focus-visible)) :is(.tab span, .brand b, .mic-label, .sf-label) { display: none; }
  :root[data-nav="collapsed"] .tabbar:not(.peek):not(:has(:focus-visible)) .tab { justify-content: center; padding: 0; }
  :root[data-nav="collapsed"] .tabbar:not(.peek):not(:has(:focus-visible)) .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  :root[data-nav="collapsed"] .tabbar:not(.peek):not(:has(:focus-visible)) .tab-mic { width: 56px; margin-left: auto; margin-right: auto; }
  :root[data-nav="collapsed"] .tabbar:not(.peek):not(:has(:focus-visible)) .side-fold { justify-content: center; padding: 0; }
  :root[data-nav="collapsed"] .tabbar:not(.peek):not(:has(:focus-visible)) .side-foot .theme-btns { flex-direction: column; }
  :root[data-nav="collapsed"] .tabbar:is(.peek, :has(:focus-visible)) { width: 248px; box-shadow: 8px 0 32px rgba(15, 29, 43, .22); }
}
.mode-b { font-size: var(--fs-small); padding-left: 2px; padding-right: 2px; }
.mode-b span { max-width: 100%; overflow-wrap: anywhere; text-align: center; }

/* the company button: a badge in the company's colours (its theme), the name, a small arrow */
.co-badge { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 17px; font-weight: 800; line-height: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, .22); }
.co-badge.big { width: 40px; height: 40px; font-size: 19px; }
.co-pill { min-height: 48px; padding: 4px 14px 4px 4px; gap: 10px; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.co-pill:not(.plain):active { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.co-pill.plain { background: transparent; padding-left: 0; color: var(--ink); }
.co-pill .co-name { max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-pill .co-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.co-pill .icon { opacity: .75; }
.top-title .co-pill { padding: 4px 12px 4px 4px; gap: 8px; }
.top-title .co-pill.plain { padding-left: 0; }
.co-row { border-left-width: 2px; }
.co-row.on { border-color: var(--co, var(--accent)); }

/* phone: the More button in every header, and its sheet */
.top-right .more-btn { background: var(--surface-2); }
.more-me { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; padding: 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.more-me span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; } .more-me small { color: var(--muted); font-size: var(--fs-small); }
.more-list { display: grid; gap: 8px; margin-bottom: 8px; }
.more-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.more-row > .icon:last-child { color: var(--muted); }
.more-ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.more-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: var(--fs); } .more-t small { color: var(--muted); font-size: var(--fs-small); }
.more-set h3 { margin: 14px 0 6px; font-size: var(--fs-label); color: var(--muted); }

.me-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.me-t { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; } .me-t b { font-size: 20px; } .me-t small { color: var(--muted); font-size: var(--fs-small); }

/* workers list: avatar, name and wage, the advance still owed on the right */
.w-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.w-main { flex: 1; min-width: 0; line-height: 1.3; } .w-main b { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.w-bal { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; } .w-bal b { font-size: 18px; white-space: nowrap; }

/* worker page: a summary and the buttons first, the long lists folded below */
.w-hero .w-top { display: flex; align-items: center; gap: 16px; }
.w-hero .w-top-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w-hero .w-wage { font-size: 30px; font-weight: 800; line-height: 1.1; } .w-hero .w-wage small { font-size: var(--fs-small); font-weight: 700; color: var(--muted); }
.w-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.w-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 16px; background: var(--accent-soft); }
.w-stats small { color: var(--muted); font-size: var(--fs-small); font-weight: 700; } .w-stats b { font-size: 22px; font-weight: 800; color: var(--accent); }
.w-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 12px; } .w-actions .btn { margin-top: 0; }

/* =====================================================================
   Motion and loading: screens fade in, cards pop in one after another, numbers fill up, loaders are branded,
   and what is still loading shows as a skeleton in the shape of the screen. All of it stops for "reduce motion".
   ===================================================================== */
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ringIn { from { stroke-dashoffset: 276.5; } }
@keyframes grow { from { width: 0; } }
@keyframes shineSkel { to { background-position: -200% 0; } }
@keyframes bubIn { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-6px); opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes orb { 0%, 100% { transform: scale(.85); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { transform: scale(1.1); box-shadow: 0 0 0 8px transparent; } }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes fadeLate { 0%, 55% { opacity: 0; } 100% { opacity: 1; } }

.page { animation: pageIn .3s ease-out both; }
.today-grid .col > *, .tiles .tile, .pay-cards > *, .att-list > li, .wk-card, .list > li, .more-row, .swatch { animation: pop .38s cubic-bezier(.2, .8, .25, 1) both; }
.tiles .tile:nth-child(1), .today-grid .col > :nth-child(1), .pay-cards > :nth-child(1), .att-list > li:nth-child(1), .wk-card:nth-child(1) { animation-delay: .03s; }
.tiles .tile:nth-child(2), .today-grid .col > :nth-child(2), .pay-cards > :nth-child(2), .att-list > li:nth-child(2), .wk-card:nth-child(2) { animation-delay: .08s; }
.tiles .tile:nth-child(3), .today-grid .col > :nth-child(3), .pay-cards > :nth-child(3), .att-list > li:nth-child(3), .wk-card:nth-child(3) { animation-delay: .13s; }
.tiles .tile:nth-child(4), .pay-cards > :nth-child(4), .att-list > li:nth-child(4), .wk-card:nth-child(4) { animation-delay: .18s; }
.tiles .tile:nth-child(5), .pay-cards > :nth-child(5), .att-list > li:nth-child(5), .wk-card:nth-child(5) { animation-delay: .23s; }
.tiles .tile:nth-child(n+6), .pay-cards > :nth-child(n+6), .att-list > li:nth-child(n+6), .wk-card:nth-child(n+6) { animation-delay: .28s; }
.ring-fg { animation: ringIn 1.1s cubic-bezier(.3, .7, .2, 1); }
.bar > i { animation: grow 1s cubic-bezier(.3, .7, .2, 1); }
.toast { animation: toastIn .28s cubic-bezier(.2, .8, .25, 1); }
.icon-btn, .btn, .tile, .st-b, .box, .tab, .chip-btn, .swatch, .more-row { transition: transform .12s ease, background-color .15s, border-color .15s, box-shadow .15s, color .15s; }
.st-b.on, .box.full, .box.half, .box.leave { animation: popOn .22s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes popOn { from { transform: scale(.88); } to { transform: none; } }
@media (hover: hover) { .tile:hover, .more-row:hover, .pay-row:hover { transform: translateY(-2px); } .dock:hover { transform: translateX(-2px); } }

/* loaders */
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid color-mix(in srgb, var(--accent) 18%, transparent); border-top-color: var(--accent); border-right-color: color-mix(in srgb, var(--accent) 55%, transparent); animation: spin .75s linear infinite; }
.spin-s { width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; animation: spin .7s linear infinite; display: inline-block; }
.splash { background: var(--bg); }
.splash-logo { position: relative; width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--brand-1), var(--brand-2)); box-shadow: 0 12px 30px color-mix(in srgb, var(--brand-1) 45%, transparent); animation: orb 1.6s ease-in-out infinite; }
.splash-ring { position: absolute; inset: -10px; border-radius: 34px; border: 3px solid transparent; border-top-color: var(--accent); border-right-color: color-mix(in srgb, var(--accent) 40%, transparent); animation: ringSpin 1.1s linear infinite; }
.splash-dots { display: flex; gap: 8px; margin-top: 18px; } .splash-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: bounce 1s infinite; } .splash-dots i:nth-child(2) { animation-delay: .15s; } .splash-dots i:nth-child(3) { animation-delay: .3s; }
.topload { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90; overflow: hidden; background: color-mix(in srgb, var(--accent) 15%, transparent); pointer-events: none; }
.topload i { display: block; width: 38%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--accent), var(--voice)); animation: indet 1.1s ease-in-out infinite; }

/* skeletons */
.skel { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--line) 80%, var(--surface-2)) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shineSkel 1.3s linear infinite; }
.skel-card { display: grid; gap: 12px; padding: 18px; } .skel-card .skel { max-width: 100%; }
.skel-list { display: grid; gap: 10px; margin-top: 12px; }
.skel-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); animation: pop .35s ease-out both; }
.skel-lines { flex: 1; display: grid; gap: 8px; min-width: 0; }
.top-title .skel { margin: 2px 0; }

.dock { animation: dockIn .5s .6s cubic-bezier(.2, .8, .25, 1) both; }
@keyframes dockIn { from { opacity: 0; } to { opacity: .94; } }
@media (prefers-reduced-motion: reduce) { .page, .tile, .skel, .skel-row, .toast, .ring-fg, .bar > i, .splash-logo, .splash-ring, .dock, .row, .think-line, .think-bars i, .face, .face .eye, .face .eyes { animation: none !important; } }
.skel { background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 8%, var(--surface)) 25%, color-mix(in srgb, var(--ink) 17%, var(--surface)) 50%, color-mix(in srgb, var(--ink) 8%, var(--surface)) 75%); background-size: 200% 100%; }
.skel-card, .skel-row { background: var(--surface); }
.skel-row, .skel-card { box-shadow: 0 0 0 1px var(--line), var(--shadow); }

/* =====================================================================
   Assistant v2: a chat that scrolls inside itself with the box to type in fixed at the bottom (like ChatGPT / Claude), the newest
   message at the bottom, a box that grows line by line, a face that circles with light while it works, a tab at the edge you can drag.
   ===================================================================== */
body.chat-lock { overflow: hidden; }
@keyframes shineText { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes lineIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ai-mark { position: relative; flex: none; width: var(--m, 34px); height: var(--m, 34px); border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--brand-1), var(--brand-2)); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-1) 35%, transparent); }
.ai-mark { background: none; box-shadow: none; border-radius: 0; filter: drop-shadow(0 3px 5px color-mix(in srgb, var(--brand-1) 32%, transparent)); }
.face { display: block; overflow: visible; }
.face .bub-f { fill: var(--face, var(--brand-2)); } .face .eye { fill: var(--eye, #fff); }
.face .eye, .face .eyes { transform-box: fill-box; transform-origin: center; }
.face.mono { --face: #fff; --eye: var(--brand-1); }
.sugg-card .face { --face: var(--voice); --eye: #fff; flex: none; }
@keyframes blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes scan { 0%, 8% { transform: translate(-1.6px, 0); } 30%, 42% { transform: translate(1.6px, -.4px); } 58%, 66% { transform: translate(0, -1.1px); } 86%, 100% { transform: translate(-1.6px, 0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-3px) scale(1.06, .96); } 60% { transform: translateY(0) scale(.97, 1.03); } 100% { transform: none; } }
@keyframes squint { 0%, 100% { transform: scaleY(1); } 20%, 70% { transform: scaleY(.38); } }
.face.live .eye { animation: blink 4.6s infinite; }
.face.busy { animation: bob 1.1s ease-in-out infinite; } .face.busy .eyes { animation: scan 2.4s ease-in-out infinite; } .face.busy .eye { animation: blink 2.4s infinite 1.1s; }
.face.joy { animation: hop .6s cubic-bezier(.3, .7, .3, 1) .15s both; } .face.joy .eye { animation: squint .9s ease-in-out .15s; }

.chat-view { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px; }
.chat-inner { max-width: 760px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; padding: 16px 0 14px; }
.row { display: flex; gap: 10px; align-items: flex-start; animation: bubIn .28s cubic-bezier(.2, .8, .25, 1) both; }
.row.me { justify-content: flex-end; }
.bub.me { max-width: 86%; padding: 11px 16px; border-radius: 22px 22px 6px 22px; background: var(--accent); color: var(--accent-ink); font-size: var(--fs); overflow-wrap: anywhere; white-space: pre-wrap; }
.row.bot > .ai-mark { margin-top: 2px; }
.bot-body { flex: 1; min-width: 0; max-width: 640px; }
.bot-text { font-size: var(--fs); line-height: 1.55; overflow-wrap: anywhere; padding-top: 5px; }
.bot-text .sub, .plan .sub { margin-top: 6px; font-size: var(--fs-small); color: var(--muted); }
.tools { margin: 2px 0 0 -10px; }
.tool-btn { appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 12px; cursor: pointer; }
.tool-btn:hover { background: var(--surface-2); color: var(--ink); }
.plan { padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); text-align: left; }
.plan .head { font-weight: 700; font-size: var(--fs); }
.plan .okl { color: var(--ok); font-weight: 700; }
.plan .two-btn { margin-top: 14px; } .plan .btn { margin-top: 0; }

.think { flex: 1; min-width: 0; max-width: 340px; padding-top: 5px; }
.think-line { display: block; font-size: var(--fs-small); font-weight: 700; color: transparent; background: linear-gradient(90deg, var(--muted) 35%, var(--ink) 50%, var(--muted) 65%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; animation: shineText 1.5s linear infinite, lineIn .35s ease-out both; }
.think-bars { display: grid; gap: 8px; margin-top: 12px; }
.think-bars i { display: block; height: 10px; border-radius: 6px; width: 92%; background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 8%, var(--surface)) 25%, color-mix(in srgb, var(--accent) 22%, var(--surface)) 50%, color-mix(in srgb, var(--ink) 8%, var(--surface)) 75%); background-size: 200% 100%; animation: shineSkel 1.3s linear infinite; }
.think-bars i:nth-child(2) { width: 74%; animation-delay: .15s; } .think-bars i:nth-child(3) { width: 48%; animation-delay: .3s; }

.chat-empty { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 0; }
.chat-empty h2 { margin: 12px 0 0; font-size: 24px; } .chat-empty p { margin: 0 0 12px; color: var(--muted); max-width: 440px; }
.chat-empty .plan { width: 100%; max-width: 520px; }
.sugg-grid { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; max-width: 560px; }
.sugg-card { appearance: none; display: flex; align-items: center; gap: 12px; text-align: left; min-height: 58px; padding: 12px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-small); cursor: pointer; }
.sugg-card:active { transform: scale(.98); }
@media (min-width: 600px) { .sugg-grid { grid-template-columns: 1fr 1fr; } .sugg-card:hover { border-color: var(--accent); } }

.composer { position: relative; padding: 6px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 75%, transparent); }
.composer-box { max-width: 760px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 28px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 6px 24px rgba(15, 29, 43, .1); transition: border-color .15s, box-shadow .15s; }
.composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 6px 24px rgba(15, 29, 43, .1); }
.composer-box textarea { flex: 1; min-width: 0; width: auto; min-height: 28px; max-height: 150px; padding: 11px 0; border: 0; border-radius: 0; background: transparent; resize: none; font-size: max(16px, var(--fs)); line-height: 1.4; outline: 0; overflow-y: auto; }
.composer-box textarea:focus { outline: 0; }
.send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: transform .12s, background-color .15s; }
.send:active:not(:disabled) { transform: scale(.9); }
.send:disabled { background: var(--surface-2); color: var(--muted); cursor: default; }
.send.stop { background: var(--ink); color: var(--surface); }
.jump { position: absolute; left: 50%; top: -42px; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer; animation: pop .2s both; }

.chat-full { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); z-index: 35; display: flex; flex-direction: column; background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 8px 8px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.chat-head b { font-size: 20px; } .chat-head .grow { flex: 1; }
.chat-body { flex: 1; min-height: 0; display: flex; position: relative; }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-side { position: absolute; z-index: 3; left: 0; top: 0; bottom: 0; width: min(320px, 86%); padding: 12px; overflow-y: auto; background: var(--surface); box-shadow: 10px 0 30px rgba(0, 0, 0, .2); transform: translateX(-104%); transition: transform .24s cubic-bezier(.2, .8, .25, 1); }
.chat-side.open { transform: none; }
.chat-scrim { position: absolute; inset: 0; z-index: 2; background: rgba(10, 18, 28, .4); animation: fadeIn .2s both; }
@keyframes fadeIn { from { opacity: 0; } }
.chat-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.chat-list li { display: flex; align-items: center; gap: 4px; border-radius: 14px; } .chat-list li.on { background: var(--accent-soft); }
.chat-item { appearance: none; flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 8px 10px; min-height: 52px; border-radius: 14px; cursor: pointer; display: flex; flex-direction: column; }
.chat-item b { font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chat-item small { color: var(--muted); font-size: 13px; }
@media (min-width: 768px) {
  .chat-side { position: static; transform: none; flex: none; width: 280px; box-shadow: 1px 0 0 var(--line); }
  .chat-hist, .chat-scrim { display: none; }
}
@media (min-width: 1024px) { .chat-full { left: var(--side-w); } }

.chat-panel-wrap { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); z-index: 55; background: rgba(10, 18, 28, .42); display: flex; align-items: flex-end; justify-content: flex-end; animation: fadeIn .2s both; }
.chat-panel { position: relative; width: 100%; height: 92%; display: flex; flex-direction: column; background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .3); animation: up .26s cubic-bezier(.2, .8, .25, 1); overflow: hidden; }
.grab { align-self: center; flex: none; width: 40px; height: 5px; margin-top: 8px; border-radius: 3px; background: var(--line); }
.chat-panel-head { flex: none; display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 16px; } .chat-panel-head .ai-mark { margin-right: 6px; } .chat-panel-head b { flex: 1; font-size: 20px; }
@media (min-width: 700px) {
  .chat-panel-wrap { align-items: stretch; }
  .chat-panel { width: 440px; height: 100%; border-radius: 26px 0 0 26px; animation: slide .26s cubic-bezier(.2, .8, .25, 1); }
  .grab { display: none; }
}
@keyframes slide { from { transform: translateX(40px); opacity: .6; } to { transform: none; opacity: 1; } }

.dock { position: fixed; right: 0; z-index: 28; width: 46px; height: 64px; padding: 0 0 0 6px; border: 0; border-radius: 24px 0 0 24px; display: grid; place-items: center; background: linear-gradient(160deg, var(--brand-1), var(--brand-2)); color: #fff;
  box-shadow: -4px 6px 18px rgba(15, 29, 43, .3); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; opacity: .94; }
.dock::before { content: ''; position: absolute; left: 7px; top: 50%; width: 3px; height: 20px; margin-top: -10px; border-radius: 2px; background: rgba(255, 255, 255, .5); }
.dock:active { cursor: grabbing; }
.plan .two-btn { grid-template-columns: 1.5fr 1fr; } .plan .btn { white-space: nowrap; gap: 8px; padding-left: 10px; padding-right: 10px; }
.chat-side { overflow-x: hidden; } .chat-list { grid-template-columns: minmax(0, 1fr); } .chat-item { overflow: hidden; } .chat-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .icon-btn, .chat-panel-head .icon-btn { flex: none; min-width: 44px; } .chat-head .ai-mark { margin: 0 2px; } .chat-head { gap: 4px; }
.chat-side { visibility: hidden; transition: transform .24s cubic-bezier(.2, .8, .25, 1), visibility 0s .24s; } .chat-side.open { visibility: visible; transition-delay: 0s; }
@media (min-width: 768px) { .chat-side { visibility: visible; } }
.chat-item small { font-size: 15px; }
.composer-box { padding: 4px 6px 4px 18px; } .composer-box textarea { min-height: 56px; padding: 15px 0; } .send { margin-bottom: 6px; }
.chat-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; } .chat-head { padding-left: 4px; padding-right: 4px; }

/* Settings: a profile card, then labelled groups of folds, the account actions last */
.set-sec { display: block; margin-top: 18px; }
.set-h { margin: 0 6px 2px; font-size: var(--fs-small); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.set-note { margin: 0 6px 8px; font-size: var(--fs-small); color: var(--muted); }
.set-group { background: var(--surface); border-radius: 22px; box-shadow: 0 0 0 1px var(--line), var(--shadow); overflow: hidden; margin-top: 8px; }
.set-group .fold + .fold, .set-group .fold + .card, .set-group .card + .fold { border-top: 1px solid var(--line); }
.set-group .fold-h { border: 0; border-radius: 0; background: transparent; box-shadow: none; min-height: 64px; margin: 0; }
.set-group .fold-h[aria-expanded="true"] { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.set-group .fold-b { padding: 10px; background: var(--surface-2); }
.set-group .fold-b > .card, .set-group > .card { margin: 0; }
.set-group > .card { box-shadow: none; border-radius: 0; border: 0; }
.set-group .fold-h[aria-expanded="true"] + .fold-b > .card:first-child { border-top-left-radius: 18px; border-top-right-radius: 18px; }
.set-actions { display: grid; gap: 10px; padding: 14px; } .set-actions .btn { margin: 0; }
.me-card { margin-top: 12px; }
.dock { width: 34px; height: 58px; padding: 0 0 0 4px; border-radius: 18px 0 0 18px; } .dock::before { left: 5px; height: 16px; margin-top: -8px; width: 2.5px; }
.dock { width: 44px; border-left: 10px solid transparent; background-clip: padding-box; box-shadow: none; filter: drop-shadow(-3px 4px 8px rgba(15, 29, 43, .3)); padding-left: 2px; } .dock::before { left: 3px; }

/* worker form: saving veil, date field, edit pill */
.saving-veil { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(2px); animation: fadeIn .15s both; }
.saving-card { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-radius: 22px; background: var(--surface); box-shadow: 0 12px 40px rgba(15, 29, 43, .25), 0 0 0 1px var(--line); font-size: var(--fs); }
.saving-card .spinner { width: 30px; height: 30px; border-width: 3px; }
.date-show { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; margin-bottom: 8px; border-radius: 16px; background: var(--accent-soft); color: var(--ink); }
.date-show b { font-size: 22px; } .date-show span { font-size: var(--fs-small); color: var(--muted); }
.date-field .quick { margin-top: 8px; } .date-field .quick-b { min-height: 48px; padding: 0 18px; font-size: var(--fs-small); font-weight: 700; }
.edit-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 800; margin: 0; width: auto; }
.edit-pill .icon { flex: none; }

/* lock indication on attendance */
.lock-banner { display: flex; align-items: center; gap: 14px; margin: 12px 0; padding: 14px 16px; border-radius: 20px; background: color-mix(in srgb, #d98a00 18%, var(--surface)); box-shadow: inset 5px 0 0 #d98a00, 0 0 0 1px color-mix(in srgb, #d98a00 35%, var(--line)); }
.lock-banner.soft { background: var(--surface); box-shadow: inset 5px 0 0 var(--muted), 0 0 0 1px var(--line); }
.lb-ic { flex: none; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, #d98a00 30%, var(--surface)); color: #8a5a00; }
.lock-banner.soft .lb-ic { background: var(--surface-2); color: var(--muted); }
.lb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .lb-t b { font-size: var(--fs); } .lb-t span { font-size: var(--fs-small); color: var(--muted); }
:root[data-mode="dark"] .lb-ic { color: #ffc766; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]) .lb-ic { color: #ffc766; } }
.lock-chip { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, #d98a00 22%, var(--surface)); color: #8a5a00; font-size: 14px; font-weight: 800; }
:root[data-mode="dark"] .lock-chip { color: #ffc766; }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]) .lock-chip { color: #ffc766; } }
.arow.is-locked { background-image: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, #d98a00 7%, transparent) 10px 20px); }
.arow.is-locked .st-btns { opacity: .55; }

/* row menu (the "..." on a row), pay links, the pay slip as a bill, the pay-day summary */
.row-menu-btn { appearance: none; flex: none; width: 48px; min-height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.row-menu-btn:hover, .row-menu-btn:active { background: var(--surface-2); color: var(--ink); }
.menu-list { display: grid; gap: 8px; }
.menu-item { appearance: none; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 0 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.menu-item span { flex: 1; } .menu-item .icon:first-child { color: var(--accent); } .menu-item .icon:last-child { color: var(--muted); }
.pay-head { display: flex; align-items: center; } .pay-head .pay-row { flex: 1; min-width: 0; width: auto; }
.pay-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; } .pay-links .btn { margin: 0; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.w-li { display: flex; align-items: center; gap: 2px; } .w-li .w-row { flex: 1; min-width: 0; }
.slip.bill { position: relative; margin: 8px 0 12px; padding: 14px 16px 16px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--ink) 22%, var(--line)); background: var(--surface); }
.bill-top { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid var(--ink); } .bill-top b { font-size: 19px; } .bill-top span { font-size: var(--fs-small); color: var(--muted); }
.sl-h { margin: 12px 0 2px; font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.slip.bill .sl { border-bottom: 1px dotted var(--line); }
.slip.bill .sl.total-line { border-top: 1.5px solid var(--ink); }
.slip.bill .sl.final { margin-top: 10px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--accent-soft); } .slip.bill .sl.final .sl-l { font-size: var(--fs); } .slip.bill .sl.final .sl-v { font-size: 24px; color: var(--accent); }
.paid-stamp { position: absolute; right: 14px; top: 12px; padding: 2px 12px; border: 3px solid var(--ok); border-radius: 8px; color: var(--ok); font-weight: 900; letter-spacing: .1em; text-transform: uppercase; transform: rotate(-8deg); opacity: .85; pointer-events: none; }
.bill-sum { padding: 14px 16px; } .bs-list { list-style: none; margin: 0 0 8px; padding: 0; } .bs-list li, .bs-tot { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.bs-tot { border-bottom: 0; } .bs-tot.net { margin-top: 4px; padding-top: 10px; border-top: 2px solid var(--ink); font-size: 20px; font-weight: 800; }

.name-alt { margin: 4px 0 8px; } .name-alt .quick { margin-top: 8px; } .name-alt .quick-b { min-height: 48px; padding: 0 16px; font-size: var(--fs); font-weight: 700; }
.sl-h { font-size: 15px; } .sheet-head .icon-btn { flex: none; min-width: 44px; }
.name-alt .quick-b, .date-field .quick-b { min-height: 56px; }

.name-busy { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; } .name-busy .spin-s { width: 16px; height: 16px; border-width: 2px; }

.model-test { display: grid; gap: 8px; margin: 4px 0 8px; } .model-test .btn, .model-test .chip-btn { margin: 0; }

.fast-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .fast-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-small); } .fast-list span { overflow-wrap: anywhere; }

.early-box { display: grid; gap: 8px; margin-top: 14px; padding: 14px; border-radius: 16px; border: 1.5px dashed var(--accent); background: var(--accent-soft); } .early-box .two-btn { margin: 0; } .early-box .btn { margin: 0; }
.rec-note { font-size: var(--fs-small); margin: 0; }

/* the voice pop-up: a small card with a listening orb, then the question */
@keyframes vpIn { from { opacity: 0; transform: translateY(24px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes orbRing { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(calc(1.7 + var(--lv, 0) * .6)); opacity: 0; } }
@keyframes eq { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
.vpop-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; padding: 0 12px calc(24px + env(safe-area-inset-bottom)); background: rgba(10, 18, 28, .45); animation: fadeIn .2s both; }
@media (min-width: 700px) { .vpop-wrap { align-items: center; } }
.vpop { width: min(100%, 380px); max-height: 86vh; overflow-y: auto; padding: 24px 20px 18px; border-radius: 30px; background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 0 0 1px var(--line); animation: vpIn .3s cubic-bezier(.2, .8, .25, 1) both; }
.vp-listen { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.orb { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.orb i { position: absolute; inset: 24px; border-radius: 50%; border: 2px solid var(--voice); animation: orbRing 1.9s ease-out infinite; }
.orb i:nth-child(2) { animation-delay: .6s; } .orb i:nth-child(3) { animation-delay: 1.2s; }
.orb-core { position: relative; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--voice) 70%, #fff), var(--voice));
  box-shadow: 0 8px 26px color-mix(in srgb, var(--voice) 55%, transparent); transform: scale(calc(1 + var(--lv, 0) * .22)); transition: transform .1s; }
.orb.think .orb-core { animation: orb 1.6s ease-in-out infinite; transform: none; }
.think-ring { position: absolute; inset: 14px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 55%, var(--voice) 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: ringSpin 1s linear infinite; }
.bars { display: flex; align-items: center; justify-content: center; gap: 5px; height: 34px; transform: scaleY(calc(.55 + var(--lv, 0) * 1.6)); transition: transform .1s; }
.orb:has(+ .bars) { --lv: 0; }
.bars b { display: block; width: 5px; height: 100%; border-radius: 3px; background: var(--voice); transform-origin: center; animation: eq .9s ease-in-out infinite; animation-delay: var(--d); }
.vp-t { font-size: 20px; font-weight: 800; }
.vp-done { width: 100%; margin: 4px 0 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.vp-x { appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; min-height: 44px; padding: 0 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.vp-ask { display: grid; gap: 12px; }
.vp-ask h3 { margin: 0; font-size: 21px; text-align: center; line-height: 1.3; }
.vp-ask textarea { min-height: 90px; }
.vp-sum { display: grid; gap: 4px; padding: 10px 12px; border-radius: 18px; background: var(--surface-2); }
.vp-sum .kv { border-bottom: 0; padding: 4px 0; }
.vp-ask .btn { margin: 0; } .vp-ask .two-btn { margin: 0; }
@media (prefers-reduced-motion: reduce) { .vpop, .vpop-wrap, .orb i, .bars b, .think-ring, .orb.think .orb-core { animation: none !important; } }
