@font-face {
  font-family: 'Jakarta';
  src: url('/assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0;
}
@font-face {
  font-family: 'Jakarta';
  src: url('/assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #7fbc42;
  --brand-strong: #477a1b;
  --brand-deep: #2f5412;
  --brand-soft: #eff6e6;
  --brand-line: #d6e8c3;
  --ink: #20262a;
  --ink-2: #474d52;
  --muted: #666a6e;
  --line: #e6e7e1;
  --line-strong: #d3d5cd;
  --bg: #f6f6f1;
  --surface: #ffffff;
  --amber: #8a5a00;
  --amber-soft: #fdf3dc;
  --blue: #1f5f8b;
  --blue-soft: #e5f1f9;
  --red: #b3321f;
  --red-soft: #fcebe7;
  --teal: #0f6e62;
  --teal-soft: #e0f4f0;
  --grey-soft: #eeefeb;
  --whatsapp: #128c4b;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgb(32 38 42 / .05), 0 6px 20px rgb(32 38 42 / .05);
  --shadow-lg: 0 12px 44px rgb(32 38 42 / .2);
  --sidebar: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Jakarta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
/* A long name without spaces wraps instead of pushing the page sideways on a phone. */
h1, h2, h3, .grow b, .grow small, .person > div { overflow-wrap: anywhere; }
.person > div { min-width: 0; }
h1 { font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem); line-height: 1.2; font-weight: 750; letter-spacing: -.022em; }
h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.012em; }
h3 { font-size: .98rem; font-weight: 700; }
a { color: var(--brand-strong); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--brand-strong); outline-offset: 2px; }
svg.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* App frame */
.frame { min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 20;
  display: flex; flex-direction: column; gap: 26px;
  padding: 26px 16px 18px; background: var(--surface); border-right: 1px solid var(--line);
}
.sidebar .brand { padding: 0 10px; }
.brand img { width: 186px; height: auto; }
.brand small { display: block; margin-top: 7px; color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 600;
}
.nav-link:hover { background: var(--bg); text-decoration: none; }
.nav-link.active { background: var(--brand-soft); color: var(--brand-deep); }
.nav-count { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--brand-strong); color: #fff; font-size: .75rem; line-height: 22px; text-align: center; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-deep); font-size: .85rem; font-weight: 750;
}
.avatar.lg { width: 54px; height: 54px; font-size: 1.1rem; }
.side-user .who { min-width: 0; flex: 1; line-height: 1.25; }
.side-user .who b, .side-user .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who b { font-size: .88rem; }
.side-user .who span { color: var(--muted); font-size: .76rem; }
.main { margin-left: var(--sidebar); min-height: 100dvh; }
.page { max-width: 1120px; margin: 0 auto; padding: 34px 32px 60px; }
.page.narrow { max-width: 720px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin-top: 4px; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-size: .88rem; font-weight: 600; }
.topbar, .tabbar { display: none; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { display: block; color: inherit; padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat:hover { text-decoration: none; border-color: var(--line-strong); }
.stat b { display: block; font-size: 1.85rem; line-height: 1.1; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 5px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.stat.hot { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.stat.hot span { color: #e3f1d4; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--brand-strong); color: #fff; font-weight: 700; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--brand-deep); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn.secondary:hover { background: var(--bg); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--grey-soft); }
.btn.danger { background: var(--surface); border-color: #eec7bf; color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.whatsapp { background: var(--whatsapp); }
.btn.whatsapp:hover { background: #0d6e3a; }
.btn.block { width: 100%; }
.btn.lg { min-height: 54px; font-size: 1.03rem; border-radius: 13px; }
.btn.sm { min-height: 36px; padding: 5px 12px; font-size: .86rem; border-radius: 9px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--grey-soft); color: var(--ink); }
.spin { width: 18px; height: 18px; border: 2.5px solid rgb(255 255 255 / .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.secondary .spin, .btn.ghost .spin, .btn.danger .spin { border-color: rgb(32 38 42 / .18); border-top-color: var(--ink-2); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; justify-content: center; padding: 80px 0; }
.loading .spin { width: 30px; height: 30px; border-color: var(--line-strong); border-top-color: var(--brand-strong); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.field small { color: var(--muted); font-size: .79rem; }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 13px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 88px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand-strong); box-shadow: 0 0 0 3px rgb(127 188 66 / .24); }
/* Dates as day/month/year: the visible box, a calendar button inside it, and the real date box hidden underneath. */
.pw-input { position: relative; }
.field .pw-input input { width: 100%; padding-right: 46px; }
.pw-input .pw-btn { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-input .pw-btn:hover { background: var(--soft, #f1f2ec); color: var(--ink); }
.date-input { position: relative; }
.field .date-input .date-text { width: 100%; padding-right: 46px; }
.field .date-input .date-text.invalid { border-color: var(--red, #c0392b); }
.date-input .date-btn { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.date-input .date-btn:hover { background: var(--soft, #f1f2ec); color: var(--ink); }
.field .date-input input[type=date] { position: absolute; top: 0; right: 0; left: auto; bottom: auto; z-index: 1; width: 46px; min-width: 0; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; -webkit-appearance: none; appearance: none; }
/* A phone's time box keeps its own minimum width and can stick out of its column: it fits the column instead. */
.field input[type=time] { width: 100%; min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .87rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 19px; height: 19px; margin: 1px 0 0; flex: none; accent-color: var(--brand-strong); }
.form-error { padding: 10px 13px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: .88rem; font-weight: 600; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: .88rem; line-height: 1.45; background: var(--grey-soft); color: var(--ink-2); }
.notice svg { margin-top: 1px; }
.notice.good { background: var(--brand-soft); color: var(--brand-deep); }
.notice.warn { background: var(--amber-soft); color: var(--amber); }
/* New requests: a green box. */
.new-box { border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.new-box:hover { background: color-mix(in srgb, var(--brand) 22%, var(--brand-soft)); }
.notice.bad { background: var(--red-soft); color: var(--red); }
.notice ul { margin: 0; padding-left: 16px; }

.upload {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  min-height: 150px; padding: 22px 18px; text-align: center; cursor: pointer;
  background: var(--brand-soft); border: 1.5px dashed #a9cf83; border-radius: var(--radius);
  transition: background .15s, border-color .15s;
}
.upload:hover, .upload.drag { background: #e6f2d8; border-color: var(--brand-strong); }
.upload:focus-within { outline: 2.5px solid var(--brand-strong); outline-offset: 2px; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload .up-icon { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand-strong); color: #fff; font-size: 1.05rem; }
.upload b { font-size: 1rem; color: var(--brand-deep); }
.upload span { font-size: .84rem; color: var(--ink-2); }
.upload.busy { pointer-events: none; }
.upload.busy .up-icon { background: transparent; }
.upload.busy .spin { width: 32px; height: 32px; border-color: var(--brand-line); border-top-color: var(--brand-strong); }
.scan-preview { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #15191b; }
.scan-preview img { width: 100%; max-height: 270px; object-fit: contain; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }

.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice .box {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 13px 14px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .12s, background .12s;
}
.choice .box b { font-weight: 700; }
.choice .box small { color: var(--muted); font-size: .79rem; }
.choice:hover .box { border-color: #a9cf83; }
.choice input:checked + .box { background: var(--brand-soft); border-color: var(--brand-strong); box-shadow: inset 0 0 0 .5px var(--brand-strong); }
.choice input:focus-visible + .box { outline: 2.5px solid var(--brand-strong); outline-offset: 2px; }
.choice input:disabled + .box { opacity: .55; }
.choices.list { grid-template-columns: 1fr; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .choice .box { padding: 7px 14px; border-radius: 99px; font-size: .88rem; font-weight: 600; }
.counter { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 3px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.counter button { width: 40px; height: 40px; border: 0; border-radius: 8px; background: var(--grey-soft); font-size: 1.15rem; font-weight: 700; cursor: pointer; }
.counter button:hover { background: var(--brand-soft); }
.counter output { font-weight: 750; font-variant-numeric: tabular-nums; }

/* Steps */
.steps { display: flex; gap: 6px; margin-bottom: 22px; padding: 0; list-style: none; }
.steps li { flex: 1; color: var(--muted); font-size: .8rem; font-weight: 650; }
.steps li::before { content: ''; display: block; height: 4px; margin-bottom: 7px; border-radius: 4px; background: var(--line-strong); }
.steps li.done::before, .steps li.now::before { background: var(--brand); }
.steps li.now { color: var(--ink); }
.wizard-nav { display: flex; gap: 10px; margin-top: 4px; }
.wizard-nav .btn:last-child { flex: 1; }

/* Status */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .77rem; font-weight: 700; white-space: nowrap; background: var(--grey-soft); color: var(--ink-2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.plain::before { display: none; }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.green { background: var(--brand-soft); color: var(--brand-strong); }
.pill.teal { background: var(--teal-soft); color: var(--teal); }
.pill.red { background: var(--red-soft); color: var(--red); }

/* Trip cards */
.trip { display: block; color: inherit; padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
a.trip:hover { text-decoration: none; border-color: #a9cf83; transform: translateY(-1px); }
.trip-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.trip-when b { display: block; font-size: 1.32rem; line-height: 1.15; font-weight: 750; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.trip-when span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.route { position: relative; display: flex; flex-direction: column; gap: 11px; padding-left: 21px; }
.stop { position: relative; line-height: 1.3; }
.stop:not(:last-child)::after { content: ''; position: absolute; left: -16px; top: 18px; bottom: -13px; border-left: 2px dotted var(--line-strong); }
.stop::before { content: ''; position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.stop:last-child::before { background: var(--brand-strong); border-color: var(--brand-strong); border-radius: 3px; }
.stop b { display: block; font-weight: 700; }
.stop small { color: var(--muted); font-size: .81rem; }
.trip-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .86rem; }
.trip-list { display: grid; gap: 12px; }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.hero-trip { position: relative; overflow: hidden; padding: 24px; border-radius: 20px; color: #fff; background: linear-gradient(150deg, #264a10, #477a1b 62%, #6aa436); box-shadow: 0 10px 30px rgb(47 84 18 / .24); }
.hero-trip .kicker { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #dcefc7; }
.hero-trip h2 { margin-top: 5px; color: #fff; font-size: 1.65rem; line-height: 1.15; font-weight: 750; letter-spacing: -.02em; }
.hero-trip p { color: #e7f3da; }
.hero-trip .pill { background: rgb(255 255 255 / .17); color: #fff; }
.hero-trip .btn.light { background: #fff; color: var(--brand-deep); }
.hero-trip .btn.light:hover { background: var(--brand-soft); }
.hero-sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.hero-sub small { display: block; color: #cfe6b8; font-size: .76rem; font-weight: 600; }
.hero-sub b { font-weight: 700; }

/* Timeline */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 15px 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.timeline li::after { content: ''; position: absolute; left: 6.5px; top: 20px; bottom: -1px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--brand); border-color: var(--brand); }
.timeline li.done::after { background: var(--brand-line); }
.timeline li.now::before { background: var(--surface); border: 4px solid var(--brand-strong); box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline b { display: block; font-size: .92rem; font-weight: 650; }
.timeline li.todo b { color: var(--muted); font-weight: 550; }
.timeline small { color: var(--muted); font-size: .79rem; }

/* Data */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; margin: 0; }
.facts dt { color: var(--muted); font-size: .78rem; font-weight: 600; }
.facts dd { margin: 1px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.facts .wide { grid-column: 1 / -1; }
.person { display: flex; align-items: center; gap: 13px; }
.person b { display: block; font-size: 1.03rem; line-height: 1.25; }
.contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
/* A single button (e.g. no agency to message) takes the full row instead of half of it. */
.contact-actions > :only-child { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 16px; text-align: left; font-size: .75rem; font-weight: 700; color: var(--muted); letter-spacing: .03em; border-bottom: 1px solid var(--line); background: #fbfbf8; white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: #fafbf6; }
td b { font-weight: 650; }
td small { display: block; color: var(--muted); font-size: .79rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 240px; }
.search svg { position: absolute; left: 13px; top: 14px; color: var(--muted); }
.search input { padding-left: 40px; }
.tabs { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: #eaebe4; overflow-x: auto; }
.tabs a, .tabs button { padding: 7px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: .85rem; font-weight: 650; white-space: nowrap; cursor: pointer; }
.tabs a:hover { text-decoration: none; }
.tabs .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(32 38 42 / .12); }
.queue-item { display: flex; align-items: center; gap: 16px; padding: 14px 18px; color: inherit; border-bottom: 1px solid var(--line); }
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: #fafbf6; text-decoration: none; }
.queue-time { flex: none; width: 74px; line-height: 1.2; }
.queue-time b { display: block; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.queue-time span { color: var(--muted); font-size: .77rem; font-weight: 600; }
.queue-main { flex: 1; min-width: 0; }
.queue-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-main small { display: block; color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.driver-pick .box { flex-direction: row; align-items: center; gap: 11px; }
.driver-pick .avatar { width: 34px; height: 34px; font-size: .78rem; }
.empty { padding: 42px 22px; text-align: center; color: var(--muted); }
.empty svg { display: block; margin: 0 auto 11px; width: 34px; height: 34px; color: #a9cf83; }
.empty b { display: block; margin-bottom: 3px; color: var(--ink); font-size: 1.02rem; }
.checklist { display: flex; flex-direction: column; gap: 9px; }
.check-step { display: flex; align-items: center; gap: 13px; padding: 12px 14px; color: inherit; border: 1px solid var(--line); border-radius: 12px; }
a.check-step:hover { text-decoration: none; border-color: #a9cf83; background: #fbfdf8; }
.check-num { display: flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--grey-soft); font-weight: 750; font-size: .85rem; }
.check-step.done .check-num { background: var(--brand-strong); color: #fff; }
.check-step.done b { color: var(--muted); }

/* Auth */
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); min-height: 100dvh; background: var(--surface); }
.auth-photo { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 52px; color: #fff; background: #1c2528 url('/assets/hero.webp') center / cover no-repeat; }
.auth-photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(15 22 24 / .12) 30%, rgb(15 22 24 / .86)); }
.auth-photo > div { position: relative; max-width: 480px; }
.auth-photo .eyebrow { margin-bottom: 12px; color: #c4e49f; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.auth-photo h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); line-height: 1.1; font-weight: 750; letter-spacing: -.03em; }
.auth-photo p { margin-top: 13px; color: #dfe5e3; font-size: 1.02rem; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-form { width: 100%; max-width: 390px; }
.auth-form .logo { width: 225px; margin-bottom: 36px; }
.auth-form h1 { margin-bottom: 5px; }
.auth-form > p { margin-bottom: 24px; color: var(--muted); }
.auth-foot { margin-top: 20px; color: var(--muted); font-size: .9rem; text-align: center; }

/* Overlays */
.modal-back { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgb(24 30 32 / .5); animation: fade .15s; }
.modal { width: 100%; max-width: 480px; max-height: calc(100dvh - 36px); overflow-y: auto; padding: 24px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: rise .18s; }
/* The window itself takes the focus when its first field is a date; no ring around the whole window. */
.modal:focus { outline: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
#toasts { position: fixed; left: 50%; bottom: 24px; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(92vw, 440px); transform: translateX(-50%); pointer-events: none; }
.toast { padding: 11px 17px; border-radius: 11px; background: var(--ink); color: #fff; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); animation: rise .2s; }
.toast.error { background: var(--red); }
.copybox { display: flex; gap: 8px; }
.copybox input { flex: 1; min-width: 0; min-height: 42px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--bg); font-size: .82rem; }

@media (max-width: 1020px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
    height: 58px; padding: 0 8px 0 16px; background: rgb(255 255 255 / .95); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }
  .topbar img { width: 158px; }
  .tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 30; display: flex;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .tab-link { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; color: var(--muted); font-size: .71rem; font-weight: 650; }
  .tab-link svg { font-size: 1.1rem; }
  .tab-link:hover { text-decoration: none; }
  .tab-link.active { color: var(--brand-strong); background: var(--brand-soft); }
  .tab-link .nav-count { position: absolute; top: 1px; left: calc(50% + 6px); min-width: 17px; padding: 0 4px; font-size: .66rem; line-height: 17px; }
  .page { padding: 20px 16px 36px; }
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: 190px auto; }
  .auth-photo { padding: 20px; }
  .auth-photo .eyebrow, .auth-photo p { display: none; }
  .auth-photo h2 { font-size: 1.55rem; }
  .auth-side { align-items: flex-start; padding: 26px 16px 36px; }
  .auth-form .logo { width: 190px; margin-bottom: 22px; }
  #toasts { bottom: 84px; }
  .modal-back { align-items: flex-end; padding: 0; }
  .modal { max-width: none; max-height: 92dvh; border-radius: 20px 20px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .hide-mobile { display: none !important; }
  td, th { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 480px) {
  .grid-2.keep { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2:not(.keep) { grid-template-columns: minmax(0, 1fr); }
  .stat { padding: 13px 14px; }
  .stat b { font-size: 1.55rem; }
  .queue-item { gap: 11px; padding: 13px 14px; }
  .queue-time { width: 62px; }
  .choice .box { padding: 11px 10px; }
  .card { padding: 17px; }
}

/* ---------- Agencies, accounts, deletion, calendar ---------- */
.stack > div:empty, .stack-sm > div:empty { display: none; }
.stat.warn { background: var(--amber-soft); border-color: #efd9a6; color: var(--amber); }
.stat.warn span { color: var(--amber); }
.picked .avatar { background: var(--surface); }
.apt-row { flex-wrap: wrap; gap: 10px 13px; }
.apt-row .grow { flex: 1 1 150px; }
.apt-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.agenda-status { display: block; margin-top: 6px; }
.page.wide { max-width: 1320px; }
.card-head.pad { padding: 17px 18px 0; margin-bottom: 10px; }
.plain-link { color: inherit; }
.avatar.sm { width: 32px; height: 32px; font-size: .74rem; }
.avatar svg { width: 18px; height: 18px; }
.cell-person { display: flex; align-items: center; gap: 11px; }
.card.highlight { border-color: #e8cf94; box-shadow: 0 0 0 3px var(--amber-soft), var(--shadow); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--ink); color: #fff; }
.skip:focus { left: 8px; }
.main-inner:focus { outline: 0; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.plain legend { margin-bottom: 7px; padding: 0; color: var(--ink-2); font-size: .84rem; font-weight: 650; }
.check-num.ok { background: var(--brand-soft); color: var(--brand-strong); }
.divider { display: flex; align-items: center; gap: 12px; margin-top: 4px; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Deleting */
.btn.danger-solid { background: var(--red); color: #fff; }
.btn.danger-solid:hover { background: #8f2717; }
.btn.danger-solid[disabled] { background: #d9a79e; opacity: 1; }
.danger-box { display: flex; gap: 10px; padding: 13px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: .9rem; line-height: 1.45; }
.danger-box svg { margin-top: 2px; }
.kbd { display: inline-block; padding: 0 7px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--bg); color: var(--ink); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85em; }
.danger-zone { display: flex; align-items: center; gap: 14px; border-style: dashed; border-color: #ebc9c1; box-shadow: none; background: #fffcfb; }
.danger-zone h3 { color: var(--red); }
.icon-btn.danger-icon:hover { background: var(--red-soft); color: var(--red); }

/* Picking a customer */
.picked { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--brand-line); border-radius: 12px; background: var(--brand-soft); }
.picked b { display: block; line-height: 1.25; }
.picked small { color: var(--ink-2); font-size: .8rem; }
.pick-list { display: grid; gap: 8px; }
/* An activity entry the office made since the agency last looked. */
.timeline li.news b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 13px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: inherit; text-align: left; cursor: pointer; font-weight: 400; }
.pick:hover { border-color: #a9cf83; background: #fbfdf8; text-decoration: none; }
.pick b { display: block; font-weight: 700; line-height: 1.25; }
.pick small { display: block; color: var(--muted); font-size: .8rem; }
.pick.blocked { border-style: dashed; background: var(--bg); }
.pick.blocked b { color: var(--ink-2); }
.pick > svg { color: var(--muted); }

/* Agency home */
.how { margin: 0; padding: 0; list-style: none; counter-reset: how; display: grid; gap: 12px; }
.how li { position: relative; padding-left: 36px; counter-increment: how; line-height: 1.35; }
.how li::before { content: counter(how); position: absolute; left: 0; top: -1px; width: 25px; height: 25px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); font-size: .8rem; font-weight: 750; display: flex; align-items: center; justify-content: center; }
.how b { display: block; font-size: .92rem; }
.how span { color: var(--muted); font-size: .83rem; }

/* Agencies and accounts */
.agency-card { display: block; color: inherit; transition: border-color .15s, transform .15s; }
.agency-card:hover { text-decoration: none; border-color: #a9cf83; transform: translateY(-1px); }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.mini-stats b { display: block; font-size: 1.25rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.mini-stats span { color: var(--muted); font-size: .78rem; font-weight: 600; }
.acct-list { display: flex; flex-direction: column; }
.acct { padding: 12px 0; border-top: 1px solid var(--line); }
.acct:first-child { border-top: 0; padding-top: 0; }
.acct:last-child { padding-bottom: 0; }
.acct .person b { font-size: .95rem; }
.acct-actions { margin-top: 10px; gap: 6px; }
.acct-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.acct-foot .acct-actions { margin-top: 0; }
.agency-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Sign in and navigation */
.auth-note { display: flex; gap: 10px; margin-top: 22px; padding: 13px 14px; border-radius: 12px; background: var(--bg); color: var(--ink-2); font-size: .85rem; line-height: 1.45; }
.auth-note svg { margin-top: 2px; color: var(--muted); }
.top-brand { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; }
.topbar > .row { flex: none; flex-wrap: nowrap; }
.top-brand small { overflow: hidden; padding-left: 10px; border-left: 1px solid var(--line-strong); color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.sheet-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 650; text-align: left; cursor: pointer; }
.sheet-link svg:last-child:not(:first-child) { margin-left: auto; color: var(--muted); }
.sheet-link.active { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-deep); }
.sheet-link:hover { text-decoration: none; background: var(--bg); }
button.tab-link { border: 0; background: transparent; font-family: inherit; cursor: pointer; }

/* Language switch */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #eaebe4; }
.lang-switch button { min-width: 40px; padding: 5px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font: inherit; font-size: .78rem; font-weight: 750; letter-spacing: .04em; cursor: pointer; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(32 38 42 / .12); }
.lang-btn { width: auto; min-width: 40px; padding: 0 8px; color: var(--ink-2); font-size: .78rem; font-weight: 750; letter-spacing: .04em; }
.auth-side { position: relative; }
.auth-lang { position: absolute; top: 22px; right: 24px; }
.side-lang { padding: 0 8px 12px; }
.sheet-lang { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; font-weight: 650; }

/* Directions, bookings and properties */
:root { --purple: #6a3fa0; --purple-soft: #f1eafa; }
.dir-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.dir-tag svg { width: 14px; height: 14px; }
.dir-tag.departure { background: var(--purple-soft); color: var(--purple); }
.dir-icon { display: inline-flex; color: var(--muted); }
.dir-icon svg { width: 16px; height: 16px; }
.trip-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.tiny { margin-left: 6px; padding: 1px 7px; font-size: .68rem; vertical-align: 2px; }
.leg-icons { display: inline-flex; gap: 3px; }
.leg-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--grey-soft); color: #b0b3ad; }
.leg-icon svg { width: 15px; height: 15px; }
.leg-icon.on { background: var(--brand-soft); color: var(--brand-strong); }
.choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice .box b svg { width: 15px; height: 15px; vertical-align: -2px; }
.leg-block { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fcfcfa; }
.leg-block h3 { display: flex; align-items: center; gap: 8px; }
.leg-summary { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; }
.leg-summary p { margin: 8px 0 0; font-weight: 600; }
.leg-summary small { display: block; margin-top: 6px; }
.leg-link { display: flex; align-items: center; gap: 9px; margin-top: 9px; padding: 9px 11px; border-radius: 10px; background: var(--bg); color: inherit; font-size: .88rem; font-weight: 600; }
.leg-link:hover { text-decoration: none; background: var(--brand-soft); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; }
.file-row a { color: inherit; }
.guest-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: inherit; }
.guest-row:hover { text-decoration: none; border-color: #a9cf83; background: #fbfdf8; }
.guest-row b { display: block; line-height: 1.25; }
.guest-row small { display: block; color: var(--muted); font-size: .8rem; }
.pick.guest input { width: 18px; height: 18px; flex: none; accent-color: var(--brand-strong); }
.pick.guest.on { border-color: var(--brand-strong); background: var(--brand-soft); }
.summary-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fcfcfa; }
.check.big { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: .92rem; }
.check.big svg { margin-right: 4px; vertical-align: -3px; color: var(--purple); }
.prop-line { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; }
.prop-line b { display: block; font-weight: 700; line-height: 1.3; }
.prop-line small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.prop-type { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 52px; height: 40px; padding: 0 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-deep); font-size: .82rem; font-weight: 800; }
.prop-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.prop-row:last-child { border-bottom: 0; }
.prop-row.inactive { opacity: .6; }
.prop-row .prop-line { flex: 1; width: auto; }
.prop-row > .row, .prop-row > .btn, .prop-row > .pill { flex: none; flex-wrap: nowrap; }
/* On a phone the agency's two buttons go under the apartment, so its name keeps the full width. */
@media (max-width: 600px) {
  .prop-row { flex-wrap: wrap; }
  .prop-row .prop-line { flex-basis: 100%; }
  .prop-row > .row { margin-left: auto; }
}
.prop-choice .box { flex-direction: row; }
.prop-choice.unavailable .box { opacity: .55; cursor: not-allowed; }
.prop-head { padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.prop-filters .field { flex-direction: row; align-items: center; gap: 8px; }
.prop-filters .field span { white-space: nowrap; }
.prop-filters .field input { width: auto; min-height: 42px; }

/* Range date picker */
.range-picker { display: flex; flex-direction: column; gap: 12px; }
.rp-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfa; }
.rp-summary > svg { color: var(--muted); }
.rp-pick { display: flex; flex-direction: column; min-width: 110px; }
.rp-pick small { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rp-pick b { color: var(--muted); font-weight: 650; }
.rp-pick.set b { color: var(--ink); font-weight: 750; }
.rp-nights { margin-left: auto; color: var(--brand-deep); font-weight: 750; }
.rp-body { position: relative; padding: 0 34px; }
.rp-nav { position: absolute; top: 0; }
.rp-nav.prev { left: -4px; }
.rp-nav.next { right: -4px; }
.rp-nav[disabled] { opacity: .3; cursor: default; }
.rp-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.rp-title { margin-bottom: 8px; font-weight: 750; text-align: center; line-height: 40px; }
.rp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 3px; }
.rp-dow { padding-bottom: 4px; color: var(--muted); font-size: .72rem; font-weight: 700; text-align: center; }
.rp-day { position: relative; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
@media (hover: hover) { .rp-day:hover:not([disabled]) { background: var(--grey-soft); } }
.rp-day[disabled] { color: #c3c6c0; cursor: default; }
.rp-day.today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--brand-strong); }
.rp-day.between { border-radius: 0; background: var(--brand-soft); color: var(--brand-deep); }
.rp-day.start, .rp-day.end { background: var(--brand-strong); color: #fff; }
.rp-day.start { border-radius: 10px 0 0 10px; }
.rp-day.end { border-radius: 0 10px 10px 0; }
.rp-day.start:not(.end):last-child, .rp-day.start:only-child { border-radius: 10px; }
.rp-day.preview { background: #9cc56f; }
/* Calendar: the day view, and week headers that open a day. */
.cal-dayview .agenda-list { gap: 10px; }
/* Nights already taken for the chosen property. */
.rp-day.booked:not(.start):not(.end):not(.between) { background: repeating-linear-gradient(135deg, #f6e1df 0 6px, #fbefee 6px 12px); color: #b9837d; text-decoration: line-through; }
.rp-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.rp-swatch { width: 18px; height: 14px; border-radius: 4px; background: repeating-linear-gradient(135deg, #f6e1df 0 4px, #fbefee 4px 8px); border: 1px solid #ecc9c5; }
/* Long apartment lists scroll inside the card, so the buttons below stay in reach. */
.choice-scroll { max-height: 360px; overflow-y: auto; padding: 2px 4px 2px 2px; margin: 0 -4px 0 -2px; overscroll-behavior: contain; }
.rp-day:focus-visible { outline: 2.5px solid var(--brand-strong); outline-offset: 1px; }
.date-btn { min-height: 46px; }

/* One property's timetable: free nights, the agency's own, booked and requested ones. */
.tt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tt-head .icon-btn[disabled] { opacity: .3; cursor: default; }
.tt-title { margin: 0; font-size: 1rem; text-align: center; }
.tt-day { position: relative; display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 8px; color: var(--ink); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
a.tt-day:hover { outline: 2px solid var(--brand-strong); outline-offset: -2px; }
a.tt-day:focus-visible { outline: 2.5px solid var(--brand-strong); outline-offset: 1px; }
.tt-day.free { background: var(--brand-soft); color: var(--brand-deep); }
.tt-day.own { background: var(--blue); color: #fff; }
.tt-day.booked { background: repeating-linear-gradient(135deg, #f6e1df 0 6px, #fbefee 6px 12px); color: #b9837d; text-decoration: line-through; }
.tt-day.requested { background: var(--amber-soft); color: var(--amber); }
.tt-day.unavailable { background: repeating-linear-gradient(135deg, #e4e5e1 0 6px, #f0f1ed 6px 12px); color: #8b8e87; text-decoration: line-through; }
.tt-day.turn { background: linear-gradient(135deg, #e7e8e4 0 50%, var(--brand-soft) 50% 100%); }
.tt-day.past { opacity: .4; }
.tt-day.past.free, .tt-day.past.turn { background: transparent; color: var(--muted); }
.tt-day.today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.tt-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: .8rem; color: var(--muted); }
.tt-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.tt-swatch { flex: none; display: inline-block; width: 16px; height: 14px; border-radius: 4px; }
.tt-swatch.free { background: var(--brand-soft); border: 1px solid var(--brand-line); }
.tt-swatch.own { background: var(--blue); }
.tt-swatch.booked { background: repeating-linear-gradient(135deg, #f6e1df 0 4px, #fbefee 4px 8px); border: 1px solid #ecc9c5; }
.tt-swatch.requested { background: var(--amber-soft); border: 1px solid #efd9a6; }
.tt-swatch.unavailable { background: repeating-linear-gradient(135deg, #e4e5e1 0 4px, #f0f1ed 4px 8px); border: 1px solid #d9dad5; }
.tt-stays { display: flex; flex-direction: column; }
.tt-stay { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.tt-stay:last-child { border-bottom: 0; }
a.tt-stay:hover b { color: var(--brand-strong); text-decoration: underline; }
.tt-stay b { display: block; }
.tt-stay small { display: block; color: var(--muted); font-size: .8rem; }
/* The booking's first step: how many guests, then the free apartments that fit. */
.fixed-prop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1.5px solid var(--brand-line); border-radius: 12px; background: var(--brand-soft); }
/* The apartment keeps at least 260px; when the buttons do not fit beside it (on a phone) they move under it. */
.fixed-prop > .grow { flex: 1 1 260px; }
.fixed-prop .prop-line { width: 100%; }
.fixed-prop > .row { margin-left: auto; }
@media (max-width: 600px) {
  .fixed-prop > .row { width: 100%; }
  .fixed-prop > .row > .btn { flex: 1 1 auto; justify-content: center; }
}
.date-panel { margin: -4px 0 16px; }

/* Guests */
.main-guest { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1.5px solid var(--brand-line); border-radius: 12px; background: var(--brand-soft); }
.main-guest.missing { border-color: #efd9a6; background: var(--amber-soft); }
.main-guest b { display: block; }
.main-guest small { display: block; color: var(--ink-2); font-size: .8rem; }
.main-guest small.warn { color: var(--amber); font-weight: 700; }
.main-guest small.ok { color: var(--brand-strong); font-weight: 700; }
.guest-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.guest-card.linked { background: #fcfcfa; }
.guest-card-head { display: flex; align-items: center; gap: 10px; }
.guest-no { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--grey-soft); color: var(--ink-2); font-size: .75rem; font-weight: 750; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: #eaebe4; }
.seg button { padding: 4px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(32 38 42 / .12); }
details.fold { border-top: 1px solid var(--line); padding-top: 8px; }
details.fold > summary { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--ink-2); font-size: .88rem; font-weight: 700; cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary small { color: var(--muted); font-weight: 500; }
details.fold > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 1.1rem; }
details.fold[open] > summary::after { content: "−"; }
details.fold[open] > summary { margin-bottom: 8px; }
details.fold-row { display: block; }
details.fold-row > summary { display: flex; align-items: center; gap: 11px; list-style: none; cursor: pointer; }
details.fold-row > summary::-webkit-details-marker { display: none; }
details.fold-row > summary b { display: block; line-height: 1.25; }
details.fold-row > summary small { display: block; color: var(--muted); font-size: .8rem; }
details.fold-row .facts { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Service choice */
.service-grid { display: grid; gap: 12px; }
.service-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); color: inherit; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.service-card:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-1px); }
.service-card b { font-size: 1.15rem; }
.service-card span { color: var(--ink-2); }
.service-card small { color: var(--muted); }
.service-icon { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--brand-strong); }
.service-icon svg { width: 22px; height: 22px; }
.tab-count { margin-left: 6px; padding: 0 6px; border-radius: 99px; background: var(--grey-soft); font-size: .72rem; }

/* Occupancy */
.stay-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: var(--radius); background: var(--surface); color: inherit; box-shadow: var(--shadow); }
.stay-card:hover { text-decoration: none; border-color: var(--line-strong); border-left-color: var(--purple); }
.stay-card .person b { font-size: .95rem; }
.stay-card small { display: block; color: var(--muted); font-size: .8rem; }
.stay-dates { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); font-size: .86rem; font-weight: 650; }
.stay-dates span { color: var(--purple); }
.apt-line { display: grid; grid-template-columns: 170px minmax(0, 1.2fr) minmax(0, 2fr); align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.apt-line:last-child { border-bottom: 0; }
.apt-id b { display: block; }
.apt-id small, .apt-now small { display: block; color: var(--muted); font-size: .78rem; }
.apt-now a { color: inherit; }
.apt-next { display: flex; flex-wrap: wrap; gap: 6px; }
.next-chip { padding: 4px 9px; border-radius: 8px; background: var(--purple-soft); color: var(--purple); font-size: .78rem; font-weight: 600; }
.next-chip.pending { background: var(--amber-soft); color: var(--amber); }
.next-chip:hover { text-decoration: none; filter: brightness(.97); }
/* The planner scrolls inside its card: the dates stay at the top, the apartment names at the left. */
.card.planner-wrap { overflow: auto; max-height: min(72vh, 820px); overscroll-behavior: contain; scrollbar-width: thin; }
.planner { display: grid; grid-template-columns: 150px repeat(var(--days), minmax(32px, 1fr)); min-width: calc(150px + var(--days) * 32px); }
.pl-corner, .pl-day { position: sticky; top: 0; z-index: 3; padding: 8px 4px; border-bottom: 1px solid var(--line); background: #fbfbf8; font-size: .72rem; font-weight: 700; color: var(--muted); }
.pl-corner { left: 0; z-index: 4; padding-left: 14px; }
.pl-day { display: flex; flex-direction: column; align-items: center; }
.pl-day b { color: var(--ink); font-size: .82rem; }
.pl-day.weekend { background: #f4f4ee; }
.pl-day.today { background: var(--brand-soft); }
.pl-day.today b { color: var(--brand-deep); }
.pl-name { position: sticky; left: 0; z-index: 2; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface); line-height: 1.2; }
.pl-name b { display: block; font-size: .86rem; }
.pl-name small { color: var(--muted); font-size: .72rem; }
.pl-row { position: relative; display: grid; grid-column: 2 / -1; grid-template-columns: repeat(var(--days), minmax(32px, 1fr)); border-bottom: 1px solid var(--line); }
.pl-cell { grid-row: 1; border-left: 1px solid #f0f0ea; }
.pl-cell.today { background: rgb(127 188 66 / .08); }
.pl-bar { grid-row: 1; z-index: 1; align-self: center; margin: 6px 2px; overflow: hidden; padding: 4px 8px; border-radius: 7px; background: var(--purple-soft); border-left: 3px solid #8a5cc4; color: var(--purple); font-size: .74rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.pl-bar.pending { background: repeating-linear-gradient(135deg, var(--amber-soft) 0 6px, #fbe9c2 6px 12px); border-left-color: #c98a12; color: var(--amber); }
.pl-bar:hover { text-decoration: none; filter: brightness(.96); }
.agency-card.inactive { opacity: .7; border-style: dashed; }

/* Drivers' day */
.driver-pick.unavailable .box { opacity: .6; cursor: not-allowed; }
.day-trips { display: block; margin-top: 2px; color: var(--ink-2); }

/* The driver's sign card */
.sign-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.sign-card small { color: #b9c0bd; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sign-name { font-size: 1.6rem; line-height: 1.15; font-weight: 800; letter-spacing: .01em; overflow-wrap: anywhere; }
.sign-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.sign-facts span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: rgb(255 255 255 / .1); font-size: .84rem; font-weight: 650; }
.sign-facts .pay.guest { background: #f4c66b; color: #3d2a00; }

@media (max-width: 860px) {
  .apt-line { grid-template-columns: 1fr; gap: 6px; }
}

/* Status tones used by calendar marks */
.tone-purple { --tone: #8a5cc4; --tone-bg: var(--purple-soft); --tone-ink: var(--purple); }
.cal-chip svg { width: 11px; height: 11px; margin-right: 2px; vertical-align: -1px; }
.tone-amber { --tone: #c98a12; --tone-bg: var(--amber-soft); --tone-ink: var(--amber); }
.tone-blue { --tone: #2f7cb3; --tone-bg: var(--blue-soft); --tone-ink: var(--blue); }
.tone-green { --tone: var(--brand); --tone-bg: var(--brand-soft); --tone-ink: var(--brand-deep); }
.tone-teal { --tone: #15927f; --tone-bg: var(--teal-soft); --tone-ink: var(--teal); }
.tone-red { --tone: #c9503b; --tone-bg: var(--red-soft); --tone-ink: var(--red); }
.tone-grey { --tone: #9a9e98; --tone-bg: var(--grey-soft); --tone-ink: var(--ink-2); }

/* Calendar */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-title { min-width: 0; font-size: 1.2rem; font-weight: 750; letter-spacing: -.015em; }
.cal-nav { display: flex; gap: 2px; }
.cal-nav .icon-btn { width: 36px; height: 36px; color: var(--ink-2); }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cal-layout.single { grid-template-columns: minmax(0, 1fr); }
.cal-card { overflow: hidden; }
.cal-body { transition: opacity .15s; }
.cal-body.loading-soft { opacity: .55; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px 10px 8px; border-bottom: 1px solid var(--line); background: #fbfbf8; color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cal-day {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 112px; padding: 7px 7px 8px;
  border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); color: inherit;
  text-align: left; cursor: pointer; font: inherit; transition: background .12s;
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: #fafbf6; }
.cal-day.other { background: #fbfbf9; }
.cal-day.other .cal-num { color: #a9aca6; }
.cal-day.past .cal-chip { opacity: .7; }
.cal-num { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; min-width: 27px; height: 27px; padding: 0 5px; border-radius: 99px; font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-num { background: var(--brand-strong); color: #fff; }
.cal-day.selected { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); z-index: 1; }
.cal-day:focus-visible { outline: 2.5px solid var(--brand-strong); outline-offset: -3px; }
.cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-chip { overflow: hidden; padding: 2px 6px 2px 7px; border-left: 3px solid var(--tone); border-radius: 5px; background: var(--tone-bg); color: var(--tone-ink); font-size: .74rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip b { font-weight: 750; font-variant-numeric: tabular-nums; }
.cal-more { padding-left: 4px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.cal-dots { display: none; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.cal-dots em { color: var(--muted); font-size: .66rem; font-style: normal; font-weight: 700; line-height: 7px; }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 11px 14px; border-top: 1px solid var(--line); background: #fbfbf8; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); font-size: .78rem; font-weight: 600; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--tone); }
.cal-side { position: sticky; top: 20px; padding: 18px; }
.agenda-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.agenda-head h3 { font-size: 1.02rem; }
.agenda-head.fold-head { justify-content: flex-start; margin-bottom: 0; }
.agenda-head.fold-head h3 { flex: 1; }
.agenda-head.fold-head[aria-expanded="true"] { margin-bottom: 12px; }
.agenda-list { display: flex; flex-direction: column; gap: 8px; }
/* The day's list beside the month and under the day grid scrolls inside its own box, so a busy day does not
   stretch the page; the day's title stays above it. */
.cal-side .agenda-list, .cal-dayview .agenda-list { max-height: min(64vh, 680px); overflow-y: auto; overscroll-behavior: contain; margin-right: -6px; padding: 2px 6px 2px 0; scrollbar-width: thin; }
.cal-dayview .agenda-list { max-height: min(56vh, 560px); }
@media (max-width: 700px) { .cal-side .agenda-list, .cal-dayview .agenda-list { max-height: 60vh; } }
.agenda-item { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; border: 1px solid var(--line); border-left: 4px solid var(--tone); border-radius: 11px; color: inherit; transition: border-color .12s, background .12s; }
.agenda-item:hover { text-decoration: none; background: #fbfcf8; border-color: var(--line-strong); border-left-color: var(--tone); }
.agenda-item b { display: block; line-height: 1.25; }
.agenda-item small { display: block; color: var(--muted); font-size: .79rem; line-height: 1.35; }
.agenda-time { flex: none; width: 46px; }
.agenda-time b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.agenda-time span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.agenda-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 10px; color: var(--muted); font-size: .88rem; text-align: center; }
.agenda-empty svg { width: 28px; height: 28px; color: #b9d79b; }

@media (max-width: 1180px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-side { position: static; }
}

@media (max-width: 860px) {
  .top-brand img { width: 132px; }
  .cal-toolbar > .row:first-child { width: 100%; }
  .cal-title { font-size: 1.05rem; }
  .cal-day { min-height: 58px; align-items: center; gap: 5px; padding: 6px 2px; }
  .cal-num { align-self: center; }
  .cal-chips { display: none; }
  .cal-dots { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px; }
  .cal-dow { padding: 8px 0; text-align: center; font-size: .68rem; }
  .cal-legend { font-size: .72rem; gap: 5px 11px; }
  .danger-zone { flex-direction: column; align-items: stretch; }
  .mini-stats b { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .cal-toolbar .tabs { width: 100%; }
  .cal-toolbar .tabs button { flex: 1; }
  .cal-toolbar > .row:last-child { width: 100%; }
  .cal-toolbar > .row:last-child select { flex: 1; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; }
}

/* How it works */
.guide-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.guide-head h2 { font-size: 1.05rem; }
.guide-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-deep); }
.guide-icon svg { width: 20px; height: 20px; }
.guide-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.55; }
.guide-list li::marker { color: var(--brand-strong); }
.guide-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--brand-line); border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-deep); }
.guide-link:hover { text-decoration: none; border-color: var(--brand); }
.guide-link > span { flex: 1; min-width: 0; }
.guide-link b, .guide-link small { display: block; }
.guide-link small { color: var(--muted); font-weight: 600; font-size: .82rem; margin-top: 2px; }

/* Agency home: bookings and transfers side by side */
.two-col.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head h2 svg { width: 19px; height: 19px; color: var(--brand-strong); }
@media (max-width: 900px) {
  .two-col.even { grid-template-columns: minmax(0, 1fr); }
}
/* Phones: list rows keep the name readable; the direction and leg icons give way. */
@media (max-width: 480px) {
  .card-head { flex-wrap: wrap; }
  .queue-item .dir-tag, .queue-item .leg-icons { display: none; }
}

/* Reports */
.report-table th, .report-table td { white-space: nowrap; }
.report-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.report-table tr.total td { font-weight: 750; border-top: 2px solid var(--line-strong); background: var(--brand-soft); }

/* Long lists: a button that unfolds the rest; card titles that fold a section away. */
.show-more { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; padding: 13px 16px; border: 0; border-top: 1px solid var(--line);
  background: transparent; font: inherit; font-weight: 700; font-size: .92rem; color: var(--brand-strong); cursor: pointer; }
.show-more:hover { background: var(--brand-soft); }
.trip-grid + .show-more, .trip-list + .show-more, .stack + .show-more { border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; background: var(--surface); }
.show-more .chev svg, .fold-chev svg { width: 16px; height: 16px; transition: transform .15s ease; transform: rotate(90deg); }
.show-more .chev.open svg { transform: rotate(-90deg); }
.fold-head { cursor: pointer; user-select: none; }
.fold-head:hover h2 { color: var(--brand-strong); }
.fold-chev { display: inline-flex; color: var(--muted); margin-right: 2px; }
.fold-chev svg { transform: rotate(0deg); }
.fold-chev.open svg { transform: rotate(90deg); }
.fold-head > .fold-chev + h2 { margin-right: auto; }

/* Day and week time grids (calendar, driver schedule): hours down the left with a line every quarter hour, a
   column per day or driver, items placed by time. The grid scrolls inside its card; the header row and the hours
   stay in view. */
.tg-scroll { position: relative; max-height: min(72vh, 860px); overflow: auto; overscroll-behavior: contain; background: var(--surface); }
.tg-head, .tg-body { display: grid; min-width: min-content; }
.tg-head { position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--line-strong); background: #f6f6f2; }
.tg-corner { position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--line); background: #f6f6f2; }
.tg-col-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 6px; min-width: 0; padding: 9px 8px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ink-2); font: inherit; font-size: .84rem; text-align: center; }
.tg-col-head:first-of-type { border-left: 0; }
.tg-col-head .tg-col-title { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.tg-col-head small { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.tg-col-head em { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--grey-soft); color: var(--ink-2); font-size: .7rem; font-style: normal; font-weight: 700; line-height: 19px; }
button.tg-col-head { cursor: pointer; }
button.tg-col-head:hover .tg-col-title { color: var(--brand-strong); text-decoration: underline; }
.tg-col-head.today { color: var(--ink); }
.tg-col-head.today .tg-col-title { font-weight: 800; color: var(--brand-deep); }
.tg-body { position: relative; }
.tg-gutter { position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--line); background: #f6f6f2; }
.tg-gutter span { position: absolute; right: 8px; color: var(--ink-2); font-size: .74rem; font-weight: 650; font-variant-numeric: tabular-nums; transform: translateY(-50%); }
.tg-gutter span.quiet { color: #a4a7a0; font-weight: 500; }
.tg-col { position: relative; min-width: 0; border-left: 1px solid var(--line);
  /* quiet hours shaded; an hour line, and fainter quarter-hour lines */
  background:
    linear-gradient(to bottom, rgba(0,0,0,.022) 0 var(--tg-quiet-a), transparent var(--tg-quiet-a) var(--tg-quiet-b), rgba(0,0,0,.022) var(--tg-quiet-b)),
    repeating-linear-gradient(to bottom, #e3e4de 0 1px, transparent 1px var(--tg-hour)),
    repeating-linear-gradient(to bottom, #f1f1ed 0 1px, transparent 1px calc(var(--tg-hour) / 4)); }
.tg-gutter + .tg-col { border-left: 0; }
.tg-col.today { background-color: #f4f8ee; }
.tg-col.past .tg-item { opacity: .72; }
.tg-now { position: absolute; left: 0; right: 0; z-index: 2; height: 0; border-top: 2px solid #d6452f; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; top: -6px; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: #d6452f; }
.tg-item { position: absolute; z-index: 1; display: flex; flex-direction: column; gap: 1px; overflow: hidden; padding: 4px 7px; border-left: 3px solid var(--tone); border-radius: 6px; background: var(--tone-bg); color: var(--ink); font-size: .76rem; line-height: 1.3; box-shadow: 0 0 0 1px rgba(255,255,255,.9); transition: box-shadow .12s, transform .12s; }
.tg-item.short { flex-direction: row; align-items: center; padding-top: 0; padding-bottom: 0; }
a.tg-item:hover { z-index: 4; text-decoration: none; box-shadow: 0 0 0 1px var(--tone), 0 4px 12px rgba(0,0,0,.1); }
a.tg-item:focus-visible { z-index: 4; outline: 2.5px solid var(--brand-strong); outline-offset: 1px; }
.tg-line { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; }
.tg-line svg { flex: none; width: 13px; height: 13px; color: var(--tone-ink); }
.tg-line b { flex: none; color: var(--tone-ink); font-variant-numeric: tabular-nums; }
.tg-name { overflow: hidden; font-weight: 650; text-overflow: ellipsis; }
.tg-item small { overflow: hidden; color: var(--ink-2); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.tg-empty { position: sticky; left: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; color: var(--muted); font-size: .85rem; }
.cal-weekno { margin-right: 10px; padding: 2px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-deep); font-size: .78rem; font-weight: 750; vertical-align: 3px; }
.cal-dayview { padding: 16px 20px 8px; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .tg-scroll { max-height: 70vh; }
  .tg-col-head { padding: 8px 4px; font-size: .78rem; }
  .cal-weekno { display: none; }
}

/* The overview that opens from a calendar item. */
.dir-tag.stay { background: var(--purple-soft); color: var(--purple); }
.cal-overview { display: flex; flex-direction: column; gap: 14px; min-width: min(460px, 100%); }
.cal-ov-kind { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.cal-ov-when { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cal-ov-when b { font-size: 1.08rem; font-weight: 700; }
.cal-ov-when span { font-size: 1.08rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.cal-overview .modal-foot a.btn { text-decoration: none; }

/* "+N more" on a crowded stretch of a time grid, and the list window it opens. */
.tg-more { align-items: center; justify-content: center; gap: 0; border: 1px dashed var(--line-strong); border-left: 1px dashed var(--line-strong); background: #fafaf7; color: var(--ink-2); font: inherit; font-size: .76rem; text-align: center; cursor: pointer; }
.tg-more b { font-size: .84rem; }
.tg-more:hover { z-index: 4; border-color: var(--brand-strong); color: var(--brand-deep); background: var(--brand-soft); }
.tg-more:focus-visible { z-index: 4; outline: 2.5px solid var(--brand-strong); outline-offset: 1px; }
.cal-ov-list { max-height: min(64vh, 620px); overflow-y: auto; overscroll-behavior: contain; min-width: min(460px, 100%); padding-right: 4px; scrollbar-width: thin; }
button.tg-item { border-top: 0; border-right: 0; border-bottom: 0; font: inherit; font-size: .76rem; text-align: left; cursor: pointer; }
button.tg-item.tg-more { border: 1px dashed var(--line-strong); text-align: center; }
button.tg-item:hover { z-index: 4; box-shadow: 0 0 0 1px var(--tone, var(--line-strong)), 0 4px 12px rgba(0,0,0,.1); }

/* Driver earnings: the fee on a trip row, months in the timeline, the month switcher and the status changer. */
.trip-end { flex: none; display: flex; align-items: center; gap: 12px; }
.trip-fee { font-variant-numeric: tabular-nums; color: var(--brand-strong); font-size: .95rem; }
.month-group + .month-group { border-top: 1px solid var(--line); }
.month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
.month-head b { text-transform: capitalize; }
.month-head span { color: var(--muted); font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.month-bar select { text-transform: capitalize; }
.month-bar .btn.sm { min-width: 40px; justify-content: center; }
.btn.disabled { opacity: .4; pointer-events: none; }
.status-change { display: flex; gap: 10px; flex-wrap: wrap; }
.status-change select { flex: 1 1 180px; width: auto; }
@media (max-width: 640px) {
  .trip-end { flex-direction: column; align-items: flex-end; gap: 4px; }
  .queue-item .trip-fee { font-size: .86rem; }
  .month-head { flex-direction: column; gap: 2px; }
}
.section-title { margin: 6px 0 12px; font-size: 1.15rem; }
/* The date of a request still waiting is tomorrow, today or past. */
.pill.due-pill { background: #f9d6cf; color: var(--red); font-weight: 700; }
/* A count on a switch button: readable on the green (chosen) button too. */
.btn .tab-count { color: var(--ink-2); }
.btn:not(.secondary):not(.ghost) .tab-count { background: rgb(255 255 255 / .25); color: #fff; }
/* A narrow column beside another (e.g. the bookings on a customer page at tablet width): its list rows keep the name
   readable, as on a phone, whatever the screen size. */
.two-col > .stack { container-type: inline-size; }
@container (max-width: 460px) {
  .card-head { flex-wrap: wrap; }
  .card-head h2 { flex: none; }
  .queue-item { gap: 11px; padding: 13px 14px; }
  .queue-item .dir-tag, .queue-item .leg-icons { display: none; }
  .trip-end { flex-direction: column; align-items: flex-end; gap: 4px; }
}
/* Phones: the date stays readable in a half-width box (dd/mm/yyyy fits beside the calendar button). */
@media (max-width: 480px) {
  .field .date-input .date-text { padding-left: 10px; padding-right: 36px; }
  .date-input .date-btn { right: 3px; width: 32px; }
  .field .date-input input[type=date] { width: 38px; }
  /* A date beside a time is too narrow on a phone: one under the other. */
  .grid-2:has(input[type=time]):has(.date-input) { grid-template-columns: minmax(0, 1fr); }
}
