/* IONIQ 5 Tracker — App-Gestaltung.
   Warmes Cream, Karten mit hartem Offset-Schatten ("Sticker"), Pill-Buttons,
   getönte Panels, Plex Sans/Mono. Eine Markenfarbe: Kupfer. */

@font-face {
  font-family: "Plex Sans";
  src: url("/static/vendor/fonts/plex-sans-400.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("/static/vendor/fonts/plex-sans-500.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("/static/vendor/fonts/plex-sans-600.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/static/vendor/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/static/vendor/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/static/vendor/fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}

:root {
  --bg: #f6f1e7;
  --card: #fffdf8;
  --ink: #26221a;
  --ink-soft: #746c5d;
  --line: #e4dccb;
  --edge: #d5cbb4;
  --brand: #c95f27;
  --brand-deep: #9c4517;
  --brand-tint: #f9e4d4;
  --green: #33795b;
  --green-tint: #e0efe5;
  --blue: #33667f;
  --blue-tint: #e0ecf2;
  --gold: #8a6d1d;
  --gold-tint: #f6ecd2;
  --red: #b8402e;
  --red-tint: #f9e2dd;
  --sans: "Plex Sans", "Segoe UI", sans-serif;
  --mono: "Plex Mono", Consolas, monospace;
  --r: 18px;
  --pop: 0 2px 0 var(--edge);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  padding-bottom: 84px; /* Platz für mobile Tab-Leiste */
}
@media (min-width: 861px) { body { padding-bottom: 32px; } }

/* ---------- Anmeldung ---------- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-bottom: 24px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 0 4px 0 var(--ink);
  padding: 34px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.login-card h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.login-sub { margin: -12px 0 4px; font-family: var(--mono); font-size: 12.5px; color: var(--brand-deep); }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
.login-card input {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--edge);
  border-radius: 12px;
  background: #fff;
  outline: none;
}
.login-card input:focus { border-color: var(--ink); }
.login-card button {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  padding: 13px;
  color: #fff;
  background: var(--brand);
  border: 1.5px solid var(--brand-deep);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--brand-deep);
  cursor: pointer;
}
.login-card button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--brand-deep); }
.login-error { margin: 0; font-size: 14px; font-weight: 500; color: var(--red); }

/* ---------- Kopf ---------- */
.topbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.topbar .sub { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.topbar .spacer { flex: 1; }
.iconbtn {
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--edge); border-radius: 999px;
  box-shadow: var(--pop);
  padding: 8px 15px; cursor: pointer;
}
.iconbtn:hover { border-color: var(--ink); }
.iconbtn:active { transform: translateY(1px); box-shadow: none; }
.topbar form { margin: 0; }

/* ---------- Tabs ---------- */
.tabs {
  max-width: 1120px;
  margin: 10px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 8px;
}
.tab {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 500;
  padding: 9px 18px;
  border: 1.5px solid var(--edge);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: var(--pop);
}
.tab svg { width: 17px; height: 17px; stroke: currentColor; }
.tab.active { background: var(--ink); border-color: var(--ink); color: var(--bg); box-shadow: none; }
@media (max-width: 860px) {
  .tabs {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    margin: 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--card);
    border-top: 1.5px solid var(--edge);
    z-index: 1500;
    gap: 4px;
  }
  .tab {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px;
    font-size: 10.5px;
    border: none;
    box-shadow: none;
    background: none;
    border-radius: 12px;
  }
  .tab svg { width: 20px; height: 20px; }
  .tab.active { background: var(--ink); color: var(--bg); }
}

/* ---------- Layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 16px 20px 0; }
.view { display: none; }
.view.active { display: block; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 5fr 7fr; align-items: start; }
@media (max-width: 860px) { .grid.two { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: var(--r);
  box-shadow: var(--pop);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.card h2 .hint { font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--ink-soft); margin-left: 8px; }

/* ---------- Batterie-Held ---------- */
.hero { background: var(--green-tint); }
.hero .soc-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.hero .soc { font-size: 64px; font-weight: 600; line-height: .95; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero .soc small { font-size: 26px; font-weight: 500; color: var(--ink-soft); }
.hero .charge-state { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); padding-bottom: 8px; }
.hero .charge-state.on { color: var(--green); }
.batbar {
  margin: 16px 0 6px;
  height: 22px;
  background: #fff;
  border: 1.5px solid var(--edge);
  border-radius: 999px;
  overflow: hidden;
}
.batbar .fill {
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  transition: width .7s cubic-bezier(.2,.8,.2,1);
}
.batbar .fill.mid { background: var(--gold); }
.batbar .fill.low { background: var(--red); }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.fact .k { display: block; font-size: 12px; color: var(--ink-soft); }
.fact .v { font-family: var(--mono); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fact .v small { font-size: 11.5px; font-weight: 400; color: var(--ink-soft); }

/* ---------- Zustandslisten ---------- */
.status-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 0;
  border-bottom: 1.5px dashed var(--line);
  font-size: 14.5px;
}
.status-row:last-child { border-bottom: none; }
.status-row dt { color: var(--ink-soft); flex: 1; margin: 0; }
.status-row dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.status-row.bad dd { color: var(--red); }
.status-row.warn dd { color: var(--gold); }
.dot { width: 9px; height: 9px; border-radius: 999px; background: var(--edge); }
.dot.ok { background: var(--green); }
.dot.warn { background: var(--gold); }
.dot.bad { background: var(--red); }

.tire-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  margin-top: 4px;
}
.tire {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: #fff;
}
.tire .k { font-size: 11.5px; color: var(--ink-soft); display: block; }
.tire .v { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.tire.bad { border-color: var(--red); background: var(--red-tint); }

/* ---------- Karte ---------- */
.map-card { padding: 14px; }
.map-head { display: flex; align-items: center; gap: 12px; margin: 4px 4px 12px; flex-wrap: wrap; }
.map-head h2 { margin: 0; flex: 1; }
.loc-ts { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
#map, #routemap {
  height: 430px; width: 100%;
  border: 1.5px solid var(--edge);
  border-radius: 12px;
}
@media (max-width: 860px) { #map, #routemap { height: 320px; } }

.btn {
  font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--edge);
  box-shadow: var(--pop);
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary {
  background: var(--brand); color: #fff;
  border-color: var(--brand-deep);
  box-shadow: 0 3px 0 var(--brand-deep);
}
.btn.primary:active { box-shadow: 0 1px 0 var(--brand-deep); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.small { font-size: 13px; padding: 7px 13px; }

/* ---------- Statistik ---------- */
.range-picker { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.range-picker .btn.small.active { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: none; }

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-tile {
  border: 1.5px solid var(--edge);
  border-radius: var(--r);
  box-shadow: var(--pop);
  padding: 14px 16px;
  background: var(--card);
}
.stat-tile.t-green { background: var(--green-tint); }
.stat-tile.t-blue { background: var(--blue-tint); }
.stat-tile.t-gold { background: var(--gold-tint); }
.stat-tile.t-brand { background: var(--brand-tint); }
.stat-tile .k { font-size: 12px; color: var(--ink-soft); display: block; margin-bottom: 2px; }
.stat-tile .v { font-family: var(--mono); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-tile .v small { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.stat-tile .sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }

.chart-card svg { display: block; width: 100%; height: auto; }
.chart-empty { color: var(--ink-soft); font-size: 14px; padding: 12px 0; }

/* ---------- Statistik-Unterbereiche ---------- */
.stats-panel { display: none; }
.stats-panel.active { display: block; }

/* ---------- Monatskalender ---------- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-head {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
  padding-bottom: 2px;
}
.cal-cell {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  min-height: 62px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.cal-cell.empty { border-style: dashed; background: none; }
.cal-cell.today { border-color: var(--ink); border-width: 2px; }
.cal-day { font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); }
.cal-km { font-family: var(--mono); font-size: 15px; font-weight: 600; margin-top: 2px; }
.cal-trips { font-size: 10px; color: var(--ink-soft); }
@media (max-width: 620px) {
  .cal-cell { min-height: 52px; padding: 4px 5px; }
  .cal-km { font-size: 12.5px; }
  .cal-trips { display: none; }
}
.cal-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.cal-scale { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 11px; }
.cal-scale i { display: inline-block; width: 16px; height: 11px; border-radius: 3px; }

/* ---------- Fahrzeug-Grafik ---------- */
.zustand-wrap {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.zustand-wrap > dl { flex: 1; margin: 0; min-width: 0; }
.car-visual {
  flex-shrink: 0;
  margin: 2px 0 0;
}
.car-visual svg { width: 108px; height: auto; }
@media (max-width: 420px) { .car-visual svg { width: 88px; } }
#car-svg.portopen #charge-port { stroke: var(--red); fill: var(--red-tint); }
.car-visual g[id^="door-"] { transition: transform .5s cubic-bezier(.3,.9,.3,1); }
.car-visual g[id^="door-"].open rect { fill: var(--red-tint); stroke: var(--red); }
#car-hood.open, #car-trunk.open { fill: var(--red-tint); stroke: var(--red); }
#car-svg.unlocked #car-body { stroke: var(--red); }
#charge-bolt { opacity: 0; }
#car-svg.charging #charge-bolt { opacity: 1; fill: var(--green); animation: bolt-pulse 1.4s ease-in-out infinite; }
#car-svg.charging #charge-port { stroke: var(--green); }
#car-svg.plugged #charge-port { stroke: var(--blue); }
#car-svg.plugged #charge-bolt { opacity: 1; fill: var(--blue); }
@keyframes bolt-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- Zustandszeilen im Steuern-Tab ---------- */
.ctl-state { margin: 0 0 14px; }
.ctl-state .status-row { padding: 5px 0; font-size: 13.5px; }
.ctl-state:empty { display: none; }

/* ---------- Navi-Suche ---------- */
.navi-box { position: relative; margin: 0 4px 10px; }
.navi-box > input {
  width: 100%;
  font-family: var(--sans);
  font-size: 14.5px;
  padding: 11px 14px;
  border: 1.5px solid var(--edge);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.navi-box > input:focus { border-color: var(--ink); }
#navi-suggest {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  z-index: 1600;
  background: #fff;
  border: 1.5px solid var(--edge);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--edge);
  overflow: hidden;
  display: none;
}
#navi-suggest.open { display: block; }
#navi-suggest button {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-size: 13.5px;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px dashed var(--line);
  background: none;
  color: var(--ink);
  cursor: pointer;
}
#navi-suggest button:last-child { border-bottom: none; }
#navi-suggest button:hover, #navi-suggest button.hl { background: var(--brand-tint); }
#navi-suggest .s-name { font-weight: 600; white-space: nowrap; }
#navi-suggest .s-detail { color: var(--ink-soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
#navi-suggest .s-type {
  font-family: var(--mono); font-size: 10px;
  padding: 2px 7px; border-radius: 999px;
  background: var(--blue-tint); color: var(--blue);
  flex-shrink: 0;
}
#navi-suggest .s-type.gespeichert { background: var(--brand-tint); color: var(--brand-deep); }
#navi-suggest .s-type.telefon { background: var(--gold-tint); color: var(--gold); }

.place-chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 4px 10px; }
.place-chips:empty { display: none; }
.place-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border: 1.5px solid var(--edge);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.place-chip:hover { border-color: var(--brand); }
.place-chip.recent { color: var(--ink-soft); border-style: dashed; }
.place-chip .x {
  border: none; background: none; padding: 0;
  color: var(--ink-soft); cursor: pointer; font-size: 14px; line-height: 1;
}
.place-chip .x:hover { color: var(--red); }

/* ---------- Werkstatt-Log ---------- */
.add-entry summary { list-style: none; display: inline-block; cursor: pointer; }
.add-entry summary::-webkit-details-marker { display: none; }
.sl-entry {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1.5px dashed var(--line);
  font-size: 14px;
}
.sl-entry:last-child { border-bottom: none; }
.sl-entry .d { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); min-width: 78px; }
.sl-entry .t { font-weight: 600; flex: 1; }
.sl-entry .t small { display: block; font-weight: 400; color: var(--ink-soft); }
.sl-entry .m { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); text-align: right; }
.sl-entry .x {
  background: none; border: none; cursor: pointer;
  color: var(--ink-soft); font-size: 15px; padding: 0 4px;
}
.sl-entry .x:hover { color: var(--red); }

/* ---------- Fahrten ---------- */
.trip-day { border-bottom: 1.5px dashed var(--line); }
.trip-day:last-child { border-bottom: none; }
.trip-day summary {
  list-style: none;
  display: flex; align-items: baseline; gap: 12px;
  padding: 11px 2px;
  font-weight: 600; font-size: 14.5px;
  cursor: pointer;
}
.trip-day summary::-webkit-details-marker { display: none; }
.trip-day summary::before {
  content: "▸";
  color: var(--brand);
  font-size: 12px;
  transition: transform .15s;
}
.trip-day[open] summary::before { transform: rotate(90deg); }
.trip-day summary .day-sum { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--ink-soft); margin-left: auto; }
.trip-day .day-body { padding: 2px 0 12px; }
.trip-day .btn.small { margin-bottom: 8px; }
.trip-day .day-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 6px 2px;
  font-weight: 600; font-size: 14.5px;
}
.trip-day .day-head .day-sum { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.day-link {
  font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--brand);
}
.day-link:hover { color: var(--brand); }
.trip {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 6px;
}
.trip .time { font-family: var(--mono); font-size: 14px; font-weight: 600; min-width: 46px; }
.trip .bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.trip .bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.trip .dist { font-family: var(--mono); font-size: 14px; font-weight: 600; min-width: 64px; text-align: right; }
.trip .meta2 { font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); min-width: 130px; text-align: right; }
@media (max-width: 620px) { .trip .meta2 { display: none; } }

/* ---------- Steuern ---------- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.btn.action { width: 100%; padding: 12px 10px; }
.btn.action.danger { border-color: var(--red); color: var(--red); box-shadow: 0 2px 0 var(--red-tint); }
.btn.action.danger:hover { background: var(--red); color: #fff; }

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.form-row label { font-size: 13.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; }
.form-row label.check { color: var(--ink); font-weight: 500; }
.form-row select, .form-row input[type="time"], .form-row input[type="text"] {
  font-family: var(--mono);
  font-size: 14px;
  padding: 8px 10px;
  border: 1.5px solid var(--edge);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.form-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand); }

.departure { padding: 10px 0; border-bottom: 1.5px dashed var(--line); margin-bottom: 10px; }
.daypick { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.daypick button {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  width: 34px; height: 30px;
  border: 1.5px solid var(--edge); border-radius: 8px;
  background: #fff; color: var(--ink-soft); cursor: pointer;
}
.daypick button.on { background: var(--brand); border-color: var(--brand-deep); color: #fff; }

#navimap { height: 300px; width: 100%; border: 1.5px solid var(--edge); border-radius: 12px; }

/* ---------- Diagnose / Archiv ---------- */
.api-chip {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--edge);
  background: var(--card);
  color: var(--ink-soft);
}
.api-chip.warn { border-color: var(--gold); color: var(--gold); }
.api-chip.bad { border-color: var(--red); color: var(--red); }

.budget-bar {
  height: 14px;
  background: #fff;
  border: 1.5px solid var(--edge);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.budget-bar .fill { height: 100%; border-radius: 999px; background: var(--blue); transition: width .5s; }
.budget-bar .fill.warn { background: var(--gold); }
.budget-bar .fill.bad { background: var(--red); }
.budget-legend { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

.export-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.export-row .btn { text-decoration: none; display: inline-block; }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.data-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 5px 10px 6px 0;
  border-bottom: 1.5px solid var(--edge);
  position: sticky; top: 0; background: var(--card);
}
.data-table td {
  padding: 5px 10px 5px 0;
  border-bottom: 1px dashed var(--line);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.rawdump {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  max-height: 480px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* ---------- Meldungen ---------- */
#error {
  display: none;
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--red-tint);
  border: 1.5px solid var(--red);
  border-radius: 14px;
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
}
#toast {
  display: none;
  position: fixed;
  bottom: 96px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 500;
  padding: 11px 20px;
  border-radius: 999px;
  z-index: 2000;
  max-width: 90vw;
}
@media (min-width: 861px) { #toast { bottom: 28px; } }
