:root {
  --bg: #f4f3ee;
  --surface: rgba(255,255,255,0.64);
  --surface-high: rgba(255,255,255,0.8);
  --surface-highest: rgba(255,255,255,0.95);
  --border: rgba(31,26,22,0.08);
  --border-focus: rgba(193,95,60,0.35);
  --text: #1d1a17;
  --text-secondary: #6f665d;
  --text-muted: #9c9288;
  --primary: #c15f3c;
  --primary-dim: rgba(193,95,60,0.12);
  --green: #34d058;
  --green-dim: rgba(52,208,88,0.12);
  --red: #c0392b;
  --red-dim: rgba(192,57,43,0.12);
  --blue: #58a6ff;
  --amber: #f0b429;
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 72px;
  --header-bg: rgba(244,243,238,0.84);
  --nav-bg: rgba(244,243,238,0.84);
  --modal-scrim: rgba(25,21,18,0.34);
  --surface-shadow: 0 10px 26px rgba(49,38,29,0.08);
  --surface-shadow-strong: 0 16px 34px rgba(49,38,29,0.12);
  --google-shadow: 0 6px 18px rgba(49,38,29,0.12);
  --hero-input-line: #d4cbc0;
}

html[data-theme="dark"] {
  --bg: #0d0d0d;
  --surface: #161616;
  --surface-high: #1e1e1e;
  --surface-highest: #2a2a2a;
  --border: rgba(255,255,255,0.06);
  --border-focus: rgba(249,158,11,0.4);
  --text: #F59E0B;
  --text-secondary: #8a8a8a;
  --text-muted: #555;
  --primary: #F59E0B;
  --primary-dim: rgba(193,95,60,0.16);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.16);
  --header-bg: rgba(13,13,13,0.85);
  --nav-bg: rgba(22,22,22,0.85);
  --modal-scrim: rgba(0,0,0,0.72);
  --surface-shadow: 0 8px 32px rgba(0,0,0,0.3);
  --surface-shadow-strong: 0 14px 34px rgba(0,0,0,0.32);
  --google-shadow: 0 2px 12px rgba(0,0,0,0.3);
  --hero-input-line: #2a2a2a;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body { padding-bottom: calc(var(--nav-height) + 32px); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- HEADER --- */
header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: var(--header-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.logo { display:flex; align-items:center; gap:10px; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); display:flex; align-items:center; justify-content:center;
  color: #fff; flex-shrink: 0;
}
.logo-icon svg { width: 20px; height: 20px; }
.logo-text { font-family:'Manrope'; font-weight:800; font-size:20px; color:var(--primary); letter-spacing:-0.5px; }

html[data-theme="dark"] .logo-icon { background: var(--surface-high); color: #F59E0B; }

header button {
  background:none; border:none; color:var(--text-secondary); cursor:pointer;
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition: background 0.2s;
}
header button:hover { background: var(--surface-high); }

/* --- MAIN --- */
main { padding: 0 20px; max-width: 480px; margin: 0 auto; }

.page { display:none; animation: fadeUp 0.35s ease; }
.page.active { display:block; }

@keyframes fadeUp {
  from { opacity:0; transform:translateY(12px); }
  to { opacity:1; transform:translateY(0); }
}

/* --- DASHBOARD --- */
.dash-hero { padding: 28px 0 8px; }
.dash-label { font-size:12px; font-weight:600; color:var(--text-secondary); text-transform:uppercase; letter-spacing:1.5px; margin-bottom:4px; }
.dash-amount {
  font-family:'Manrope'; font-weight:800; font-size:56px; letter-spacing:-3px;
  line-height:1; color:var(--text);
}
.dash-amount .currency { color:var(--primary); font-size:36px; margin-left:2px; }

.dash-stats {
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
  margin: 20px 0;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--surface-shadow);
}
.stat-card .stat-label { font-size:10px; font-weight:600; color:var(--text-secondary); text-transform:uppercase; letter-spacing:1px; }
.stat-card .stat-value { font-family:'Manrope'; font-weight:700; font-size:22px; margin-top:4px; }
.stat-card .stat-unit { font-size:13px; color:var(--text-secondary); font-weight:500; }

.section-title {
  font-family:'Manrope'; font-weight:700; font-size:16px;
  margin: 28px 0 12px; color:var(--text);
}

/* Chart */
.chart-container {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  box-shadow: var(--surface-shadow);
}
.chart-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.chart-header .badge {
  font-size:11px; font-weight:600; padding:4px 10px;
  border-radius:20px; background:var(--green-dim); color:var(--green);
}
.chart-header .badge.badge-warn { background: var(--red-dim); color: var(--red); }

/* === AUFKLAPPBARE SEKTIONEN === */
.section-toggle {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.section-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 6px; }
.cs-chevron {
  font-size: 12px; color: var(--text-muted);
  transition: transform .2s ease;
  line-height: 1;
}
.collapse-section.is-collapsed .cs-chevron { transform: rotate(-90deg); }
.collapse-section.is-collapsed .cs-body { display: none; }
/* Zugeklappt hängt unter dem Titel sonst noch der volle Body-Abstand, und
   mehrere zugeklappte Sektionen stehen weit auseinander. */
.collapse-section.is-collapsed > .section-title { margin-bottom: 4px; }

/* === KWH JE MONAT === */
.kwh-chart { padding-bottom: 18px; }
.kc-plot { position: relative; height: 130px; }
.kc-bars { display: flex; align-items: flex-end; gap: 6px; height: 100%; }
.kc-col { flex: 1; position: relative; height: 100%; min-width: 0; }
.kc-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--primary); border-radius: 3px 3px 0 0;
  transition: height .25s ease;
}
.kc-bar-none { height: 3px; background: var(--border); }
.kc-val {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--text-secondary); white-space: nowrap;
}
.kc-label {
  position: absolute; bottom: -16px; left: 0; right: 0; text-align: center;
  font-size: 10px; color: var(--text-muted); white-space: nowrap;
}
.kc-note { font-size: 10px; color: var(--text-muted); margin-top: 6px; text-align: right; }

/* === TARIF-ERINNERUNG === */
.reminder {
  background: var(--surface);
  border: 1px solid var(--amber);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--surface-shadow);
}
.rm-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.rm-icon { font-size:18px; color:var(--amber); flex-shrink:0; }
.rm-title { font-family:'Manrope'; font-weight:700; font-size:14px; }
.rm-text { font-size:12px; line-height:1.55; color:var(--text-secondary); }
.rm-text code {
  font-size:11px; background:var(--surface-high);
  padding:1px 4px; border-radius:4px;
}
.rm-btn {
  margin-top:10px; width:100%;
  background:var(--surface-high); color:var(--text-secondary);
  border:1px solid var(--border); border-radius:8px;
  padding:8px 12px; font-size:12px; font-family:inherit; cursor:pointer;
  transition:background .2s;
}
.rm-btn:hover { background:var(--surface-highest); color:var(--text); }

/* === MONATS-PEAK (Leistungspreis ab 2027) === */
.pc-empty { font-size:12px; color:var(--text-muted); text-align:center; padding:24px 0; }
.pc-plot { position:relative; height:130px; }
.pc-threshold {
  position:absolute; left:0; right:34px; z-index:2;
  border-top:1px dashed var(--text-muted);
  opacity:.7; pointer-events:none;
}
/* Marke liegt im reservierten Streifen rechts, damit sie weder einen Balken
   noch dessen Wert überdeckt. */
.pc-threshold-tag {
  position:absolute; right:-32px; top:-6px;
  font-size:9px; color:var(--text-muted);
}
.pc-bars {
  display:flex; align-items:flex-end; gap:6px; height:100%;
  padding-right:34px; position:relative; z-index:1;
}
.pc-col { flex:1; position:relative; height:100%; min-width:0; }
.pc-bar {
  position:absolute; bottom:0; left:0; right:0;
  background:var(--green); border-radius:3px 3px 0 0;
  transition:height .25s ease;
}
.pc-bar.is-over { background:var(--red); }
.pc-bar-none { height:3px; background:var(--border); }
.pc-val {
  position:absolute; left:0; right:0; text-align:center;
  font-size:10px; font-weight:600; font-variant-numeric:tabular-nums;
  color:var(--text-secondary); white-space:nowrap;
}
.pc-val.is-over { color:var(--red); }
.pc-val-none { bottom:7px; color:var(--text-muted); font-weight:400; }
.pc-label {
  position:absolute; bottom:-16px; left:0; right:0; text-align:center;
  font-size:10px; color:var(--text-muted);
}
.pc-note { font-size:10px; color:var(--text-muted); margin-top:24px; }
.peak-chart { padding-bottom:18px; }

/* Last charge card */
.last-charge {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--surface-shadow);
}
.lc-row { display:flex; justify-content:space-between; align-items:center; }
.lc-info { display:flex; align-items:center; gap:12px; }
.lc-icon {
  width:40px; height:40px; border-radius:10px;
  background:var(--primary-dim); display:flex; align-items:center; justify-content:center;
  color:var(--primary);
}
.lc-details .lc-title { font-weight:600; font-size:14px; }
.lc-details .lc-sub { font-size:11px; color:var(--text-secondary); margin-top:2px; }
.lc-cost { text-align:right; }
.lc-cost .amount { font-family:'Manrope'; font-weight:700; font-size:18px; }
.lc-cost .kwh { font-size:11px; color:var(--green); margin-top:2px; }
.lc-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.lc-meta .tag {
  flex:1 1 calc(50% - 4px); min-width:0;
  background:var(--surface-high); border-radius:8px; padding:8px 12px;
  font-size:10px; text-transform:uppercase; letter-spacing:0.5px;
}
.lc-meta .tag .tag-label { color:var(--text-secondary); }
.lc-meta .tag .tag-value { font-weight:600; margin-top:2px; font-size:12px; }

.empty-state {
  text-align:center; padding:48px 20px;
  color:var(--text-secondary); font-size:14px;
}
.empty-state .material-symbols-outlined { font-size:48px; opacity:0.3; display:block; margin-bottom:12px; }

/* Period selector */
.period-selector {
  display:flex; gap:4px; background:var(--surface); border-radius:10px;
  padding:3px; margin-bottom:20px; border:1px solid var(--border);
  box-shadow: var(--surface-shadow);
}
.period-btn {
  flex:1; padding:8px; border:none; border-radius:8px;
  font-family:'Inter'; font-size:12px; font-weight:600;
  background:none; color:var(--text-secondary); cursor:pointer;
  transition: all 0.2s;
}
.period-btn.active {
  background: rgba(193,95,60,0.14);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(193,95,60,0.18);
}

html[data-theme="dark"] .period-btn.active {
  background: var(--surface-highest);
  color: var(--text);
  box-shadow: none;
}

/* --- ADD CHARGE --- */
.page-title-area { padding: 24px 0 8px; }
.page-tag { font-size:11px; font-weight:700; color:var(--green); text-transform:uppercase; letter-spacing:2px; margin-bottom:6px; }
.page-title { font-family:'Manrope'; font-weight:800; font-size:32px; letter-spacing:-1px; }
.page-subtitle { font-size:13px; color:var(--text-secondary); margin-top:4px; }

.hero-input-group { margin:28px 0 20px; }
.hero-input-group label {
  display:block; font-size:10px; font-weight:600; text-transform:uppercase;
  letter-spacing:1.5px; color:var(--text-secondary); margin-bottom:6px;
}
.hero-input-row {
  display:flex; align-items:baseline; gap:8px;
  border-bottom:2px solid var(--surface-highest);
  border-bottom-color: var(--hero-input-line);
  padding-bottom:8px;
  transition: border-color 0.2s;
}
.hero-input-row:focus-within { border-color:var(--primary); }
.hero-input {
  background:none; border:none; outline:none;
  font-family:'Manrope'; font-weight:800; font-size:52px;
  color:var(--text); width:100%;
  -moz-appearance: textfield;
}
.hero-input::placeholder { color:var(--surface-highest); }
.hero-input::-webkit-outer-spin-button,
.hero-input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.hero-unit { font-family:'Manrope'; font-weight:700; font-size:22px; color:var(--primary); white-space:nowrap; }

.input-card {
  background:var(--surface);
  border-radius:var(--radius);
  border:1px solid var(--border);
  padding:16px;
  display:flex; align-items:center; gap:12px;
  margin-bottom:12px;
  transition: border-color 0.2s;
  box-shadow: var(--surface-shadow);
}
.input-card:focus-within { border-color:var(--border-focus); }
.input-card .ic-icon { color:var(--text-secondary); flex-shrink:0; }
.input-card input {
  background:none; border:none; outline:none;
  font-family:'Inter'; font-weight:500; font-size:16px;
  color:var(--text); width:100%;
  -moz-appearance: textfield;
}
.input-card input::placeholder { color:var(--text-muted); }
.input-card input::-webkit-outer-spin-button,
.input-card input::-webkit-inner-spin-button { -webkit-appearance:none; }
.input-card .ic-unit { font-size:12px; color:var(--text-secondary); font-weight:500; white-space:nowrap; }

.input-label {
  display:block; font-size:10px; font-weight:600; text-transform:uppercase;
  letter-spacing:1.5px; color:var(--text-secondary); margin:20px 0 8px;
}

/* Tariff info */
.tariff-info {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  margin: 20px 0;
  box-shadow: var(--surface-shadow);
}
.tariff-info summary {
  cursor:pointer; font-size:12px; font-weight:600; color:var(--text-secondary);
  display:flex; align-items:center; gap:8px; list-style:none;
}
.tariff-info summary::-webkit-details-marker { display:none; }
.tariff-info[open] summary .arrow { transform:rotate(90deg); }
.tariff-info .arrow { transition:transform 0.2s; font-size:16px; }
.tariff-detail { margin-top:12px; font-size:12px; color:var(--text-secondary); line-height:1.7; }
.tariff-detail .td-row { display:flex; justify-content:space-between; padding:4px 0; border-bottom:1px solid var(--border); }
.tariff-detail .td-row:last-child { border:none; }
.tariff-detail .td-label { }
.tariff-detail .td-value { font-weight:600; color:var(--text); font-variant-numeric:tabular-nums; }

/* Result card */
.result-card {
  background: linear-gradient(135deg, var(--surface-high), var(--surface));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  margin: 24px 0;
  box-shadow: var(--surface-shadow-strong);
}
.rc-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.rc-label { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:1.5px; color:var(--text-secondary); }
.rc-dot { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 8px rgba(52,208,88,0.5); }
.rc-amount { font-family:'Manrope'; font-weight:800; font-size:36px; }
.rc-amount .curr { color:var(--primary); font-size:24px; margin-left:2px; }
.rc-breakdown { margin-top:16px; padding-top:12px; border-top:1px solid var(--border); }
.rc-breakdown .rb-row { display:flex; justify-content:space-between; font-size:12px; color:var(--text-secondary); padding:3px 0; }
.rc-breakdown .rb-row .rb-val { color:var(--text); font-weight:500; font-variant-numeric:tabular-nums; }
.rc-breakdown .rb-total { color:var(--text) !important; font-weight:700 !important; margin-top:4px; padding-top:6px; border-top:1px solid var(--border); }
.rc-note { font-size:10px; color:var(--text-muted); margin-top:12px; line-height:1.5; }

/* Date input */
.date-input-wrap {
  margin: 12px 0;
}

/* Save button */
.btn-save {
  width:100%; padding:18px; border:none; border-radius:50px;
  background:var(--primary); color:#fff;
  font-family:'Manrope'; font-weight:700; font-size:16px;
  cursor:pointer; transition: all 0.2s;
  box-shadow: 0 6px 20px rgba(193,95,60,0.22);
  margin-top: 8px;
}
.btn-save:active { transform:scale(0.97); }
.btn-save:disabled { opacity:0.4; cursor:not-allowed; }

/* Toast */
.toast {
  position:fixed; top:80px; left:50%; transform:translateX(-50%) translateY(-20px);
  background:var(--green); color:#000; padding:12px 24px;
  border-radius:50px; font-weight:600; font-size:13px;
  opacity:0; transition: all 0.3s; z-index:200; pointer-events:none;
  box-shadow: 0 4px 20px rgba(52,208,88,0.3);
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* --- IMPORT --- */
.drop-zone {
  border:2px dashed rgba(193,95,60,0.3);
  border-radius:var(--radius);
  padding:40px 20px;
  text-align:center;
  background:var(--primary-dim);
  transition: all 0.3s;
  cursor:pointer;
  margin-bottom:20px;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color:var(--primary);
  background:rgba(193,95,60,0.12);
}
.drop-zone .dz-icon { font-size:40px; color:var(--primary); margin-bottom:12px; }
.drop-zone .dz-text { font-size:14px; color:var(--text-secondary); margin-bottom:16px; }
.drop-zone .dz-btn {
  display:inline-block; padding:10px 24px; border-radius:50px;
  background:var(--primary); color:#fff; font-weight:600; font-size:13px;
  border:none; cursor:pointer;
}
.drop-zone input[type="file"] { display:none; }

.import-result {
  background:var(--surface); border-radius:var(--radius);
  border:1px solid var(--border); padding:16px; margin:12px 0;
  box-shadow: var(--surface-shadow);
}
.ir-row { display:flex; justify-content:space-between; font-size:13px; padding:4px 0; }
.ir-row .ir-val { font-weight:600; color:var(--green); }

/* History list */
.history-item-wrap {
  position:relative; overflow:hidden;
  border-bottom:1px solid var(--border);
}
.history-item-wrap:last-child { border:none; }

/* Swipe delete background */
.hi-delete-bg {
  position:absolute; top:0; right:0; bottom:0; width:100px;
  background:var(--primary); display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:13px; font-weight:600; gap:4px;
  z-index:1;
}

.history-item {
  position:relative; z-index:2;
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 0;
  background:var(--bg);
  transition: transform 0.3s ease;
  touch-action: pan-y;
}
.history-item.swiped { transform:translateX(-100px); }
.history-item.deleting {
  transform:translateX(-120%);
  opacity:0;
  max-height:0;
  padding:0;
  transition: all 0.35s ease;
}

.hi-left { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.hi-dot { width:6px; height:6px; border-radius:50%; background:var(--primary); flex-shrink:0; }
.hi-date { font-size:12px; color:var(--text-secondary); }
.hi-kwh { font-size:14px; font-weight:600; }
.hi-right { text-align:right; flex-shrink:0; }
.hi-cost { font-family:'Manrope'; font-weight:700; font-size:15px; }
.hi-rate { font-size:11px; color:var(--text-secondary); }

.hi-actions { display:flex; gap:4px; margin-left:10px; flex-shrink:0; }
.hi-edit {
  background:var(--surface-high); border:none; color:var(--text-secondary); cursor:pointer;
  width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  transition: all 0.2s;
}
.hi-edit:hover { background:var(--surface-highest); color:var(--text); }
.hi-edit:active { transform:scale(0.9); }
.hi-del {
  background:var(--primary-dim); border:none; color:var(--primary); cursor:pointer;
  width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  transition: all 0.2s;
}
.hi-del:hover { background:var(--primary); color:#fff; }
.hi-del:active { transform:scale(0.9); }

/* „Alle N anzeigen“ unter der gekürzten Liste */
.history-more {
  width:100%; padding:12px; margin-top:8px; cursor:pointer;
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  color:var(--text-secondary); font-size:13px; font-family:'Inter'; font-weight:600;
  transition: all 0.2s;
}
.history-more:hover { border-color:var(--border-focus); color:var(--text); }
.history-more:active { transform:scale(0.98); }

/* Confirm delete modal */
.confirm-overlay {
  display:none; position:fixed; inset:0; background:var(--modal-scrim);
  z-index:400; align-items:center; justify-content:center;
  backdrop-filter:blur(6px);
}
.confirm-overlay.show { display:flex; }
.confirm-box {
  background:var(--surface-high); border-radius:20px;
  padding:28px 24px; max-width:320px; width:90%;
  text-align:center; animation: fadeUp 0.25s ease;
}
.confirm-box h4 { font-family:'Manrope'; font-weight:700; font-size:18px; margin-bottom:8px; }
.confirm-box p { font-size:13px; color:var(--text-secondary); margin-bottom:20px; line-height:1.5; }
.confirm-btns { display:flex; gap:10px; }
.confirm-btns button {
  flex:1; padding:14px; border:none; border-radius:12px;
  font-family:'Inter'; font-weight:600; font-size:14px; cursor:pointer;
  transition: all 0.15s;
}
.confirm-btns .btn-cancel { background:var(--surface-highest); color:var(--text); }
.confirm-btns .btn-cancel:hover { background:var(--surface); }
.confirm-btns .btn-confirm-del { background:var(--primary); color:#fff; }
.confirm-btns .btn-confirm-del:active { transform:scale(0.96); }

/* --- SETTINGS MODAL --- */
.modal-overlay {
  display:none; position:fixed; inset:0; background:var(--modal-scrim);
  z-index:300; align-items:flex-end; justify-content:center;
  backdrop-filter:blur(4px);
}
.modal-overlay.show { display:flex; }
.modal {
  background:var(--surface-high); border-radius:20px 20px 0 0;
  width:100%; max-width:480px; padding:24px 20px 40px;
  max-height:80vh; overflow-y:auto;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform:translateY(100%); }
  to { transform:translateY(0); }
}
.modal-handle { width:36px; height:4px; background:var(--text-muted); border-radius:2px; margin:0 auto 20px; }
.modal h3 { font-family:'Manrope'; font-weight:700; font-size:20px; margin-bottom:20px; }
.setting-row { display:flex; justify-content:space-between; align-items:center; padding:14px 0; border-bottom:1px solid var(--border); }
.setting-row:last-child { border:none; }
.setting-label { font-size:14px; }
.setting-label small { display:block; font-size:11px; color:var(--text-secondary); margin-top:2px; }
.setting-input input {
  background:var(--surface); border:1px solid var(--border); border-radius:8px;
  padding:8px 12px; color:var(--text); font-size:14px; width:100px; text-align:right;
  font-family:'Inter'; outline:none;
}
.setting-input input:focus { border-color:var(--border-focus); }
.setting-hint { font-size:11px; color:var(--text-secondary); line-height:1.45; margin:8px 0 4px; }
#tariff-history-list { display:flex; flex-direction:column; gap:8px; }
.tariff-row { display:flex; gap:6px; align-items:center; }
.tariff-row input {
  background:var(--surface); border:1px solid var(--border); border-radius:8px;
  padding:8px 10px; color:var(--text); font-size:13px; font-family:'Inter'; outline:none; min-width:0;
}
.tariff-row input:focus { border-color:var(--border-focus); }
.tariff-row .th-label { flex:1 1 auto; }
.tariff-row .th-from { flex:0 0 auto; width:130px; }
.tariff-row .th-energy { flex:0 0 auto; width:92px; text-align:right; }
.tariff-row .th-del {
  flex:0 0 auto; width:30px; height:30px; border:none; border-radius:8px; cursor:pointer;
  background:rgba(232,25,34,0.1); color:var(--primary); font-size:13px; line-height:1;
}
.tariff-empty { font-size:12px; color:var(--text-secondary); padding:4px 0; }
.tariff-add-btn {
  width:100%; padding:10px; margin-top:8px; cursor:pointer;
  background:var(--surface); border:1px dashed var(--border); border-radius:8px;
  color:var(--text-secondary); font-size:13px; font-family:'Inter'; font-weight:500;
}
.tariff-add-btn:hover { border-color:var(--border-focus); color:var(--text); }
.btn-danger {
  width:100%; padding:14px; border:none; border-radius:12px;
  background:rgba(232,25,34,0.1); color:var(--primary);
  font-weight:600; font-size:14px; cursor:pointer; margin-top:16px;
  transition:background 0.2s;
}
.btn-danger:hover { background:rgba(232,25,34,0.2); }

/* --- BOTTOM NAV --- */
nav {
  position:fixed; bottom:0; left:0; right:0; z-index:100;
  display:flex; justify-content:space-around; align-items:center;
  height:var(--nav-height);
  background:var(--nav-bg);
  backdrop-filter:blur(24px);
  -webkit-backdrop-filter:blur(24px);
  border-top:1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
  display:flex; flex-direction:column; align-items:center; gap:3px;
  color:var(--text-muted); text-decoration:none;
  font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px;
  cursor:pointer; padding:8px 16px;
  transition: color 0.2s; background:none; border:none;
  font-family:'Inter';
}
.nav-item.active { color:var(--primary); }
.nav-item.active .material-symbols-outlined { font-variation-settings: 'FILL' 1, 'wght' 400; }


/* Login screen */
.login-screen {
  position:fixed; inset:0; z-index:500;
  background:var(--bg);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:40px 24px; text-align:center;
}
.login-screen.hidden { display:none; }
.login-logo { font-size:64px; margin-bottom:16px; }
.login-title { font-family:'Manrope'; font-weight:800; font-size:32px; color:var(--primary); margin-bottom:8px; }
.login-sub { font-size:14px; color:var(--text-secondary); margin-bottom:40px; line-height:1.6; max-width:300px; }
.btn-google {
  display:flex; align-items:center; gap:12px;
  padding:16px 32px; border-radius:50px;
  background:#fff; color:#333; border:none;
  font-family:'Inter'; font-weight:600; font-size:15px;
  cursor:pointer; transition:all 0.2s;
  box-shadow: var(--google-shadow);
}
.btn-google:hover { transform:scale(1.02); box-shadow: 0 6px 20px rgba(49,38,29,0.18); }
.btn-google:active { transform:scale(0.98); }
.btn-google svg { width:20px; height:20px; }
.login-skip {
  margin-top:20px; background:none; border:none;
  color:var(--text-muted); font-size:13px; cursor:pointer;
  text-decoration:underline; font-family:'Inter';
}
.login-skip:hover { color:var(--text-secondary); }

/* Sync indicator */
.sync-badge {
  display:flex; align-items:center; gap:6px;
  font-size:10px; font-weight:600; text-transform:uppercase;
  letter-spacing:0.5px; color:var(--text-muted);
  padding:4px 10px; border-radius:20px;
  background:var(--surface); border:1px solid var(--border);
}
.sync-badge .sync-dot {
  width:6px; height:6px; border-radius:50%;
  background:var(--text-muted);
}
.sync-badge.online .sync-dot { background:var(--green); box-shadow:0 0 6px rgba(52,208,88,0.5); }
.sync-badge.syncing .sync-dot { background:var(--amber); animation: pulse 1s infinite; }
.sync-badge.offline .sync-dot { background:var(--text-muted); }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* User avatar in header */
.header-right { display:flex; align-items:center; gap:8px; }
.user-avatar {
  width:28px; height:28px; border-radius:50%;
  border:2px solid var(--border);
  cursor:pointer;
}

/* Import preview */
.import-preview {
  background:var(--surface);
  border-radius:var(--radius);
  border:1px solid var(--border);
  padding:20px;
  margin:16px 0;
  animation: fadeUp 0.3s ease;
  box-shadow: var(--surface-shadow);
}
.ip-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.ip-title { font-family:'Manrope'; font-weight:700; font-size:16px; }
.ip-count { font-size:12px; color:var(--green); font-weight:600; }
.ip-entry {
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 0; border-bottom:1px solid var(--border);
  font-size:13px;
}
.ip-entry:last-child { border:none; }
.ip-entry .ip-date { color:var(--text-secondary); }
.ip-entry .ip-kwh { font-weight:600; font-variant-numeric:tabular-nums; }
.ip-more { font-size:11px; color:var(--text-muted); padding:8px 0; text-align:center; }
.ip-summary {
  margin-top:12px; padding-top:12px; border-top:1px solid var(--border);
  display:flex; justify-content:space-around; text-align:center;
}
.ip-summary .ip-stat-val { font-family:'Manrope'; font-weight:700; font-size:18px; }
.ip-summary .ip-stat-label { font-size:10px; color:var(--text-secondary); text-transform:uppercase; letter-spacing:1px; margin-top:2px; }
.ip-buttons { display:flex; gap:10px; margin-top:16px; }
.ip-buttons button {
  flex:1; padding:14px; border:none; border-radius:12px;
  font-family:'Inter'; font-weight:600; font-size:14px; cursor:pointer;
  transition: all 0.15s;
}
.ip-btn-cancel { background:var(--surface-highest); color:var(--text); }
.ip-btn-import { background:var(--green); color:#000; }
.ip-btn-import:active { transform:scale(0.97); }

/* Insight card */
.insight-card {
  background:var(--surface);
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  padding:14px 16px;
  margin-bottom:16px;
  font-size:13px;
  line-height:1.5;
  color:var(--text-secondary);
  display:flex; align-items:flex-start; gap:10px;
  box-shadow: var(--surface-shadow);
}
.insight-card .insight-icon { font-size:18px; flex-shrink:0; margin-top:1px; }
.insight-card .insight-text { flex:1; }
.insight-card .insight-highlight { color:var(--text); font-weight:600; }
.theme-switch {
  position: relative;
  width: 52px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.theme-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.theme-slider {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-highest);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.theme-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: transform 0.2s ease;
}
.theme-switch input:checked + .theme-slider::after {
  transform: translateX(22px);
}
.theme-switch input:focus-visible + .theme-slider {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.theme-switch-header {
  width: 46px;
  height: 28px;
}

.theme-switch-header .theme-slider {
  width: 46px;
  height: 28px;
}

.theme-switch-header .theme-slider::after {
  width: 20px;
  height: 20px;
}

.theme-switch-header input:checked + .theme-slider::after {
  transform: translateX(18px);
}

/* === SAVINGS COMPARISON === */
.savings-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.savings-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.sc-disabled {
  opacity: 0.55;
}
.sc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
}
.sc-icon { font-size: 18px; }
.sc-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.sc-val { font-variant-numeric: tabular-nums; }
.sc-divider {
  border-top: 1px solid var(--border);
  margin: 8px 0;
}
.sc-saving {
  font-weight: 600;
  font-size: 14px;
  color: var(--green);
}
.sc-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.3;
}
.sc-abo {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.sc-abo-total {
  font-weight: 600;
  font-size: 13px;
  color: var(--green);
  border-top: none;
  margin-top: 2px;
  padding-top: 0;
}
.settings-section-title {
  padding: 4px 0 8px;
}

/* Saving Chip in lc-meta */
.saving-chip .tag-label { color: var(--green); }
.saving-chip .tag-value { font-weight: 600; }

/* Saving in History-Liste */
.hi-saving {
  font-size: 11px;
  color: var(--green);
  margin-top: 1px;
}

/* Clickable history items */
.history-item { cursor: pointer; }
.history-item:active { opacity: 0.75; }

/* === DETAIL PAGE === */
.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0 4px;
}
.detail-back {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  box-shadow: var(--surface-shadow);
}
.detail-back:hover { background: var(--surface-high); }
.detail-back:active { transform: scale(0.9); }
.detail-del { color: var(--primary); }
.detail-title {
  font-family: 'Manrope';
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.5px;
}
.detail-snap-badge {
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
  background: rgba(22,163,74,0.1);
  border-radius: 6px;
  padding: 3px 8px;
}

/* === MONTHLY STATS === */
.month-stats-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--surface-shadow);
}
.month-stat-block:last-child .month-stat-row { border-bottom: none; }
.month-stat-block.is-open .month-stat-row { border-bottom: none; }
.month-stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.month-stat-row:last-child { border-bottom: none; }
.month-stat-row:hover { background: var(--bg); }
.month-stat-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.msr-chevron {
  font-size: 11px; color: var(--text-muted); width: 10px; flex-shrink: 0;
}

/* Einzelladungen eines Monats (aufgeklappt) */
.month-detail {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 4px 16px 8px 38px;
}
.month-stat-block:last-child .month-detail { border-bottom: none; }
.md-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.md-row + .md-row { border-top: 1px solid var(--border); }
/* Antippen öffnet die Detailseite (Bearbeiten/Löschen) */
.md-row { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.md-row:hover .md-date, .md-row:hover .md-cost { color: var(--text); }
.md-row:active { opacity: 0.6; }
.md-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.md-date { flex: 1; min-width: 0; color: var(--text-secondary); white-space: nowrap; }
.md-kwh { color: var(--text-secondary); white-space: nowrap; }
.md-peak { color: var(--text-muted); white-space: nowrap; min-width: 62px; text-align: right; }
.md-cost { font-weight: 600; white-space: nowrap; min-width: 58px; text-align: right; }
.md-foot {
  margin-top: 6px; padding-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted);
}
.msr-left { flex: 1; min-width: 0; }
.msr-month { font-size: 14px; font-weight: 600; }
.msr-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.msr-mid {
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.msr-unit { font-size: 11px; }
.msr-right { text-align: right; flex-shrink: 0; }
.msr-cost { font-family: 'Manrope'; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.msr-avg { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* === GO-E LIVE STATUS === */
.live-status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--surface-shadow);
}
.live-status-card.ls-charging {
  border-color: rgba(52, 208, 88, 0.3);
  background: linear-gradient(135deg, rgba(52,208,88,0.06), var(--surface));
}
.live-status-card.ls-done {
  border-color: rgba(52, 208, 88, 0.2);
}
.live-status-card.ls-waiting {
  border-color: rgba(193, 95, 60, 0.2);
}
.ls-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ls-icon { font-size: 22px; flex-shrink: 0; }
.ls-label { font-size: 14px; font-weight: 600; }
.ls-updated { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.ls-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52,208,88,0.4);
  animation: ls-ping 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ls-ping {
  0%   { box-shadow: 0 0 0 0 rgba(52,208,88,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(52,208,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,208,88,0); }
}
.ls-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ls-stats {
  display: flex;
  gap: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ls-stat {
  flex: 1;
  text-align: center;
}
.ls-stat + .ls-stat {
  border-left: 1px solid var(--border);
}
.ls-stat-val {
  font-family: 'Manrope';
  font-weight: 700;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.ls-stat-unit { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.ls-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* === AMORTISATION === */
.amort-bar-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 8px;
  margin: 10px 0;
}
.amort-bar-fill {
  background: var(--green);
  border-radius: 99px;
  height: 8px;
  transition: width 0.6s ease;
}

/* --- TRIP-REPORTS --- */
/* Durchgehend Bestands-Tokens: --primary/--green/--surface/--radius,
   Manrope für Zahlen, Inter für Fliesstext. Der Trip-Report soll wie ein
   Teil des Ladefuchs aussehen, nicht wie ein zweites Produkt. */

.trip-list { display:flex; flex-direction:column; gap:10px; margin-top:16px; }
.trip-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px; cursor:pointer; transition:border-color .2s, transform .1s;
  box-shadow:var(--surface-shadow);
}
.trip-card:hover { border-color:var(--border-focus); }
.trip-card:active { transform:scale(0.99); }
.trip-card:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.tc-head { display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.tc-title { font-family:'Manrope'; font-weight:700; font-size:17px; letter-spacing:-0.3px; }
.tc-cost { font-family:'Manrope'; font-weight:700; font-size:17px; color:var(--primary); white-space:nowrap; }
.tc-sub { font-size:12px; color:var(--text-secondary); margin-top:2px; }
.tc-stats {
  display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:10px;
  font-size:12px; color:var(--text-secondary); font-variant-numeric:tabular-nums;
}
.tc-warn { margin-top:8px; font-size:11px; color:var(--amber); }

.trip-hero {
  background:var(--surface-highest); border:1px solid var(--border);
  border-radius:var(--radius); padding:20px 18px; margin-top:4px;
  box-shadow:var(--surface-shadow);
}
.th-eyebrow {
  font-size:10px; font-weight:700; letter-spacing:1.6px; text-transform:uppercase;
  color:var(--green); margin-bottom:8px;
}
.th-route { font-family:'Manrope'; font-weight:800; font-size:28px; line-height:1.1; letter-spacing:-1px; }
.th-meta {
  margin-top:10px; display:flex; flex-wrap:wrap; gap:4px 14px;
  font-size:12px; color:var(--text-secondary);
}
.th-meta b { color:var(--text); font-weight:600; }

.trip-stats { margin-top:14px; grid-template-columns:repeat(3,1fr); }
.trip-stats .stat-value { font-size:18px; }
.trip-stats .stat-unit { font-size:11px; }

.trip-warnings { display:flex; flex-direction:column; gap:8px; margin-top:16px; }
.trip-warn {
  display:flex; gap:9px; align-items:flex-start; padding:11px 13px;
  border-radius:var(--radius-sm); font-size:12.5px; line-height:1.5;
}
.trip-warn.is-warn { background:rgba(240,180,41,0.12); border:1px solid rgba(240,180,41,0.3); color:var(--text); }
.trip-warn.is-info { background:var(--surface); border:1px solid var(--border); color:var(--text-secondary); }

.trip-card-plain {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); overflow:hidden; box-shadow:var(--surface-shadow);
}
.trip-row {
  display:flex; justify-content:space-between; gap:12px;
  padding:13px 15px; border-bottom:1px solid var(--border);
}
.trip-row:last-child { border-bottom:0; }
/* Heimladung farblich abgesetzt – sie ist der billigste Strom der Tour und
   soll auf einen Blick als solche erkennbar sein. */
.trip-row.is-home { background:var(--green-dim); }
.tr-left { min-width:0; flex:1; }
.tr-name { font-weight:600; font-size:14px; line-height:1.35; }
.tr-meta { font-size:11.5px; color:var(--text-secondary); margin-top:3px; font-variant-numeric:tabular-nums; }
.tr-tag {
  display:inline-block; font-size:9px; font-weight:700; letter-spacing:0.4px;
  text-transform:uppercase; padding:2px 6px; border-radius:5px; margin-left:6px;
  background:var(--surface-highest); color:var(--text-secondary); vertical-align:middle;
}
.tr-tag.is-est { background:rgba(240,180,41,0.18); color:var(--amber); }
.tr-tag.is-warn { background:var(--red-dim); color:var(--red); }
.tr-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; align-items:center; }
.tr-leg {
  font-family:'Inter'; font-size:11px; padding:4px 6px; border-radius:6px;
  border:1px solid var(--border); background:var(--surface-high); color:var(--text); cursor:pointer;
}
.tr-btn {
  font-family:'Inter'; font-size:11px; padding:4px 8px; border-radius:6px; cursor:pointer;
  border:1px solid var(--border); background:var(--surface-high); color:var(--text-secondary);
}
.tr-btn:hover { color:var(--text); border-color:var(--border-focus); }
.tr-btn.is-del:hover { color:var(--red); border-color:var(--red); }
.tr-right { text-align:right; flex-shrink:0; }
.tr-amount { font-family:'Manrope'; font-weight:700; font-size:15px; font-variant-numeric:tabular-nums; }
.tr-rate { font-size:11px; color:var(--text-muted); margin-top:2px; font-variant-numeric:tabular-nums; }

.trip-total {
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 15px; background:var(--green-dim); font-weight:700; font-size:13.5px;
}
.trip-total .tt-val { font-family:'Manrope'; font-size:16px; color:var(--green); }
.trip-note { font-size:12px; color:var(--text-secondary); line-height:1.5; margin:10px 2px 0; }

.trip-legs { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; }
.leg-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:14px; box-shadow:var(--surface-shadow);
}
.lg-title { font-size:10px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:var(--text-secondary); }
.lg-value { font-family:'Manrope'; font-weight:700; font-size:20px; margin-top:5px; }
.lg-sub { font-size:11.5px; color:var(--text-secondary); margin-top:3px; font-variant-numeric:tabular-nums; }

.trip-compare { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.cmp-card { border-radius:var(--radius-sm); padding:14px; border:1px solid var(--border); }
.cmp-card.is-ev { background:var(--green-dim); border-color:rgba(52,208,88,0.28); }
.cmp-card.is-fuel { background:var(--red-dim); border-color:rgba(192,57,43,0.25); }
.cc-head { display:flex; align-items:center; gap:6px; font-weight:700; font-size:12.5px; margin-bottom:8px; }
.cc-dot { width:8px; height:8px; border-radius:50%; background:var(--green); flex-shrink:0; }
.cmp-card.is-fuel .cc-dot { background:var(--red); }
.cc-big { font-family:'Manrope'; font-weight:800; font-size:22px; letter-spacing:-0.6px; color:var(--green); }
.cmp-card.is-fuel .cc-big { color:var(--red); }
.cc-sub { font-size:11px; color:var(--text-secondary); margin-top:4px; line-height:1.45; }

.trip-saving {
  margin-top:11px; text-align:center; background:var(--surface-highest);
  border:1px solid var(--border); border-radius:var(--radius); padding:16px;
  box-shadow:var(--surface-shadow);
}
.ts-label { font-size:10px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--green); }
.ts-amount { font-family:'Manrope'; font-weight:800; font-size:26px; margin-top:6px; letter-spacing:-0.8px; }
.ts-note { font-size:11.5px; color:var(--text-secondary); margin-top:4px; }

.home-pick {
  display:flex; align-items:center; gap:11px; padding:12px 15px;
  border-bottom:1px solid var(--border); cursor:pointer;
}
.home-pick:last-child { border-bottom:0; }
.home-pick input { width:18px; height:18px; accent-color:var(--green); flex-shrink:0; cursor:pointer; }
.hp-main { min-width:0; }
.hp-date { display:block; font-size:13px; font-weight:600; }
.hp-meta { display:block; font-size:11.5px; color:var(--text-secondary); margin-top:2px; font-variant-numeric:tabular-nums; }

#trip-drop-zone { margin-top:0; }

@media (max-width:380px) {
  .trip-compare { grid-template-columns:1fr; }
  .trip-stats { grid-template-columns:1fr 1fr; }
}

/* --- SAMMELRECHNUNG AUFTEILEN --- */
.split-row { display:flex; gap:6px; align-items:center; margin-bottom:6px; }
.split-row input {
  font-family:'Inter'; font-size:13px; padding:9px 10px; border-radius:8px;
  border:1px solid var(--border); background:var(--surface-high); color:var(--text); min-width:0;
}
.split-row input:focus { border-color:var(--border-focus); outline:none; }
.split-row .sp-date { flex:0 0 auto; width:132px; }
.split-row .sp-loc { flex:1 1 auto; }
.split-row .sp-amount { flex:0 0 auto; width:84px; text-align:right; font-variant-numeric:tabular-nums; }
.split-row .sp-del {
  flex:0 0 auto; width:32px; height:32px; border:none; border-radius:8px; cursor:pointer;
  background:var(--surface-highest); color:var(--text-secondary); font-size:16px; line-height:1;
}
.split-row .sp-del:hover { background:var(--red-dim); color:var(--red); }
.split-kwh {
  font-size:11px; color:var(--text-muted); text-align:right;
  margin:-3px 40px 8px 0; font-variant-numeric:tabular-nums;
}
.split-check {
  margin-top:14px; padding:12px 14px; border-radius:var(--radius-sm);
  font-size:12.5px; line-height:1.5; border:1px solid var(--border); background:var(--surface);
}
.split-check.is-complete { background:var(--green-dim); border-color:rgba(52,208,88,0.3); }
.split-check.is-partial { background:rgba(240,180,41,0.12); border-color:rgba(240,180,41,0.3); }
.split-check.is-over { background:var(--red-dim); border-color:rgba(192,57,43,0.3); }
.split-check b { font-variant-numeric:tabular-nums; }

/* --- UNERKANNTE DATEIEN --- */
.unrec-list { margin-top:10px; display:flex; flex-direction:column; gap:8px; }
.unrec-item {
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:11px 13px; border-radius:var(--radius-sm);
  background:rgba(240,180,41,0.1); border:1px solid rgba(240,180,41,0.28);
}
.unrec-main { min-width:0; }
.unrec-name { font-size:13px; font-weight:600; word-break:break-all; }
.unrec-reason { font-size:11.5px; color:var(--text-secondary); margin-top:2px; line-height:1.4; }

/* --- TRIPS IM VERGLEICH (§9) --- */
/* Zwei getrennte Diagramme statt einer zweiten Y-Achse: Verbrauch und Preis
   haben nichts miteinander zu tun, eine gemeinsame Skala würde eine
   Beziehung suggerieren, die es nicht gibt. Je Diagramm eine Datenreihe –
   deshalb keine Legende, der Titel benennt sie. */
.tcmp-block { margin-bottom: 22px; }
.tcmp-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:12px; }
.tcmp-title { font-size:13px; font-weight:600; }
.tcmp-sub { font-size:11px; color:var(--text-secondary); font-variant-numeric:tabular-nums; }
.tcmp-plot { height:112px; }
.tcmp-bars { display:flex; align-items:flex-end; gap:8px; height:100%; }
.tcmp-col { flex:1; position:relative; height:100%; min-width:0; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; }
/* Schmale Marken: bei drei Trips würde ein Balken über die volle Spalte
   sonst 120 px breit und wirkt wie eine Fläche, nicht wie ein Messwert. */
.tcmp-bar {
  background:var(--primary); border-radius:4px 4px 0 0;
  width:100%; max-width:52px; transition:height .25s ease;
}
.tcmp-bar-none { height:3px; background:var(--border); border-radius:2px; width:100%; max-width:52px; }
.tcmp-val {
  font-size:11px; font-weight:600; text-align:center; margin-bottom:5px;
  font-variant-numeric:tabular-nums; color:var(--text);
}
.tcmp-val.is-none { color:var(--text-muted); font-weight:400; }
.tcmp-labels { display:flex; gap:8px; margin-top:7px; }
.tcmp-label {
  flex:1; min-width:0; text-align:center; font-size:10px; line-height:1.35;
  color:var(--text-secondary); overflow:hidden;
}
.tcmp-name-short {
  display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.tcmp-date { display:block; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.tcmp-unit { font-size:10px; color:var(--text-muted); text-align:right; margin-top:6px; }

.tcmp-table {
  margin-top:6px; border:1px solid var(--border); border-radius:var(--radius-sm);
  overflow:hidden; background:var(--surface);
}
.tcmp-row {
  display:grid; grid-template-columns:1.5fr repeat(5,1fr); gap:6px;
  padding:9px 11px; font-size:11.5px; font-variant-numeric:tabular-nums;
  border-bottom:1px solid var(--border); text-align:right;
}
.tcmp-row:last-child { border-bottom:0; }
.tcmp-row.is-head { font-weight:600; color:var(--text-secondary); font-size:10px; text-transform:uppercase; letter-spacing:0.4px; }
.tcmp-name { text-align:left; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
