:root {
  --ink: #182033;
  --muted: #6c7689;
  --line: #e3e7ee;
  --soft: #f5f7fa;
  --brand: #2956d7;
  --nav: #10233f;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: #f4f6f9;
  color: var(--ink);
  font:
    14px Arial,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #10233f, #2956d7);
}
.auth-card {
  width: min(420px, 92vw);
  background: white;
  padding: 36px;
  border-radius: 18px;
  box-shadow: 0 25px 80px #0005;
}
.logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #2956d7, #1db79b);
  color: white;
  font-size: 20px;
  font-weight: 800;
}
.auth h1 {
  font-size: 32px;
  margin: 5px 0;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  color: var(--brand);
}
.tabs,
.segmented {
  display: flex;
  background: var(--soft);
  padding: 4px;
  border-radius: 9px;
  margin: 24px 0;
}
.tabs button,
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px;
  border-radius: 7px;
}
.tabs button.active,
.segmented button.active {
  background: white;
  color: var(--brand);
  box-shadow: 0 1px 5px #2232;
}
.auth form {
  display: grid;
  gap: 14px;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 4px;
  text-decoration: underline;
}
.auth label,
.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #586174;
}
.auth input,
.form-grid input,
.form-grid select,
.form-grid textarea,
.wide-search,
.filter select {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  padding: 11px;
  background: white;
}
.primary {
  border: 0;
  background: var(--brand);
  color: white;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 700;
}
.message {
  min-height: 20px;
  margin: 14px 0;
  color: #b42318;
}
.auth-card > small {
  color: var(--muted);
}
.demo-notice {
  margin-top: 14px;
  border-left: 4px solid #e9a23b;
  background: #fff7e8;
  color: #79531d;
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 11px;
  line-height: 1.4;
}
.shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}
.shell > aside {
  position: fixed;
  width: 230px;
  inset: 0 auto 0 0;
  background: var(--nav);
  color: #dce2ed;
  padding: 23px 15px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 9px 25px;
}
.brand > div:last-child {
  display: grid;
}
.brand small {
  color: #8490a5;
}
.shell nav {
  display: grid;
  gap: 5px;
}
.shell nav button {
  border: 0;
  background: transparent;
  color: #99a6bb;
  border-radius: 8px;
  padding: 12px;
  text-align: left;
}
.shell nav button.active {
  background: #263253;
  color: white;
}
.shell nav span {
  margin-left: 10px;
}
.userbox {
  margin-top: auto;
  border-top: 1px solid #28344b;
  padding: 17px 8px;
  display: grid;
  gap: 5px;
}
.userbox small {
  color: #8b98ad;
}
.userbox button {
  border: 0;
  background: transparent;
  color: #aab4c4;
  text-align: left;
  padding: 6px 0;
}
.userbox .legal {
  margin-top: 6px;
  padding-top: 9px;
  border-top: 1px solid #ffffff12;
  font-size: 9px;
  line-height: 1.45;
  color: #78919a;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.workspace > header {
  height: 88px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
}
.workspace h1 {
  margin: 2px 0;
}
.mobile-logout { display: none; }
.driver-agenda { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }
.driver-vehicle-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 14px; background: linear-gradient(135deg,#172554,#2956d7); color: white; }
.driver-vehicle-summary div { display: grid; gap: 3px; }
.driver-vehicle-summary small { opacity: .75; }
.driver-vehicle-summary b { font-size: 19px; }
.driver-vehicle-summary > span { padding: 7px 10px; border-radius: 999px; background: #ffffff24; font-weight: 700; }
.driver-job-list { display: grid; gap: 10px; }
.driver-job-card { position: relative; display: grid; gap: 5px; width: 100%; border: 1px solid var(--line); border-left: 7px solid var(--status-color); border-radius: 13px; background: white; padding: 15px 16px; text-align: left; color: var(--ink); box-shadow: 0 2px 10px #1725540d; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.driver-job-card:active { transform: scale(.995); background: #f8fafc; }
.driver-job-card strong { font-size: 16px; }
.driver-job-card span { line-height: 1.35; }
.driver-job-card em { width: fit-content; margin-top: 3px; padding: 5px 8px; border-radius: 6px; background: #eef2ff; color: var(--status-color); font-style: normal; font-weight: 800; }
.driver-job-time { color: var(--status-color); font-size: 18px; font-weight: 800; }
.driver-empty { display: grid; gap: 7px; padding: 24px 18px; border: 1px dashed #cbd5e1; border-radius: 13px; background: white; text-align: center; }
.driver-empty span { color: var(--muted); }
.page {
  padding: 22px 25px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 15px;
  margin-bottom: 16px;
}
.toolbar .segmented {
  margin: 0;
  width: 220px;
}
.date-nav {
  display: flex;
  gap: 7px;
  align-items: center;
}
.date-nav button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 7px 10px;
}
.date-nav strong {
  margin-left: 8px;
  text-transform: capitalize;
}
.filter {
  margin-left: auto;
  color: var(--muted);
}
.group-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -5px 0 14px;
}
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -7px 0 13px;
}
.status-legend span {
  border-left: 4px solid;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
}
.status-legend span[style] {
  background: color-mix(in srgb, var(--status-color) 24%, white);
  border-color: var(--status-color);
  color: color-mix(in srgb, var(--status-color) 70%, black);
}
.status-legend .planned {
  background: #edf0ff;
  border-color: #6070e8;
  color: #33406a;
}
.status-legend .confirmed {
  background: #e7f8f1;
  border-color: #2bad7c;
  color: #276b56;
}
.status-legend .in-progress {
  background: #fff4d8;
  border-color: #e4a72d;
  color: #795414;
}
.status-legend .completed {
  background: #eef1f5;
  border-color: #778397;
  color: #4e596b;
}
.status-legend .sick,
.vehicle-block.sick {
  background: #ffe8ec;
  border-color: #d94a63;
  color: #8a2638;
}
.status-legend .vacation,
.vehicle-block.vacation {
  background: #f1eaff;
  border-color: #8d5bd7;
  color: #5e348e;
}
.status-legend .service,
.vehicle-block.service {
  background: #fff0df;
  border-color: #e17d2f;
  color: #8a461c;
}
.group-filters > b {
  font-size: 11px;
  color: var(--muted);
}
.group-filters label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 7px 10px;
  font-size: 11px;
  cursor: pointer;
}
.group-filters input {
  accent-color: var(--brand);
}
.group-filters em {
  font-style: normal;
  background: var(--soft);
  border-radius: 10px;
  padding: 2px 6px;
  color: var(--muted);
}
.vehicle-group {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}
.group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px;
}
.group-title h3 {
  margin: 0;
}
.group-title span {
  color: var(--muted);
  font-size: 11px;
}
.calendar {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  display: grid;
}
.calendar.day {
  display: block;
  min-width: 900px;
}
.day-heads {
  display: grid;
  grid-template-columns: 60px repeat(
      var(--vehicle-count, 1),
      minmax(190px, 1fr)
    );
  position: sticky;
  top: 0;
  z-index: 5;
  background: white;
}
.day-timeline {
  display: grid;
  grid-template-columns: 60px repeat(var(--vehicle-count), minmax(190px, 1fr));
  height: var(--timeline-height);
  position: relative;
}
.time-axis,
.vehicle-lane {
  height: var(--timeline-height);
  position: relative;
  border-right: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 71px,
    var(--line) 71px,
    var(--line) 72px
  );
}
.time-axis span {
  position: absolute;
  right: 9px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 10px;
}
.vehicle-lane.drop-target {
  background-color: #eef1ff;
}
.day-job-wrap {
  position: absolute;
  left: 4px;
  right: 4px;
  z-index: 2;
}
.day-job-wrap.resizing { z-index: 6; filter: drop-shadow(0 4px 8px #24326a44); }
.resize-handle { position: absolute; left: 8px; right: 8px; height: 10px; z-index: 7; cursor: ns-resize; touch-action: none; }
.resize-handle::after { content: ""; position: absolute; left: 35%; right: 35%; top: 4px; height: 2px; border-radius: 2px; background: #3448c5aa; opacity: .25; }
.day-job-wrap:hover .resize-handle::after,.day-job-wrap.resizing .resize-handle::after { opacity: 1; }
.resize-top { top: 0; }
.resize-bottom { bottom: 0; }
.day-block-wrap {
  position: absolute;
  left: 4px;
  right: 4px;
  z-index: 3;
}
.day-block-wrap .vehicle-block {
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.day-job-wrap .job {
  height: 100%;
  overflow: hidden;
  margin: 0;
}
.current-time {
  position: absolute;
  left: 60px;
  right: 0;
  height: 2px;
  background: #e12525;
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 0 1px #fff8;
}
.current-time::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e12525;
}
.current-time span {
  position: absolute;
  left: -54px;
  top: -8px;
  width: 45px;
  color: #c51d1d;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}
.job[draggable="true"] {
  cursor: grab;
}
.job.dragging {
  opacity: 0.45;
}
.calendar > div,
.calendar > button {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.vehicle-head,
.corner,
.row-label {
  min-height: 78px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vehicle-head small,
.row-label small {
  color: var(--muted);
  margin-top: 4px;
}
.corner {
  color: var(--muted);
  font-size: 11px;
}
.hour {
  padding: 9px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  min-height: 72px;
}
.slot {
  min-height: 72px;
  padding: 4px;
}
.week {
  grid-template-columns: 150px repeat(7, minmax(120px, 1fr));
}
.week-cell {
  min-height: 105px;
  padding: 5px;
  position: relative;
}
.week-cell.drop-target,
.day-cell.drop-target {
  background: #eef1ff;
  outline: 2px dashed var(--brand);
  outline-offset: -3px;
}
.capacity-badge {
  display: block;
  text-align: right;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 4px;
}
.job {
  width: 100%;
  border: 2px solid color-mix(in srgb, var(--status-color, #6070e8) 58%, #172554);
  border-left-width: 6px;
  background: color-mix(in srgb, var(--status-color, #6070e8) 28%, white);
  color: color-mix(in srgb, var(--status-color, #6070e8) 68%, black);
  border-radius: 5px;
  padding: 7px;
  text-align: left;
  display: grid;
  gap: 3px;
  margin-bottom: 4px;
}
.job-status { background: var(--status-color, #6070e8); color: white; border-radius: 4px; padding: 2px 5px; width: fit-content; max-width: 100%; opacity: 1 !important; }
.document-manager { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.document-manager h3,.document-manager .document-list,.document-manager > small { grid-column: 1 / -1; }
.document-list { display: grid; gap: 5px; }
.document-list > div,.master-settings > div { display: flex; align-items: center; gap: 7px; padding: 6px; background: var(--soft); border-radius: 6px; }
.document-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.document-list a { flex: 1; }
.master-settings { display: grid; gap: 7px; }
.master-settings input:not([type="color"]) { flex: 1; }
.master-settings input[type="color"] { width: 52px; padding: 2px; }
.settings-sections { display:grid; gap:16px; }
.settings-card { padding:18px; border:1px solid var(--line); border-radius:14px; background:white; box-shadow:0 2px 12px #1725540a; }
.settings-card-head { display:flex; justify-content:space-between; align-items:center; gap:16px; padding-bottom:14px; margin-bottom:14px; border-bottom:1px solid var(--line); }
.settings-card-head h3,.settings-card-head p { margin:0; }
.settings-card-head p { margin-top:4px; color:var(--muted); font-size:12px; }
.settings-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.settings-fields label,.category-row label { display:grid; gap:5px; color:var(--muted); font-size:11px; font-weight:700; }
.settings-fields input,.category-row input,.new-master-row input { min-width:0; padding:10px; border:1px solid var(--line); border-radius:8px; }
.category-row { display:grid !important; grid-template-columns:2fr repeat(3,1fr) auto auto; align-items:end !important; gap:9px !important; padding:12px !important; }
.new-master-row { display:grid; grid-template-columns:2fr repeat(3,1fr) auto; gap:9px; margin-top:10px; }
.settings-message { display:block; min-height:18px; margin-top:10px; color:#15803d; font-weight:700; }
.carryover-jobs { margin:12px 0; border:2px solid #ea580c; border-radius:12px; background:#fff7ed; padding:12px; }
.carryover-jobs summary { cursor:pointer; color:#9a3412; font-weight:800; }
.carryover-jobs details > div { display:grid; gap:8px; margin-top:10px; }
.carryover-jobs article { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border-radius:8px; background:white; }
.carryover-jobs article div { display:grid; gap:3px; }
.job.planned {
  background: #edf0ff;
  border-color: #6070e8;
  color: #33406a;
}
.job.confirmed {
  background: #e7f8f1;
  border-color: #2bad7c;
  color: #276b56;
}
.job.in-progress {
  background: #fff4d8;
  border-color: #e4a72d;
  color: #795414;
}
.job.completed {
  background: #eef1f5;
  border-color: #778397;
  color: #4e596b;
}
.job em {
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  opacity: 0.8;
}
.job-title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }
.job-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job.linked {
  box-shadow: inset 0 0 0 2px #fff8;
}
.job.conflict {
  outline: 2px solid #d52424;
  outline-offset: -2px;
}
.job-context-menu { position: fixed; z-index: 1000; min-width: 210px; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 12px 35px #17255435; display: grid; gap: 3px; }
.job-context-menu button { border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.job-context-menu button:hover { background: var(--soft); }
.job-context-menu .danger-text { color: #c62828; border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.conflict-summary { margin: 0 0 12px; border: 1px solid #ef4444; background: #fff1f2; color: #881337; border-radius: 9px; padding: 10px 12px; }
.conflict-summary.clear { border-color: #22c55e; background: #f0fdf4; color: #166534; }
.conflict-summary summary { cursor: pointer; font-weight: 800; }
.conflict-summary details > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 7px; margin-top: 9px; }
.conflict-summary button { display: grid; gap: 3px; border: 1px solid #fecdd3; background: white; color: inherit; border-radius: 7px; padding: 8px; text-align: left; cursor: pointer; }
.conflict-summary button:hover { border-color: #ef4444; }
.conflict-summary button span,.conflict-summary button small { color: #5f2530; }
.conflict-label {
  background: #d52424;
  color: white;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 9px;
  justify-self: start;
}
.job span,
.job small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
}
.job .phone {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
}
.job .route-info {
  color: inherit;
  font-size: 10px;
  font-weight: 700;
}
.week .job-details,.month .job-details { display: none; }
.job-tooltip { position: fixed; z-index: 1000; width: min(360px,calc(100vw - 16px)); padding: 12px 14px; border: 1px solid #ccd3f5; border-radius: 10px; background: #111a3d; color: white; box-shadow: 0 12px 32px #111a3d55; font-size: 12px; line-height: 1.5; white-space: pre-line; pointer-events: none; }
.job-tooltip[hidden] { display: none; }
.vehicle-block {
  width: 100%;
  border: 0;
  border-left: 4px solid;
  border-radius: 5px;
  padding: 7px;
  text-align: left;
  display: grid;
  gap: 2px;
  margin-bottom: 4px;
}
.vehicle-block span,
.vehicle-block small {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.month-block .vehicle-block {
  padding: 4px;
  font-size: 9px;
}
.month-block .vehicle-block small {
  display: none;
}
.all-day {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.all-day input {
  width: auto;
}
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.month {
  grid-template-columns: repeat(7, 1fr);
}
.weekday {
  padding: 12px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}
.day-cell {
  min-height: 115px;
  background: white;
  border: 0;
  padding: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.open-day {
  align-self: flex-start;
  border: 0;
  background: transparent;
  font-weight: 700;
  padding: 0 0 4px;
}
.month-job .job {
  padding: 4px;
  font-size: 9px;
}
.month-job .job span,
.month-job .job small {
  display: none;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.panel-head h2 {
  margin-bottom: 5px;
}
.panel-head p {
  margin: 0;
  color: var(--muted);
}
.wide-search {
  width: 100%;
  margin-bottom: 15px;
}
.cards {
  display: grid;
  gap: 9px;
}
.cards article {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px 16px;
}
.cards article > div:first-child {
  display: grid;
  gap: 3px;
  flex: 1;
}
.cards span,
.cards small {
  color: var(--muted);
}
.cards select {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.documents {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.documents .document {
  padding: 4px 7px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 700;
}
.document.valid { background: #e4f7f0; color: #18745d; }
.document.warning { background: #fff1cf; color: #8a5b00; }
.document.expired { background: #ffe5e3; color: #a32620; }
.document.missing { background: #eef1f5; color: #657085; }
.driver-vehicle {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
}
.capacity-edit {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
}
.capacity-edit input {
  width: 80px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.direction-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #33406a;
}
.direction-suggestions button {
  display: grid;
  gap: 2px;
  text-align: left;
  border: 1px solid #bdc7ff;
  background: #f1f3ff;
  color: #3348a8;
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 10px;
}
.direction-suggestions button span,.direction-suggestions button small { font-size: 10px; }
.link-jobs {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #c9d2e2;
  border-radius: 9px;
  background: #f7f9fc;
}
.route-estimate {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid #b9d8cc;
  border-radius: 9px;
  background: #f2faf7;
}
.driver-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.driver-actions b {
  width: 100%;
}
.driver-actions > p { width: 100%; margin: 0; color: var(--muted); font-size: 12px; }
.driver-quick-status { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; width: 100%; }
.driver-quick-status button { min-height: 48px; padding: 10px; font-size: 13px; font-weight: 700; }
.driver-custom-status { display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; }
.driver-custom-status input { min-width: 0; }
.driver-action-history { display: grid; gap: 6px; width: 100%; border-top: 1px solid var(--line); padding-top: 9px; }
.driver-action-history > div { display: grid; gap: 2px; background: var(--soft); border-radius: 7px; padding: 8px; }
.driver-action-history span { color: var(--muted); font-size: 11px; }
.audit-list {
  display: grid;
  gap: 7px;
}
.audit-list article {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.audit-list time,
.audit-list span {
  color: var(--muted);
  font-size: 11px;
}
.audit-list div {
  display: grid;
  gap: 4px;
}
.system-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.system-status article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 9px;
  border-left: 5px solid;
}
.system-status .ok {
  background: #e8f8f0;
  border-color: #25a572;
}
.system-status .warn {
  background: #fff3df;
  border-color: #df862e;
}
.system-status span {
  color: var(--muted);
}
.empty-feature {
  max-width: 650px;
  margin: 50px auto;
  padding: 45px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.empty-feature > strong {
  font-size: 54px;
  color: var(--brand);
}
.empty-feature span {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 11px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 700;
}
.print-sheet {
  display: none;
}
@media print {
  .shell,
  dialog {
    display: none !important;
  }
  .print-sheet {
    display: block;
    color: #111;
  }
  .print-sheet header {
    border-bottom: 2px solid #222;
    margin-bottom: 16px;
  }
  .print-sheet h1 {
    margin: 0 0 5px;
    font-size: 20px;
  }
  .print-sheet p {
    margin: 0 0 10px;
  }
  .print-sheet table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
  }
  .print-sheet th,
  .print-sheet td {
    border: 1px solid #777;
    padding: 6px;
    text-align: left;
    vertical-align: top;
  }
  .print-sheet th {
    background: #eee;
  }
}

.module-help { margin: 0; color: var(--muted); }
.module-toggle { display: flex !important; flex-direction: row !important; align-items: center; gap: .65rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #f8f9ff; }
.module-toggle input { width: 1.1rem; height: 1.1rem; }
.address-first { padding: 1rem; border: 1px solid #bec8ff; border-radius: 14px; background: #f4f6ff; }
.address-first p { margin: .35rem 0 .8rem; color: var(--muted); }
.address-search-results { display: grid; gap: .45rem; margin-top: .55rem; max-height: 210px; overflow: auto; }
.address-search-results button { display: grid; gap: .15rem; width: 100%; padding: .7rem .8rem; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: white; }
.address-search-results button:hover { border-color: var(--primary); background: #f8f9ff; }
.address-search-results span,.address-search-results small { color: var(--muted); }
.no-address { margin: 0 !important; padding: .7rem; border-radius: 10px; background: #fff7df; color: #715200 !important; }
.dataio-grid,.statistics-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.dataio-grid > article,.statistics-grid > section { padding: 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: white; }
.dataio-grid p { color: var(--muted); min-height: 2.5rem; }
@media (max-width: 900px) { .dataio-grid,.statistics-grid { grid-template-columns: 1fr; } }
.route-estimate > b,
.route-estimate #routeResult {
  grid-column: 1/-1;
}
.route-estimate #routeResult {
  min-height: 18px;
  color: #276b56;
  font-size: 11px;
  font-weight: 700;
}
.settings-form {
  max-width: 860px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.settings-form .full { grid-column: 1 / -1; }
.settings-form h3 { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.calculator-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  max-width: 760px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.calculator-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.calculator-form input,.calculator-form select { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.calculator-form .round-trip { display: flex; align-items: center; gap: 8px; }
.calculator-form .round-trip input { width: 17px; height: 17px; }
.calculator-result { max-width: 760px; margin-top: 14px; padding: 24px; border-radius: 10px; background: linear-gradient(135deg,#10233f,#2956d7); color: white; }
.calculator-result span,.calculator-result strong,.calculator-result p,.calculator-result small { display: block; }
.calculator-result strong { margin: 7px 0; font-size: 32px; }
.calculator-result p { margin: 5px 0; }
.calculator-result small { color: #d6def5; }
.settings-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.settings-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
}
#settingsMsg {
  color: #276b56;
}
.link-jobs span {
  color: var(--muted);
  font-size: 11px;
}
.link-jobs button {
  justify-self: start;
}
.stats-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 15px;
}
.stats-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}
.stats-toolbar input {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
}
.stats-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}
.stats-summary article,
.stats-list article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.stats-summary article {
  display: grid;
  gap: 4px;
}
.stats-summary b {
  font-size: 25px;
}
.stats-summary span,
.stats-list span,
.stats-list small {
  color: var(--muted);
}
.stats-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.stat-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.stat-head > div {
  display: grid;
  gap: 3px;
}
.progress {
  height: 8px;
  background: #e9edf4;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #46b789, #efb547, #d94c4c);
}
.actions {
  display: flex;
  gap: 6px;
}
.danger,
.approve {
  border: 1px solid #efb4b4;
  background: #fff5f5;
  color: #b42318;
  border-radius: 7px;
  padding: 9px 12px;
}
.approve {
  border-color: #9bd9bd;
  background: #effaf5;
  color: #18734b;
}
.small {
  padding: 7px 10px;
  font-size: 11px;
}
dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(720px, 95vw);
  box-shadow: 0 25px 80px #0005;
}
dialog::backdrop {
  background: #11182799;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  margin: 3px 0;
}
.modal-head button {
  border: 0;
  background: none;
  font-size: 25px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 22px 26px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.save-customer {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  padding: 10px 12px;
  border: 1px solid #ccd3f5;
  border-radius: 8px;
  background: #f5f6ff;
}
.save-customer input {
  width: auto;
}
.form-grid textarea {
  min-height: 70px;
}
.inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
}
.secondary {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 10px 15px;
}
.access-page {
  min-height: 100vh;
}
.access-card {
  padding: 30px;
}
@media (max-width: 800px) {
  .shell {
    grid-template-columns: 65px 1fr;
  }
  .shell > aside {
    width: 65px;
    padding: 18px 9px;
  }
  .brand > div:last-child,
  .shell nav span,
  .userbox b,
  .userbox small {
    display: none;
  }
  .brand {
    padding: 0 3px 20px;
  }
  .shell nav button {
    text-align: center;
  }
  .workspace > header {
    padding: 0 14px;
  }
  .page {
    padding: 12px;
  }
  .toolbar {
    overflow: auto;
  }
  .date-nav strong,
  .filter {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .settings-form,
  .calculator-form,
  .route-estimate {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .day {
    min-width: 900px;
  }
  .month {
    min-width: 720px;
  }
  .driver-view .shell { grid-template-columns: 1fr; padding-bottom: 62px; }
  .driver-view .shell > aside { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 58px; padding: 7px 12px; display: flex; align-items: center; justify-content: space-between; background: #172554; }
  .driver-view aside .brand { display: none; }
  .driver-view aside nav { display: flex; padding: 0; }
  .driver-view aside nav button { width: auto; min-width: 48px; padding: 9px; }
  .driver-view .userbox { margin: 0; padding: 0; border: 0; }
  .driver-view .userbox #logout { margin: 0; min-height: 40px; }
  .driver-view .workspace > header { min-height: 70px; padding: 8px 12px; }
  .driver-view .workspace > header h1 { font-size: 20px; }
  .driver-view .header-actions { display: none; }
  .driver-view .mobile-logout { display: inline-flex !important; min-height: 42px; align-items: center; border: 1px solid #dbe2ee; border-radius: 9px; background: white; color: #172554; padding: 8px 11px; font-weight: 700; }
  .driver-view .toolbar { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .driver-view .toolbar .filter,.driver-view #groupFilters,.driver-view #conflictSummary { display: none; }
  .driver-view .calendar.day { min-width: 0; }
  .driver-view .day-heads,.driver-view .day-timeline { grid-template-columns: 46px minmax(0,1fr); }
  .driver-view .time-axis span { right: 5px; }
  .driver-view .current-time { left: 46px; }
  .driver-view dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .driver-view .form-grid { padding: 14px; }
  .driver-view .driver-quick-status { grid-template-columns: 1fr; }
  .driver-view .driver-custom-status { grid-template-columns: 1fr; }
  .driver-view .driver-custom-status button { min-height: 48px; }
  .driver-view .shell { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .driver-view .shell > aside { height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: calc(7px + env(safe-area-inset-bottom)); }
  .driver-view .page { padding: 10px; }
  .driver-view .date-nav { width: 100%; justify-content: space-between; }
  .driver-view .date-nav strong { display: block; min-width: 0; font-size: 12px; text-align: center; }
  .driver-view .segmented { display: none; }
  .settings-card-head,.carryover-jobs article { align-items:stretch; flex-direction:column; }
  .settings-fields,.category-row,.new-master-row { grid-template-columns:1fr; }
}
