@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

/* Fuel identity — defined once, used on every page, day and night. */
:root {
  --fuel-gas: #2563eb;
  --fuel-dsl: #eab308;
  --gas: var(--fuel-gas);
  --dsl: var(--fuel-dsl);
  --lcd-gas: var(--fuel-gas);
  --lcd-dsl: var(--fuel-dsl);
  --radius: 14px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root, html.night {
  color-scheme: dark;
  --bg: #0c0d0c;
  --elev: #141414;
  --fg: #ffffff;
  --muted: #ffffff;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #eeeeee;
  --ink: #111111;
  --ok: #5dce7a;
  --bad: #f08a80;
  --online: #3dcb7a;
  --offline: #ff8a82;
  --pump: #161616;
  --pump-fg: #ffffff;
  --pump-well: #0c0c0c;
  --pump-digit: #ffffff;
  --pump-meta: #ffffff;
  --pump-line: rgba(255, 255, 255, 0.16);
  --shadow: 0 0 0 1px rgb(255 255 255 / 0.16);
}
html.day {
  color-scheme: light;
  --bg: #f3f4f6;
  --elev: #ffffff;
  --fg: #1a1c1e;
  --muted: #1a1c1e;
  --line: rgba(15, 23, 42, 0.12);
  --accent: #2a2f38;
  --ink: #f8fafc;
  --ok: #0d7a3e;
  --bad: #c62828;
  --online: #0d7a3e;
  --offline: #c62828;
  --pump: #ffffff;
  --pump-fg: #14161a;
  --pump-well: #eef0f3;
  --pump-digit: #12141a;
  --pump-meta: #1a1c1e;
  --pump-line: rgba(15, 23, 42, 0.12);
  --shadow:
    0 0 0 1px rgb(15 23 42 / 0.08),
    0 1px 2px rgb(15 23 42 / 0.04);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  transition: background-color 250ms var(--ease), color 250ms var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  html, body { transition: none; }
}
a { color: inherit; }
button, [role="button"] { cursor: pointer; }
.shell { display: grid; min-height: 100vh; min-height: 100dvh; }
@media (min-width: 960px) {
  .shell { grid-template-columns: 248px 1fr; }
}
#sidebar {
  border-bottom: 1px solid var(--line);
  padding: 16px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
}
@media (min-width: 960px) {
  #sidebar {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }
}
.brand { display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 6px; border-radius: 10px; }
a.brand { text-decoration: none; color: inherit; }
a.brand:hover { background: var(--elev); }
.logo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; display: block; }
.logo-lg { width: 56px; height: 56px; border-radius: 10px; margin-bottom: 24px; }
.auth-card > .logo { margin-bottom: 18px; }
.brand strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.brand small { color: var(--muted); font-size: 12px; }
.nav-label,
#sidebar form > label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 10px 10px 4px;
}
#sidebar form > label { margin: 0; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
@media (min-width: 960px) { nav { flex-direction: column; flex: 1; flex-wrap: nowrap; overflow: auto; } }
nav a {
  display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none;
  color: var(--fg); font-size: 14px; font-weight: 500;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
nav a:hover { background: var(--elev); color: var(--fg); }
nav a.on { background: var(--elev); color: var(--fg); }
.nav-sep {
  height: 1px;
  background: var(--line);
  margin: 10px 10px 6px;
  border: 0;
  flex: none;
}
.aside-foot { display: grid; gap: 12px; margin-top: auto; }
.aside-foot label { margin: 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.signout button {
  width: 100%; background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 8px; font: inherit; margin: 0;
}
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.topbar-end { display: flex; align-items: center; gap: 8px; flex: none; }
.bell-menu { position: relative; flex: none; }
.bell-menu > summary { list-style: none; }
.bell-menu > summary::-webkit-details-marker { display: none; }
.bell-btn {
  position: relative;
  width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: transparent; color: var(--fg);
  border: 1px solid var(--line);
}
.bell-btn svg { width: 20px; height: 20px; display: block; }
.bell-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  background: #f5c518; color: #111;
}
.bell-menu.tone-off .bell-count { background: #e24b4b; color: #fff; }
.bell-menu.tone-fuel .bell-count { background: #f5c518; color: #111; }
.bell-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(340px, calc(100vw - 24px));
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 16px;
  background: var(--elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 13000;
}
.bell-head {
  margin: 0 6px 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.bell-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.25rem;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid var(--line);
  align-items: center;
}
.bell-item strong { font-size: 13px; grid-column: 1; grid-row: 1; min-width: 0; overflow-wrap: anywhere; }
.bell-item span { color: var(--muted); font-size: 12px; line-height: 1.35; grid-column: 1; grid-row: 2; min-width: 0; overflow-wrap: anywhere; }
.bell-item em {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: stretch;
  align-self: center;
  margin: 0;
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  line-height: 1;
  color: var(--fg);
  text-align: right;
}
.bell-item.unread em { color: #f5c518; }
.bell-item.offline { border-left-color: #e24b4b; }
.bell-item.fuel { border-left-color: #f5c518; }
.bell-item.temp { border-left-color: #38bdf8; }
.bell-item.pump { border-left-color: #22c55e; }
.bell-item.crit { border-left-color: #f5c518; }
.bell-item.warn { border-left-color: #f5c518; }
.bell-item:hover { background: var(--bg); }
.fd-toast {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 20000;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(320px, calc(100vw - 32px));
  max-width: min(440px, calc(100vw - 24px));
  padding: 14px 40px 14px 16px;
  border-radius: 12px;
  background: #e7f6ec;
  color: #1f7a3a;
  border: 1px solid #b7e0c4;
  box-shadow: 0 8px 28px rgb(16 40 24 / 0.16);
  font-size: 15px;
  font-weight: 550;
}
.fd-toast[hidden] { display: none; }
.fd-toast-ico {
  width: 22px; height: 22px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #2f9e57;
  color: #fff;
  font-size: 12px; font-weight: 800;
}
.fd-toast-x {
  position: absolute;
  top: 6px; left: 6px;
  width: 22px; height: 22px; margin: 0; padding: 0;
  border-radius: 50%;
  border: 1px solid #c5e6d0;
  background: #fff;
  color: #6a8b74;
  font-size: 14px; line-height: 1;
  cursor: pointer;
}
.fd-toast.bad {
  background: #fdecec;
  color: #b42318;
  border-color: #f2c2c0;
}
.fd-toast.bad .fd-toast-ico { background: #d92d20; }
html.night .fd-toast {
  background: color-mix(in oklab, #1f7a3a 28%, var(--elev));
  color: #b8f0c8;
  border-color: color-mix(in oklab, #2f9e57 45%, var(--line));
}
html.night .fd-toast-x { background: var(--elev); color: var(--muted); border-color: var(--line); }
html.night .fd-toast.bad {
  background: color-mix(in oklab, #d92d20 28%, var(--elev));
  color: #ffd2ce;
}
.site-credit {
  margin: 0;
  padding: 18px max(20px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) 16px;
  text-align: right;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.site-credit .heart { font-size: 9px; }
.canvas {
  padding: 24px max(28px, env(safe-area-inset-right, 0px)) 48px max(28px, env(safe-area-inset-left, 0px));
  min-width: 0;
}
.canvas-inner { max-width: 1120px; margin: 0 auto; width: 100%; }
.page { margin-bottom: 28px; }
.page h1 { margin: 6px 0 8px; font-size: 28px; font-weight: 550; letter-spacing: -0.03em; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 0; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; }
.err { color: var(--bad); font-size: 14px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0 0 20px; }
.stats article, .card, .panel {
  background: var(--elev);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stats span, .stats small { color: var(--muted); font-size: 12px; }
.stats strong {
  display: block; font-family: var(--mono); font-size: 28px; font-weight: 500;
  font-variant-numeric: tabular-nums; margin: 8px 0 4px; letter-spacing: -0.03em;
}
.split { display: grid; gap: 14px; margin-top: 20px; }
@media (min-width: 900px) { .split { grid-template-columns: 1.25fr 0.85fr; } }
.panel h3 { margin: 0 0 14px; font-size: 14px; font-weight: 550; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.cap { text-transform: capitalize; }
label { display: block; font-size: 13px; margin: 12px 0; color: var(--muted); }
input, select {
  width: 100%; margin-top: 6px; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit;
}
button {
  margin-top: 16px; background: var(--accent); color: var(--ink); border: 0;
  border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 550;
}
button.secondary { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.theme-switch {
  display: inline-flex; align-items: center; background: var(--elev);
  box-shadow: var(--shadow); border-radius: 8px; padding: 3px; gap: 2px;
}
.theme-switch button {
  margin: 0; background: transparent; color: var(--muted); border: 0;
  padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
}
.theme-switch button[aria-pressed="true"] { background: var(--bg); color: var(--fg); }
.filters label { margin: 0; min-width: 140px; }
.filters button { margin: 0; height: 38px; }
.section-title {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 20px 0 8px;
}
.table-wrap {
  background: var(--elev); box-shadow: var(--shadow); border-radius: var(--radius);
  overflow: auto; max-height: 440px; margin-bottom: 10px;
}
.table-wrap.short { max-height: 240px; }
.totals-table {
  width: 100%;
  table-layout: fixed;
}
.totals-table .c-day { width: 28%; }
.totals-table th,
.totals-table td,
.totals-table td.num {
  text-align: left;
}
.table-wrap table { margin: 0; }
.table-wrap th {
  position: sticky; top: 0; background: var(--elev); z-index: 1;
}
.panel .table-wrap { background: transparent; box-shadow: none; border-radius: 0; margin: 0; max-height: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.fuel-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.fuel-pill.gas { background: var(--fuel-gas); color: #fff; }
.fuel-pill.dsl { background: var(--fuel-dsl); color: #1c1e19; }
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 550; }
.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.who-pic, .who-init {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--pump-well); object-fit: cover;
}
.who-init {
  display: inline-grid; place-items: center;
  font-weight: 600; font-size: 12px; color: var(--fg);
}
.who-init.lg { width: 96px; height: 96px; font-size: 36px; }
.who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  color: inherit; text-decoration: none;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  max-width: 46%;
  list-style: none;
  cursor: pointer;
}
.user-chip::-webkit-details-marker { display: none; }
.account-menu { position: relative; flex: none; }
.account-menu > summary { max-width: 100%; }
.account-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(260px, calc(100vw - 24px));
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 12000;
}
.user-chip:hover { background: var(--elev); color: var(--fg); }
.profile-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; text-decoration: none; color: inherit;
}
.profile-link:hover, .profile-link.on { background: var(--elev); }
.profile-link strong { display: block; font-size: 13px; font-weight: 600; }
.profile-link small { color: var(--muted); font-size: 11px; }
.profile-link .who-pic, .profile-link .who-init { width: 32px; height: 32px; }
.signout button { width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.map-mode {
  display: inline-flex; align-items: center; background: var(--bg);
  box-shadow: var(--shadow); border-radius: 8px; padding: 3px; gap: 2px;
}
.map-mode button {
  margin: 0; background: transparent; color: var(--muted); border: 0;
  padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
}
.map-mode button.on { background: var(--elev); color: var(--fg); }

.leaflet-container { background: var(--pump-well); font-family: var(--font); touch-action: pan-x pan-y; z-index: 0; }
.leaflet-control-zoom a {
  width: 36px !important; height: 36px !important; line-height: 36px !important;
}
.leaflet-popup-content { margin: 10px 12px; color: #121212; }
.leaflet-popup-content-wrapper {
  max-width: min(280px, 82vw);
  background: #fff;
  color: #121212;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.28);
}
.leaflet-popup-tip { background: #fff; }
.leaflet-container a.leaflet-popup-close-button { color: #222; }
.leaflet-marker-icon.leaf-pin {
  background: transparent;
  border: 0;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.5));
}
.leaflet-marker-icon.leaf-pin.pin-gas {
  filter: drop-shadow(0 0 4px #2563eb) drop-shadow(0 1px 2px rgb(0 0 0 / 0.45));
}
.leaflet-marker-icon.leaf-pin.pin-diesel {
  filter: drop-shadow(0 0 4px #eab308) drop-shadow(0 1px 2px rgb(0 0 0 / 0.45));
}
.leaflet-marker-icon.leaf-pin.pin-both {
  filter: drop-shadow(0 0 4px #2563eb) drop-shadow(0 1px 2px rgb(0 0 0 / 0.45));
}
.map-pop h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #111; }
.map-pop p { margin: 0 0 8px; color: #333; font-size: 12px; }
.map-pop dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.map-pop dl.one { grid-template-columns: 1fr; }
.map-pop dt { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #444; font-weight: 700; }
.map-pop dd { margin: 2px 0 0; font-family: var(--font); font-size: 12px; color: #111; font-weight: 600; white-space: nowrap; }
.map-pop .tank { display: block; margin-top: 3px; font-size: 11px; color: #333; font-family: var(--font); font-weight: 600; }
.map-pop .na { color: #555; font-weight: 600; }
.map-pop .live { color: var(--online); font-weight: 600; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) {
  .leaflet-marker-icon.leaf-pin.pin-gas,
  .leaflet-marker-icon.leaf-pin.pin-diesel,
  .leaflet-marker-icon.leaf-pin.pin-both { filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.5)); }
}

.mobile-bar { display: none; }
.menu-btn {
  margin: 0; width: 44px; height: 44px; padding: 10px 8px;
  background: transparent; color: var(--fg); border: 0; border-radius: 8px;
  display: grid; gap: 5px; align-content: center; flex: none;
}
.menu-btn span { display: block; height: 2px; background: var(--fg); border-radius: 2px; }
.nav-scrim { display: none; }

.presets, .export-row, .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters label { margin: 0; min-width: 140px; }
.filters button { margin: 0; height: 38px; }

@media (max-width: 959px) {
  .shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
  }
  .workspace { flex: 1 1 auto; }
  .mobile-bar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 8000;
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    background: color-mix(in oklab, var(--bg) 88%, transparent);
    border-bottom: 1px solid var(--line);
    overflow: visible;
    isolation: isolate;
  }
  .mobile-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .mobile-bar-copy { min-width: 0; flex: 1; }
  .mobile-bar-copy strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-bar-copy small { color: var(--muted); font-size: 11px; text-transform: capitalize; }
  .mobile-user {
    font-size: 12px; color: var(--muted); max-width: 42%;
  }
  .mobile-user.user-chip { padding-right: 6px; }
  .mobile-bar .bell-menu,
  .mobile-bar .account-menu { flex: none; position: static; }
  .mobile-bar .bell-pop,
  .mobile-bar .account-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    width: auto;
    max-width: none;
    max-height: min(70dvh, calc(100dvh - 88px));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .fd-toast { top: calc(58px + env(safe-area-inset-top)); }
  .topbar { display: none; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 9000; background: rgb(0 0 0 / 0.45); }
  .nav-scrim[hidden] { display: none; }
  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(300px, 86vw); z-index: 10000;
    transform: translateX(-105%);
    transition: transform 200ms var(--ease);
    border-bottom: 0; border-right: 1px solid var(--line);
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    overflow: auto;
    isolation: isolate;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open #sidebar { transform: translateX(0); }
  body.nav-open .yard-map,
  body.nav-open .site-map,
  body.nav-open .mini-map,
  body.nav-open .leaflet-container {
    visibility: hidden;
    pointer-events: none;
  }
  #sidebar nav { flex-direction: column; flex-wrap: nowrap; }
  #sidebar nav a { min-height: 44px; display: flex; align-items: center; padding: 12px 12px; }
  #sidebar select, #sidebar input {
    font-size: 16px;
    min-height: 44px;
  }
  .theme-switch button {
    min-height: 40px; min-width: 48px; padding: 8px 12px; font-size: 13px;
  }
  .account-pop {
    right: 0;
    left: auto;
  }
  .account-menu summary { min-height: 44px; }
  .canvas {
    padding: 18px max(16px, env(safe-area-inset-right, 0px)) max(48px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
  .page { margin-bottom: 18px; }
  .page h1 { font-size: 22px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats strong { font-size: 22px; }
  .stats article, .card, .panel { padding: 14px; }
  input, select, textarea {
    font-size: 16px;
    min-height: 44px;
  }
  button { min-height: 44px; }
  .clip-play, .clip-drum, .not-can-btn { min-height: 0; }
  .map-mode button, .chip, .btn-ghost, .file-btn {
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    touch-action: manipulation;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions button, .form-actions .btn-ghost {
    width: 100%;
    justify-content: center;
    margin: 0;
  }
  .filters { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .filters label { min-width: 0; }
  .filters button { grid-column: 1 / -1; width: 100%; height: 44px; }
  .presets, .export-row { width: 100%; }
  .table-wrap {
    max-height: 60vh;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }
  .session-table {
    min-width: 760px;
    font-size: 13px;
  }
  .session-table.identity-fills {
    min-width: 0;
    width: 100%;
  }
  .session-table.identity-fills .c-user { width: 44%; }
  .session-table.identity-fills .phone-hide { display: none; }
  .identity-fills .fill-ids { padding-left: 0; }
  .session-table th,
  .session-table td { padding: 14px 8px; min-height: 44px; }
  .leaflet-control-attribution {
    max-width: 72%;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .mobile-user { max-width: min(52%, 13rem); }
  .mobile-user .who-name { display: block; min-width: 0; }
}
.clip-play {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px; min-height: 22px;
  margin: 0 0 0 4px; padding: 0; vertical-align: middle;
  border-radius: 50%;
  background: var(--elev);
  color: var(--fg);
  border: 1px solid var(--line);
}
.clip-play svg { width: 11px; height: 11px; display: block; margin-left: 1px; }
.clip-play:hover, .clip-play:focus-visible { background: var(--accent); color: var(--ink, #111); }
.clip-play-end { opacity: 0.85; }
.clip-stage { position: relative; }
.clip-stage video { width: 100%; height: auto; min-height: 160px; border-radius: 10px; background: #111; display: block; }
#clip-tag {
  position: absolute; top: auto; left: 10px; bottom: 72px; z-index: 2;
  padding: 4px 10px; border-radius: 999px;
  background: rgb(0 0 0 / 0.7); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  pointer-events: none;
}
.clip-switch { display: flex; gap: 8px; margin: 10px 0 0; }
.clip-switch[hidden] { display: none; }
.clip-switch button {
  min-height: 36px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
}
.clip-switch button.on { background: var(--accent); color: var(--ink, #111); }
.rec-cell {
  white-space: nowrap;
  vertical-align: middle;
}
.session-table {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
}
.session-table th,
.session-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  text-align: left;
  padding: 12px 10px;
}
.session-table td.num {
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.session-table .c-date { width: 148px; }
.session-table .c-stn { width: 110px; }
.session-table .c-user { width: 168px; }
.session-table .c-emp { width: 88px; }
.session-table .c-dept { width: 110px; }
.session-table .c-fuel { width: 86px; }
.session-table .c-gal { width: 78px; }
.session-table .c-dur { width: 82px; }
.session-table .c-pul { width: 68px; }
.session-table .c-end { width: 88px; }
.session-table .c-rec { width: 48px; }
.session-table .c-ai { width: 52px; }
.session-table .c-rec,
.session-table td.rec-cell,
.session-table .c-ai,
.session-table td.ai-cell {
  text-align: left;
  overflow: visible;
}
.session-table td.ai-cell { white-space: nowrap; vertical-align: middle; }
.session-table .who { max-width: 100%; }
.session-table td.user-cell {
  overflow: hidden;
  white-space: normal;
}
.session-table td.user-cell .who {
  align-items: flex-start;
}
.session-table td.user-cell .who-name {
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.2;
}
.session-table.identity-fills { min-width: 680px; }
.session-table.identity-fills .c-user { width: 32%; }
.identity-fills td.user-cell { vertical-align: middle; overflow: visible; }
.identity-fills .fill-who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  width: 100%;
}
.identity-fills .fill-who .who {
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
}
.identity-fills td.user-cell .who-name {
  display: block;
  flex: 1;
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  line-height: 1.25;
}
.identity-fills .fill-ids {
  display: grid;
  gap: 1px;
  max-width: 100%;
  padding-left: 36px;
  min-width: 0;
}
.identity-fills .fill-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  font-size: 11px;
  line-height: 1.25;
  color: var(--fg);
}
.identity-fills .fill-k {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.identity-fills .fill-v {
  font-family: var(--mono);
  min-width: 0;
  flex: 1 1 8rem;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}
.clip-drum {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 22px; height: 22px; min-height: 22px;
  margin: 0; padding: 0;
  border-radius: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  overflow: visible;
}
.clip-drum svg,
.clip-drum img { width: 16px; height: 16px; display: block; }
.clip-drum.maybe::after {
  content: "?";
  position: absolute;
  right: -4px;
  top: -6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--fuel-dsl, #e8b339);
}
.not-can { margin: 0; }
.not-can-btn {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}
.not-can-btn:hover, .not-can-btn:focus-visible { color: var(--fg); border-color: var(--fg); }
.cam-box {
  width: min(720px, calc(100vw - 24px));
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--elev);
  color: var(--fg);
}
.cam-box::backdrop { background: rgb(0 0 0 / 0.55); }
.cam-box form { display: flex; justify-content: flex-end; }
.cam-box video { width: 100%; height: auto; border-radius: 10px; background: #111; margin: 10px 0; display: block; }
