/* ==========================================================================
   1. Globale Variablen & CSS-Reset
   ========================================================================== */
:root {
  --primary: #0056b3;
  --accent: #0056b3;
  --danger: #dc2626;
  --success: #16a34a;
  --good: #47c47a;
  --mid: #ffb347;
  --bad: #dc2626;
  --radius: 14px;
  --card-radius: 14px;
  --maxw: 900px;
  
  --input-bg-light: #f8f9fa;
  --input-text-light: #212529;
  --input-bg-dark: #343a40;
  --input-text-dark: #f8f9fa;
  --muted-light: rgba(33, 37, 41, 0.65);
  --muted-dark: rgba(248, 249, 250, 0.70);
  --border-light: rgba(0, 0, 0, 0.15);
  --border-dark: rgba(255, 255, 255, 0.15);
  --card-border-light: rgba(0, 0, 0, 0.08);
  --card-border-dark: rgba(255, 255, 255, 0.08);
  --table-th-light: rgba(0, 0, 0, 0.03);
  --table-th-dark: rgba(255, 255, 255, 0.04);
  --soft-bg-light: rgba(0, 0, 0, 0.04);
  --soft-bg-dark: rgba(255, 255, 255, 0.06);
  --footer-bg: #a4a4a4;
  --footer-text: #000;

  --tooltip-bg: rgba(0, 0, 0, 0.82);
  --tooltip-text: #fff;
  --tooltip-border: rgba(255, 255, 255, 0.18);
  
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html.theme-light {
  --bg: #ffffff;
  --text: #172033;
  --muted: #4b5563;
  --border: #cbd5e1;
  --card: #f6f7fb;

  --card-border: var(--card-border-light);
  --table-th-bg: var(--table-th-light);
  --input-bg: var(--input-bg-light);
  --input-text: var(--input-text-light);
  --soft-bg: var(--soft-bg-light);
}

html.theme-light .saving-hint-title,
html.theme-light .saving-hint strong {
  color: #166534;
}

.comparison-group {
  flex: 1 1 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}


html.theme-dark {
  --bg: #212529;
  --text: #f8f9fa;
  --muted: var(--muted-dark);
  --border: var(--border-dark);
  --card: #111a2e;
  --card-border: var(--card-border-dark);
  --table-th-bg: var(--table-th-dark);
  --input-bg: var(--input-bg-dark);
  --input-text: var(--input-text-dark);
  --soft-bg: var(--soft-bg-dark);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  padding: 20px 14px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. Layout & Typografie (Standard-Strukturen)
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* Erlaubt breiteres Layout für Schraubenrechner */
.container-wide {
  max-width: 1100px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

h1 {
  margin: 0;
  font-size: 1.35rem;
}

.sub {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.98rem;
}

hr {
  margin: 14px 0;
  border: 0;
  border-top: 1px solid var(--card-border-light);
}

html.theme-dark hr {
  border-top-color: var(--card-border-dark);
}

/* Grid-Systeme */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media(min-width: 900px) {
  .grid { grid-template-columns: 1fr 340px; }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* Component: Cards */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 16px;
  margin-bottom: 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.card-title {
  font-weight: 900;
  margin: 0 0 10px;
}

/* ==========================================================================
   3. Formulare & Bedienelemente
   ========================================================================== */
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 2px;
  align-items: flex-end;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  flex: 1 1 180px;
  min-width: 180px;
}

.smallField {
  flex: 0 0 140px;
  min-width: 140px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

input, select {
  height: 38px;
}

input[type="range"] {
  height: auto;
  padding: 0;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(0, 86, 179, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

/* Spinner für Zahlenfelder entfernen */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

/* Buttons & Navigation */
button, .btn-primary {
  padding: 10px 16px;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  outline: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  height: 38px;
  transition: all 0.2s;
}

button:hover, .btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

button:active, .btn-primary:active {
  transform: translateY(1px);
}

.btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(0,0,0,0.02);
}

html.theme-dark .btn-secondary:hover {
  background: rgba(255,255,255,0.04);
}

.btn-danger {
  padding: 4px 8px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

.btn-danger:hover {
  opacity: 0.9;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  gap: 10px;
  align-items: center;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  font-size: 1.2rem;
  transition: all 0.2s;
}

.back-btn:hover {
  background: var(--input-bg);
  border-color: var(--primary);
}

/* Radio- & Checkbox-Spezialstrukturen */
.radioGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.radioOption {
  flex: 1 1 200px;
  margin: 0;
  padding: 10px 12px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.radioOption input {
  width: auto;
  height: auto;
  margin-right: 7px;
  accent-color: var(--primary);
}

.checkRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  cursor: pointer;
}

.checkRow input {
  width: auto;
  height: auto;
  accent-color: var(--primary);
}

/* Theme Switcher Toggle */
.modeSwitchWrap {
  display: flex;
  justify-content: flex-end;
}

.form-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-check-input {
  display: none;
}

.form-check-label {
  width: 42px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.0);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-check-label:before {
  font-size: 1.05rem;
  content: "\2600";
  color: #fbbf24;
}

html.theme-dark .form-check-label:before {
  content: "\1F319";
  color: var(--text);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  justify-content: flex-start;
}

.tab {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--muted);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  height: 38px;
  display: flex;
  align-items: center;
}

.tab[aria-selected="true"] {
  border-color: rgba(0, 86, 179, 0.6);
  background: rgba(0, 86, 179, 0.14);
  color: var(--accent);
}

/* ==========================================================================
   4. Tabellen & Auswertungen
   ========================================================================== */
.table-wrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-width: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  min-width: 0;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--table-th-bg);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

tr:last-child td {
  border-bottom: none;
}

td:first-child, th:first-child {
  width: auto;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

td {
  color: var(--text);
}

/* Tabellen-Zentrierung für Spritrechner */
.table-center th, .table-center td {
  text-align: center;
}

/* ==========================================================================
   5. Ausgabeboxen, KPIs & Ergebnisse
   ========================================================================== */
.resultBox {
  margin-top: 12px;
  padding: 14px;
  background: linear-gradient(90deg, rgba(0, 86, 179, 0.10), transparent);
  border: 1px solid rgba(0, 86, 179, 0.18);
  border-radius: 10px;
}

.resultRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 7px 0;
  line-height: 1.4;
}

.resultRow span:last-child {
  text-align: right;
  font-weight: 700;
}

.totalRow {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
}

.kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 10px;
}

@media (min-width: 700px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

.kpi {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.kpi .label {
  margin: 0;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi .value {
  margin-top: 6px;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
}

.kpi .small, .kpiMeta, .metaLine, .actions-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 700;
}

.big {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .2px;
}

.muted {
  color: var(--muted);
  font-size: .95rem;
}

.error {
  min-height: 20px;
  margin-top: 6px;
  color: var(--danger);
  font-weight: 800;
  font-size: .9rem;
}

.error-right {
  margin-left: auto;
}

.details {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: .9rem;
}

html.theme-dark .details {
  background: rgba(255, 255, 255, 0.06);
}

.output {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--input-bg);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 1rem;
  word-break: break-all;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Farbige Statuszustände */
.expense { color: var(--danger); }
.netto { color: var(--success); }
.burden { color: #7c3aed; font-weight: 800; }
.cheaper { color: var(--success); }
.expensive { color: var(--danger); }
.status { font-weight: 900; }
.badText { color: var(--danger); }
.midText { color: #d97706; }
.goodText { color: var(--good); }

.card.bad { border-color: rgba(220, 38, 38, 0.55); }
.card.mid { border-color: rgba(255, 179, 71, 0.65); }
.card.good { border-color: rgba(71, 196, 122, 0.65); }

/* Informationstexte & Guides */
.guideTitle {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 600;
}

.guideLine {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
}

.explain {
  background: rgba(0, 86, 179, 0.06);
  border-left: 4px solid rgba(0, 86, 179, 0.45);
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 10px;
}

.tips {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.notice {
  margin-top: 12px;
  padding: 10px;
  color: var(--muted);
  background: var(--soft-bg);
  border-radius: 8px;
  font-size: .85rem;
  line-height: 1.4;
}

/* Hidden Utility */
.hidden {
  display: none !important;
}

/* ==========================================================================
   6. App-Spezifische Anpassungen & Listenstrukturen
   ========================================================================== */

/* --- Übersicht (Menü) --- */
.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform .08s ease, box-shadow .08s ease, background-color .2s ease, border-color .2s ease;
}

.item:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  background: rgba(0, 86, 179, 0.06);
  border-color: rgba(0, 86, 179, 0.35);
}

.item:active { transform: translateY(1px); }

.icon {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}

html.theme-dark .icon { background: rgba(255, 255, 255, 0.03); }
.title { flex: 1; font-weight: 700; font-size: 15px; }
.chev { color: var(--muted); font-size: 18px; font-weight: 800; }
.spacer { height: 28px; }

/* --- Budgetplaner --- */
.ausgabenTable, .bmiTable, .taxTable {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.ausgabenTableRow, .bmiRowSmall, .taxRow {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  color: var(--muted);
  background: var(--soft-bg);
  border-radius: 8px;
  font-size: 13px;
}

.ausgabe-item {
  background: var(--soft-bg);
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  font-size: 13px;
}

.ausgabe-category { font-weight: 600; color: var(--text); }
.ausgabe-comment { color: var(--muted); font-size: 13px; margin-top: 4px; }
.ausgabe-amount { font-weight: 800; color: var(--primary); text-align: right; }

/* --- BMI Rechner --- */
.bmiRow, .statRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}

/* --- Schraubenrechner --- */
td.grade-selected {
  color: var(--text);
  background: linear-gradient(90deg, rgba(0, 86, 179, 0.10), rgba(0, 86, 179, 0.03));
  outline: 1px solid rgba(0, 86, 179, 0.18);
  outline-offset: -1px;
}

html.theme-dark td.grade-selected {
  background: linear-gradient(90deg, rgba(0, 86, 179, 0.22), rgba(0, 86, 179, 0.05));
  outline: 1px solid rgba(0, 86, 179, 0.45);
}

.calc-label-wrap { display: flex; align-items: center; gap: 8px; }

/* --- Spritrechner --- */
.sustainability-symbol { font-size: 1.2rem; vertical-align: middle; }

.helpTip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 86, 179, 0.45);
  background: rgba(0, 86, 179, 0.10);
  color: var(--accent);
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  cursor: help;
  position: relative;
  flex: 0 0 auto;
}


.fuelTipMeta { margin-top: 6px; color: var(--muted); font-weight: 700; font-size: 0.9rem; line-height: 1.35; }

/* --- Passwort Generator --- */
.meter {
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

html.theme-dark .meter { background: rgba(255, 255, 255, 0.06); }

.meter > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f45, #ffb347);
  width: 8%;
  transition: width .25s ease, background-color .2s ease;
}

.row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .row-grid { grid-template-columns: 1fr; } }

/* --- Stoppuhr --- */
.inputs-wrap { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }

@media (min-width: 700px) {
  .inputs-wrap .inputs-row { flex-wrap: nowrap; }
}

.inp-box { position: relative; }

.unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  pointer-events: none;
}

.unitInput {
  padding-right: 70px !important;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.stepperRow {
  position: absolute;
  top: 50%;
  right: 36px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
}

.stepBtn {
  width: 22px; height: 16px; border-radius: 6px; background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.14); display: flex; align-items: center;
  justify-content: center; line-height: 1; font-weight: 900; font-size: 11px;
  color: rgba(0, 0, 0, 0.55); cursor: pointer; touch-action: manipulation; padding: 0;
}

.stepBtn:active { transform: translateY(1px); }

html.theme-dark .stepBtn {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.02);
}

.headerLine { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ring-wrap { display: flex; align-items: center; justify-content: center; gap: 12px; }

.ring {
  width: 74px; height: 74px; border-radius: 999px; display: grid; place-items: center;
  color: var(--accent); font-weight: 800; background: conic-gradient(var(--accent) 0deg, #eef2f6 0deg);
  box-shadow: 0 3px 10px rgba(2, 6, 23, 0.06); position: relative;
}

html.theme-dark .ring { background: conic-gradient(var(--accent) 0deg, #111a2e 0deg); }
.ring .pct { font-size: 13px; line-height: 1; }

#display {
  min-width: 168px; display: inline-block; font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0; text-rendering: geometricPrecision; -webkit-font-smoothing: antialiased;
}

#ms, .ms {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bigtime { font-size: 46px; font-weight: 900; letter-spacing: 1px; display: flex; align-items: flex-end; gap: 8px; font-variant-numeric: tabular-nums; }
.ms { font-size: 15px; color: var(--muted); align-self: flex-end; margin-bottom: 6px; }
.smal { font-size: 13px; color: var(--muted); margin-top: 6px; }
.buttons { display: flex; gap: 10px; justify-content: center; padding: 12px 0 4px; flex-wrap: wrap; }
.btn-start { background: linear-gradient(180deg, var(--accent), rgba(0, 86, 179, 0.82)); box-shadow: 0 6px 12px rgba(11, 105, 255, 0.18); }
.btn-stop { background: var(--danger); }

.btn-ghost {
  background: transparent; border: 1px solid var(--border); color: var(--text); box-shadow: none;
}

html.theme-dark .btn-ghost { background: rgba(255, 255, 255, 0.02); }

.laps {
  max-height: 180px; overflow: auto; border-top: 1px dashed rgba(0, 0, 0, 0.08); margin-top: 10px; padding-top: 10px;
}

html.theme-dark .laps { border-top-color: rgba(255, 255, 255, 0.12); }
.lap { display: flex; justify-content: space-between; padding: 8px 6px; border-radius: 8px; }
.lap:hover { background: rgba(0, 86, 179, 0.08); }

/* --- Verbrauchsvergleich --- */
.comparison-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.comparison-item { padding: 12px; background: rgba(0, 0, 0, 0.04); border-radius: 8px; border: 1px solid var(--border); }
html.theme-dark .comparison-item { background: rgba(255, 255, 255, 0.06); }
.comparison-label { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.comparison-value { font-size: 1.4rem; font-weight: 700; color: var(--text); }

/* ==========================================================================
   7. Sticky Footer & Responsive Adjustments
   ========================================================================== */
footer, .footerWrap {
  margin-top: auto;
  padding: 2px 0;
  color: var(--footer-text);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: var(--footer-bg);
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

#footer-text {
  font-weight: 400;
}

@media (max-width: 460px) {
  body { padding: 16px 12px 52px; }
  .card { padding: 14px; }
  h1 { font-size: 1.15rem; }
  .resultRow { align-items: flex-start; }
  .resultRow span:first-child { max-width: 62%; }
  .comparison-row { grid-template-columns: 1fr; }
}


/* ==========================================================================
   8. Saving Hint
   ========================================================================== */

.saving-hint {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid rgba(34, 197, 94, .28);
  border-radius: 10px;
  background: rgba(34, 197, 94, .08);
}

.saving-hint-title {
  margin-bottom: 6px;
  color: #86efac;
  font-weight: 700;
}

.saving-hint-text {
  color: var(--text);
  font-size: .9rem;
  line-height: 1.45;
}

.saving-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-top: 14px;
}

.saving-grid > div {
      padding: 10px;
      border-radius: 8px;
      background: rgba(34, 197, 94, .1);
}

.saving-label {
      display: block;
      margin-bottom: 4px;
      color: var(--muted);
      font-size: .76rem;
    }

    .saving-grid strong {
      color: #86efac;
      font-size: 1rem;
    }







/* Fix für die Timer-Eingabefelder nebeneinander */
.inputs-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 12px;
}

.inputs-row .field {
  flex: 1 1 0% !important;
  min-width: 0 !important;
}



/* ==========================================================================
   9. results & saving
   ========================================================================== */


.results-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.result-card {
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.theme-light .result-card {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.result-card.primary {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.02));
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.result-label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.result-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}

.result-card.primary .result-value {
  color: #4ade80;
}

.result-desc {
  font-size: 0.88rem;
  color: var(--text);
  opacity: 0.85;
  line-height: 1.45;
}

.result-desc-inline {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 700px) {
  .saving-grid {
	grid-template-columns: 1fr;
  }

  .results-container {
	grid-template-columns: 1fr;
  }
}

.saving-hint {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid rgba(34, 197, 94, .28);
  border-radius: 10px;
  background: rgba(34, 197, 94, .08);
}

.saving-hint-title {
  margin-bottom: 6px;
  color: #86efac;
  font-weight: 700;
}

.saving-hint-text {
  color: var(--text);
  font-size: .9rem;
  line-height: 1.45;
}

.saving-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.saving-grid > div {
  padding: 10px;
  border-radius: 8px;
  background: rgba(34, 197, 94, .1);
}

.saving-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .76rem;
}

.saving-grid strong {
  color: #86efac;
  font-size: 1rem;
}






/* ==========================================================================
   10. BMI Balken
   ========================================================================== */

.bmi-meter {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border-color, rgba(127, 127, 127, .22));
  border-radius: 14px;
  background: var(--surface-muted, rgba(127, 127, 127, .06));
  box-sizing: border-box;
  width: 100%;
}

.bmi-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: .9rem;
}

.bmi-meter-title {
  font-weight: 700;
}

.bmi-meter-current {
  color: var(--muted-color, #6b7280);
  font-weight: 600;
  white-space: nowrap;
}

.bmi-meter-track {
  position: relative;
  display: flex !important;
  flex-direction: row !important;
  height: 14px;
  min-height: 14px;
  overflow: visible;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  background: #e5e7eb;
  margin-bottom: 6px;
  width: 100%;
}

.bmi-meter-segment {
  height: 14px !important; /* Erzwingt die Höhe trotz globalem border-box Reset */
  min-height: 14px !important;
  display: block;
  flex-shrink: 0;
}

.bmi-meter-segment:nth-child(1) {
  width: 28.33%;
  border-radius: 999px 0 0 999px;
  background: #f59e0b;
}

.bmi-meter-segment:nth-child(2) {
  width: 21.33%;
  background: #16a34a;
}

.bmi-meter-segment:nth-child(3) {
  width: 16.67%;
  background: #f59e0b;
}

.bmi-meter-segment:nth-child(4) {
  width: 33.67%;
  border-radius: 0 999px 999px 0;
  background: #dc2626;
}

.bmi-meter-marker {
  position: absolute;
  top: -6px;
  left: 0%;
  width: 4px;
  height: 26px;
  border-radius: 2px;
  background: var(--text-color, #111827);
  box-shadow:
    0 0 0 1px #fff,
    0 2px 4px rgba(0, 0, 0, .3);
  transform: translateX(-50%);
  transition: left .25s ease;
  z-index: 10;
}

.bmi-meter-marker::before {
  display: none;
}

.bmi-meter-scale {
  position: relative;
  height: 16px;
  width: 100%;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--muted-color, #6b7280);
  font-size: .75rem;
}

.bmi-meter-scale span {
  position: absolute;
  transform: translateX(-50%);
}

.bmi-meter-scale span:first-child {
  left: 0%;
  transform: none;
}

.bmi-meter-scale span:nth-child(2) {
  left: 28.33%;
}

.bmi-meter-scale span:nth-child(3) {
  left: 49.66%;
}

.bmi-meter-scale span:last-child {
  right: 0%;
  transform: none;
}

.bmi-meter-description {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(127, 127, 127, 0.15);
  color: var(--muted-color, #6b7280);
  font-size: .82rem;
  line-height: 1.4;
}

@media (max-width: 520px) {
  .bmi-meter-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

