/* style.css - 油耗紀錄 PWA Global Styles */

:root {
  --bg: #101426;
  --bg2: #161c36;
  --bg3: #1e2545;
  --bg4: #262f54;
  --card: #161c36;
  --card2: #1e2545;
  --text: #f5f7ff;
  --text2: #8080a0;
  --text3: #50506a;
  --border: rgba(255,255,255,.07);
  --border2: rgba(255,255,255,.14);
  --amber: #ffb11f;
  --amber-light: #ffca55;
  --amber-dim: rgba(255,177,31,.13);
  --amber-glow: rgba(255,177,31,.4);
  --red: #f43f5e;
  --green: #22c55e;
  --blue: #60a5fa;
  --red-dim: rgba(244,63,94,.13);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 6px;
}

body.light-mode {
  --bg: #f4f7fb;
  --bg2: #ffffff;
  --bg3: #eaeaf0;
  --bg4: #dddde8;
  --card: #ffffff;
  --card2: #f0f0f5;
  --text: #182134;
  --text2: #555570;
  --text3: #8888aa;
  --border: rgba(0,0,0,.08);
  --border2: rgba(0,0,0,.15);
  --amber: #d97706;
  --amber-light: #b45309;
  --amber-dim: rgba(217,119,6,.1);
  --amber-glow: rgba(217,119,6,.3);
  --red: #e11d48;
  --green: #16a34a;
  --blue: #2563eb;
  --red-dim: rgba(225,29,72,.1);
}

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

body {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  width: 100%;
  height: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  box-sizing: border-box;
  background: var(--bg);
}

input, select, textarea { font-size: 16px !important; }

/* ── Header ── */
#header {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 5;
}

.header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  border-radius: var(--radius-xs);
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#version-label {
  font-size: 10px;
  color: var(--text3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── Pages ── */
.page {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.page.active {
  display: flex;
}

/* ── Main Content Scroll Area ── */
#main-content, .page-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 12px 14px;
}

/* ── Bottom Nav ── */
#bottom-nav {
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: flex-start;
  background: rgba(16,20,38,.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  z-index: 10;
}

body.light-mode #bottom-nav {
  background: rgba(244,247,251,.92);
  border-top-color: rgba(0,0,0,.08);
}

.nav-btn {
  flex: 0 0 20%;
  width: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 0 3px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  font-size: 10px;
  font-weight: 600;
  height: 60px;
  transition: color .15s;
}

.nav-btn.active { color: var(--amber); }

.nav-btn .nav-icon {
  font-size: 20px;
  line-height: 1;
}

/* ── Card ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.024), rgba(255,255,255,.01)), var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.08);
}

body.light-mode .glass {
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(247,249,253,.92));
  border-color: rgba(0,0,0,.07);
}

/* ── Vehicle Card ── */
.vehicle-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}

.vehicle-card:active { transform: scale(.98); }

.vehicle-card .vc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.vc-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vc-emoji {
  font-size: 28px;
  line-height: 1;
}

.vc-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.vc-note {
  font-size: 11px;
  color: var(--text2);
  margin-top: 1px;
}

.vc-odometer {
  font-size: 20px;
  font-weight: 700;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
}

.vc-odometer-unit {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  margin-left: 2px;
}

.vc-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.vc-stat {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.vc-stat.fuel { color: var(--green); }
.vc-stat.maintenance { color: var(--blue); }
.vc-stat.no-data { color: var(--text3); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text3);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}

.empty-state small {
  font-size: 12px;
  color: var(--text3);
}

/* ── Buttons ── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 16px;
  background: var(--amber);
  color: #101426;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:active { opacity: .85; transform: scale(.98); }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg3);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:active { opacity: .85; transform: scale(.98); }

.btn-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 16px;
  background: var(--red-dim);
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(244,63,94,.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity .15s;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.btn-danger:active { opacity: .8; }

/* ── Modal Panels (full screen slide from right) ── */
.modal-panel {
  position: fixed;
  inset: 0;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  z-index: 101;
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg);
  pointer-events: none;
}

.modal-panel.slide-in {
  transform: translateX(0);
  pointer-events: all;
}

.modal-header {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.modal-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--amber);
  min-width: 32px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.modal-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 16px 14px;
}

/* ── Sheet Modal (slide from bottom) ── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 110;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.sheet-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.sheet-panel {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--bg2);
  border-radius: 20px 20px 0 0;
  padding: 20px 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 111;
  transform: translateY(105%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

.sheet-panel.slide-up {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.sheet-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 20px;
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Form Styles ── */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text);
  font-size: 16px !important;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--amber);
}

.form-input::placeholder {
  color: var(--text3);
}

textarea.form-input {
  resize: none;
  min-height: 72px;
}

/* ── Type Tab ── */
.type-tabs {
  display: flex;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 16px;
}

.type-tab {
  flex: 1;
  padding: 8px 0;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: background .15s, color .15s;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}

.type-tab.active {
  background: var(--card);
  color: var(--text);
}

/* ── Chips ── */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 12px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.chip.selected {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber);
}

/* ── Estimate display ── */
.estimate-bar {
  background: var(--amber-dim);
  border: 1px solid rgba(255,177,31,.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 14px;
  text-align: center;
}

/* ── History Page ── */
.filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s, border-color .15s;
}

.filter-pill.active {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber);
}

.record-card {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.record-card:active { opacity: .85; }

.record-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.record-icon-wrap.fuel { background: var(--amber-dim); }
.record-icon-wrap.maintenance { background: rgba(96,165,250,.12); }

.record-body {
  flex: 1;
  min-width: 0;
}

.record-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-sub {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
}

.record-right {
  text-align: right;
  flex-shrink: 0;
}

.record-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.record-value.efficiency { color: var(--green); }

.record-cost {
  font-size: 11px;
  color: var(--text2);
  font-variant-numeric: tabular-nums;
}

.record-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.record-chip {
  padding: 2px 7px;
  background: rgba(96,165,250,.12);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--blue);
}

/* ── Vehicle Detail Modal ── */
.detail-tabs {
  display: flex;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 14px;
}

.detail-tab {
  flex: 1;
  padding: 8px 0;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: background .15s, color .15s;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}

.detail-tab.active {
  background: var(--card);
  color: var(--text);
}

/* ── Stats Row ── */
.stats-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.stat-box {
  flex: 1;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.stat-box .stat-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.stat-box .stat-label {
  font-size: 10px;
  color: var(--text3);
  font-weight: 600;
  margin-top: 2px;
  text-transform: uppercase;
}

/* ── Section Header ── */
.section-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 8px;
  margin-top: 4px;
}

/* ── Backup Page ── */
.backup-section {
  margin-bottom: 20px;
}

.backup-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.backup-btn-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gdrive-info {
  font-size: 12px;
  color: var(--text2);
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.backup-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.backup-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
}

.backup-file-item:active { opacity: .7; }

.backup-file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.backup-file-date {
  font-size: 11px;
  color: var(--text2);
}

/* Details collapsible */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  -webkit-tap-highlight-color: transparent;
}

.collapsible-header .ch-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}

.collapsible-arrow {
  font-size: 12px;
  color: var(--text3);
  transition: transform .2s;
}

.collapsible-arrow.open { transform: rotate(180deg); }

.collapsible-body {
  display: none;
  padding: 10px 0;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
}

.collapsible-body.open { display: block; }

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg3);
  color: var(--text);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 200;
  white-space: nowrap;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast.success { background: var(--green); color: #fff; }
#toast.error { background: var(--red); color: #fff; }
#toast.info { background: var(--blue); color: #fff; }

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ── Update Sheet ── */
#update-sheet .sheet-title { color: var(--amber); }

/* ── History Page Layout ── */
#header-history {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 5;
}

#history-filter-bar {
  flex-shrink: 0;
  padding: 8px 14px 4px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#history-list-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 10px 14px;
}

/* ── Vehicles Page ── */
#header-vehicles {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 5;
}

.btn-add-vehicle {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(255,177,31,.3);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
  min-height: 36px;
}

.btn-add-vehicle:active { opacity: .75; }

/* ── Accordion / Expandable Vehicle Card ── */
.vc-expand-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text3);
  padding: 4px;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s;
  border-radius: var(--radius-xs);
}

.vc-expand-toggle:active { color: var(--amber); }

.vc-expanded-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s cubic-bezier(.4,0,.2,1);
}

.vc-expanded-body.open {
  /* max-height set dynamically via JS */
}

.vc-expanded-inner {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.vc-expand-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
  margin-top: 10px;
}

.vc-expand-section-title:first-child { margin-top: 0; }

.vc-mini-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.vc-mini-record:last-child { border-bottom: none; }

.vc-mini-left {
  color: var(--text2);
  font-variant-numeric: tabular-nums;
}

.vc-mini-right {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}

.vc-mini-right.green { color: var(--green); }

.vc-expand-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-vc-action {
  flex: 1;
  padding: 8px 6px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-vc-action:active { background: var(--amber-dim); color: var(--amber); }

/* ── Settings Page ── */
.settings-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 10px;
  margin-top: 6px;
}

/* ── Theme Toggle ── */
.toggle-btn {
  width: 48px;
  height: 28px;
  border-radius: 14px;
  border: none;
  background: var(--bg4);
  cursor: pointer;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.toggle-btn::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text3);
  transition: transform .2s, background .2s;
}

.toggle-btn.active {
  background: var(--amber-dim);
}

.toggle-btn.active::after {
  transform: translateX(20px);
  background: var(--amber);
}

/* ── Vehicle Management Cards ── */
.vehicle-manage-card {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
  user-select: none;
}

.vehicle-manage-card:active { opacity: .8; }

.vmc-emoji {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.vmc-body {
  flex: 1;
  min-width: 0;
}

.vmc-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.vmc-note {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
}

.vmc-count {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

.vmc-arrow {
  font-size: 16px;
  color: var(--text3);
  flex-shrink: 0;
}

.vmc-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.vmc-edit-btn, .vmc-delete-btn {
  background: none;
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  font-size: 16px;
  cursor: pointer;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}

.vmc-edit-btn:active { background: var(--amber-dim); }
.vmc-delete-btn:active { background: var(--red-dim); }

/* ── FAB Add Button ── */
#nav-add {
  position: relative;
  top: -14px;
  margin-top: -14px;
}

#nav-add .nav-icon {
  width: 56px;
  height: 56px;
  background: var(--amber);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,177,31,.5);
  transition: transform .15s, box-shadow .15s;
}

#nav-add:active .nav-icon {
  transform: scale(.92);
  box-shadow: 0 2px 8px rgba(255,177,31,.3);
}

#nav-add { color: var(--text3); }
#nav-add.active { color: var(--text3); }

/* ── Light Mode Card Border Enhancement ── */
body.light-mode .card {
  border-color: #b0b8c8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 0 0 1px #c0c8d8;
}

body.light-mode .glass {
  border-color: #b0b8c8;
}

/* ── Maintenance Template Rows ── */
.maint-tmpl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.maint-tmpl-info {
  flex: 1;
  min-width: 0;
}

.maint-tmpl-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.maint-tmpl-detail {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
}

.maint-tmpl-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Danger button (spec) ── */
.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(244,63,94,.3);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
}

.btn-danger:active { opacity: .8; }
