:root {
  --ink: #101714;
  --ink-2: #5E6B66;
  --night: #0E1512;
  --night-2: #1C2722;
  --ground: #F4F5F2;
  --card: #FFFFFF;
  --line: #E2E6E3;
  --green: #0F6B4B;
  --green-dark: #0A4A34;
  --green-soft: #DDF3E6;
  --lime: #C7F284;
  --amber: #E3A33B;
  --amber-soft: #FDEDD3;
  --red: #B42318;
  --red-soft: #FEECEA;
  --radius: 18px;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--ground);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--green); }
a:hover { color: var(--green-dark); }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.label {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-2);
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink); color: var(--ground);
  padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
}
.topbar .brand { font-size: 20px; font-weight: 800; }
.topbar .sub { color: #A9B3AE; font-size: 14px; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 6px; }
.topbar nav button, .topbar .link-btn {
  background: transparent; color: var(--ground); border: 0; font: inherit;
  font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 8px; cursor: pointer; min-height: 40px;
}
.topbar nav button[aria-current="page"] { background: #9BD3B1; color: var(--ink); }

/* ---------- Layout ---------- */
.page { max-width: 1360px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.narrow { max-width: 860px; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.spread { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.split { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.split > .side { flex: 1 1 340px; min-width: 0; }
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 16px; }
}

/* ---------- Forms ---------- */
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  padding: 11px 13px; border: 2px solid var(--line); border-radius: 10px;
  background: #FFFFFF; min-height: 46px; width: 100%;
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #9BD3B1; outline-offset: 1px; }
textarea { resize: vertical; min-height: 80px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.check input { width: 22px; height: 22px; min-height: 0; }

.btn {
  font: inherit; font-weight: 700; font-size: 16px;
  border: 0; border-radius: 10px; padding: 12px 18px; min-height: 46px;
  cursor: pointer; background: var(--green); color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:hover { background: var(--green-dark); color: #FFFFFF; }
.btn.secondary { background: #FFFFFF; color: var(--green); border: 2px solid var(--green); }
.btn.secondary:hover { background: var(--green-soft); color: var(--green-dark); }
.btn.quiet { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn.danger { background: var(--red); }
.btn.big { width: 100%; min-height: 76px; font-size: 22px; font-weight: 800; border-radius: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.alert { padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.alert.error { background: var(--red-soft); color: var(--red); }
.alert.ok { background: var(--green-soft); color: var(--green-dark); }

.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill.done { background: #DDEFE4; color: var(--green-dark); }
.pill.open { background: var(--amber-soft); color: #8A5A0B; }
.pill.fail { background: var(--red-soft); color: var(--red); }

/* ---------- Driver: job list ---------- */
.job-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #FFFFFF; border-radius: var(--radius); padding: 18px; width: 100%;
  border: 0; font: inherit; text-align: left; cursor: pointer; color: var(--ink);
}
.job-card .title { font-size: 19px; font-weight: 700; }
.result {
  display: block; width: 100%; text-align: left; font: inherit; color: var(--ink);
  background: #FFFFFF; border: 2px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer;
}
.result:hover { border-color: var(--green); }

/* ---------- Driver: job form ---------- */
.job-head { background: var(--ink); color: var(--ground); padding: 22px 24px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.job-head h1 { margin: 2px 0; font-size: 26px; }
.time-box { background: #FFFFFF; border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.time-box .row input { flex: 1; font-family: var(--mono); font-size: 26px; font-weight: 700; min-height: 60px; }
.time-box .row .btn { min-height: 60px; }

.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--ground); border-radius: 12px; padding: 12px 14px; }
.stepper .name { font-size: 21px; font-weight: 700; }
.stepper .ctrls { display: flex; align-items: center; gap: 12px; }
.stepper button {
  width: 56px; height: 56px; border-radius: 12px; font-size: 28px; font-weight: 700; cursor: pointer;
  border: 2px solid #C9CFCB; background: #FFFFFF; color: var(--ink);
}
.stepper button.plus { background: var(--green); color: #FFFFFF; border-color: var(--green); }
.stepper .count { font-family: var(--mono); font-size: 34px; font-weight: 700; min-width: 48px; text-align: center; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.media-tile { position: relative; height: 120px; border-radius: 12px; overflow: hidden; background: #C7D3CC; }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tile .badge { position: absolute; left: 8px; bottom: 8px; background: rgba(28,35,33,.85); color: #FFFFFF; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.media-tile .remove {
  position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(28,35,33,.85); color: #FFFFFF; font-size: 18px; cursor: pointer;
}
.media-tile.uploading { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; background: #E6E5DF; font-size: 13px; font-weight: 600; }
.progress { width: 80%; height: 8px; background: #FFFFFF; border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); width: 0; }
.add-media {
  height: 120px; border-radius: 12px; border: 2px dashed var(--green); background: var(--green-soft);
  color: var(--green); font: inherit; font-weight: 700; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.save-state { font-size: 13px; color: var(--ink-2); }

/* ---------- Admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: #FFFFFF; border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi .value { font-family: var(--mono); font-size: 30px; font-weight: 700; }
.kpi .sub { font-size: 13px; color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); padding: 10px 8px; border-bottom: 2px solid #E6E5DF; white-space: nowrap; }
td { padding: 11px 8px; border-bottom: 1px solid #EEEDE8; vertical-align: top; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #F8F8F5; }
tr.selected { background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green); }
.detail-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-stats > div { background: var(--ground); border-radius: 8px; padding: 10px 12px; }
.detail-stats .v { font-family: var(--mono); font-weight: 700; font-size: 17px; }
.side .card { position: static; }

/* ---------- Login / report ---------- */
.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 440px; background: #FFFFFF; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--ground); border-radius: 10px; padding: 4px; }
.tabs button { font: inherit; font-weight: 700; border: 0; background: transparent; padding: 11px; border-radius: 8px; cursor: pointer; color: var(--ink-2); min-height: 44px; }
.tabs button[aria-selected="true"] { background: #FFFFFF; color: var(--ink); }

/* ---------- Offline / upload status ---------- */
.sync-banner { background: #E8F1EC; color: var(--green-dark); padding: 12px 24px; font-weight: 600; font-size: 15px; }
.sync-banner.warn { background: var(--amber-soft); color: #6B4508; }
.sync-banner a { color: inherit; }

/* ---------- Outcome choice ---------- */
.outcome-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.outcome-toggle button {
  min-height: 60px; border-radius: 12px; border: 2px solid var(--line); background: #FFFFFF;
  font: inherit; font-size: 18px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.outcome-toggle button[aria-checked="true"][data-outcome="Collected"] { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.outcome-toggle button[aria-checked="true"][data-outcome="NotCollected"] { background: #8A5A0B; border-color: #8A5A0B; color: #FFFFFF; }
.outcome-toggle button:disabled { opacity: .7; cursor: default; }

/* ---------- Office: dialogs, history, billing ---------- */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(28,35,33,.55); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; z-index: 50; }
.dialog { background: #FFFFFF; border-radius: 16px; width: 100%; max-width: 640px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog h2 { margin: 0; font-size: 22px; }
.history { display: flex; flex-direction: column; gap: 10px; }
.history .set { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; }
.history .meta { font-size: 13px; color: var(--ink-2); }
.history .chg { font-size: 14px; }
.history .old { text-decoration: line-through; color: var(--ink-2); }
.pill.void { background: #E6E5DF; color: var(--ink-2); }
.pill.edit { background: #E3ECF7; color: #1F4E8C; }
tr.voided td { color: var(--ink-2); text-decoration: line-through; }
.money { font-family: var(--mono); text-align: right; white-space: nowrap; }

/* ---------- Billing: fits without scrolling ---------- */
.bill-settings { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .bill-settings { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .bill-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bill-table { table-layout: auto; }
.bill-table td, .bill-table th { padding: 10px 6px; }
.bill-table td.actions, .bill-table th.actions { text-align: right; white-space: nowrap; width: 1%; }
.bill-table .btn { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.bill-table .sub { font-size: 12px; color: var(--ink-2); font-family: var(--mono); }
.bill-table tfoot td { border-top: 2px solid #E6E5DF; font-weight: 700; }
@media (max-width: 700px) {
  /* Phones: each customer becomes a small card */
  .bill-table thead { display: none; }
  .bill-table tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid #EEEDE8; }
  .bill-table td { border: 0; padding: 2px 0; }
  .bill-table td:first-child, .bill-table td.money, .bill-table td.actions { grid-column: 1 / -1; text-align: left; }
  .bill-table td[data-label]::before { content: attr(data-label) " "; color: var(--ink-2); font-size: 12px; }
}

/* ---------- Office: planner ---------- */
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 14px; }
.week-nav { display: flex; align-items: center; gap: 4px; background: #FFFFFF; border-radius: 10px; padding: 3px; }
.week-nav .btn { min-height: 38px; padding: 4px 12px; border: 0; font-size: 20px; }
.week-label { font-weight: 700; min-width: 132px; text-align: center; white-space: nowrap; }
.plan-today { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.today-chip { font: inherit; font-size: 14px; font-weight: 600; border: 2px solid var(--line); background: #FFFFFF; border-radius: 999px; padding: 6px 14px; cursor: pointer; color: var(--ink); }
.today-chip.all-done { border-color: var(--green); background: var(--green-soft); }

/* Day tabs */
.day-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day-tab {
  font: inherit; color: var(--ink); background: #FFFFFF; border: 2px solid transparent; border-radius: 12px;
  padding: 10px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
}
.day-tab:hover { border-color: var(--line); }
.day-tab .dname { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); white-space: nowrap; }
.day-tab .dnum { font-family: var(--mono); font-size: 24px; font-weight: 700; }
.day-tab .dsub { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.day-tab .dsub.warn { color: var(--red); font-weight: 700; }
.day-tab.is-today .dname { color: var(--green); }
.day-tab.is-past { background: #F8F8F5; }
.day-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); }
.day-tab[aria-selected="true"] .dname, .day-tab[aria-selected="true"] .dnum, .day-tab[aria-selected="true"] .dsub { color: #FFFFFF; }
@media (max-width: 640px) {
  .day-tabs { gap: 4px; }
  .day-tab { padding: 8px 2px; }
  .day-tab .dname { font-size: 11px; }
  .day-tab .dname, .day-tab .dsub { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .day-tab .dsub { font-size: 10px; }
}

/* The day's route */
.route-card { display: flex; flex-direction: column; gap: 14px; }
.route-progress { text-align: right; font-size: 14px; color: var(--ink-2); min-width: 120px; }
.route-progress .bar { height: 6px; background: #E6E5DF; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.route-progress .bar span { display: block; height: 100%; background: var(--green); }
.route { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.route-empty { padding: 28px 12px; text-align: center; color: var(--ink-2); background: var(--ground); border-radius: 12px; }
.route-stop {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 14px 4px; border-top: 1px solid #EEEDE8;
}
.route-stop:first-child { border-top: 0; }
.route-stop .num { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #FFFFFF; font-family: var(--mono); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.route-stop.done .num { background: var(--green); }
.route-stop .name { font-weight: 700; font-size: 17px; }
.route-stop .addr { font-size: 14px; color: var(--ink-2); }
.route-stop .note { font-size: 14px; margin-top: 4px; padding-left: 8px; border-left: 3px solid var(--amber); }
.route-stop .state { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.route-stop .job-link { font-size: 12px; }
.route-stop .acts { display: flex; gap: 4px; }
.icon-btn { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #FFFFFF; cursor: pointer; font: inherit; font-size: 15px; color: var(--ink); padding: 0 8px; }
.icon-btn.wide { font-size: 13px; font-weight: 700; }
.icon-btn:hover:not(:disabled) { border-color: var(--green); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
@media (max-width: 760px) {
  .route-stop { grid-template-columns: 34px minmax(0, 1fr); }
  .route-stop .state { grid-column: 2; flex-direction: row; align-items: center; }
  .route-stop .acts { grid-column: 2; }
}

/* Add customers panel */
.add-card { display: flex; flex-direction: column; gap: 12px; }
.add-open { display: flex; flex-direction: column; gap: 12px; }
.also-days { display: flex; flex-direction: column; gap: 6px; }
.also-list { display: flex; flex-wrap: wrap; gap: 6px; }
.also-day { position: relative; cursor: pointer; }
.also-day input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.also-day span { display: inline-block; padding: 5px 11px; border-radius: 999px; border: 2px solid var(--line); font-size: 13px; font-weight: 700; background: #FFFFFF; }
.also-day input:checked + span { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.also-day input:focus-visible + span { outline: 3px solid #9BD3B1; }
.cust-results { display: flex; flex-direction: column; max-height: 460px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.cust-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #EEEDE8; }
.cust-row:first-child { border-top: 0; }
.cust-row .name { font-weight: 700; }
.cust-row .addr { font-size: 13px; color: var(--ink-2); }
.cust-row .added { font-size: 13px; font-weight: 700; color: var(--green); white-space: nowrap; }
.week-tools { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ---------- Driver: planned stops ---------- */
.stop-card {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  background: #FFFFFF; border-radius: var(--radius); padding: 16px; width: 100%;
  border: 2px solid transparent; font: inherit; text-align: left; cursor: pointer; color: var(--ink);
}
.stop-card:hover { border-color: var(--green); }
.stop-card .num { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #FFFFFF; font-family: var(--mono); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.stop-card .title { font-size: 19px; font-weight: 700; }
.stop-card .addr { color: var(--ink-2); }
.stop-card .note { font-size: 15px; margin-top: 6px; padding-left: 10px; border-left: 3px solid var(--amber); }
.stop-card .go { font-weight: 800; color: var(--green); white-space: nowrap; }
.stop-card.done { opacity: .65; }
.stop-card.done .num { background: var(--green); }
.upcoming summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.upcoming .day { margin-top: 10px; }
.upcoming .day ol { margin: 6px 0 0; padding-left: 22px; }
.upcoming .day li { padding: 3px 0; }
.pill.todo { background: #E6E5DF; color: var(--ink); }

/* Planner: shade each day by how many stops it has */
.day-tab.load-1, .day-legend .load-1 { background: #E6F4EB; }
.day-tab.load-2, .day-legend .load-2 { background: #C4E6D0; }
.day-tab.load-3, .day-legend .load-3 { background: #96D1AC; }
.day-tab.load-1, .day-tab.load-2, .day-tab.load-3 { border-color: #9BD3B1; }
.day-tab.load-2 .dsub, .day-tab.load-3 .dsub, .day-tab.load-3 .dname { color: var(--green-dark); }
.day-tab.is-past.load-1, .day-tab.is-past.load-2, .day-tab.is-past.load-3 { filter: saturate(.55); }
.day-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); filter: none; }
.day-tab[aria-selected="true"] .dsub.warn { color: #F5A49E; }
.day-legend { grid-column: 1 / -1; display: flex; gap: 14px; justify-content: flex-end; font-size: 12px; color: var(--ink-2); }
.day-legend span { display: inline-flex; align-items: center; gap: 5px; }
.day-legend i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid #9BD3B1; display: inline-block; }
.day-tab.day-tab .dsub.warn { color: var(--red); font-weight: 700; }
.day-tab.day-tab[aria-selected="true"] .dname,
.day-tab.day-tab[aria-selected="true"] .dnum,
.day-tab.day-tab[aria-selected="true"] .dsub { color: #FFFFFF; }
.day-tab.day-tab[aria-selected="true"] .dsub.warn { color: #F5A49E; }

/* ---------- Dashboard: upcoming + month calendar ---------- */
.upcoming-card { display: flex; flex-direction: column; gap: 14px; }
.pill-btn { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.up-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1000px) { .up-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .up-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.up-day {
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-radius: 12px; padding: 12px;
  border: 2px solid var(--line); background: #FFFFFF; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.up-day:hover { border-color: var(--green); }
.up-day .dname { font-weight: 800; }
.up-day .ddate { font-size: 13px; color: var(--ink-2); }
.up-day .dcount { margin-top: 6px; font-size: 15px; }
.up-day .dcount b { font-family: var(--mono); font-size: 22px; }
.up-day .dcount .none { font-size: 13px; font-weight: 700; color: #8A5A0B; }
.up-day .dprog { font-size: 12px; font-weight: 700; color: var(--green-dark); }
.up-day .ddrivers { margin-top: 6px; font-size: 12px; color: var(--ink-2); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; }
.up-day.load-0 { background: #FFFFFF; }
.up-day.load-1, .cal-day.load-1 { background: #E6F4EB; border-color: #9BD3B1; }
.up-day.load-2, .cal-day.load-2 { background: #C4E6D0; border-color: #9BD3B1; }
.up-day.load-3, .cal-day.load-3 { background: #96D1AC; border-color: #7CC197; }

.dialog.wide { max-width: 860px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.cal-day {
  position: relative; font: inherit; color: var(--ink); cursor: pointer; aspect-ratio: 1.7 / 1; min-height: 52px;
  border: 2px solid #EEEDE8; background: #FFFFFF; border-radius: 10px; padding: 6px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
}
.cal-day .n { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.cal-day .c { align-self: flex-end; font-family: var(--mono); font-weight: 700; font-size: 13px; background: rgba(255,255,255,.75); border-radius: 6px; padding: 1px 6px; }
.cal-day .m { position: absolute; top: 4px; right: 7px; color: var(--red); font-size: 12px; }
.cal-day.other { opacity: .4; }
.cal-day.past:not(.sel) { filter: saturate(.6); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-day.sel { border-color: var(--ink); background-color: var(--ink); color: #FFFFFF; }
.cal-day.sel .c { background: rgba(255,255,255,.2); color: #FFFFFF; }
.cal-day:hover:not(.sel) { border-color: var(--green); }
.cal-legend { justify-content: flex-start; }
.cal-detail { border-top: 2px solid #EEEDE8; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.cal-driver { background: var(--ground); border-radius: 10px; padding: 10px 12px; }
.cal-driver ol { margin: 8px 0 0; padding-left: 22px; font-size: 14px; }
.cal-driver li { padding: 4px 0; }
.cal-driver li > span:first-child { margin-right: 6px; }
@media (max-width: 560px) {
  .cal-day { aspect-ratio: auto; min-height: 46px; padding: 4px; }
  .cal-day .n { font-size: 13px; }
  .cal-day .c { font-size: 11px; padding: 0 4px; }
}
.kpi .value { overflow-wrap: anywhere; } .kpi .value.long { font-size: 22px; }

/* ---------- Reports ---------- */
.rep-quick { gap: 6px; }
.rep-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-nav a { text-decoration: none; font-size: 13px; padding: 5px 12px; }
.rep-sections { display: flex; flex-direction: column; gap: 18px; }
.rep-card { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 12px; }
table.rep td, table.rep th { white-space: nowrap; }
table.rep .num { text-align: right; font-family: var(--mono); }
table.rep th.num { font-family: inherit; }
table.rep tfoot td { border-top: 2px solid #E6E5DF; font-weight: 700; }
.rep-card > .row > .row { max-width: 100%; }

/* =====================================================================
   Refreshed look (Nov 2026). Earlier rules stay for structure; these
   override colours, shapes and type. Backup of the old look:
   _backups/classic-look-2026-11-01
   ===================================================================== */
body { background: var(--ground); color: var(--ink); }
h1, h2 { letter-spacing: -0.02em; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); }
.muted { color: var(--ink-2); }

/* Surfaces */
.card { border: 1px solid var(--line); border-radius: var(--radius); }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; gap: 8px; }
.kpi .label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
.kpi .value { font-weight: 600; font-size: 32px; letter-spacing: -0.02em; }
.kpi .value.long { font-size: 22px; }

/* Forms and buttons */
input, select, textarea { border: 1.5px solid var(--line); border-radius: 12px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #A8DCBE; outline-offset: 1px; }
.btn { border-radius: 12px; font-weight: 700; }
.btn.quiet { border: 1.5px solid var(--line); background: #FFFFFF; color: var(--ink); }
.btn.quiet:hover { border-color: #C9D1CC; background: #FAFBF9; color: var(--ink); }
.btn.secondary { border-width: 1.5px; }
.btn.big { border-radius: 16px; }
.btn.small { border-radius: 10px; }

/* Status pills */
.pill { font-size: 12px; padding: 4px 10px; }
.pill.done { background: var(--green-soft); color: var(--green-dark); }
.pill.open { background: var(--amber-soft); color: #8A4B06; }
.pill.fail { background: var(--red-soft); color: var(--red); }
.pill.void, .pill.todo { background: #EEF0EE; color: var(--ink); }
.pill.edit { background: #E3ECF7; color: #1F4E8C; }
.alert { border-radius: 12px; }
.alert.error { background: var(--red-soft); color: var(--red); }
.alert.ok { background: var(--green-soft); color: var(--green-dark); }

/* Tables */
th { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink-2); border-bottom: 1px solid var(--line); }
td { border-bottom: 1px solid #EEF0EE; }
tr.clickable:hover { background: #F8F9F7; }
tr.selected { background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green); }

/* Dark headers (driver app, customer pages) */
.topbar { background: var(--night); }
.topbar .sub { color: #93A39C; }
.topbar nav button[aria-current="page"] { background: var(--lime); color: var(--night); }
.job-head { background: var(--night); border-radius: 0 0 26px 26px; }
.sync-banner { background: var(--green-soft); color: var(--green-dark); }
.sync-banner.warn { background: var(--amber-soft); color: #6B3A04; }

/* Login */
.login-card { border: 1px solid var(--line); border-radius: 22px; }
.tabs { background: #E9ECE9; border-radius: 14px; }
.tabs button { border-radius: 10px; }

/* ---------- Office: top menu with icons ---------- */
.shell { display: flex; flex-direction: column; min-height: 100vh; }
.sidebar {
  background: var(--night); color: #E7ECE9; box-sizing: border-box;
  padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
}
.side-brand { display: flex; align-items: center; gap: 12px; }
.side-brand .mark { width: 38px; height: 38px; border-radius: 11px; background: var(--lime); color: var(--night); display: flex; align-items: center; justify-content: center; flex: none; }
.side-brand .name { font-weight: 800; font-size: 17px; }
.side-brand .company { font-size: 12px; color: #93A39C; }
.side-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; justify-content: flex-end; }
.side-nav button {
  font: inherit; font-size: 14px; font-weight: 600; color: #B8C4BF; background: transparent; border: 0;
  display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 10px; cursor: pointer; min-height: 42px;
}
.side-nav button:hover { background: #16201C; color: #FFFFFF; }
.side-nav button[aria-current="page"] { background: var(--night-2); color: #FFFFFF; font-weight: 700; }
.side-nav button[aria-current="page"] svg { color: var(--lime); }
.side-foot { display: flex; align-items: center; }
.side-foot .avatar, .side-foot .who { display: none; }
.side-foot button { font: inherit; font-size: 14px; font-weight: 600; background: transparent; border: 1px solid #2A3833; color: #B8C4BF; cursor: pointer; min-height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 10px; }
.side-foot button:hover { background: #2A3833; color: #FFFFFF; }
.shell-main { flex: 1; min-width: 0; }
.page-head { display: flex; flex-direction: column; gap: 4px; }
.page-head .date { font-size: 14px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 1100px) {
  .side-nav { order: 3; flex: 1 1 100%; justify-content: flex-start; }
  .side-brand { flex: 1; }
}
@media (max-width: 640px) {
  .sidebar { padding: 12px 14px; }
  .side-nav button { padding: 8px 10px; }
  .side-nav button svg { display: none; }
}

/* Dashboard: today row */
.today-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.drv-row { display: flex; flex-direction: column; gap: 8px; }
.drv-row + .drv-row { margin-top: 16px; }
.drv-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.drv-who { display: flex; align-items: center; gap: 10px; }
.drv-av { width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.drv-name { font-weight: 700; }
.drv-sub { font-size: 12px; color: var(--ink-2); }
.bar { height: 8px; border-radius: 4px; background: #EEF0EE; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.attn { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--ground); color: var(--ink); text-decoration: none; border: 0; font: inherit; text-align: left; width: 100%; cursor: pointer; }
.attn + .attn { margin-top: 8px; }
.attn.red { background: var(--red-soft); }
.attn.amber { background: #FDF3E1; }
.attn .ic { width: 36px; height: 36px; border-radius: 10px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; flex: none; color: var(--ink-2); }
.attn.red .ic { color: var(--red); }
.attn.amber .ic { color: #8A4B06; }
.attn .t { display: flex; flex-direction: column; flex: 1; }
.attn .t b { font-size: 14px; }
.attn .t span { font-size: 12px; color: var(--ink-2); }

/* Upcoming / planner colours in the new palette */
.up-day { border: 1px solid var(--line); border-radius: 14px; }
.up-day.load-1, .cal-day.load-1, .day-tab.load-1 { background: #EEF7F1; border-color: #CBE6D5; }
.up-day.load-2, .cal-day.load-2, .day-tab.load-2 { background: var(--green-soft); border-color: #B5DFC5; }
.up-day.load-3, .cal-day.load-3, .day-tab.load-3 { background: #BFE6CD; border-color: #9BD3B1; }
.day-legend .load-1 { background: #EEF7F1; } .day-legend .load-2 { background: var(--green-soft); } .day-legend .load-3 { background: #BFE6CD; }
.day-tab[aria-selected="true"], .cal-day.sel { background: var(--night) !important; border-color: var(--night) !important; }
.route-stop .num, .stop-card .num, .stop .num { background: var(--night); border-radius: 10px; }
.route-stop.done .num, .stop-card.done .num { background: var(--green); }
.today-chip { border: 1.5px solid var(--line); }
.week-nav { border: 1px solid var(--line); border-radius: 12px; }

/* ---------- Driver app ---------- */
.driver-head { padding: 18px 20px; }
.driver-head .chips { display: flex; gap: 8px; align-items: center; }
.chip-dark { font-size: 12px; font-weight: 700; background: var(--night-2); color: #E7ECE9; border-radius: 999px; padding: 6px 10px; }
.chip-dark.lime { color: var(--lime); }
.route-bar { display: grid; gap: 4px; margin-top: 4px; }
.route-bar span { height: 8px; border-radius: 4px; background: #2A3833; }
.route-bar span.done { background: var(--lime); }
.route-bar span.now { background: #5E6B66; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); margin: 6px 0 2px; }
.stop-card { border: 0; border-radius: 16px; }
.stop-card:hover { border-color: transparent; box-shadow: 0 0 0 2px var(--green) inset; }
.next-stop { background: #FFFFFF; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; border: 2px solid var(--green); }
.next-stop .top { display: flex; gap: 14px; align-items: flex-start; }
.next-stop .num { width: 42px; height: 42px; border-radius: 12px; background: var(--green); color: #FFFFFF; font-family: var(--mono); font-weight: 600; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.next-stop .title { font-size: 20px; font-weight: 800; }
.next-stop .addr { color: var(--ink-2); }
.next-stop .note { margin-top: 8px; font-size: 15px; background: #FDF3E1; color: #6B3A04; border-radius: 10px; padding: 8px 10px; }
.next-stop .acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.next-stop .acts .btn { min-height: 56px; font-size: 17px; border-radius: 14px; }
.job-card { border-radius: 16px; }
.result { border-radius: 12px; border: 1.5px solid var(--line); }
#new-job-btn.secondary { border-style: dashed; border-color: #9AA6A1; color: var(--ink); background: transparent; }
.time-box { border-radius: 16px; border: 0; }
.stepper { background: #FFFFFF; border-radius: 16px; }
.stepper button { border-radius: 14px; border: 1.5px solid #D5DBD7; }
.stepper button.plus { background: var(--green); border-color: var(--green); }
.outcome-toggle { background: #E6E9E6; border-radius: 16px; padding: 5px; gap: 6px; }
.outcome-toggle button { border: 0; background: transparent; color: var(--ink-2); border-radius: 12px; min-height: 52px; }
.outcome-toggle button[aria-checked="true"][data-outcome="Collected"] { background: #FFFFFF; color: var(--green-dark); border: 0; box-shadow: 0 1px 2px rgba(16,23,20,.08); }
.outcome-toggle button[aria-checked="true"][data-outcome="NotCollected"] { background: #FFFFFF; color: #8A4B06; border: 0; box-shadow: 0 1px 2px rgba(16,23,20,.08); }
.media-tile { border-radius: 12px; }
.add-media { border-radius: 12px; border: 1.5px dashed var(--green); background: #EEF7F1; color: var(--green-dark); }
#complete-btn { position: sticky; bottom: 12px; z-index: 5; box-shadow: 0 6px 20px rgba(14,21,18,.18); }

/* =====================================================================
   Direction 1 — "Clean & airy" (applied Nov 2026). Same content as before,
   lighter surfaces, bigger type, one blue accent. Loaded last, so it wins.
   ===================================================================== */
:root {
  --accent: #2F4BE0;
  --accent-dark: #1E35B8;
  --accent-soft: #EEF1FF;
  --ink: #0B1220;
  --ink-2: #667085;
  --line: #EAECF0;
  --ground: #FAFBFC;
  --card: #FFFFFF;
  /* the old "green" tokens now carry the accent, so every primary button, bar and highlight turns blue */
  --green: #2F4BE0;
  --green-dark: #1E35B8;
  --green-soft: #EEF1FF;
  --lime: #2F4BE0;
  --night: #0B1220;
  --night-2: #EEF1FF;
  /* status colours (kept separate from the accent) */
  --ok: #027A48; --ok-soft: #ECFDF3;
  --warn: #B54708; --warn-soft: #FFFAEB;
  --bad: #B42318; --bad-soft: #FEF3F2;
  --amber-soft: #FFFAEB;
  --red: #B42318; --red-soft: #FEF3F2;
  --mono: "Figtree", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --radius: 20px;
}
body { font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--ground); color: var(--ink); }
.mono, .kpi .value, .money, .stepper .count, table.rep .num { font-family: "Figtree", system-ui, sans-serif; font-variant-numeric: tabular-nums; font-weight: 700; }
.page h1 { font-size: 38px !important; font-weight: 800; letter-spacing: -0.035em !important; }
h2 { letter-spacing: -0.02em; }
.label { color: var(--ink-2); letter-spacing: .05em; }

/* Surfaces: shadows instead of borders */
.card, .kpi, .plan-day, .login-card, .dialog { border: 0 !important; box-shadow: var(--shadow); border-radius: var(--radius); }
.kpi { padding: 22px 24px; }
.kpi .label { font-size: 14px; }
.kpi .value { font-size: 40px; font-weight: 800; letter-spacing: -0.035em; }
.kpi .value.long { font-size: 26px; }

/* Buttons and inputs */
.btn { background: var(--accent); border-radius: 12px; }
.btn:hover { background: var(--accent-dark); }
.btn:not(.quiet):not(.secondary):not(.danger) { box-shadow: 0 6px 16px rgba(47,75,224,.22); }
.btn.secondary { color: var(--accent); border-color: #C9D3FF; background: #FFFFFF; }
.btn.secondary:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn.quiet { border: 1px solid var(--line); background: #FFFFFF; }
.btn.danger { background: var(--bad); }
input, select, textarea { border: 1px solid #D0D5DD; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #C9D3FF; outline-offset: 1px; border-color: var(--accent); }
a { color: var(--accent); } a:hover { color: var(--accent-dark); }

/* Status pills */
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.open { background: var(--warn-soft); color: var(--warn); }
.pill.fail { background: var(--bad-soft); color: var(--bad); }
.pill.void, .pill.todo { background: #F2F4F7; color: #344054; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.error { background: var(--bad-soft); color: var(--bad); }

/* Tables */
th { color: var(--ink-2); border-bottom: 1px solid var(--line); }
td { border-bottom: 1px solid #F2F4F7; }
tr.selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- Office top bar: light, pill navigation ---------- */
.sidebar { background: #FFFFFF; color: var(--ink); border-bottom: 1px solid var(--line); padding: 14px 32px; }
.side-brand .mark { background: var(--accent); color: #FFFFFF; border-radius: 10px; width: 34px; height: 34px; }
.side-brand .company { color: var(--ink-2); }
.side-nav { flex: 0 1 auto; margin: 0 auto; background: #F2F4F7; border-radius: 999px; padding: 4px; gap: 2px; justify-content: center; }
.side-nav button { color: var(--ink-2); border-radius: 999px; padding: 8px 16px; min-height: 40px; }
.side-nav button:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.side-nav button[aria-current="page"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.side-nav button[aria-current="page"] svg { color: var(--accent); }
.side-foot button { border: 1px solid var(--line); color: var(--ink-2); }
.side-foot button:hover { background: #F2F4F7; color: var(--ink); }
.shell-main > .page { padding-top: 40px; gap: 28px; }
@media (max-width: 1100px) { .side-nav { margin: 0; border-radius: 16px; } }

/* Dashboard bits */
.attn { background: #F8F9FB; }
.attn.red { background: var(--bad-soft); } .attn.red .ic { color: var(--bad); }
.attn.amber { background: var(--warn-soft); } .attn.amber .ic { color: var(--warn); }
.drv-av { background: var(--accent-soft); color: var(--accent); }
.bar { background: #F2F4F7; } .bar > span { background: var(--accent); }
.today-chip { border: 1px solid var(--line); background: #FFFFFF; }
.today-chip.all-done { border-color: #ABEFC6; background: var(--ok-soft); }
.up-day { border: 1px solid var(--line); background: #FFFFFF; }
.up-day .dcount .none { color: var(--warn); }
.up-day .dprog { color: var(--ok); }

/* Busy-ness shading (planner, upcoming, calendar) in blue tints */
.up-day.load-1, .cal-day.load-1, .day-tab.load-1, .day-legend .load-1 { background: #F5F7FF; border-color: #DCE3FF; }
.up-day.load-2, .cal-day.load-2, .day-tab.load-2, .day-legend .load-2 { background: #E4E9FF; border-color: #C9D3FF; }
.up-day.load-3, .cal-day.load-3, .day-tab.load-3, .day-legend .load-3 { background: #C9D3FF; border-color: #A4B4FF; }
.day-tab.load-2 .dsub, .day-tab.load-3 .dsub, .day-tab.load-3 .dname { color: var(--accent-dark); }
.day-tab { box-shadow: var(--shadow); border-color: transparent; }
.day-tab[aria-selected="true"], .cal-day.sel { background: var(--accent) !important; border-color: var(--accent) !important; }
.day-tab.day-tab .dsub.warn, .up-day .dsub.warn { color: var(--bad); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.route-stop .num, .stop-card .num, .stop .num { background: var(--ink); }
.route-stop.done .num, .stop-card.done .num { background: var(--ok); }
.route-progress .bar span { background: var(--accent); }
.week-nav { background: #FFFFFF; }
.cal-driver { background: #F8F9FB; }
.icon-btn:hover:not(:disabled) { border-color: var(--accent); }

/* ---------- Light headers (driver app, customer pages) ---------- */
.topbar { background: #FFFFFF; color: var(--ink); border-bottom: 1px solid var(--line); }
.topbar .brand { color: var(--ink); }
.topbar .sub { color: var(--ink-2); }
.topbar .link-btn { color: var(--ink-2); border: 1px solid var(--line); }
.chip-dark { background: var(--accent-soft); color: var(--accent); }
.chip-dark.lime { color: var(--accent); }
.driver-head .brand { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.job-head { background: #FFFFFF; color: var(--ink); border-radius: 0; border-bottom: 1px solid var(--line); }
.job-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.sync-banner { background: var(--ok-soft); color: var(--ok); }
.sync-banner.warn { background: var(--warn-soft); color: var(--warn); }

/* Driver: stops */
.route-card-head { box-shadow: var(--shadow); }
.route-bar span { background: #EAECF0; }
.route-bar span.done { background: var(--ok); }
.route-bar span.now { background: var(--accent); }
.next-stop { border: 0; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 14px 36px rgba(16,24,40,.10); border-radius: 24px; padding: 22px; }
.next-stop .num { background: var(--accent); }
.next-stop .title { font-size: 24px; letter-spacing: -0.02em; }
.next-stop .note { background: #F2F4F7; color: #344054; }
.next-stop .acts .btn { border-radius: 16px; }
.stop-card, .job-card { box-shadow: var(--shadow); }
.stop-card:hover { box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow); }
.stop-card .go { color: var(--accent); }
.stop-card .note { border-left-color: #D0D5DD; }
.section-label { color: var(--ink-2); }
#new-job-btn.secondary { border: 0; background: #F2F4F7; color: #344054; box-shadow: none; }

/* Driver: job form */
.time-box, .stepper { box-shadow: var(--shadow); background: #FFFFFF; }
.stepper button { border: 1px solid #D0D5DD; }
.stepper button.plus { background: var(--accent); border-color: var(--accent); }
.outcome-toggle { background: #F2F4F7; }
.outcome-toggle button[aria-checked="true"][data-outcome="Collected"] { color: var(--ok); }
.outcome-toggle button[aria-checked="true"][data-outcome="NotCollected"] { color: var(--warn); }
.add-media { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
#complete-btn { box-shadow: 0 10px 24px rgba(47,75,224,.3); }

/* Login */
.tabs { background: #F2F4F7; }
.tabs button[aria-selected="true"] { box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.kpi .value { white-space: nowrap; overflow-wrap: normal; font-size: clamp(28px, 2.7vw, 40px); }
.kpi .value.long { font-size: clamp(18px, 1.6vw, 24px); }
.day-tab.is-past:not(.load-1):not(.load-2):not(.load-3) { background: #F8F9FB; }

/* ---------- More contrast (navy bars, tinted background, firmer edges) ---------- */
:root {
  --navy: #0F1A3D;
  --navy-2: #1B2853;
  --ground: #E9EDF4;
  --ink-2: #475467;
  --line: #DCE1EA;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 6px 18px rgba(16,24,40,.07);
}
body { background: var(--ground); }
.card, .kpi, .plan-day, .login-card, .dialog, .day-tab, .up-day, .stop-card, .job-card, .time-box, .stepper, .route-card-head, .next-stop { border: 1px solid var(--line) !important; }
.next-stop { border: 2px solid var(--accent) !important; }
th { background: #F3F5F9; color: #344054; }
thead th:first-child { border-top-left-radius: 8px; } thead th:last-child { border-top-right-radius: 8px; }
input, select, textarea { border-color: #C8CFDA; }
.label { color: #475467; }
.kpi .label { color: #344054; font-weight: 700; }
.kpi .sub, .muted { color: var(--ink-2); }
.up-day.load-0 { background: #FFFFFF; }
.attn { background: #F3F5F9; }

/* Office bar */
.sidebar { background: var(--navy); color: #FFFFFF; border-bottom: 0; }
.side-brand .name { color: #FFFFFF; }
.side-brand .company { color: #A5B0CF; }
.side-brand .mark { background: var(--accent); color: #FFFFFF; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.side-nav { background: rgba(255,255,255,.08); }
.side-nav button { color: #C7CEE4; }
.side-nav button:hover { background: rgba(255,255,255,.10); color: #FFFFFF; }
.side-nav button[aria-current="page"] { background: #FFFFFF; color: var(--navy); box-shadow: none; }
.side-foot button { border-color: rgba(255,255,255,.22); color: #C7CEE4; }
.side-foot button:hover { background: rgba(255,255,255,.10); color: #FFFFFF; }

/* Driver app and customer pages */
.topbar { background: var(--navy); color: #FFFFFF; border-bottom: 0; }
.topbar .brand { color: #FFFFFF; }
.topbar .sub { color: #A5B0CF; }
.topbar .link-btn { color: #E4E8F5; border-color: rgba(255,255,255,.25); }
.topbar #company { color: #9DB0FF !important; }
.chip-dark, .chip-dark.lime { background: rgba(255,255,255,.12); color: #FFFFFF; }
.job-head { background: var(--navy-2); color: #FFFFFF; border-bottom: 0; border-radius: 0 0 24px 24px; }
.job-head h1 { color: #FFFFFF; }
#job-number { color: #A5B0CF !important; }
#job-address { color: #D3D9EC !important; }
.kpi .value.long { font-size: clamp(16px, 1.45vw, 22px); }
/* Tiles never spill: clip, and let very long values shrink */
.kpi { min-width: 0; overflow: hidden; }
.kpi .value { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi .value.mid { font-size: clamp(22px, 2vw, 30px); } .kpi .value.long { font-size: clamp(18px, 1.55vw, 24px); }
/* Reports: green table headings and totals */
table.rep th { background: #D1FADF; color: #05603A; border-bottom: 1px solid #A6F4C5; font-weight: 700; }
table.rep tfoot td { background: #ECFDF3; color: #05603A; border-top: 1px solid #A6F4C5; }
/* Green table headings and totals everywhere (Dashboard, Customers, Trucks & drivers, Billing, Reports) */
th { background: #D1FADF; color: #05603A; border-bottom: 1px solid #A6F4C5; font-weight: 700; }
tfoot td, .bill-table tfoot td { background: #ECFDF3; color: #05603A; border-top: 1px solid #A6F4C5; }

/* ---------- Finishing touches ---------- */
/* Busy-day shading is data → green. The chosen day stays blue. */
.up-day.load-1, .cal-day.load-1, .day-tab.load-1, .day-legend .load-1 { background: #ECFDF3; border-color: #A6F4C5 !important; }
.up-day.load-2, .cal-day.load-2, .day-tab.load-2, .day-legend .load-2 { background: #D1FADF; border-color: #A6F4C5 !important; }
.up-day.load-3, .cal-day.load-3, .day-tab.load-3, .day-legend .load-3 { background: #A6F4C5; border-color: #6CE9A6 !important; }
.day-tab.load-1 .dname, .day-tab.load-2 .dname, .day-tab.load-3 .dname,
.day-tab.load-1 .dsub, .day-tab.load-2 .dsub, .day-tab.load-3 .dsub,
.up-day.load-1 .ddrivers, .up-day.load-2 .ddrivers, .up-day.load-3 .ddrivers { color: #05603A; }
.day-tab[aria-selected="true"], .cal-day.sel { background: var(--accent) !important; border-color: var(--accent) !important; box-shadow: 0 6px 16px rgba(47,75,224,.3); }
.day-tab[aria-selected="true"] .dname, .day-tab[aria-selected="true"] .dnum, .day-tab[aria-selected="true"] .dsub { color: #FFFFFF !important; }
.day-tab[aria-selected="true"] .dsub.warn { color: #FFD7D3 !important; }
.up-day .dcount .none { color: #B54708; }
.up-day.load-0 { border: 1.5px dashed #F7B27A !important; }

/* Row highlight in tables */
tbody tr { transition: background-color .12s ease; }
tbody tr:hover { background: #F0FDF4; box-shadow: inset 3px 0 0 #039855; }
tbody tr.selected, tbody tr.selected:hover { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }

/* Loading placeholders */
@keyframes skel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.skel { display: block; height: 12px; border-radius: 6px; background: #E4E7EC; animation: skel-pulse 1.4s ease-in-out infinite; }
.skel.big { height: 30px; border-radius: 8px; }
.skel-wrap.lines { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.skel-wrap.tiles { display: contents; }
.skel-tile { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 96px; }
.skel-wrap.cards { display: flex; flex-direction: column; gap: 18px; }
.skel-card { display: flex; flex-direction: column; gap: 14px; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* Empty states */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 16px; }
.empty-ic { width: 52px; height: 52px; border-radius: 50%; background: #ECFDF3; color: #039855; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.empty-t { font-weight: 800; font-size: 17px; color: var(--ink); }
.empty-s { font-size: 14px; color: var(--ink-2); max-width: 340px; }
.empty-a { margin-top: 6px; font-size: 14px; font-weight: 700; padding: 10px 16px; border-radius: 10px; background: var(--accent-soft); text-decoration: none; }
td .empty { padding: 30px 16px; }
tbody tr:has(.empty):hover { background: transparent; box-shadow: none; }
.route-empty { background: transparent; padding: 0; }

/* =====================================================================
   The Garbage Doctor brand (colours taken from the logo)
   navy #0A1B33 · blue #0B78B5 (logo blue, darkened so white text stays readable) · green #10A966
   ===================================================================== */
:root {
  --navy: #0A1B33;
  --navy-2: #12294A;
  --accent: #0B78B5;
  --accent-dark: #085E8E;
  --accent-soft: #E6F3FA;
  --green: #0B78B5; --green-dark: #085E8E; --green-soft: #E6F3FA; --lime: #0B78B5;
  --brand-green: #10A966;
}
.btn:not(.quiet):not(.secondary):not(.danger) { box-shadow: 0 6px 16px rgba(11,120,181,.25); }
.btn.secondary { border-color: #B7DDF0; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline-color: #B7DDF0; }
#complete-btn { box-shadow: 0 10px 24px rgba(11,120,181,.3); }
.day-tab[aria-selected="true"], .cal-day.sel { box-shadow: 0 6px 16px rgba(11,120,181,.3); }
.topbar #company { color: #5BD6A0 !important; }
.sidebar, .topbar { background: var(--navy); }
.job-head { background: var(--navy-2); }

/* Logo and wordmark */
.brand-emblem { width: 40px; height: 40px; flex: none; display: block; }
.wordmark { display: inline-flex; flex-direction: column; line-height: 1; font-family: "Montserrat", "Figtree", sans-serif; }
.wordmark .wm-1 { font-weight: 800; font-size: 15px; letter-spacing: .02em; color: #FFFFFF; }
.wordmark .wm-2 { font-weight: 700; font-size: 11px; letter-spacing: .32em; color: var(--brand-green); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.side-brand { gap: 10px; }
.side-brand .brand-area { font-size: 12px; font-weight: 700; color: #A5B0CF; border-left: 1px solid rgba(255,255,255,.2); padding-left: 10px; margin-left: 2px; }
.side-brand .mark, .side-brand .name, .side-brand .company { display: none; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wordmark.big { align-items: center; }
.wordmark.big .wm-1 { font-size: 26px; color: var(--navy); }
.wordmark.big .wm-2 { font-size: 16px; margin-top: 6px; }
.wordmark.big .wm-2 i { display: block; width: 46px; height: 3px; border-radius: 2px; background: var(--brand-green); }

/* ===== Regular (recurring) collections ===== */
.pill.regular { background: #E7F7EF; color: #0B7A4B; border: 1px solid #BDE9D3; white-space: nowrap; }
.rr-icon { color: var(--brand-green); font-weight: 800; }
.sched-days .also-day span { padding: 8px 14px; font-size: 14px; }
.sched-days .also-day input:checked + span { background: var(--brand-green); border-color: var(--brand-green); }
.repeat-check { align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #F1FAF5; border: 1px solid #CDEBDC; font-size: 14px; line-height: 1.35; }
.repeat-check input { margin-top: 2px; accent-color: var(--brand-green); }
.regular-card { display: flex; flex-direction: column; gap: 10px; }
.regular-list { display: flex; flex-direction: column; gap: 8px; }
.regular-row { font: inherit; text-align: left; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF; color: var(--ink); }
.regular-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.regular-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.rr-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-sum { grid-column: 1; font-size: 13px; color: var(--ink-2); }
.rr-next { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px; font-weight: 700; color: var(--accent-dark); white-space: nowrap; }
.regular-box { background: #F1FAF5; border: 1px solid #CDEBDC; padding: 12px; border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.regular-item { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ri-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ri-sum { font-weight: 700; }
.ri-sub { font-size: 13px; }
.ri-note { font-size: 13px; color: var(--ink); background: var(--amber-soft); border-radius: 8px; padding: 4px 8px; margin-top: 4px; }
.regular-sub { font-size: 12px; font-weight: 600; color: #0B7A4B; margin-top: 2px; }
.regular-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; background: #F1FAF5; border: 1px solid #CDEBDC; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.btn.danger-text { color: var(--bad); }
.btn.danger-text:hover { background: var(--bad-soft); }

/* ===== Customer sign-off ===== */
.pill.sign { background: #EEF2FF; color: #3538CD; border: 1px solid #C7D7FE; white-space: nowrap; }
.sign-check { align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #F5F7FF; border: 1px solid #DCE3FB; font-size: 14px; line-height: 1.35; }
.sign-check input { margin-top: 1px; width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--accent); }
.sign-check span, .repeat-check span { font-weight: 500; }
.sign-check strong, .repeat-check strong { font-weight: 700; }
.sign-card { display: flex; flex-direction: column; gap: 12px; border: 2px solid var(--accent); }
.req-pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 11px; letter-spacing: .04em; vertical-align: 1px; }
.sig-wrap { position: relative; height: 220px; border-radius: 14px; background: #FFFFFF; border: 2px dashed #B9C3D3; overflow: hidden; }
.sig-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; }
.sig-hint { position: absolute; left: 18px; right: 18px; bottom: 46px; border-bottom: 2px solid #D6DCE6; padding-bottom: 4px; color: #98A2B3; font-weight: 700; font-size: 15px; pointer-events: none; }
.sig-img { display: block; width: 100%; max-height: 220px; object-fit: contain; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; }
.sig-view { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.sig-view img { max-width: 360px; width: 100%; height: 110px; object-fit: contain; object-position: left center; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
