/* ==========================================================================
   Volta Ops — fleet & rental operations console
   Light editorial · same brand DNA as the public site (paper / ink / accent)
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../../../assets/fonts/fraunces-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url('../../../assets/fonts/fraunces-italic-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../../../assets/fonts/outfit-latin-var.woff2') format('woff2');
}

:root {
  --paper: #FAF7F2;
  --surface: #FFFFFF;
  --sand: #F1EBDF;
  --sand-deep: #E7DECB;
  --ink: #14342F;
  --ink-2: #405D57;
  --ink-3: #71877F;
  --line: rgba(20, 52, 47, 0.13);
  --line-strong: rgba(20, 52, 47, 0.24);
  --accent: #E8590C;
  --accent-ink: #C24707;
  --accent-soft: #FBE7DA;
  --pine-deep: #0D241F;
  --pine-mid: #16382F;
  --sea: #2A9D8F;
  --sea-ink: #1E7167;
  --sea-soft: #DBEEE9;
  --gold: #D9A441;
  --gold-ink: #8A6215;
  --gold-soft: #F6EBD2;
  --rust: #A8492F;
  --rust-ink: #8E3A22;
  --rust-soft: #F4E2D9;
  --grey-ink: #5F6A64;
  --grey-soft: #EBEBE4;

  --f-display: 'Fraunces', Georgia, serif;
  --f-body: 'Outfit', 'Segoe UI', sans-serif;
  --f-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, 'SF Mono', Menlo, monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(20, 52, 47, 0.05), 0 2px 8px rgba(20, 52, 47, 0.04);
  --shadow-md: 0 4px 14px -2px rgba(20, 52, 47, 0.09), 0 2px 6px rgba(20, 52, 47, 0.05);
  --shadow-lg: 0 28px 56px -18px rgba(20, 52, 47, 0.28);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-w: 248px;
  --topbar-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1100px 420px at 78% -180px, rgba(42, 157, 143, 0.07), transparent 62%),
    radial-gradient(900px 380px at 8% -160px, rgba(232, 89, 12, 0.05), transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Slim, quiet scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(20,52,47,.22) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(20,52,47,.18); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background-color: rgba(20,52,47,.32); }

.oic { width: 18px; height: 18px; flex: 0 0 auto; }

/* ==========================================================================
   Shell
   ========================================================================== */
.ops-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(420px 300px at -60px -40px, rgba(232, 89, 12, 0.16), transparent 65%),
    radial-gradient(500px 420px at 130% 108%, rgba(42, 157, 143, 0.12), transparent 60%),
    linear-gradient(180deg, #10302A 0%, var(--pine-deep) 100%);
  color: #EDE9DF;
  padding: 22px 16px 18px;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  padding: 2px 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.mark { width: 34px; height: 34px; display: block; }
.mark svg { width: 100%; height: 100%; display: block; }
.brand-name {
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 560;
  letter-spacing: 0.01em;
}
.brand-ops {
  font-family: var(--f-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-left: 7px;
  transform: translateY(-1px);
  display: inline-block;
}

.nav { flex: 1; padding: 18px 0 8px; overflow-y: auto; }
.nav-group + .nav-group { margin-top: 20px; }
.nav-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(237, 233, 223, 0.38);
  padding: 0 10px 8px;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  margin: 1px 0;
  border-radius: 11px;
  color: rgba(237, 233, 223, 0.72);
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.is-active { background: rgba(255, 255, 255, 0.09); color: #fff; }
.nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav-item.is-active .nav-ic { color: var(--accent); }
.nav-ic { width: 19px; height: 19px; }
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-badge.warn { background: var(--gold); color: #2C2408; }
.nav-badge.pulse { animation: badge-pulse 1.6s ease-out 3; }
@keyframes badge-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 89, 12, 0.55); }
  100% { box-shadow: 0 0 0 12px rgba(232, 89, 12, 0); }
}

.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, 0.09); padding-top: 14px; display: grid; gap: 12px; }
.site-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: rgba(237, 233, 223, 0.62);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.site-link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.site-link .oic { width: 15px; height: 15px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 2px 6px; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  letter-spacing: 0.04em;
}
.user-meta { display: grid; line-height: 1.3; }
.user-meta strong { font-size: 13.5px; font-weight: 600; }
.user-meta em { font-style: normal; font-size: 11.5px; color: rgba(237, 233, 223, 0.5); }

.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(13, 36, 31, 0.45);
  backdrop-filter: blur(2px);
  z-index: 35;
}

/* ---- Body column ---- */
.ops-body { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--topbar-h);
  padding: 14px 34px;
  background: rgba(250, 247, 242, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.tb-title { display: grid; gap: 1px; min-width: 0; }
.overline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.overline::before { content: ''; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }
.tb-title h1 {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 560;
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sea);
  box-shadow: 0 0 0 0 rgba(42, 157, 143, 0.5);
  animation: live-breathe 2.4s ease-in-out infinite;
}
@keyframes live-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 157, 143, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(42, 157, 143, 0); }
}
.clock {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  padding: 7px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.icon-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* ---- Content ---- */
.ops-content {
  padding: 26px 34px 60px;
  max-width: 1460px;
  width: 100%;
  margin: 0 auto;
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 90px 0;
  color: var(--ink-3);
  font-size: 14px;
}
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--sand-deep);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Primitives
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-h {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px 0;
}
.card-h .overline { color: var(--ink-3); }
.card-h .overline::before { background: var(--accent); }
.card-title {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 560;
  letter-spacing: -0.005em;
}
.card-sub { font-size: 12.5px; color: var(--ink-3); }
.card-h .spacer { flex: 1; }
.card-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.card-link:hover { text-decoration: underline; }
.card-link .oic { width: 14px; height: 14px; }
.card-b { padding: 16px 22px 20px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 99px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s, background 0.2s, border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .oic { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(232, 89, 12, 0.55); }
.btn.primary:hover:not(:disabled) { background: var(--accent-ink); }
.btn.dark { background: var(--ink); color: #FDFBF7; }
.btn.dark:hover:not(:disabled) { background: var(--pine-deep); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover:not(:disabled) { background: var(--sand); }
.btn.soft { background: var(--sea-soft); color: var(--sea-ink); }
.btn.soft:hover:not(:disabled) { background: #CBE6DF; }
.btn.danger-soft { background: var(--rust-soft); color: var(--rust-ink); }
.btn.danger-soft:hover:not(:disabled) { background: #ECD4C7; }
.btn.sm { padding: 6px 13px; font-size: 12.5px; }
.btn.block { width: 100%; }

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3.5px 11px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.st-available, .pill.st-confirmed, .pill.st-sea { background: var(--sea-soft); color: var(--sea-ink); }
.pill.st-rented, .pill.st-on_rent, .pill.st-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill.st-cleaning, .pill.st-new, .pill.st-gold { background: var(--gold-soft); color: var(--gold-ink); }
.pill.st-maintenance, .pill.st-no_show, .pill.st-rust { background: var(--rust-soft); color: var(--rust-ink); }
.pill.st-returned, .pill.st-grey { background: var(--grey-soft); color: var(--grey-ink); }
.pill.st-cancelled { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pill.plain::before { display: none; }

.plate {
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 2.5px 8px;
  border-radius: 6px;
  background: var(--sand);
  border: 1px solid var(--sand-deep);
  color: var(--ink-2);
  white-space: nowrap;
}
.ref {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-2);
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 10px;
  border-radius: 99px;
  background: var(--sand);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip .oic { width: 12.5px; height: 12.5px; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
}
.tab:hover { border-color: var(--line-strong); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: #FDFBF7; }
.tab .count {
  font-family: var(--f-mono);
  font-size: 11px;
  background: var(--sand);
  color: var(--ink-2);
  padding: 1px 7px;
  border-radius: 99px;
}
.tab.is-active .count { background: rgba(255, 255, 255, 0.16); color: #fff; }
.tab .count.attention { background: var(--accent-soft); color: var(--accent-ink); }
.tab.is-active .count.attention { background: var(--accent); color: #fff; }

/* Inputs */
.input, .select {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.14);
}
.input::placeholder { color: var(--ink-3); }
.search-wrap { position: relative; }
.search-wrap .oic {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-3);
  pointer-events: none;
}
.search-wrap .input { padding-left: 36px; width: 250px; }

/* Empty state */
.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.empty .oic { width: 26px; height: 26px; opacity: 0.5; }

/* ==========================================================================
   KPI band
   ========================================================================== */
.kpi-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.kpi {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 16px;
  display: grid;
  gap: 6px;
  align-content: start;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-head { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.kpi-head .oic { width: 15px; height: 15px; color: var(--accent); }
.kpi-value {
  font-family: var(--f-display);
  font-size: 38px;
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-variant-numeric: lining-nums;
}
.kpi-value small { font-size: 22px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
.kpi-sub { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi.dark {
  background:
    radial-gradient(340px 200px at 105% -20%, rgba(232, 89, 12, 0.35), transparent 60%),
    radial-gradient(260px 180px at -10% 115%, rgba(42, 157, 143, 0.28), transparent 62%),
    linear-gradient(160deg, #16382F, var(--pine-deep));
  border-color: rgba(255, 255, 255, 0.08);
  color: #F3EFE6;
}
.kpi.dark .kpi-head { color: rgba(243, 239, 230, 0.6); }
.kpi.dark .kpi-head .oic { color: var(--accent); }
.kpi.dark .kpi-value small { color: rgba(243, 239, 230, 0.66); }
.kpi.dark .kpi-sub { color: rgba(243, 239, 230, 0.62); }
.kpi .mini-track { height: 5px; border-radius: 99px; background: rgba(20, 52, 47, 0.1); overflow: hidden; margin-top: 2px; }
.kpi.dark .mini-track { background: rgba(255, 255, 255, 0.14); }
.kpi .mini-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sea), #57C4B5); transition: width 1.1s var(--ease-out); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; }
.delta .oic { width: 12px; height: 12px; }
.delta.up { background: var(--sea-soft); color: var(--sea-ink); }
.delta.down { background: var(--rust-soft); color: var(--rust-ink); }
.kpi.dark .delta.up { background: rgba(42, 157, 143, 0.22); color: #7ED8CB; }
.kpi.dark .delta.down { background: rgba(232, 89, 12, 0.25); color: #FFB68A; }

/* ==========================================================================
   Overview grid
   ========================================================================== */
.ov-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-12 { grid-column: span 12; }

/* Area chart */
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: #FDFBF7;
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12px;
  line-height: 1.45;
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0;
  transition: opacity 0.12s;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 5;
}
.chart-tip strong { font-family: var(--f-display); font-size: 14.5px; display: block; }
.chart-tip.show { opacity: 1; }
.chart-legend { display: flex; gap: 16px; align-items: center; font-size: 12px; color: var(--ink-3); }
.chart-legend .key { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .swatch { width: 10px; height: 10px; border-radius: 3px; }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut-box { position: relative; width: 168px; flex: 0 0 auto; }
.donut-box svg { display: block; width: 100%; height: auto; }
.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0;
}
.donut-center b { font-family: var(--f-display); font-size: 30px; font-weight: 560; line-height: 1; }
.donut-center span { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.donut-legend { display: grid; gap: 9px; flex: 1; min-width: 0; }
.donut-legend .row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.donut-legend .swatch { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.donut-legend .lbl { color: var(--ink-2); }
.donut-legend .val { margin-left: auto; font-family: var(--f-mono); font-weight: 600; font-size: 12.5px; }

/* Horizontal bars */
.hbars { display: grid; gap: 14px; }
.hbar .row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.hbar .row b { font-weight: 600; text-transform: capitalize; }
.hbar .row span { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); }
.hbar .track { height: 9px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.hbar .fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), #F27B3C);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1s var(--ease-out);
}
.hbar .fill.in { transform: scaleX(1); }
.hbar.alt .fill { background: linear-gradient(90deg, var(--sea), #57C4B5); }

/* Today panel */
.today-tabs { display: flex; gap: 4px; background: var(--sand); border-radius: 99px; padding: 3px; }
.today-tab {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.today-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.today-list { display: grid; }
.today-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.today-row:last-child { border-bottom: none; }
.today-row .time { font-family: var(--f-mono); font-size: 13px; font-weight: 600; color: var(--ink); }
.today-row .who { min-width: 0; }
.today-row .who b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-row .who span { font-size: 12px; color: var(--ink-3); display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.today-row .act { display: flex; align-items: center; gap: 8px; }
.today-row.is-done { opacity: 0.45; }
.today-row.is-done .who b { text-decoration: line-through; }

/* Alerts */
.alerts { display: grid; gap: 10px; }
.alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
}
.alert .a-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  grid-row: span 2;
}
.alert .a-ic .oic { width: 16px; height: 16px; }
.alert b { font-size: 13px; font-weight: 600; line-height: 1.35; }
.alert span { font-size: 12px; color: var(--ink-3); }
.alert.warn .a-ic { background: var(--gold-soft); color: var(--gold-ink); }
.alert.crit .a-ic { background: var(--rust-soft); color: var(--rust-ink); }
.alert.info .a-ic { background: var(--sea-soft); color: var(--sea-ink); }
.alert.crit { border-color: rgba(168, 73, 47, 0.35); background: linear-gradient(0deg, rgba(244, 226, 217, 0.35), rgba(244, 226, 217, 0.35)), var(--surface); }
.alert button.link {
  grid-column: 2;
  justify-self: start;
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.alert button.link:hover { text-decoration: underline; }
.alert .oic { width: 14px; height: 14px; }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tbody tr { transition: background 0.15s; }
table.data tbody tr:hover { background: rgba(241, 235, 223, 0.5); }
table.data tbody tr.is-new-row { animation: row-in 2.4s var(--ease-out); }
@keyframes row-in {
  0% { background: var(--accent-soft); }
  100% { background: transparent; }
}
.row-click { cursor: pointer; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.num { font-variant-numeric: tabular-nums; font-family: var(--f-mono); font-size: 12.5px; }
.total-cell { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.route { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.route .oic { width: 13px; height: 13px; color: var(--ink-3); }
.src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.src .oic { width: 14px; height: 14px; }
tfoot td, .table-foot { padding: 12px 16px; font-size: 12.5px; color: var(--ink-3); }

/* Toolbar above tables */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar .spacer { flex: 1; }

/* ==========================================================================
   Drawer
   ========================================================================== */
.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(13, 36, 31, 0.4);
  backdrop-filter: blur(3px);
  z-index: 60;
  opacity: 0;
  transition: opacity 0.25s;
}
.drawer-scrim.show { opacity: 1; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(500px, 96vw);
  background: var(--paper);
  z-index: 61;
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform 0.34s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-h {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-lg) 0 0 0;
}
.drawer-h .d-titles { min-width: 0; flex: 1; }
.drawer-h .overline { margin-bottom: 3px; }
.drawer-h h2 { font-family: var(--f-display); font-size: 22px; font-weight: 560; line-height: 1.2; }
.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: background 0.15s, transform 0.15s;
}
.drawer-close:hover { background: var(--sand); transform: rotate(90deg); }
.drawer-b { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 26px; display: grid; gap: 16px; align-content: start; }
.drawer-f {
  padding: 16px 26px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-radius: 0 0 0 var(--r-lg);
}
.dsec { display: grid; gap: 10px; }
.dsec > h4 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dsec > h4::before { content: ''; width: 14px; height: 2px; background: var(--accent); border-radius: 2px; }
.dcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.kv { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 7px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; }
.price-lines { display: grid; gap: 7px; font-size: 13.5px; }
.price-lines .pl { display: flex; justify-content: space-between; gap: 12px; }
.price-lines .pl span:first-child { color: var(--ink-2); }
.price-lines .pl.total {
  border-top: 1px dashed var(--line-strong);
  padding-top: 9px;
  margin-top: 4px;
  font-weight: 700;
  font-size: 16px;
}
.price-lines .pl.total span:last-child { font-family: var(--f-display); font-size: 20px; font-weight: 560; }
.price-lines .disc { color: var(--sea-ink); font-weight: 600; }

/* Timeline */
.timeline { display: grid; gap: 0; }
.tl-item { position: relative; padding: 0 0 18px 26px; }
.tl-item::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}
.tl-item:last-child::before { display: none; }
.tl-item .dot {
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid var(--ink-3);
  background: var(--paper);
}
.tl-item.hit .dot { border-color: var(--accent); background: var(--accent-soft); }
.tl-item b { display: block; font-size: 13.5px; font-weight: 600; text-transform: capitalize; }
.tl-item span { font-size: 12px; color: var(--ink-3); display: block; line-height: 1.5; }
.tl-item .when { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); }

/* Fleet detail */
.fleet-hero { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--sand); }
.fleet-hero img { width: 100%; height: 190px; object-fit: cover; }
.util-row { display: grid; gap: 6px; }
.util-row .u-head { display: flex; justify-content: space-between; font-size: 12.5px; }
.util-row .u-head b { font-weight: 600; }
.util-row .u-head span { font-family: var(--f-mono); color: var(--ink-2); }
.util-row .track { height: 8px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.util-row .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sea), #57C4B5); transition: width 0.9s var(--ease-out); }
.fuel-track { height: 7px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.fuel-fill { height: 100%; border-radius: 99px; transition: width 0.9s var(--ease-out); }
.fuel-fill.ok { background: linear-gradient(90deg, var(--sea), #57C4B5); }
.fuel-fill.low { background: linear-gradient(90deg, var(--rust), #C96A4A); }

/* ==========================================================================
   Fleet grid
   ========================================================================== */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 16px;
}
.vcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.vcard .v-media { position: relative; background: var(--sand); }
.vcard .v-media img { width: 100%; height: 132px; object-fit: cover; }
.vcard .v-media .pill { position: absolute; top: 10px; left: 10px; box-shadow: var(--shadow-sm); }
.vcard .v-media .plate { position: absolute; bottom: 10px; right: 10px; background: rgba(250, 247, 242, 0.92); backdrop-filter: blur(4px); }
.vcard .v-body { padding: 13px 15px 15px; display: grid; gap: 9px; flex: 1; align-content: start; }
.vcard .v-name { font-family: var(--f-display); font-size: 17px; font-weight: 560; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vcard .v-name em { font-style: normal; font-family: var(--f-body); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.vcard .v-meta { display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.vcard .v-meta .mi { display: inline-flex; align-items: center; gap: 5px; }
.vcard .v-meta .oic { width: 13px; height: 13px; }
.vcard .v-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 9px; margin-top: auto; }
.vcard .v-foot .when { font-weight: 600; }
.vcard.is-rented { border-color: rgba(232, 89, 12, 0.4); }
.summary-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s;
}
.stat-chip:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.stat-chip.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.stat-chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.stat-chip b { font-family: var(--f-display); font-size: 17px; font-weight: 560; }
.stat-chip span.lbl { color: var(--ink-2); }
.dot.available { background: var(--sea); }
.dot.rented { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dot.cleaning { background: var(--gold); }
.dot.maintenance { background: var(--rust); }

/* ==========================================================================
   Map view
   ========================================================================== */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.map-card { position: relative; overflow: hidden; }
.map-svg-wrap { position: relative; display: flex; justify-content: center; }
.map-svg-wrap svg { display: block; width: auto; max-width: 100%; max-height: 74vh; height: auto; }
.map-land { fill: #F3ECDD; stroke: #B9AC93; stroke-width: 1.1; }
.map-land-shadow { fill: rgba(20, 52, 47, 0.07); }
.map-grid line { stroke: rgba(20, 52, 47, 0.05); stroke-width: 1; }
.map-pin { fill: var(--ink); }
.map-pin-label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  fill: var(--ink-2);
  letter-spacing: 0.08em;
  paint-order: stroke;
  stroke: rgba(250, 247, 242, 0.9);
  stroke-width: 3.5px;
}
.veh-dot { cursor: pointer; transition: transform 1.6s cubic-bezier(0.45, 0, 0.55, 1); }
.veh-dot circle.core { stroke: #FAF7F2; stroke-width: 1.6; }
.veh-dot.rented circle.halo { animation: halo 2.6s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes halo {
  0% { opacity: 0.7; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(2.4); }
}
.map-tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: #FDFBF7;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  transform: translate(-50%, calc(-100% - 16px));
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 6;
  box-shadow: var(--shadow-md);
}
.map-tip.show { opacity: 1; }
.map-tip b { font-family: var(--f-mono); letter-spacing: 0.05em; }
.map-tip .t-sub { color: rgba(253, 251, 247, 0.72); }
.map-legend {
  position: absolute;
  left: 14px;
  bottom: 12px;
  display: flex;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 99px;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.map-legend .key { display: inline-flex; align-items: center; gap: 6px; }
.map-legend .dot { width: 8px; height: 8px; border-radius: 50%; }
.map-side { display: grid; gap: 16px; }
.map-fleet-list { display: grid; gap: 4px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.mf-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 13px;
  transition: background 0.15s;
}
.mf-row:hover { background: var(--sand); }
.mf-row.is-active { background: var(--sand-deep); }
.mf-row .dot { width: 9px; height: 9px; border-radius: 50%; }
.mf-row .who { min-width: 0; }
.mf-row .who b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-row .who span { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.mf-row .right { font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); text-align: right; white-space: nowrap; }

/* ==========================================================================
   Maintenance
   ========================================================================== */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.shop-card { display: grid; gap: 10px; padding: 16px 18px; }
.shop-card .s-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shop-card .s-model { font-family: var(--f-display); font-size: 16.5px; font-weight: 560; }
.shop-card .s-wo { font-size: 12.5px; color: var(--ink-2); }
.shop-card .s-wo b { font-family: var(--f-mono); font-weight: 600; }
.wo-table td .wo-title { font-weight: 600; }
.wo-table td .wo-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.due { font-family: var(--f-mono); font-size: 12px; font-weight: 600; }
.due.overdue { color: var(--rust-ink); }
.due.overdue::after { content: ' · overdue'; font-family: var(--f-body); font-weight: 700; text-transform: uppercase; font-size: 9.5px; letter-spacing: 0.08em; }
.sched-list { display: grid; }
.sched-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 6px 14px;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.sched-row:last-child { border-bottom: none; }
.sched-row .s-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--sand); color: var(--ink-2); grid-row: span 2; }
.sched-row .s-ic .oic { width: 15px; height: 15px; }
.sched-row b { font-size: 13.5px; font-weight: 600; }
.sched-row .s-sub { font-size: 12px; color: var(--ink-3); }
.spend-num { font-family: var(--f-display); font-size: 30px; font-weight: 560; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .input, .field .select { width: 100%; font-weight: 500; }
textarea.input { height: auto; padding: 10px 14px; resize: vertical; min-height: 66px; }

/* ==========================================================================
   Toasts & modal
   ========================================================================== */
.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
}
.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: var(--ink);
  color: #FDFBF7;
  border-radius: 14px;
  padding: 13px 16px;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast .t-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); }
.toast .t-ic .oic { width: 16px; height: 16px; }
.toast.site .t-ic { background: var(--accent); }
.toast.ok .t-ic { background: var(--sea); }
.toast.err .t-ic { background: var(--rust); }
.toast b { display: block; font-size: 13.5px; }
.toast span { font-size: 12px; color: rgba(253, 251, 247, 0.72); }
.toast .t-x { border: none; background: none; color: rgba(253, 251, 247, 0.6); cursor: pointer; padding: 4px; border-radius: 6px; }
.toast .t-x:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(13, 36, 31, 0.45);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 10px;
}
.modal h3 { font-family: var(--f-display); font-size: 21px; font-weight: 560; }
.modal p { font-size: 13.5px; color: var(--ink-2); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }

/* ==========================================================================
   Calendar — reservations board
   ========================================================================== */
.cal-nav { display: flex; gap: 6px; }
.cal-nav .btn.sm { padding: 7px 11px; }
.cal-nav .cal-next .oic { transform: rotate(180deg); }
.cal-month-label {
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 560;
  letter-spacing: -0.01em;
  min-width: 195px;
}
.cal-legend { display: flex; gap: 16px; align-items: center; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.cal-legend .key { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.cal-legend .sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sw.st-new { background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.sw.st-confirmed { background: var(--sea-soft); box-shadow: inset 0 0 0 1px var(--sea); }
.sw.st-on_rent { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sw.st-returned { background: var(--grey-soft); box-shadow: inset 0 0 0 1px var(--ink-3); }

.cal-board-card { overflow: hidden; }
.cal-scroll { overflow-x: auto; }
.cal-canvas { min-width: 100%; }
.cal-hrow, .cal-row { display: grid; grid-template-columns: 188px minmax(0, 1fr); }

.cal-corner {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
  display: grid;
  align-content: center;
  gap: 1px;
}
.cal-corner-month { font-family: var(--f-display); font-size: 15.5px; font-weight: 560; white-space: nowrap; }
.cal-corner-sub { font-size: 9px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; white-space: nowrap; }

.cal-striprow, .cal-dayhead { display: grid; grid-template-columns: repeat(var(--cal-days, 30), minmax(0, 1fr)); }

.cal-stripcell {
  position: relative;
  height: 44px;
  border: none;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 5px 0 3px;
}
.cal-stripcell:hover { background: var(--sand); }
.cal-stripcell.is-today { box-shadow: inset 0 -2px 0 var(--accent); }
.cal-stripcell .b { width: 5px; border-radius: 3px 3px 1px 1px; min-height: 1px; }
.cal-stripcell .b.up { background: var(--accent); }
.cal-stripcell .b.down { background: var(--sea); }

.cal-daycell {
  border: none;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  padding: 5px 2px 6px;
  display: grid;
  justify-items: center;
  gap: 1px;
  font: inherit;
}
.cal-daycell .wd { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-3); }
.cal-daycell .dn { font-family: var(--f-mono); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cal-daycell:hover { background: var(--sand); }
.cal-daycell.is-weekend { background: rgba(241, 235, 223, 0.45); }
.cal-daycell.is-today, .cal-daycell.is-today:hover { background: var(--accent-soft); }
.cal-daycell.is-today .dn, .cal-daycell.is-today .wd { color: var(--accent-ink); }

.cal-modelhead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 6px;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
}
.cal-modelhead .mh-name { font-family: var(--f-display); font-size: 14px; font-weight: 600; white-space: nowrap; }
.cal-modelhead .mh-meta { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.cal-modelhead .mh-line { flex: 1; height: 1px; background: var(--line); }

.cal-row { border-bottom: 1px solid var(--line); }
.cal-row.is-tba { background: rgba(241, 235, 223, 0.25); }
.cal-label {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  min-height: 40px;
}
.cal-row.is-tba .cal-label { background: var(--paper); }
.tba-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  border: 1px dashed var(--line-strong);
  padding: 2px 7px;
  border-radius: 6px;
}
.cal-lane { position: relative; min-height: 40px; background: var(--surface); }
.cal-row.is-tba .cal-lane { background: transparent; }
.cal-shade { position: absolute; top: 0; bottom: 0; background: rgba(241, 235, 223, 0.42); pointer-events: none; }
.cal-shade.is-today {
  background: rgba(232, 89, 12, 0.06);
  z-index: 1;
  box-shadow: inset 1px 0 0 rgba(232, 89, 12, 0.4), inset -1px 0 0 rgba(232, 89, 12, 0.4);
}
.cal-bar {
  position: absolute;
  top: 7px;
  bottom: 7px;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: none;
  border-left: 3px solid currentColor;
  border-radius: 7px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  transition: transform 0.12s var(--ease-out), box-shadow 0.15s;
}
.cal-bar:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); z-index: 6; }
.cal-bar .cbt { overflow: hidden; text-overflow: ellipsis; }
.cal-bar .cbt b { font-family: var(--f-mono); font-weight: 600; margin-right: 5px; }
.cal-bar.st-new { background: var(--gold-soft); color: var(--gold-ink); }
.cal-bar.st-confirmed { background: var(--sea-soft); color: var(--sea-ink); }
.cal-bar.st-on_rent { background: var(--accent-soft); color: var(--accent-ink); box-shadow: 0 2px 8px -3px rgba(232, 89, 12, 0.55); }
.cal-bar.st-returned { background: var(--grey-soft); color: var(--grey-ink); }
.cal-bar.is-tba { background: transparent; border-left-style: dashed; box-shadow: inset 0 0 0 1px var(--line-strong); }

/* Day sheet drawer */
.ds-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ds-stat { display: grid; gap: 1px; }
.ds-stat b { font-family: var(--f-display); font-size: 22px; font-weight: 560; line-height: 1.1; }
.ds-stat span { font-size: 10px; color: var(--ink-3); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.ds-src { display: flex; gap: 8px; flex-wrap: wrap; }

/* iCal channels */
.ical-list { display: grid; }
.ical-row {
  display: grid;
  grid-template-columns: minmax(130px, 210px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.ical-row:last-child { border-bottom: none; }
.ical-row b { font-weight: 600; }
.ical-row .url { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Quick reservation modal */
.qs-modal { width: min(600px, 100%); }
.qs-modal .form-grid { margin-top: 10px; }
.qs-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.qs-foot .qs-btns { display: flex; gap: 10px; }
.qs-note { font-size: 11.5px; color: var(--ink-3); }
.field .opt { font-style: normal; font-weight: 500; color: var(--ink-3); }

/* Payments ledger (booking drawer) */
.pay-row {
  display: grid;
  grid-template-columns: 88px auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.pay-row:last-of-type { border-bottom: none; }
.pay-row .when { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); }
.pay-row .pay-method {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--sand);
  border-radius: 5px;
  padding: 2px 7px;
  justify-self: start;
}
.pay-row .pay-note { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-sum { border-top: 1.5px solid var(--ink); margin-top: 8px; padding-top: 8px; }
.pay-sum .pl { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; }
.pay-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; align-items: center; }
.pay-form select, .pay-form input {
  font: 500 13px/1.2 var(--f-body);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
}
.pay-form select:focus, .pay-form input:focus { outline: none; border-color: var(--pine-deep, #0D241F); }
.due-chip {
  display: inline-block;
  font: 700 10px/1 var(--f-mono);
  letter-spacing: .06em;
  color: var(--accent);
  background: rgba(232, 89, 12, .1);
  border-radius: 5px;
  padding: 3px 7px;
  margin-top: 3px;
}
/* Compact tables inside drawers — unit history isn't the full bookings ledger */
.drawer .data { font-size: 12.5px; }
.drawer .data thead th { padding: 10px 8px; white-space: normal; }
.drawer .data tbody td { padding: 10px 8px; }
.drawer .data .cell-sub.ref { font-family: var(--f-mono); font-size: 10.5px; }
.doc-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Vehicle condition — car diagram + damage log */
.car-mount, .car-wrap { background: var(--sand); border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 6px; }
.car-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.car-tab {
  font: 600 11px/1 var(--f-body);
  letter-spacing: .04em;
  color: var(--ink-3);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  padding: 6px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.car-tab i { font: 700 10px/1 var(--f-mono); font-style: normal; color: var(--accent); }
.car-tab.is-active { color: var(--paper); background: var(--pine-deep, #0D241F); border-color: var(--pine-deep, #0D241F); }
.car-tab.is-active i { color: #FBE7DA; }
.car-fig { width: 100%; max-width: 560px; display: block; margin: 0 auto; }
.car-fig .car-pin-t { font-family: var(--f-mono); font-size: 11.5px; font-weight: 700; fill: #FAF7F2; }
.car-fig.is-live { cursor: crosshair; }
.car-fig.is-live:hover .car-pin-t { pointer-events: none; }
.dmg-modal { width: min(680px, 100%); }
.dmg-modal .car-fig { margin-bottom: 12px; }
.ins-modal { width: min(520px, 100%); }
.form-grid.three { grid-template-columns: 1fr 1.4fr 1fr; }
.dmg-pick { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.dmg-pick-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; }
.dmg-picked { display: grid; gap: 6px; }
.dmg-row, .dmglist .it {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.dmg-row:last-child { border-bottom: none; }
.dmg-row .n, .dmglist .n {
  width: 21px;
  height: 21px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font: 700 10.5px/1 var(--f-mono);
  flex: none;
}
.dmg-row b:last-of-type { font-variant-numeric: tabular-nums; }
.pay-x {
  border: none;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
}
.pay-x:hover { color: var(--accent); background: rgba(232, 89, 12, .08); }

/* Charts: grouped daily bars */
.chart-wrap rect.bar {
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: bottom;
  transition: transform 0.65s var(--ease-out);
}
.chart-wrap rect.bar.in { transform: scaleY(1); }
.chart-tip.below { transform: translate(-50%, 12px); }
.chart-tip b { font-family: var(--f-mono); }

@media (max-width: 1080px) {
  .ical-row { grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) auto; }
}
@media (max-width: 720px) {
  .cal-month-label { min-width: 0; font-size: 17px; }
  .ical-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ical-row .url { grid-column: 1 / -1; order: 3; }
  .form-grid.three { grid-template-columns: 1fr; }
  .pay-row { grid-template-columns: 76px auto auto; }
  .pay-row .pay-note { display: none; }
}

/* ==========================================================================
   Motion
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.7s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
  .kpi-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .col-8, .col-7 { grid-column: span 12; }
  .col-4, .col-5 { grid-column: span 6; }
  .col-3 { grid-column: span 6; }
}
@media (max-width: 1080px) {
  .ops-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 84vw);
    transform: translateX(-104%);
    transition: transform 0.32s var(--ease-out);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .icon-btn { display: inline-flex; }
  .topbar { padding: 12px 20px; }
  .ops-content { padding: 20px 20px 56px; }
  .map-layout { grid-template-columns: 1fr; }
  .search-wrap .input { width: 100%; }
  .search-wrap { flex: 1 1 180px; }
}
@media (max-width: 720px) {
  .kpi-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 30px; }
  .col-4, .col-5, .col-6, .col-3 { grid-column: span 12; }
  .clock { display: none; }
  .tb-title h1 { font-size: 20px; }
  .donut-wrap { flex-direction: column; }
  .today-row { grid-template-columns: 48px minmax(0, 1fr); }
  .today-row .act { grid-column: 2; justify-content: flex-start; }
  .sched-row { grid-template-columns: auto minmax(0, 1fr); }
  .sched-row > *:nth-child(3), .sched-row > *:nth-child(4) { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .ops-content { padding: 16px 14px 48px; }
  .drawer-h, .drawer-b, .drawer-f { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 460px) {
  .kpi-band { grid-template-columns: 1fr; }
}
