/* UI2 — premium theme. Colours come from /brand.css (app/brand.php). One file, shared components. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ui2 {
    margin: 0; background: var(--canvas); color: var(--ink);
    font: 15px/1.55 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "cv11" 1;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
small { font-size: .85em; color: var(--ink-2); }
code { font: .9em ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--canvas); border: 1px solid var(--hair); padding: 1px 6px; border-radius: 5px; }
.i { flex-shrink: 0; vertical-align: -3px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 200; background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: 8px; box-shadow: 0 4px 16px rgba(11,31,51,.2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.side :focus-visible, .support-bar :focus-visible { outline-color: #fff; }

/* ---- App frame ---- */
.app { display: flex; min-height: 100vh; }
.side {
    width: 256px; flex-shrink: 0; background: var(--side); color: var(--side-text);
    display: flex; flex-direction: column; padding: 18px 14px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 650; font-size: 1.06rem; letter-spacing: -.01em; padding: 4px 8px 16px; }
.switch { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--side-line); border-radius: 10px; color: #fff; text-decoration: none; margin-bottom: 18px; background: rgba(255,255,255,.03); }
a.switch:hover { background: var(--side-2); }
.sw-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.sw-name { font-weight: 600; font-size: .9rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-role { font-size: .76rem; color: var(--side-text); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--side-2); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 650; letter-spacing: .02em; flex-shrink: 0; }
.avatar.biz { border-radius: 8px; background: var(--accent); }
.avatar.sm { width: 28px; height: 28px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--side-text); text-decoration: none; font-weight: 500; font-size: .92rem; position: relative; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a[aria-current] { background: var(--side-2); color: #fff; }
.nav a[aria-current]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #3cc2b6; }
.side-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--side-line); padding-top: 12px; margin-top: 12px; }
.side-foot form { margin: 0; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; padding: 6px; border-radius: 8px; }
.me:hover { background: var(--side-2); }
.iconbtn { background: none; border: 0; color: inherit; width: 40px; height: 40px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.side .iconbtn:hover { background: var(--side-2); color: #fff; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mtop, .tabs { display: none; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 32px 48px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pagehead h1 { font-size: 1.55rem; font-weight: 680; letter-spacing: -.02em; line-height: 1.2; }
.pagehead .sub { color: var(--ink-2); margin-top: 4px; }
.pagehead-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; box-shadow: 0 1px 0 rgba(11,31,51,.06); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--hair); }
.btn.ghost:hover { border-color: #cfc8bb; background: #fdfcfa; }
.btn.light { background: #fff; color: var(--bad); border-color: #fff; }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: .84rem; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- Pills / badges (functional status) ---- */
.pill, .badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; line-height: 1.6; white-space: nowrap; border: 1px solid transparent; }
.pill.env { background: transparent; border-color: var(--hair); color: var(--ink-2); font-weight: 500; }
.badge.ok   { background: var(--ok-soft);   color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad  { background: var(--bad-soft);  color: var(--bad); }
.badge.grey { background: #efece6; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---- Cards ---- */
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; box-shadow: 0 1px 2px rgba(23,34,48,.04); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-h h2 { font-size: .98rem; font-weight: 650; letter-spacing: -.005em; }
.card-h a { font-size: .85rem; font-weight: 600; text-decoration: none; }
.card-h a:hover { text-decoration: underline; }
.card-b { padding: 14px 20px 18px; }
.grid { display: grid; gap: 18px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 18px; }
.mb { margin-bottom: 18px; }

/* ---- Stat cards ---- */
.stat { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(23,34,48,.04); }
.stat-l { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.stat-v { font-size: 1.85rem; font-weight: 680; letter-spacing: -.03em; line-height: 1.2; margin-top: 6px; }
.stat-s { font-size: .82rem; color: var(--ink-2); margin-top: 6px; }
.stat.muted .stat-v { color: #9aa3ad; }
.stat.attn .stat-v { color: var(--warn); }
.meter { height: 5px; border-radius: 99px; background: #eeeae3; margin-top: 10px; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter span.w0 { width: 0; }
.meter span.full { background: var(--warn); }
.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}.w40{width:40%}.w45{width:45%}.w50{width:50%}
.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}

/* ---- Lists & tables ---- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hair); }
.list li:first-child { border-top: 0; padding-top: 4px; }
.list li:last-child { padding-bottom: 2px; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 600; }
.list .d { color: var(--ink-2); font-size: .86rem; }
.tone { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tone.warn { background: var(--warn-soft); color: var(--warn); }
.tone.ok { background: var(--ok-soft); color: var(--ok); }
.tone.grey { background: #efece6; color: var(--ink-2); }
.tablewrap { overflow-x: auto; margin: 0 -20px -18px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); padding: 10px 20px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
td { padding: 12px 20px; border-bottom: 1px solid #f0ece5; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfbf9; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.emptystate { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--ink-2); padding: 22px 12px; }
.emptystate strong { color: var(--ink); font-weight: 600; margin-top: 4px; }
.emptystate span { font-size: .88rem; }

/* ---- Alerts, support bar, toast ---- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--hair); background: var(--card); margin-bottom: 18px; }
.alert .i { margin-top: 2px; }
.alert.ok { border-color: #bfe3cf; background: var(--ok-soft); color: #0e5134; }
.alert.bad { border-color: #f0c2bd; background: var(--bad-soft); color: #8a1c15; }
.alert.warn { border-color: #efd9ad; background: var(--warn-soft); color: #7a4700; }
.alert.info { border-color: #bfdcd8; background: var(--accent-soft); }
.secret { font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; user-select: all; background: #fff; }
.support-bar { background: var(--bad); color: #fff; padding: 8px 18px; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: .88rem; position: sticky; top: 0; z-index: 60; }
.support-bar form { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: var(--side); color: #fff; padding: 12px 18px; border-radius: 10px; max-width: 92vw; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 80; font-weight: 500; box-shadow: 0 10px 30px rgba(11,31,51,.25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Employee clock ---- */
.clockwrap { max-width: 520px; margin: 0 auto; display: grid; gap: 16px; }
.clock { padding: 26px 24px 22px; text-align: center; }
.clock .now { font-size: 3.1rem; font-weight: 680; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.clock .today { color: var(--ink-2); margin-top: 6px; }
.clock .state { margin: 18px 0 6px; }
.clock .state .badge { font-size: .92rem; padding: 5px 14px; }
.clock .since { color: var(--ink-2); min-height: 1.5em; }
.clock .actions { display: grid; gap: 10px; margin-top: 18px; }
.btn.punch { min-height: 68px; font-size: 1.2rem; font-weight: 680; border-radius: 14px; letter-spacing: -.01em; box-shadow: 0 6px 16px rgba(15,118,110,.22); }
.btn.punch.out { background: var(--side); border-color: var(--side); box-shadow: 0 6px 16px rgba(11,31,51,.2); }
.btn.punch.out:hover { background: #12304d; }
.btn.break { min-height: 52px; font-size: 1rem; border-radius: 12px; }
.btn.punch[disabled], .btn.break[disabled] { cursor: wait; opacity: .6; }
.clock .fine { font-size: .82rem; color: var(--ink-2); margin-top: 14px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); }
.trio > div { padding: 14px 10px; text-align: center; border-left: 1px solid var(--hair); }
.trio > div:first-child { border-left: 0; }
.trio .v { font-size: 1.15rem; font-weight: 680; letter-spacing: -.02em; }
.trio .l { font-size: .76rem; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; font-weight: 600; text-align: right; }

/* ---- Shared building blocks used by every page (.panel / .ph / .pb etc.) ---- */
.panel { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; box-shadow: 0 1px 2px rgba(23,34,48,.04); margin-bottom: 18px; overflow: hidden; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; font-weight: 650; font-size: .98rem; border-bottom: 1px solid var(--hair); }
.ph .right { font-weight: 400; margin-left: auto; }
.pb { padding: 18px 20px; }
.pb > :last-child { margin-bottom: 0; }
.pb.tablewrap, .panel > .tablewrap { padding: 0; margin: 0; }
.page p { margin: 0 0 12px; }
.page h2 { font-size: 1.05rem; font-weight: 650; margin: 0 0 8px; }
.muted { color: var(--ink-2); } .tiny { font-size: .84rem; } .center { text-align: center; } .strong { font-weight: 650; } .nowrap { white-space: nowrap; }
.right { margin-left: auto; } .mt { margin-top: 14px; } .spacer { flex: 1; }
.narrow { max-width: 600px; }
.cards2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-bottom: 18px; align-items: start; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-bottom: 18px; }
.cards2 .panel, .cards3 .panel { margin-bottom: 0; }
.cards2 > div > .panel:last-child { margin-bottom: 0; } .cards2 > div > .panel { margin-bottom: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 16px 18px; }
.tile .n { font-size: 1.7rem; font-weight: 680; letter-spacing: -.03em; line-height: 1.2; }
.tile .l { font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }
.price { font-size: 1.5rem; font-weight: 680; margin-bottom: 8px; } .price .muted { font-size: .9rem; font-weight: 400; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.toolbar.end { justify-content: flex-end; margin: 16px 0 0; }
.rowline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hair); }
.rowline:first-child { border-top: 0; padding-top: 0; } .rowline:last-child { padding-bottom: 0; }
.empty { color: var(--ink-2); text-align: center; padding: 26px 12px; margin: 0; }
.badge.big { font-size: .95rem; padding: 5px 14px; }
.ticks { margin: 0; padding-left: 20px; }

/* Buttons: legacy size names */
.btn.small { min-height: 32px; padding: 0 12px; font-size: .84rem; border-radius: 8px; }
.btn.full { display: flex; width: 100%; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: #8f1d17; border-color: #8f1d17; }
.btn.xl { display: flex; width: 100%; min-height: 64px; font-size: 1.15rem; border-radius: 14px; margin-bottom: 10px; }
.inline { display: inline; margin: 0; }
td form.inline + form.inline { margin-left: 6px; }

/* Forms */
label { display: block; font-weight: 600; font-size: .86rem; margin: 14px 0 6px; }
input, select, textarea, button { font: inherit; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
    width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #d8d2c6; border-radius: 9px; background: #fff; color: var(--ink);
    transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: #c2baab; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,118,110,.18); }
input::placeholder, textarea::placeholder { color: #8b94a0; }
input:disabled, select:disabled { background: #f3f0ea; color: var(--ink-2); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(180,35,24,.12); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
form > .btn, form > button.btn { margin-top: 18px; }
form.inline > .btn, .toolbar .btn, .supportform .btn, .rowline .btn { margin-top: 0; }
.checks { border: 1px solid var(--hair); border-radius: 10px; margin: 16px 0 0; padding: 10px 14px 12px; }
.checks legend { font-size: .82rem; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; margin: 8px 0; min-height: 28px; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.check .grow { flex: 1; min-width: 0; } .check input { flex: none; }
.paytotal { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--wash, rgba(0,0,0,.04)); }
.paytotal strong { font-size: 1.25rem; letter-spacing: -.02em; }
.paybreak { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 10px; } .paybreak dt { display: flex; align-items: center; gap: 6px; }
.searchbox { max-width: 320px; } select.autow { width: auto; }
.subrow td { background: #fbfaf7; padding-top: 10px; padding-bottom: 12px; }
.supportform { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; }
.supportform input[type=text] { flex: 1; min-width: 220px; min-height: 34px; padding: 5px 10px; }
.supportform .check { margin: 0; white-space: nowrap; }

/* Old message classes map onto alerts */
.flash { padding: 12px 16px; border-radius: 12px; border: 1px solid #bfe3cf; background: var(--ok-soft); color: #0e5134; margin: 0 0 18px; font-weight: 500; }
.flash.bad { border-color: #f0c2bd; background: var(--bad-soft); color: #8a1c15; }
.flash.warn, .flash.preview { border-color: #efd9ad; background: var(--warn-soft); color: #7a4700; }

/* Dialog */
dialog { border: 0; border-radius: 16px; padding: 24px; width: min(500px, 92vw); color: var(--ink); box-shadow: 0 24px 70px rgba(11,31,51,.35); }
dialog::backdrop { background: rgba(11,31,51,.55); }
dialog h2 { font-size: 1.15rem; margin: 0 0 6px; }

/* ---- Fuel receipts ---- */
.formwrap { max-width: 760px; }
.req { font-weight: 500; font-size: .76rem; color: var(--ink-2); margin-left: 4px; }
fieldset.plain { border: 0; padding: 0; margin: 0 0 4px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 22px 16px; margin: 0; border: 1.5px dashed #cfc8bb; border-radius: 12px; background: #fdfcfa; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.drop strong { color: var(--ink); font-size: 1rem; }
.drop span { font-size: .84rem; }
.drop:hover { border-color: var(--accent); background: var(--accent-soft); }
input.sr:focus-visible + .filelist, .drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.filelist { list-style: none; margin: 10px 0 0; padding: 0; }
.filelist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
.filelist .grow { flex: 1; min-width: 0; } .filelist .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .filelist .d { font-size: .84rem; color: var(--ink-2); }
.filelist .tone { font-size: .68rem; font-weight: 700; } .filelist .check { margin: 0; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--hair); flex-shrink: 0; }
input.reg { text-transform: uppercase; font-weight: 650; letter-spacing: .06em; }
details.more { margin-top: 18px; border-top: 1px solid var(--hair); padding-top: 6px; }
details.more summary { cursor: pointer; font-weight: 600; padding: 10px 0; color: var(--accent-ink); }
.progress { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: .88rem; color: var(--ink-2); }
.progress .meter { flex: 1; margin: 0; height: 8px; } .progress .meter span { transition: width .15s; }
.plate { display: inline-block; font-weight: 700; letter-spacing: .06em; font-size: .86rem; padding: 2px 8px; border-radius: 5px; background: #fff7cf; border: 1px solid #e3d48a; color: #2a2300; white-space: nowrap; }
.plate.lg { font-size: 1.25rem; padding: 5px 14px; border-radius: 8px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hero .amount { font-size: 1.9rem; font-weight: 680; letter-spacing: -.03em; }
.receiptfile { margin: 0 0 16px; } .receiptfile:last-child { margin-bottom: 0; }
.receiptfile img { display: block; max-width: 100%; max-height: 520px; border-radius: 10px; border: 1px solid var(--hair); background: #f3f0ea; }
.receiptfile figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-2); margin-top: 8px; }
.pdfbox { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px; border: 1px solid var(--hair); border-radius: 10px; background: #fdfcfa; text-decoration: none; font-weight: 600; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 14px 16px 16px; margin-bottom: 18px; }
.filters label { margin-top: 0; }
.filters > div { min-width: 150px; } .filters .f-grow { flex: 1; min-width: 220px; }
.filters .f-btns { display: flex; gap: 8px; min-width: 0; } .filters .btn { margin-top: 0; min-height: 42px; }
table.dense th, table.dense td { padding-left: 12px; padding-right: 12px; }
table.dense th:first-child, table.dense td:first-child { padding-left: 20px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 0 0 18px; }
.pager [aria-disabled] { opacity: .45; pointer-events: none; }
details.adjust > summary { cursor: pointer; list-style-position: inside; border-bottom: 0; }
details.adjust[open] > summary { border-bottom: 1px solid var(--hair); }
table.cardrows td:first-child, table.cardrows td[data-l="Employee"] { white-space: nowrap; }
.segmented { display: inline-flex; background: #ece8e0; border-radius: 10px; padding: 3px; margin-bottom: 18px; }
.segmented a { padding: 7px 18px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.segmented a[aria-selected] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(23,34,48,.12); }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; font-weight: 400; }
.chip { padding: 3px 12px; border-radius: 99px; border: 1px solid var(--hair); text-decoration: none; color: var(--ink-2); font-size: .82rem; font-weight: 600; }
.chip:hover { border-color: #cfc8bb; } .chip.on { background: var(--side); border-color: var(--side); color: #fff; }
@media (max-width: 700px) {       /* receipt tables become stacked cards on phones */
    table.cardrows thead { position: absolute; left: -9999px; }
    table.cardrows tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--hair); }
    table.cardrows td { display: block; padding: 0; border: 0; text-align: left !important; }
    table.cardrows td[data-l]::before { content: attr(data-l); display: block; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
    table.cardrows td:last-child { grid-column: 1 / -1; margin-top: 6px; } table.cardrows td:last-child .btn { width: 100%; }
    .ph { flex-wrap: wrap; }
}

.punchform { margin: 0; } .punchform .btn { width: 100%; }
.card-b .tablewrap + p { margin-top: 30px; }
input[type=datetime-local] { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #d8d2c6; border-radius: 9px; background: #fff; color: var(--ink); }
.grid2 select { margin-top: 8px; }

/* Sign-up honeypot: off-screen for people, still present for bots. Captured email list. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mailitem { border-top: 1px solid var(--hair); padding: 10px 0; } .mailitem:first-of-type { border-top: 0; padding-top: 0; }
.mailitem summary { cursor: pointer; }
.mailbody { white-space: pre-wrap; word-break: break-word; font: .88rem/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--canvas); border: 1px solid var(--hair); border-radius: 10px; padding: 14px; margin: 10px 0 0; }

/* Signed-out pages */
body.public { display: block; }
.pubwrap { max-width: 440px; margin: 0 auto; padding: 48px 16px 40px; }
.pub-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--side); font-weight: 680; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; margin-bottom: 26px; }
.pubwrap h1 { font-size: 1.4rem; font-weight: 680; letter-spacing: -.02em; text-align: center; margin-bottom: 18px; }
.pubwrap:has(.installwrap) { max-width: 660px; } .installwrap .panel { margin-bottom: 16px; } .installwrap .list .tone { font-weight: 700; }
.pubwrap .envrow { text-align: center; margin-top: 18px; }
.loginwrap { max-width: 480px; margin: 0 auto; }
.choice { margin-bottom: 12px; }
.phone { max-width: 520px; margin: 0 auto; }

/* ---- Phones & small tablets ---- */
@media (max-width: 1080px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-main { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
    .side { display: none; }
    .mtop { display: flex; align-items: center; gap: 8px; background: var(--side); color: #fff; padding: 8px 10px 8px 14px; position: sticky; top: 0; z-index: 50; }
    .mtop .side-brand { padding: 0; }
    .mtop-biz { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mtop .iconbtn { width: 44px; height: 44px; color: #fff; }
    .support-bar { position: static; }
    .page { padding: 18px 16px calc(92px + env(safe-area-inset-bottom)); }
    .pagehead h1 { font-size: 1.3rem; }
    .tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--card); border-top: 1px solid var(--hair); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
    .tabs { overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
    .tabs a { flex: 1 0 68px; white-space: nowrap; padding: 0 4px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--ink-2); text-decoration: none; border-radius: 10px; }
    .tabs a[aria-current] { color: var(--accent-ink); background: var(--accent-soft); }
    .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
    .btn { min-height: 44px; } .btn.small, .btn.sm { min-height: 40px; }
    .grid2 { grid-template-columns: 1fr; }
    .cards2 { grid-template-columns: 1fr; }
    .ph { padding: 12px 16px; } .pb { padding: 16px; }
    .clock .now { font-size: 2.7rem; }
}
@media (max-width: 520px) { .cols-4 { gap: 12px; } .stat { padding: 14px; } .stat-v { font-size: 1.5rem; } .card-h { padding: 14px 16px 0; } .card-b { padding: 12px 16px 16px; } .tablewrap { margin: 0 -16px -16px; } th, td { padding-left: 16px; padding-right: 16px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Printable QR poster ---- */
.qr-poster { text-align: center; }
.qr-poster-loc { font-weight: 600; }
.qr-poster-code { width: 240px; height: 240px; margin: 0 auto; }
.qr-poster-cta { font-weight: 700; margin-top: 12px; }
@media print { .no-print { display: none; } }

/* ---- Landing page (signed-out visitors at /) ---- */
body.landing { display: block; background: var(--canvas); }
.landing-top { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 20px 20px 0; }
.landing-top .pub-brand { margin-bottom: 0; }
.landing-hero { background: var(--side); color: #fff; padding: 56px 20px 64px; text-align: center; margin-top: 20px; }
.landing-hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 680; letter-spacing: -.02em; max-width: 760px; margin: 0 auto 14px; }
.landing-hero p { font-size: 1.05rem; color: var(--side-text); max-width: 560px; margin: 0 auto 26px; }
.landing-hero .actions, .landing-cta .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing-hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.landing-hero .btn.ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.landing-section { max-width: 1080px; margin: 0 auto; padding: 52px 20px; }
.landing-section h2 { font-size: 1.5rem; font-weight: 680; letter-spacing: -.02em; text-align: center; margin: 0 0 8px; }
.landing-section > p.lead { text-align: center; color: var(--ink-2); max-width: 560px; margin: 0 auto 34px; }
.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.landing-feature { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 22px; }
.landing-feature .i { color: var(--accent); width: 26px; height: 26px; margin-bottom: 12px; }
.landing-feature h3 { font-size: 1.02rem; font-weight: 650; margin: 0 0 6px; }
.landing-feature p { font-size: .9rem; color: var(--ink-2); margin: 0; line-height: 1.5; }
.landing-cta { background: var(--accent-soft); text-align: center; padding: 48px 20px; }
.landing-cta h2 { font-size: 1.35rem; margin: 0 0 18px; }
.landing-foot { text-align: center; padding: 24px 20px 40px; color: var(--ink-2); font-size: .85rem; }
.landing-foot a { color: var(--ink-2); }
@media (max-width: 780px) { .landing-features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .landing-features { grid-template-columns: 1fr; } .landing-hero { padding: 44px 16px 52px; } }
.alert .grow { flex: 1; min-width: 0; } .alert .grow p { margin: 6px 0 0; } [data-locgate-help] { margin-top: 8px; line-height: 1.5; }
/* Timesheets: week at a glance — one screen wide, no sideways scrolling */
table.glance { font-size: .88rem; } table.glance th, table.glance td { white-space: nowrap; padding-left: 8px; padding-right: 8px; } table.glance td:first-child, table.glance th:first-child { padding-left: 16px; }
table.glance .rowlink { color: inherit; text-decoration: none; } table.glance .rowlink:hover strong { text-decoration: underline; color: var(--accent-ink); }
table.glance .badge { padding: 1px 8px; font-size: .74rem; } table.glance .btn.small { min-height: 30px; padding: 0 10px; font-size: .82rem; } table.glance form.inline { display: inline; margin: 0; }
