/* Option A: clean and light. Each company sets --accent and --on-accent on <body>. */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --border: #E3E6EB; --ink: #18202B; --muted: #5B6675;
  --accent: #0F766E; --on-accent: #FFFFFF;
  --ok-bg: #E7F6EE; --ok-ink: #14532D; --err-bg: #FDECEC; --err-ink: #8A1C1C; --warn-bg: #FFF4DB; --warn-ink: #7A4B00;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- frame ---- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; min-width: 0; }
.brand img { height: 36px; width: auto; max-width: 140px; object-fit: contain; border-radius: 6px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: .9rem; display: none; }
.linkbtn { background: none; border: 0; padding: 10px 6px; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }

.nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.nav-in { max-width: 1200px; margin: 0 auto; padding: 0 12px; display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nav a { padding: 12px 12px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; min-height: 44px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.page { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }
.narrow { max-width: 440px; margin: 0 auto; }
.center-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }

/* ---- cards, forms, buttons ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font-size: 1.9rem; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .9rem; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=file], select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #C9CFD8; border-radius: 10px; font: inherit; color: var(--ink); background: #fff;
}
input[type=color] { width: 64px; height: 46px; padding: 3px; border: 1px solid #C9CFD8; border-radius: 10px; background: #fff; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); border-color: #C9CFD8; }
.btn.danger { background: #B42318; color: #fff; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-weight: 500; }
.alert.ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert.err { background: var(--err-bg); color: var(--err-ink); }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.secret { font: 700 1.25rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: #F1F3F6; border: 1px dashed #AEB6C2; border-radius: 10px; padding: 12px 14px; word-break: break-all; user-select: all; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 560px; }
th, td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
thead th { border-top: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--ok-bg); color: var(--ok-ink); }
.pill.off { background: var(--err-bg); color: var(--err-ink); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(0,0,0,.15); }
.logo-preview { max-height: 64px; max-width: 220px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: #fff; margin-bottom: 8px; display: block; }
.head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }

@media (min-width: 720px) {
  .who { display: block; }
  .page { padding: 28px 24px 56px; }
  .card { padding: 24px; }
}

/* ---- driver jobs (phone first) ---- */
.daybar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.daytitle { text-align: center; flex: 1; }
.daydate { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.daytitle h1 { font-size: 1.35rem; margin: 0; }
.daysub { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.chip { display: inline-block; background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); font-weight: 700; font-size: .75rem; padding: 1px 8px; border-radius: 999px; }
.daybtn { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--ink); flex: none; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.pick { margin-bottom: 12px; }
.pick summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; list-style: none; min-height: 44px; display: flex; align-items: center; }
.pick summary::-webkit-details-marker { display: none; }
.pick summary::after { content: " \25BE"; margin-left: 4px; }
.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin: 0 0 16px; }
.notice svg { flex: none; margin-top: 2px; }
.empty { text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed #C9CFD8; border-radius: var(--radius); padding: 32px 16px; }
.empty p { margin: 8px 0 0; }
.joblist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; align-items: start; }
.job { background: var(--surface); border: 1px solid #C9CFD8; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 10px rgba(16,24,40,.10); display: flex; flex-direction: column; }
.job::before { content: ""; height: 5px; background: #18202B; }
.job.in::before { background: #2563EB; }
.job.is-started { background: #FBFEFC; border-color: #BFE5CF; }
.job.is-started::before { background: #16A34A; }
.job-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 0; }
.job-time { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.job-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: #EEF0F3; color: #18202B; }
.tag.in { background: #DBEAFE; color: #1E3A8A; }
.tag.ok { background: #DCFCE7; color: #14532D; }
.details { margin: 12px 16px 0; padding: 0; border-top: 1px solid var(--border); }
.drow { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.drow dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.drow dd { margin: 0; overflow-wrap: anywhere; }
.drow dd.strong { font-weight: 700; font-size: 1.05rem; }
.k { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.hidden-note { color: #B42318; font-size: .9rem; font-weight: 600; }
.job-actions { padding: 14px 16px 0; }
.btn.block { width: 100%; min-height: 56px; font-size: 1.05rem; }
.btn.start { letter-spacing: .02em; }
.btn.receive { background: #18202B; color: #fff; letter-spacing: .02em; }
.step-hint { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }
.tag.grey { background: #E3E6EB; color: #3A4452; }
.btn.done { background: #E3E6EB; color: #5B6675; cursor: default; }
.job-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 16px 16px; }
.job-links .btn { min-height: 46px; }
.kv { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--border); }
.kv:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 560px) { .kv { flex-direction: row; gap: 16px; } .kv .k { flex: 0 0 170px; padding-top: 2px; } }

@media (min-width: 720px) { .daybar { max-width: 560px; margin-left: auto; margin-right: auto; } }

/* date / filter panel */
.pick-panel { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin: 4px 0 8px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.fld { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; position: relative; }
.fld label { margin: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.ctl { -webkit-appearance: none; appearance: none; width: 100%; height: 48px; min-height: 48px; padding: 0 44px 0 14px; border: 1px solid #C9CFD8; border-radius: 12px; font: inherit; color: var(--ink); background-color: #fff; background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; cursor: pointer; position: relative; }
.ctl.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6675' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.ctl.date { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6675' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.ctl.date::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ctl:hover { border-color: #9AA4B2; }
.pick-actions { display: flex; gap: 8px; flex: 1 1 100%; }
.pick-actions .btn { flex: 1; }
@media (min-width: 720px) { .pick-actions { flex: 0 0 auto; } .pick-actions .btn { flex: none; } }

/* holidays, job list, multi-date picker */
.chips { display: flex; gap: 8px; margin-bottom: 8px; }
.chipbtn { padding: 8px 16px; border-radius: 999px; border: 1px solid #C9CFD8; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; }
.chipbtn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hlist { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.hrow { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid #C9CFD8; border-radius: 14px; padding: 12px 14px; box-shadow: 0 2px 6px rgba(16,24,40,.08); flex-wrap: wrap; }
.hdate { width: 52px; text-align: center; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); border-radius: 12px; padding: 6px 0; flex: none; }
.hday { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.hmon { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.hinfo { flex: 1 1 160px; min-width: 0; }
.hact { display: flex; gap: 8px; align-items: flex-start; }
.hact .btn { min-height: 40px; padding: 0 14px; }
.del summary { list-style: none; cursor: pointer; }
.del summary::-webkit-details-marker { display: none; }
.del form { position: absolute; right: 14px; margin-top: 6px; background: #fff; border: 1px solid #C9CFD8; border-radius: 12px; padding: 12px; box-shadow: 0 8px 24px rgba(16,24,40,.18); z-index: 3; }
.del form p { margin: 0 0 8px; }
.hrow { position: relative; }
.formcard { max-width: 520px; }
.types { border: 0; padding: 0; margin: 0 0 16px; }
.types legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.opt { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 1rem; padding: 10px 12px; border: 1px solid #C9CFD8; border-radius: 12px; margin-bottom: 8px; min-height: 46px; cursor: pointer; }
.opt input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.md { border: 1px solid #C9CFD8; border-radius: 14px; padding: 12px; background: #fff; }
.md-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.md-title { font-weight: 700; }
.md-nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #C9CFD8; background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); }
.md-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.md-dow { text-align: center; font-size: .7rem; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 4px 0; }
.md-day { min-height: 44px; border: 1px solid transparent; border-radius: 10px; background: #F6F7F9; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.md-day.on { background: var(--accent); color: var(--on-accent); }
.md-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.md-chip { border: 0; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; min-height: 34px; }
[hidden] { display: none !important; }
.summary { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin: 12px 0; }
.table-wrap.stack table { min-width: 0; }
.stack td .tag { white-space: nowrap; }
@media (max-width: 719px) {
  .stack table, .stack thead, .stack tbody, .stack tr, .stack td { display: block; }
  .stack thead { position: absolute; left: -9999px; }
  .stack tr { border-top: 1px solid var(--border); padding: 10px 14px; }
  .stack tr:first-child { border-top: 0; }
  .stack td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
  .stack td::before { content: attr(data-label); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; align-self: center; }
}

/* holiday approval */
.tag.hs-pending { background: #FEF3C7; color: #92400E; }
.tag.hs-approved { background: #DCFCE7; color: #166534; }
.tag.hs-declined { background: #FEE2E2; color: #991B1B; }
.hsum { margin-bottom: 12px; }
.hrow.req { align-items: flex-start; }
h2 { font-size: 1.1rem; margin: 28px 0 10px; }

/* ===== holidays: modern look ===== */
.small { font-size: .85rem; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: .92rem; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); }
.avatar.lg { width: 48px; height: 48px; font-size: 1.15rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #EEF0F3; color: #3A4452; width: fit-content; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.st-pending { background: #FEF3C7; color: #92400E; }
.pill.st-approved { background: #DCFCE7; color: #166534; }
.pill.st-declined { background: #FEE2E2; color: #991B1B; }
.pill.st-none { background: #EEF0F3; color: #3A4452; }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 0 0 8px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(16,24,40,.05); border-top: 4px solid #C9CFD8; }
.tile.ok { border-top-color: #22A559; } .tile.warn { border-top-color: #F2A100; } .tile.accent { border-top-color: var(--accent); }
.tile.wide { grid-column: 1 / -1; }
.tile-k { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.tile-v { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.tile-v.small { font-size: 1.3rem; }
.tile-s { color: var(--muted); font-size: .8rem; }
.bar-wrap { grid-column: 1 / -1; }
.bar { height: 10px; border-radius: 999px; background: #E9ECF1; display: flex; overflow: hidden; }
.bar.small { height: 6px; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; }
.b-ok { background: #22A559; } .b-warn { background: #F2A100; }

.hgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.hcard { position: relative; display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid #C9CFD8; border-radius: 16px; padding: 12px 14px; box-shadow: 0 2px 8px rgba(16,24,40,.06); flex-wrap: wrap; }
.hcard.st-approved { border-left-color: #22A559; } .hcard.st-pending { border-left-color: #F2A100; } .hcard.st-declined { border-left-color: #D92D20; }
.hcard .hdate { width: 58px; display: flex; flex-direction: column; align-items: center; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); border-radius: 12px; padding: 6px 0; flex: none; }
.hcard .hmon { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.hcard .hday { font-size: 1.5rem; font-weight: 800; line-height: 1.05; }
.hcard .hwd { font-size: .68rem; opacity: .8; font-weight: 600; }
.hcard .hinfo { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hcard .htitle { font-size: 1rem; }
.hcard .hact { display: flex; gap: 8px; align-items: flex-start; }
.del form { right: 10px; }

.yearbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.yearlabel { font-weight: 700; background: var(--surface); border: 1px solid var(--border); padding: 9px 16px; border-radius: 999px; }
h2.sec { margin: 28px 0 12px; font-size: 1.05rem; letter-spacing: -.01em; }
.reqlist { display: grid; gap: 12px; }
.req { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: var(--surface); border: 1px solid #F3D48A; border-left: 5px solid #F2A100; border-radius: 16px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(16,24,40,.06); }
.req-main { flex: 1 1 220px; min-width: 0; }
.req-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.req-dates { color: var(--ink); font-size: .95rem; }
.req-act { display: flex; gap: 8px; flex: 1 1 100%; }
.req-act .btn { flex: 1; }
@media (min-width: 720px) { .req-act { flex: 0 0 auto; } .req-act .btn { flex: none; } }
.card.flat { box-shadow: none; }
.alloc { display: grid; gap: 4px; }
.alloc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.alloc-row:first-child { border-top: 0; }
.alloc-name { flex: 1; min-width: 0; }
.alloc-in { width: 92px; flex: none; }
.alloc-in label { font-size: .7rem; margin: 0 0 2px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* admin home notice */
.hnotice { display: block; background: #FFF8E6; border: 1px solid #F3D48A; border-radius: 16px; padding: 8px; margin-bottom: 20px; }
.hn-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #7A4B00; }
.hn-dot { width: 10px; height: 10px; border-radius: 50%; background: #F2A100; box-shadow: 0 0 0 4px rgba(242,161,0,.25); }
.hn-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 10px 12px; margin-top: 6px; text-decoration: none; color: var(--ink); min-height: 56px; }
.hn-row:hover { box-shadow: 0 2px 8px rgba(16,24,40,.12); }
.hn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hn-text small { color: var(--muted); font-size: .82rem; font-weight: 400; }
.hn-go { color: var(--accent); font-weight: 700; white-space: nowrap; }
.opt { transition: border-color .15s, background .15s; }
.opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); font-weight: 700; }
.formcard { border-radius: 16px; box-shadow: 0 2px 8px rgba(16,24,40,.06); }

/* logo shown at 250 x 54, no name beside it */
.brand img.brand-logo { width: 250px; height: 54px; max-width: 100%; object-fit: contain; object-position: left center; border-radius: 0; }
.logo-preview { width: 250px; height: 54px; max-width: 100%; max-height: none; object-fit: contain; }
@media (max-width: 520px) { .brand { flex: 1 1 auto; min-width: 0; } .brand img.brand-logo { width: auto; max-width: 100%; } }
.stack tr.received td { background: #E6E6E6; }
.stack tr.received { background: #E6E6E6; }
.stack tr.started td { background: #EAF7EE; }
.jl-status .btn { white-space: nowrap; }

/* booking management */
.fld.grow { flex: 1 1 220px; }
.pick-panel.jobid { margin-top: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; word-break: break-all; }
.red { color: #D92D20; font-weight: 600; }
.bk-act { white-space: nowrap; }
.btn.danger-text { color: #B42318; border-color: #F3B8B2; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 16px 0; }
.bk table { width: 100%; }
@media (max-width: 719px) { .bk-act { display: flex !important; gap: 8px; padding-top: 8px !important; } .bk-act::before { content: none !important; } }

/* ===== add booking ===== */
.bform .card { border-radius: 16px; box-shadow: 0 2px 8px rgba(16,24,40,.06); }
.bform h2 { font-size: 1.05rem; margin: 0 0 14px; }
.cols { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cols { grid-template-columns: repeat(4, 1fr); } }
textarea.ctl, .bform input.ctl, .bform select.ctl { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #C9CFD8; border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
textarea.ctl { min-height: 72px; resize: vertical; }
.errs { margin: 6px 0 0 18px; padding: 0; }
.results { border: 1px solid var(--border); border-radius: 12px; background: #fff; margin-top: 6px; overflow: hidden; box-shadow: 0 8px 24px rgba(16,24,40,.12); }
.res { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid var(--border); background: #fff; font: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.res:first-child { border-top: 0; }
.res:hover, .res:focus-visible { background: color-mix(in srgb, var(--accent) 8%, #fff); }
.res-none { padding: 12px 14px; color: var(--muted); }
.pills { border: 0; padding: 0; margin: 0 0 16px; }
.pills legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 6px; }
.pill-opt { display: inline-block; margin: 0 8px 8px 0; }
.pill-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid #C9CFD8; border-radius: 999px; background: #fff; font-weight: 600; cursor: pointer; }
.pill-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; font-size: 1.05rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 52px; height: 30px; border-radius: 999px; background: #C9CFD8; position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .sw { background: var(--accent); }
.switch input:checked + .sw::after { transform: translateX(22px); }
.switch input:focus-visible + .sw { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.sw-label { font-weight: 700; }
.leg-body { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.leg.off { background: #FAFBFC; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0 0 4px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.note { border-radius: 10px; padding: 10px 12px; margin: 0 0 16px; background: var(--warn-bg); color: var(--warn-ink); font-size: .9rem; }
.note.ok { background: var(--ok-bg); color: var(--ok-ink); margin-top: 8px; }
.note-line + .note-line { margin-top: 6px; }
.note .linkbtn { min-height: 32px; padding: 0 4px; }

/* provisional / late notices on the admin home page */
.hnotice.late{border-color:#f0b8b8;background:#fff5f5}.hnotice.late .hn-dot{background:#d33}.hnotice.late .avatar{background:#d33;color:#fff}
.hnotice.wait .avatar{background:#e8f3f2}
.head-actions{display:flex;gap:8px;flex-wrap:wrap}
.dup{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:8px}

/* ===== add booking: modern layout ===== */
.bform { max-width: 920px; margin: 0 auto; padding-bottom: 96px; }
.bform .card.step { padding: 0; border-radius: 18px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.05); overflow: hidden; }
.step-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, #fff), #fff); border-bottom: 1px solid var(--border); }
.step-head h2 { margin: 0; font-size: 1.1rem; }
.step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-size: .95rem; flex: none; }
.bform .card.step > :not(.step-head) { margin-left: 20px; margin-right: 20px; }
.bform .card.step > .step-head + * { margin-top: 20px; }
.bform .card.step > :last-child { margin-bottom: 20px; }
.bform .leg-body { margin: 0; padding: 20px; border-top: 0; }
.bform .leg-body > * { margin-left: 0; margin-right: 0; }
.bform .leg.off .step-head { background: #FAFBFC; border-bottom-color: transparent; }
.bform .leg.off .step-no { background: #C9CFD8; }

.seg { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 640px) { .seg { grid-template-columns: 1fr 1fr; } }
.seg-opt { display: block; cursor: pointer; margin: 0; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 16px 52px; border: 2px solid var(--border); border-radius: 16px; background: #fff; position: relative; transition: border-color .15s, box-shadow .15s, background .15s; }
.seg-card::before { content: ""; position: absolute; left: 18px; top: 19px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #C9CFD8; background: #fff; }
.seg-card b { font-size: 1.05rem; }
.seg-card small { color: var(--muted); font-size: .88rem; line-height: 1.35; }
.seg-opt input:checked + .seg-card { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 16%, transparent); }
.seg-opt input:checked + .seg-card::before { border-color: var(--accent); background: radial-gradient(var(--accent) 0 45%, #fff 50%); }
.seg-opt input:focus-visible + .seg-card { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }

.bform .field { margin-bottom: 14px; }
.bform .field > label, .bform .pills legend { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin-bottom: 6px; }
.bform input.ctl, .bform select.ctl, .bform textarea.ctl { border: 1.5px solid #D5DAE1; border-radius: 12px; background: #FBFCFD; transition: border-color .15s, box-shadow .15s, background .15s; }
.bform input.ctl:hover, .bform select.ctl:hover, .bform textarea.ctl:hover { border-color: #B8C0CB; }
.bform input.ctl:focus, .bform select.ctl:focus, .bform textarea.ctl:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.bform .find input.ctl { min-height: 52px; padding-left: 44px; border-radius: 14px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235B6675' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center; }
.cols.c2 { grid-template-columns: 1fr; } .cols.c3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cols.c2 { grid-template-columns: repeat(2, 1fr); } .cols.c3 { grid-template-columns: repeat(3, 1fr); } }

.sec { padding: 4px 0 6px; margin-bottom: 14px; }
.sec + .sec { border-top: 1px dashed var(--border); padding-top: 16px; }
.sec h3 { margin: 0 0 12px; font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.bform .pill-opt span { min-height: 40px; padding: 0 16px; border-radius: 999px; border-width: 1.5px; font-size: .92rem; }
.bform .md { border: 1.5px solid #D5DAE1; border-radius: 14px; background: #fff; padding: 10px; }
.bform [hidden] { display: none !important; }

.actionbar { position: sticky; bottom: 0; z-index: 4; margin: 8px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actionbar .check { margin: 0; }
.actionbar .btn.lg { min-height: 50px; padding: 0 28px; font-size: 1.02rem; border-radius: 14px; }
@media (max-width: 639px) { .actionbar .btn.lg { width: 100%; } }
.note.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #F1D9A0; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.note.warn .dup { margin-top: 10px; }

/* option buttons sit side by side and wrap only when there is no room */
.bform .pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bform .pills legend { flex: 0 0 100%; float: none; width: 100%; }
.bform .pill-opt { margin: 0; }
.hdr-preview { border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.hdr-preview img { display: block; max-width: 100%; height: auto; }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.step-head .tag { margin-left: auto; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.fld.grow { position: relative; }
.results.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; max-height: 340px; overflow: auto; }
.res.active { background: color-mix(in srgb, var(--accent) 10%, #fff); }

/* Daily Booksheet */
.bs-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.bs-date { display: flex; gap: 6px; align-items: center; margin: 0; }
.bs-date input { min-height: 40px; }
.bs-types { margin-left: auto; display: flex; gap: 6px; }
.bs-layout { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
.bs-row { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; background: #fff; border: 1px solid #E3E6EB; border-left: 6px solid #C9CFD8; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.bs-row.st-started { background: #ECFDF0; border-left-color: #4ADE80; }
.bs-row.st-completed { background: #EAF4FD; border-left-color: #60A5FA; }
.bs-row.st-workshop { background: #FFF8DB; border-left-color: #EAB308; }
.bs-row.st-allocate { background: #FBEAF6; border-left-color: #DE81CA; }
.bs-row.st-office, .bs-row.st-received { background: #F1F2F4; border-left-color: #9AA3B0; }
.bs-row.prov { border-left-color: #F59E0B; border-style: dashed; border-left-style: solid; }
.bs-row.late { background: #FEE2E2; border-color: #F87171; border-left-color: #DC2626; color: #7F1D1D; }
.bs-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bs-time { font-weight: 800; font-size: 1.15rem; margin-right: 4px; }
.bs-id { margin-left: auto; font-size: .75rem; color: #6B7482; }
.bs-body { margin: 6px 0; }
.bs-assign { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 6px 0; }
.bs-assign label { font-size: .78rem; font-weight: 700; display: grid; gap: 2px; }
.bs-assign select { min-height: 40px; }
.bs-msg { font-size: .85rem; } .bs-msg.good { color: #166534; } .bs-msg.bad { color: #B91C1C; font-weight: 700; }
.bs-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chipbtn.sm { padding: 4px 12px; min-height: 34px; font-size: .85rem; cursor: pointer; font-family: inherit; }
.bs-total { text-align: right; margin: 8px 0; }
.bs-side section { background: #fff; border: 1px solid #E3E6EB; border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.bs-side h2 { font-size: 1rem; margin: 0 0 6px; }
.bs-avail { list-style: none; margin: 0; padding: 0; }
.bs-avail li { padding: 4px 0; border-bottom: 1px solid #F0F2F5; }
.bs-avail li.off { color: #B91C1C; font-weight: 700; }
.bs-avail small { display: block; font-weight: 500; }
@media (max-width: 860px) { .bs-layout { grid-template-columns: 1fr; } .bs-types { margin-left: 0; } }

.bs-row > .bs-top, .bs-row > .bs-body, .bs-row > .bs-assign, .bs-row > .bs-links { grid-column: 1; }
.bs-row > .bs-btns { grid-column: 2; grid-row: 1 / span 4; display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 0; }
.bs-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.bs-links .inl { margin: 0; }
.bsw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #9AA3B0; padding: 0; cursor: pointer; background: #fff; }
.bsw.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.bsw-started { background: lightgreen; } .bsw-completed { background: lightblue; } .bsw-workshop { background: gold; }
.bsw-allocate { background: #DE81CA; } .bsw-office { background: #D6D6D6; } .bsw-received { background: #E6E6E6; }
.bsw-reset { background: #fff linear-gradient(135deg, transparent 45%, #B91C1C 45%, #B91C1C 55%, transparent 55%); }
.bsw { -webkit-appearance: none; appearance: none; box-sizing: border-box; flex: 0 0 auto; }
.bs-links { align-items: center; align-self: start; }
.bs-row > .bs-assign { align-self: start; }

.bs-date input[type=date] { min-height: 40px; padding: 0 14px; border: 1px solid #C9CFD8; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; }
.bs-date input[type=date]:focus { border-color: var(--accent); }
.bs-date .btn.sm { border-radius: 999px; min-height: 40px; }
.bs-assign { align-items: flex-end; }
.bs-assign .chipbtn.sm { min-height: 40px; box-sizing: border-box; margin-bottom: 0; }
.bs-assign select { display: block; margin: 0; }
.bs-assign label { line-height: 1.2; }
.bs-assign .bs-msg:empty { display: none; }
.bs-assign .bs-msg { align-self: center; flex-basis: 100%; }
.bs-assign { align-items: flex-start; }
.bs-assign .chipbtn.sm { margin-top: 17px; }
.bs-assign .bs-msg { margin-top: 0; }
.bs-assign .chipbtn.np { margin-top: 0; }
.bs-mail { display: flex; gap: 6px; margin: 0 0 0 8px; } .bs-mail .btn { border-radius: 999px; min-height: 40px; }
.bs-mail > div { display: flex; flex-direction: column; gap: 2px; } .bs-stamp { font-size: .72rem; color: #6B7482; padding-left: 10px; }
.bs-bar { align-items: flex-end; }
.bform .type-how { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; } .bform .type-how .field.how { margin: 0 0 16px; min-width: 180px; }
