:root {
  --navy: #073b78;
  --navy-dark: #06264e;
  --blue: #1572c8;
  --green: #159447;
  --orange: #ea7c16;
  --violet: #7152c7;
  --ink: #14233b;
  --muted: #67758a;
  --line: #dfe7f1;
  --canvas: #f3f6fa;
  --surface: #fff;
  --shadow: 0 16px 40px rgba(20, 45, 78, .08);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 18px 22px; color: #fff; background: radial-gradient(circle at 20% 0, rgba(55,150,255,.34), transparent 30%), linear-gradient(180deg, var(--navy), var(--navy-dark)); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 14px; background: rgba(255,255,255,.12); font-size: 22px; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; }
.brand small { margin-top: 3px; color: #bfd7f4; font-size: 11px; }
.demo-label { width: fit-content; display: flex; align-items: center; gap: 8px; margin: 26px 8px 18px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #d8eaff; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.demo-label span, .system-state i { width: 8px; height: 8px; border-radius: 50%; background: #41d67a; box-shadow: 0 0 0 4px rgba(65,214,122,.14); }
.main-nav { display: grid; gap: 7px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; border-radius: 12px; color: #c5d9ef; background: transparent; text-align: left; transition: .16s ease; }
.nav-item b { color: #80baf1; font-size: 10px; letter-spacing: .08em; }
.nav-item:hover, .nav-item:focus-visible { color: #fff; background: rgba(255,255,255,.09); outline: none; }
.nav-item.active { color: #fff; background: rgba(255,255,255,.15); box-shadow: inset 3px 0 #65b5ff; }
.sidebar-note { margin-top: auto; padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(3,27,58,.42); }
.sidebar-note strong { font-size: 12px; }
.sidebar-note p { margin: 6px 0 0; color: #a9c2df; font-size: 11px; line-height: 1.5; }
.workspace { min-width: 0; padding: 0 30px 48px; }
.topbar { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar h1 { margin: 5px 0 0; font-size: clamp(24px, 2vw, 32px); letter-spacing: -.03em; }
.eyebrow, .section-kicker { margin: 0; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.topbar-actions, .system-state { display: flex; align-items: center; gap: 11px; }
.system-state { color: var(--muted); font-size: 12px; }
.system-state.offline i { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.12); }
.ghost-button, .primary-button, .upload-button { border-radius: 10px; font-weight: 700; }
.ghost-button { padding: 10px 14px; border: 1px solid var(--line); color: var(--ink); background: #fff; }
.primary-button, .upload-button { padding: 11px 17px; border: 1px solid var(--navy); color: #fff; background: var(--navy); box-shadow: 0 8px 18px rgba(10,77,153,.18); }
.primary-button:disabled { opacity: .5; cursor: not-allowed; }
.upload-button { display: inline-flex; align-items: center; cursor: pointer; }
.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.view { display: none; animation: view-in .22s ease; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.intro-card { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 27px 30px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 85% 20%, rgba(73,170,255,.38), transparent 28%), linear-gradient(120deg, #07366d, #0b5aaa); box-shadow: var(--shadow); }
.intro-card h2 { max-width: 720px; margin: 8px 0; font-size: clamp(24px, 3vw, 38px); line-height: 1.08; letter-spacing: -.035em; }
.intro-card p { margin: 0; color: #c9e2fb; line-height: 1.55; }
.intro-card .section-kicker { color: #8fc9ff; }
.intro-status { min-width: 160px; padding: 15px 18px; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; background: rgba(255,255,255,.1); }
.intro-status span, .intro-status strong { display: block; }
.intro-status span { color: #acd5fa; font-size: 10px; text-transform: uppercase; }
.intro-status strong { margin-top: 5px; font-size: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin: 18px 0; }
.metric-card { position: relative; overflow: hidden; min-height: 142px; padding: 20px; border: 1px solid var(--line); border-top: 3px solid currentColor; border-radius: 16px; background: var(--surface); box-shadow: 0 10px 30px rgba(20,45,78,.05); }
.metric-card::after { content: ""; position: absolute; right: -18px; bottom: -22px; width: 85px; height: 85px; border-radius: 50%; background: currentColor; opacity: .09; }
.metric-card > span, .metric-card small { display: block; color: var(--muted); }
.metric-card > span { font-size: 12px; font-weight: 700; }
.metric-card strong { display: block; margin: 13px 0 9px; color: var(--ink); font-size: 29px; }
.metric-card em { font-style: normal; }
.metric-card small { font-size: 11px; }
.metric-card.blue { color: var(--blue); } .metric-card.green { color: var(--green); } .metric-card.violet { color: var(--violet); } .metric-card.orange { color: var(--orange); }
.panel, .split-header, .catalog-summary > div { border: 1px solid var(--line); background: var(--surface); box-shadow: 0 10px 30px rgba(20,45,78,.05); }
.panel { padding: 22px; border-radius: 17px; }
.panel-heading, .split-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading { margin-bottom: 18px; }
.panel h2, .split-header h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.02em; }
.split-header { margin-bottom: 20px; padding: 24px 27px; border-radius: 17px; }
.split-header p, .panel > p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; }
.data-badge, .status-pill { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.data-badge { color: #766316; background: #fff8d6; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 11px 12px; color: var(--muted); background: #f7f9fc; font-size: 10px; text-align: left; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 14px 12px; border-bottom: 1px solid #edf1f6; }
tbody tr:last-child td { border-bottom: 0; }
.occupancy { display: flex; align-items: center; gap: 9px; }
.progress { width: 74px; height: 6px; overflow: hidden; border-radius: 99px; background: #e8edf4; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.status-pill.high { color: #087237; background: #dff6e9; }
.status-pill.medium { color: #9b5d09; background: #fff0d6; }
.status-pill.low { color: #b4232f; background: #ffe3e5; }
.catalog-summary { display: grid; grid-template-columns: 2fr repeat(3,1fr); gap: 12px; margin-bottom: 18px; }
.catalog-summary > div { padding: 15px 18px; border-radius: 14px; }
.catalog-summary span, .catalog-summary strong { display: block; }
.catalog-summary span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.catalog-summary strong { overflow: hidden; margin-top: 6px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.search-input, .ruid-tool input, .config-preview select { border: 1px solid #cfd9e6; border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
.search-input { width: min(300px,40vw); padding: 10px 12px; }
.search-input:focus, .ruid-tool input:focus, .config-preview select:focus { border-color: #4896dd; box-shadow: 0 0 0 3px rgba(72,150,221,.12); }
.search-input:disabled { background: #f3f5f8; }
.empty-state { min-height: 230px; display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); }
.empty-state > span { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; color: var(--blue); background: #eaf3ff; font-size: 22px; font-weight: 800; }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 5px 0 0; }
.hidden { display: none !important; }
.tool-layout, .map-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
.ruid-tool form { margin-top: 24px; }
.ruid-tool label, .config-preview label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 800; }
.input-row { display: flex; gap: 9px; }
.input-row input { flex: 1; min-width: 0; padding: 12px 13px; font-family: Consolas, monospace; }
.result-card { display: grid; grid-template-columns: .8fr 1.4fr 1.2fr; gap: 10px; margin-top: 18px; padding: 15px; border-radius: 13px; background: #f3f7fc; }
.result-card span, .result-card strong { display: block; }
.result-card span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.result-card strong { overflow-wrap: anywhere; margin-top: 5px; font-family: Consolas, monospace; font-size: 13px; }
.timeline { display: grid; gap: 17px; margin: 21px 0; }
.timeline-step { display: flex; gap: 13px; align-items: flex-start; }
.timeline-step > span, .workflow-card > span { display: grid; place-items: center; color: var(--blue); background: #eaf3ff; font-weight: 800; }
.timeline-step > span { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.timeline-step.active > span { color: #fff; background: var(--green); }
.timeline-step strong, .timeline-step p { display: block; }
.timeline-step strong { font-size: 13px; }
.timeline-step p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.config-preview { padding: 15px; border-radius: 12px; background: #f7f9fc; }
.config-preview select { width: 100%; padding: 10px; }
.config-preview small { display: block; margin-top: 7px; color: var(--muted); }
.workflow-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.workflow-card { min-height: 175px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.workflow-card > span { width: 34px; height: 34px; margin-bottom: 23px; border-radius: 10px; }
.workflow-card.ready { border-color: #a9ccec; box-shadow: inset 0 3px var(--blue); }
.workflow-card strong { display: block; font-size: 14px; }
.workflow-card p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.stop-line { position: relative; display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 25px; }
.stop-line::before { content: ""; position: absolute; top: 15px; left: 7%; right: 7%; height: 2px; background: #b7d3ee; }
.stop-line div { position: relative; text-align: center; }
.stop-line div::before { content: ""; width: 12px; height: 12px; display: block; margin: 10px auto 15px; border: 4px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.stop-line span, .stop-line strong { display: block; }
.stop-line span { color: var(--blue); font-size: 12px; font-weight: 800; }
.stop-line strong { margin-top: 4px; font-size: 12px; }
.map-layout { min-height: 580px; }
.map-placeholder { position: relative; overflow: hidden; min-height: 580px; border: 1px solid #bfcddd; border-radius: 18px; background: linear-gradient(35deg,transparent 46%,rgba(93,126,160,.16) 47%,rgba(93,126,160,.16) 50%,transparent 51%), linear-gradient(-25deg,transparent 46%,rgba(93,126,160,.13) 47%,rgba(93,126,160,.13) 50%,transparent 51%), #dfe8e8; background-size: 110px 90px,130px 105px; }
.zone-shape { position: absolute; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 45% 55% 58% 42%; color: var(--blue); background: rgba(21,114,200,.16); font-weight: 900; }
.zone-a { width: 180px; height: 135px; top: 90px; left: 11%; }
.zone-b { width: 210px; height: 150px; top: 230px; right: 11%; color: var(--green); background: rgba(21,148,71,.14); transform: rotate(9deg); }
.zone-c { width: 150px; height: 120px; bottom: 68px; left: 18%; color: var(--orange); background: rgba(234,124,22,.16); }
.map-route { position: absolute; top: 30%; left: 18%; width: 62%; height: 42%; border: 5px solid transparent; border-top-color: var(--violet); border-right-color: var(--violet); border-radius: 50%; transform: rotate(14deg); }
.map-copy { position: absolute; left: 22px; bottom: 22px; max-width: 360px; padding: 18px; border: 1px solid rgba(255,255,255,.55); border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.map-copy h2 { margin: 5px 0; }
.map-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.zone-list { align-self: start; }
.zone-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.zone-dot { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; }
.zone-dot.a { background: var(--blue); } .zone-dot.b { background: var(--green); } .zone-dot.c { background: var(--orange); }
.zone-row strong, .zone-row small { display: block; }
.zone-row small { margin-top: 4px; color: var(--muted); }
.zone-row b { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.panel-note { padding: 12px; border-radius: 10px; background: #f5f7fa; font-size: 11px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(390px,calc(100vw - 48px)); padding: 13px 16px; border-radius: 12px; color: #fff; background: var(--navy-dark); box-shadow: 0 18px 40px rgba(4,25,52,.24); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #a6242f; }
@media (max-width:1050px) { .metric-grid,.workflow-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .tool-layout,.map-layout { grid-template-columns: 1fr; } .map-placeholder { min-height: 470px; } }
@media (max-width:780px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; padding: 16px; } .main-nav { display: flex; overflow-x: auto; margin-top: 15px; } .nav-item { width: auto; flex: 0 0 auto; } .demo-label,.sidebar-note { display:none; } .workspace { padding: 0 16px 35px; } .topbar { min-height: 90px; } .system-state { display:none; } .intro-card,.panel-heading,.split-header { align-items:flex-start; flex-direction:column; } .intro-status { width:100%; } .catalog-summary { grid-template-columns:1fr 1fr; } .result-card { grid-template-columns:1fr; } }
@media (max-width:520px) { .metric-grid,.workflow-grid,.catalog-summary { grid-template-columns:1fr; } .topbar-actions .ghost-button { display:none; } .input-row { flex-direction:column; } .stop-line { grid-template-columns:1fr; } .stop-line::before { display:none; } }

.geotab-hosted .app-shell { grid-template-columns: minmax(0, 1fr); }
.geotab-hosted .sidebar { display: none; }
.geotab-hosted .workspace { padding-top: 0; }
