/* Datenbank-Backup – Farbwelt und Schriftrollen nach time.schmeer / Studio CMS */

:root {
  /* Akzent aus dem Studio CMS */
  --accent: #f2c230;
  --accent-ink: #1a1508;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.18);
}

[data-theme="dark"] {
  /* Sagt dem Browser, dass seine eigenen Bedienelemente dunkel sein sollen:
     Zahlenpfeile, Auswahllisten, Bildlaufleisten, Datumsfelder. */
  color-scheme: dark;
  --bg: #0b0f14;
  --surface: #121a24;
  --surface-2: #17222e;
  --line: #223040;
  --text: #e6edf5;
  --muted: #8ba0b5;
  --accent: #f2c230;
  --accent-ink: #1a1508;
  --ok: #4bbf87;
  --bad: #e0645c;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f2efe9;
  --surface: #fffdfa;
  --surface-2: #f7f3ec;
  --line: #e0d9cd;
  --text: #1d2229;
  --muted: #6b6559;
  --accent: #d8a413;
  --accent-ink: #1a1508;
  --ok: #1f7a4a;
  --bad: #a83a32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  display: block;
  background: var(--bg);
  color: var(--text);
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: Syne, sans-serif; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .3em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
code, .mono, .num, .slug { font-family: "IBM Plex Mono", monospace; font-size: .86em; }
.muted { color: var(--muted); margin: 0; }
.hint { color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: .72rem; display: block; margin-top: 4px; }

/* ------------------------------------------------------------ Topbar */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px 22px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: Syne, sans-serif; font-weight: 700; }
.mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  font-family: "IBM Plex Mono", monospace; font-size: .78rem; font-weight: 500;
}
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.tab {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font: 500 .9rem/1 "Public Sans", sans-serif;
  padding: 9px 13px; border-radius: var(--radius-sm); white-space: nowrap;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.is-active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.top-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  text-decoration: none; font-size: .95rem;
}
.icon-btn:hover { color: var(--text); }

main { max-width: 1180px; margin: 0 auto; padding: 26px 22px 80px; }

/* ------------------------------------------------------------ Panels */

.panel { display: none; }
.panel.is-active { display: block; animation: rise .18s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }

.panel-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-title { margin: 30px 0 10px; }

/* ------------------------------------------------------------- Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card.wide { max-width: 780px; }
.card + .card { margin-top: 16px; }
/* Im Raster regelt gap den Abstand – der Rand würde die zweite Karte nach unten schieben. */
.grid > .card + .card,
.speicher > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.db-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.db-card .slug { color: var(--muted); }
.db-card.is-off { opacity: .55; }
.db-card .meta { display: grid; gap: 4px; margin: 12px 0 14px; }
.db-card .meta > div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 3px; }
.db-card dt { color: var(--muted); font-size: .82rem; }
.db-card dd { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: .8rem; }
.card footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.empty {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 28px; text-align: center; color: var(--muted);
}

/* -------------------------------------------------------- Formulare */

label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
input, select {
  width: 100%; margin-top: 5px;
  padding: 9px 10px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 400 .9rem/1.3 "Public Sans", sans-serif;
}
input.mono { font-family: "IBM Plex Mono", monospace; font-size: .84rem; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > label { flex: 1 1 160px; }
.row > label.w-port { flex: 0 0 92px; }
.row > label.w-sel { flex: 0 0 170px; }
.cron-row > label { flex: 1 1 90px; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--muted); }
.switch input { display: none; }
.switch span {
  width: 36px; height: 20px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  position: relative; transition: background .15s;
}
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); transition: transform .15s, background .15s;
}
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--accent-ink); }

/* ------------------------------------------------------------ Knöpfe */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  font: 500 .87rem/1 "Public Sans", sans-serif;
  transition: transform .08s, border-color .15s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn.small { padding: 6px 10px; font-size: .8rem; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ------------------------------------------------------------ Tabelle */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 14px;
  background: var(--surface-2); color: var(--muted);
  font: 500 .74rem/1 "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line);
}
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num { font-family: Syne, sans-serif; font-weight: 600; font-size: .85rem; white-space: nowrap; }
td.right { text-align: right; white-space: nowrap; }
td.details { color: var(--muted); font-size: .82rem; max-width: 420px; }

.badge {
  display: inline-block; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--muted);
  font: 500 .68rem/1.5 "IBM Plex Mono", monospace; text-transform: uppercase;
}
.badge.total { border-color: var(--accent); color: var(--accent); }
.badge.ok { border-color: var(--ok); color: var(--ok); }
.badge.bad { border-color: var(--bad); color: var(--bad); }

.url-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.url-row code {
  flex: 1 1 340px; padding: 9px 10px; word-break: break-all;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.output { white-space: pre-wrap; font-family: "IBM Plex Mono", monospace; font-size: .8rem; margin-top: 16px; }

.notice { padding: 10px 12px; border-radius: var(--radius-sm); font-size: .85rem; margin: 10px 0; }
.notice.error { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); }

/* ------------------------------------------------------------- Toast */

#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 8px; max-width: min(440px, 92vw); }
.toast {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 11px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  font-size: .86rem; animation: rise .18s ease;
}
.toast.bad { border-left-color: var(--bad); }
.toast ul { margin: 6px 0 0; padding-left: 16px; color: var(--muted); }

/* -------------------------------------------------------------- Gate */

body.gate { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.gate-card { width: min(380px, 100%); text-align: left; }
.gate-card .mark { margin-bottom: 14px; }
.gate-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.gate-card p { margin-bottom: 16px; font-size: .88rem; }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; padding: 10px 14px; }
  .tabs { order: 3; width: 100%; }
  main { padding: 18px 14px 60px; }
}

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

.readonly-note { margin-bottom: 18px; }
.readonly-note p { font-size: .86rem; margin: 0 0 10px; }
.snippet { margin: 4px 0 10px; user-select: all; }

textarea {
  width: 100%; margin-top: 5px; padding: 9px 10px; resize: vertical;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 400 .82rem/1.4 "IBM Plex Mono", monospace;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
/* ------------------------------------------------- Aufklapp-Bereiche */

details.keybox {
  margin: 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color .15s;
}
details.keybox:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
details.keybox[open] { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }

details.keybox > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: var(--text);
  font: 500 .88rem/1.3 "Public Sans", sans-serif;
  user-select: none;
}
details.keybox > summary::-webkit-details-marker { display: none; }
details.keybox > summary::marker { content: ""; }

/* eigener Pfeil, dreht sich beim Aufklappen */
details.keybox > summary::before {
  content: "";
  width: 7px; height: 7px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translate(-1px, -1px);
  transition: transform .18s ease;
  flex: 0 0 auto;
}
details.keybox[open] > summary::before { transform: rotate(45deg) translate(-2px, -2px); }
details.keybox > summary:hover { color: var(--accent); }
details.keybox > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

details.keybox > *:not(summary) { padding: 0 14px; }
details.keybox > *:not(summary):last-child { padding-bottom: 14px; }
details.keybox[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }

/* kurz hervorheben, wenn von einem Knopf aus geöffnet */
details.keybox.blitzt { animation: blitz 1.1s ease; }
@keyframes blitz {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  25%      { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
}
[hidden] { display: none !important; }

.fest { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 12px 14px; margin-bottom: 16px; }
.fest h3 { margin-bottom: 8px; }
.fest .meta { display: grid; gap: 4px; margin: 0; }
.fest .meta > div { display: flex; justify-content: space-between; gap: 12px; }
.fest dt { color: var(--muted); font-size: .82rem; }
.fest dd { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: .8rem; }

.wer { color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: .76rem; padding-right: 6px; }

table.hist td { vertical-align: top; }
table.hist .datei { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; max-width: 320px; }
table.hist .datei + .datei { margin-top: 3px; }
table.hist .weg { color: var(--muted); text-decoration: line-through; }
table.hist a { color: var(--text); }
table.hist a:hover { color: var(--accent); }
table.hist .ziele div { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: .84rem; }
table.hist .ziele div + div { margin-top: 4px; }
tr.ist-fehler td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.gut { background: var(--ok); }
.dot.schlecht { background: var(--bad); }

.fund { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.fund:last-of-type { border-bottom: 0; }
.fund > input[type=checkbox] { display: block; width: auto; margin-top: 10px; accent-color: var(--accent); }
.fund-rechts { flex: 1; display: grid; gap: 4px; }
.fund-feld { margin: 0; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-family: "IBM Plex Mono", monospace; }
.fund-name { max-width: 320px; font-weight: 500; }
.fund .quelle { font-size: .76rem; }
.fund-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .84rem; }
.fund.ist-drin, .fund.ohne-pw { opacity: .6; }
#discoverList { margin: 12px 0; }

.js-fehler {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: var(--bad); color: #fff;
  padding: 12px 18px;
  font: 500 .86rem/1.4 "Public Sans", sans-serif;
}

/* --------------------------------------------------------- Aufträge */
.grid.weit { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.auftrag .meta > div { border-bottom: 1px dashed var(--line); padding-bottom: 3px; }
.pfadliste { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; }
.pfadliste li { font-size: .8rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.pfadliste code { word-break: break-all; }

.dbwahl { display: grid; gap: 6px; margin-bottom: 6px; transition: opacity .15s; }
.kasten { display: flex; align-items: center; gap: 9px; margin: 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; }
.kasten input { width: auto; margin: 0; accent-color: var(--accent); }
.kasten span { color: var(--text); font-size: .88rem; }

#auftragForm h4 { margin: 18px 0 8px; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); font-family: "IBM Plex Mono", monospace; }
.pfad { border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 12px; margin-bottom: 10px; }
.pfad-fuss { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pfad-info { font-size: .8rem; }
.pfad-info.ist-fehler { color: var(--bad); }

.ordner-zeile { display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--line); }
.ordner-zeile:last-child { border-bottom: 0; }
.ordner-name { flex: 1; text-align: left; background: none; border: 0; cursor: pointer;
  color: var(--text); font: 500 .86rem/1.4 "IBM Plex Mono", monospace; padding: 4px 0; }
.ordner-name:hover { color: var(--accent); }

/* --------------------------------------------------------- Speicher */
.speicher {
  display: grid; gap: 14px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
}
/* Beide Karten gleich aufgebaut: Kopf, Balken, Werte, Fußnote unten bündig */
.speicher-karte { display: flex; flex-direction: column; }
.speicher-kopf {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  min-height: 46px;
}
.speicher-kopf > div { display: flex; flex-direction: column; gap: 2px; }
.speicher-karte header span.muted { font-size: .78rem; }
.speicher-fussnote { display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  margin-top: auto; padding-top: 12px; }
.speicher-fussnote .hint { margin: 0; min-height: 1em; }
.speicher-zahl { font-family: Syne, sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--accent); white-space: nowrap; }
.speicher-zahl.ist-eng { color: var(--bad); }

.balken { position: relative; height: 12px; margin: 16px 0 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.balken-fuellung { position: absolute; inset: 0 auto 0 0; background: var(--accent);
  border-radius: 999px; transition: width .3s; }
.balken-fuellung.ist-knapp { background: #e0a33e; }
.balken-fuellung.ist-eng { background: var(--bad); }
.balken-anteil { position: absolute; inset: 0 auto 0 0; border-radius: 999px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,.28) 0 4px, transparent 4px 8px); }

.speicher-karte .meta { display: grid; gap: 4px; margin: 0; }
.speicher-karte .meta > div { display: flex; justify-content: space-between; gap: 10px; }
.speicher-karte dt { color: var(--muted); font-size: .8rem; }
.speicher-karte dd { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: .8rem; }
.speicher-fuss { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.speicher-fuss .keybox { flex: 1 1 340px; margin: 0; }


.balken.ist-leer { background: repeating-linear-gradient(90deg,
    var(--surface-2) 0 6px, transparent 6px 12px); }
.speicher-zahl.ist-knapp { color: #e0a33e; }
.speicher-zahl.ist-offen { color: var(--muted); font-size: 1rem; }
.speicher-fuss .keybox { margin: 0; }


/* Startbereich über den Datenbankkarten */
.starten { margin: 0 0 16px; }
.starten-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; }
.starten-schalter { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.section-title.erste { margin-top: 4px; }

.abschnitt-text { margin: -4px 0 14px; }
.speicher-groessen { max-width: 780px; }
.speicher-fuss { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
input.mini { width: 62px; display: inline-block; margin: 0 2px; padding: 3px 6px;
  font-family: "IBM Plex Mono", monospace; font-size: .78rem; }

/* Dauerhafte Ausschlüsse als Merkzeile im Formular */
.fest-aus { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 9px 11px;
  border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.fest-aus-titel { font: 500 .72rem/1 "IBM Plex Mono", monospace; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
.chip { padding: 3px 8px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--text); font-size: .76rem; }
.fest-aus-link { margin-left: auto; color: var(--accent); font-size: .78rem; text-decoration: none; }
.fest-aus-link:hover { text-decoration: underline; }

/* -------------------------------------------------- Fortschrittsanzeige */
.fortschritt {
  position: fixed; left: 18px; bottom: 18px; z-index: 70;
  width: min(420px, calc(100vw - 36px));
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.32);
  animation: rise .18s ease;
}
.fortschritt.ist-fertig { opacity: 0; transition: opacity .35s; }
.fortschritt-kopf { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.fortschritt-text { font-size: .86rem; font-weight: 500; }
.fortschritt-zahl { font-family: "IBM Plex Mono", monospace; font-size: .74rem; color: var(--muted); white-space: nowrap; }
.fortschritt-balken { height: 8px; margin-top: 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.fortschritt-fuellung { height: 100%; width: 2%; border-radius: 999px; background: var(--accent); }
/* Die Breite setzt das Skript Bild für Bild – ein CSS-Übergang würde dagegenarbeiten. */
.fortschritt-fuss { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-top: 7px; }
.fortschritt-tempo { font-family: "IBM Plex Mono", monospace; font-size: .74rem; color: var(--accent); white-space: nowrap; }
.fortschritt-datei { font-family: "IBM Plex Mono", monospace; font-size: .7rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; direction: rtl; }
/* Ohne Bezugswert läuft ein Streifenmuster, damit klar ist: es tut sich was */
.fortschritt-fuellung.ist-unbestimmt {
  background: repeating-linear-gradient(90deg,
    var(--accent) 0 14px, color-mix(in srgb, var(--accent) 45%, transparent) 14px 28px);
  animation: laufband 1s linear infinite;
}
@keyframes laufband { from { background-position: 0 0; } to { background-position: 28px 0; } }


/* Zahlenfelder: Pfeile bleiben bedienbar, fügen sich aber ein */
input[type="number"] { padding-right: 6px; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: .55;
  filter: grayscale(1);
  margin-left: 4px;
}
input[type="number"]:hover::-webkit-inner-spin-button,
input[type="number"]:focus::-webkit-inner-spin-button { opacity: 1; }

/* Auswahllisten mit eigenem Pfeil statt der Browser-Grafik */
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 30px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) center, calc(100% - 11px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select:hover {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
}

/* Bildlaufleisten im selben Ton */
* { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Gesamtgröße direkt auf der Speicherkarte */
.groesse-form { width: 100%; }
.groesse-form label { margin: 0; }
.groesse-eingabe { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.groesse-eingabe input { width: 100px; margin: 0; }
.groesse-eingabe .einheit { font-family: "IBM Plex Mono", monospace; font-size: .8rem; color: var(--muted); }
.groesse-eingabe .btn { margin-left: auto; }

.pflicht { font: 500 .62rem/1 "IBM Plex Mono", monospace; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 3px 7px; margin-left: 8px; vertical-align: middle; }
input.ist-fehler, textarea.ist-fehler { border-color: var(--bad); outline: 2px solid var(--bad); outline-offset: 1px; }
