/* Blaumann Prototyp – Grundlagen: Schrift, Farben, Bausteine (E46, E47) */
/* „hidden“ gilt immer, auch wenn eine Klasse display setzt (sonst leere Kästen wie der Fehlerhinweis im Feedback) */
[hidden] { display: none !important; }

@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/barlow-semi-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/barlow-semi-condensed-700.woff2') format('woff2'); }

:root {
  --blau: #1F3A6B;
  --blau-900: #142847;
  --blau-700: #2A4C86;
  --blau-100: #E6ECF6;
  --blau-50: #F1F5FB;
  --gelb: #F2B705;
  --gelb-600: #DDA700;
  --gelb-100: #FFF3CC;
  --flaeche: #F4F6F9;
  --text: #1A1F27;
  --text-2: #475164;
  --text-3: #687285;
  --linie: #DCE1E8;
  --linie-2: #EBEEF2;
  --warn: #C2410C;
  --warn-dunkel: #8A2E08;
  --warn-100: #FDEDE4;
  --ok: #1F7A4D;
  --ok-100: #E2F2E9;
  --schatten: 0 1px 2px rgba(20, 40, 71, .06), 0 6px 18px rgba(20, 40, 71, .08);
  --schrift: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --schrift-schmal: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--schrift);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  background: #E4E9EF;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; }
code { font-size: .92em; background: var(--flaeche); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 3px solid rgba(242, 183, 5, .7); outline-offset: 2px; }
.ic { flex: none; display: inline-block; vertical-align: middle; }

/* Zahlen gleich breit, damit Zeiten nicht springen */
.zahl, [data-live], .tabular { font-variant-numeric: tabular-nums; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; line-height: 1.1;
  min-height: 40px; padding: 9px 16px; border-radius: 10px;
  border: 1.5px solid transparent; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; }
.btn--gelb { background: var(--gelb); color: var(--text); box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.btn--gelb:hover:not(:disabled) { background: var(--gelb-600); }
.btn--blau, .btn--primaer { background: var(--blau); color: #fff; }
.btn--blau:hover:not(:disabled), .btn--primaer:hover:not(:disabled) { background: var(--blau-700); }
.btn--dunkel { background: var(--blau-900); color: #fff; }
.btn--dunkel:hover:not(:disabled) { background: #0d1c33; }
.btn--umriss, .btn--sekundaer { background: #fff; border-color: var(--linie); color: var(--text); }
.btn--umriss:hover:not(:disabled), .btn--sekundaer:hover:not(:disabled) { border-color: #b4bfcd; background: var(--blau-50); }
.btn--gefahr { background: var(--warn); color: #fff; }
.btn--gefahr-text { color: var(--warn); }
.btn--hell { background: #fff; color: var(--blau); }
.btn--umriss-hell { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn--umriss-hell:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.btn--text { background: none; color: var(--blau); padding: 6px 8px; min-height: 0; }
.btn--text:hover { text-decoration: underline; }
.btn--text-hell { color: #fff; text-decoration: underline; min-height: 0; padding: 10px; width: 100%; opacity: .9; }
.btn--klein { min-height: 30px; padding: 5px 10px; font-size: 13px; border-radius: 8px; gap: 5px; }
.btn--gross { min-height: 56px; font-size: 17px; padding: 0 22px; border-radius: 12px; }
.btn--riesig { min-height: 84px; width: 100%; font-family: var(--schrift-schmal); font-size: 26px; font-weight: 700; letter-spacing: .01em; border-radius: 16px; gap: 12px; }
.btn--voll { width: 100%; }
.btn.aktiv { background: var(--blau-100); color: var(--blau); border-color: transparent; }

.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: var(--text-2); flex: none; }
.btn-icon:hover:not(:disabled) { background: rgba(31,58,107,.08); color: var(--blau); }
.btn-icon:disabled { opacity: .3; }
.btn-icon--gross { width: 48px; height: 48px; }
.btn-icon--klein { width: 26px; height: 26px; border-radius: 7px; }

/* ---------- Kennzeichen ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 999px; white-space: nowrap; background: #EDF0F4; color: var(--text-2); }
.chip--blau { background: var(--blau-100); color: var(--blau); }
.chip--gelb { background: var(--gelb-100); color: #6E5200; }
.chip--gruen { background: var(--ok-100); color: var(--ok); }
.chip--warn { background: var(--warn-100); color: var(--warn); }
.chip--grau { background: #EDF0F4; color: var(--text-2); }

.art-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 9px 3px 7px; border-radius: 999px; background: #F0F2F5; color: var(--text); white-space: nowrap; }
.art-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--art); }

.quelle { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 2px 6px; border-radius: 5px; background: #EDF0F4; color: var(--text-2); white-space: nowrap; }
.quelle--buero { background: var(--blau-100); color: var(--blau); }
.quelle--nachtrag { background: var(--gelb-100); color: #6E5200; }
.quelle--tablet { background: #E2F3F4; color: #0B6770; }
.quelle--nfc { background: #EDE7F6; color: #4A2F86; }

.komp { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--linie); color: var(--text-2); background: #fff; }
.komp--fehlt { border-color: var(--warn); color: var(--warn); background: var(--warn-100); }

.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blau-100); color: var(--blau); font-weight: 700; font-size: 13px; flex: none; }
.avatar--klein { width: 24px; height: 24px; font-size: 10px; }

.marke { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: #EDF0F4; color: var(--text-2); white-space: nowrap; }
.marke--warn { background: var(--warn-100); color: var(--warn); }
.marke--blau { background: var(--blau-100); color: var(--blau); }

.badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.punkt--puls { background: var(--gelb); box-shadow: 0 0 0 0 rgba(242,183,5,.6); animation: puls 1.8s infinite; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(242,183,5,.6); } 70% { box-shadow: 0 0 0 9px rgba(242,183,5,0); } 100% { box-shadow: 0 0 0 0 rgba(242,183,5,0); } }

/* Verweise auf das Entscheidungsprotokoll */
.e-ref { display: inline-block; font-family: var(--schrift); font-size: 10.5px; font-weight: 600; line-height: 1.5; letter-spacing: .02em; color: #6B7484; background: #EEF1F5; border: 1px dashed #C4CCD7; border-radius: 4px; padding: 0 4px; white-space: nowrap; vertical-align: middle; text-transform: none; }
body.ohne-e .e-ref { display: none; }
.annahme { display: inline-block; font-size: 10.5px; font-weight: 700; color: #6E5200; background: var(--gelb-100); border: 1px dashed #D9B24A; border-radius: 4px; padding: 0 5px; vertical-align: middle; cursor: help; }

/* ---------- Hinweise und Texte ---------- */
.hinweis { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--blau-50); color: var(--text-2); font-size: 13.5px; margin: 10px 0; }
.hinweis .ic { margin-top: 1px; color: var(--blau); }
.hinweis--warn { background: var(--warn-100); color: var(--warn-dunkel); }
.hinweis--warn .ic { color: var(--warn); }
.hinweis--ok { background: var(--ok-100); color: #155C39; }
.hinweis--ok .ic { color: var(--ok); }
.leer { color: var(--text-3); padding: 12px 4px; margin: 0; list-style: none; }
.gedimmt { color: var(--text-3); }
.warn-text { color: var(--warn); }
.ok-text { color: var(--ok); }
.klein { font-size: 12.5px; }
.zentriert { text-align: center; }
.fehler { padding: 24px; color: var(--warn); }

/* ---------- Formularfelder ---------- */
.feld { width: 100%; padding: 10px 12px; border: 1.5px solid var(--linie); border-radius: 10px; background: #fff; font-size: 15px; min-height: 44px; transition: border-color .15s, box-shadow .15s; }
.feld:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px rgba(31,58,107,.14); }
textarea.feld { resize: vertical; line-height: 1.45; }
.feld--zeit { width: 128px; font-variant-numeric: tabular-nums; }
.feld--kurz { width: 92px; }
.feld--mittel { width: 280px; }

.segment { display: inline-flex; background: #E7EBF0; border-radius: 10px; padding: 3px; gap: 2px; }
.segment__knopf { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.segment__knopf.aktiv { background: #fff; color: var(--blau); box-shadow: 0 1px 3px rgba(20,40,71,.15); }
.segment--umbruch { flex-wrap: wrap; }
.segment--dunkel { background: rgba(255,255,255,.12); }
.segment--dunkel .segment__knopf { color: rgba(255,255,255,.85); padding: 10px 18px; font-size: 16px; }
.segment--dunkel .segment__knopf.aktiv { background: #fff; color: var(--text); }

.filter { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.filter button { padding: 5px 11px; border-radius: 999px; font-weight: 600; font-size: 12.5px; color: var(--text-2); background: #EDF0F4; }
.filter button.aktiv { background: var(--blau); color: #fff; }
.filter em { font-style: normal; margin-left: 3px; opacity: .85; }

.chip-knopf { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1.5px solid var(--linie); border-radius: 999px; padding: 7px 12px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.chip-knopf:hover { border-color: var(--blau); color: var(--blau); }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--linie); border-radius: 10px; background: #fff; }
.stepper button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--blau); }
.stepper span { min-width: 74px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper--klein button { width: 30px; height: 30px; }
.stepper--klein span { min-width: 30px; }

.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #B4BECB; flex: none; background: #fff; transition: border .15s; }
.aktiv > .radio { border: 7px solid var(--blau); }

.balken { height: 8px; background: #E1E6EC; border-radius: 999px; overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--blau); border-radius: 999px; transition: width .3s; }
.balken--duenn { height: 4px; margin: 8px 0 4px; }

/* ---------- Prüfliste (Tablet und Büro) ---------- */
.pruefliste { list-style: none; margin: 0; padding: 0; }
.pruefliste li { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--linie-2); }
.pruefliste li:last-child { border-bottom: 0; }
.pruefliste small { display: block; font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.pruefliste__icon { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.pruefliste .ok .pruefliste__icon { background: var(--ok-100); color: var(--ok); }
.pruefliste .fehlt .pruefliste__icon { background: var(--warn-100); color: var(--warn); }
.pruefliste .frei .pruefliste__icon { background: #EEF1F5; color: var(--text-3); }

/* ---------- Kontoauszug (Handy und Büro) ---------- */
.auszug { list-style: none; margin: 0; padding: 0; }
.auszug li { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--linie-2); font-size: 14px; }
.auszug li:last-child { border-bottom: 0; }
.auszug__datum { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.auszug__text small { display: block; font-size: 12px; color: var(--text-3); }
.auszug__betrag { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.auszug__betrag.pos { color: var(--ok); }
.auszug__betrag.neg { color: var(--text); }

/* ---------- Vorher/Nachher ---------- */
.diff { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.diff th, .diff td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--linie-2); }
.diff thead th { font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.diff tbody th { color: var(--text-2); font-weight: 600; width: 70px; }
.diff__alt { color: var(--text-3); text-decoration: line-through; background: #F6F7F9; font-variant-numeric: tabular-nums; }
.diff__neu { color: var(--ok); background: var(--ok-100); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Meldungen ---------- */
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--blau-900); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14.5px; max-width: 560px; opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; }
.toast.sichtbar { opacity: 1; transform: none; }
.toast .ic { color: var(--gelb); margin-top: 1px; }
.toast--warn { background: var(--warn-dunkel); }
.toast--warn .ic { color: #FFD7C2; }
.toast--info { background: var(--blau-700); }

/* ---------- Dialoge ---------- */
.dlg-ov { position: fixed; inset: 0; z-index: 2500; background: rgba(12, 22, 40, .45); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .18s; }
.dlg-ov--lokal { position: absolute; z-index: 80; }
.dlg-ov.sichtbar { opacity: 1; }
.dlg { background: #fff; border-radius: 16px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.dlg--breit { max-width: 640px; }
.dlg__kopf { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 4px; }
.dlg__kopf h3 { margin: 0; font-family: var(--schrift-schmal); font-size: 22px; }
.dlg__zu { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); }
.dlg__inhalt { padding: 4px 18px 8px; color: var(--text-2); font-size: 15px; }
.dlg__fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 18px; flex-wrap: wrap; }
.dlg-ov--lokal .dlg__fuss .btn { min-height: 52px; flex: 1; font-size: 16px; }
