/* VoltOps Fleet ERP — navy, blue and green, from the VoltOps website tokens. */
:root {
  --navy-900: #0b1f38; --navy-800: #0e2743; --navy-700: #123154; --navy-600: #1b3d66;
  --blue: #1a74e8; --blue-600: #0f62d6; --blue-100: #e8f1fe;
  --green: #14a05c; --green-100: #e4f7ec;
  --amber: #ef9d13; --amber-100: #fef3e0; --amber-700: #a86500;
  --red: #e5484d; --red-100: #fdecec; --red-700: #b42328;
  --ink: #0f1b2d; --ink-2: #3d4d63; --muted: #6b7a90; --line: #e3e9f2; --line-2: #eef2f8;
  --page: #f4f7fb; --card: #fff; --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 33, 56, .05), 0 2px 8px rgba(15, 33, 56, .05);
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0; letter-spacing: -.4px; font-weight: 700; }
h2 { font-size: 16px; margin: 0; font-weight: 700; }
h3 { font-size: 14px; margin: 14px 0 8px; }
code { font: 12px/1.4 Consolas, ui-monospace, monospace; background: var(--line-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.boot { padding: 40px; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(26, 116, 232, .45); outline-offset: 2px; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; }
.neg { color: var(--red-700); font-weight: 600; }
.pos { color: #0d7a45; font-weight: 600; }
.warn-t { color: var(--amber-700); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Side menu ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: 260px; background: var(--navy-900); color: #dfe7f2; display: flex; flex-direction: column; z-index: 30; transition: width .15s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand .logo { width: 34px; height: 34px; flex: none; }
.brand .vmark { width: 38px; height: 29px; flex: none; color: #fff; } .brand strong .ops { color: #f5a524; }
.brand strong { display: block; font-size: 17px; color: #fff; letter-spacing: -.2px; }
.brand small { display: block; color: #8fa3bf; font-size: 11.5px; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; scrollbar-color: var(--navy-600) transparent; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; color: #fff; font: 600 14px var(--font); border-radius: 9px; background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none; }
.nav-item:hover { background: var(--navy-700); text-decoration: none; }
.nav-item.active, .nav-group.active-group > .nav-item { background: var(--navy-700); }
.nav-item .ico { width: 20px; height: 20px; flex: none; fill: none; stroke: #cfdaea; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item .chev { margin-left: auto; font-style: normal; color: #8fa3bf; transform: rotate(180deg); transition: transform .15s; font-size: 12px; }
.nav-group.open > .nav-item .chev { transform: none; }
.nav-kids { display: none; padding: 2px 0 6px 44px; }
.nav-group.open .nav-kids { display: block; }
.nav-kids a { display: block; padding: 6px 10px; color: #b9c7da; border-radius: 7px; font-size: 13.5px; }
.nav-kids a:hover { color: #fff; background: var(--navy-800); text-decoration: none; }
.nav-kids a.active { color: #fff; background: var(--navy-700); font-weight: 600; }
.collapse { margin: 10px; padding: 10px 14px; background: var(--navy-700); color: #dfe7f2; border: 0; border-radius: 9px; font: 600 13px var(--font); cursor: pointer; text-align: left; }
.mobile-only { display: none; }
.side-foot { padding-bottom: 6px; }
.side-foot .collapse { display: block; width: calc(100% - 20px); margin: 6px 10px; }
.side.collapsed { width: 72px; }
.side.collapsed .brand div, .side.collapsed .nav-item span, .side.collapsed .chev, .side.collapsed .nav-kids, .side.collapsed .collapse span { display: none; }
.side.collapsed .collapse { transform: rotate(180deg); text-align: center; }
.side.collapsed ~ .main-wrap { margin-left: 72px; }

/* ---------- Top bar and main ---------- */
.main-wrap { margin-left: 260px; min-height: 100vh; transition: margin .15s; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { width: 100%; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); font: inherit; }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 33, 56, .15); padding: 6px; z-index: 40; }
.search-results a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--ink); }
.search-results a:hover { background: var(--blue-100); text-decoration: none; }
.search-results .none { padding: 8px 10px; color: var(--muted); }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who strong { display: block; font-size: 13px; line-height: 1.2; }
.who small { color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-100); color: var(--blue-600); display: grid; place-items: center; font-weight: 700; }
main { padding: 26px 28px 60px; max-width: 1640px; outline: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); max-width: 820px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { margin: 26px 0 10px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 13.5px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c7d3e3; text-decoration: none; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: #0f8d50; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: #fff; }
.btn.small { padding: 5px 11px; font-size: 12.5px; }
.btn.block { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { background: none; border: 0; font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 7px; color: var(--ink-2); }
.icon-btn:hover { background: var(--line-2); }
.link { background: none; border: 0; padding: 0; color: var(--blue-600); font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--red-700); }

/* ---------- Stats and cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border-left: 4px solid var(--line); }
.stat.good { border-left-color: var(--green); } .stat.warn { border-left-color: var(--amber); } .stat.bad { border-left-color: var(--red); }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat-value { font-size: 23px; font-weight: 700; margin-top: 4px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-foot { color: var(--muted); font-size: 12px; margin-top: 2px; }
.help { cursor: help; color: var(--muted); font-size: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.grid-2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.grid-2 > div > h3:first-child { margin-top: 0; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; }
.alert.bad { background: var(--red-100); border-color: #f6c5c7; color: #7d1418; }
.alert.warn { background: var(--amber-100); border-color: #f8d79d; color: #6b4300; }
.alert.good { background: var(--green-100); border-color: #b5e6cb; color: #0b5c35; }
.alert.info { background: var(--blue-100); border-color: #c6dcfb; color: #0b3f86; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.error-box { background: var(--red-100); border: 1px solid #f6c5c7; padding: 18px; border-radius: 12px; color: #7d1418; }
.empty-note { color: var(--muted); padding: 18px 0; }
.loading { display: flex; gap: 6px; padding: 40px; justify-content: center; }
.loading span { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); animation: pulse 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; } .loading span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- Badges, chips, tabs ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.good { background: var(--green-100); color: #0b6a3b; } .badge.warn { background: var(--amber-100); color: var(--amber-700); }
.badge.bad { background: var(--red-100); color: var(--red-700); } .badge.info { background: var(--blue-100); color: var(--blue-600); }
.badge.muted { background: var(--line-2); color: var(--ink-2); }
.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.schip { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: 13px; }
.schip b { font-size: 17px; color: var(--ink); }
.schip.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-100); }
.schip:hover { text-decoration: none; border-color: #c7d3e3; }
.chip { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; background: #fff; font: 500 12.5px var(--font); color: var(--ink-2); cursor: pointer; margin: 2px; }
.chip:hover { border-color: var(--blue); text-decoration: none; }
.chips-line { line-height: 2; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; overflow-x: auto; }
.tabs button, .tabs a { background: none; border: 0; padding: 10px 14px; font: 600 14px var(--font); color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs .on { color: var(--blue-600); border-bottom-color: var(--blue); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg a { padding: 6px 14px; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.seg a.on { background: var(--blue); color: #fff; }
.seg a:hover { text-decoration: none; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar input[type=search] { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; min-width: 240px; background: #fff; }
.toolbar select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.range-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.range-bar label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 13px; }
.range-bar input[type=date] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.lg.one { background: #dff0ff; border: 1px solid #a8cdf5; } .lg.crew { background: #d9f3e5; border: 1px solid #9fdcbc; }
.lg.down { background: repeating-linear-gradient(45deg, #e9edf3, #e9edf3 3px, #d5dce6 3px, #d5dce6 6px); } .lg.nodrv { background: #fff; border: 1px dashed #b9c4d3; }
.lg.hp { background: #fde3e3; } .lg.ho { background: #fff1d6; } .lg.hg { background: #d9f3e5; }

/* ---------- Tables ---------- */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); max-width: 100%; }
.table-wrap.sticky { max-height: calc(100vh - 220px); }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th { position: sticky; top: 0; background: #fbfcfe; color: var(--muted); font-weight: 600; font-size: 12.5px; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.table-wrap th[data-sortable] { cursor: pointer; user-select: none; }
.table-wrap th[data-sortable]:hover { color: var(--ink); }
.table-wrap th[data-dir=asc]::after { content: ' ↑'; } .table-wrap th[data-dir=desc]::after { content: ' ↓'; }
.table-wrap th.num { text-align: right; }
.table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tr.clickable { cursor: pointer; }
.table-wrap tbody tr:hover td { background: #f8fbff; }
.table-wrap td.empty { text-align: center; color: var(--muted); padding: 30px; }
.table-wrap tfoot td { font-weight: 700; background: #fbfcfe; border-top: 1px solid var(--line); }
table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mini th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.mini td { padding: 7px 8px; border-bottom: 1px solid var(--line-2); }
table.mini td.empty { color: var(--muted); text-align: center; }
table.mini tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
.bar-cell { position: relative; min-width: 90px; height: 20px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.bar-cell span { position: absolute; inset: 0 auto 0 0; background: #b9d6fb; }
.bar-cell b { position: relative; font-size: 12px; padding: 0 6px; line-height: 20px; }
code.detail { background: none; padding: 0; color: var(--muted); font-size: 11.5px; }
dl.details { display: grid; grid-template-columns: 220px 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
dl.details dt, dl.details dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
dl.details dt { color: var(--muted); font-weight: 600; background: #fbfcfe; }

/* Efficiency table: grouped colours like the sheet people know */
.eff th, .eff td { text-align: center; }
.eff thead tr:nth-child(2) th { top: 41px; }
.eff td b, .eff td small { display: block; line-height: 1.25; }
.eff td small { color: var(--muted); font-size: 10.5px; }
.eff .c-total { background: #fdfdf3; } .eff .c-down { background: #fdf3f3; } .eff .c-work { background: #f1faf4; }
.eff th.c-total { background: #f7f7e6; } .eff th.c-down { background: #f9e7e7; } .eff th.c-work { background: #e4f4ea; }
.eff .rowhead, .heat .rowhead { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 600; white-space: nowrap; }
.heat td.h { text-align: center; font-variant-numeric: tabular-nums; font-size: 12.5px; padding: 6px 4px; min-width: 38px; }
.heat td.p { background: #fde3e3; } .heat td.o { background: #fff1d6; } .heat td.g { background: #d9f3e5; } .heat td.z { color: #c3ccd8; }
.heat th { text-align: center; font-size: 11.5px; }
.heat tr.day-tot th { top: 52px; background: #f3f6fb; color: var(--ink); }

/* ---------- Timetable ---------- */
.tt-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 230px); box-shadow: var(--shadow); }
table.tt { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.tt th, .tt td { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.tt thead th { position: sticky; top: 0; background: #fbfcfe; z-index: 2; font-weight: 600; color: var(--muted); }
.tt thead tr:nth-child(2) th { top: 31px; }
.tt-week { padding: 6px; font-size: 12.5px; text-align: left; }
.tt-day { padding: 4px 2px; min-width: 52px; font-size: 12px; text-align: center; line-height: 1.15; }
.tt-day b { display: block; font-size: 15px; color: var(--ink); }
.tt-day.we { background: #f6f8fb; }
.tt-day.today { background: var(--blue-100); color: var(--blue-600); }
.tt-day.today b { color: var(--blue-600); }
.tt-car { position: sticky; left: 0; background: #fff; z-index: 3; text-align: left; padding: 8px 12px; min-width: 170px; font-weight: 400; }
thead .tt-car { z-index: 4; background: #fbfcfe; }
.tt-car small { display: block; color: var(--muted); }
.tt-cell { height: 56px; padding: 3px; text-align: center; vertical-align: middle; cursor: pointer; position: relative; }
.tt-cell.today { box-shadow: inset 2px 0 0 var(--blue), inset -2px 0 0 var(--blue); }
.tt-cell.empty:hover, .tt-cell.one:hover, .tt-cell.crew:hover { background: #f3f8ff; }
.tt-cell.one { background: #f1f8ff; } .tt-cell.crew { background: #eefaf3; }
.tt-cell.down { background: repeating-linear-gradient(45deg, #eef1f5, #eef1f5 4px, #e0e6ee 4px, #e0e6ee 8px); color: var(--ink-2); font-size: 11px; font-weight: 600; }
.tt-cell.parked { color: var(--muted); font-weight: 500; }
.tt-cell.na { background: #fafbfc; cursor: default; }
.drv { display: inline-block; border: 0; color: #fff; font: 700 11px var(--font); border-radius: 6px; padding: 4px 5px; margin: 1px; cursor: pointer; min-width: 30px; }
.drv:hover { filter: brightness(1.1); }
.tt-cell .trips { position: absolute; right: 3px; bottom: 1px; font-size: 10px; color: var(--muted); }

/* ---------- Forms and dialogs ---------- */
.form { display: grid; gap: 12px; }
.form.grid2 { grid-template-columns: 1fr 1fr; }
.form.grid3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; }
.form .wide { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; margin: 8px 0 -2px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.field em { color: var(--red); font-style: normal; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { padding: 9px 11px; border: 1px solid #d5dee9; border-radius: 8px; font: 400 14px var(--font); color: var(--ink); background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-100); }
.field .invalid, .invalid { border-color: var(--red) !important; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; cursor: pointer; }
.check small { color: var(--muted); }
.form-error { background: var(--red-100); color: #7d1418; padding: 10px 12px; border-radius: 8px; grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.intro { color: var(--ink-2); margin: 0 0 14px; }
.modal-wrap { position: fixed; inset: 0; background: rgba(11, 31, 56, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 60; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(11, 31, 56, .3); }
.modal.wide { max-width: 900px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 18px 20px 20px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); z-index: 90; max-width: min(640px, 92vw); transition: all .25s; border-left: 4px solid var(--green); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-left-color: var(--red); } .toast.warn { border-left-color: var(--amber); }
.steps { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.steps span { padding: 6px 12px; border-radius: 20px; background: var(--line-2); color: var(--muted); font-weight: 600; font-size: 12.5px; }
.steps span.on { background: var(--blue-100); color: var(--blue-600); }
.steps-list li { margin-bottom: 6px; }
details.sample { margin: 8px 0 14px; }
details.sample summary { cursor: pointer; color: var(--blue-600); font-weight: 600; }
details.sample .table-wrap { margin-top: 8px; max-height: 260px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.photos img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.roles ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }

/* ---------- Dashboard ---------- */
.getting-started { border-left: 4px solid var(--blue); }
.gs { margin: 0; padding-left: 22px; columns: 2; column-gap: 28px; }
.gs li { margin-bottom: 8px; break-inside: avoid; }
.gs li.done { color: var(--muted); text-decoration: line-through; }
.gs li.done span { color: var(--green); text-decoration: none; display: inline-block; }
@media (max-width: 860px) { .gs { columns: 1; } }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.todo li.sev-high { border-left-color: var(--red); } .todo li.sev-medium { border-left-color: var(--amber); } .todo li.sev-low { border-left-color: var(--blue); }
.todo a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; color: var(--ink); align-items: center; }
.todo a:hover { background: #f8fbff; text-decoration: none; }
.todo small { display: block; color: var(--muted); }
.todo-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
svg.bars .axis { font-size: 10px; fill: var(--muted); }
.mini-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---------- Map ---------- */
.map-page { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 120px); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.map-list { padding: 18px; border-right: 1px solid var(--line); overflow-y: auto; }
.map-list input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; margin: 12px 0 6px; font: inherit; }
.car-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line-2); background: none; text-align: left; cursor: pointer; font: inherit; border-radius: 6px; }
.car-row:hover, .car-row.on { background: var(--blue-100); }
.car-row small { display: block; color: var(--muted); }
.car-row .speed { margin-left: auto; font-size: 12px; background: var(--line-2); padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.moving { background: var(--green); } .dot.on { background: var(--blue); } .dot.off { background: #a3afbf; }
.map-box { position: relative; min-height: 400px; }

/* ---------- Sign-in ---------- */
.auth { --v-navy: #0b2a6b; --v-navy-900: #061538; --v-orange: #f5a524; --v-orange-600: #e08e0b;
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(420px, 1fr); background: #eef3fa; }
.brand.big { padding: 0; } .brand.big strong { color: var(--ink); font-size: 20px; } .brand.big small { color: var(--muted); }
/* the VoltOps wordmark */
.vbrand { display: flex; align-items: center; gap: 12px; color: var(--v-navy); }
.vbrand .vmark { width: 56px; height: 42px; flex: none; }
.vbrand b { display: block; font-size: 34px; line-height: 1; font-weight: 800; letter-spacing: -1.2px; }
.vbrand b span { color: var(--v-orange); }
.vbrand small { display: block; margin-top: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: 2.6px; text-transform: uppercase; color: #3c4f72; }
.vbrand.light { color: #fff; } .vbrand.light small { color: #c9d6ee; }
.vbrand.center { justify-content: center; margin-bottom: 26px; }
.vbrand.center .vmark { width: 50px; height: 38px; } .vbrand.center b { font-size: 30px; }
/* left: photo hero */
.auth-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 26px; padding: 34px clamp(28px, 4.5vw, 64px) 30px; color: #fff; isolation: isolate; background-color: #071a45;
  background-image: linear-gradient(90deg, rgba(5, 18, 48, .88) 0%, rgba(5, 18, 48, .55) 38%, rgba(5, 18, 48, .08) 68%, rgba(5, 18, 48, 0) 100%), linear-gradient(180deg, rgba(5, 18, 48, .55) 0%, rgba(5, 18, 48, 0) 26%, rgba(5, 18, 48, 0) 52%, rgba(5, 18, 48, .72) 74%, rgba(5, 18, 48, .94) 100%), url(/img/login-hero.jpg);
  background-size: cover; background-position: 34% 46%; }
.ah-copy h2, .ah-copy p, .ah-ticks { text-shadow: 0 2px 18px rgba(0, 10, 30, .45); }
.ah-copy { max-width: 640px; animation: auth-up .6s ease both; }
.ah-copy h2 { font-size: clamp(36px, 4.1vw, 62px); line-height: 1.02; letter-spacing: -2px; font-weight: 800; margin: 6px 0 16px; }
.ah-copy h2 span { color: var(--v-orange); }
.ah-copy p { font-size: 17px; line-height: 1.55; color: #d3def0; margin: 0 0 18px; max-width: 520px; }
.ah-ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0; padding: 0; font-weight: 600; font-size: 15px; }
.ah-ticks li { display: inline-flex; align-items: center; gap: 8px; }
.ah-ticks svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: #22c47a; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ah-photo { position: relative; flex: 1 1 auto; min-height: 200px; animation: auth-up .7s .1s ease both; }
.ah-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 9px 13px 9px 9px; border-radius: 13px; background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: 0 16px 40px rgba(3, 12, 32, .35); animation: auth-float 6s ease-in-out infinite; }
.ah-chip b { display: block; font-size: 12.5px; } .ah-chip small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.ah-chip i { width: 7px; height: 7px; border-radius: 50%; } .ah-chip i.on { background: #22c47a; } .ah-chip i.due { background: var(--red); }
.ah-chip-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #e6efff; color: #1a5fd0; }
.ah-chip-ic.warn { background: #fff1db; color: var(--v-orange-600); }
.ah-chip-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ah-chip-a { left: 0; top: 10%; } .ah-chip-b { right: 0; top: 34%; animation-delay: 1.4s; }
.ah-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; animation: auth-up .7s .18s ease both; }
.ah-f { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(6px); }
.ah-f b { display: block; font-size: 14.5px; margin-bottom: 2px; } .ah-f small { color: #b9c8e0; font-size: 12.5px; line-height: 1.45; }
.ah-f-ic { width: 42px; height: 42px; flex: none; border-radius: 11px; display: grid; place-items: center; }
.ah-f-ic svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ah-f-ic.blue { background: #1f6fe5; } .ah-f-ic.green { background: #169a5a; } .ah-f-ic.orange { background: #e8731a; }
.ah-f-ic.purple { background: #6e47d8; } .ah-f-ic.amber { background: #d99a06; } .ah-f-ic.red { background: #d63a49; }
.ah-foot { display: flex; align-items: center; gap: 28px; margin-top: auto; padding-top: 6px; }
.ah-script { margin: 0; flex: none; font: 600 30px/1.05 'Caveat', 'Segoe Script', cursive; color: #fff; transform: rotate(-6deg); }
.ah-script::after { content: ''; display: block; width: 120px; height: 3px; margin-top: 6px; border-radius: 3px; background: var(--v-orange); }
.ah-stats { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); }
.ah-stats div { padding: 2px 14px; border-left: 1px solid rgba(255, 255, 255, .16); }
.ah-stats svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.ah-stats b { display: block; font-size: 13.5px; } .ah-stats small { color: #a9bad6; font-size: 11.5px; }
/* right: the sign-in card */
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px clamp(20px, 3.5vw, 56px) 20px;
  background: radial-gradient(700px 500px at 100% 0%, #dbe8fb, transparent 70%), linear-gradient(180deg, #f4f8fd, #e8f0fa); }
.auth-panel { width: 100%; max-width: 470px; margin: auto 0; padding: 38px 36px 30px; background: #fff; border-radius: 24px; border: 1px solid #e2e9f4; box-shadow: 0 2px 4px rgba(11, 42, 107, .04), 0 30px 70px rgba(11, 42, 107, .12); animation: auth-up .5s ease both; }
.auth-company { text-align: center; margin: -10px 0 14px; } .auth-company span { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #fff4e0; color: #9a5b00; font-weight: 700; font-size: 12px; }
.auth-panel h1 { font-size: 34px; letter-spacing: -1.1px; margin: 0 0 6px; color: var(--v-navy); font-weight: 800; }
.auth-panel h1.center, .auth-panel .intro.center { text-align: center; }
.auth-panel .intro { color: var(--muted); font-size: 15.5px; margin: 0 0 22px; }
.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 22px; border-radius: 14px; background: #eef3fa; }
.role-tab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; }
.role-tab:hover { text-decoration: none; background: #e3ebf7; }
.role-tab svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.role-tab b { display: block; font-size: 14px; } .role-tab small { display: block; font-size: 11.5px; color: var(--muted); }
.role-tab.on { background: var(--v-navy); color: #fff; box-shadow: 0 6px 16px rgba(11, 42, 107, .25); } .role-tab.on small { color: #c4d2ec; }
.auth-form { display: grid; gap: 15px; }
.af { display: grid; gap: 7px; } .af-label { font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.af-box { position: relative; display: flex; align-items: center; height: 52px; border: 1.5px solid #dbe3ee; border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.af-box:hover { border-color: #c5d1e2; }
.af-box:focus-within { border-color: #1f5fd6; box-shadow: 0 0 0 4px rgba(31, 95, 214, .13); }
.af-box > svg { width: 20px; height: 20px; margin: 0 4px 0 16px; flex: none; fill: none; stroke: #7d8ca3; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.af-box:focus-within > svg { stroke: #1f5fd6; }
.af-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 12px 0 10px; font: 500 15px var(--font); color: var(--ink); }
.af-box input::placeholder { color: #a3afbf; font-weight: 400; }
.af-box input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; }
.af-eye { height: 40px; width: 42px; margin-right: 5px; border: 0; border-radius: 9px; background: transparent; color: #7d8ca3; cursor: pointer; display: grid; place-items: center; }
.af-eye:hover { background: #eef3fa; color: var(--ink-2); }
.af-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.af-caps { color: var(--amber-700); font-weight: 600; }
.af-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: -2px; }
.af-secure { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.af-secure svg { width: 17px; height: 17px; fill: none; stroke: #169a5a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.af-link { border: 0; background: none; padding: 0; color: #1f5fd6; font: 600 13.5px var(--font); cursor: pointer; } .af-link:hover { text-decoration: underline; }
.af-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: #eef4ff; color: #1d3a6e; font-size: 13px; }
.auth-panel .form-error { margin: 0; border: 1px solid #f6c9cb; }
.auth-submit { position: relative; height: 54px; margin-top: 4px; border: 0; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font: 700 16px var(--font);
  background: linear-gradient(180deg, #123a8a, #0b2a6b); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 12px 26px rgba(11, 42, 107, .32); transition: transform .12s, box-shadow .15s, filter .15s; }
.auth-submit:hover { filter: brightness(1.12); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 16px 32px rgba(11, 42, 107, .4); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-submit.is-loading { pointer-events: none; color: transparent; }
.auth-submit.is-loading::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: auth-spin .7s linear infinite; }
.auth-help { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid #e9eef6; text-align: center; color: var(--muted); font-size: 13.5px; } .auth-help b { color: #1f5fd6; }
.auth-legal { display: flex; justify-content: space-between; gap: 12px; width: 100%; max-width: 470px; margin-top: 22px; color: #7a8aa3; font-size: 12px; }
/* setup and change-password pages share the card */
.auth-panel .form { gap: 14px; } .auth-panel .btn.primary.block { height: 52px; font-size: 15px; border-radius: 12px; margin-top: 6px; background: var(--v-navy); border-color: var(--v-navy); }
.auth-form.shake { animation: auth-shake .38s ease; }
@keyframes auth-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes auth-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@keyframes auth-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (min-width: 961px) {
  .auth { height: 100vh; min-height: 640px; }
  .auth-hero { gap: clamp(10px, 2.2vh, 26px); padding-top: clamp(18px, 3.4vh, 34px); padding-bottom: clamp(14px, 3vh, 30px); }
  .ah-copy h2 { font-size: clamp(32px, min(4.1vw, 6.4vh), 62px); margin-bottom: clamp(8px, 1.6vh, 16px); }
  .ah-photo { min-height: 90px; }
  .auth-main { overflow-y: auto; }
}
@media (min-width: 961px) and (max-height: 900px) {
  .ah-copy p { font-size: 15px; margin-bottom: 12px; }
  .ah-f { padding: 10px 12px; align-items: center; } .ah-f small { display: none; } .ah-f-ic { width: 36px; height: 36px; }
  .ah-script { font-size: 25px; } .ah-stats small { display: none; }
  .auth-panel { padding: 28px 32px 22px; } .vbrand.center { margin-bottom: 16px; } .auth-panel .intro { margin-bottom: 16px; } .role-tabs { margin-bottom: 16px; }
  .auth-help { margin-top: 16px; padding-top: 14px; } .auth-legal { margin-top: 12px; }
}
@media (min-width: 961px) and (max-height: 720px) { .ah-foot { display: none; } }
@media (max-width: 1280px) { .ah-stats div:nth-child(4) { display: none; } .ah-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) { .ah-grid { grid-template-columns: repeat(2, 1fr); } .ah-script { display: none; } }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 22px 20px 0; gap: 14px; }
  .ah-copy p, .ah-ticks, .ah-grid, .ah-foot, .ah-chip { display: none; }
  .ah-copy h2 { font-size: 30px; letter-spacing: -1px; margin: 4px 0 0; }
  .auth-hero { background-image: linear-gradient(180deg, rgba(5, 18, 48, .82) 0%, rgba(5, 18, 48, .35) 45%, rgba(5, 18, 48, .1) 70%, rgba(5, 18, 48, .55) 100%), url(/img/login-hero.jpg); background-position: 42% 64%; } .ah-photo { flex: none; min-height: 150px; } .ah-copy { display: none; } .vbrand.light b { font-size: 28px; } .vbrand.light .vmark { width: 46px; height: 34px; }
  .auth-main { padding: 18px 14px 18px; justify-content: flex-start; }
  .auth-panel { padding: 26px 20px 22px; border-radius: 20px; }
  .auth-panel > .vbrand.center { display: none; }
  .auth-panel h1 { font-size: 28px; }
  .auth-legal { flex-direction: column; align-items: center; text-align: center; }
  .ah-copy h2 { font-size: 25px; }
  .auth-panel { padding: 20px 18px 18px; } .auth-panel h1 { font-size: 24px; } .auth-panel .intro { font-size: 14px; margin-bottom: 14px; }
  .role-tabs { margin-bottom: 14px; } .role-tab { padding: 9px 10px; } .role-tab small { display: none; } .role-tab svg { width: 20px; height: 20px; }
  .auth-form { gap: 12px; } .af-box { height: 48px; } .auth-submit { height: 50px; }
  .auth-help { margin-top: 14px; padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .auth *, .auth *::before, .auth *::after { animation: none !important; transition: none !important; } }

/* ---------- Invoice / print ---------- */
.inv-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
@media print {
  .side, .top, .page-head .actions, .range-bar, .toolbar, .form-actions, .modal-head { display: none !important; }
  .main-wrap { margin: 0 !important; } .modal-wrap { position: static; background: none; padding: 0; } .modal { box-shadow: none; }
  body { background: #fff; } .card, .table-wrap { box-shadow: none; }
  body:has(.modal-wrap) .main-wrap { display: none; }
}

/* ---------- Phones and tablets ---------- */
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } .form.grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .side { transform: translateX(-100%); transition: transform .2s; width: 260px; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .side.collapsed { width: 260px; }
  .side.collapsed .brand div, .side.collapsed .nav-item span, .side.collapsed .chev, .side.collapsed .collapse span { display: initial; }
  .main-wrap, .side.collapsed ~ .main-wrap { margin-left: 0; }
  .menu-btn { display: block; }
  .mobile-only { display: block; } .desk-only { display: none; }
  .top { padding: 10px 16px; }
  .who div, .who .btn { display: none; }
  main { padding: 18px 16px 50px; }
  .form.grid2, .form.grid3 { grid-template-columns: 1fr; }
  .map-page { grid-template-columns: 1fr; grid-template-rows: 240px 1fr; height: calc(100vh - 90px); }
  .map-list { border-right: 0; border-bottom: 1px solid var(--line); }
  dl.details { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 19px; }
}
