/* ============================================
   TallyGate
   Phone-first for the clock screen; wider office layouts for manager screens.
   High-contrast light theme: it is used outdoors in daylight.
   ============================================ */

:root {
    --navy: #0e0d0c;        /* TallyGate ink (tallygate.co.uk) */
    --navy-2: #2a2f36;
    --green: #ff6a13;       /* accent: TallyGate orange (tallygate.co.uk), or the customer's brand colour */
    --green-dark: #d94a00;
    --on-navy: #fff;        /* text on the main colour; set from the brand */
    --on-green: #15181c;    /* text on the highlight colour */
    --brand-ink: var(--navy); /* main colour where it is used as text on white */
    --ok: #2f855a;      --ok-bg: #e6f4ea;
    --warn: #975a16;    --warn-bg: #fdf3d8;
    --bad: #c53030;     --bad-bg: #fde8e8;
    --info: #2b6cb0;    --info-bg: #e6f0fb;
    --ink: #1a202c;
    --muted: #5a6475;
    --line: #dde2ea;
    --bg: #f3f5f8;
    --card: #ffffff;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --font: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* "hidden" must win over component display styles */
html, body { margin: 0; }
body { font: 16px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.05rem; }
a { color: var(--info); }
button, input, select { font: inherit; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.pad { padding: 1rem; }
.pad-x { padding: 0 .25rem; }
.nowrap { white-space: nowrap; }
.error { color: var(--bad); font-weight: 600; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }

/* ---- boot / login ---- */
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.boot__logo { width: 200px; }
.login { max-width: 380px; margin: 0 auto; padding: 3rem 1rem; display: grid; gap: 1.25rem; }
.login__logo { width: 230px; max-width: 100%; max-height: 90px; object-fit: contain; justify-self: center; border-radius: 6px; }
.login__app { margin: -.5rem 0 0; text-align: center; font-size: 1.5rem; font-weight: 800; color: var(--navy); letter-spacing: .02em; }
.login__app span { color: var(--green-dark); }
.login__title { text-align: center; }
.login__form { display: grid; gap: 1rem; background: var(--card); padding: 1.25rem; border-radius: var(--radius); box-shadow: var(--shadow); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; background: #e4e8ef; border-radius: 999px; padding: 4px; }
.segmented__btn { border: 0; background: none; padding: .55rem; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented__btn.is-active { background: var(--card); color: var(--navy); box-shadow: var(--shadow); }

/* ---- shell ---- */
.topbar {
    position: sticky; top: 0; z-index: 1000;
    display: flex; align-items: center; gap: .75rem;
    padding: .5rem 1rem; padding-top: max(.5rem, env(safe-area-inset-top));
    background: var(--navy); color: var(--on-navy);
}
.topbar__brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.topbar__brand img { height: 34px; width: auto; max-width: 140px; object-fit: contain; display: block; border-radius: 3px; }
.topbar__app { color: var(--topbar-name, var(--green)); font-weight: 800; font-size: 1.1rem; letter-spacing: .03em; }
.topbar__sync { background: var(--warn-bg); color: var(--warn); font-size: .8rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; }
.topbar__user { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar__name { font-size: .9rem; opacity: .9; }
.topbar .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }

.nav { display: flex; gap: .25rem; overflow-x: auto; background: var(--card); border-bottom: 1px solid var(--line); padding: 0 .5rem; scrollbar-width: none; }
.nav__link { padding: .75rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav__link.is-active { color: var(--brand-ink); border-bottom-color: var(--green); }

.view { padding: 1rem; max-width: 1280px; margin: 0 auto; outline: none; }
.page { display: grid; gap: 1rem; }
.page__head { display: grid; gap: .25rem; }
.page__head--row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---- generic components ---- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.card__title { margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.card--alert { border-left: 4px solid var(--bad); }
.card--alert ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.table-card { padding: 0; }
.count { background: var(--navy); color: var(--on-navy); border-radius: 999px; font-size: .75rem; padding: .05rem .5rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid transparent; border-radius: 8px; padding: .6rem 1rem; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--navy); color: var(--on-navy); }
.btn--primary:hover:not(:disabled) { background: var(--navy-2); }
.btn--secondary { background: var(--card); color: var(--navy); border-color: var(--line); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--danger { background: var(--bad); color: #fff; }
.btn--sm { padding: .4rem .7rem; font-size: .9rem; }
.btn--lg { padding: .9rem 1rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--info); font-weight: 600; cursor: pointer; text-decoration: underline; }
.link-btn--danger { color: var(--bad); margin-left: .75rem; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.badge, .chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; white-space: nowrap; }
.badge--ok, .chip--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn, .chip--warn { background: var(--warn-bg); color: var(--warn); }
.badge--bad, .chip--bad { background: var(--bad-bg); color: var(--bad); }
.badge--info, .chip--info { background: var(--info-bg); color: var(--info); }
.badge--muted { background: #eceff3; color: var(--muted); }
.chip { font-weight: 600; margin: 0 .2rem .2rem 0; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; vertical-align: middle; border: 1px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }

.field { display: grid; gap: .3rem; flex: 1 1 180px; min-width: 0; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .search {
    width: 100%; padding: .65rem .75rem; border: 1px solid #c9d0db; border-radius: 8px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .search:focus { border-color: var(--navy); outline: 2px solid rgba(16, 29, 59, .15); }
.field--narrow { flex: 0 1 140px; }
.field-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.field-row--center { align-items: center; justify-content: space-between; }
.input-with-btn { display: flex; gap: .4rem; }
.check { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.search--sm { width: 200px; padding: .45rem .65rem; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: .6rem .75rem; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.table td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-inactive td { color: var(--muted); }
.table--inner { background: #fff; border: 1px solid var(--line); border-radius: 8px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; display: grid; }
.stat__n { font-size: 1.8rem; font-weight: 800; color: var(--navy); }
.stat__l { color: var(--muted); font-size: .85rem; }
.stat--bad .stat__n { color: var(--bad); }
.stat--warn .stat__n { color: var(--warn); }

/* ---- clock screen ---- */
.clock { max-width: 480px; margin: 0 auto; display: grid; gap: .9rem; }
.status-card { border-top: 6px solid #c3cad6; text-align: center; padding: 1.25rem 1rem; }
.status-card--on { border-top-color: var(--green); }
.status-card__label { margin: 0; text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.status-card__site { margin: .3rem 0 0; font-size: 1.35rem; font-weight: 800; color: var(--navy); }
.status-card__time { margin: .35rem 0 0; color: var(--muted); }
.status-card__warn { margin: .75rem 0 0; color: var(--warn); font-size: .9rem; }
.gps-card__row { display: flex; justify-content: space-between; align-items: center; }
.gps-card__text { margin: .4rem 0 0; }
.btn--clock {
    width: 100%; min-height: 96px; border: 0; border-radius: 18px;
    font-size: 1.6rem; font-weight: 800; letter-spacing: .02em;
    background: var(--green); color: var(--on-green); cursor: pointer;
    box-shadow: 0 6px 16px rgba(125, 139, 46, .35);
}
.btn--clock:active:not(:disabled) { transform: translateY(1px); }
.btn--clock-out { background: var(--navy); color: var(--on-navy); box-shadow: 0 6px 16px rgba(16, 29, 59, .3); }
.btn--clock:disabled { opacity: .6; }
.sync-line { margin: 0; min-height: 1.4em; text-align: center; font-size: .9rem; color: var(--muted); }
.period-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.period-total { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.day-list { list-style: none; margin: 0; padding: 0; }
.day-list li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.day-list li:last-child { border-bottom: 0; }
.day-list li.is-today { font-weight: 700; }

.radio-list { display: grid; gap: .4rem; margin: .75rem 0; }
.radio-row { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .7rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.radio-row:has(input:checked) { border-color: var(--navy); background: #f2f5fa; }

/* ---- crew ---- */
.crew-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.crew-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem 1rem; }

/* ---- map ---- */
.map-page { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; height: calc(100vh - 140px); min-height: 420px; }
.map-page__map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #e8ecf1; }
.map-page__side { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; overflow-y: auto; display: grid; align-content: start; gap: .75rem; }
.map-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.map-list__item { width: 100%; display: flex; gap: .6rem; align-items: flex-start; text-align: left; background: none; border: 0; padding: .45rem; border-radius: 8px; cursor: pointer; }
.map-list__item:hover { background: #f2f5fa; }
.map-list__item .dot { margin-top: .3rem; }
.site-map { height: 320px; border-radius: 8px; overflow: hidden; background: #e8ecf1; }

/* ---- timesheets ---- */
.period-nav { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.timesheet .person-row { cursor: pointer; }
.timesheet .person-row:hover td, .timesheet .person-row.is-open td { background: #f7f9fc; }
.detail-row > td { background: #f7f9fc; padding: 0 .75rem 1rem; }
.detail__actions { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; margin-top: .75rem; flex-wrap: wrap; }

.settings-form { display: grid; gap: 1rem; max-width: 860px; }
.settings-form h2 { margin-top: .5rem; }

/* ---- dialogs and toasts ---- */
.dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 2rem)); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.dialog--wide { width: min(760px, calc(100vw - 2rem)); }
.dialog::backdrop { background: rgba(16, 24, 40, .5); }
.dialog__form { display: grid; gap: .9rem; padding: 1.25rem; }
.dialog__body { display: grid; gap: .8rem; }
.dialog__body p { margin: 0; }
.dialog__actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.dialog__error { margin: 0; color: var(--bad); font-weight: 600; }

#toasts { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: .5rem; z-index: 3000; width: min(440px, calc(100vw - 2rem)); }
.toast { padding: .75rem 1rem; border-radius: 10px; background: var(--navy); color: var(--on-navy); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-weight: 600; }
.toast--ok { background: var(--ok); }
.toast--warn { background: #b7791f; }
.toast--error { background: var(--bad); }

/* ---- small screens ---- */
@media (max-width: 760px) {
    .view { padding: .75rem; }
    .topbar__name { display: none; }
    .map-page { grid-template-columns: 1fr; height: auto; }
    .map-page__map { height: 60vh; }
    .search--sm { width: 100%; }
    .toolbar { width: 100%; }
}

/* ---- registration ---- */
.login__alt { display: grid; gap: .6rem; text-align: center; }
.login__alt p { margin: 0; }
.login__back { justify-self: center; }
.login__done p { margin: .6rem 0 0; }
.nav__badge { display: inline-block; margin-left: .35rem; background: var(--bad); color: #fff; border-radius: 999px; font-size: .72rem; padding: .05rem .45rem; vertical-align: 1px; }
.pending-card { border-left: 4px solid #b7791f; }
.pending-card .table td { vertical-align: middle; }

/* ---- face photos ---- */
.face-thumb { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; vertical-align: middle; background: #e4e8ef; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: zoom-in; }
.face-thumb--none { display: inline-grid; place-items: center; color: var(--muted); font-weight: 700; cursor: default; }
.face-thumb--lg { width: 64px; height: 64px; }
.person-cell { display: flex; gap: .6rem; align-items: center; }
.camera-dialog { width: min(440px, calc(100vw - 1rem)); }
.camera { display: grid; gap: .75rem; padding: 1rem; }
.camera p { margin: 0; }
.camera__frame { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #000; }
.camera__frame video, .camera__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera__frame--mirror video { transform: scaleX(-1); }   /* feels natural for selfies; the saved photo is not mirrored */
.camera__guide { position: absolute; inset: 14% 22%; border: 3px dashed rgba(255, 255, 255, .8); border-radius: 50% / 45%; pointer-events: none; }
.camera__frame img:not([hidden]) + .camera__guide { display: none; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.compare__fig { margin: 0; display: grid; gap: .3rem; text-align: center; font-size: .85rem; color: var(--muted); }
.compare__fig img, .compare__none { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #eceff3; }
.compare__none { display: grid; place-items: center; }
.reg-photo { display: flex; gap: .75rem; align-items: center; }
.reg-photo img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.approve-photo { width: 160px; height: 160px; border-radius: 12px; object-fit: cover; justify-self: center; }

/* ---- site boundary editor ---- */
.site-map--tall { height: 420px; }
.fence-find { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.fence-find .field { flex: 1 1 260px; }
.fence-tools { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 2.2rem; }
.fence-radius { flex: 1 1 260px; }
.segmented--sm { max-width: 360px; }
.segmented--sm .segmented__btn { padding: .4rem; font-size: .9rem; }
.vertex-handle { background: #fff; border: 3px solid #101d3b; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.4); cursor: grab; }

.login__version { text-align: center; margin: 0; }

/* ---- forms: operative ---- */
.bad-text { color: var(--bad); }
.todo-card { display: flex; gap: .8rem; align-items: center; text-decoration: none; color: inherit; border-left: 5px solid var(--bad); }
.todo-card__count { background: var(--bad); color: #fff; font-weight: 800; border-radius: 999px; min-width: 2rem; height: 2rem; display: grid; place-items: center; }
.todo-card__go { margin-left: auto; font-weight: 700; color: var(--navy); }
.forms-banner { border-left: 5px solid var(--warn); }
.forms-banner--ok { border-left-color: var(--ok); }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.todo-item { width: 100%; display: flex; gap: .8rem; align-items: center; text-align: left; background: var(--card); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; cursor: pointer; font: inherit; color: inherit; }
.todo-item--defect { border-left: 5px solid var(--bad); }
.todo-item__icon { font-size: 1.4rem; }
.todo-item__go { margin-left: auto; font-weight: 700; color: var(--navy); white-space: nowrap; }
.form-page { max-width: 640px; margin: 0 auto; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; counter-reset: chk; }
.check-item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem 1rem; display: grid; gap: .5rem; }
.check-item__label { font-weight: 600; }
.check-item__note, .check-item__input { width: 100%; padding: .6rem .7rem; border: 1px solid #c9d0db; border-radius: 8px; font: inherit; }
.pfn { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .4rem; }
.pfn__btn { padding: .65rem; border-radius: 8px; border: 2px solid var(--line); background: #fff; font-weight: 700; font: inherit; cursor: pointer; }
.pfn__btn.is-on { background: #eceff3; border-color: var(--navy); }
.pfn__btn--pass.is-on { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.pfn__btn--fail.is-on { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.sigpad { position: relative; border: 2px dashed #b9c2d0; border-radius: 10px; background: #fff; }
.sigpad__canvas { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.sigpad__hint { position: absolute; left: 1rem; bottom: .6rem; color: #a0aabb; pointer-events: none; }
.sigpad__clear { position: absolute; right: .8rem; top: .5rem; }
.pdf-view { background: #525659; border-radius: 10px; padding: .5rem; display: grid; gap: .5rem; justify-items: center; }     /* pages run down the page - no scroll-inside-a-scroll */
.pdf-page { background: #fff; max-width: 100%; height: auto; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pdf-end { color: #e2e5ea; margin: .5rem 0; }
.read-confirm { padding: .8rem 1rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 600; }

/* ---- forms: office ---- */
.tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs__btn { background: none; border: 0; border-bottom: 3px solid transparent; padding: .6rem .9rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs__btn.is-active { color: var(--navy); border-bottom-color: var(--green-dark); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: .6rem; }
.filters .field { flex: 1 1 150px; }
.dropzone { margin-top: .8rem; border: 2px dashed #b9c2d0; border-radius: 12px; padding: 1.6rem 1rem; display: grid; gap: .3rem; justify-items: center; text-align: center; cursor: pointer; background: #fafbfc; }
.dropzone.is-over { border-color: var(--navy); background: #eef2f8; }
.doc-card__head { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.doc-card__body { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .8rem; }
.doc-card__body h4 { margin: 0 0 .3rem; font-size: .9rem; }
.doc-card.is-inactive { opacity: .7; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; font-size: .92rem; }
.item-row { display: grid; grid-template-columns: 1fr 170px auto auto; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.item-row input, .item-row select { padding: .5rem; border: 1px solid #c9d0db; border-radius: 6px; font: inherit; }
.record__head { display: flex; gap: 1rem; align-items: center; margin-bottom: .6rem; }
.record__head h3 { margin: 0; }
.record__head p { margin: .2rem 0 0; }
.record__logo { height: 44px; width: auto; max-width: 200px; object-fit: contain; }
.record__meta th { width: 30%; }
.record__sig { margin: 1rem 0 0; }
.record__sig img { max-width: 320px; width: 100%; border-bottom: 1px solid var(--ink); }
.record__sig figcaption { font-size: .85rem; color: var(--muted); }
.print-area { display: none; }
@media print {
    body.printing > *:not(.print-area) { display: none !important; }
    body.printing .print-area { display: block; padding: 1rem; }
}
@media (max-width: 760px) {
    .doc-card__body { grid-template-columns: 1fr; }
    .item-row { grid-template-columns: 1fr; }
}

/* ---- site hours ---- */
.hours-grid { display: grid; grid-template-columns: 80px 1fr auto 1fr; gap: .4rem .6rem; align-items: center; max-width: 420px; }
.hours-grid input[type=time] { padding: .4rem .5rem; border: 1px solid #c9d0db; border-radius: 6px; font: inherit; }
.hours-grid__day { display: flex; gap: .4rem; align-items: center; font-weight: 600; }
.site-hours { display: grid; gap: .5rem; }
.site-hours h3, .settings-form h3 { margin: .3rem 0 0; }

/* ---- Xero ---- */
.setup-steps { margin: .4rem 0 .8rem; padding-left: 1.2rem; display: grid; gap: .3rem; }
.setup-steps code { background: #eef1f5; padding: .05rem .35rem; border-radius: 4px; word-break: break-all; }
.btn.is-disabled { opacity: .5; }
details > summary { cursor: pointer; margin: .4rem 0; }

/* =====================================================================
   Simple mode - operatives. Big type, big targets, one thing per screen.
   ===================================================================== */
body[data-role="operative"] { font-size: 18px; }
body[data-role="operative"] .nav__link { font-size: 1.05rem; padding: .9rem 1.1rem; }
body[data-role="operative"] .btn { min-height: 52px; font-size: 1.05rem; }
body[data-role="operative"] .field input, body[data-role="operative"] .field select { min-height: 52px; font-size: 1.1rem; }
body[data-role="operative"] .toast { font-size: 1.05rem; padding: 1rem 1.2rem; }

/* status card with a big tick */
.status-card__icon { width: 64px; height: 64px; margin: 0 auto .4rem; border-radius: 50%; display: grid; place-items: center;
    font-size: 2rem; font-weight: 900; background: #e4e8ef; color: #8a94a6; }
.status-card__icon--on { background: var(--ok-bg); color: var(--ok); }
.status-card__label { font-size: .95rem; }
.status-card__site { font-size: 1.5rem; }

/* one-line location */
.gps-line { text-align: center; padding: .7rem 1rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); font-size: 1.05rem; }
.gps-line--ok { background: var(--ok-bg); color: var(--ok); }
.gps-line--warn { background: var(--warn-bg); color: var(--warn); }

.btn--clock { min-height: 110px; font-size: 2rem; display: flex; gap: .6rem; align-items: center; justify-content: center; }
.btn--clock span { font-size: 1.4rem; }
.hours-card summary { list-style: none; cursor: pointer; }
.hours-card summary::-webkit-details-marker { display: none; }
.hours-card summary::after { content: '›'; margin-left: .5rem; color: var(--muted); }
.hours-card[open] summary::after { content: '⌄'; }
.hours-card .period-head { margin-bottom: 0; }
.hours-card[open] .period-head { margin-bottom: .6rem; }

/* PIN keypad */
.pinpad { display: grid; gap: .8rem; justify-items: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem 1rem; }
.pinpad__hello { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.pinpad__ask { margin: 0; color: var(--muted); font-size: 1.05rem; }
.pinpad__dots { display: flex; gap: .7rem; min-height: 22px; }
.pinpad__dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--navy); }
.pinpad__dots span.is-on { background: var(--navy); }
.pinpad__keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; width: 100%; max-width: 320px; }
.pinpad__key { height: 72px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-size: 1.8rem; font-weight: 700; color: var(--navy); cursor: pointer; font-family: inherit; }
.pinpad__key:active { background: #eef1f5; }
.pinpad__key--fn { font-size: 1.5rem; color: var(--muted); }
.pinpad__key--go { background: var(--green); border-color: var(--green); color: var(--on-green); font-size: 2rem; }

/* picture tiles: "What are you using today?" */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.tile { position: relative; display: grid; justify-items: center; text-align: center; gap: .2rem; padding: .9rem .5rem; border: 3px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile__icon { font-size: 2.6rem; line-height: 1; }
.tile__name { font-weight: 700; }
.tile__ref { font-size: .85rem; color: var(--muted); }
.tile:has(input:checked) { border-color: var(--green-dark); background: #f4f7e6; box-shadow: 0 0 0 3px rgba(195, 205, 122, .5); }
.tile:has(input:checked)::after { content: '✓'; position: absolute; top: .3rem; right: .5rem; font-weight: 900; color: var(--green-dark); font-size: 1.3rem; }
.tile--off { opacity: .55; cursor: not-allowed; }
.tile--off .tile__ref { color: var(--bad); font-weight: 700; }

/* one question per screen */
.wizard { gap: .9rem; }
.wizard__top { display: flex; justify-content: space-between; align-items: center; }
.wizard__back { font-size: 1.05rem; text-decoration: none; }
.wizard__count { font-weight: 700; color: var(--muted); }
.wizard__bar { height: 10px; background: #e4e8ef; border-radius: 99px; overflow: hidden; }
.wizard__bar span { display: block; height: 100%; background: var(--green-dark); transition: width .2s; }
.wizard__title { margin: 0; color: var(--muted); font-size: .95rem; }
.wizard__q { font-size: 1.6rem; line-height: 1.25; margin: .4rem 0; }
.big-choice { display: grid; gap: .7rem; }
.big-choice__btn { min-height: 76px; border-radius: 16px; border: 3px solid var(--line); background: #fff; font: inherit; font-size: 1.4rem; font-weight: 800; cursor: pointer; display: flex; gap: .6rem; align-items: center; justify-content: center; }
.big-choice__btn--ok { border-color: #9fd3b3; color: var(--ok); }
.big-choice__btn--bad { border-color: #f1a9a9; color: var(--bad); }
.big-choice__btn--na { font-size: 1.1rem; color: var(--muted); min-height: 60px; }
.big-choice__btn--ok.is-on { background: var(--ok); color: #fff; border-color: var(--ok); }
.big-choice__btn--bad.is-on { background: var(--bad); color: #fff; border-color: var(--bad); }
.big-choice__btn--na.is-on { background: #e4e8ef; border-color: #a0aabb; }
.wizard__note textarea { width: 100%; font-size: 1.1rem; padding: .7rem; border: 2px solid #c9d0db; border-radius: 10px; font-family: inherit; }
.wizard__note { display: grid; gap: .7rem; }
.wizard__input { width: 100%; min-height: 64px; font-size: 1.6rem; padding: .5rem .8rem; border: 3px solid #c9d0db; border-radius: 12px; font-family: inherit; }
.review-list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.review-list__row { width: 100%; display: flex; justify-content: space-between; gap: 1rem; text-align: left; padding: .75rem 1rem; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; cursor: pointer; }
.review-list li:last-child .review-list__row { border-bottom: 0; }

/* =====================================================================
   Phone layout: nothing may push the page wider than the screen.
   Grid items default to "as wide as my content", so a wide table used to
   stretch the whole page sideways. Tables now become stacked cards on phones
   (labels come from the column headings - see labelTables in app.js).
   ===================================================================== */
body { overflow-x: clip; }
.view, .view__screen { min-width: 0; }
.page { grid-template-columns: minmax(0, 1fr); }
.page > *, .card { min-width: 0; }
.field input[type=date], .field input[type=time] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; min-height: 2.75rem; }
#panel > .page > .page__head:first-child { display: none; }     /* "My forms" inside Forms: no second heading */

@media (max-width: 640px) {
    .filters { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
    .filters .check { grid-column: 1 / -1; }
    .filters .field { flex: none; }
    .toolbar { justify-content: space-between; }
    .page__head h1 { font-size: 1.5rem; margin: 0; }

    .table:not(.timesheet), .table:not(.timesheet) > tbody, .table:not(.timesheet) > tbody > tr, .table:not(.timesheet) > tbody > tr > td { display: block; width: 100%; }
    .table:not(.timesheet) > thead { display: none; }
    .table:not(.timesheet) > tbody > tr { padding: .55rem 0; border-bottom: 1px solid var(--line); }
    .table:not(.timesheet) > tbody > tr:last-child { border-bottom: 0; }
    .table:not(.timesheet) > tbody > tr > td { border: 0; padding: .2rem .9rem; text-align: left; overflow-wrap: anywhere; }
    .table:not(.timesheet) > tbody > tr > td[data-label] { display: flow-root; padding-left: 7.4rem; }
    .table:not(.timesheet) > tbody > tr > td[data-label]::before {
        content: attr(data-label); float: left; width: 6.2rem; margin: .15rem 0 0 -6.5rem;
        font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted);
    }
    .table:not(.timesheet) > tbody > tr > td:first-child { font-weight: 600; }
    .table:not(.timesheet) > tbody > tr > td:empty { display: none; }
    .table:not(.timesheet) > tbody > tr > th { display: block; padding: .5rem .9rem 0; border: 0; }
}
@media (max-width: 640px) {
    /* weekly grid stays a grid: swipe the days, the name column stays put */
    .timesheet > thead > tr > th:first-child, .timesheet > tbody > tr > td:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: 1px 0 0 var(--line); min-width: 8.5rem; }
    .timesheet > thead > tr > th:first-child { background: #fafbfc; }
}

/* ---- forms: more question types ---- */
.big-choice__btn--opt { color: var(--navy); }
.big-choice__btn--opt.is-on { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.big-choice__btn--amber { border-color: #f0c987; color: #a06a00; }
.big-choice__btn--amber.is-on { background: #d69e2e; color: #fff; border-color: #d69e2e; }
.wizard__section { margin: .2rem 0 0; font-size: .8rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--green-dark); }
.wizard__info { font-size: 1.05rem; line-height: 1.55; white-space: normal; }
textarea.wizard__input { min-height: 140px; font-size: 1.15rem; line-height: 1.4; }
.tile-grid--words .tile { padding: .8rem .5rem; min-height: 64px; align-content: center; }
.photo-strip { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.photo-strip__item { position: relative; }
.photo-strip__item img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); display: block; }
.photo-strip__del { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--bad); color: #fff; font-weight: 800; cursor: pointer; }
.photo-strip__add { min-height: 84px; }
.form-group__title { margin: 1rem 0 .4rem; font-size: 1rem; }
.form-group { display: grid; gap: .5rem; }
.form-group__btn { justify-content: flex-start; text-align: left; min-height: 52px; }
.record__media { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.record__media img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.record__media img.record__sigimg { width: 220px; height: auto; object-fit: contain; background: #fff; }
.record__section td { background: #f4f6f9; font-weight: 800; text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }
.item-row--wide { grid-template-columns: 1fr 190px auto auto; padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.item-row__extra, .item-row__note { grid-column: 1 / -1; }

/* ---- privacy notice ---- */
.notice { max-width: 680px; margin: 0 auto; padding: 1.2rem 1rem 2.5rem; display: grid; gap: .9rem; background: var(--bg); }
.notice__logo { width: 72px; justify-self: center; }
.notice h1 { margin: 0; text-align: center; font-size: 1.5rem; }
.notice__lead { margin: 0; text-align: center; color: var(--muted); }
.notice__body { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .4rem 1.1rem 1rem; line-height: 1.55; }
.notice__section h2 { font-size: 1.05rem; margin: 1rem 0 .3rem; color: var(--navy); }
.notice__section p { margin: .3rem 0; }
.notice__section ul { margin: .3rem 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.notice__confirm { background: var(--card); border: 2px solid var(--green-dark); border-radius: 12px; padding: .9rem; font-weight: 600; align-items: flex-start; font-size: 1rem; }
.notice__confirm input { width: 26px; height: 26px; flex: none; margin-top: .1rem; }
body[data-role="operative"] .notice__section { font-size: 1.05rem; }
.topbar__account { display: inline-flex; align-items: center; gap: .35rem; color: #fff; text-decoration: none; font-size: 1.05rem; padding: .3rem .4rem; border-radius: 8px; }
.topbar__account:hover { background: rgba(255,255,255,.1); }
.notice__section ol { margin: .3rem 0; padding-left: 1.3rem; display: grid; gap: .35rem; }
.big-choice__btn.is-wrong { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); text-decoration: line-through; }
.reg-choices { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; display: grid; gap: .45rem; margin: 0; }
.reg-choices legend { font-size: .85rem; font-weight: 600; color: var(--muted); padding: 0 .3rem; }
.reg-choices .check { font-size: 1rem; }
.reg-choices input { width: 22px; height: 22px; }
.person-name { font-weight: 700; text-decoration: none; color: var(--navy); text-align: left; }
.person-forms { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; background: #fafbfc; }
.person-forms__title { margin: 0 0 .4rem; font-size: 1rem; }
.person-forms__list li { padding: .25rem 0; }

/* ---- lists, chips, segmented choice ---- */
.list { list-style: none; margin: .4rem 0 0; padding: 0; }
.list__row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list__row:last-child { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
button.chip { border: 1px solid var(--line); background: var(--card); cursor: pointer; padding: .3rem .75rem; font-size: .85rem; }
button.chip.is-active { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.seg { display: flex; gap: .5rem; margin: .8rem 0; flex-wrap: wrap; }
.seg label { flex: 1 1 140px; border: 2px solid var(--line); border-radius: 10px; padding: .7rem; font-weight: 600; display: flex; gap: .5rem; align-items: center; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--navy); background: #f1f2f4; }
.btn--big { width: 100%; padding: 1rem; font-size: 1.15rem; }
.input { width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 8px; margin: .6rem 0; background: #fff; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f7f8fa; }

/* ---- roll call ---- */
.rollcall-progress { height: 10px; border-radius: 99px; background: var(--bad-bg); overflow: hidden; margin: .4rem 0 .2rem; }
.rollcall-progress span { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.rollcall-list { list-style: none; margin: 0; padding: 0; }
.rollcall-item { display: flex; align-items: center; gap: .8rem; padding: .7rem .3rem; border-bottom: 1px solid var(--line); }
.rollcall-item:last-child { border-bottom: 0; }
.rollcall-item__who { flex: 1; min-width: 0; }
.rollcall-item__act { display: flex; gap: .4rem; align-items: center; }
.rollcall-item__act .btn--primary { min-width: 92px; padding: .8rem 1rem; background: var(--ok); }
.rollcall-item.is-missing { background: linear-gradient(90deg, var(--bad-bg) 0 4px, transparent 4px); }
.rollcall-item.is-safe, .rollcall-item.is-offsite { opacity: .75; }

/* ---- holiday calendar ---- */
.leave-cal { border-collapse: collapse; font-size: .8rem; }
.leave-cal th, .leave-cal td { border: 1px solid var(--line); min-width: 26px; height: 28px; text-align: center; padding: 0 .2rem; }
.leave-cal tbody th { text-align: left; white-space: nowrap; padding: 0 .6rem; font-weight: 600; }
.leave-cal .is-weekend { background: #f1f2f4; }
.leave-cal .is-bh, .legend .is-bh { background: repeating-linear-gradient(45deg, #eceef1 0 4px, #fff 4px 8px); }
.is-holiday { background: #2f855a !important; }
.is-sick { background: #c53030 !important; }
.is-unpaid, .is-compassionate, .is-training, .is-other { background: #2b6cb0 !important; }
.is-pending { opacity: .45; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .6rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; border: 1px solid var(--line); }
.topbar__brand img { max-height: 32px; width: auto; }

.card > h2 + .field, .card > h2 + .field-row, .card > h2 + p { margin-top: .6rem; }

/* ---- roll call ---- */
.banner { padding: .7rem .9rem; border-radius: 10px; background: var(--info-bg); color: var(--info); margin: .5rem 0; font-weight: 600; }
.banner--warn { background: var(--warn-bg); color: var(--warn); }
.banner--ok { background: var(--ok-bg, #e5f6ec); color: var(--ok); }
.crew-row__actions { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.banner--bad { background: var(--bad-bg); color: var(--bad); }
a.banner { display: block; text-decoration: none; }
.rollcall-bar { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; margin: .5rem 0; }
.rollcall-bar .input { flex: 1; min-width: 200px; }
.rollcall-item__v { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #eceff3; color: var(--muted); font-weight: 700; flex: none; }
.rollcall-item .badge { margin: .15rem .15rem 0 0; }
.rc-alert { position: fixed; inset: 0; z-index: 1000; background: #b3001b; color: #fff; display: grid; place-items: center; padding: 24px; text-align: center; }
.rc-alert__box { max-width: 420px; display: grid; gap: 14px; }
.rc-alert h2 { font-size: 2rem; margin: 0; letter-spacing: .02em; }
.rc-alert p { margin: 0; font-size: 1.1rem; }
.rc-alert select { font: inherit; font-size: 1.1rem; padding: .7rem; border-radius: 10px; border: 0; }
.rc-alert .btn { background: #fff; color: #b3001b; font-size: 1.25rem; padding: 1.1rem; border: 0; font-weight: 800; }
.rc-alert__small { font-size: .9rem !important; opacity: .9; }

/* ---- rota ---- */
.rota-bar { flex-wrap: wrap; align-items: center; gap: .5rem; margin: .8rem 0; }
.rota-wrap { overflow-x: auto; }
table.rota { border-collapse: collapse; width: 100%; min-width: 860px; }
table.rota th, table.rota td { border: 1px solid var(--line); padding: .35rem; vertical-align: top; text-align: left; font-size: .88rem; }
table.rota thead th { background: #f4f5f7; position: sticky; top: 0; }
table.rota tbody th { min-width: 150px; background: #fafafa; }
.rota-cell { min-width: 96px; height: 54px; }
.rota-cell.is-edit { cursor: pointer; }
.rota-cell.is-edit:hover { background: #f6f8fb; }
.rota-shift { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-radius: 6px; padding: .25rem .4rem; margin-bottom: .2rem; font: inherit; font-size: .8rem; cursor: pointer; color: inherit; }
.rota-shift b { display: block; } .rota-shift span { color: var(--muted); }
.rota-shift:disabled { cursor: default; }
.rota-leave { display: block; background: var(--info-bg); color: var(--info); border-radius: 6px; padding: .2rem .4rem; font-size: .78rem; margin-bottom: .2rem; }
.rota-add { color: var(--line-strong, #bbb); font-size: 1.2rem; display: grid; place-items: center; height: 100%; }
.rota-days { display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.rota-mine { list-style: none; padding: 0; display: grid; gap: .6rem; }
.rota-mine li { display: grid; gap: .2rem; }
.rota-mine__time { font-size: 1.3rem; font-weight: 700; }

/* ---- reports ---- */
.report-bar { flex-wrap: wrap; align-items: center; gap: .5rem; margin: .8rem 0; }
.report-bar input[type=date] { font: inherit; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 8px; }
.audit-detail { max-width: 520px; word-break: break-word; }
.input--num { width: 4.5em; font: inherit; padding: .2rem .3rem; border: 1px solid var(--line); border-radius: 6px; margin: 0 .2rem; }

/* ---- time requests ---- */
.tr-list { list-style: none; padding: 0; margin: 0; }
.tr-list li { display: flex; justify-content: space-between; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.tr-list li:last-child { border-bottom: 0; }
.tr-act { display: flex; gap: .4rem; align-items: flex-start; }
.stat--btn { font: inherit; text-align: left; cursor: pointer; border: 1px solid transparent; }
.stat--btn.is-on { border-color: var(--navy); }

/* ---- two-step login ---- */
.tf-qr { width: 200px; max-width: 70vw; margin: .5rem auto; background: #fff; padding: 4px; }
.tf-qr svg { width: 100%; height: auto; display: block; }
.tf-key { font-size: .95rem; letter-spacing: .04em; word-break: break-all; }
.tf-codes { background: #f4f5f7; padding: .8rem; border-radius: 8px; font-size: 1.05rem; line-height: 1.6; }

/* ---- messages from the office ---- */
.notice-pop { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 12px; display: flex; justify-content: center; }
.notice-pop__box { background: #fff; border: 2px solid var(--navy); border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); padding: 16px; max-width: 520px; width: 100%; display: grid; gap: 8px; }
.notice-pop__box h2 { margin: 0; font-size: 1.25rem; }
.notice-pop__from { font-size: .8rem; color: var(--muted); margin: 0; font-weight: 600; }
.notice-pop--urgent { inset: 0; background: rgba(15,18,22,.7); align-items: center; }
.notice-pop--urgent .notice-pop__box { border-color: var(--bad); }
.notice-pop--urgent .notice-pop__from { color: var(--bad); }

/* ---- phone alerts prompt ---- */
.alerts-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .6rem 1rem; background: var(--info-bg); color: var(--info); font-size: .92rem; }
.alerts-bar span { flex: 1 1 260px; }

/* ---- branding preview (Settings > Your branding) ---- */
.brand-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 360px; margin: .25rem 0 1rem; }
.brand-preview__bar { display: flex; align-items: center; gap: .55rem; padding: .6rem .9rem; background: var(--pv-main); color: var(--pv-on-main); }
.brand-preview__logo img { height: 28px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.brand-preview__name { color: var(--pv-name); font-weight: 800; letter-spacing: .03em; }
.brand-preview__body { display: flex; gap: .6rem; padding: .9rem; background: var(--bg); }
.brand-preview__go { flex: 1; text-align: center; font-weight: 800; padding: .7rem; border-radius: 10px; background: var(--pv-hi); color: var(--pv-on-hi); }
.brand-preview__btn { padding: .7rem 1rem; border-radius: 10px; background: var(--pv-main); color: var(--pv-on-main); font-weight: 700; }

/* Company logos are often made for a dark background, so show them on the main colour */
.login__logo--custom { background: var(--navy); padding: 14px 20px; border-radius: 14px; max-height: 100px; max-width: 260px; }
/* On phones the logo already carries the name */
@media (max-width: 480px) { .topbar__app--with-logo { display: none; } }
.settings-form input[type="color"] { height: 46px; min-width: 72px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; }

/* Quick date ranges in Reports: show which one is in use */
.seg-mini .btn.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
