/* SafeRoad Plus Inventory: same design system and colour code as the SLRSA ICT Asset Tracker
   (UI Guide v1.0, Nov 2026): blue header, gold accent, Inter typeface, white cards on a grey-blue page. */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --blue: #2e6da3; --blue-2: #3d7bb5; --blue-dark: #245a88; --blue-soft: #e8f1fa; --blue-line: #bfdbfe;
  --gold: #c9a227;
  --page: #f1f4f9; --card: #ffffff; --line: #e3e8ef; --line-2: #eef2f6;
  --ink: #0f172a; --text: #1e293b; --muted: #64748b; --faint: #94a3b8;
  --green: #16a34a; --green-dark: #166534; --red: #dc2626; --indigo: #6366f1; --violet: #8b5cf6; --orange: #f59e0b;
  --amber-row: #fffbeb; --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 6px rgba(15, 23, 42, .04);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 14px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
a { color: var(--blue); }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -.01em; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 50; }
.skip-link:focus { left: 1rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .86em; color: #475569; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* ---------- header bar ---------- */
.topbar { background: var(--blue); color: #fff; }
.topbar-inner { max-width: 1440px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; gap: 22px; }
.logo-card { display: block; border-radius: 10px; text-decoration: none; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
/* The SafeRoad Plus SL Ltd logo on its own navy tile (26 Nov 2026). */
.logo-mark { display: inline-block; background: #031d34; border-radius: 10px; padding: 5px 12px 6px; text-align: center; line-height: 1; }
.logo-img { display: block; height: 46px; width: auto; }
.logo-mark .logo-sub { color: #8fc8f7; margin-top: 3px; }
.signin-brand .logo-img { height: 58px; }
.logo-word { display: block; color: var(--blue); font-weight: 800; font-size: 17px; letter-spacing: -.02em; line-height: 1.1; }
.logo-bar { display: block; height: 2px; width: 58px; margin: 3px auto 2px; background: var(--gold); border-radius: 2px; }
.logo-sub { display: block; color: #475569; font-size: 7.5px; font-weight: 700; letter-spacing: .16em; }
.app-title { flex: 1; min-width: 0; }
.app-title h1 { color: #fff; font-size: 18px; font-weight: 700; }
.app-title p { margin: 1px 0 0; color: rgba(255,255,255,.82); font-size: 12px; }
.test-chip { display: inline-block; margin-left: 8px; vertical-align: 2px; background: #fde68a; color: #78350f; border-radius: 999px; padding: 1px 8px; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.org { text-align: right; line-height: 1.25; }
.org small { display: block; color: rgba(255,255,255,.78); font-size: 11px; }
.org b { font-weight: 600; font-size: 13.5px; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 5px 7px 5px 12px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.user-pill .role { background: rgba(255,255,255,.22); border-radius: 999px; padding: 1px 8px; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.topbar form { margin: 0; }
.acting label { display: flex; align-items: center; gap: 8px; margin: 0; color: rgba(255,255,255,.85); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.acting select { width: auto; max-width: 270px; padding: 6px 30px 6px 12px; border-radius: 999px; border: 2px solid var(--gold); font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.btn-logout { background: var(--red); color: #fff; border: 0; border-radius: 6px; padding: 7px 14px; font: 600 13px "Inter", "Segoe UI", sans-serif; cursor: pointer; }
.btn-logout:hover { background: #b91c1c; }

/* ---------- tabs ---------- */
.tabs { background: #fff; border-bottom: 1px solid var(--line); }
.tabs-inner { max-width: 1440px; margin: 0 auto; padding: 0 32px; display: flex; flex-wrap: wrap; gap: 0 2px; }
.tabs a { display: inline-block; padding: 13px 12px 11px; color: #475569; text-decoration: none; font-weight: 600; font-size: 13.5px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--blue); }
.tabs a.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- page ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 24px 32px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h2 { font-size: 22px; }
.page-head p { margin: 3px 0 0; color: var(--muted); }
.chip-scope { border: 1px solid #fecaca; background: #fff1f2; color: #b91c1c; border-radius: 999px; padding: 3px 12px; font-size: 11px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.banner { border-radius: 10px; padding: 11px 16px; margin-bottom: 16px; font-size: 13.5px; }
.banner-amber { background: #fef9e7; border: 1px solid #fde68a; color: #78350f; }
.banner-green { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.banner-red { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.banner-blue { background: var(--blue-soft); border: 1px solid var(--blue-line); color: #1e3a5f; }
.banner ul { margin: .35rem 0; padding-left: 1.2rem; }

/* ---------- stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.stat .ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 21px; flex: none; }
.stat strong { display: block; font-size: 26px; line-height: 1.05; color: var(--ink); font-weight: 700; }
.stat span { display: block; color: var(--muted); font-size: 12.5px; }
.stat em { display: block; color: var(--blue); font-style: normal; font-size: 11.5px; font-weight: 600; }
.t-blue { background: #eff6ff; } .t-amber { background: #fef3c7; } .t-red { background: #fee2e2; } .t-violet { background: #ede9fe; }
.t-green { background: #dcfce7; } .t-sky { background: #e0f2fe; } .t-slate { background: #f1f5f9; }

/* ---------- toolbar: search, filters, buttons ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.toolbar form { display: contents; }
.search { flex: 1 1 320px; position: relative; }
.search input { padding-left: 36px; }
.search::before { content: "🔍"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .7; }
.toolbar select, .toolbar input[type=date] { flex: 0 1 200px; }
.toolbar .label { color: var(--muted); font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #d7dee8; border-radius: 8px; background: #fff; padding: 9px 12px; font: 14px "Inter", "Segoe UI", system-ui, sans-serif; color: var(--text); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46,109,163,.15); }
.exports { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; }
.exports .label { color: var(--muted); font-weight: 600; font-size: 13px; margin-right: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 7px; padding: 8px 14px; font: 600 13px "Inter", "Segoe UI", sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; color: #fff; line-height: 1.2; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-primary { background: var(--blue); } .btn-primary:hover { background: var(--blue-dark); }
.btn-green { background: var(--green); } .btn-green:hover { background: #15803d; }
.btn-excel { background: var(--green-dark); } .btn-excel:hover { background: #14532d; }
.btn-red { background: var(--red); } .btn-red:hover { background: #b91c1c; }
.btn-print { background: var(--indigo); } .btn-print:hover { background: #4f46e5; }
.btn-violet { background: var(--violet); } .btn-violet:hover { background: #7c3aed; }
.btn-orange { background: var(--orange); } .btn-orange:hover { background: #d97706; }
.btn-light { background: #f1f5f9; color: #334155; border: 1px solid var(--line); } .btn-light:hover { background: #e2e8f0; }
.btn-ghost { background: #fff; color: #334155; border: 1px solid #d7dee8; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions form { display: inline; margin: 0; }

/* ---------- table card ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 16px; }
.card-head span { color: var(--muted); font-size: 12.5px; }
.card-body { padding: 18px 22px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; background: #f8fafc; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr.attn td { background: var(--amber-row); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td b { color: var(--ink); font-weight: 600; }
td .sub { display: block; color: var(--muted); font-size: 11.5px; }
.route { white-space: nowrap; } .route b { font-weight: 700; }
.empty { padding: 26px 22px; color: var(--muted); text-align: center; }

/* ---------- pills ---------- */
.pill { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.p-amber { background: #fef3c7; color: #92400e; } .p-green { background: #dcfce7; color: #166534; } .p-blue { background: #dbeafe; color: #1e40af; }
.p-violet { background: #ede9fe; color: #6d28d9; } .p-red { background: #fee2e2; color: #991b1b; } .p-grey { background: #f1f5f9; color: #475569; }
.p-orange { background: #ffedd5; color: #9a3412; }
.code-pill { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.role-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700; }
.r-admin { background: #fee2e2; color: #b91c1c; } .r-hq { background: #dbeafe; color: #1e40af; } .r-waterloo { background: #fef3c7; color: #92400e; }
.r-station { background: #ede9fe; color: #6d28d9; } .r-hqwh { background: #dcfce7; color: #166534; }

/* ---------- dashboard ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.chart-card { padding: 18px 22px 16px; }
.chart-card h3 { font-size: 15.5px; } .chart-card p.sub { margin: 2px 0 12px; color: var(--muted); font-size: 12.5px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text { font: 11.5px "Inter", "Segoe UI", sans-serif; fill: #475569; }
svg.chart .grid { stroke: #e9eef4; }
svg.chart text.on-bar { fill: #fff; font-weight: 700; }
.chart-card h3.small { font-size: 13.5px; margin: 18px 0 10px; }
.chart-card .legend { margin-top: 8px; }
.share { display: flex; height: 28px; border-radius: 6px; overflow: hidden; margin: 6px 0 8px; }
.share div { color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: #475569; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }
.pipeline div { border: 1px solid var(--line); border-radius: 10px; text-align: center; padding: 10px 4px; }
.pipeline strong { display: block; font-size: 22px; color: var(--ink); }
.pipeline span { font-size: 11.5px; color: var(--muted); }
.redbars div.row { display: grid; grid-template-columns: 170px 1fr 30px; gap: 10px; align-items: center; margin: 5px 0; font-size: 12.5px; }
.redbars .track { background: #f1f5f9; border-radius: 4px; height: 9px; overflow: hidden; }
.redbars .fill { background: var(--red); height: 100%; border-radius: 4px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.todo li:last-child { border-bottom: 0; }

/* ---------- pop-up forms (open with #id, no script needed) ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, .55); align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal:target { display: flex; }
.modal-card { background: #fff; border-radius: 14px; width: 100%; max-width: 620px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-card.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #fafbfd; border-radius: 14px 14px 0 0; }
.modal-head h3 { font-size: 17px; } .modal-head h3.violet { color: #6d28d9; } .modal-head h3.green { color: #166534; } .modal-head h3.red { color: #b91c1c; }
.modal-close { text-decoration: none; color: #475569; background: #f1f5f9; border-radius: 6px; width: 30px; height: 30px; display: grid; place-items: center; font-size: 18px; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #64748b; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 16px 0 10px; }
.section-label:first-child { margin-top: 0; }
.field { display: block; margin-bottom: 12px; font-weight: 600; font-size: 12.5px; color: #334155; }
.field input, .field select, .field textarea { margin-top: 5px; font-weight: 400; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fields-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.fields-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 10px; }
.info-box { background: #eff6ff; border: 1px solid var(--blue-line); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 13px; }
.info-box .k { color: #64748b; display: inline-block; min-width: 130px; }
.info-box h4 { margin: 0 0 6px; font-size: 11px; letter-spacing: .07em; color: #1e40af; text-transform: uppercase; }
td.numbers { white-space: nowrap; line-height: 1.55; }
td.numbers .k { color: #64748b; display: inline-block; min-width: 44px; font-size: 11px; }
.ack { display: flex; gap: 10px; align-items: flex-start; background: #f5f3ff; border: 1px solid #ddd6fe; color: #6d28d9; border-radius: 10px; padding: 11px 14px; font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.ack input { width: auto; margin-top: 2px; }
.line-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 0; margin-bottom: 10px; }
.line-group legend { font-weight: 700; font-size: 13px; padding: 0 6px; color: var(--ink); }
.mini-table th { font-size: 10px; padding: 7px 10px; } .mini-table td { padding: 7px 10px; font-size: 13px; }

/* ---------- sign-in ---------- */
body.signin { min-height: 100vh; background: linear-gradient(135deg, #1d4e7f 0%, #2e6da3 50%, #3b7fc2 100%); position: relative; overflow-x: hidden; display: flex; flex-direction: column; }
body.signin::before, body.signin::after { content: ""; position: fixed; border-radius: 50%; background: rgba(255,255,255,.07); }
body.signin::before { width: 460px; height: 460px; right: -120px; top: -110px; }
body.signin::after { width: 360px; height: 360px; left: -120px; bottom: -150px; }
.signin-wrap { flex: 1; display: grid; place-items: center; padding: 40px 16px; position: relative; z-index: 1; }
.signin-card { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.25); overflow: hidden; }
.signin-brand { text-align: center; padding: 26px 26px 18px; border-bottom: 1px solid var(--line); }
.signin-brand .logo-word { font-size: 22px; }
.signin-brand .org-caps { margin: 14px 0 2px; font-size: 9.5px; letter-spacing: .16em; font-weight: 700; color: #475569; text-transform: uppercase; }
.signin-brand h1 { color: var(--blue); font-size: 20px; }
.signin-brand p { margin: 2px 0 10px; color: var(--muted); font-size: 12px; }
.signin-brand .gold { display: block; width: 36px; height: 2px; background: var(--gold); margin: 0 auto; }
.signin-form { padding: 20px 26px 24px; }
.with-icon { position: relative; } .with-icon input { padding-left: 34px; background: #f8fafc; }
.with-icon span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 13px; }
.signin-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin: -4px 0 14px; }
.signin-meta label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.signin-meta input { width: auto; }
.signin-form .btn { width: 100%; padding: 11px; font-size: 14px; }
.signin-note { margin-top: 14px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 9px 12px; font-size: 11.5px; }
.live-chip { display: inline-block; margin-left: 10px; vertical-align: 3px; background: #16a34a; color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; }
.signin-ok { margin-bottom: 14px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 8px; padding: 9px 12px; font-size: 12.5px; }
.signin-error { margin-bottom: 14px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; padding: 9px 12px; font-size: 12.5px; }
.signin-foot { text-align: center; color: rgba(255,255,255,.8); font-size: 11.5px; padding: 0 16px 18px; position: relative; z-index: 1; }

.footer { max-width: 1440px; margin: 0 auto; padding: 0 32px 28px; color: var(--faint); font-size: 12px; }

@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; padding: 12px 16px; }
  .org { display: none; }
  .page, .tabs-inner { padding-left: 16px; padding-right: 16px; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .fields-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat .ico { width: 36px; height: 36px; font-size: 17px; }
  .stat strong { font-size: 21px; }
}
@media print {
  .topbar, .tabs, .toolbar, .exports, .actions, .modal, .no-print, .banner, .footer { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; }
  .stat { box-shadow: none; }
  th { background: #fff; }
}

/* Customer List upload: choose the file(s), choose the station, Upload, on one line (26 Nov 2026). */
.upload-row { display: grid; grid-template-columns: 1.6fr 1.2fr auto; gap: 0 14px; align-items: end; }
.btn-upload { padding: 11px 26px; font-size: 15px; }
@media (max-width: 760px) { .upload-row { grid-template-columns: 1fr; } }

/* ===== Customer handover receipt (27 Nov 2026): two A5 copies on one A4 sheet, customer copy above, office copy below ===== */
body.receipt-page { background: #e5e7eb; margin: 0; padding: 0 0 30px; color: #0f172a; }
.receipt-toolbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 20px;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.receipt-note { font-weight: 600; font-size: 13px; color: #334155; }
.receipt-note.ok { color: #15803d; }
.btn-print { padding: 10px 22px; font-size: 15px; }
.receipt-tip { font-size: 12px; color: var(--muted); }
.sheet { width: 210mm; margin: 22px auto 0; background: #fff; box-shadow: 0 8px 30px rgba(15,23,42,.18); }
.r-half { height: 148.5mm; box-sizing: border-box; padding: 9mm 12mm 7mm; display: flex; flex-direction: column; gap: 3.2mm; font-size: 9.5pt; overflow: hidden; }
.r-half + .r-half { border-top: 1px dashed #64748b; }
.r-head { display: flex; align-items: center; gap: 5mm; padding-bottom: 2.5mm; border-bottom: 2px solid #1d9bf0; }
.r-logo { height: 15mm; width: auto; display: block; }
.r-title { flex: 1; }
.r-title h1 { margin: 0; font-size: 15pt; color: #031d34; letter-spacing: -.01em; }
.r-title p { margin: 1mm 0 0; font-size: 8pt; color: #475569; }
.r-copy { font-size: 8.5pt; font-weight: 800; letter-spacing: .12em; color: #031d34; border: 1.5px solid #031d34; border-radius: 4px; padding: 1.5mm 3mm; white-space: nowrap; }
.r-half[data-copy="office"] .r-copy { color: #475569; border-color: #94a3b8; }
.r-meta { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; gap: 3mm; }
.r-meta div, .r-box { border: 1px solid #cbd5e1; border-radius: 3px; }
.r-meta div { padding: 1.6mm 2.5mm; }
.r-meta span { display: block; font-size: 7pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.r-meta b { font-size: 10pt; }
.r-meta b.mono, .r-box dd.mono { color: #0f172a; font-size: 9.5pt; }
.r-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; }
.r-box { padding: 2mm 3mm; }
.r-box h2 { margin: 0 0 1.2mm; font-size: 8pt; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #1d6fb8; }
.r-box dl { display: grid; grid-template-columns: 22mm 1fr; gap: .9mm 2mm; margin: 0; }
.r-box dt { color: #64748b; }
.r-box dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.r-items { width: 100%; border-collapse: collapse; }
.r-items th { text-align: left; font-size: 7.5pt; letter-spacing: .06em; text-transform: uppercase; color: #475569; background: #f1f5f9; padding: 1.5mm 2.5mm; border: 1px solid #cbd5e1; }
.r-items td { padding: 2mm 2.5mm; border: 1px solid #cbd5e1; font-weight: 600; }
.r-items .num { text-align: right; width: 32mm; }
.r-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 4mm; font-size: 10pt; }
.r-total b { font-size: 13pt; color: #031d34; border-bottom: 3px double #031d34; padding: 0 1mm .5mm; }
.r-small { margin: 0; font-size: 7.5pt; color: #64748b; }
.r-sign { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; font-size: 8.5pt; color: #334155; }
.r-line { display: block; height: 9mm; border-bottom: 1px solid #0f172a; margin-bottom: 1.2mm; }
.r-foot { font-size: 7pt; color: #64748b; border-top: 1px solid #e2e8f0; padding-top: 1.5mm; }
@media print {
  @page { size: A4 portrait; margin: 0; }
  body.receipt-page { background: #fff; padding: 0; }
  .sheet { margin: 0; box-shadow: none; width: 210mm; }
  .r-items th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Receipt details on the handover form */
.receipt-h { margin: 14px 0 6px; font-size: 13px; color: var(--blue); }
.field .hint { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
/* Receipt security QR code (27 Nov 2026) */
.r-grid.with-qr { grid-template-columns: 1fr 1fr 30mm; }
.r-qrbox { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6mm; border: 1px solid #cbd5e1; border-radius: 3px; padding: 1.5mm; text-align: center; }
.r-qr { width: 24mm; height: 24mm; display: block; }
.r-qrbox span { font-size: 6.5pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.r-qrbox b { font-size: 7.5pt; color: #0f172a; letter-spacing: .02em; }
/* Handover stopwatch (target under 2:00, ideally 1:30) */
.stopwatch { margin-left: 10px; font-size: 12px; font-weight: 700; color: #15803d; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
.stopwatch.slow { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.stopwatch.late { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }

/* Payment verification (27 Nov 2026): statement upload on one line, the period, notes under tables. */
.upload-row-4 { grid-template-columns: 1.5fr 1fr 1fr auto; }
@media (max-width: 760px) { .upload-row-4 { grid-template-columns: 1fr; } }
.verify-period { margin: 0 0 12px; color: #334155; font-size: 13.5px; }
.card-note { padding: 10px 18px 14px; margin: 0; }
.card-exports { padding: 10px 18px 0; }

/* User Management (28 Nov 2026): create and edit staff accounts. */
.user-form-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr 1fr; gap: 0 14px; align-items: start; }
.user-form-grid .field input, .user-form-grid .field select { width: 100%; }
.user-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.user-actions .card { margin-bottom: 0; }
.user-actions .field input, .user-actions .field select { width: 100%; }
.user-actions + .card { margin-top: 18px; }
.user-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.user-facts .sub { display: block; }
.user-facts .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; margin-bottom: 5px; }
.crumbs { margin: 0 0 10px; font-size: 13px; }
.btn-amber { background: #d97706; color: #fff; border: 0; } .btn-amber:hover { background: #b45309; }
.signin-alt { margin-top: 12px; text-align: center; }
@media (max-width: 900px) { .user-form-grid { grid-template-columns: 1fr; } }
/* User Management: one-click actions in each row, and the one-time sign-in details */
.row-actions { white-space: nowrap; }
.row-actions form { display: inline-block; margin: 0 4px 4px 0; }
.reveal { border: 2px solid #f59e0b; background: #fffbeb; }
.reveal-title { font-size: 15px; margin: 0 0 12px; }
.reveal-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.reveal-k { width: 170px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #92400e; }
.reveal-v { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: .04em; color: #0f172a; background: #fff; border: 1px solid #fcd34d; border-radius: 8px; padding: 6px 14px; }
.btn-password { color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 6px; padding: 6px 10px; white-space: nowrap; }
.btn-password:hover { background: rgba(255,255,255,.24); }
/* A small form inside a banner (the stock-arrival switch on Receiving) */
.inline-form { display: inline-block; margin-left: 8px; }
