/* ═══════════════════════════════════════════════════════════════════════════
   style.css — Tankstelle · /var/www/html/tankstelle/css/style.css
   Enthält: Dark-Theme (Standard), Light-Theme, Modal, Toggle-Switch
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ── CSS-Variablen: Nacht (Standard) ────────────────────────────────────── */
:root {
  /* Hintergründe */
  --bg:         #0b0b12;
  --surface:    #111120;
  --surface2:   #191928;
  --surface3:   #1f1f30;
  --border:     #28283c;
  --border2:    #363650;

  /* Akzente */
  --accent:     #f5a623;
  --accent-dk:  #e8431a;
  --accent-tl:  #2ee8b5;

  /* Text */
  --text:       #eeeef8;
  --text2:      #c0c0d8;
  --muted:      #606078;
  --muted2:     #9090b0;

  /* Preisfarben */
  --ce5:        #4cba6e;
  --ce10:       #e8a020;
  --cdiesel:    #3a9ee8;
  --copen:      #4ecdc4;
  --cclosed:    #ff5555;

  /* Sonstiges */
  --r-card:  18px;
  --r-btn:   10px;
  --r-input: 11px;
  --shadow:  0 4px 28px rgba(0,0,0,.55);
  --shadow2: 0 2px 10px rgba(0,0,0,.38);

  /* Theme-Transition */
  --tt: background-color .22s ease, color .22s ease,
        border-color .22s ease, box-shadow .22s ease;
}

/* ── CSS-Variablen: Tag ──────────────────────────────────────────────────── */
html[data-theme="light"] {
  --bg:         #f2f2f8;
  --surface:    #ffffff;
  --surface2:   #ebebf5;
  --surface3:   #e2e2ee;
  --border:     #d8d8e8;
  --border2:    #c4c4d8;

  --text:       #14141e;
  --text2:      #303040;
  --muted:      #9898b8;
  --muted2:     #6868888;

  --ce5:        #258a45;
  --ce10:       #b86808;
  --cdiesel:    #1060b8;
  --copen:      #1a9088;
  --cclosed:    #cc2828;

  --shadow:  0 4px 24px rgba(0,0,0,.10);
  --shadow2: 0 2px 8px  rgba(0,0,0,.07);
}

/* ── Basis ──────────────────────────────────────────────────────────────── */
html { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', 'DejaVu Sans', sans-serif;
  font-weight: 400;
  min-height: 100%;
  overflow-x: hidden;
  transition: var(--tt);
}

/* Hintergrundraster – nur Nacht */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(245,166,35,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,166,35,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
  transition: opacity .3s;
}
html[data-theme="light"] body::before { opacity: 0; }

/* Glow – nur Nacht */
body::after {
  content: '';
  position: fixed;
  top: -180px; left: 50%; transform: translateX(-50%);
  width: 680px; height: 380px;
  background: radial-gradient(ellipse, rgba(245,166,35,.07) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
  transition: opacity .3s;
}
html[data-theme="light"] body::after { opacity: 0; }

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
header {
  padding: 38px 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dk));
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
  box-shadow: 0 0 24px rgba(245,166,35,.32);
}

.header-text { flex: 1; }

.header-text h1 {
  font-size: clamp(22px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -.7px;
  line-height: 1.05;
  background: linear-gradient(90deg, var(--text) 55%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-sub {
  font-family: 'LibMono', monospace;
  font-size: 11px;
  color: var(--muted2);
  margin-top: 3px;
}

/* ── Theme-Toggle ───────────────────────────────────────────────────────── */
.theme-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  user-select: none;
}

.theme-lbl {
  font-family: 'LibMono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted2);
  min-width: 36px;
  text-align: right;
  transition: color .22s;
}

/* Pill-Switch */
.ts-switch {
  position: relative;
  width: 50px; height: 26px;
  cursor: pointer;
  display: block;
}

.ts-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.ts-track {
  position: absolute; inset: 0;
  border-radius: 26px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  transition: background .25s, border-color .25s;
}

/* Wenn Checkbox CHECKED → Tagmodus */
.ts-switch input:checked ~ .ts-track {
  background: linear-gradient(135deg, #5ba3e8, #82c4ff);
  border-color: transparent;
}

.ts-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--muted2);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1;
  transition: transform .25s cubic-bezier(.34,1.4,.64,1), background .25s;
  pointer-events: none;
}

.ts-switch input:checked ~ .ts-track ~ .ts-thumb {
  transform: translateX(24px);
  background: #fff;
}

/* ── Suchmaske ──────────────────────────────────────────────────────────── */
.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px 24px 20px;
  margin-bottom: 28px;
  position: relative;
  overflow: visible;
  box-shadow: var(--shadow);
  transition: var(--tt);
}

.search-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px; border-radius: var(--r-card) var(--r-card) 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-dk) 60%, transparent);
}

.search-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.field { display: flex; flex-direction: column; gap: 5px; }

.field label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--muted2);
  font-family: 'LibMono', monospace;
}

.field input, .field select {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'LibMono', monospace;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: var(--r-input);
  outline: none;
  transition: border-color .17s, box-shadow .17s, var(--tt);
}

.f-plz input  { width: 150px; letter-spacing: 4px; }
.f-rad select { width: 145px; }
.f-srt select { width: 168px; }

.field select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23606078' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

html[data-theme="light"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%239898b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.field input::placeholder { color: var(--muted); letter-spacing: 3px; }

.field input:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,166,35,.12);
}

.btn-search {
  background: linear-gradient(135deg, var(--accent), var(--accent-dk));
  border: none;
  color: #080808;
  font-family: 'Poppins', sans-serif;
  font-size: 14px; font-weight: 700;
  padding: 10px 24px;
  border-radius: var(--r-btn);
  cursor: pointer; letter-spacing: .2px;
  transition: transform .13s, box-shadow .13s;
  white-space: nowrap; align-self: flex-end;
}
.btn-search:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245,166,35,.36); }
.btn-search:active { transform: none; }
.btn-search:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── API-Sektion ─────────────────────────────────────────────────────────── */
.api-section {
  margin-top: 16px;
  background: rgba(0,0,0,.12);
  border: 1px solid var(--border);
  border-radius: 13px;
  transition: var(--tt);
}
html[data-theme="light"] .api-section { background: var(--surface2); }

.api-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.api-header-lbl {
  font-size: 9.5px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--muted2);
  font-family: 'LibMono', monospace;
  flex-shrink: 0;
}

.adapter-tabs { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; }

.api-tab {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--muted2);
  font-family: 'Poppins', sans-serif;
  font-size: 12px; font-weight: 600;
  padding: 4px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color .13s, color .13s, background .13s;
}
.api-tab:hover  { border-color: var(--accent); color: var(--accent); }
.api-tab.active { background: linear-gradient(135deg, var(--accent), var(--accent-dk)); border-color: transparent; color: #080808; }

/* Zahnrad-Button */
.btn-gear {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .35s ease;
  flex-shrink: 0;
}
.btn-gear:hover  { border-color: var(--accent); color: var(--accent); background: rgba(245,166,35,.08); transform: rotate(50deg); }
.btn-gear.is-open { border-color: var(--accent); color: var(--accent); background: rgba(245,166,35,.1); transform: rotate(90deg); }

.api-body { padding: 11px 15px 13px; }

.api-desc {
  font-size: 12px; color: var(--muted2);
  font-family: 'LibMono', monospace;
  line-height: 1.6; margin-bottom: 4px;
}

.api-link {
  font-size: 11px; color: var(--accent-tl);
  font-family: 'LibMono', monospace;
  display: inline-block; margin-bottom: 10px;
}

/* API-Key-Zeile */
.key-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}

.key-lbl {
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted2); font-family: 'LibMono', monospace;
  flex-shrink: 0; align-self: center;
}

.key-row input {
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(46,232,181,.2);
  color: var(--text);
  font-family: 'LibMono', monospace;
  font-size: 12px; padding: 7px 11px;
  border-radius: 8px; outline: none;
  flex: 1; min-width: 180px;
  transition: border-color .15s, var(--tt);
}
html[data-theme="light"] .key-row input { background: var(--surface); border-color: rgba(26,144,136,.3); }
.key-row input:focus { border-color: var(--accent-tl); }

.key-row .btn-save {
  background: rgba(46,232,181,.1);
  border: 1px solid rgba(46,232,181,.24);
  color: var(--accent-tl);
  font-family: 'Poppins', sans-serif;
  font-size: 12px; font-weight: 600;
  padding: 7px 13px; border-radius: 8px;
  cursor: pointer; white-space: nowrap;
  transition: background .14s;
}
.key-row .btn-save:hover { background: rgba(46,232,181,.2); }

/* ── Erster-Start-Banner (kein API-Key vorhanden) ─────────────────────── */
.setup-banner {
  margin-top: 12px;
  padding: 13px 16px;
  background: rgba(245,166,35,.07);
  border: 1px solid rgba(245,166,35,.25);
  border-radius: 11px;
  font-size: 12.5px;
  color: var(--accent);
  font-family: 'LibMono', monospace;
  line-height: 1.65;
  display: none;  /* wird per JS eingeblendet wenn kein Key vorhanden */
}
.setup-banner a { color: var(--accent); text-decoration: underline; }

/* ── Toast-Bestätigung ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(46,232,181,.16);
  border: 1px solid rgba(46,232,181,.35);
  color: var(--accent-tl);
  font-family: 'LibMono', monospace;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 30px;
  z-index: 9999;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ── Modal-Overlay ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 800;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.65);
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  transform: translateY(16px) scale(.97);
  transition: transform .22s cubic-bezier(.34,1.2,.64,1), var(--tt);
}
html[data-theme="light"] .modal-box { box-shadow: 0 24px 64px rgba(0,0,0,.15); }
.modal-overlay.is-open .modal-box { transform: translateY(0) scale(1); }

.modal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 17px 20px 13px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
  transition: var(--tt);
}

.modal-title { font-size: 14px; font-weight: 700; color: var(--text); }
.modal-sub   { font-size: 11px; color: var(--muted2); font-family: 'LibMono', monospace; margin-top: 2px; }

.modal-close {
  margin-left: auto; flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted2); font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .13s, color .13s, background .13s;
  line-height: 1;
}
.modal-close:hover { border-color: var(--cclosed); color: var(--cclosed); background: rgba(255,85,85,.08); }

.modal-body { padding: 18px 20px 22px; }

.m-section { margin-bottom: 20px; }
.m-section:last-child { margin-bottom: 0; }

.m-section-title {
  font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--muted2); font-family: 'LibMono', monospace;
  padding-bottom: 6px; margin-bottom: 11px;
  border-bottom: 1px solid var(--border);
}

.cfg-hint {
  font-size: 11.5px; color: var(--muted2);
  font-family: 'LibMono', monospace;
  line-height: 1.65; margin-bottom: 12px;
}
.cfg-hint code {
  background: rgba(255,255,255,.07); padding: 1px 5px;
  border-radius: 4px; color: var(--accent-tl);
}
html[data-theme="light"] .cfg-hint code { background: rgba(0,0,0,.06); }

.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.cfg-field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; }
.cfg-field-sm { grid-column: span 1; }

.cfg-field label {
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted2); font-family: 'LibMono', monospace;
}

.cfg-field input, .cfg-field select, .cfg-field textarea {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'LibMono', monospace;
  font-size: 12px; padding: 8px 11px;
  border-radius: 9px; outline: none;
  resize: vertical;
  transition: border-color .14s, box-shadow .14s, var(--tt);
}
.cfg-field input:focus, .cfg-field select:focus, .cfg-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(245,166,35,.11);
}
.cfg-field textarea { min-height: 66px; }

.modal-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.btn-cfg-save {
  background: linear-gradient(135deg, var(--accent), var(--accent-dk));
  border: none; color: #080808;
  font-family: 'Poppins', sans-serif;
  font-size: 13px; font-weight: 700;
  padding: 9px 20px; border-radius: 9px;
  cursor: pointer; transition: opacity .14s, transform .13s;
}
.btn-cfg-save:hover { opacity: .88; transform: translateY(-1px); }

.btn-cfg-cancel {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted2);
  font-family: 'Poppins', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 9px;
  cursor: pointer; transition: border-color .13s, color .13s;
}
.btn-cfg-cancel:hover { border-color: var(--muted2); color: var(--text); }

/* ── Status / Spinner ───────────────────────────────────────────────────── */
#status {
  text-align: center; padding: 18px;
  font-family: 'LibMono', monospace; font-size: 13px;
  color: var(--muted2); display: none;
}

.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  margin-right: 8px; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Fehlerbox ──────────────────────────────────────────────────────────── */
.error-box {
  background: rgba(232,67,26,.09);
  border: 1px solid rgba(232,67,26,.28);
  border-radius: 13px; padding: 13px 18px;
  color: #ff7755;
  font-family: 'LibMono', monospace; font-size: 13px;
  display: none; margin-bottom: 14px;
}

/* ── Summary-Pillen ─────────────────────────────────────────────────────── */
#summary { display: none; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }

.s-pill {
  flex: 1; min-width: 150px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px; padding: 13px 16px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow2);
  transition: var(--tt);
}
.s-pill::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
}
.p-e5::after     { background: var(--ce5); }
.p-e10::after    { background: var(--ce10); }
.p-diesel::after { background: var(--cdiesel); }
.p-count::after  { background: var(--accent-tl); }

.pill-dot {
  position: absolute; top: 13px; right: 13px;
  width: 7px; height: 7px; border-radius: 50%;
}
.p-e5 .pill-dot    { background: var(--ce5);       box-shadow: 0 0 6px var(--ce5); }
.p-e10 .pill-dot   { background: var(--ce10);      box-shadow: 0 0 6px var(--ce10); }
.p-diesel .pill-dot{ background: var(--cdiesel);   box-shadow: 0 0 6px var(--cdiesel); }
.p-count .pill-dot { background: var(--accent-tl); box-shadow: 0 0 6px var(--accent-tl); }

.pill-lbl { font-size: 9px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted2); font-family: 'LibMono', monospace; margin-bottom: 5px; }
.pill-val { font-family: 'LibMono', monospace; font-size: 23px; font-weight: 700; line-height: 1; }
.pill-sub { font-size: 9.5px; color: var(--muted); font-family: 'LibMono', monospace; margin-top: 4px; }

.p-e5 .pill-val    { color: var(--ce5); }
.p-e10 .pill-val   { color: var(--ce10); }
.p-diesel .pill-val{ color: var(--cdiesel); }
.p-count .pill-val { color: var(--accent-tl); }

/* ── Filter-Chips ───────────────────────────────────────────────────────── */
#controls { display: none; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }

.ctrl-lbl { font-size: 10px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted); font-family: 'LibMono', monospace; }

.chip {
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--muted2);
  font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600;
  padding: 5px 13px; border-radius: 20px;
  cursor: pointer; transition: border-color .13s, color .13s, background .13s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active            { background: var(--accent);   border-color: var(--accent);   color: #080808; }
.chip.active.ch-e5      { background: var(--ce5);      border-color: var(--ce5);      color: #fff; }
.chip.active.ch-e10     { background: var(--ce10);     border-color: var(--ce10);     color: #080808; }
.chip.active.ch-diesel  { background: var(--cdiesel);  border-color: var(--cdiesel);  color: #fff; }
.chip.active.ch-open    { background: var(--copen);    border-color: var(--copen);    color: #080808; }

/* ── Ergebnisse ─────────────────────────────────────────────────────────── */
#results { display: none; }

.res-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.res-cnt { font-size: 11px; color: var(--muted2); font-family: 'LibMono', monospace; }

.station-grid { display: grid; gap: 8px; }

/* ── Stationskarte ──────────────────────────────────────────────────────── */
.scard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 15px 18px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 12px; align-items: center;
  transition: border-color .16s, transform .13s, var(--tt);
  animation: fadeUp .25s ease both;
  box-shadow: var(--shadow2);
}
.scard:hover { border-color: var(--border2); transform: translateY(-1px); box-shadow: var(--shadow); }
.scard.cheapest { border-color: rgba(46,232,181,.38); }

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

.cheap-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; letter-spacing: 1.3px; font-weight: 700; text-transform: uppercase;
  color: var(--accent-tl); font-family: 'LibMono', monospace; margin-bottom: 4px;
}
.cheap-badge::before {
  content: ''; display: inline-block; width: 5px; height: 5px;
  background: var(--accent-tl); border-radius: 50%; box-shadow: 0 0 5px var(--accent-tl);
}

.sname  { font-size: 14.5px; font-weight: 700; line-height: 1.2; margin-bottom: 3px; }
.sbrand {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
  font-family: 'LibMono', monospace; padding: 2px 7px; border-radius: 4px;
  background: rgba(255,255,255,.05); color: var(--muted2); margin-bottom: 5px;
}
html[data-theme="light"] .sbrand { background: rgba(0,0,0,.055); }

.saddr { font-size: 11.5px; color: var(--muted2); font-family: 'LibMono', monospace; line-height: 1.5; }
.sdist { font-size: 10.5px; color: var(--muted); font-family: 'LibMono', monospace; margin-top: 3px; }

.sopen {
  display: inline-block; font-size: 9.5px; padding: 2px 8px; border-radius: 4px;
  font-family: 'LibMono', monospace; font-weight: 700; margin-top: 5px; letter-spacing: .4px;
}
.sopen.open   { background: rgba(78,205,196,.12); color: var(--copen); }
.sopen.closed { background: rgba(255,85,85,.10);  color: var(--cclosed); }

.prices { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.ptag { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; font-family: 'LibMono', monospace; color: var(--muted); width: 48px; text-align: right; }
.pval { font-family: 'LibMono', monospace; font-size: 17px; font-weight: 700; min-width: 68px; text-align: right; line-height: 1; }
.pval.e5     { color: var(--ce5); }
.pval.e10    { color: var(--ce10); }
.pval.diesel { color: var(--cdiesel); }
.pval.na     { color: var(--muted); font-size: 12px; font-weight: 400; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer {
  margin-top: 48px; padding: 16px 0 28px;
  border-top: 1px solid var(--border);
  text-align: center; font-size: 11px;
  color: var(--muted); font-family: 'LibMono', monospace;
  transition: var(--tt);
}
footer a { color: var(--muted2); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  .scard              { grid-template-columns: 1fr; }
  .prices             { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .search-row         { flex-direction: column; }
  .f-plz input, .f-rad select, .f-srt select { width: 100%; }
  .btn-search         { width: 100%; text-align: center; }
  .theme-lbl          { display: none; }
  .cfg-grid           { grid-template-columns: 1fr; }
  .cfg-field-sm       { grid-column: 1 / -1; }
  header              { padding: 24px 0 18px; }
}

/* ── Header-Einstellungs-Zahnrad (neben Theme-Toggle) ───────────────────── */
.btn-settings-gear {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .35s ease;
  flex-shrink: 0;
  margin-right: 6px;
}
.btn-settings-gear:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245,166,35,.08);
  transform: rotate(50deg);
}

/* ── Hervorgehobene Preiszeile bei Preissortierung ───────────────────────── */
.price-row.price-highlight .pval {
  font-size: 22px;
  position: relative;
}
.price-row.price-highlight .ptag {
  color: var(--muted2);
  font-weight: 700;
}

/* ── Passwort-Hinweis in der Key-Zeile ──────────────────────────────────── */
.key-hint {
  font-size: 11px;
  color: var(--muted2);
  font-family: 'LibMono', monospace;
  align-self: center;
  flex-shrink: 0;
}

/* ── Passwort-Eingabe ───────────────────────────────────────────────────── */
input[type="password"] {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'LibMono', monospace;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  outline: none;
  flex: 1;
  min-width: 160px;
  transition: border-color .15s, var(--tt);
}
input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,166,35,.12);
}

/* ── Passwort-Zeile / Key-Hint ──────────────────────────────────────────── */
.key-hint {
  font-family: 'LibMono', monospace;
  font-size: 11px;
  color: var(--muted2);
  align-self: center;
  font-style: italic;
}

#passRow {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

#passRow input {
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(245,166,35,.2);
  color: var(--text);
  font-family: 'LibMono', monospace;
  font-size: 13px;
  padding: 7px 11px;
  border-radius: 8px;
  outline: none;
  flex: 1;
  min-width: 180px;
  transition: border-color .15s, var(--tt);
}
html[data-theme="light"] #passRow input {
  background: var(--surface);
  border-color: rgba(185,130,10,.3);
}
#passRow input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,166,35,.1); }

/* ── Passwort-Modal – Eingabefeld ───────────────────────────────────────── */
#passModalInput {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'LibMono', monospace;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, var(--tt);
  letter-spacing: 2px;
}
#passModalInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,166,35,.12);
}

/* ── Server-Status-Hinweis in der API-Sektion ───────────────────────────── */
.server-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'LibMono', monospace;
  font-size: 11px;
  color: var(--muted2);
  margin-bottom: 8px;
}
.server-status.ok   { color: var(--ce5); }
.server-status.ok::before   { content: '●'; color: var(--ce5); }
.server-status.none::before { content: '●'; color: var(--muted); }

/* ── Setup-Block (Tankerkönig Ersteinrichtung / Änderung) ───────────────── */
.setup-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.setup-field-row input {
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(46,232,181,.2);
  color: var(--text);
  font-family: 'LibMono', monospace;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  outline: none;
  flex: 1;
  min-width: 200px;
  transition: border-color .15s, var(--tt);
}
html[data-theme="light"] .setup-field-row input {
  background: var(--surface);
  border-color: rgba(26,144,136,.3);
}
.setup-field-row input[type="text"]:focus  { border-color: var(--accent-tl); }
.setup-field-row input[type="password"]:focus { border-color: var(--accent); }

.setup-hint {
  font-family: 'LibMono', monospace;
  font-size: 11px;
  color: var(--muted2);
  margin-top: 5px;
  padding-left: 2px;
  font-style: italic;
}

/* ── Reset-Filter-Chip ──────────────────────────────────────────────────── */
.chip-reset {
  background: transparent;
  border-color: var(--muted);
  color: var(--muted);
  margin-left: 4px;
}
.chip-reset:hover {
  border-color: var(--cclosed);
  color: var(--cclosed);
  background: rgba(255,85,85,.08);
}

/* ── Anklickbare Summary-Pillen ─────────────────────────────────────────── */
.s-pill[onclick], .s-pill[style*="cursor:pointer"] {
  transition: var(--tt), transform .13s, box-shadow .13s;
}
.s-pill[style*="cursor:pointer"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.s-pill[style*="cursor:pointer"]:active {
  transform: none;
}
/* Aktive Pille (entspricht aktivem Filter) */
.s-pill.pill-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(245,166,35,.18), var(--shadow2);
}
.p-e5.pill-active    { border-color: var(--ce5);     box-shadow: 0 0 0 2px rgba(76,186,110,.2); }
.p-e10.pill-active   { border-color: var(--ce10);    box-shadow: 0 0 0 2px rgba(232,160,32,.2); }
.p-diesel.pill-active{ border-color: var(--cdiesel); box-shadow: 0 0 0 2px rgba(58,158,232,.2); }

/* ── Trennstrich in Filter-Leiste ───────────────────────────────────────── */
.ctrl-sep {
  width: 1px;
  height: 22px;
  background: var(--border2);
  align-self: center;
  flex-shrink: 0;
  margin: 0 4px;
}

/* ── PLZ-Eingabe + Geolocation-Button ───────────────────────────────────── */
.plz-wrap {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.plz-wrap input {
  flex: 1;
  min-width: 0;
}

.btn-geo {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-input);
  font-size: 18px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .13s;
  line-height: 1;
  padding: 0;
  /* Höhe an Input anpassen */
  align-self: flex-end;
  height: 42px;   /* exakt wie .field input padding+font */
}

.btn-geo:hover {
  border-color: var(--accent);
  background: rgba(245,166,35,.1);
  transform: scale(1.08);
}

.btn-geo:active { transform: scale(1); }

.btn-geo:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* ── Routing-Buttons ────────────────────────────────────────────────────── */
.routing-btns {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn-route {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .14s, transform .13s, background .14s;
  border: 1px solid transparent;
}

.btn-route:hover  { opacity: .85; transform: translateY(-1px); }
.btn-route:active { transform: none; }

/* Google Maps – dezentes Rot */
.btn-route-google {
  background: rgba(234,67,53,.12);
  border-color: rgba(234,67,53,.28);
  color: #ea4335;
}
html[data-theme="light"] .btn-route-google {
  background: rgba(234,67,53,.08);
}

/* Apple Maps – dezentes Blau */
.btn-route-apple {
  background: rgba(0,122,255,.1);
  border-color: rgba(0,122,255,.25);
  color: #007aff;
}
html[data-theme="light"] .btn-route-apple {
  background: rgba(0,122,255,.07);
}

/* OpenStreetMap – dezentes Grün */
.btn-route-osm {
  background: rgba(116,185,0,.1);
  border-color: rgba(116,185,0,.25);
  color: #5a9200;
}
html[data-theme="light"] .btn-route-osm { color: #3d6600; }
