/* Staff screens: reception counter PC, office, and drivers' phones. Same palette as the website. */
:root {
  --canopy: #17352A; --fern: #2F6B4A; --basalt: #26231F; --mist: #EEF3EC; --line: #D7DDD3; --quiet: #5B6157;
  --harness: #F3C623; --harness-deep: #D9AC0C; --danger: #A3271F; --ok: #2F6B4A; --warn: #FFF6D6; --white: #fff;
  --display: 'Archivo', 'Arial Narrow', sans-serif; --body: 'Atkinson Hyperlegible', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--mist); color: var(--basalt); font: 400 1rem/1.5 var(--body); }
a { color: var(--fern); }
:focus-visible { outline: 3px solid var(--harness); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-stretch: 75%; font-weight: 800; color: var(--canopy); line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: 2rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
.loading { padding: 40px; }
.small { font-size: .9rem; color: var(--quiet); }
.num { font-variant-numeric: tabular-nums; }

/* shell */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--canopy); color: var(--white); padding: 16px 0; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.side .brand { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 1.3rem; padding: 4px 20px 16px; }
.side a { color: var(--white); text-decoration: none; padding: 12px 20px; font-weight: 700; border-left: 5px solid transparent; }
.side a[aria-current="page"] { background: rgba(255,255,255,.08); border-left-color: var(--harness); }
.side .who { margin-top: auto; padding: 12px 20px; font-size: .9rem; opacity: .85; }
.side .who button { background: none; border: 1px solid rgba(255,255,255,.5); color: var(--white); padding: 6px 10px; border-radius: 4px; cursor: pointer; margin-top: 6px; font: inherit; }
.main { padding: 20px 24px 64px; min-width: 0; }
.testbar { background: #FDECEC; color: var(--danger); font-weight: 700; padding: 8px 24px; border-bottom: 1px solid #F3C9C6; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 0; }
  .side .brand, .side .who { display: none; }
  .side a { padding: 14px 14px; border-left: 0; border-bottom: 4px solid transparent; white-space: nowrap; }
  .side a[aria-current="page"] { border-bottom-color: var(--harness); }
  .main { padding: 16px 12px 64px; }
}

/* toolbar */
.bar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 16px; }
.bar h1 { margin: 0 auto 0 0; }
.bar > select, .bar > input[type=date] { width: auto; min-width: 160px; }
.panel { background: var(--white); border-radius: 6px; padding: 16px; margin-bottom: 16px; border: 1px solid var(--line); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 4px; border: 2px solid var(--canopy);
  background: var(--white); color: var(--canopy); font: 700 1rem/1.1 var(--body); cursor: pointer; text-decoration: none; gap: 6px; }
.btn-go { background: var(--harness); border-color: var(--harness); color: var(--basalt); }
.btn-go:hover { background: var(--harness-deep); border-color: var(--harness-deep); }
.btn-solid { background: var(--canopy); color: var(--white); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-small { min-height: 34px; padding: 4px 10px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label.f { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
input, select, textarea { font: inherit; color: inherit; min-height: 44px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 4px; background: var(--white); width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--fern); outline: none; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--canopy); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.seg { display: inline-flex; border: 2px solid var(--canopy); border-radius: 4px; overflow: hidden; }
.seg button { font: 700 1rem var(--body); padding: 8px 14px; border: 0; background: var(--white); color: var(--canopy); cursor: pointer; min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--canopy); color: var(--white); }
.msg { min-height: 1.5em; font-weight: 700; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }

/* tables */
table.t { width: 100%; border-collapse: collapse; background: var(--white); font-size: .95rem; }
table.t th, table.t td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-size: .82rem; color: var(--quiet); font-weight: 700; background: var(--white); position: sticky; top: 0; }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: .82rem; font-weight: 700; background: var(--mist); color: var(--canopy); white-space: nowrap; }
.tag.warn { background: var(--warn); color: var(--basalt); }
.tag.bad { background: #FDECEC; color: var(--danger); }
.tag.done { background: var(--canopy); color: var(--white); }

/* arrivals */
.session { margin-bottom: 18px; }
.session-head { display: flex; align-items: baseline; gap: 12px; margin: 8px 0; }
.session-head .time { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 1.8rem; color: var(--canopy); }
.guest { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; background: var(--white); border: 1px solid var(--line);
  border-left: 6px solid var(--line); padding: 10px 14px; border-radius: 4px; margin-bottom: 6px; }
.guest.in { border-left-color: var(--fern); opacity: .75; }
.guest.unpaid { border-left-color: var(--harness); }
.guest .name { font-weight: 700; font-size: 1.05rem; }
.guest .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* till */
.till { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.item { text-align: left; padding: 12px; min-height: 76px; border-radius: 4px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font: inherit; }
.item:hover { border-color: var(--canopy); }
.item b { display: block; }
.cart { position: sticky; top: 16px; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.3rem; padding: 10px 0; }
@media (max-width: 960px) { .till { grid-template-columns: 1fr; } .cart { position: static; } }

/* dialog */
dialog { border: 0; border-radius: 8px; padding: 0; width: min(560px, 96vw); max-height: 92vh; }
dialog::backdrop { background: rgba(23, 53, 42, .55); }
dialog .dlg { padding: 20px; }
dialog .dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.kv dt { color: var(--quiet); }
.kv dd { margin: 0; }

/* drivers and map */
#map { height: 420px; border-radius: 6px; border: 1px solid var(--line); }
.run { margin-bottom: 18px; }
.stop { border-left: 4px solid var(--harness); padding: 6px 12px; margin: 8px 0; background: var(--white); }
.stop .when { font-weight: 700; }

/* login */
.login { max-width: 360px; margin: 10vh auto; background: var(--white); padding: 24px; border-radius: 8px; border: 1px solid var(--line); }
.login h1 { font-size: 1.8rem; }

/* settings */
.edit-table input, .edit-table select, .edit-table textarea { min-height: 36px; padding: 4px 6px; font-size: .9rem; }
.edit-table td { padding: 4px; }
.edit-table textarea { min-width: 220px; }
details.sec { background: var(--white); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; }
details.sec > summary { padding: 14px 16px; cursor: pointer; font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 1.25rem; color: var(--canopy); }
details.sec > div { padding: 0 16px 16px; }

/* driver phone app */
.driver { max-width: 560px; margin: 0 auto; padding: 12px; }
.driver .guest { grid-template-columns: 1fr; }
.driver .acts { justify-content: flex-start; }
.share select { color: var(--basalt); }
.share { position: sticky; bottom: 0; background: var(--canopy); color: var(--white); padding: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; border-radius: 6px 6px 0 0; }
.side a .count { display: inline-block; margin-left: 8px; min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--harness, #F3C623); color: #26231F; font-size: .8rem; font-weight: 700; text-align: center; line-height: 22px; }
