/* TrackLog V44 · UI refresh
   Visual-only layer. Core state, storage, GPS and cloud contracts stay untouched. */

:root {
  --bg: #080a0d;
  --panel: #11151a;
  --panel2: #171c22;
  --panel3: #1d232b;
  --text: #f5f7f9;
  --muted: #98a1ad;
  --accent: #ff4338;
  --accent2: #ff7a1a;
  --ok: #3ecf8e;
  --warn: #f2b84b;
  --line: rgba(161, 174, 192, 0.17);
  --line-strong: rgba(181, 194, 211, 0.28);
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  --radius: 16px;
  --radius-sm: 11px;
  --content-gap: 16px;
}

html { color-scheme: dark; }
[hidden] { display: none !important; }

body {
  line-height: 1.45;
  background:
    radial-gradient(circle at 86% -10%, rgba(255, 67, 56, 0.13), transparent 34rem),
    radial-gradient(circle at 8% 80%, rgba(255, 122, 26, 0.04), transparent 30rem),
    var(--bg);
}

button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

:where(button, input, select, textarea, [role="button"]):focus-visible {
  outline: 3px solid rgba(255, 184, 84, 0.9) !important;
  outline-offset: 2px;
}

.app {
  max-width: 1560px;
  padding: 18px 22px 42px;
}

header {
  position: sticky;
  top: 0;
  z-index: 120;
  min-height: 72px;
  margin: 0 -4px 16px;
  padding: 10px 4px;
  background: linear-gradient(180deg, rgba(8, 10, 13, 0.96), rgba(8, 10, 13, 0.84));
  backdrop-filter: blur(18px);
}

.brand { gap: 12px; }
.logo {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  font-size: 14px;
  transform: none;
  background: var(--accent);
  box-shadow: 0 8px 22px rgba(255, 67, 56, 0.24);
}

h1 {
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: 0.01em;
}

h2 { font-size: clamp(23px, 2vw, 30px); letter-spacing: -0.025em; }
h3 { letter-spacing: -0.012em; }
.subtitle { font-size: 13px; }
.app-status-pill { margin-top: 3px; font-size: 11px; }

.top-actions { align-items: center; gap: 9px; }
.header-drive-action { min-height: 52px; padding-inline: 18px; }
.header-drive-action .ph { font-size: 19px; }
.header-profile-chip {
  overflow: hidden;
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(255, 67, 56, 0.11), rgba(17, 21, 26, 0.98));
  box-shadow: none;
}
.header-profile-helmet {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.11), transparent 66%);
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel2);
  padding: 10px 14px;
  font-weight: 760;
  box-shadow: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.btn:hover { transform: translateY(-1px); border-color: var(--line-strong); background: var(--panel3); }
.btn:active { transform: translateY(0); }
.btn.primary {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 67, 56, 0.19);
}
.btn.primary:hover { background: #ff554b; }
.btn.quiet { background: rgba(255, 255, 255, 0.045); }
.btn.danger { background: rgba(255, 67, 56, 0.08); border-color: rgba(255, 67, 56, 0.3); }
.btn.small { min-height: 36px; padding: 7px 11px; }
.btn:disabled { opacity: 0.44; cursor: not-allowed; transform: none; box-shadow: none; }

.layout { grid-template-columns: 244px minmax(0, 1fr); gap: 18px; }
.sidebar, .card {
  border-color: var(--line);
  background: rgba(17, 21, 26, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.sidebar {
  top: 94px;
  max-height: calc(100vh - 112px);
  padding: 11px;
  overflow: auto;
}

.desktop-nav { display: grid; gap: 2px; }
.nav-section-label {
  margin: 15px 11px 5px;
  color: #6f7986;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.nav-section-label:first-child { margin-top: 4px; }
.nav-btn {
  min-height: 44px;
  margin: 0;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 720;
}
.nav-btn .ph { width: 22px; font-size: 20px; color: #8994a2; text-align: center; }
.nav-btn:hover { background: rgba(255, 255, 255, 0.04); }
.nav-btn.active {
  border-color: rgba(255, 86, 69, 0.16);
  background: rgba(255, 67, 56, 0.11);
  color: #fff;
}
.nav-btn.active .ph { color: #ff746b; }
.nav-settings { margin-top: 9px; border-top-color: var(--line); border-radius: 0 0 11px 11px; }

.sidebar-profile-card {
  min-height: 66px;
  margin-bottom: 7px;
  border-color: var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}
.sidebar-profile-card:hover { border-color: rgba(255, 84, 70, 0.35); background: rgba(255, 67, 56, 0.06); }
.sidebar-profile-helmet { width: 52px; height: 44px; }

.card { padding: 18px; }
.section-head { margin-bottom: 14px; }
.page-kicker, .focus-eyebrow {
  color: #ff8b82;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

input, select, textarea {
  min-height: 44px;
  border-color: var(--line-strong);
  border-radius: 10px;
  background: #0c1015;
  padding: 10px 12px;
}
textarea { min-height: 96px; }
input:hover, select:hover, textarea:hover { border-color: rgba(190, 203, 219, 0.4); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(255, 87, 72, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 67, 56, 0.12);
}

/* Start */
.dashboard-welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: var(--content-gap);
  margin-bottom: var(--content-gap);
}

.dashboard-focus-card, .dashboard-profile-card {
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dashboard-focus-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(255, 67, 56, 0.12), transparent 42%),
    var(--panel);
}
.dashboard-focus-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
}
.focus-eyebrow { display: flex; align-items: center; gap: 8px; }
.focus-icon {
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 67, 56, 0.13);
  color: #ff786f;
  font-size: 16px;
}
.dashboard-focus-card h2 { max-width: 760px; margin: 13px 0 5px; font-size: clamp(27px, 3vw, 42px); }
.dashboard-focus-card > p { max-width: 720px; margin: 0; color: #aab2bc; }
.focus-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 19px 0; }
.focus-chip {
  min-width: 126px;
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
}
.focus-chip span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.focus-chip strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.focus-chip.ready { border-color: rgba(62, 207, 142, 0.25); }
.focus-chip.missing { border-color: rgba(242, 184, 75, 0.28); }
.focus-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.focus-actions .btn.primary { min-height: 48px; padding-inline: 18px; }

.dashboard-profile-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 5px;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 99, 76, 0.1), transparent 10rem),
    var(--panel);
  text-align: center;
}
.dashboard-profile-card .helmet-button {
  min-width: 164px;
  min-height: 122px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 22px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.075), transparent 68%);
}
.dashboard-profile-card .start-profile-helmet { width: 158px; height: 112px; }
.dashboard-profile-copy { min-width: 0; }
.dashboard-profile-copy h3 { margin: 4px 0 2px; overflow-wrap: anywhere; }
.dashboard-profile-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-profile-actions { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.text-button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #ff8e86;
  padding: 4px 0;
  font-weight: 800;
}

.vehicle-strip { gap: 8px; padding-bottom: 10px; }
.vehicle-chip {
  min-width: 168px;
  border-radius: 11px;
  background: var(--panel);
}
.race-banner {
  min-height: 82px;
  margin-bottom: var(--content-gap);
  padding: 15px 18px;
  border-color: var(--line);
  border-radius: 15px;
  background: var(--panel);
}
.race-banner::after { opacity: 0.22; }
.race-banner h2 { font-size: 22px; }
.grid { gap: var(--content-gap); }
.grid.kpi { gap: 11px; margin-bottom: var(--content-gap); }
.kpi-card { min-height: 104px; padding: 16px; }
.kpi-card::after { opacity: 0.5; }
.kpi-value { font-size: 27px; }
.kpi-label { font-size: 10px; }
.empty { padding: 26px 14px; background: rgba(0, 0, 0, 0.08); }

/* Fahrt vorbereiten */
#trackmode > .card { max-width: 1080px; margin: 0 auto; padding: 24px; }
.track-prep-progress {
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) minmax(220px, 1fr);
  align-items: center;
  gap: 16px;
  margin: 18px 0 9px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

#trackModeStatusBadge {
  flex: 0 0 auto;
  white-space: nowrap;
}
.track-prep-progress strong, .track-prep-progress small { display: block; }
.track-prep-progress small { margin-top: 2px; color: var(--muted); }
.track-progress-bar { height: 7px; overflow: hidden; border-radius: 999px; background: #262d36; }
.track-progress-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.25s ease; }
.readiness-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
.ready-item {
  min-height: 76px;
  padding: 12px;
  border-radius: 11px;
  background: #0d1116;
}
.ready-item strong { font-size: 13px; }
.ready-item.good { border-color: rgba(62, 207, 142, 0.27); }
.ready-item.warn { border-color: rgba(242, 184, 75, 0.34); }
.readiness-grid .ready-item:nth-child(n + 4) {
  min-height: 58px;
  background: rgba(255, 255, 255, 0.018);
  opacity: 0.75;
}
.track-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.track-quick-actions:empty { display: none; }
.track-quick-actions .btn { min-height: 38px; }
.advanced-track-settings {
  margin-top: 16px !important;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.028), rgba(0, 0, 0, 0.12));
}
.track-config-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.track-config-heading > span:last-child { display: grid; gap: 2px; }
.track-config-heading strong { font-size: 14px; }
.track-config-heading small { color: var(--muted); font-size: 11px; }
.track-config-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 67, 56, 0.11); color: #ff7e75; font-size: 18px; }
.track-config-panel .form-grid { align-items: end; }
.track-library-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.track-library-actions .badge { display: inline-flex; align-items: center; gap: 6px; }
.track-start-primary { min-height: 52px; font-size: 16px; }

/* Verlauf */
.view-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 2px 2px 0;
}
.view-page-header h2 { margin: 3px 0 1px; }
.view-page-header p { margin: 0; }
.segmented-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(17, 21, 26, 0.78);
}
.segment {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 800;
}
.segment .ph { font-size: 17px; }
.segment.active { background: var(--panel3); color: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2); }
.session-calendar-card[hidden], #sessionStintsCard[hidden] { display: none !important; }
.session-calendar-card.is-history .calendar-toolbar,
.session-calendar-card.is-history .calendar-weekdays,
.session-calendar-card.is-history #driveCalendar { display: none; }
.session-calendar-card:not(.is-history) .session-archive { display: none; }
.session-archive { margin-top: 4px; padding-top: 0; border-top: 0; }

/* Profile, settings and large management screens */
.profile-shell { grid-template-columns: 300px minmax(0, 1fr); gap: var(--content-gap); }
.profile-identity { top: 94px; background: var(--panel); }
.profile-helmet-large { width: 228px; height: 156px; }
.profile-name { font-size: 23px; }
.profile-menu { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #0c1015; }
.profile-menu { scrollbar-width: none; }
.profile-menu::-webkit-scrollbar { display: none; }
.profile-tab { min-height: 40px; border: 0; background: transparent; padding: 8px 11px; }
.profile-tab.active { border: 0; background: var(--panel3); color: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2); }
.account-action-card { background: rgba(0, 0, 0, 0.11); }
.helmet-canvas { background: #0c1015; }
.helmet-svg { overflow: visible; }
.helmet-svg .helmet-ground-shadow { opacity: 0.15; }
.helmet-svg .helmet-outline { stroke: #05080d; stroke-width: 3; }
.helmet-svg .helmet-shell-light { opacity: 0.78; mix-blend-mode: screen; }
.helmet-svg .helmet-shell-spec { opacity: 0.6; }
.helmet-svg .helmet-visor { stroke: #d8e6f3; stroke-width: 2.2; }
.helmet-svg .helmet-visor-highlight { stroke-width: 2; stroke-opacity: 0.82; }
.helmet-svg .helmet-rear-spoiler { fill: #090d13; stroke: #28323f; stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; }
.helmet-svg .helmet-chin-spoiler { fill: #070a0f; opacity: 0.92; pointer-events: none; }
.helmet-editor-svg { filter: drop-shadow(0 22px 23px rgba(0, 0, 0, 0.38)); }

.modal { background: rgba(2, 4, 7, 0.77); backdrop-filter: blur(8px); }
.modal-card { border-color: var(--line-strong); border-radius: 18px; background: #12171d; }
.close { min-width: 44px; min-height: 44px; border-radius: 10px; }

.table-wrap { border: 1px solid var(--line); border-radius: 12px; }
th { background: rgba(255, 255, 255, 0.025); }
th, td { padding: 12px; }
.badge { border: 1px solid rgba(255, 255, 255, 0.06); }

.vehicle-hub-shell, .vh-main { background: var(--bg); }
.vh-topbar, .vh-sidebar { background: rgba(12, 15, 19, 0.97); }
.vh-main { background: var(--bg); }
.vh-card, .vh-kpi, .vh-vehicle-card { border-color: var(--line); background: var(--panel); }
.vh-detail-hero { border-color: var(--line); background: var(--panel); }
.vh-page-head h2, .vh-title strong { text-transform: none; font-style: normal; }
.vh-tab.active { border-color: rgba(255, 67, 56, 0.28); background: rgba(255, 67, 56, 0.1); }

.install-card, .license-card {
  border-color: var(--line-strong);
  border-radius: 20px;
  background: rgba(17, 21, 26, 0.98);
}
.license-logo { border-radius: 12px; background: var(--accent); }
.install-card h2, .license-card h2 { text-transform: none; font-style: normal; letter-spacing: -0.03em; }

/* Mobile */
@media (max-width: 1050px) {
  .layout { grid-template-columns: 218px minmax(0, 1fr); }
  .dashboard-welcome-grid { grid-template-columns: 1fr; }
  .dashboard-profile-card { grid-template-columns: 104px minmax(0, 1fr); justify-items: stretch; text-align: left; }
  .dashboard-profile-card .helmet-button { min-width: 98px; min-height: 80px; }
  .dashboard-profile-card .start-profile-helmet { width: 98px; height: 74px; }
  .dashboard-profile-actions { justify-content: flex-start; }
  .readiness-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-shell { grid-template-columns: 1fr; }
  .profile-identity { position: static; }
}

@media (max-width: 760px) {
  :root { --bottom-nav-h: 72px; --content-gap: 12px; }
  body { background: #090b0e; }
  body:not(.timer-fullscreen) { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .app { padding: 8px 12px 12px; }
  .layout { display: block; grid-template-columns: 1fr; }
  header {
    min-height: 62px;
    margin: 0 -2px 10px;
    padding: max(7px, env(safe-area-inset-top)) 2px 7px;
  }
  .logo { width: 42px; height: 42px; border-radius: 11px; font-size: 11px; }
  .brand { flex: 1 1 auto; min-width: 0; gap: 9px; }
  .brand > div:last-child { min-width: 0; }
  .brand h1 { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
  .app-status-pill { max-width: 205px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app-status-pill > span:nth-child(3), .app-status-pill > span:last-child { display: none; }
  .top-actions { flex: 0 0 auto; width: auto !important; margin-left: auto; }
  .top-actions .btn { flex: none; }
  .header-profile-chip { flex: 0 0 48px; min-width: 48px; width: 48px; height: 48px; min-height: 48px; padding: 2px; border-radius: 50%; }
  .header-profile-helmet { width: 44px; height: 40px; border-radius: 50%; }
  .main { width: 100%; }
  .card { padding: 15px; border-radius: 15px; box-shadow: none; }
  .section-head { align-items: flex-start; }
  .section-head h2 { font-size: 22px; }
  .dashboard-welcome-grid { gap: 10px; margin-bottom: 10px; }
  .dashboard-focus-card { padding: 20px 17px; border-radius: 17px; box-shadow: none; }
  .dashboard-focus-card h2 { margin-top: 11px; font-size: 29px; line-height: 1.05; }
  .dashboard-focus-card > p { font-size: 13px; }
  .focus-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 15px 0; }
  .focus-chip { min-width: 0; padding: 8px; }
  .focus-chip strong { font-size: 11px; }
  .focus-actions { display: grid; grid-template-columns: 1fr; }
  .focus-actions .btn { width: 100%; min-height: 46px; }
  .dashboard-profile-card { grid-template-columns: 94px minmax(0, 1fr); padding: 12px; border-radius: 15px; box-shadow: none; }
  .dashboard-profile-card .helmet-button { min-width: 90px; min-height: 76px; }
  .dashboard-profile-card .start-profile-helmet { width: 90px; height: 68px; }
  .dashboard-profile-actions .badge { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vehicle-strip { margin-inline: -12px; padding: 2px 12px 9px; }
  .vehicle-chip { min-width: 154px; }
  .race-banner { min-height: 0; align-items: flex-start; padding: 14px; }
  .race-banner h2 { font-size: 19px; }
  .race-banner .btn { min-height: 38px; padding: 8px 10px; font-size: 12px; }
  .grid.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi-card { min-height: 88px; padding: 13px; }
  .kpi-value { font-size: 24px; }
  .grid.two { grid-template-columns: 1fr; }
  #dashboard > .card[style*="margin-top"] { margin-top: 12px !important; }

  #trackmode > .card { padding: 17px; }
  .track-prep-progress { grid-template-columns: 1fr; gap: 9px; margin-top: 14px; }
  .readiness-grid { grid-template-columns: 1fr; }
  .readiness-grid .ready-item:nth-child(n + 4) { display: none; }
  .ready-item { min-height: 66px; }
  .track-quick-actions { display: grid; grid-template-columns: 1fr; }
  .advanced-track-settings { padding: 13px; }
  .advanced-track-settings .form-grid { grid-template-columns: 1fr; }
  .track-start-primary { min-height: 52px; }

  .view-page-header { display: grid; gap: 12px; align-items: start; }
  .segmented-tabs { width: 100%; }
  .segment { flex: 1; justify-content: center; padding-inline: 8px; font-size: 12px; }
  .calendar-toolbar { margin-top: 6px; }
  .calendar-day { min-height: 58px; }
  .calendar-day-number { font-size: 13px; }

  .profile-identity {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    grid-template-areas:
      "helmet name"
      "helmet handle"
      "helmet cloud"
      "stats stats"
      "best best";
    gap: 4px 13px;
    align-items: center;
    text-align: left;
  }
  #profileAvatar { grid-area: helmet; width: 105px; height: 82px; margin: 0; }
  #profileDisplayName { grid-area: name; font-size: 20px; }
  #profileEventHandle { grid-area: handle; margin: 0; }
  #profileCloudBadge { grid-area: cloud; justify-self: start; margin-top: 2px !important; }
  .profile-stats { grid-area: stats; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
  #profileBestTimes { grid-area: best; }
  .profile-menu { margin-inline: -2px; overflow: auto; }
  .profile-tab { min-width: max-content; }

  .mobile-bottom-nav {
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    padding: 6px 7px env(safe-area-inset-bottom);
    background: rgba(13, 16, 20, 0.97);
    border-color: var(--line);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.28);
  }
  .mobile-nav-btn { min-height: 56px; gap: 4px; border-radius: 11px; font-size: 11px; font-weight: 760; }
  .mobile-nav-btn .ph { font-size: 22px; }
  .mobile-nav-btn.active { background: rgba(255, 67, 56, 0.09); color: #fff; }
  .mobile-nav-btn.track {
    margin: -13px 2px 3px;
    border-radius: 15px;
    background: #272c33;
    color: #d5d9df;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.22);
  }
  .mobile-nav-btn.track.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 67, 56, 0.25);
  }
  .fab {
    width: 52px;
    height: 52px;
    right: 14px;
    bottom: calc(var(--bottom-nav-h) + 14px + env(safe-area-inset-bottom));
    background: var(--accent);
    font-size: 23px;
  }
  .mobile-more-sheet.open { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(7px); }
  .mobile-more-card { border-color: var(--line-strong); border-radius: 22px 22px 0 0; background: #12171d; }
  .mobile-more-grid .btn { justify-content: flex-start; gap: 10px; font-size: 14px; }
  .mobile-more-grid .btn .ph { font-size: 20px; }
}

@media (max-width: 430px) {
  .app { padding-inline: 10px; }
  #dashboard #vehicleStrip,
  #dashboard #activeVehicleBanner { display: none !important; }
  header { gap: 8px; }
  .brand h1 { font-size: 17px; }
  .app-status-pill { max-width: 172px; }
  .focus-summary { grid-template-columns: 1fr; }
  .focus-chip { grid-template-columns: 78px minmax(0, 1fr); align-items: center; }
  .dashboard-profile-card { grid-template-columns: 80px minmax(0, 1fr); }
  .dashboard-profile-card .helmet-button { min-width: 76px; }
  .dashboard-profile-card .start-profile-helmet { width: 78px; height: 60px; }
  .dashboard-profile-copy h3 { font-size: 16px; }
  .segment span { display: none; }
  .segment .ph { font-size: 20px; }
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-more-grid { grid-template-columns: 1fr 1fr; }
  .track-library-actions { width: 100%; justify-content: stretch; }
  .track-library-actions .badge { flex: 1; justify-content: center; }
  .track-library-actions .btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* V44 workflow refinements */
.install-browser-option {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.install-browser-option .btn { width: 100%; }
.advanced-record-fields {
  margin-top: 14px;
  padding: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}
.advanced-record-fields summary {
  padding: 14px 0;
  color: var(--text);
  font-weight: 780;
  cursor: pointer;
}
.advanced-record-fields > .muted { margin: -5px 0 13px; }
.vh-vehicle-card { cursor: default; }

@media (max-width: 760px) {
  .dashboard-profile-card.profile-ready { display: none; }
  .vehicle-essential-fields { grid-template-columns: 1fr; }
  .advanced-record-fields { padding-inline: 12px; }
  #pitModal .actions { display: grid; grid-template-columns: 1fr; }
  #pitModal .actions .btn { width: 100%; }
}

.lap-picker{border:0;padding:0;margin:0;min-width:0}.lap-picker legend{font-weight:700;margin-bottom:12px}.lap-wheels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;text-align:center}.lap-wheels>div>div:first-child{font-size:13px;color:#bdc6d1;margin-bottom:8px}.lap-wheel{height:220px;box-sizing:border-box;overflow-y:auto;overscroll-behavior-y:contain;scroll-snap-type:y mandatory;padding:88px 0;scrollbar-width:none;border-radius:14px;background:linear-gradient(to bottom,#0b1016 0%,#0b1016 40%,#283443 40%,#283443 60%,#0b1016 60%);touch-action:pan-y}.lap-wheel::-webkit-scrollbar{display:none}.lap-wheel:focus-visible{outline:3px solid #f3b55d;outline-offset:2px}.lap-wheel-option{height:44px;min-height:44px;line-height:44px;scroll-snap-align:center;font-size:24px;font-variant-numeric:tabular-nums;color:#8d99a8;cursor:pointer;user-select:none}.lap-wheel-option[aria-selected=true]{color:#fff;font-weight:750}.lap-picker output{display:block;text-align:center;font-variant-numeric:tabular-nums;font-size:26px;font-weight:700;margin:14px 0 5px}.lap-picker small{display:block;text-align:center;margin-bottom:12px}

/* V44 cockpit: a persistent navigation rail and one shared working surface. */
:root{--bg:#0c1016;--panel:#151b24;--panel2:#1c2430;--panel3:#232e3c;--muted:#a6b2c2;--accent:#f45746;--line:rgba(168,188,212,.15);--shadow:0 8px 24px rgba(0,0,0,.12);--bottom-nav-h:74px}
body{background:var(--bg);font-size:16px;color:#f2f5fa}
.app{max-width:none;margin:0;padding:0 30px 40px 254px}
header{height:88px;margin:0 0 24px;padding:12px 0;z-index:9450;background:rgba(12,16,22,.96);border-bottom:1px solid var(--line)}
.brand .logo{display:none}.brand h1{font-size:25px;letter-spacing:-1.2px;font-weight:850}.brand-log{font-weight:500;color:#a6b2c2}.brand .subtitle{display:none}.app-status-pill{font-size:12px;color:var(--muted);margin-top:3px}.top-actions .header-drive-action{min-height:44px}
.layout{display:block}.sidebar{position:fixed;inset:0 auto 0 0;top:0;width:228px;max-height:none;border:0;border-right:1px solid var(--line);border-radius:0;padding:25px 16px;background:#111720;z-index:9450;box-shadow:none}.sidebar-profile-card{margin-bottom:24px;padding:12px 8px;background:transparent;border-color:transparent}.sidebar-profile-copy strong{font-size:14px}.sidebar-profile-copy small{font-size:12px}.nav-section-label{color:#7f8b9d;font-size:12px;letter-spacing:.08em;margin-top:20px}.nav-btn{min-height:45px;font-weight:600;border-radius:9px}.nav-btn.active{background:#26313f;border-color:transparent;box-shadow:inset 3px 0 var(--accent)}.nav-btn.active .ph{color:#ff7665}.nav-btn:hover{background:#202a36}.nav-count{display:inline-grid;place-items:center;margin-left:auto;border-radius:6px;min-width:23px;height:23px;padding:0 5px;font-size:12px;background:#f4574626;color:#ff9688;font-weight:750}.main{min-width:0}.card{background:var(--panel);border-radius:16px;border:1px solid var(--line);backdrop-filter:none;box-shadow:none;padding:23px}.section-head{gap:16px}.section-head p{font-size:14px}.page-kicker{font-size:12px;letter-spacing:.12em;color:var(--muted)}h2{font-weight:730;line-height:1.2}h3{font-size:18px;font-weight:700}label{font-size:14px}.muted.small{font-size:13px}.btn{font-weight:650;min-height:44px;border-radius:10px}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.quiet{background:transparent}.btn.small{min-height:38px;font-size:14px}input,select,textarea{background:#0e141d;border-color:#344153;border-radius:10px;font-size:16px;min-height:44px}
.cockpit-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}.cockpit-heading h2{font-size:clamp(24px,2.5vw,34px);max-width:570px;letter-spacing:-.04em;margin:8px 0 0}.cockpit-profile.dashboard-profile-card{display:flex;align-items:center;flex:0 0 auto;gap:10px;background:none;border:0;padding:0;box-shadow:none}.cockpit-profile .helmet-button{min-width:64px;min-height:55px}.cockpit-profile .start-profile-helmet{width:72px;height:54px}.cockpit-profile .dashboard-profile-copy{display:none}
.quick-action-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:24px}.quick-action-grid>button{display:flex;align-items:center;gap:12px;text-align:left;background:#19212c;color:var(--text);border:1px solid var(--line);border-radius:13px;padding:17px;cursor:pointer;transition:background .18s,transform .18s,border-color .18s;min-width:0}.quick-action-grid>button:hover{background:#232f3e;border-color:#637187;transform:translateY(-2px)}.quick-action-grid>button>.ph:first-child{font-size:25px;color:#ff8e7f;flex:0 0 auto}.quick-action-grid>button>span{font-size:14px;font-weight:700;min-width:0}.quick-action-grid small{display:block;color:var(--muted);font-size:12px;font-weight:400;margin-top:4px}.quick-action-grid>button>.ph:last-child{font-size:17px;color:#8190a4;margin-left:auto}
.dashboard-welcome-grid{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:20px;margin-bottom:22px}.dashboard-focus-card{padding:27px;border:1px solid #3f4957;border-radius:16px;background:linear-gradient(120deg,#252e3b,#171e28);box-shadow:none}.dashboard-focus-card::before,.dashboard-focus-card::after{display:none}.focus-eyebrow{font-size:12px;color:#c4d0de}.focus-icon{background:#f4574626;color:#ff897b}.dashboard-focus-card h2{font-size:clamp(25px,2.1vw,32px);max-width:450px;margin-top:18px;line-height:1.15}.dashboard-focus-card>p{font-size:14px;color:#b6c1ce}.focus-summary{gap:8px;margin:22px 0}.focus-chip{background:#111924;border-color:#3b4758;padding:11px;border-radius:10px}.focus-chip span{font-size:12px}.focus-chip strong{font-size:14px;overflow-wrap:anywhere}.focus-chip.ready{border-color:#3b4758}.focus-actions{gap:10px}.focus-actions .btn{font-size:14px}.dashboard-todos-card{min-width:0;margin:0}.dashboard-todos-card .card{padding:0;border:0;background:transparent}
#vehicleStrip{margin-bottom:16px}.vehicle-chip{min-width:165px;background:#151d29;border:1px solid #354153}.vehicle-chip.active{background:#24303d;border-color:#ff8e7f}.race-banner{background:#161e29;border-color:var(--line);border-radius:14px;margin-bottom:18px}.grid.kpi{gap:12px}.kpi-card{min-height:108px;background:#111924;padding:20px}.kpi-label{font-size:13px;color:var(--muted)}.kpi-value{font-size:29px;font-variant-numeric:tabular-nums;letter-spacing:-.04em}.grid.two{gap:18px}.view.active{animation:cockpit-in .2s ease-out}@keyframes cockpit-in{from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
/* The vehicle workspace uses the same app chrome. */
.vehicle-hub-shell{inset:88px 0 0 228px;z-index:9400;background:var(--bg)}.vh-topbar{min-height:63px;padding:12px 28px;border-bottom:1px solid var(--line);background:#111924;gap:14px}.vh-title{display:none}.vh-back{min-height:40px;background:#202b39;border-radius:9px;font-size:14px}.vh-mobile-select{display:block!important;margin-left:auto;width:min(300px,60%);font-size:14px}.vh-layout{display:block}.vh-sidebar{display:none}.vh-main{height:100%;padding:26px 30px 40px;background:var(--bg)}.vh-page{max-width:none}.vh-page-head p{font-size:14px}.vh-detail-hero{background:linear-gradient(115deg,#252f3c,#151e29);border:1px solid #3c495c;border-radius:16px;padding:27px}.vh-detail-hero h2{font-style:normal;font-size:34px;letter-spacing:-.035em}.vh-fleet-grid{gap:18px}.vh-vehicle-card{border-radius:16px;background:#161f2b;padding:24px;box-shadow:none}.vh-vehicle-card.active{border-color:#ff8e7f;background:#1c2734}.vh-vehicle-card h3{font-size:24px;letter-spacing:-.025em}.vh-vehicle-meta{font-size:14px}.vh-eyebrow{font-size:12px;letter-spacing:.06em;color:#ff9a8c}.vh-kpis{gap:12px}.vh-kpi{background:#131c27;border-radius:13px;padding:19px;border-color:var(--line)}.vh-kpi span{font-size:13px}.vh-kpi small{font-size:12px}.vh-mini{background:#101821;border-radius:9px}.vh-mini span{font-size:12px}.vh-tabs{top:-26px;background:var(--bg);padding:13px 0;display:flex;flex-wrap:wrap;gap:8px;border:0}.vh-tab{flex:1;min-width:95px;min-height:44px;border:1px solid var(--line);border-radius:9px;font-size:14px;background:#151f2c}.vh-tab.active{background:#303e4f;border-color:#8090a5;color:#fff}.vh-actions{gap:8px}.vh-todo-card{padding:24px;background:#182230;border:1px solid #435269;border-radius:16px;margin-bottom:18px}.vh-todo-summary{display:flex;align-items:center;justify-content:space-between;gap:10px}.vh-todo-list{display:grid;gap:4px;margin:12px 0}.vh-todo-item{display:flex;gap:12px;align-items:center;border-top:1px solid var(--line);padding:9px 0}.vh-todo-check{width:22px;height:22px;min-height:22px;accent-color:var(--accent);flex:0 0 auto;cursor:pointer}.vh-todo-open{color:var(--text);border:0;background:none;cursor:pointer;text-align:left;font-size:15px;padding:8px 0}.vh-todo-count{font-size:14px;color:#ff9a8c}.vh-vehicle-management{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}
/* To-dos: large completion targets, readable titles and immediate status. */
.todo-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.todo-stat{background:#111b28;border:1px solid var(--line);padding:18px;border-radius:12px;font-size:14px;color:var(--muted)}.todo-stat strong{display:block;font-size:28px;color:var(--text);font-variant-numeric:tabular-nums}.todo-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:18px 0;flex-wrap:wrap}.todo-toolbar>label,.todo-toolbar>div:first-child{flex:1;min-width:180px}.todo-filters{display:flex;gap:5px;background:#0b121c;border:1px solid var(--line);padding:5px;border-radius:11px}.todo-filters .btn{min-height:38px;background:transparent;border-color:transparent;color:var(--muted)}.todo-filters .active{background:#2c3b4d;color:#fff}.todo-quick-form{display:flex;align-items:flex-end;gap:10px;padding:17px;background:#202c3a;border:1px solid #415169;border-radius:13px;margin:18px 0}.todo-quick-form label,.todo-quick-title{flex:1;min-width:0}.todo-quick-form input{width:100%}.todo-quick-form select{max-width:220px}.todo-list{display:grid;gap:8px;margin-top:14px}.todo-row{display:flex;align-items:flex-start;gap:13px;padding:17px;border:1px solid var(--line);border-radius:12px;background:#182331;transition:background .15s}.todo-row:hover{background:#202d3e}.todo-row.is-high{border-left:3px solid #edb455}.todo-row.is-complete{background:#111b26}.todo-row.is-complete .todo-title{text-decoration:line-through;color:var(--muted)}.todo-check{width:25px;height:25px;min-height:25px;flex:0 0 25px;accent-color:var(--accent);margin:3px 0;cursor:pointer}.todo-body{min-width:0;flex:1}.todo-title{display:block;font-size:16px;font-weight:650;overflow-wrap:anywhere}.todo-meta{display:flex;gap:7px;align-items:center;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:5px}.todo-notes{font-size:14px;color:#bcc8d7;margin-top:8px;white-space:pre-wrap;overflow-wrap:anywhere}.todo-priority{font-size:12px;border-radius:5px;background:#eab35e1a;color:#f5c579;padding:2px 6px}.todo-empty{padding:30px 16px;border:1px dashed #415067;border-radius:13px;text-align:center;color:var(--muted)}.todo-empty .ph{font-size:32px;display:block;margin-bottom:10px;color:#92abbd}.todo-dashboard-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.todo-dashboard-head h3{margin:0}.todo-dashboard-head p{margin:5px 0 0;font-size:13px}.dashboard-todos-card .todo-row{padding:11px 0;border-width:0 0 1px;border-radius:0;background:none}.dashboard-todos-card .todo-title{font-size:15px}.dashboard-todos-card .todo-check{width:22px;height:22px;min-height:22px;flex-basis:22px}.todo-editor-fields{display:grid;gap:16px}.todo-editor-fields label{display:block}.todo-editor-fields textarea{min-height:90px}.todo-row>.btn{flex-shrink:0;padding:7px 10px}.todo-row>.btn .ph{font-size:18px}
@media(min-width:901px) and (max-width:1180px){.app{padding-left:238px;padding-right:22px}.sidebar{width:216px}.vehicle-hub-shell{left:216px}.quick-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-welcome-grid{grid-template-columns:1fr}.cockpit-profile{display:none!important}}
@media(max-width:900px){body{padding-bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom))}.app{padding:0 16px 26px}.sidebar{display:none!important}header{height:76px;min-height:76px;margin:0 0 18px;padding:10px 0;z-index:9300}.brand h1{font-size:23px!important}.app-status-pill{max-width:210px;font-size:12px}.top-actions{display:flex!important}.top-actions .header-drive-action{display:none}.header-profile-chip{min-width:48px;width:52px;height:49px;min-height:49px;padding:3px;border-radius:12px;background:#202b39}.header-profile-helmet{width:44px;height:40px}.header-profile-copy{display:none}.cockpit-heading{margin-bottom:18px}.cockpit-heading h2{font-size:25px;max-width:340px;line-height:1.2}.cockpit-profile{display:none!important}.quick-action-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:17px}.quick-action-grid>button{padding:13px 11px;gap:9px;min-height:78px;align-items:flex-start}.quick-action-grid>button>.ph:first-child{font-size:22px;margin-top:2px}.quick-action-grid>button>.ph:last-child{display:none}.quick-action-grid>button>span{font-size:14px}.quick-action-grid small{font-size:12px;line-height:1.4}.dashboard-welcome-grid{grid-template-columns:1fr;gap:14px}.dashboard-focus-card{padding:22px 18px}.dashboard-focus-card h2{font-size:28px;line-height:1.15}.dashboard-focus-card>p{font-size:14px}.focus-summary{grid-template-columns:repeat(3,minmax(0,1fr));margin:18px 0}.focus-chip{display:block;padding:9px}.focus-chip strong{font-size:13px}.focus-chip span{font-size:12px}.focus-actions{display:flex;flex-wrap:wrap}.focus-actions .btn{flex:1;min-width:120px}.card{padding:18px}.grid.kpi{gap:9px}.kpi-card{min-height:96px;padding:16px}.kpi-value{font-size:26px}#dashboard #vehicleStrip{display:flex!important}#dashboard #activeVehicleBanner{display:none!important}.mobile-bottom-nav,body.vehicle-hub-open .mobile-bottom-nav{display:grid!important;z-index:9490;height:calc(74px + env(safe-area-inset-bottom));border:0;border-top:1px solid #3b4657;background:rgba(17,25,36,.97);padding:6px 6px env(safe-area-inset-bottom);box-shadow:0 -6px 22px #0003}.mobile-nav-btn{position:relative;font-size:12px;min-height:61px;border-radius:10px;gap:5px}.mobile-nav-btn.track{margin:0;background:#263342;box-shadow:none;border-radius:10px}.mobile-nav-btn.active{background:#334255;color:#fff}.mobile-nav-btn.active .ph{color:#ffa194}.mobile-nav-btn .nav-count{position:absolute;top:2px;right:8px;min-width:17px;height:17px;font-size:11px;background:#f45746;color:#fff}.mobile-more-sheet.open{z-index:9700}.mobile-more-card{max-height:85dvh;overflow:auto;padding:22px 18px calc(24px + env(safe-area-inset-bottom));background:#182331}.mobile-more-grid{gap:10px}.mobile-more-grid .btn{min-height:58px;font-size:14px;background:#253245}.fab{display:none!important}.vehicle-hub-shell{inset:0 0 calc(74px + env(safe-area-inset-bottom)) 0}.vh-topbar{padding:12px 16px;min-height:69px}.vh-main{padding:18px 16px 24px}.vh-detail-hero{padding:22px 18px}.vh-detail-hero h2{font-size:29px}.vh-tabs{top:-18px;gap:6px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.vh-tab{min-width:0;font-size:13px;padding:10px 5px}.vh-actions .btn{flex:1;min-width:115px;font-size:14px}.vh-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.vh-kpi{padding:15px}.vh-kpi strong{font-size:22px}.vh-vehicle-card{padding:21px}.vh-todo-card{padding:18px}.vh-todo-summary{flex-wrap:wrap}.vh-todo-summary h3{font-size:17px}.todo-overview{gap:8px;margin:17px 0}.todo-stat{padding:12px;font-size:12px}.todo-stat strong{font-size:25px}.todo-toolbar{display:grid;gap:12px}.todo-toolbar select{width:100%}.todo-filters{width:100%}.todo-filters .btn{flex:1;font-size:14px;padding:8px}.todo-quick-form{flex-wrap:wrap;padding:13px}.todo-quick-form .todo-quick-title{flex-basis:100%}.todo-quick-form label{flex-basis:100%}.todo-quick-form select{flex:1;max-width:none}.todo-quick-form .btn{flex:1}.todo-row{padding:14px 12px;gap:10px}.todo-row>.btn{min-width:38px;padding:7px}.todo-title{font-size:16px}.todo-meta{font-size:12px}.todo-dashboard-head{flex-wrap:wrap}.todo-dashboard-head .btn{font-size:13px}.footer-note{font-size:12px}}
@media(max-width:359px){.app{padding-inline:11px}.focus-summary{grid-template-columns:1fr}.focus-chip{display:grid;grid-template-columns:80px 1fr}.mobile-nav-btn{font-size:11px}.todo-row{flex-wrap:wrap}.todo-body{flex-basis:calc(100% - 40px)}.todo-row>.btn{margin-left:35px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
body.timer-fullscreen .mobile-bottom-nav{display:none!important}

.todo-title{border:0;padding:0;background:transparent;color:var(--text);text-align:left;cursor:pointer;line-height:1.5}.todo-title:hover{color:#ffb0a4}.todo-dashboard-head .eyebrow{font-size:12px;letter-spacing:.08em;color:var(--muted)}.vh-kpi-link{color:var(--text);text-align:left;cursor:pointer;font:inherit}.vh-kpi-link:hover{border-color:#ff8e7f}.vh-todo-all{margin-top:10px}.vh-todo-item.is-priority{border-left:2px solid #e6b05d;padding-left:10px}.vh-vehicle-options{margin-top:16px}.vh-vehicle-options summary{cursor:pointer;font-size:14px;color:var(--muted);padding:10px 0}.modal{z-index:10000}#vehicleTodoModal .modal-card{max-width:570px;width:100%;background:var(--panel);padding:24px;border:1px solid var(--line);border-radius:17px;max-height:90dvh;overflow:auto}#vehicleTodoModal .modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}#todoEditorError{color:#ffa294;margin-top:14px}#todos .view-page-header p{font-size:14px;margin-bottom:0}
/* Complete tablet navigation styles, including widths above the legacy 760px breakpoint. */
@media(max-width:900px){
 .mobile-bottom-nav{position:fixed;grid-template-columns:repeat(5,minmax(0,1fr));left:0;right:0;bottom:0;backdrop-filter:blur(15px)}
 .mobile-nav-btn{display:grid;place-items:center;border:0;background:transparent;color:var(--muted);padding:4px;font-weight:650;cursor:pointer;min-width:0}
 .mobile-nav-btn .ph{font-size:23px}.mobile-nav-btn.active{background:#334255;color:#fff}.mobile-nav-btn.track{background:#263342}.mobile-nav-btn.track.active{background:var(--accent);color:#fff}.mobile-nav-btn.track.active .ph{color:#fff}
 .mobile-more-sheet.open{display:flex;position:fixed;inset:0;align-items:flex-end;background:rgba(0,0,0,.72);backdrop-filter:blur(7px)}
 .mobile-more-card{width:100%;border-radius:22px 22px 0 0;border:1px solid var(--line-strong)}.mobile-more-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.mobile-more-grid .btn{justify-content:flex-start;gap:10px;text-align:left}.mobile-more-grid .ph{font-size:20px}
}
@media(min-width:901px){.sidebar{height:100dvh;max-height:100dvh;overflow-y:auto}}
.btn.primary{background:#cf4030;border-color:#cf4030;color:#fff}.btn.primary:hover{background:#b73325;border-color:#b73325}.mobile-nav-btn.track.active{background:#cf4030}.mobile-nav-btn .nav-count{background:#cf4030}

/* V44: labels, long vehicle names and calendar counts stay inside their cells. */
.dashboard-focus-card .focus-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  min-width:0;
}
.dashboard-focus-card .focus-chip {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-content:start;
  align-items:start;
  gap:5px;
  min-width:0;
  max-width:100%;
}
.dashboard-focus-card .focus-chip > span,
.dashboard-focus-card .focus-chip > strong {
  display:block;
  min-width:0;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
}
.dashboard-focus-card .focus-chip > span {line-height:1.45;letter-spacing:.035em}
.dashboard-focus-card .focus-chip > strong {overflow:visible;text-overflow:clip;line-height:1.5}
.calendar-toolbar {
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 44px;
  gap:8px;
  align-items:center;
  margin:18px 0 16px;
}
.calendar-toolbar h3 {
  min-width:0;
  margin:0;
  font-size:20px;
  line-height:1.3;
  font-style:normal;
  text-transform:none;
  overflow-wrap:anywhere;
}
.calendar-toolbar > .btn {width:44px;min-width:0;min-height:44px;padding:8px;font-size:20px}
.drive-calendar .calendar-day {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  min-width:0;
  min-height:80px;
  padding:10px 4px;
  text-align:center;
  border-radius:10px;
  font-variant-numeric:tabular-nums;
}
.drive-calendar .calendar-day.has-runs {background:#2c1c21;border-color:#b3554b;box-shadow:none}
.drive-calendar .calendar-day.has-runs::before {content:none}
.drive-calendar .calendar-day-number {display:block;font-size:17px;font-weight:700;line-height:1.3}
.drive-calendar .calendar-day-count {
  position:static;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-width:22px;
  max-width:100%;
  min-height:20px;
  padding:2px 4px;
  border-radius:5px;
  background:#5b2c2b;
  color:#ffe6e1;
  font-size:12px;
  font-weight:650;
  line-height:1.3;
  white-space:nowrap;
}
.drive-calendar .calendar-day-count.is-empty {visibility:hidden}
.calendar-count-hint {display:flex;gap:7px;align-items:baseline;margin:14px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.calendar-count-hint > span {width:9px;height:9px;flex:0 0 9px;background:#b3554b;border-radius:3px}
.session-calendar-card.is-history .calendar-count-hint {display:none}
@media(max-width:900px) {
  .dashboard-focus-card .focus-summary {grid-template-columns:minmax(0,1fr)}
  .dashboard-focus-card .focus-chip {
    grid-template-columns:5.75rem minmax(0,1fr);
    align-items:start;
    gap:12px;
    padding:12px;
  }
  .dashboard-focus-card .focus-chip > span {font-size:12px;padding-top:2px}
  .dashboard-focus-card .focus-chip > strong {font-size:14px}
}
@media(max-width:600px) {
  .session-calendar-card .section-head {display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title action" "description description";gap:12px}
  .session-calendar-card .section-head > div {display:contents}
  .session-calendar-card .section-head h3 {grid-area:title}
  .session-calendar-card .section-head p {grid-area:description;margin:0}
  .session-calendar-card .section-head > .btn {grid-area:action}
  .calendar-weekdays,.drive-calendar {gap:4px}
  .calendar-weekdays {font-size:11px;letter-spacing:.02em}
  .calendar-toolbar h3 {font-size:18px}
  .drive-calendar .calendar-day {min-height:69px;padding:8px 2px;gap:7px;border-radius:9px}
  .drive-calendar .calendar-day-number {font-size:15px}
  .drive-calendar .calendar-day-count {min-width:19px;min-height:18px;padding:2px;font-size:11px}
}
@media(max-width:359px) {
  .drive-calendar .calendar-day-count {padding-inline:0;font-size:10px}
}

/* V44: one preparation form, directly on the dashboard. */
#dashboard #vehicleStrip,#dashboard #activeVehicleBanner {display:none!important}
.dashboard-drive-setup {display:grid;gap:14px;margin:22px 0 16px;min-width:0}
.drive-field {min-width:0}
.drive-field label {display:flex;align-items:center;gap:8px;margin-bottom:7px;font-size:13px;font-weight:650;color:#cbd4df}
.drive-field label::before {display:inline-grid;place-items:center;width:21px;height:21px;flex:0 0 21px;border-radius:6px;background:#f457461f;color:#ffa294;font-size:12px}
.dashboard-drive-setup select {width:100%;min-width:0;max-width:100%;min-height:48px;padding:11px 32px 11px 12px;font-size:16px;text-overflow:ellipsis}
.dashboard-drive-conditions {min-width:0;margin:18px 0 0;padding:16px 0 0;border:0;border-top:1px solid #3b4758}
.dashboard-drive-conditions legend {padding:0 8px 0 0;color:#c5ced9;font-size:12px;font-weight:650}
.dashboard-drive-conditions legend span {margin-left:5px;color:var(--muted);font-weight:400}
.drive-condition-grid {display:grid;grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(0,1fr));gap:9px}
.drive-condition-grid > div {min-width:0}
.drive-condition-grid label {display:block;white-space:nowrap;font-size:12px;margin-bottom:7px;color:var(--muted)}
.drive-condition-grid input,.drive-condition-grid select {width:100%;min-width:0;padding:9px 7px;font-size:16px;min-height:44px}
.dashboard-focus-card .dashboard-drive-hint {margin:16px 0;color:#b8c6d5;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.dashboard-focus-card .dashboard-drive-hint:empty {display:none}
.dashboard-focus-card .focus-eyebrow {flex-wrap:wrap}
.dashboard-focus-card #trackModeStatusBadge {margin-left:auto;font-size:11px;letter-spacing:0;text-transform:none}
.dashboard-focus-card .track-quick-actions:empty {display:none}
.dashboard-focus-card .focus-actions > .btn.primary {flex:1;min-height:48px}
.dashboard-focus-card .focus-actions {margin-top:18px}
.dashboard-focus-card select:disabled,.dashboard-focus-card input:disabled {opacity:.75;cursor:default}
.quick-action-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:900px) {
  .mobile-bottom-nav {grid-template-columns:repeat(4,minmax(0,1fr))}
  .dashboard-focus-card h2 {font-size:25px}
  .dashboard-drive-setup {gap:12px;margin-top:18px}
  .quick-action-grid {grid-template-columns:minmax(0,1fr)}
  .quick-action-grid > button {min-height:62px;align-items:center}
  .quick-action-grid small {margin-top:2px}
}
@media(max-width:359px) {
  .drive-condition-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .drive-condition-grid > div:first-child {grid-column:1 / -1}
}

.drive-field:nth-child(1) label::before {content:"1"}
.drive-field:nth-child(2) label::before {content:"2"}
.drive-field:nth-child(3) label::before {content:"3"}

#dashboard .grid.kpi {grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:600px){#dashboard .grid.kpi {grid-template-columns:repeat(2,minmax(0,1fr))}#dashboard .grid.kpi .kpi-card:last-child {grid-column:1 / -1}}

/* V44: recurring costs, shared by the vehicle file and invoices. */
.recurring-entry {display:flex;align-items:center;justify-content:space-between;gap:16px;background:#1b2735;border:1px solid #46566c;border-radius:13px;padding:17px 18px;margin:0 0 20px;min-width:0}
.recurring-entry > div {min-width:0}
.recurring-entry strong {font-size:16px;overflow-wrap:anywhere}
.recurring-entry p {font-size:13px;line-height:1.5;color:#bdc9d8;margin:5px 0 0}
.recurring-entry .btn {flex-shrink:0;gap:12px}
.recurring-entry .badge {margin-left:6px;font-size:12px;white-space:nowrap}
.recurring-modal .modal-card {width:min(780px,100%);max-height:90dvh;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:17px;padding:24px;min-width:0}
.recurring-editor .modal-card {width:min(660px,100%)}
.recurring-modal-head {display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px;min-width:0}
.recurring-modal-head > div {min-width:0}
.recurring-modal-head h2 {font-size:24px;margin:0;overflow-wrap:anywhere}
.recurring-modal-head p {margin:10px 0 0;color:#bdc9d8;font-size:14px;line-height:1.6}
.recurring-modal-head .close {flex:0 0 auto}
.recurring-toolbar {display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 18px}
.recurring-toolbar > label:first-child {flex:1;min-width:170px}
.recurring-toolbar select {width:100%;margin-top:7px}
.recurring-show-ended {display:flex;align-items:center;gap:8px;margin:23px 0 0;font-size:13px;cursor:pointer}
.recurring-show-ended input {width:20px;min-height:20px;height:20px;margin:0;accent-color:var(--accent)}
.recurring-list-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 16px;color:var(--muted);font-size:13px;flex-wrap:wrap}
.recurring-list {display:grid;gap:12px}
.recurring-row {display:flex;justify-content:space-between;gap:18px;padding:18px;background:#182331;border:1px solid var(--line);border-radius:12px;min-width:0}
.recurring-row.is-ended {background:#111a25}
.recurring-row-main {min-width:0;flex:1}
.recurring-row-title {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.recurring-row-title h3 {font-size:17px;margin:0;overflow-wrap:anywhere}
.recurring-status {border-radius:5px;background:#224a3e;color:#b7efd9;padding:3px 7px;font-size:11px;white-space:nowrap}
.recurring-status.is-ended {background:#2b3543;color:#bbc8d9}
.recurring-meta {font-size:12px;color:#afbecf;line-height:1.5;margin:7px 0 0;overflow-wrap:anywhere}
.recurring-schedule {display:grid;gap:5px;margin-top:14px;font-size:12px;line-height:1.5;color:#bdc9d8}
.recurring-schedule strong {color:var(--text);white-space:nowrap;margin-left:3px;font-size:13px}
.recurring-notes {font-size:13px;color:#bdc9d8;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0 0}
.recurring-row-side {display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:15px;min-width:0;flex:0 0 auto}
.recurring-amount {text-align:right}
.recurring-amount strong {display:block;font-size:19px;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.recurring-amount span {display:block;font-size:12px;color:var(--muted);margin-top:2px}
.recurring-row-actions {display:flex;gap:7px;flex-wrap:wrap}
.recurring-empty {padding:30px 20px;text-align:center;border:1px dashed #45556b;border-radius:12px}
.recurring-empty p {color:var(--muted);font-size:14px;line-height:1.6;margin:9px 0 0}
.recurring-empty .btn {margin-top:14px}
.recurring-editor-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.recurring-editor-fields label {display:block;min-width:0;font-size:13px;color:#c5d0df}
.recurring-editor-fields input,.recurring-editor-fields select,.recurring-editor-fields textarea {display:block;min-width:0;width:100%;margin-top:7px}
.recurring-editor-fields :disabled {color:#b7c3d3;opacity:.72;cursor:default}
.recurring-wide {grid-column:1 / -1}
.recurring-help {font-size:12px;line-height:1.6;color:#bdc9d8;margin:0}
.recurring-editor-fields + .recurring-help {margin-top:18px}
.recurring-error {color:#ffab9f;line-height:1.5;font-size:14px;margin-top:16px}
.recurring-editor .actions {flex-wrap:wrap;margin-top:22px}
@media(max-width:600px){
  .recurring-entry {align-items:flex-start;flex-direction:column;gap:12px;padding:16px}
  .recurring-entry .btn {width:100%;justify-content:space-between}
  .recurring-modal .modal-card {padding:19px;max-height:92dvh}
  .recurring-modal-head h2 {font-size:21px}
  .recurring-row {display:block;padding:15px}
  .recurring-row-side {flex-direction:row;align-items:flex-end;margin-top:17px;gap:10px;flex-wrap:wrap}
  .recurring-amount {text-align:left}
  .recurring-toolbar {gap:8px}
  .recurring-show-ended {margin-top:8px}
  .recurring-list-heading > .btn {width:100%}
  .recurring-editor-fields {grid-template-columns:minmax(0,1fr);gap:15px}
  .recurring-editor .actions {display:grid;grid-template-columns:minmax(0,1fr)}
  .recurring-editor .actions .primary {grid-row:1}
}
