/* Stammdaten — eigene Gestaltung oberhalb von almas-design.css (FE 1.0.0) */

:root {
  --sd-rot: var(--almas-red, #D01317);
  --sd-flaeche: #FFFFFF;
  --sd-rand: #E8E8ED;
  --sd-rund: 14px;
}

/* Kein Seiten-Overflow: die Hauptspalte muss schrumpfen duerfen. */
.almas-main, .almas-content { min-width: 0; }

.view { max-width: 1180px; }
.hidden { display: none !important; }
.r { text-align: right; }

/* ───────────────────────────── Hinweis ───────────────────────────── */
.hinweis-karte {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(180deg, #FFFFFF, #FAFAFC);
  border: 1px solid var(--sd-rand);
  border-left: 3px solid var(--sd-rot);
  border-radius: var(--sd-rund);
  padding: 16px 18px; margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  font-size: 14px; line-height: 1.55; color: var(--text-secondary, #6E6E73);
}
.hinweis-karte strong { color: var(--text-primary, #1D1D1F); display: block; margin-bottom: 2px; }
.hinweis-symbol { font-size: 20px; line-height: 1; flex: none; }

/* ───────────────────────────── Schritte ───────────────────────────── */
.schritt {
  background: var(--sd-flaeche);
  border: 1px solid var(--sd-rand);
  border-radius: var(--sd-rund);
  padding: 22px; margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
}
.schritt-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.schritt-kopf h2 { font-size: 17px; font-weight: 600; margin: 0; }
.schritt-nr {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--sd-rot); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}

/* ───────────────────────────── Ablage ───────────────────────────── */
.ablage {
  border: 2px dashed #D2D2D7; border-radius: var(--sd-rund);
  padding: 40px 24px; text-align: center; cursor: pointer;
  background: #FCFCFD; transition: border-color .18s, background .18s, transform .18s;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.ablage:hover, .ablage:focus-visible { border-color: var(--sd-rot); background: rgba(208,19,23,.03); outline: none; }
.ablage.aktiv { border-color: var(--sd-rot); background: rgba(208,19,23,.06); transform: scale(1.01); }
.ablage-symbol { font-size: 38px; line-height: 1; }
.ablage-text strong { display: block; font-size: 15px; margin-bottom: 4px; }
.ablage-text span { font-size: 13px; color: var(--text-tertiary, #86868B); }

.lese-lauf { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--text-secondary); }
.lese-lauf .spinner {
  width: 18px; height: 18px; border: 2px solid var(--sd-rand);
  border-top-color: var(--sd-rot); border-radius: 50%; animation: dreh .7s linear infinite; flex: none;
}
@keyframes dreh { to { transform: rotate(360deg); } }

/* ───────────────────────────── Erkennung ───────────────────────────── */
.erkannt-leiste {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: #FAFAFC; border: 1px solid var(--sd-rand); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
}
.erkannt-haupt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.erkannt-label { font-size: 13px; color: var(--text-tertiary); }
.almas-select {
  font: inherit; font-size: 15px; font-weight: 600; padding: 7px 12px;
  border: 1px solid var(--sd-rand); border-radius: 9px; background: #fff; color: var(--text-primary);
  min-width: 0; max-width: 100%;
}
.almas-select:focus-visible { outline: 2px solid var(--sd-rot); outline-offset: 1px; }
.erkannt-sicher { font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.erkannt-sicher.ja { background: rgba(52,199,89,.12); color: #248A3D; }
.erkannt-sicher.nein { background: rgba(255,149,0,.14); color: #A65B00; }
.erkannt-zahlen { display: flex; gap: 18px; font-size: 13px; color: var(--text-secondary); }
.erkannt-zahlen strong { color: var(--text-primary); font-size: 15px; }

.warn-karte {
  background: rgba(255,149,0,.08); border: 1px solid rgba(255,149,0,.25);
  border-radius: 10px; padding: 13px 15px; margin-bottom: 16px;
  font-size: 14px; line-height: 1.5; color: #8A4B00;
}
.warn-karte strong { display: block; margin-bottom: 3px; }

.pruef-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.pruef-block { min-width: 0; }
.pruef-block h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.zaehler { font-size: 12px; font-weight: 600; color: var(--text-tertiary); background: #F0F0F3; padding: 2px 8px; border-radius: 999px; }
.block-hinweis { font-size: 12.5px; color: var(--text-tertiary); margin: 0 0 10px; line-height: 1.45; }

.zuordnung { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.zu-zeile {
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center; gap: 8px; font-size: 13px;
  background: #FAFAFC; border: 1px solid var(--sd-rand); border-radius: 8px; padding: 7px 10px;
}
.zu-feld { font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zu-pfeil { color: var(--text-tertiary); font-size: 12px; }
.zu-spalte { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ignoriert { display: flex; flex-wrap: wrap; gap: 6px; max-height: 320px; overflow-y: auto; }
.ig-marke {
  font-size: 12px; background: #F0F0F3; color: var(--text-secondary);
  padding: 4px 10px; border-radius: 999px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.vorschau-titel { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.tabelle-rahmen {
  border: 1px solid var(--sd-rand); border-radius: 10px; overflow-x: auto;
  background: #fff; margin-bottom: 22px;
}
.tabelle-rahmen table { margin: 0; }
.tabelle-rahmen th, .tabelle-rahmen td {
  white-space: nowrap; font-size: 13px; padding: 9px 12px;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis;
}
.leer-wert { color: #C7C7CC; }

/* ───────────────────────────── Modus ───────────────────────────── */
.modus-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.modus {
  display: flex; gap: 11px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--sd-rand); border-radius: 11px; padding: 14px 15px;
  background: #fff; transition: border-color .15s, background .15s;
}
.modus:hover { border-color: #C7C7CC; }
.modus:has(input:checked) { border-color: var(--sd-rot); background: rgba(208,19,23,.03); }
.modus input { margin-top: 2px; accent-color: var(--sd-rot); flex: none; }
.modus strong { display: block; font-size: 14px; margin-bottom: 3px; }
.modus span { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }

.schritt-aktionen { display: flex; justify-content: flex-end; gap: 10px; }

/* ───────────────────────────── Lauf ───────────────────────────── */
.balken-rahmen { height: 8px; background: #F0F0F3; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.balken { height: 100%; width: 0; background: var(--sd-rot); border-radius: 999px; transition: width .25s ease; }
.lauf-text { font-size: 13.5px; color: var(--text-secondary); }

.fertig-karte { display: flex; gap: 18px; align-items: flex-start; }
.fertig-symbol {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: rgba(52,199,89,.14); color: #248A3D;
  display: grid; place-items: center; font-size: 24px; font-weight: 700;
}
.fertig-inhalt { min-width: 0; }
.fertig-inhalt h2 { font-size: 18px; margin: 0 0 8px; }
.fertig-zahlen { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 16px; font-size: 14px; color: var(--text-secondary); }
.fertig-zahlen strong { display: block; font-size: 20px; color: var(--text-primary); font-weight: 600; }

/* ───────────────────────────── Stand ───────────────────────────── */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.karte {
  background: var(--sd-flaeche); border: 1px solid var(--sd-rand); border-radius: var(--sd-rund);
  padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
  min-width: 0;
}
.karte-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.karte-kopf h3 { font-size: 15px; font-weight: 600; margin: 0; }
.karte-zahl { font-size: 26px; font-weight: 600; line-height: 1; }
.karte-zahl.leer { color: #C7C7CC; }
.karte-zeile { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.karte-zeile.leer-hinweis { color: var(--text-tertiary); font-style: italic; }
.karte-felder { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--sd-rand); }
.karte-felder .ig-marke { font-size: 11px; padding: 3px 8px; }

.status-marke { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.status-marke.fertig { background: rgba(52,199,89,.12); color: #248A3D; }
.status-marke.laufend { background: rgba(0,122,255,.12); color: #0057B8; }
.status-marke.abgebrochen { background: rgba(255,59,48,.10); color: #B3261E; }

/* ───────────────────────────── Schmal ───────────────────────────── */
@media (max-width: 900px) {
  .pruef-raster, .modus-wahl { grid-template-columns: 1fr; }
  .erkannt-leiste { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .ablage.aktiv { transform: none; }
}
