:root {
  --primary: #f58220;
  --primary-contrast: #17110c;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --text: #18202b;
  --muted: #687386;
  --border: #e2e6eb;
  --danger: #d84343;
  --success: #17865b;
  --shadow: 0 18px 55px rgba(23, 31, 42, .08);
  --radius: 18px;
  --sidebar: #121923;
}

.trip-ai-panel .security-banner.success{border-color:rgba(18,150,105,.35);background:rgba(18,150,105,.08)}
.upload-order-box{display:flex;gap:18px;align-items:end;padding:20px;border:1px dashed var(--border);border-radius:16px;margin-top:18px}.upload-order-box label{flex:1}
.route-card{display:grid;grid-template-columns:1fr 1fr;gap:14px;border:1px solid var(--border);border-radius:16px;padding:18px;min-width:0}.route-card legend{font-weight:800;padding:0 8px;color:var(--primary)}
.inline-form{display:inline-flex;margin-left:6px}.copy-field{display:flex;gap:10px}.copy-field input{flex:1}.modal{max-width:620px;width:calc(100% - 32px)}
.checklist-page{margin:0;background:#f3f5f8;color:#172033}.checklist-shell{width:min(1420px,calc(100% - 28px));margin:30px auto}.checklist-header{display:flex;justify-content:space-between;gap:20px;align-items:start;background:#fff;border:1px solid #dce2ea;border-radius:18px;padding:24px;margin-bottom:18px}.checklist-header h1{margin:4px 0}.checklist-header p{margin:0;color:#667085}
.language-pills{display:flex;gap:5px;margin-top:10px}.language-pills .button{background:#fff;color:#172033}
.checklist-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.checklist-summary>div{background:#fff;border:1px solid #dce2ea;border-radius:14px;padding:16px}.checklist-summary small,.checklist-summary strong{display:block}.checklist-matrix{overflow:auto;background:#fff;border:1px solid #dce2ea;border-radius:16px;margin:18px 0}.checklist-matrix table{border-collapse:collapse;width:100%;min-width:1180px}.checklist-matrix th,.checklist-matrix td{border:1px solid #cbd3df;padding:12px;vertical-align:top}.checklist-matrix thead th{background:#e7def6}.checklist-matrix tbody th{min-width:300px;text-align:left}.checklist-matrix td{text-align:center;white-space:nowrap}.checklist-matrix td label{display:inline-flex;gap:4px;margin:4px 8px}.checklist-matrix thead small{display:block;font-weight:500;margin-top:5px;max-width:180px}.gps-button{display:block;margin:9px auto 4px;border:1px solid #7451b9;background:#fff;border-radius:8px;padding:7px 9px;cursor:pointer}.gps-button.captured{background:#dff5eb;border-color:#16865c}
@media(max-width:800px){.route-card{grid-template-columns:1fr}.checklist-summary{grid-template-columns:1fr 1fr}.upload-order-box{align-items:stretch;flex-direction:column}}

[data-theme="dark"] {
  --bg: #0d1219;
  --surface: #151c25;
  --surface-2: #1a232e;
  --text: #edf2f7;
  --muted: #9aa6b5;
  --border: #283342;
  --shadow: 0 18px 55px rgba(0, 0, 0, .25);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --bg: #0d1219;
    --surface: #151c25;
    --surface-2: #1a232e;
    --text: #edf2f7;
    --muted: #9aa6b5;
    --border: #283342;
    --shadow: 0 18px 55px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
[data-background="soft"] body {
  background-image: radial-gradient(circle at 85% 5%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 30%);
}
[data-background="gradient"] body {
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, var(--bg)), var(--bg) 42%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 264px;
  padding: 22px 16px;
  color: #dce3ec;
  background: var(--sidebar);
  box-shadow: 12px 0 35px rgba(0, 0, 0, .12);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 24px; font-size: 20px; }
.brand small { margin-left: 5px; color: #8f9aa8; font-weight: 600; font-size: 11px; text-transform: uppercase; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  color: #17110c;
  background: var(--primary);
  font-weight: 900;
}
.nav { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 4px; padding-right: 4px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #405064 transparent; }
.nav::-webkit-scrollbar{width:7px}.nav::-webkit-scrollbar-thumb{border-radius:8px;background:#405064}.nav::-webkit-scrollbar-track{background:transparent}
.nav-label { padding: 20px 12px 7px; color: #687586; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  color: #aeb9c7;
  background: transparent;
  text-align: left;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255, 255, 255, .075); }
.nav-link.active { box-shadow: inset 3px 0 var(--primary); }
.nav-link > span:first-child { width: 22px; color: var(--primary); text-align: center; font-weight: 800; }
.nav-link em { margin-left: auto; color: #6e7987; font-size: 9px; font-style: normal; text-transform: uppercase; }
.nav-link.disabled { cursor: default; opacity: .65; }
.nav-submenu { display: grid; gap: 2px; margin: -2px 0 8px 44px; }
.nav-submenu a { padding: 7px 8px; color: #7f8b9a; font-size: 12px; }
.nav-submenu a:hover { color: #fff; }
.sidebar-logout { flex:0 0 auto;margin-top: 8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.08); }
.app-main { width: calc(100% - 264px); margin-left: 264px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px 30px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
}
.topbar > div:first-of-type { display: flex; flex-direction: column; }
.topbar small { color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar select, select, input, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: var(--surface);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
textarea { resize: vertical; }
.topbar select { min-height: 38px; padding: 7px 28px 7px 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span:last-child { display: flex; flex-direction: column; font-size: 13px; }
.avatar, .large-avatar {
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--primary) 60%, transparent);
  border-radius: 50%;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  font-weight: 800;
}
.avatar { width: 39px; height: 39px; }
.large-avatar { width: 92px; height: 92px; margin: auto; font-size: 34px; }
.profile-photo { display: block; padding: 0; object-fit: cover; }
.content { width: min(1480px, 100%); margin: 0 auto; padding: 30px; }
.hero-card, .panel, .stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 210px;
  padding: 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 95% 20%, color-mix(in srgb, var(--primary) 25%, transparent), transparent 32%),
    var(--surface);
}
.hero-card::after { content: "ACC"; position: absolute; right: 4%; bottom: -45px; color: color-mix(in srgb, var(--primary) 7%, transparent); font-size: 150px; font-weight: 900; }
.hero-card > * { position: relative; z-index: 1; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(28px, 3vw, 43px); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: 6px; font-size: 21px; letter-spacing: -.02em; }
p { color: var(--muted); }
.eyebrow { display: block; margin-bottom: 8px; color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-radius: 11px;
  font-weight: 750;
}
.button.primary { color: var(--primary-contrast); background: var(--primary); box-shadow: 0 9px 24px color-mix(in srgb, var(--primary) 24%, transparent); }
.button.full { width: 100%; }
.button.small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button.danger-outline { border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--border)); color: var(--danger); background: transparent; }
.button.danger-outline:hover { color: #fff; background: var(--danger); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 20px 0; }
.stat-card { display: flex; flex-direction: column; padding: 22px; }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card strong { margin: 7px 0 2px; font-size: 34px; letter-spacing: -.04em; }
.panel { margin-bottom: 20px; padding: 25px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.status-pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent); font-size: 12px; font-weight: 800; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature-grid article { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.feature-grid p { margin: 4px 0 0; font-size: 13px; }
.feature-icon { display: grid; place-items: center; flex: 0 0 39px; height: 39px; border-radius: 11px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.page-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid label, .stack label { display: flex; flex-direction: column; gap: 7px; }
.form-grid label > span, .stack label > span { color: var(--muted); font-size: 13px; font-weight: 650; }
.form-grid .full { grid-column: 1 / -1; }
.financing-fields[hidden] { display: none !important; }
.check-label { display: flex !important; align-items: center; flex-direction: row !important; }
.check-label input { width: 18px; min-height: 18px; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.profile-summary { text-align: center; }
.profile-summary h2 { margin: 13px 0 2px; }
.profile-summary .muted { margin-top: 22px; font-size: 12px; }
.preferences-form input[type="color"] { padding: 5px; }
.trip-map-shell { border:1px solid var(--border);border-radius:18px;overflow:hidden;background:var(--surface); }
.trip-map-head { display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 16px;border-bottom:1px solid var(--border); }
.trip-map-legend { display:flex;gap:18px;font-size:.82rem;color:var(--muted); }
.trip-map-legend span::before { content:"";display:inline-block;width:22px;height:4px;border-radius:4px;margin-right:7px;vertical-align:middle; }
.trip-map-legend .empty::before { background:#f58220; }
.trip-map-legend .loaded::before { background:#168bd2; }
.trip-map { width:100%;height:460px;background:#dbe5ec; }
.trip-map .leaflet-popup-content-wrapper,.trip-map .leaflet-popup-tip { color:#17212d;background:#fff; }
@media (max-width:720px){.trip-map{height:340px}.trip-map-head{align-items:flex-start;flex-direction:column}.trip-map-legend{flex-wrap:wrap}}
.alert { margin-bottom: 18px; padding: 12px 14px; border-radius: 11px; font-size: 14px; }
.alert.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.alert.success { color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--surface)); }
.alert.warning { color: #a76200; background: color-mix(in srgb, #e39418 13%, var(--surface)); }
.section-divider { display: flex; flex-direction: column; margin-top: 5px; padding-top: 18px; border-top: 1px solid var(--border); }
.section-divider small { color: var(--muted); }
.check-card { display:flex; align-items:center; min-height:74px; padding:12px 15px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); }
.check-card .check-label { width:100%; }
.check-card .check-label span { display:flex; flex-direction:column; }
.check-card .check-label small { color:var(--muted); font-weight:400; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
td small { display: block; color: var(--muted); }
.role-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; }
.role-picker legend { padding: 0 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
.role-picker label { display: flex; align-items: center; flex-direction: row; gap: 8px; }
.role-picker input { width: 18px; min-height: 18px; }
.api-key-layout { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 20px; align-items: start; }
.api-key-form { position: sticky; top: 96px; }
.security-banner { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding: 14px; border: 1px solid color-mix(in srgb, var(--success) 25%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--success) 7%, var(--surface)); }
.security-banner > span { color: var(--success); }
.security-banner p { margin: 0; font-size: 13px; }
.tag { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: 11px; font-weight: 700; }
.status-pill.inactive { color: var(--muted); background: var(--surface-2); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.trip-list-table { min-width: 1500px; }
.trip-list-table th:last-child, .trip-list-table td:last-child { min-width: 460px; }
.trip-row-actions { flex-wrap: nowrap; align-items: center; overflow-x: auto; padding: 2px 0 5px; }
.trip-row-actions .button { white-space: nowrap; }
.billing-timeline { min-width: 225px; }
.billing-timeline strong, .billing-timeline small { display: block; margin: 2px 0; white-space: nowrap; }
.billing-timeline small { color: var(--muted); }
.billing-timeline .expiry-danger { color: #ef4444; font-weight: 800; }
.notification-bell { position: relative; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--surface); text-decoration: none; font-size: 20px; }
.notification-bell b { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; color: #fff; background: #ef4444; font-size: 10px; line-height: 20px; text-align: center; }
.trip-entry-modal { width: min(820px, calc(100vw - 32px)); }
.modal-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.document-list, .entry-history { display: grid; gap: 8px; }
.document-row, .entry-history > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; background: var(--surface-soft); }
.document-row span { min-width: 0; }
.document-row > span { flex: 1; }
.document-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.document-actions form, .document-preview-dialog .dialog-actions form { margin: 0; }
.document-modal-alert { margin: 20px 25px 0; }
.document-preview-dialog { width: min(1180px, calc(100% - 32px)); }
.document-preview-shell { height: min(690px, calc(100vh - 190px)); padding: 18px 25px 0; }
.document-preview-shell iframe { width: 100%; height: 100%; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.document-row small, .entry-history small, .entry-history span { display: block; color: var(--muted); }
.document-row:hover { border-color: var(--accent); }
@media (max-width: 700px) { .document-row { align-items: flex-start; flex-direction: column; } .document-actions { justify-content: flex-start; } .document-preview-shell { height: calc(100vh - 210px); padding-inline: 12px; } }
.trip-filter-actions { display:flex; gap:10px; margin:14px 0; }
.trip-quick-filter { display:grid; grid-template-columns:1fr auto; gap:10px; margin-bottom:18px; }
.trip-quick-filter .truck-filter-search, .trip-quick-filter .truck-filter-buttons { grid-column:1/-1; }
.truck-filter-buttons { display:flex; flex-wrap:wrap; gap:8px; max-height:180px; overflow:auto; }
.truck-filter-chip input { position:absolute; opacity:0; pointer-events:none; }
.truck-filter-chip span { display:block; padding:9px 13px; border:1px solid var(--line); border-radius:10px; cursor:pointer; font-weight:700; background:var(--surface-soft); }
.truck-filter-chip.selected span { color:#fff; background:var(--accent); border-color:var(--accent); }
.link-button { appearance:none; border:0; padding:0; background:none; color:var(--accent); cursor:pointer; font:inherit; font-weight:800; text-align:left; }
.trip-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.trip-detail-grid > div { display:flex; flex-direction:column; gap:5px; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }
.trip-detail-grid .full { grid-column:1/-1; }
.trip-detail-grid small, .trip-detail-grid span { color:var(--muted); }
.trip-route-preview { height:420px; margin-top:16px; border-radius:14px; overflow:hidden; }
@media(max-width:700px){.trip-detail-grid{grid-template-columns:1fr}.trip-detail-grid .full{grid-column:auto}.trip-quick-filter{grid-template-columns:1fr}}
.empty-cell { padding: 35px; color: var(--muted); text-align: center; }
.fleet-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.fleet-card { display: flex; align-items: center; gap: 15px; padding: 22px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-2); }
.fleet-card:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); transform: translateY(-1px); }
.fleet-card > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.fleet-card small { color: var(--muted); }
.audit-note { padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.detail-grid > div { display: flex; flex-direction: column; gap: 5px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.detail-grid small { color: var(--muted); }
.expiry-list { white-space: nowrap; }
.expiry-list small { margin: 2px 0; }
.expiry-danger { color: var(--danger) !important; font-weight: 750; }
.expiry-warning { color: #d97b00 !important; font-weight: 750; }
.expiry-ok { color: var(--success) !important; }
.fleet-filters {
  display: grid;
  grid-template-columns: minmax(250px, 1.6fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.fleet-filters label { display: flex; flex-direction: column; gap: 6px; }
.fleet-filters label > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-actions { display: flex; gap: 7px; }
.results-summary { margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.fleet-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.quick-search { display: flex; flex: 1; gap: 8px; }
.quick-search input { flex: 1; }
.filter-button { gap: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.filter-button span { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; color: var(--primary-contrast); background: var(--primary); font-size: 11px; }
.filter-dialog { width: min(720px, calc(100% - 32px)); }
.plate-number { font-size: 16px; }
.driver-name-button {
  padding: 0;
  border: 0;
  color: var(--text);
  background: none;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.driver-name-button:hover { color: var(--primary); }
.driver-table td:first-child small { display: block; margin-top: 4px; color: var(--muted); }
.phone-link { color: var(--primary); white-space: nowrap; }
.driver-dialog { width: min(980px, calc(100% - 32px)); }
.document-link { color: var(--primary); font-weight: 700; white-space: nowrap; }
.muted { color: var(--muted); }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.searchable-select { position: relative; width: 100%; }
.searchable-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.searchable-select-input { width: 100%; padding-right: 38px; }
.searchable-select-input.busy {
  border-color: color-mix(in srgb, #f59e0b 65%, var(--border));
  color: #b96600;
  background: color-mix(in srgb, #f59e0b 6%, var(--surface));
}
.searchable-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 310px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(0,0,0,.2);
}
.searchable-select-option {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.searchable-select-option:hover,
.searchable-select-option.selected { background: color-mix(in srgb, var(--primary) 10%, var(--surface-2)); }
.searchable-select-option.busy {
  color: #b96600;
  background: color-mix(in srgb, #f59e0b 8%, var(--surface));
}
.searchable-select-option:disabled { cursor: not-allowed; opacity: .78; }
.searchable-select-option.busy::before { content: "●"; margin-right: 8px; color: #f59e0b; }
.searchable-select-empty { padding: 16px; color: var(--muted); text-align: center; }
.change-list { display: grid; min-width: 260px; gap: 5px; }
.change-list small { color: var(--muted); }
.change-list strong { color: var(--text); }
.assignment-history-dialog { width: min(1180px, calc(100% - 32px)); }
.assignment-history-table { max-height: 430px; }
.assignment-history-table table { min-width: 850px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 15px; padding-top: 18px; }
.pagination span { color: var(--muted); font-size: 13px; }
.billing-summary { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.billing-summary > span { padding:9px 12px; border:1px solid var(--border); border-radius:12px; color:var(--muted); background:var(--surface-2); font-size:12px; }
.billing-summary strong { color:var(--text); }
.billing-quick-filters { display:grid; grid-template-columns:repeat(3,minmax(180px,1fr)); gap:12px; margin:4px 0 20px; padding:16px; border:1px solid var(--border); border-radius:14px; background:var(--surface-2); }
.billing-quick-filters label { display:grid; gap:6px; }
.billing-quick-filters label > span { color:var(--muted); font-size:12px; font-weight:700; }
.billing-quick-filters .filter-actions { grid-column:1/-1; }
.billing-table { min-width:1540px; }
.billing-table td { vertical-align:top; }
.billing-table small,.route-line { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.route-line strong { color:var(--primary); }
.inline-invoice-number { display:flex; gap:5px; min-width:150px; }
.inline-invoice-number input { min-width:0; width:110px; padding:8px; }
.mini-badge { display:inline-flex; margin-top:6px; padding:3px 7px; border-radius:999px; color:var(--muted); background:var(--surface-2); font-size:10px; font-weight:800; }
.mini-badge.warning { color:#a65c00; background:rgba(245,158,11,.14); }
.mini-badge.info { color:#168bd2; background:rgba(22,139,210,.14); }
.paid-toggle-form { display:grid; justify-items:center; gap:3px; }
.paid-toggle { position:relative; display:inline-flex; cursor:pointer; }
.paid-toggle input { position:absolute; opacity:0; }
.paid-toggle span { width:42px; height:23px; border-radius:999px; background:var(--surface-2); border:1px solid var(--border); transition:.2s; }
.paid-toggle span::after { content:""; display:block; width:17px; height:17px; margin:2px; border-radius:50%; background:var(--muted); transition:.2s; }
.paid-toggle input:checked + span { background:rgba(21,154,107,.2); border-color:#159a6b; }
.paid-toggle input:checked + span::after { transform:translateX(19px); background:#159a6b; }
.billing-documents-dialog,.billing-view-dialog { width:min(1120px,calc(100% - 32px)); }
.billing-modal-block { display:grid; gap:12px; padding:16px; border:1px solid var(--border); border-radius:14px; background:var(--surface-2); }
.billing-modal-block h3 { margin:0; }
.billing-modal-block details summary { cursor:pointer; color:var(--primary); font-weight:800; }
.compact-form { margin-top:8px; }
.billing-totals { display:flex; flex-wrap:wrap; gap:10px; }
.billing-totals span { padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
@media(max-width:900px){.billing-summary{justify-content:flex-start}.billing-quick-filters{grid-template-columns:1fr}.billing-quick-filters .filter-actions{grid-column:auto}}
.vehicle-dialog {
  width: min(900px, calc(100% - 32px));
  max-height: min(850px, calc(100vh - 40px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 19px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 25px 80px rgba(0,0,0,.3);
}
.vehicle-dialog::backdrop { background: rgba(5, 11, 19, .65); backdrop-filter: blur(4px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 22px 25px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.dialog-head h2 { margin: 0; font-size: 28px; }
.dialog-close { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--surface-2); font-size: 25px; }
.modal-section { padding: 20px 25px 0; }
.modal-section h3 { margin: 0 0 12px; font-size: 15px; }
.modal-section.audit-note { margin: 20px 25px 0; padding: 16px 0 0; }
.dialog-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding: 16px 25px 22px; border-top: 1px solid var(--border); background: var(--surface); }
.vehicle-dialog > .form-grid, .vehicle-dialog > .stack, .vehicle-dialog > .trip-detail-grid { padding: 20px 25px; }
.vehicle-dialog > .trip-route-preview, .vehicle-dialog > .muted { margin: 20px 25px; }
.vehicle-dialog .entry-history { display: grid; gap: 10px; }
.vehicle-dialog .entry-history > div { display: grid; grid-template-columns: minmax(130px,.7fr) minmax(130px,.7fr) minmax(180px,1.6fr); gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.compact-grid { gap: 10px; }
code { color: var(--text); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.sessions-head { align-items: flex-start; }
.sessions-head p { margin: 4px 0 0; }
.sessions-list { display: grid; gap: 12px; }
.session-card { display: flex; align-items: center; gap: 15px; padding: 17px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.session-card.current { border-color: color-mix(in srgb, var(--success) 30%, var(--border)); background: color-mix(in srgb, var(--success) 4%, var(--surface-2)); }
.session-icon { display: grid; place-items: center; flex: 0 0 43px; height: 43px; border-radius: 12px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); font-size: 20px; }
.session-main { flex: 1; min-width: 0; }
.session-title { display: flex; align-items: center; gap: 9px; }
.session-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.session-meta b { color: var(--text); font-weight: 650; }
.session-action { flex: 0 0 auto; }
.session-action .muted { color: var(--muted); font-size: 12px; }

.auth-page { background: #0e141d; }
.auth-wrap { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 100vh; }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 44px clamp(35px, 6vw, 90px); overflow: hidden; color: #fff; background: linear-gradient(145deg, #0f1721, #172332); }
.auth-visual::before { content: ""; position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 88%); }
.auth-brand, .auth-copy { position: relative; z-index: 2; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.auth-copy { max-width: 660px; margin: auto 0 14%; }
.auth-copy h1 { max-width: 620px; font-size: clamp(40px, 5vw, 72px); }
.auth-copy p { max-width: 570px; color: #aeb8c6; font-size: 17px; }
.auth-glow { position: absolute; right: -18%; bottom: -25%; width: 600px; height: 600px; border-radius: 50%; background: var(--primary); filter: blur(140px); opacity: .18; }
.auth-panel { display: grid; place-items: center; padding: 34px; background: var(--bg); }
.login-card { width: min(440px, 100%); padding: 38px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.login-card > p { margin-bottom: 25px; }
.stack { display: flex; flex-direction: column; gap: 17px; }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-field button { position: absolute; top: 3px; right: 3px; width: 39px; height: 38px; border: 0; color: var(--muted); background: transparent; }
.security-note { display: block; margin-top: 20px; color: var(--muted); text-align: center; }
.security-note::first-letter { color: var(--success); }
.empty-state { display: grid; min-height: 70vh; place-items: center; align-content: center; text-align: center; }
.empty-state > strong { color: var(--primary); font-size: 75px; }
.mobile-only, .sidebar-overlay { display: none; }
[data-density="compact"] .panel { padding: 18px; }
[data-density="spacious"] .panel { padding: 32px; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .app-main { width: 100%; margin-left: 0; }
  .mobile-only { display: inline-grid; }
  .icon-button { width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.5); }
  .sidebar.open ~ .app-main + .sidebar-overlay { display: block; }
  .page-grid, .feature-grid { grid-template-columns: 1fr; }
  .fleet-cards { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .fleet-filters { grid-template-columns: 1fr 1fr; }
  .filter-search, .filter-actions { grid-column: 1 / -1; }
  .fleet-toolbar { align-items: stretch; flex-wrap: wrap; }
  .quick-search { flex-basis: 100%; }
  .api-key-layout { grid-template-columns: 1fr; }
  .api-key-form { position: static; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}

@media (max-width: 620px) {
  .content { padding: 18px; }
  .topbar { padding: 10px 18px; }
  .topbar > div:first-of-type { display: none; }
  .user-chip > span:last-child { display: none; }
  .hero-card { align-items: flex-start; flex-direction: column; padding: 26px; }
  .stat-grid, .form-grid { grid-template-columns: 1fr; }
  .role-picker { grid-template-columns: 1fr; }
  .stat-grid { gap: 12px; }
  .form-grid .full { grid-column: auto; }
  .auth-panel { padding: 18px; }
  .login-card { padding: 26px 21px; }
  .sessions-head, .session-card { align-items: stretch; flex-direction: column; }
  .fleet-filters { grid-template-columns: 1fr; }
  .filter-search, .filter-actions { grid-column: auto; }
  .filter-actions .button { flex: 1; }
  .quick-search { flex-direction: column; }
  .fleet-toolbar > .button { flex: 1; }
  .sessions-head form, .sessions-head .button, .session-action form, .session-action .button { width: 100%; }
  .session-icon { width: 43px; }
}
.country-picker{border:1px solid var(--border);border-radius:14px;padding:16px}.country-picker legend{padding:0 8px;font-weight:700}.country-check-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;margin-top:12px}.country-check-grid .check-label{border:1px solid var(--border);border-radius:10px;padding:10px 12px;align-items:center}.country-check-grid .check-label:has(input:checked){border-color:var(--primary);background:color-mix(in srgb,var(--primary) 10%,transparent)}
.posting-country-line{display:block;margin:2px 0}
.check-group-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0}.check-group-actions [data-check-count]{margin-left:auto;font-weight:700;color:var(--muted)}.truck-check-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.route-alternatives{display:flex;gap:10px;flex-wrap:wrap}.route-option{padding:11px 18px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--text);font-weight:700;cursor:pointer}.route-option.selected{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 14%,var(--surface-2));color:var(--primary)}
.route-share-actions{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}.route-share-actions small{grid-column:1/-1;color:var(--muted)}
.route-share-actions.automatic{grid-template-columns:1fr auto}
.public-route-page{min-height:100vh;padding:24px;background:var(--bg);color:var(--text)}.public-route-card{max-width:1300px;margin:auto;padding:24px;border:1px solid var(--border);border-radius:20px;background:var(--surface);box-shadow:var(--shadow)}.public-route-card .trip-map{height:min(68vh,720px);min-height:430px}.route-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.route-summary>div{padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}.route-summary small,.route-summary strong{display:block}.route-summary small{color:var(--muted);margin-bottom:5px}
@media(max-width:620px){.route-share-actions{grid-template-columns:1fr}.route-share-actions small{grid-column:auto}.route-summary{grid-template-columns:1fr}.public-route-page{padding:10px}.public-route-card{padding:14px}}
.option-fieldset{border:1px solid var(--line);border-radius:14px;padding:14px;margin:0}.option-fieldset legend{padding:0 8px;font-weight:700}.delivery-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.delivery-choice{display:flex;align-items:flex-start;gap:10px;padding:14px;border:1px solid var(--line);border-radius:12px;cursor:pointer;background:var(--surface)}.delivery-choice input{margin-top:3px}.delivery-choice span{display:grid;gap:4px}.delivery-choice small{color:var(--muted);line-height:1.35}.delivery-choice.is-disabled{opacity:.5;cursor:not-allowed}.pack-builder-block .document-row{margin-bottom:12px}@media(max-width:760px){.delivery-choice-grid{grid-template-columns:1fr}}
.automation-hero{display:grid;grid-template-columns:1fr minmax(420px,.8fr);gap:28px;align-items:center}.automation-hero p{max-width:760px;color:var(--muted)}.cron-command{display:grid;gap:8px;padding:18px;border:1px solid var(--border);border-radius:14px;background:var(--surface-2)}.cron-command code{display:block;padding:12px;border-radius:9px;overflow:auto;color:var(--primary);background:var(--bg);white-space:nowrap}.cron-command small{color:var(--muted)}.automation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0}.automation-card{padding:22px}.automation-card-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.automation-card-head h3{margin:5px 0}.toggle-line{display:flex;align-items:center;gap:8px;white-space:nowrap}.automation-options{display:flex;gap:16px;flex-wrap:wrap}.automation-options label{display:flex;align-items:center;gap:7px}.role-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.automation-meta{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:12px;border-radius:12px;background:var(--surface-2);color:var(--muted);font-size:12px}.automation-meta strong{color:var(--text)}.automation-last-message{flex-basis:100%;padding-top:8px;border-top:1px solid var(--border);line-height:1.45}.automation-actions{gap:8px;flex-wrap:wrap}.notification-list{display:grid;gap:12px}.notification-item{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:17px;border:1px solid var(--border);border-left:4px solid var(--muted);border-radius:13px;background:var(--surface-2)}.notification-item.unread{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 30%,transparent)}.notification-item.warning{border-left-color:#f59e0b}.notification-item.danger{border-left-color:#ef4444}.notification-item.info{border-left-color:#168bd2}.notification-item strong,.notification-item small{display:block}.notification-item small{margin-top:4px;color:var(--muted)}.notification-item p{margin:10px 0 0;white-space:pre-line}.notification-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.notification-actions form{margin:0}
.threshold-selector{display:grid;gap:12px}.threshold-options{display:flex;gap:8px;flex-wrap:wrap}.threshold-options label{display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);cursor:pointer}.threshold-options label:has(input:checked){border-color:var(--primary);background:color-mix(in srgb,var(--primary) 10%,var(--surface-2))}.threshold-selector>small,.option-fieldset>small{color:var(--muted);line-height:1.45}
.expired-repeat-option{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid #f2b84b;border-radius:11px;background:color-mix(in srgb,#f59e0b 10%,var(--surface-2))}.expired-repeat-option input{margin-top:4px}.expired-repeat-option span{display:grid;gap:3px}.expired-repeat-option small{color:var(--muted);line-height:1.4}
.route-coordinate-panel{padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--surface-2)}.route-coordinate-panel .trip-map-head{align-items:flex-start;margin-bottom:12px}.route-coordinate-panel .trip-map-head small{max-width:700px;color:var(--muted)}.route-coordinate-panel table{min-width:760px}.route-coordinate-panel code{white-space:nowrap;color:var(--primary)}
@media(max-width:1100px){.automation-grid,.automation-hero{grid-template-columns:1fr}.trip-list-table{min-width:1400px}}@media(max-width:620px){.role-options{grid-template-columns:1fr 1fr}.notification-item{flex-direction:column}.cron-command code{white-space:normal;word-break:break-all}}
.automation-privacy-note{display:flex;gap:12px;align-items:flex-start}.automation-privacy-note span{color:var(--muted)}.automation-user-nav{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.automation-user-list{display:grid;gap:20px}.automation-user-card{scroll-margin-top:88px}.automation-user-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}.automation-user-head h2{margin:4px 0}.automation-user-head p{margin:0;color:var(--muted)}.automation-service-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.automation-service-card{display:flex;flex-direction:column;padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--surface-2)}.automation-service-card.is-active{border-color:color-mix(in srgb,var(--primary) 42%,var(--border));box-shadow:inset 3px 0 0 var(--primary)}.automation-service-card>.stack{flex:1}.automation-channel-box{background:var(--surface)}.automation-advanced{border-top:1px solid var(--border);padding-top:12px}.automation-advanced summary{cursor:pointer;font-weight:700;color:var(--text)}.automation-advanced .option-fieldset{margin-top:12px;background:var(--surface)}
.invoice-register-panel .panel-head p{margin:5px 0 0}.invoice-register-filters{display:grid;grid-template-columns:minmax(220px,2fr) repeat(3,minmax(145px,1fr)) auto;gap:12px;align-items:end;margin:18px 0}.invoice-register-filters label{display:grid;gap:6px}.invoice-form-page{display:grid;gap:16px}.invoice-general-form{padding:24px}.invoice-items-section{display:grid;gap:14px;padding-top:20px;border-top:1px solid var(--border)}.invoice-items-head{display:flex;justify-content:space-between;gap:20px;align-items:end}.invoice-items-head h2{margin:4px 0}.invoice-total{display:grid;text-align:right}.invoice-total span{color:var(--muted);font-size:12px}.invoice-total strong{font-size:22px}.invoice-items-table{min-width:800px}.invoice-items-table th:first-child,.invoice-items-table td:first-child{width:48px;text-align:center}.invoice-items-table th:last-child,.invoice-items-table td:last-child{width:58px}.invoice-items-table input,.invoice-items-table select{min-width:150px}.invoice-items-table td:nth-child(2) input{min-width:280px}
@media(max-width:1100px){.automation-service-list{grid-template-columns:1fr}.invoice-register-filters{grid-template-columns:1fr 1fr}.invoice-register-filters .filter-actions{grid-column:1/-1}}@media(max-width:620px){.automation-user-head,.invoice-items-head{align-items:flex-start;flex-direction:column}.invoice-total{text-align:left}.invoice-register-filters{grid-template-columns:1fr}.invoice-register-filters .filter-actions{grid-column:auto}.invoice-general-form{padding:18px}}
.timeline-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.signing-workspace{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.signing-source-card,.signing-options-card{border:1px solid var(--border);border-radius:16px;padding:18px;background:var(--surface-soft)}.signing-source-card{grid-column:1/-1}.signing-source-card h3,.signing-options-card h3{margin:0 0 14px}.selected-document{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.selected-document span{color:var(--muted);margin-right:auto}.signing-page-modes{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:14px}.signing-submit{grid-column:1/-1;justify-content:flex-end}.signing-result{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-bottom:18px}.signing-result span{margin-right:auto}.signing-marks-panel{margin-top:22px}.signing-user-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.signing-mark-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:20px}.signing-mark-card{display:flex;gap:12px;align-items:center;border:1px solid var(--border);border-radius:14px;padding:12px}.signing-mark-card.is-inactive{opacity:.55}.signing-mark-card img{width:92px;height:68px;object-fit:contain;background:#fff;border-radius:8px}.signing-mark-card div{display:flex;flex:1;min-width:0;flex-direction:column}.signing-mark-card small{color:var(--muted)}
.signing-source-card,.signing-options-card{background:var(--surface-2)}
@media(max-width:900px){.timeline-edit-grid,.signing-workspace{grid-template-columns:1fr}.signing-source-card,.signing-submit{grid-column:auto}.signing-page-modes,.signing-user-grid,.signing-mark-grid{grid-template-columns:1fr}}
.signing-preview-card{grid-column:1/-1;min-width:0;border:1px solid var(--border);border-radius:16px;padding:18px;background:var(--surface-2)}
.signing-preview-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:14px}.signing-preview-head h3{margin:0 0 5px}.signing-preview-head p{max-width:760px;margin:0;color:var(--muted)}
.signing-placement-tools{display:flex;gap:8px;flex-wrap:wrap}.signing-placement-tools .button.is-active{border-color:var(--primary);color:var(--primary);background:color-mix(in srgb,var(--primary) 12%,var(--surface))}
.signing-page-toolbar{display:flex;justify-content:center;align-items:center;gap:9px;margin-bottom:10px}.signing-page-toolbar label{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13px}.signing-page-toolbar input{width:72px;padding:7px 9px;text-align:center}
.signing-page-viewport{display:grid;min-height:430px;place-items:center;padding:16px;overflow:auto;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--bg) 84%,#8ba0b8)}
.signing-preview-placeholder{display:grid;min-height:350px;place-items:center;color:var(--muted);text-align:center}.signing-preview-placeholder.is-error{color:var(--danger)}
.signing-page-surface{position:relative;flex:0 0 auto;overflow:hidden;background:#fff;box-shadow:0 10px 35px rgba(0,0,0,.22);touch-action:none;user-select:none}.signing-page-surface canvas{display:block;width:100%;height:100%}
.signing-page-surface [data-signing-overlay]{position:absolute;z-index:2;display:block;height:auto;max-width:none;outline:2px dashed transparent;cursor:grab;touch-action:none;user-select:none;-webkit-user-drag:none}.signing-page-surface [data-signing-overlay]:active{cursor:grabbing}.signing-page-surface [data-signing-overlay].is-active{outline-color:var(--primary);filter:drop-shadow(0 2px 2px rgba(0,0,0,.18))}.signing-page-surface [data-signing-overlay][hidden]{display:none}
.signing-resize-handle{position:absolute;z-index:4;width:19px;height:19px;padding:0;transform:translate(-50%,-50%);border:2px solid #fff;border-radius:50%;opacity:0;pointer-events:none;background:var(--primary);box-shadow:0 1px 5px rgba(0,0,0,.42);cursor:nwse-resize;touch-action:none}.signing-resize-handle::after{content:"";position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-right:2px solid #fff;border-bottom:2px solid #fff}.signing-resize-handle.is-active{opacity:1;pointer-events:auto}.signing-resize-handle[hidden]{display:none}
.signing-placement-note{display:block;margin-top:10px;color:var(--muted)}
@media(max-width:900px){.signing-preview-card{grid-column:auto}.signing-preview-head{flex-direction:column}.signing-page-viewport{min-height:330px;padding:10px}.signing-preview-placeholder{min-height:280px}}
.content:has(>.fleet-dashboard){width:100%;max-width:none}.fleet-dashboard{display:grid;gap:16px}.fleet-dashboard-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px}.fleet-dashboard-head h1{margin:5px 0}.fleet-dashboard-head p{margin:0;color:var(--muted)}
.dashboard-view-switch{display:flex;gap:8px;flex-wrap:wrap}.dashboard-view-switch form{margin:0}.dashboard-view-switch .button{gap:8px}
.dashboard-toolbar{display:grid;grid-template-columns:minmax(260px,560px) 1fr auto;gap:12px;align-items:center}.dashboard-toolbar label{margin:0}.dashboard-toolbar strong{color:var(--muted);font-size:13px}
.assignment-board{display:grid;gap:8px}.assignment-board-header,.assignment-board-row{display:grid;grid-template-columns:46px minmax(120px,.75fr) minmax(120px,.75fr) minmax(190px,1.2fr) minmax(310px,1.75fr) minmax(170px,1fr);gap:10px;align-items:stretch}.assignment-board-header{padding:0 14px;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.assignment-board-row>button{display:flex;min-width:0;flex-direction:column;justify-content:center;padding:15px;border:1px solid var(--border);border-radius:13px;color:var(--text);text-align:left;background:var(--surface);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}.assignment-board-row>button:hover{z-index:1;transform:translateY(-1px);border-color:color-mix(in srgb,var(--primary) 55%,var(--border));box-shadow:0 9px 24px rgba(23,31,42,.09)}.assignment-board-row strong{overflow:hidden;text-overflow:ellipsis}.assignment-board-row small{margin-top:4px;color:var(--muted)}.assignment-board-row .driver-away{color:#d97904}.assignment-board-row .assignment-rate{background:color-mix(in srgb,var(--success) 7%,var(--surface));border-color:color-mix(in srgb,var(--success) 25%,var(--border))}.assignment-board-row.is-own-dispatcher>button:first-of-type{border-color:color-mix(in srgb,var(--primary) 35%,var(--border))}.assignment-reorder{display:grid;align-content:center;gap:4px}.assignment-reorder button{display:grid;width:38px;height:29px;place-items:center;padding:0;border:1px solid var(--border);border-radius:8px;color:var(--text);background:var(--surface);font-weight:900;cursor:pointer}.assignment-reorder button:hover:not(:disabled){border-color:var(--primary);color:var(--primary)}.assignment-reorder button:disabled{opacity:.28;cursor:default}.dashboard-order-toolbar{display:flex;align-items:center;gap:10px;margin-top:-4px;color:var(--muted);font-size:12px}.dashboard-order-toolbar span{margin-right:auto}.dashboard-order-toolbar em{color:var(--success);font-style:normal}.dashboard-empty{padding:45px;border:1px dashed var(--border);border-radius:14px;color:var(--muted);text-align:center}
.fleet-map-layout{position:relative;display:grid;grid-template-columns:minmax(280px,340px) minmax(0,1fr);min-height:calc(100vh - 245px);overflow:hidden;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:var(--shadow);transition:grid-template-columns .22s ease}.fleet-map-layout.has-selection{grid-template-columns:minmax(280px,340px) minmax(0,1fr) minmax(320px,380px)}.fleet-map-layout.list-collapsed{grid-template-columns:0 minmax(0,1fr)}.fleet-map-layout.list-collapsed.has-selection{grid-template-columns:0 minmax(0,1fr) minmax(320px,380px)}.fleet-map-layout.list-collapsed .fleet-live-list{min-width:0;opacity:0;pointer-events:none;border-right:0}.fleet-live-list{z-index:2;min-width:280px;overflow:auto;border-right:1px solid var(--border);background:var(--surface);transition:opacity .18s ease}.fleet-live-summary{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;gap:10px;padding:14px 15px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(10px)}.fleet-live-summary small{color:var(--muted)}.fleet-live-item{display:flex;width:100%;justify-content:space-between;align-items:flex-start;gap:12px;padding:13px 15px;border:0;border-bottom:1px solid var(--border);color:var(--text);text-align:left;background:transparent;cursor:pointer}.fleet-live-item:hover{background:var(--surface-2)}.fleet-live-item span,.fleet-live-item small{display:block}.fleet-live-item small{margin-top:3px;color:var(--muted)}.fleet-live-item em{font-size:11px;font-style:normal;white-space:nowrap}.fleet-live-item em.is-online{color:var(--success)}.fleet-live-item em.is-offline{color:#d97904}.fleet-live-map{min-width:0;min-height:620px;background:#cbd5df}.dashboard-map-loading{display:grid;height:100%;place-items:center;color:#334155}.fleet-map-warning{position:absolute;right:18px;top:18px;z-index:500;max-width:430px;padding:12px 15px;border:1px solid #f0b457;border-radius:12px;color:#8a5200;background:#fff6dd;box-shadow:0 8px 30px rgba(0,0,0,.16)}.fleet-plate-label{border:0!important;padding:2px 5px!important;color:#152133!important;background:rgba(255,255,255,.88)!important;font-weight:900;box-shadow:0 1px 4px rgba(0,0,0,.25)!important}.fleet-plate-label::before{display:none}.leaflet-popup-content small,.fleet-popup small{display:block;margin-top:5px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.dashboard-map-actions{display:flex;align-items:end;justify-content:flex-end;gap:9px;flex-wrap:wrap}.dashboard-map-actions form{margin:0}.dashboard-map-actions label{display:grid;gap:4px}.dashboard-map-actions label span{color:var(--muted);font-size:11px;font-weight:700}.dashboard-map-actions select{min-width:210px;padding:9px 34px 9px 11px}
.fleet-fuel-div-icon{border:0!important;background:transparent!important}.fleet-fuel-marker{position:relative;display:grid;width:58px;height:58px;place-items:center;border-radius:50%;background:conic-gradient(var(--fuel-color) calc(var(--fuel)*1%),rgba(255,255,255,.72) 0);filter:drop-shadow(0 3px 5px rgba(0,0,0,.38))}.fleet-fuel-marker::before{content:"";position:absolute;inset:6px;border:3px solid #fff;border-radius:50%;background:#1d2a3a}.fleet-fuel-marker>span{position:relative;z-index:1;font-size:23px;line-height:1}.fleet-fuel-marker>b{position:absolute;z-index:2;top:-7px;left:50%;min-width:30px;padding:2px 5px;transform:translateX(-50%);border:2px solid #fff;border-radius:999px;color:#fff;background:var(--fuel-color);font-size:9px;line-height:1.2;text-align:center}.google-fleet-label{transform:translateY(13px)}
.fleet-selection-panel{min-width:0;overflow:auto;border-left:1px solid var(--border);background:var(--surface-2)}.fleet-selection-panel[hidden]{display:none}.fleet-selection-head{position:sticky;top:0;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:16px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface) 96%,transparent);backdrop-filter:blur(10px)}.fleet-selection-head h2{margin:4px 0 0}.fleet-selection-head button{display:grid;width:36px;height:36px;place-items:center;padding:0;border:1px solid var(--border);border-radius:50%;color:var(--text);background:var(--surface);font-size:22px;cursor:pointer}.fleet-selection-panel>[data-map-selection-content]{padding:15px}.selection-status{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;color:var(--muted);font-size:12px}.selection-fuel{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}.selection-fuel-ring{position:relative;display:grid;width:76px;height:76px;flex:0 0 76px;place-items:center;border-radius:50%;background:conic-gradient(var(--fuel-color) calc(var(--fuel)*1%),#dfe6ee 0)}.selection-fuel-ring::before{content:"";position:absolute;inset:8px;border-radius:50%;background:var(--surface)}.selection-fuel-ring strong{position:relative;z-index:1;font-size:18px}.selection-fuel>span{display:grid;gap:4px}.selection-fuel small,.selection-entities small{color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase}.selection-entities{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}.selection-entities section{display:grid;min-width:0;gap:4px;padding:11px;border:1px solid var(--border);border-radius:11px;background:var(--surface)}.selection-entities strong,.selection-entities span{overflow-wrap:anywhere}.selection-entities span{color:var(--muted);font-size:12px}.selection-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.selection-actions .button{flex:1;justify-content:center;white-space:nowrap}.alert.compact{padding:9px 11px;margin-top:10px;font-size:12px}
.dashboard-assignment-dialog{overflow:auto}
.dashboard-assignment-dialog{width:min(1420px,calc(100% - 40px));max-width:none;max-height:92vh;padding:0;border:1px solid var(--border);border-radius:20px;color:var(--text);background:var(--surface)}.dashboard-assignment-dialog::backdrop{background:rgba(8,14,22,.62);backdrop-filter:blur(3px)}.dashboard-assignment-dialog .dialog-head{position:sticky;top:0;z-index:4;background:var(--surface)}.dashboard-detail-filters{position:sticky;top:78px;z-index:3;display:flex;align-items:end;gap:14px;padding:12px 20px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px)}.dashboard-detail-filters[hidden]{display:none!important}.dashboard-detail-filters label{display:grid;min-width:120px;gap:5px}.dashboard-detail-filters label span{font-size:12px;font-weight:700;color:var(--muted)}.dashboard-months{display:flex;gap:6px;flex-wrap:wrap}.dashboard-detail-content{padding:20px}.dashboard-detail-loading{display:grid;min-height:340px;place-items:center;color:var(--muted)}.dashboard-detail-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:16px}.dashboard-detail-summary>div{display:grid;gap:4px;padding:15px;border:1px solid var(--border);border-radius:13px;background:var(--surface-2)}.dashboard-detail-summary small{color:var(--muted)}.dashboard-detail-summary strong{font-size:17px}.dashboard-entity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.dashboard-entity-grid section,.dashboard-entity-single{padding:17px;border:1px solid var(--border);border-radius:15px;background:var(--surface-2)}.dashboard-entity-grid h3,.dashboard-entity-single h3{margin:0 0 13px}.dashboard-entity-grid dl,.dashboard-entity-single dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0 0 14px}.dashboard-entity-grid dl>div,.dashboard-entity-single dl>div{min-width:0;padding:10px;border-radius:10px;background:var(--surface)}.dashboard-entity-grid dt,.dashboard-entity-single dt{color:var(--muted);font-size:11px}.dashboard-entity-grid dd,.dashboard-entity-single dd{margin:3px 0 0;overflow-wrap:anywhere;font-weight:700}.dashboard-trips-section{margin-top:18px}.dashboard-trips-section h3{margin:0 0 10px}.dashboard-trips-section table{min-width:1180px}.dashboard-trips-section tfoot{background:var(--surface-2)}
@media(max-width:1100px){.assignment-board-header{display:none}.assignment-board-row{grid-template-columns:46px repeat(2,minmax(0,1fr))}.assignment-board-row>button::before{content:attr(data-label);margin-bottom:5px;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase}.assignment-board-row .assignment-rate{grid-column:2/-1}.assignment-reorder{grid-row:span 3}.fleet-map-layout{grid-template-columns:260px minmax(0,1fr)}.fleet-map-layout.has-selection{grid-template-columns:260px minmax(0,1fr) 320px}.fleet-map-layout.list-collapsed.has-selection{grid-template-columns:0 minmax(0,1fr) 320px}.dashboard-detail-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.fleet-dashboard-head{flex-direction:column}.dashboard-toolbar{grid-template-columns:1fr}.dashboard-map-actions{justify-content:flex-start}.fleet-map-layout,.fleet-map-layout.has-selection,.fleet-map-layout.list-collapsed,.fleet-map-layout.list-collapsed.has-selection{grid-template-columns:1fr;min-height:auto}.fleet-map-layout.list-collapsed .fleet-live-list{display:none}.fleet-live-list{min-width:0;max-height:310px;border-right:0;border-bottom:1px solid var(--border)}.fleet-live-map{min-height:520px}.fleet-selection-panel{max-height:520px;border-left:0;border-top:1px solid var(--border)}.assignment-board-row{grid-template-columns:42px 1fr}.assignment-reorder{grid-row:span 5}.assignment-board-row .assignment-rate{grid-column:2}.dashboard-order-toolbar{align-items:flex-start;flex-wrap:wrap}.dashboard-order-toolbar em{width:100%}.dashboard-assignment-dialog{width:calc(100% - 16px)}.dashboard-detail-filters{position:static;align-items:stretch;flex-direction:column}.dashboard-detail-summary,.dashboard-entity-grid,.dashboard-entity-grid dl,.dashboard-entity-single dl{grid-template-columns:1fr}.dashboard-detail-content{padding:14px}}
.dashboard-truck-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.dashboard-truck-heading>div{display:flex;gap:8px;flex-wrap:wrap}.dashboard-vignettes{margin-top:16px;padding:17px;border:1px solid var(--border);border-radius:15px;background:var(--surface-2)}.dashboard-vignettes .section-heading h3{margin:0 0 4px}.dashboard-vignettes .section-heading small{color:var(--muted)}.vignette-list{display:grid;gap:9px;margin:14px 0}.vignette-card{overflow:hidden;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.vignette-card>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;cursor:pointer;list-style:none}.vignette-card>summary::-webkit-details-marker{display:none}.vignette-card>summary span:first-child{display:grid;gap:3px}.vignette-card>summary small{color:var(--muted)}.vignette-card .badge{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800}.vignette-card .badge.success{color:#08734a;background:rgba(16,185,129,.14)}.vignette-card .badge.warning{color:#9a5b00;background:rgba(245,158,11,.15)}.vignette-card .badge.danger{color:#b4232d;background:rgba(239,68,68,.14)}.vignette-form{padding:14px;border-top:1px solid var(--border);background:var(--surface-2)}.vignette-readonly{display:flex;justify-content:space-between;gap:12px;padding:0 14px 14px;color:var(--muted)}.vignette-new{margin-top:10px;border-style:dashed}.dashboard-empty.compact{padding:22px}.dashboard-vignettes [data-vignette-feedback]:empty{display:none}
.fleet-popup-action{display:inline-flex;margin-top:10px;padding:7px 10px;border-radius:8px;color:#fff!important;background:var(--primary);font-weight:800;text-decoration:none}.fleet-popup-action:hover{filter:brightness(.94)}
@media(max-width:760px){.dashboard-truck-heading{flex-direction:column}.dashboard-truck-heading>div{width:100%}.dashboard-truck-heading .button{flex:1}.vignette-card>summary{align-items:flex-start}.vignette-form{grid-template-columns:1fr}}
.fleet-popup{min-width:245px}.fleet-popup .driver-mismatch{padding:6px 8px;border-radius:7px;color:#a2212b;background:#fff0f1;font-weight:800}.fleet-popup-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}.fleet-popup-actions .fleet-popup-action,.fleet-popup-actions button{display:inline-flex;margin:0;padding:7px 9px;border:0;border-radius:8px;color:#fff!important;background:var(--primary);font:inherit;font-size:12px;font-weight:800;text-decoration:none;cursor:pointer}.fleet-popup-actions button:nth-last-child(1){background:#159457}.fleet-popup-actions button:nth-last-child(2){background:#168bd2}
.dashboard-realtime-dialog,.dashboard-route-dialog{width:min(1460px,calc(100% - 28px));max-width:none;max-height:94vh;padding:0;overflow:hidden;border:1px solid var(--border);border-radius:20px;color:var(--text);background:var(--surface)}.dashboard-realtime-dialog::backdrop,.dashboard-route-dialog::backdrop{background:rgba(8,14,22,.72);backdrop-filter:blur(4px)}.dashboard-realtime-dialog .dialog-head,.dashboard-route-dialog .dialog-head{position:relative;z-index:3;background:var(--surface)}
.realtime-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,420px);height:min(760px,calc(94vh - 78px))}.realtime-map{min-width:0;background:#cbd5df}.realtime-panel{overflow:auto;padding:16px;border-left:1px solid var(--border);background:var(--surface-2)}.realtime-status-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.realtime-status-head>strong{font-size:22px}.realtime-metrics{display:grid;grid-template-columns:1fr 1fr;gap:9px}.realtime-metrics>div,.telemetry-card{display:grid;gap:4px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.realtime-metrics small,.telemetry-card small{color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase}.telemetry-card{margin-top:10px}.telemetry-card>span{color:var(--muted)}.fuel-meter{height:8px;margin-top:5px;overflow:hidden;border-radius:999px;background:#dfe6ee}.fuel-meter i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ef7f1a,#18a66a)}.oil-service strong{color:#168bd2}.realtime-updated{display:block;margin-top:14px;color:var(--muted)}
.dashboard-route-form{max-height:calc(94vh - 78px);overflow:auto}.route-planner-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;padding:20px}.route-planner-fields label{display:grid;gap:6px}.route-planner-fields label>span,.route-start-card small{font-size:11px;font-weight:800;text-transform:uppercase;color:var(--muted)}.route-planner-fields .full,.route-start-card{grid-column:1/-1}.route-start-card{display:grid;gap:5px;padding:14px;border:1px solid color-mix(in srgb,var(--primary) 35%,var(--border));border-radius:13px;background:color-mix(in srgb,var(--primary) 7%,var(--surface-2))}.route-start-card>span,.route-planner-fields small{color:var(--muted)}.route-estimate-feedback{padding:0 20px}.dashboard-detail-loading.compact{min-height:70px}.route-result-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.route-result-grid>div{display:grid;gap:4px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}.route-result-grid small{color:var(--muted)}.route-result-grid strong{font-size:17px}.route-estimate-map{height:390px;margin:16px 20px;border:1px solid var(--border);border-radius:14px;background:#cbd5df}.dashboard-route-dialog .dialog-actions{position:sticky;bottom:0;background:var(--surface)}
@media(max-width:900px){.realtime-layout{grid-template-columns:1fr;height:auto;max-height:calc(94vh - 78px);overflow:auto}.realtime-map{height:420px}.realtime-panel{overflow:visible;border-left:0;border-top:1px solid var(--border)}.route-result-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.realtime-map{height:330px}.realtime-metrics,.route-result-grid,.route-planner-fields{grid-template-columns:1fr}.route-planner-fields label,.route-start-card{grid-column:auto}.route-estimate-map{height:300px;margin:12px}.dashboard-realtime-dialog,.dashboard-route-dialog{width:calc(100% - 12px)}}
.assignment-reorder.is-unavailable{place-items:center;color:var(--muted)}.dashboard-migration-warning{margin:0}
