/* ══════════════════════════════════════════════════════════════════════
   klaro · ui.css
   ──────────────────────────────────────────────────────────────────────
   Handgepflegtes BEM-CSS-Framework. Kein Build, kein Tailwind.

   Konvention:
     Block      → .ui-kpi
     Element    → .ui-kpi__value
     Modifier   → .ui-kpi--up         (am Block)
                  .ui-kpi__sub--up    (am Element)

   Namespace `ui-` läuft während der Migration parallel zu app.css.
   Sobald alle Seiten migriert sind, fällt das Präfix weg.

   Reihenfolge:
     1. Tokens
     2. Reset (gescoped auf .ui-root)
     3. Layout-Blöcke   (shell, topbar, greeting, *-grid)
     4. Atomare Blöcke  (btn, pill, tag, badge, icon-btn, search)
     5. Verbund-Blöcke  (kpi, action, activity, tx-row)
     6. Hilfs-Blöcke    (pipeline-bar)
     7. Responsive
   ══════════════════════════════════════════════════════════════════════ */


/* ── 1. Tokens ─────────────────────────────────────────────────────── */
:root {
  /* Flächen */
  --bg-page:        #FAF9F6;
  --bg-surface:     #FFFFFF;
  --bg-muted:       #F4F2EC;
  --bg-subtle:      #F8F7F2;

  /* Linien */
  --border:         #ECEAE3;
  --border-soft:    #F2F0EA;

  /* Text */
  --text:           #1A1A1A;
  --text-muted:     #6B6B6B;
  --text-subtle:    #9A9890;

  /* Status-Farben — pro Status: vibrant (für Dots), bg, text, border.
     Vollständig & symmetrisch über alle vier States hinweg. */
  --success:        #16A34A;
  --success-bg:     #F0FDF4;
  --success-text:   #166534;
  --success-border: #A7F3D0;
  --warning:        #D97706;
  --warning-bg:     #FFFBEB;
  --warning-text:   #92400E;
  --warning-border: #FDE68A;
  --danger:         #DC2626;
  --danger-bg:      #FEF2F2;
  --danger-text:    #991B1B;
  --danger-border:  #FECACA;
  --info:           #2563EB;
  --info-bg:        #EFF6FF;
  --info-text:      #1E40AF;
  --info-border:    #BFDBFE;
  --neutral-text:   #4B5563;     /* dunkles Grau für Tag/Badge auf neutralem Hintergrund */

  /* Pending-Highlight (warmer Orange-Schimmer für offene Vorschläge) */
  --bg-pending:       #FFFBF5;
  --bg-pending-hover: #FFF6E8;

  /* Selected-State (Tabellen-Zeile / Karte ist in Bulk- oder Detail-Auswahl) */
  --bg-selected:       #F2F0EA;
  --bg-selected-hover: #ECEAE3;

  /* Tag-Farben (semantische Kategorien) */
  --tag-pink-bg:    #FCE7F3;
  --tag-pink-text:  #9D174D;
  --tag-amber-bg:   #FEF3C7;
  --tag-amber-text: #92400E;

  /* Spacing-Skala */
  --gap-xs:  8px;
  --gap-sm: 14px;
  --gap-md: 20px;
  --gap-lg: 28px;
  --gap-xl: 40px;

  /* Radien */
  --radius-card: 16px;
  --radius-pill: 999px;
  --radius-sm:    8px;

  /* Typo */
  --font-sans: -apple-system, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --font-mono: 'Google Sans Code', ui-monospace, 'SFMono-Regular', monospace;
}


/* ── 2. Soft-Scope & Layout-Wrapper ────────────────────────────────── */

/* `.ui-shell-wrap` umschließt globale Topbar + alle Page-Container.
   Setzt nur Box-Sizing + Schrift, KEINE destruktiven Resets — sonst
   würden alte, noch nicht migrierte Pages umkippen. Komponenten setzen
   ihre eigenen Margins/Borders/Backgrounds explizit. */
.ui-shell-wrap {
  font-family: var(--font-sans);
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  -webkit-font-smoothing: antialiased;
  color: var(--text);
}
.ui-shell-wrap *,
.ui-shell-wrap *::before,
.ui-shell-wrap *::after { box-sizing: border-box; }

/* Soft-Link-Reset — überschreibt nur Browser-Default für a:link/visited.
   Spezifität (0,1,1) === Browser-Default, ui.css kommt später → wir gewinnen.
   Komponenten setzen ihre eigene Farbe; wenn kein Style → erbt Page-Text. */
.ui-shell-wrap a, .ui-shell-wrap a:link, .ui-shell-wrap a:visited {
  color: inherit;
  text-decoration: none;
}
.ui-shell-wrap a:hover { text-decoration: none; }

/* Focus-Outlines komplett aus — explizite Entscheidung 2026-04-26:
   die App wird nie per Tastatur navigiert, der globale Tab-Ring war
   nur visuelles Geräusch. Wir killen nur den outline (Browser-Default
   und :focus-visible), Box-Shadows bleiben unangetastet, weil die
   etliche Komponenten als echte Schatten brauchen. Form-Inputs zeigen
   ihren Focus-State über border-color — siehe weiter unten in den
   jeweiligen Komponenten-Definitionen. */
.ui-shell-wrap *:focus,
.ui-shell-wrap *:focus-visible { outline: none; }

/* `.ui-root` ist der Wrapper für komplett neu gebaute Page-Inhalte
   (z. B. Dashboard). Erbt alles von .ui-shell-wrap. */
.ui-root {
  background: transparent;
  color: var(--text);
}

/* Modus am body — Sidebar versteckt, .main wird zum Shell-Container.   */
body.ui-mode {
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
body.ui-mode .main {
  background: var(--bg-page);
  display: block;            /* überschreibt das alte flex */
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px 32px 48px;
  height: auto;
  overflow: visible;         /* WICHTIG: alte app.css hat .main { overflow:auto } —
                                das würde sticky auf .ui-detail brechen, weil sticky
                                relativ zum nächsten scrollenden Vorfahren greift.
                                Mit overflow:visible scrollt wieder body, sticky greift. */
}
body.ui-mode .page.active { padding: 0; display: block; height: auto; }
/* Migrierte Pages: kein .page-inner, nutzen direkt .ui-root + Komponenten. */
/* Legacy-Pages mit .page-inner: horizontales Padding kommt jetzt von .main,
   vertikales Padding behalten sie für ihren alten Layout-Charakter. */
body.ui-mode .page-inner { padding-left: 0; padding-right: 0; padding-top: 24px; }


/* ── 3. Layout-Blöcke ─────────────────────────────────────────────── */

/* Shell — der zentrierte Inhalts-Container */
.ui-shell { max-width: 1680px; margin: 0 auto; }

/* Topbar */
.ui-topbar {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Sticky am oberen Rand: Topbar bleibt beim Scrollen oben kleben.
     `top` matcht das Page-Padding-Top von .main (28px) auf Desktop, wird
     im Mobile-Block auf 16px gesetzt. z-index hoch genug, damit Cards/
     Tabellen-Rows beim Scrollen darunter durchgleiten. */
  position: sticky;
  top: 28px;
  z-index: 30;
}
.ui-topbar__brand { display: flex; align-items: center; gap: 36px; }
.ui-topbar__logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.ui-topbar__logo svg { fill: var(--text); }
.ui-topbar__nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-muted);
}
.ui-topbar__nav-link {
  /* Padding/Margin/Border identisch für alle States — kein Layout-Shift
     beim Aktiv-Werden. Nur die Border-Color wechselt. */
  display: inline-block;
  padding: 4px 0 18px;
  margin-bottom: -19px;
  /* WICHTIG: explizit alle 4 Borders zurücksetzen — sonst zieht der
     Browser bei <button>-Variante (Mehr-Dropdown) seine Default-Borders
     an top/left/right rein. */
  border: 0;
  border-bottom: 1.5px solid transparent;
  background: none;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  transition: color .12s, border-color .12s;
}
.ui-topbar__nav-link:hover { color: var(--text); }
.ui-topbar__nav-link--active {
  color: var(--text);
  border-bottom-color: var(--text);
  /* Bewusst KEIN font-weight-Wechsel — das verändert die Breite und
     lässt die Nav „tanzen". Der Active-State markiert sich nur über
     Border-Color + Text-Farbe. */
}
.ui-topbar__nav-link--active:hover { color: var(--text); }
.ui-topbar__actions { display: flex; align-items: center; gap: 8px; }

/* Page-Title in Topbar — auf Desktop unsichtbar (Nav übernimmt),
   auf Mobile sichtbar (Bottom-Nav übernimmt Navigation, Topbar zeigt Position). */
.ui-topbar__page-title {
  display: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-left: 4px;
}

/* Status-Strip — sitzt unter der Topbar auf Mobile, zeigt Lauf-Status + Monat.
   Auf Desktop unsichtbar, weil Topbar dort beides im Pill-Format hat. */
.ui-topbar-status {
  display: none;
}
.ui-topbar__divider {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 4px;
}
/* Monat-Pill: sichtbarer Pill-Button, daneben unsichtbares <select>
   für die native Auswahl-Funktion. */
.ui-topbar__month { position: relative; }
.ui-topbar__month-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font: inherit;
}

/* Greeting */
.ui-greeting {
  padding: var(--gap-xl) 6px var(--gap-md);
  display: flex;
  align-items: center;        /* center, damit Action-Buttons rechts vertikal
                                 mittig zwischen Title und Meta sitzen — vorher
                                 baseline (Button hing oben in der Luft). */
  justify-content: space-between;
  gap: 16px;
}
.ui-greeting__title {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.ui-greeting__meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Grids — Block-Layouts für Karten-Reihen */
.ui-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-sm);
  margin-bottom: var(--gap-md);
}
.ui-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-sm);
  margin-bottom: var(--gap-lg);
}


/* ── 4. Atomare Blöcke ────────────────────────────────────────────── */

/* Button */
.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.ui-btn--primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.ui-btn--primary:hover { opacity: 0.9; }
.ui-btn--secondary {
  background: var(--bg-surface);
  color: var(--text);
  border-color: var(--border);
}
.ui-btn--secondary:hover { background: var(--bg-muted); }
.ui-btn--ghost {
  background: transparent;
  color: var(--text-muted);
}
.ui-btn--ghost:hover {
  background: var(--bg-muted);
  color: var(--text);
}

/* Icon-Button (quadratisch, nur Icon) */
.ui-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  border: 0.5px solid transparent;
  transition: background .12s, color .12s;
}
.ui-icon-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
}
.ui-icon-btn--success { color: var(--success); }
.ui-icon-btn--success:hover { background: var(--success-bg); color: var(--success-text); }
.ui-icon-btn--danger  { color: var(--danger); }
.ui-icon-btn--danger:hover { background: var(--danger-bg); color: var(--danger-text); }
.ui-icon-btn__svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Pill (Topbar-Right-Pills, Filter-Pills) */
.ui-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  color: var(--text);
  cursor: pointer;
  border: 0.5px solid var(--border);
  transition: background .12s;
}
.ui-pill:hover { background: var(--bg-subtle); }
.ui-pill--primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.ui-pill--primary:hover { background: var(--text); opacity: 0.92; }
.ui-pill--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.ui-pill--ghost:hover { background: var(--bg-muted); color: var(--text); }
.ui-pill__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

/* Tag (semantische Kategorien — sevdesk-Tags) */
.ui-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 7px;
  line-height: 1.4;
  background: var(--bg-muted);
  color: var(--neutral-text);
  white-space: nowrap;        /* niemals umbrechen — sonst Layout-Wackler */
}
/* Modifier --inline: kleinere Variante für engere Layouts (Mobile-Karten,
   Sub-Zeile in Tabellen-Zeilen). */
.ui-tag--inline {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  gap: 4px;
}
.ui-tag--success { background: var(--success-bg); color: var(--success-text); }
.ui-tag--warning { background: var(--warning-bg); color: var(--warning-text); }
.ui-tag--danger  { background: var(--danger-bg);  color: var(--danger-text); }
.ui-tag--info    { background: var(--info-bg);    color: var(--info-text); }
.ui-tag--pink    { background: var(--tag-pink-bg);  color: var(--tag-pink-text); }
.ui-tag--amber   { background: var(--tag-amber-bg); color: var(--tag-amber-text); }

/* Badge (Status-Indikator — visuell wie Tag, semantisch anders) */
.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 8px;
  line-height: 1.4;
  white-space: nowrap;        /* niemals umbrechen — Status-Spalte muss stabil bleiben */
}
.ui-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-subtle);
  flex-shrink: 0;
}
.ui-badge--success { background: var(--success-bg); color: var(--success-text); }
.ui-badge--success::before { background: var(--success); }
.ui-badge--warning { background: var(--warning-bg); color: var(--warning-text); }
.ui-badge--warning::before { background: var(--warning); }
.ui-badge--danger  { background: var(--danger-bg);  color: var(--danger-text); }
.ui-badge--danger::before  { background: var(--danger); }
.ui-badge--info    { background: var(--info-bg);    color: var(--info-text); }
.ui-badge--info::before    { background: var(--info); }
.ui-badge--neutral { background: var(--bg-muted);   color: var(--neutral-text); }

/* Dropdown — generisches Menü-Pattern, Alpine-getrieben (open: true/false).
   Wird aktuell vom „Mehr"-Menü in der Topbar genutzt. */
.ui-dropdown {
  position: relative;
  display: inline-block;
}
.ui-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ui-dropdown__item {
  display: block;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text);
  border-radius: 7px;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
}
.ui-dropdown__item:hover { background: var(--bg-muted); }
.ui-dropdown__item--active { background: var(--bg-muted); font-weight: 500; }

/* „Mehr"-Button in der Topbar — als Nav-Link gestylt aber mit Caret */
.ui-topbar__nav-more {
  display: inline-flex;
  align-items: center;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

/* Search (Input mit Icon-Slot) */
.ui-search {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ui-search__input {
  font-size: 13px;
  padding: 8px 12px;
  border: 0.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg-page);
  width: 240px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.ui-search__input:focus,
.ui-search__input:focus-visible {
  outline: none;            /* WICHTIG: globaler Focus-Ring würde sonst
                               über das Border laufen — eigener Focus-
                               Indikator über border + soft box-shadow. */
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.05);
}


/* ── 5. Verbund-Blöcke ────────────────────────────────────────────── */

/* Card (Basis-Block, in andere Komponenten kompositioniert) */
.ui-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
}

/* KPI-Karte */
.ui-kpi {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 26px;
}
.ui-kpi__label {
  font-size: 13px;
  color: var(--text-muted);
}
.ui-kpi__value {
  font-size: 32px;
  font-weight: 500;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.8px;
  line-height: 1.1;
}
.ui-kpi__sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
}
.ui-kpi__sub--up   { color: var(--success); }
.ui-kpi__sub--down { color: var(--danger); }
.ui-kpi__bar {
  height: 5px;
  background: var(--bg-muted);
  border-radius: 999px;
  margin-top: 16px;
  overflow: hidden;
}
.ui-kpi__bar-fill {
  height: 100%;
  background: var(--text);
  border-radius: 999px;
}

/* Action-Tile (Quick Action) */
.ui-action {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.ui-action:hover {
  background: var(--bg-subtle);
  border-color: var(--text-subtle);
}
.ui-action__icon {
  width: 42px;
  height: 42px;
  background: var(--bg-muted);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ui-action__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-action__title {
  font-size: 14.5px;
  font-weight: 500;
}
.ui-action__sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Activity-Karte (Container für TX-Tabelle) */
.ui-activity {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.ui-activity__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 0.5px solid var(--border-soft);
}
.ui-activity__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}
.ui-activity__filters {
  display: flex;
  gap: 4px;
  font-size: 13px;
  margin-left: 22px;
}
.ui-activity__filter {
  padding: 6px 14px;
  border-radius: 9px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.ui-activity__filter:hover {
  color: var(--text);
  background: var(--bg-muted);
}
.ui-activity__filter--active,
.ui-activity__filter--active:hover {
  background: var(--text);
  color: #fff;
}
.ui-activity__filter--active b { font-weight: 500; }
.ui-activity__search { display: flex; align-items: center; gap: 10px; }
.ui-activity__body { /* Container für tx-row Liste */ }

/* (Alter Dashboard-TX-Row-Block ist entfallen — Dashboard nutzt jetzt
   .ui-tx-cards/.ui-tx-card. Die nachfolgende TX-Page-Tabelle .ui-tx-row
   ist NICHT identisch — siehe weiter unten beim Tabellen-Refactor.) */


/* ── 6. Hilfs-Blöcke ──────────────────────────────────────────────── */

.ui-pipeline-bar {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-subtle);
  padding: 14px 26px;
  border-top: 0.5px solid var(--border-soft);
  background: var(--bg-page);
  display: flex;
  align-items: center;
  gap: 14px;
}
.ui-pipeline-bar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}


/* ── 7. Responsive ────────────────────────────────────────────────── */


/* ══════════════════════════════════════════════════════════════════════
   TX-PAGE Komponenten — werden auf der Transaktionen-Seite genutzt.
   Eigene Sektion, weil die TX-Page deutlich mehr Komponenten braucht
   als Dashboard (Bulk, Drawer, Karten-Liste, Bottom-Nav, FAB).
   ══════════════════════════════════════════════════════════════════════ */

/* ── Checkbox (Multi-Select, sowohl Bulk als auch Match-Liste) ──────── */
/* Häkchen als inline-SVG im background-image — perfekt zentriert in
   jedem Kontext, anders als die alte border-rotate-Trickserei (die
   visuell schief in der Box saß, weil die rotierte Bounding-Box nie
   zur eigentlichen Glyph-Position passte). */
.ui-checkbox {
  display: inline-block;
  width: 18px; height: 18px;
  border: 1.5px solid var(--text-subtle);
  border-radius: 5px;
  background: var(--bg-surface) center / 12px 12px no-repeat;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: background-color .12s, border-color .12s;
}
.ui-checkbox:hover { border-color: var(--text); }
.ui-checkbox--checked {
  background-color: var(--text);
  border-color: var(--text);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}
.ui-checkbox--sm {
  width: 16px; height: 16px; border-radius: 4px;
  background-size: 10px 10px;
}

/* ── Tabellen-Container (TX + Belege) ──────────────────────────────
   Parallele Klassen mit identischem CSS:
   - .ui-tx-table für TX-Page-Tabelle (Spalten: Checkbox · Datum · Empfänger ·
     Tag · Betrag · Beleg · Status)
   - .ui-receipt-table für Belege-Tabelle (Spalten: Checkbox · Datum ·
     Lieferant · Tag · Betrag · Verknüpfte TX · Status · Aktionen)
   Gleicher visueller Container (weiße Karte mit Border + Radius), unterschied-
   liche Spaltenlayouts werden auf den Row-Klassen gesetzt. */
.ui-tx-table,
.ui-receipt-table {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
/* ── Tabellen-Row (TX + Belege) ────────────────────────────────────
   Gemeinsame Container-Eigenschaften (Padding, Border, Hover, Selection,
   Header-Stil). Domain-spezifisch ist nur das `grid-template-columns`
   weiter unten — TX nutzt CSS-Variable für den Spalten-Picker, Belege
   hat festes 8-Spalten-Layout.

   `--pending` (TX, KI-Vorschlag) und `--unmatched` (Belege, ohne Zuordnung)
   sind semantisch parallel: beides ist ein „braucht-Aufmerksamkeit"-State.
   Daher gleiche warm-orange-Tönung. */
.ui-tx-row,
.ui-receipt-row {
  display: grid;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 0.5px solid var(--border-soft);
  font-size: 13.5px;
  column-gap: 14px;
  cursor: pointer;
  transition: background .12s;
}
/* Domain-spezifische Spalten-Layouts */
.ui-tx-row {
  /* TX-Spalten kommen aus dem Container via CSS-Variable, damit der
     Spalten-Picker dynamisch andere Layouts setzen kann. Fallback ist
     das Voll-Layout mit allen 7 Spalten. */
  grid-template-columns: var(--tx-cols, 40px 80px minmax(0, 1fr) 140px 110px 130px 130px);
}
.ui-receipt-row {
  /* Belege-Spalten: Checkbox · Datum · Lieferant · Tag · Betrag ·
     Verknüpfte TX · Status · Aktionen (8 Spalten, fest). */
  grid-template-columns: 40px 80px minmax(0, 1fr) 140px 110px minmax(0, 1fr) 130px 150px;
}

.ui-tx-row:hover:not(.ui-tx-row--head),
.ui-receipt-row:hover:not(.ui-receipt-row--head) { background: var(--bg-subtle); }
.ui-tx-row:last-of-type,
.ui-receipt-row:last-of-type { border-bottom: 0; }

.ui-tx-row--head,
.ui-receipt-row--head {
  padding: 12px 22px;
  background: var(--bg-page);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  cursor: default;
}

/* Sortier-Header — sichtbarer Hover, kompakter Pfeil bei aktiver Spalte.
   Das align-items kommt aus .ui-tx-row und sorgt dafür, dass Label +
   Arrow vertikal mittig stehen. user-select: none verhindert das nervige
   Text-Markieren beim Doppelklick zum Sortieren. */
.ui-th--sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  /* Hit-Area etwas vergrößern, sonst fühlt sich der Klick wie aufs Pixel
     genau zielen an. Padding statt height, damit der Header dieselbe
     Höhe behält wie nicht-sortierbare Spalten. */
  padding: 2px 0;
}
.ui-th--sort:hover { color: var(--text); }
.ui-th--sort-active { color: var(--text); }
.ui-th--right { justify-content: flex-end; }
.ui-th-arrow {
  font-size: 10px;
  opacity: 0.85;
  /* Mindestbreite, damit der Header nicht zuckt wenn man zwischen
     leerem Pfeil (inaktive Spalte) und ↑/↓ wechselt. */
  min-width: 8px;
  display: inline-block;
}

.ui-tx-row--selected,
.ui-receipt-row--selected         { background: var(--bg-selected); }
.ui-tx-row--selected:hover,
.ui-receipt-row--selected:hover   { background: var(--bg-selected-hover); }

/* „Braucht Aufmerksamkeit"-State: TX bei KI-Vorschlag (pending),
   Receipt wenn unzugeordnet (unmatched). Gleiche warm-orange-Tönung. */
.ui-tx-row--pending,
.ui-receipt-row--unmatched          { background: var(--bg-pending); }
.ui-tx-row--pending:hover,
.ui-receipt-row--unmatched:hover    { background: var(--bg-pending-hover); }

.ui-tx-row__date       { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Empfänger-Container — min-width:0 nötig damit ellipsis im Grid greift.
   Beide Sub-Zeilen bekommen nowrap + ellipsis: lange Empfänger-Namen wie
   „ZAHLUNGSVERKEHR BERLINER FINANZAEMTER" werden auf eine Zeile gekürzt.
   Voller Name bleibt im title-Attribut sichtbar (Hover-Tooltip). */
.ui-tx-row__payee      { min-width: 0; }
.ui-tx-row__payee-main {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui-tx-row__payee-sub  {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui-tx-row__amount     { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; font-size: 14px; white-space: nowrap; }

/* Amount-Cell mit optionaler Sub-Zeile: zeigt graue Zeile unter dem
   TX-Betrag, wenn der Beleg-Betrag abweicht (andere Währung oder
   anderer Betrag). Hilft beim Erkennen von „falscher Beleg" oder
   „mehrere Belege nötig". Spiegelt das Pattern von __payee-sub. */
.ui-tx-row__amount-cell { display: flex; flex-direction: column; align-items: flex-end; }
.ui-tx-row__amount-sub  {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: help;
}

/* Beleg-Cell: Icon + optional Anzahl, oder Match-Score, oder leer */
.ui-tx-beleg { display: flex; align-items: center; gap: 6px; }
.ui-tx-beleg__icon  { color: var(--text-muted); flex-shrink: 0; }
.ui-tx-beleg__count { font-size: 12.5px; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.ui-tx-beleg__empty { font-size: 12.5px; color: var(--danger-text); font-weight: 500; }
.ui-tx-beleg__noop  { font-size: 12.5px; color: var(--text-subtle); }
.ui-tx-beleg__score {
  background: var(--warning-bg); color: var(--warning-text);
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── Filter-Bar (TX + Belege) ──────────────────────────────────────
   Parallele Klassen: .ui-tx-filter-bar (TX-Page) und .ui-receipt-filter-bar
   (Belege-Page). Gleiche visuelle Sprache, gleiches CSS — Domain-Trennung
   nur fürs Lesen im Markup. */
.ui-tx-filter-bar,
.ui-receipt-filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  margin-top: 16px;
  flex-wrap: wrap;
}
.ui-tx-filter-bar__divider,
.ui-receipt-filter-bar__divider {
  display: inline-block;
  width: 1px; height: 22px;
  background: var(--border);
  margin: 0 4px;
}
.ui-tx-filter-bar__spacer,
.ui-receipt-filter-bar__spacer { flex: 1; }

/* ── Bulk-Action-Bar (zeigt sich bei Selection) ─────────────────────── */
.ui-bulk-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-card);
  margin-top: 12px;
  font-size: 13.5px;
}
.ui-bulk-bar__count    { font-weight: 500; }
.ui-bulk-bar__divider  { width: 1px; height: 18px; background: rgba(255,255,255,0.2); margin: 0 4px; }
.ui-bulk-bar__action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  color: #fff; cursor: pointer; background: none; border: 0;
  font: inherit;
  transition: background .12s;
}
.ui-bulk-bar__action:hover { background: rgba(255,255,255,0.12); }
.ui-bulk-bar__close {
  margin-left: auto;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; cursor: pointer;
  color: rgba(255,255,255,0.7); background: none; border: 0;
}
.ui-bulk-bar__close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ── Detail-Sidebar / Drawer (Desktop = Spalte, Tablet+Mobile = Overlay) ── */
.ui-tx-layout,
.ui-receipt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 16px;
  margin-top: 16px;
}
.ui-tx-layout--no-detail,
.ui-receipt-layout--no-detail { grid-template-columns: minmax(0, 1fr); }

.ui-detail {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  align-self: start;
  position: sticky; top: 16px;
  max-height: calc(100vh - 60px);
  display: flex; flex-direction: column;
}
.ui-detail__head {
  padding: 18px 22px;
  border-bottom: 0.5px solid var(--border-soft);
  display: flex; align-items: center; gap: 12px;
}
.ui-detail__head-text { flex: 1; min-width: 0; }
.ui-detail__title { font-size: 14px; font-weight: 500; margin: 0; }
.ui-detail__sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ui-detail__back {
  display: none;       /* Desktop: kein Back-Button (X rechts erfüllt den Zweck) */
}
.ui-detail__close {
  margin-left: auto;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; cursor: pointer;
  color: var(--text-muted); background: none; border: 0;
}
.ui-detail__close:hover { background: var(--bg-muted); color: var(--text); }

.ui-detail__body {
  overflow-y: auto;
  padding: 18px 22px;
  display: flex; flex-direction: column; gap: 22px;
  flex: 1;
}
.ui-detail__actions {
  padding: 14px 22px;
  border-top: 0.5px solid var(--border-soft);
  display: flex; gap: 8px;
  background: var(--bg-surface);
}

/* Generische Section innerhalb Detail */
.ui-detail-section { display: flex; flex-direction: column; gap: 8px; }
.ui-detail-section__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-subtle); font-weight: 500;
}
.ui-detail-empty {
  font-size: 13px; color: var(--text-muted);
  padding: 12px 14px;
  background: var(--bg-page);
  border: 0.5px dashed var(--border);
  border-radius: 10px;
}
.ui-detail-grid { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; font-size: 13.5px; }
.ui-detail-grid dt { color: var(--text-muted); }
.ui-detail-grid dd { margin: 0; font-variant-numeric: tabular-nums; }
.ui-detail-grid dd.mono { font-family: var(--font-mono); font-size: 12.5px; }
/* Filename in der Daten-Tabelle — vollständig sichtbar, bricht um statt
   horizontal zu scrollen. Mono-Schrift, alle Bruchpunkte erlaubt. */
.ui-detail-grid__filename {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* Beleg-Vorschau (Platzhalter — im echten Build iframe oder Bild). */
.ui-beleg-preview {
  display: flex; flex-direction: column; gap: 10px;
}
.ui-beleg-preview__page {
  width: 100%;
  min-height: 200px;
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-size: 11px; line-height: 1.5;
  display: flex; flex-direction: column; gap: 8px;
}
.ui-beleg-preview__vendor  { font-weight: 500; font-size: 12px; color: var(--text); }
.ui-beleg-preview__meta    { font-size: 10px; color: var(--text-muted); }
.ui-beleg-preview__divider { height: 0.5px; background: var(--border); margin: 4px 0; }
.ui-beleg-preview__line    { background: var(--bg-muted); height: 8px; border-radius: 3px; }
.ui-beleg-preview__line--short  { width: 60%; }
.ui-beleg-preview__line--medium { width: 80%; }
.ui-beleg-preview__total {
  margin-top: auto;
  display: flex; justify-content: space-between;
  font-size: 11px; font-weight: 500;
  color: var(--text);
}
.ui-beleg-preview__caption {
  font-size: 11.5px; color: var(--text-muted); text-align: center;
}

/* Match-Liste (Vorschläge in der Sidebar) */
.ui-match-list { display: flex; flex-direction: column; gap: 8px; }
.ui-match-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.ui-match-item:hover { background: var(--bg-subtle); border-color: var(--text-subtle); }
.ui-match-item--active { background: var(--bg-pending); border-color: var(--warning); }
.ui-match-item__main { font-size: 13px; flex: 1; min-width: 0; }
.ui-match-item__sub  { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.ui-match-item__score { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* ── Manual-Match-Item (Liste im „Bestehende Belege verknüpfen"-Modal) ──
   Zwei-Spalten-Layout: links Name + Dateiname, rechts Betrag + Datum.
   Reduzierte Variante des TX-/Belege-Listenmusters — der Modal-Kontext
   braucht weniger visuelles Rauschen, daher nur eine Trennlinie zwischen
   den Items, kein Border-Box pro Zeile. Hover und checked-State leihen
   sich von Tabellen. */
.ui-mm-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 6px;
  border-bottom: 0.5px solid var(--border-soft);
  cursor: pointer;
  transition: background .12s;
}
.ui-mm-item:last-child { border-bottom: 0; }
.ui-mm-item:hover { background: var(--bg-subtle); }
.ui-mm-item--checked { background: var(--bg-selected); }
.ui-mm-item--checked:hover { background: var(--bg-selected-hover); }

/* Checkbox vertikal zentriert (wie in der TX-Tabelle) — bei zwei Zeilen
   (Vendor + Sub) sitzt sie damit ruhig mittig statt am oberen Rand. */
.ui-mm-item .ui-checkbox { flex-shrink: 0; }

.ui-mm-item__body { flex: 1; min-width: 0; }
.ui-mm-item__vendor {
  font-size: 14px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-mm-item__filename {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Rechte Spalte — Betrag + Datum, rechtsbündig */
.ui-mm-item__meta {
  flex-shrink: 0; text-align: right; min-width: 110px;
}
.ui-mm-item__amount {
  font-size: 14px; font-weight: 500; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ui-mm-item__date {
  font-size: 12px; color: var(--text-muted); margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* ── Multi-Belege-Status-Indikator (Modal-Footer) ────────────────────
   Live-Anzeige beim Beleg-Auswählen: ok wenn Summe matcht, short/over
   wenn Differenz da ist, info bei gemischten Währungen. Klar visuell
   nach Status getrennt (grün/gelb/rot/blau), aber nie hart blockierend
   — der „Trotzdem zuordnen"-Button bleibt immer erlaubt. */
.ui-mm-status {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  border: 0.5px solid transparent;
  width: 100%;
  box-sizing: border-box;
}
.ui-mm-status__icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ui-mm-status__main { flex: 1; min-width: 0; }
.ui-mm-status__title { font-weight: 500; }
.ui-mm-status__title strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.ui-mm-status__detail { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.ui-mm-status--ok {
  background: var(--success-bg); color: var(--success-text);
  border-color: var(--success-border);
}
.ui-mm-status--ok .ui-mm-status__icon { background: var(--success); color: #fff; }
.ui-mm-status--ok .ui-mm-status__detail { color: var(--success-text); opacity: 0.85; }

.ui-mm-status--short {
  background: var(--warning-bg); color: var(--warning-text);
  border-color: var(--warning-border);
}
.ui-mm-status--short .ui-mm-status__icon { background: var(--warning); color: #fff; }
.ui-mm-status--short .ui-mm-status__detail { color: var(--warning-text); opacity: 0.85; }

.ui-mm-status--over {
  background: var(--danger-bg); color: var(--danger-text);
  border-color: var(--danger-border);
}
.ui-mm-status--over .ui-mm-status__icon { background: var(--danger); color: #fff; }
.ui-mm-status--over .ui-mm-status__detail { color: var(--danger-text); opacity: 0.85; }

.ui-mm-status--info {
  background: var(--info-bg); color: var(--info-text);
  border-color: var(--info-border);
}
.ui-mm-status--info .ui-mm-status__icon { background: var(--info); color: #fff; }
.ui-mm-status--info .ui-mm-status__detail { color: var(--info-text); opacity: 0.85; }

/* Footer-Stack-Modifier: Status oben, Aktionen unten — wird im
   Manual-Match-Modal genutzt, weil dort Status + Aktionen zusammen
   mehr Höhe brauchen als die einfache Footer-Single-Row. */
.ui-modal__footer--stack {
  flex-direction: column; align-items: stretch; gap: 14px;
  padding-top: 16px; padding-bottom: 16px;
}
.ui-modal__footer-row {
  display: flex; gap: 8px; align-items: center; justify-content: flex-end;
}

/* ── Multi-Belege-Liste im TX-Detail-Drawer ──────────────────────────
   Erweiterungen für ui-match-item, damit pro-Beleg ein Betrag
   angezeigt wird (Multi-Kontext braucht das, Single-Beleg vorher hat
   das nicht gebraucht). Plus Summen-Footer unter der Liste. */
.ui-match-item__amount {
  font-size: 12px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.ui-match-list-summary {
  display: flex; justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: 8px;
  font-size: 13px;
  margin-top: 6px;
}
.ui-match-list-summary__label { color: var(--text-muted); }
.ui-match-list-summary__value { font-weight: 500; font-variant-numeric: tabular-nums; }
.ui-match-list-summary--ok    { color: var(--success-text); background: var(--success-bg); }
.ui-match-list-summary--short { color: var(--warning-text); background: var(--warning-bg); }
.ui-match-list-summary--over  { color: var(--danger-text);  background: var(--danger-bg); }

/* ── Card-Listen (TX + Receipt) ─────────────────────────────────────
   .ui-tx-cards / .ui-receipt-cards sind PARALLELE Patterns — sie haben
   die identische visuelle Sprache (selbe Card-Optik), nur das innere
   semantische Markup unterscheidet sich (TX hat __payee, Receipt hat
   __vendor; TX hat __amount-sub für Mismatch-Hinweis, Receipt nicht).
   Gemeinsames CSS via kombinierte Selektoren. Domain-Spezifika unten
   getrennt deklariert.

   Default-State: Container ist auf Desktop unsichtbar (Desktop nutzt
   Tabellen-Variante: .ui-tx-table bzw. .ui-section mit .ui-receipt-row).
   Wird im Mobile-Block auf flex umgeschaltet. */
.ui-tx-cards,
.ui-receipt-cards { display: none; }

/* Dashboard-Activity-Body: die TX-Tabelle nutzt KEINE eigene Box-Optik —
   die Activity-Card ist schon der Wrapper. Border/Background werden
   resetted, damit nicht „Karte in Karte" wirkt. */
.ui-activity__body .ui-tx-table {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
/* Dashboard-Spalten (5 Spalten ohne Checkbox + ohne Beleg-Indikator):
   Datum · Empfänger · Tag · Betrag · Status — kompakte Übersicht. */
.ui-activity__body {
  --tx-cols: 80px minmax(0, 1fr) 140px 110px 130px;
}

.ui-tx-card,
.ui-receipt-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.ui-tx-card:hover,
.ui-receipt-card:hover { background: var(--bg-subtle); }

/* TX-spezifische State-Modifier */
.ui-tx-card--pending      { background: var(--bg-pending); border-color: var(--warning-border); }
.ui-tx-card--pending:hover{ background: var(--bg-pending-hover); }
.ui-tx-card--missing      { border-color: var(--danger-border); }

/* Receipt-spezifische State-Modifier (parallel Bedeutung) */
.ui-receipt-card--unmatched      { background: var(--bg-pending); border-color: var(--warning-border); }
.ui-receipt-card--unmatched:hover{ background: var(--bg-pending-hover); }

/* Row 1: Datum links, Betrag rechts. Identisch in beiden Domains. */
.ui-tx-card__row1,
.ui-receipt-card__row1 {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.ui-tx-card__date,
.ui-receipt-card__date {
  font-size: 12px; color: var(--text-muted);
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.ui-tx-card__amount-cell,
.ui-receipt-card__amount-cell {
  display: flex; flex-direction: column; align-items: flex-end;
}
.ui-tx-card__amount,
.ui-receipt-card__amount {
  font-size: 16px; font-weight: 500;
  font-variant-numeric: tabular-nums; letter-spacing: -0.3px;
  white-space: nowrap;
}
/* TX-only: Sub-Zeile mit Beleg-Betrag, wenn Mismatch. Belege haben
   das Konzept nicht — sie SIND ja schon der Beleg. */
.ui-tx-card__amount-sub {
  font-size: 11.5px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* "Main"-Zeile: TX heißt's __payee (Empfänger), Receipt __vendor
   (Lieferant). Semantisch parallel, gleiche Typographie. */
.ui-tx-card__payee,
.ui-receipt-card__vendor {
  font-size: 14.5px; font-weight: 500; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Meta-Zeile: Tag links, Status rechts (mit margin-left:auto auf Status). */
.ui-tx-card__meta,
.ui-receipt-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px;
}

/* Action-Zeile (nur TX nutzt das aktuell — Bestätigen/Ablehnen-Buttons). */
.ui-tx-card__actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 4px; padding-top: 10px;
  border-top: 0.5px solid var(--border-soft);
}
.ui-tx-card__action {
  flex: 1; min-width: 0;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px; font-weight: 500;
  background: var(--bg-page); color: var(--text);
  border: 0.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; font-family: inherit;
}
.ui-tx-card__action--success { background: var(--success); color: #fff; border-color: var(--success); }
.ui-tx-card__action--danger  { background: var(--bg-surface); color: var(--danger); border-color: var(--danger-border); }
.ui-tx-card__action--primary { background: var(--text); color: #fff; border-color: var(--text); }

/* ── Inline-Row-Aktionen (Desktop-Tabelle) — Hover-Reveal-Pattern ──────
   Icon-only Buttons rechts in jeder Tabellenzeile. Standard 30 % Opacity,
   bei :hover oder --selected/--pending voll sichtbar. Pro Status andere
   Icon-Sets, letztes Icon ist immer „Mehr" (3-Punkte-Menü) für sekundäre
   Aktionen. Klick darf nicht die Detail-Sidebar öffnen → @click.stop am
   Wrapper. Mobile (<640px) versteckt — dort übernehmen Karten-Aktionen. */
.ui-row-actions {
  display: flex; gap: 2px; align-items: center;
  justify-content: flex-end;
  opacity: 0.3;
  transition: opacity .15s;
}
.ui-row-actions--always { opacity: 1; }
/* Hover am Tabellen-Wrapper (gesetzt von der Page-spezifischen Row-Klasse) */
.ui-tx-row:hover           .ui-row-actions,
.ui-tx-row--selected       .ui-row-actions,
.ui-tx-row--pending        .ui-row-actions,
.ui-receipt-row:hover           .ui-row-actions,
.ui-receipt-row--selected       .ui-row-actions,
.ui-receipt-row--unmatched      .ui-row-actions { opacity: 1; }

.ui-row-action {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  border: 0.5px solid transparent;
  background: transparent;
  font-family: inherit;
  transition: background .12s, color .12s;
}
.ui-row-action:hover { background: var(--bg-muted); color: var(--text); }
.ui-row-action--success         { color: var(--success); }
.ui-row-action--success:hover   { background: var(--success-bg); color: var(--success-text); }
.ui-row-action--danger          { color: var(--danger); }
.ui-row-action--danger:hover    { background: var(--danger-bg);  color: var(--danger-text); }
.ui-row-action--primary         { color: var(--text); }
.ui-row-action--primary:hover   { background: var(--bg-muted); color: var(--text); }

/* TX-Actions-Cell: Wrapper für DATEV-Indikator (immer sichtbar) +
   Hover-Reveal-Aktionen (.ui-row-actions). Sitzt in der letzten Grid-
   Spalte der TX-Tabelle. Beide Layer als Flex-Children, rechtsbündig. */
.ui-tx-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

/* DATEV-Versand-Indikator: bricht das Hover-Reveal-Pattern bewusst auf —
   ist immer sichtbar (auch ohne Row-Hover), weil er Status-Info trägt
   („schon gesendet?"). Default leise (opacity 0.3), Hover voll an,
   sent-State grün und nicht-klickbar. */
.ui-row-action--datev {
  opacity: 0.3;
  transition: opacity .12s, color .12s, background .12s;
}
.ui-tx-row:hover      .ui-row-action--datev,
.ui-receipt-row:hover .ui-row-action--datev { opacity: 0.55; }
.ui-row-action--datev:hover {
  opacity: 1 !important;
  color: var(--text);
  background: var(--bg-muted);
}
.ui-row-action--datev-sent {
  opacity: 1 !important;
  color: var(--success);
  cursor: default;
}
.ui-row-action--datev-sent:hover { background: transparent; color: var(--success); }
.ui-row-action--datev:disabled:not(.ui-row-action--datev-sent) {
  cursor: progress;
}

/* Hinweis: Inline-Tag-Variante läuft über `.ui-tag.ui-tag--inline`
   (BEM-Modifier in der Tag-Sektion oben). */

/* Bottom-Nav (Mobile) — nur sichtbar bei <640px */
.ui-bottom-nav {
  display: none;        /* per Media-Query an */
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-surface);
  border-top: 0.5px solid var(--border);
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom, 8px));
  z-index: 80;
}
.ui-bottom-nav__item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted);
  font-size: 10.5px;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: none;
}
.ui-bottom-nav__item--active { color: var(--text); }
.ui-bottom-nav__item svg { width: 22px; height: 22px; }

/* ── Mobile-Mehr-Sheet (Bottom-Sheet) ──────────────────────────────── */
.ui-mobile-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
}
.ui-mobile-sheet {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bg-surface);
  border-radius: 20px 20px 0 0;
  z-index: 101;
  max-height: 85vh;
  overflow-y: auto;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
}
.ui-mobile-sheet--anim-in  { animation: sheetIn  .22s ease-out; }
.ui-mobile-sheet--anim-out { animation: sheetOut .15s ease-in; }
@keyframes sheetIn  { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes sheetOut { from { transform: translateY(0); }   to { transform: translateY(100%); } }

.ui-mobile-sheet__handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 6px;
}
.ui-mobile-sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 18px 12px;
  border-bottom: 0.5px solid var(--border-soft);
}
.ui-mobile-sheet__title { font-size: 16px; font-weight: 500; }

.ui-mobile-sheet__body {
  display: flex; flex-direction: column;
  padding: 8px 0;
}
.ui-mobile-sheet__divider {
  height: 0.5px;
  background: var(--border-soft);
  margin: 8px 18px;
}
.ui-mobile-sheet__item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  border: 0;
  background: none;
  text-align: left;
  font-family: inherit;
  width: 100%;
  text-decoration: none;
}
.ui-mobile-sheet__item:hover  { background: var(--bg-muted); }
.ui-mobile-sheet__item:active { background: var(--bg-subtle); }
.ui-mobile-sheet__item-icon   { color: var(--text-muted); flex-shrink: 0; display: inline-flex; }
.ui-mobile-sheet__item--active { background: var(--bg-muted); font-weight: 500; }
.ui-mobile-sheet__item--danger { color: var(--danger); }
.ui-mobile-sheet__item--danger .ui-mobile-sheet__item-icon { color: var(--danger); }
.ui-mobile-sheet__item--subtle { color: var(--text-subtle); font-size: 13.5px; }

/* FAB (Mobile) — nur sichtbar bei <640px */
.ui-fab {
  display: none;        /* per Media-Query an */
  position: fixed; bottom: 88px; right: 18px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--text); color: #fff;
  align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  cursor: pointer; z-index: 81;
  border: 0;
}

/* ── Responsive Overrides für TX-Page ─────────────────────────── */

/* Backdrop für Tablet/Mobile-Drawer.
   Auf Desktop nie sichtbar (Sidebar ist dort Grid-Spalte, kein Overlay).
   Alpine x-show steuert Sichtbarkeit auf Tablet/Mobile. */
.ui-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,20,18,0.32);
  z-index: 89;
}

/* (Default `.ui-tx-cards { display: none }` ist oben vor den TX-Card-Stilen
   definiert — vor den Media-Queries, damit es nicht überschrieben wird.) */


/* ══════════════════════════════════════════════════════════════════════
   STYLEGUIDE — Hilfsklassen, NUR für templates/page-styleguide.php.
   Alle Klassen mit `.sg-`-Präfix, damit sie nicht in echten Seiten
   verwechselt werden. Wird nicht weiterentwickelt für Produktion.
   ══════════════════════════════════════════════════════════════════════ */

.sg-page { padding-bottom: 80px; }

.sg-toc {
  position: sticky;
  top: 28px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-bottom: 32px;
  font-size: 13px;
}
.sg-toc__title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); margin-bottom: 8px; }
.sg-toc ul { list-style: none; padding: 0; margin: 0; columns: 3; column-gap: 32px; }
.sg-toc li { padding: 3px 0; }
.sg-toc a { color: var(--text-muted); text-decoration: none; }
.sg-toc a:hover { color: var(--text); }

.sg-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 0.5px solid var(--border);
}
.sg-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.sg-section__title { font-size: 22px; font-weight: 500; letter-spacing: -0.4px; margin: 0 0 6px; }
.sg-section__sub   { font-size: 14px; color: var(--text-muted); margin: 0 0 20px; max-width: 720px; }

.sg-block { margin-top: 24px; }
.sg-block__title { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.sg-block__desc  { font-size: 13px; color: var(--text-muted); margin: 0 0 12px; }

.sg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
}
.sg-row--column   { flex-direction: column; align-items: flex-start; }
.sg-row--page-bg  { background: var(--bg-page); }

.sg-grid {
  display: grid;
  gap: 14px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
}
.sg-grid--2 { grid-template-columns: repeat(2, 1fr); }
.sg-grid--3 { grid-template-columns: repeat(3, 1fr); }
.sg-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Demo-Cell: ein einzelnes Beispiel mit Caption darunter. */
.sg-cell { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.sg-cell__caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-subtle);
  white-space: nowrap;
}

/* Token-Swatches */
.sg-swatch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.sg-swatch__chip {
  width: 100%;
  height: 56px;
  border-radius: 10px;
  border: 0.5px solid var(--border);
}
.sg-swatch__name { font-size: 12.5px; font-weight: 500; }
.sg-swatch__val  { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* Spacing-Visualizer */
.sg-spacing { display: flex; flex-direction: column; gap: 10px; }
.sg-spacing__row { display: flex; align-items: center; gap: 14px; font-size: 12.5px; }
.sg-spacing__bar { background: var(--text); height: 12px; border-radius: 3px; }
.sg-spacing__label { font-family: var(--font-mono); color: var(--text-muted); width: 90px; }

/* Code-Snippet als Caption */
.sg-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 8px 12px;
  border-radius: 8px;
  border: 0.5px solid var(--border);
  white-space: pre;
  overflow-x: auto;
  width: 100%;
  margin-top: 8px;
}

/* Notiz / Hinweis-Block */
.sg-note {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--info-bg);
  border: 0.5px solid var(--info-border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--info-text);
  margin: 16px 0;
}

/* Force-State-Variante: zeigt Button im :hover-Look ohne echten Hover */
.sg-force-hover .ui-btn--primary    { opacity: 0.9; }
.sg-force-hover .ui-btn--secondary  { background: var(--bg-muted); }
.sg-force-hover .ui-btn--ghost      { background: var(--bg-muted); color: var(--text); }
.sg-force-hover .ui-pill            { background: var(--bg-subtle); }
.sg-force-hover .ui-pill--primary   { opacity: 0.92; }
.sg-force-hover .ui-icon-btn        { background: var(--bg-muted); color: var(--text); }
.sg-force-hover .ui-action          { background: var(--bg-subtle); border-color: var(--text-subtle); }
/* (Styleguide-Force-Hover für alte Dashboard-.ui-tx-row entfernt — die
   Klasse zeigt im Styleguide nur noch den Doc-Stand, kein Live-Preview.) */


/* ══════════════════════════════════════════════════════════════════════
   FORM-KOMPONENTEN — für Settings, Rechnungen, Memory etc.
   ──────────────────────────────────────────────────────────────────────
   Block-orientiert nach BEM. States: default, focus, hover, disabled,
   error. Wird auf der Settings-Page eingeführt.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Form-Group: Wrapper für Label + Input + Hint ───────────────────── */
.ui-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ui-form-group--inline { flex-direction: row; align-items: center; gap: 12px; }
.ui-form-group--inline .ui-form-label { margin-bottom: 0; min-width: 100px; }

.ui-form-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}
.ui-form-label--required::after {
  content: ' *';
  color: var(--danger);
}
.ui-form-hint  { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.ui-form-error { font-size: 11.5px; color: var(--danger-text); margin-top: 2px; }

/* ── Input (Text, Email, Number, Password) ──────────────────────────── */
.ui-input {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.4;
  padding: 9px 12px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .12s, box-shadow .12s;
}
.ui-input::placeholder { color: var(--text-subtle); }
.ui-input:hover:not(:disabled):not(:focus) { border-color: var(--text-subtle); }
.ui-input:focus,
.ui-input:focus-visible {
  outline: none;            /* WICHTIG: sonst rendert globaler :focus-visible
                               einen rechteckigen Outline, der den border-radius
                               des Inputs ignoriert (Bug: harte Ecken). Eigener
                               Focus-Indikator über border + box-shadow. */
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.05);
}
.ui-input:disabled {
  background: var(--bg-muted);
  color: var(--text-subtle);
  cursor: not-allowed;
}
.ui-input--error { border-color: var(--danger-border); }
.ui-input--error:focus,
.ui-input--error:focus-visible {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}

/* ── Select (Dropdown mit Chevron-Icon) ────────────────────────────── */
.ui-select {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.4;
  padding: 9px 36px 9px 12px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center / 14px;
  color: var(--text);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.ui-select:hover:not(:disabled):not(:focus) { border-color: var(--text-subtle); }
.ui-select:focus,
.ui-select:focus-visible {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.05);
}
.ui-select:disabled {
  background-color: var(--bg-muted);
  color: var(--text-subtle);
  cursor: not-allowed;
}

/* ── Textarea ────────────────────────────────────────────────────────── */
.ui-textarea {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  padding: 9px 12px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 84px;
  transition: border-color .12s, box-shadow .12s;
}
.ui-textarea::placeholder { color: var(--text-subtle); }
.ui-textarea:hover:not(:disabled):not(:focus) { border-color: var(--text-subtle); }
.ui-textarea:focus,
.ui-textarea:focus-visible {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.05);
}

/* ── Switch (Toggle für Boolean Settings) ──────────────────────────── */
.ui-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}
.ui-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.ui-switch__track {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background .15s;
}
.ui-switch__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.ui-switch input:checked + .ui-switch__track { background: var(--text); }
.ui-switch input:checked + .ui-switch__track .ui-switch__thumb { transform: translateX(14px); }
/* Tab-Focus-Ring entfernt 2026-04-26 — siehe Hinweis bei .ui-shell-wrap *:focus. */


/* ══════════════════════════════════════════════════════════════════════
   LAYOUT-KOMPONENTEN — Tabs + Section
   ══════════════════════════════════════════════════════════════════════ */

/* ── Tabs ───────────────────────────────────────────────────────────── */
.ui-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ui-tabs::-webkit-scrollbar { display: none; }
.ui-tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .12s, color .12s;
}
.ui-tabs__btn:hover { color: var(--text); background: var(--bg-page); }
.ui-tabs__btn--active,
.ui-tabs__btn--active:hover {
  background: var(--bg-muted);
  color: var(--text);
}
.ui-tabs__btn-icon { display: inline-flex; color: currentColor; }
.ui-tabs__btn-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--warning);
  margin-left: 4px;
}

/* ── Section (Card-Block mit Header + Body) ─────────────────────────── */
.ui-section {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.ui-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  min-height: 58px;            /* konstante Höhe — egal ob mit/ohne Action-Button */
  border-bottom: 0.5px solid var(--border-soft);
}
.ui-section__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}
.ui-section__title-icon { color: var(--text-muted); display: inline-flex; }
.ui-section__sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.ui-section__body {
  padding: 20px 22px;
  display: flex; flex-direction: column;
  gap: 16px;
}
.ui-section__body--grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  padding: 20px 22px;
}
.ui-section__body--grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px 18px;
  padding: 20px 22px;
}

/* Settings-Page Layout: 2-spaltiges Grid auf Desktop, Sections nebeneinander.
   Auf Tablet/Mobile fällt es auf 1 Spalte zurück (siehe Responsive-Block am
   Ende der Datei). align-items:start verhindert dass Sections in einer Reihe
   auf gleiche Höhe gestreckt werden. */
.ui-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

/* Section-Modifier — Danger-Border für destruktive Bereiche */
.ui-section--danger { border-color: var(--danger-border); }

/* Form-Toggle-Row: Switch + Label nebeneinander (für Boolean-Setting in Form-Body) */
.ui-form-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 0;
}
.ui-form-toggle-row__text { flex: 1; }


/* ══════════════════════════════════════════════════════════════════════
   SETTINGS-SPEZIFISCHE PATTERNS
   ══════════════════════════════════════════════════════════════════════ */

/* ── Inline-Alert (Hinweis-Box mit Icon) ────────────────────────────── */
.ui-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.ui-alert--info    { background: var(--info-bg);    color: var(--info-text);    border: 0.5px solid var(--info-border); }
.ui-alert--warning { background: var(--warning-bg); color: var(--warning-text); border: 0.5px solid var(--warning-border); }
.ui-alert--danger  { background: var(--danger-bg);  color: var(--danger-text);  border: 0.5px solid var(--danger-border); }
.ui-alert--success { background: var(--success-bg); color: var(--success-text); border: 0.5px solid var(--success-border); }
.ui-alert__icon    { flex-shrink: 0; margin-top: 1px; display: inline-flex; }
.ui-alert__body    { flex: 1; min-width: 0; }
.ui-alert code     { font-family: var(--font-mono); font-size: 11.5px; padding: 1px 5px; background: rgba(0,0,0,0.05); border-radius: 4px; }

/* ── Belege-Tabelle (Receipts-Page) ─────────────────────────────────────
   Direkt am ui-tx-row-Pattern angelehnt: gleiche Densität, gleiche
   Padding/Font-Werte, gleiche Hover-Logik. Eine Zeile = ein Beleg, alle
   wichtigen Infos auf einen Blick.

   Spalten (7):
     1. Quelle-Icon (Mail/Upload)               24px
     2. Lieferant + Beleg-Datum-Subtitle        minmax(0, 1fr)
     3. Datum (Rechnungsdatum)                  90px
     4. Betrag (right)                          110px
     5. Status (ein einzelnes Badge)            150px
     6. Verknüpfte Transaktion                  minmax(0, 1fr)
     7. Tags                                    minmax(0, 1fr)
     8. Aktionen (Icon-only)                    160px

   Mobile (<=900px): stack zur Karten-Liste mit Label-Prefixen. */

/* Belege-Row — Container, Hover, Selection, Header, Pending-Modifier:
   alles über kombinierte Selektoren gemeinsam mit .ui-tx-row weiter oben.
   Hier nur noch die Domain-Spezifika (Sort-Icons, Quelle-Marker, Vendor-
   Sub-Zeile, Verknüpfte-TX-Cell). */
.ui-receipt-row--head .ui-receipt-row__amount-head { text-align: right; }

.ui-receipt-row__sort {
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer; user-select: none;
}
.ui-receipt-row__sort:hover { color: var(--text); }
.ui-receipt-row__sort--active { color: var(--text); font-weight: 600; }

/* Lieferant-Header trägt zwei Sort-Trigger nebeneinander („Lieferant /
   Hochgeladen"), die Spalte hat genug Breite (1fr). Trenner ist ein
   leiser „/" zwischen den beiden klickbaren Wörtern. */
.ui-receipt-row__vendor-head {
  display: inline-flex; align-items: center; gap: 8px;
}
.ui-receipt-row__vendor-head-sep {
  color: var(--border);
  user-select: none;
}

.ui-receipt-row__source {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-subtle);
}

.ui-receipt-row__vendor      { min-width: 0; }
.ui-receipt-row__vendor-main {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-receipt-row__vendor-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Datum-Cell trägt Quelle-Icon (Mail/Upload) als Inline-Vor-Marker. */
.ui-receipt-row__date {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}

.ui-receipt-row__amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.ui-receipt-row__tx {
  min-width: 0;
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-receipt-row__tx-empty { color: var(--text-subtle); font-style: italic; }

/* ── Receipt-Sidebar Spezifika — PDF-Vorschau + verknüpfte TX-Karte ──── */
.ui-receipt-pdf {
  background: var(--bg-page);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.ui-receipt-pdf__page {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 18px;
  min-height: 220px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 11px;
  line-height: 1.5;
}
.ui-receipt-pdf__line { background: var(--bg-muted); height: 8px; border-radius: 3px; }
.ui-receipt-pdf__line--short  { width: 60%; }
.ui-receipt-pdf__line--medium { width: 80%; }

/* Footer unter der PDF-Vorschau: Filename links (truncate), Aktions-Pills rechts. */
.ui-receipt-pdf__footer {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  min-width: 0;
}
.ui-receipt-pdf__filename {
  flex: 1; min-width: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Aktions-Buttons (Öffnen / Download) im Footer nutzen die Standard-
   Komponente .ui-icon-btn aus dem Styleguide — keine Page-spezifischen
   Custom-Buttons mehr. */

.ui-receipt-linked-tx {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-page);
  border: 0.5px solid var(--border);
  border-radius: 10px;
}
.ui-receipt-linked-tx__main { flex: 1; min-width: 0; }
.ui-receipt-linked-tx__payee { font-size: 13px; font-weight: 500; }
.ui-receipt-linked-tx__sub { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.ui-receipt-linked-tx__amount { font-variant-numeric: tabular-nums; font-weight: 500; font-size: 13px; }

/* Tablet (640–900px): die Tabellen-Variante .ui-receipt-row bleibt
   sichtbar. Die alte Mobile-Card-Verkleidung (Grid-Re-Layout der
   .ui-receipt-row auf Karten-Optik) ist entfernt — auf <640px nutzen
   wir jetzt parallel zum Markup das echte .ui-receipt-cards/.ui-receipt-card-
   Pattern (analog .ui-tx-cards/.ui-tx-card). */

/* ── DATEV-Page ─────────────────────────────────────────────────────────
   Drei Sektionen: Stats-Strip · Monats-Karten-Grid · Versandhistorie.
   Monats-Karten haben drei Status-Varianten:
     --ready  (info-blau-Tönung): es gibt Belege zum Senden
     --done   (subtle):           alles bereits gesendet
     --blocked (grau):            keine zuordenbaren Belege da
   Ein Klick pro Monat = die Hauptaktion. */

.ui-datev-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}
/* Stats nutzen den ui-kpi-Block aus dem Dashboard — keine Page-spezifischen
   Stat-Karten mehr. Farb-Modifier --info / --success / --danger tönen den
   Value-Text, sonst identisch zum Dashboard-KPI. */
.ui-kpi--info    .ui-kpi__value { color: var(--info-text); }
.ui-kpi--success .ui-kpi__value { color: var(--success-text); }
.ui-kpi--danger  .ui-kpi__value { color: var(--danger-text); }

.ui-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.ui-month {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .12s, background .12s;
}
.ui-month:hover { border-color: var(--text-subtle); }
.ui-month--ready   { border-color: var(--info-border); background: var(--info-bg); }
/* partial = ready+sent gemischt, gleicher Look wie ready (Versand offen) */
.ui-month--partial { border-color: var(--info-border); background: var(--info-bg); }
.ui-month--done    { background: var(--bg-subtle); }
.ui-month--blocked { background: var(--bg-subtle); }

.ui-month__head {
  display: flex; align-items: baseline; justify-content: space-between;
}
.ui-month__title {
  font-size: 16px; font-weight: 500; color: var(--text); letter-spacing: -0.2px;
}
.ui-month__count {
  font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums;
}

.ui-month__progress {
  height: 5px;
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.ui-month__progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: 999px;
  transition: width .25s;
}
.ui-month--ready   .ui-month__progress-fill,
.ui-month--partial .ui-month__progress-fill { background: var(--info-text); }
.ui-month--blocked .ui-month__progress-fill { background: var(--text-subtle); }

.ui-month__breakdown {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 12.5px; color: var(--text-muted);
}
.ui-month__breakdown b {
  color: var(--text); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.ui-month__breakdown-item {
  display: inline-flex; align-items: center; gap: 6px;
}
.ui-month__breakdown-item::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-subtle);
}
.ui-month__breakdown-item--ready::before   { background: var(--info-text); }
.ui-month__breakdown-item--sent::before    { background: var(--success); }
.ui-month__breakdown-item--missing::before { background: var(--danger); }

.ui-month__action {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}
.ui-month__buttons {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.ui-month__hint        { font-size: 12px; color: var(--text-muted); flex: 1; min-width: 0; }
.ui-month__hint--blocked { color: var(--danger-text); }
.ui-month__hint--done    { color: var(--success-text); display: inline-flex; align-items: center; gap: 4px; }

/* Versandhistorie — kompakte Tabelle nach Monats-Karten */
.ui-history {
  margin-top: 28px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.ui-history__head {
  padding: 16px 22px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 0.5px solid var(--border-soft);
}
.ui-history__title {
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.ui-history__title-icon { color: var(--text-muted); display: inline-flex; align-items: center; }
.ui-history__count { font-size: 12px; color: var(--text-muted); }

.ui-history-row {
  display: grid;
  grid-template-columns: 110px 130px minmax(0, 1fr) 110px 130px;
  gap: 14px;
  padding: 12px 22px;
  align-items: center;
  border-bottom: 0.5px solid var(--border-soft);
  font-size: 13px;
}
.ui-history-row:last-child { border-bottom: 0; }
.ui-history-row--head {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px;
  background: var(--bg-page);
}
.ui-history-row__date  { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ui-history-row__month { color: var(--text); font-weight: 500; }
.ui-history-row__recipient {
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-history-row__count { font-variant-numeric: tabular-nums; color: var(--text); text-align: right; }

/* Mobile: Karten + History responsive stapeln */
@media (max-width: 900px) {
  .ui-datev-stats { grid-template-columns: 1fr; }
  .ui-month-grid  { grid-template-columns: 1fr; }
  .ui-history-row {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
  }
  .ui-history-row--head { display: none; }
  .ui-history-row__recipient { grid-column: 1 / span 2; }
  .ui-history-row__count     { text-align: left; }
}

/* ── Lern-Gedächtnis (Memory-Page) ──────────────────────────────────────
   Drei Sektionen mit eigenen, klar lesbaren Layouts. Mappings: drei-
   spaltige Liste (raw / clean / actions), bei Inline-Edit wird die
   Clean-Cell durch ein Input ersetzt. Match-Historie: vier-spaltige
   Stat-Liste. Rules: Pill-Wolke. */

.ui-mem-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(200px, 1.2fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 22px;
  border-top: 0.5px solid var(--border-soft);
  font-size: 13px;
}
.ui-mem-row:first-child { border-top: 0; }
.ui-mem-row__raw {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.ui-mem-row__clean {
  color: var(--text);
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Edit-Mode trägt jetzt Operator-Select + Vendor-Input nebeneinander, daher
   gap statt nur align. min-width:0 verhindert Overflow im Grid. */
.ui-mem-row__edit { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ui-mem-row__actions { display: flex; gap: 4px; justify-content: flex-end; }

/* Operator-Pille — kleine Markierung in der Raw-Cell, signalisiert dass das
   Mapping als Pattern (nicht als Exact-Match) angewandt wird. Auto-Lerning
   produziert nur 'exact' und blendet die Pille bewusst aus, sonst wäre sie
   überall sichtbar und visuelles Rauschen. */
.ui-mem-op {
  display: inline-flex; align-items: center;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 500;
  font-family: var(--font);
  letter-spacing: 0.2px;
  border-radius: 999px;
  flex-shrink: 0;
  text-transform: lowercase;
}
.ui-mem-op--contains    { background: #eaf3ff; color: #1d5cb8; }
.ui-mem-op--starts_with { background: #e9f7ee; color: #196b3a; }
.ui-mem-op--ends_with   { background: #fff1e0; color: #8a4b00; }

/* (.ui-detail-action-link entfernt — der „Empfänger-Regel anlegen"-
   Button nutzt jetzt das gleiche ui-btn--ghost-Pattern wie die anderen
   Sidebar-Aktions-Buttons; eigene Style-Insel war inkonsistent.) */

.ui-mem-hist {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 80px 120px;
  gap: 14px;
  align-items: center;
  padding: 10px 22px;
  border-top: 0.5px solid var(--border-soft);
  font-size: 13px;
}
.ui-mem-hist:first-child { border-top: 0; }
.ui-mem-hist__vendor {
  color: var(--text);
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ui-mem-hist__amount {
  font-family: var(--font-mono);
  color: var(--text);
  text-align: right;
}
.ui-mem-hist__matches { display: flex; }
.ui-mem-hist__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.ui-mem-rules {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ui-mem-rule {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 4px 4px 10px;
  background: var(--bg-page);
  border: 0.5px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text);
  font-family: var(--font-mono);
}
.ui-mem-rule__del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  border: 0; cursor: pointer; padding: 0;
}
.ui-mem-rule--active {
  background: var(--accent-soft, color-mix(in srgb, var(--text) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
}
.ui-mem-rule__del:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ──────────────────────────────────────────────────────────────────────
 * Kein-Beleg-Regel-Liste (Schema 1.15)
 *
 * Spalten-Layout: Feld-Pill | Operator-Pill | Wert | Aktion. Operator-
 * Spalte hat eine feste Breite, damit auch leere Operator-Zellen (bei
 * `field=amount` oder `match_type=contains`) die Spaltenausrichtung
 * nicht zerlegen.
 * ────────────────────────────────────────────────────────────────────── */
.ui-mem-rule-list {
  display: flex;
  flex-direction: column;
}
.ui-mem-rule-row {
  display: grid;
  grid-template-columns: 140px 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
}
.ui-mem-rule-row:last-child { border-bottom: 0; }

.ui-mem-rule-field {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 999px;
  border: 0.5px solid transparent;
}
/* Feldspezifische Farben — bewusst dezent, sodass die Liste nicht wie ein
   Regenbogen wirkt. Light/Dark via light-dark() für Dark-Mode-Konsistenz. */
.ui-mem-rule-field--payee {
  background: light-dark(#EAF3FF, rgba(59, 130, 246, 0.14));
  color:      light-dark(#1D5CB8, #93C5FD);
}
.ui-mem-rule-field--reference {
  background: light-dark(#E9F7EE, rgba(34, 197, 94, 0.14));
  color:      light-dark(#196B3A, #86EFAC);
}
.ui-mem-rule-field--amount {
  background: light-dark(#FFF1E0, rgba(249, 115, 22, 0.14));
  color:      light-dark(#8A4B00, #FDBA74);
}

.ui-mem-rule-op {
  /* Container-Span — sorgt dafür, dass die Spalte ihre Breite behält,
     auch wenn die Operator-Pille via x-if entfernt wird. */
  display: inline-flex;
  min-height: 18px;
}
.ui-mem-rule-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  /* Auf Mobile stapeln: Feld + Operator nebeneinander oben, Wert in
     eigener Zeile, Aktion rechts neben Wert. */
  .ui-mem-rule-row {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
      "field op . action"
      "value value value value";
    gap: 8px 10px;
    padding: 12px 0;
  }
  .ui-mem-rule-field { grid-area: field; }
  .ui-mem-rule-op    { grid-area: op; }
  .ui-mem-rule-value { grid-area: value; white-space: normal; }
  .ui-mem-rule-row > .ui-btn { grid-area: action; }
}

/* ──────────────────────────────────────────────────────────────────────
 * Tag-Direction & Description Editor (Lern-Gedächtnis)
 *
 * Drei Spalten: Head (Color+Name), Direction-Segmented-Control, Description.
 * Auf Mobile stapeln, damit Description nicht in zwei Pixel passen muss.
 * ────────────────────────────────────────────────────────────────────── */
.ui-mem-tag-list {
  display: flex; flex-direction: column; gap: 6px;
}
.ui-mem-tag-row {
  display: grid;
  /* Vier Spalten: Head | Direction | Beleglos | Description.
     Direction + Beleglos `auto`, damit sie nur so viel Platz nehmen wie
     nötig. Description bekommt den Rest. Head hat eine Min-Breite, damit
     Tag-Namen nicht zu früh ellipsen. */
  grid-template-columns: minmax(160px, 1fr) auto auto minmax(220px, 2fr);
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: var(--bg-page);
  border: 0.5px solid var(--border);
  border-radius: 8px;
}
.ui-mem-tag-row__head {
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.ui-mem-tag-row__dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ui-mem-tag-row__name {
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-mem-tag-row__preset {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 2px 6px;
  border: 0.5px solid var(--border);
  border-radius: 999px;
  flex-shrink: 0;
}
.ui-mem-tag-row__dir {
  display: inline-flex;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.ui-mem-tag-dir-btn {
  background: transparent;
  border: 0;
  border-right: 0.5px solid var(--border);
  padding: 4px 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.ui-mem-tag-dir-btn:last-child { border-right: 0; }
.ui-mem-tag-dir-btn:hover {
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.ui-mem-tag-dir-btn--active {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text);
  font-weight: 500;
}
.ui-mem-tag-row__nr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.ui-mem-tag-row__nr input { margin: 0; cursor: pointer; }
.ui-mem-tag-row__desc {
  min-width: 0;
}

@media (max-width: 720px) {
  .ui-mem-tag-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .ui-mem-tag-row__dir,
  .ui-mem-tag-row__nr { align-self: start; }
}

/* ──────────────────────────────────────────────────────────────────────
 * Tag-Cleanup-Modal: Liste der direction-falschen Zuweisungen mit
 * per-Item Replacement-Selector.
 * ────────────────────────────────────────────────────────────────────── */
.ui-tag-cleanup-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.ui-tag-cleanup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 0.5px solid var(--border-soft, var(--border));
  font-size: 12px;
}
.ui-tag-cleanup-row:last-child { border-bottom: 0; }
.ui-tag-cleanup-row__meta {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui-tag-cleanup-row__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ui-tag-cleanup-row__old {
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 11.5px;
}
/* „Behalten"-Variante — Tag bleibt drauf, also keine Streichung und ein
   diskreter Akzent (gelblich/amber), damit man auf den ersten Blick die
   Ausnahmen vom Default-Verhalten sieht. */
.ui-tag-cleanup-row__old--keep {
  text-decoration: none;
  color: light-dark(#92400E, #FCD34D);
  background: light-dark(#FEF3C7, rgba(252, 211, 77, 0.12));
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}
/* Komplette Zeile bekommt einen leichten amber-Hintergrund, sodass
   „behaltene" Items optisch klar von den anderen abgesetzt sind. */
.ui-tag-cleanup-row--keep {
  background: light-dark(rgba(254, 243, 199, 0.5), rgba(252, 211, 77, 0.05));
}

@media (max-width: 640px) {
  .ui-tag-cleanup-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Mobile: Mappings + History stapeln, da Grid-Spalten zu eng */
@media (max-width: 639px) {
  .ui-mem-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ui-mem-row__actions { justify-content: flex-start; margin-top: 4px; }
  .ui-mem-hist {
    grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
  }
  .ui-mem-hist__amount { text-align: left; }
}

/* ── Protokoll (Log-Page) ───────────────────────────────────────────────
   Jeder Lauf ist eine Karte. Header (klickbar) zeigt Title, Zeit,
   Source-Badge und Status-Badge plus eine einzeilige Summary. Body
   ist eine Konsolen-Liste mit Timestamps + Level-Färbung. Bei Fehler/
   Warnung bekommt die ganze Karte einen passenden Linkstreifen. */

.ui-log-run {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.ui-log-run--danger  { border-left: 3px solid var(--danger); }
.ui-log-run--warning { border-left: 3px solid var(--warning); }

.ui-log-run__head {
  width: 100%;
  display: flex; align-items: center; gap: 12px;     /* center: Chevron sitzt
                                                         mittig zwischen Title
                                                         und Summary-Zeile */
  padding: 14px 18px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
}
.ui-log-run__head:hover { background: var(--bg-subtle); }
.ui-log-run--expanded .ui-log-run__head { border-bottom: 0.5px solid var(--border-soft); }

.ui-log-run__chev {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  color: var(--text-muted);
}

.ui-log-run__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ui-log-run__title-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.ui-log-run__title {
  font-size: 13.5px; font-weight: 500;
  color: var(--text);
}
.ui-log-run__time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.ui-log-run__summary {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.ui-log-run__body {
  padding: 12px 18px 14px;
  background: var(--bg-page);
  font-family: var(--font-mono);
  font-size: 11.5px;
  max-height: 480px;
  overflow-y: auto;
}

.ui-log-line {
  display: flex; gap: 10px;
  padding: 2px 0;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}
.ui-log-line__ts {
  flex-shrink: 0;
  color: var(--text-subtle);
  width: 70px;
}
.ui-log-line__msg { flex: 1; min-width: 0; word-break: break-word; }
.ui-log-line--ok    .ui-log-line__msg { color: var(--success-text); }
.ui-log-line--warn  .ui-log-line__msg { color: var(--warning-text); }
.ui-log-line--error .ui-log-line__msg { color: var(--danger-text); font-weight: 500; }
.ui-log-line--muted .ui-log-line__msg { color: var(--text-subtle); }

/* ── Tag-Picker — Floating-Dropdown am Klick-Element positioniert ──────
   Wird über openTagPickerAt() geöffnet, _tagPickerStyle (computed) hält
   die Position. Liste mit Multi-Select-Checkbox + Color-Dot. */
.ui-tag-picker {
  position: fixed;
  z-index: 9400;
  width: 240px;
  max-height: 320px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: ui-tag-picker-in .12s ease-out;
}
@keyframes ui-tag-picker-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ui-tag-picker__head {
  padding: 10px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 0.5px solid var(--border-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 500;
}
.ui-tag-picker__list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.ui-tag-picker__item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.ui-tag-picker__item:hover { background: var(--bg-subtle); }
.ui-tag-picker__item--checked { background: var(--bg-subtle); }
.ui-tag-picker__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Notifications: Toast-Stack + Panel-Drawer + Bell-Badge ────────────
   Drei Komponenten, ein User-Feedback-System:
     ui-toast       — Inline-Aktions-Feedback, top-right, 4s Auto-Dismiss
     ui-notif-panel — Activity-History-Drawer, slide-in von rechts
     ui-bell-badge  — Counter/Dot am Topbar-Bell-Icon

   Vier Status-Varianten überall: --success / --warning / --danger / --info */

/* Toast-Stack — fixed top-right, max 3 sichtbar, neueste oben */
.ui-toast-stack {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 10500;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 380px;
  pointer-events: none;
}
.ui-toast-stack > * { pointer-events: auto; }

.ui-toast {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-left: 3px solid var(--text-subtle);
  animation: ui-toast-in .18s ease-out;
}
@keyframes ui-toast-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.ui-toast--success { border-left-color: var(--success); }
.ui-toast--warning { border-left-color: var(--warning); }
.ui-toast--danger,
.ui-toast--error   { border-left-color: var(--danger); }
.ui-toast--info    { border-left-color: var(--info-text); }

.ui-toast__icon {
  flex-shrink: 0;
  color: var(--text-muted);
  margin-top: 1px;
  display: inline-flex; align-items: center;
}
.ui-toast--success .ui-toast__icon { color: var(--success); }
.ui-toast--warning .ui-toast__icon { color: var(--warning); }
.ui-toast--danger  .ui-toast__icon,
.ui-toast--error   .ui-toast__icon { color: var(--danger); }
.ui-toast--info    .ui-toast__icon { color: var(--info-text); }

.ui-toast__body { flex: 1; min-width: 0; line-height: 1.45; color: var(--text); }
.ui-toast__title { font-weight: 500; word-break: break-word; }
.ui-toast__sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; word-break: break-word; }

.ui-toast__close {
  width: 20px; height: 20px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-subtle); cursor: pointer; flex-shrink: 0;
  background: transparent; border: 0;
  align-self: flex-start;
}
.ui-toast__close:hover { background: var(--bg-muted); color: var(--text); }

/* Bell-Badge — Counter (mit Zahl) oder Dot (ohne) am Topbar-Bell */
.ui-bell-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
  line-height: 1;
  border: 1.5px solid var(--bg-surface);
  pointer-events: none;
}
.ui-bell-badge--dot {
  min-width: 8px; height: 8px;
  padding: 0; right: 4px; top: 4px;
}
/* Bell-Container muss position:relative haben damit das Badge anhaftet —
   ui-icon-btn wird das via Modifier oder Inline-Style bekommen */
.ui-icon-btn--with-badge { position: relative; }

/* Notif-Panel — Slide-In Drawer von rechts */
.ui-notif-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  max-width: 100vw;
  z-index: 9000;
  background: var(--bg-surface);
  border-left: 0.5px solid var(--border);
  box-shadow: -4px 0 20px rgba(0,0,0,0.06);
  display: flex; flex-direction: column;
  animation: ui-notif-panel-in .2s ease-out;
}
@keyframes ui-notif-panel-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.ui-notif-panel-backdrop {
  position: fixed; inset: 0;
  z-index: 8999;
  background: rgba(0,0,0,0.12);
  animation: ui-fade-in .15s ease-out;
}
@keyframes ui-fade-in { from { opacity: 0; } to { opacity: 1; } }

.ui-notif-panel__head {
  padding: 16px 18px;
  border-bottom: 0.5px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.ui-notif-panel__title {
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.ui-notif-panel__count {
  background: var(--danger);
  color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 999px;
  min-width: 18px; text-align: center;
  line-height: 1.4;
}
.ui-notif-panel__actions {
  display: flex; align-items: center; gap: 4px;
}

.ui-notif-panel__filter-row {
  padding: 10px 18px;
  border-bottom: 0.5px solid var(--border-soft);
  display: flex; gap: 4px;
  background: var(--bg-page);
}
.ui-notif-panel__filter {
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  border: 0.5px solid transparent;
}
.ui-notif-panel__filter--active {
  background: var(--text);
  color: #fff;
}
.ui-notif-panel__filter b { font-weight: 500; }

.ui-notif-panel__list {
  flex: 1; overflow-y: auto;
}

.ui-notif {
  padding: 12px 18px;
  display: flex; gap: 12px; align-items: flex-start;
  border-bottom: 0.5px solid var(--border-soft);
  cursor: pointer;
  transition: background .12s;
}
.ui-notif:hover { background: var(--bg-subtle); }
.ui-notif--unread { background: var(--info-bg); }
.ui-notif--unread:hover { background: var(--info-bg); }

.ui-notif__icon {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-muted);
  color: var(--text-muted);
}
.ui-notif__icon--success { background: var(--success-bg); color: var(--success); }
.ui-notif__icon--error,
.ui-notif__icon--danger  { background: var(--danger-bg);  color: var(--danger); }
.ui-notif__icon--warning { background: var(--warning-bg); color: var(--warning); }
.ui-notif__icon--info    { background: var(--info-bg);    color: var(--info-text); }

.ui-notif__body { flex: 1; min-width: 0; }
.ui-notif__title {
  font-size: 13px; color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.ui-notif--unread .ui-notif__title { font-weight: 500; }
.ui-notif__sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.ui-notif__time { font-variant-numeric: tabular-nums; }
.ui-notif__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--info-text);
  flex-shrink: 0; margin-top: 7px;
}

.ui-notif-panel__empty {
  padding: 48px 18px;
  text-align: center;
  color: var(--text-subtle);
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}

/* (Globale Suche · Modal — alle Styles weiter unten in einem Block,
   gemeinsam mit dem ui-modal-Bereich. Die ältere Duplizierung an
   dieser Stelle wurde entfernt; sie kollidierte mit der späteren
   Definition und führte zu inkonsistentem Positionsverhalten.) */
.ui-notif-panel__empty-icon {
  color: var(--text-subtle);
  opacity: 0.5;
}
.ui-notif-panel__empty-title { color: var(--text-muted); font-weight: 500; }

/* ── Upload: Drop-Overlay + Side-Panel ─────────────────────────────────
   Globaler Drag-Listener (auf document) erkennt File-Drag im ganzen
   Window. Drop-Overlay erscheint full-screen — kein Zielen nötig.
   Drop ODER File-Picker triggern das Side-Panel rechts unten mit der
   Queue. Non-blocking: User arbeitet weiter, Panel zeigt Progress. */

.ui-drop-overlay {
  position: fixed; inset: 16px;
  z-index: 10000;
  background: rgba(26, 26, 26, 0.04);
  border: 2px dashed var(--text);
  border-radius: var(--radius-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  backdrop-filter: blur(2px);
  pointer-events: none;
  animation: ui-drop-fade-in .12s ease-out;
}
@keyframes ui-drop-fade-in {
  from { opacity: 0; transform: scale(0.99); }
  to   { opacity: 1; transform: scale(1); }
}
.ui-drop-overlay__icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--text); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ui-drop-overlay__title {
  font-size: 20px; font-weight: 500; color: var(--text);
  letter-spacing: -0.3px;
}
.ui-drop-overlay__sub {
  font-size: 13px; color: var(--text-muted);
}
.ui-drop-overlay__hint {
  margin-top: 6px;
  font-size: 11.5px; color: var(--text-subtle);
  font-family: var(--font-mono);
}

.ui-upload-panel {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 9500;
  width: 400px;
  max-width: calc(100vw - 44px);
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: ui-upload-slide-in .2s ease-out;
}
@keyframes ui-upload-slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ui-upload-panel--collapsed { max-height: 60px; }
.ui-upload-panel--collapsed .ui-upload-panel__list,
.ui-upload-panel--collapsed .ui-upload-panel__footer { display: none; }

.ui-upload-panel__head {
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 0.5px solid var(--border-soft);
  cursor: pointer;
}
.ui-upload-panel__head--done {
  background: var(--success-bg);
  border-bottom-color: var(--success-border);
}
.ui-upload-panel__title {
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text);
}
.ui-upload-panel__head--done .ui-upload-panel__title { color: var(--success-text); }
.ui-upload-panel__progress {
  font-size: 12px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.ui-upload-panel__actions {
  display: flex; align-items: center; gap: 8px;
}

.ui-upload-panel__list {
  max-height: 360px; overflow-y: auto;
  padding: 4px 0;
}
.ui-upload-item {
  padding: 14px 22px;
  display: flex; gap: 12px; align-items: flex-start;
  border-bottom: 0.5px solid var(--border-soft);
  font-size: 13px;
}
.ui-upload-item:last-child { border-bottom: 0; }

.ui-upload-item__icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.ui-upload-item__icon--queued     { color: var(--text-subtle); }
.ui-upload-item__icon--processing { color: var(--info-text); }
.ui-upload-item__icon--done       { color: var(--success); }
.ui-upload-item__icon--error      { color: var(--danger); }
.ui-upload-item__icon--cancelled,
.ui-upload-item__icon--deleted    { color: var(--text-subtle); }

.ui-upload-item__body { flex: 1; min-width: 0; }
.ui-upload-item__name {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.ui-upload-item__sub {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}
.ui-upload-item__sub--success { color: var(--success-text); }
.ui-upload-item__sub--error   { color: var(--danger-text); }

/* Pro-Item-Aktion (Abbrechen / Löschen) — kleiner Icon-Button rechts.
   Hover bringt subtilen Hintergrund, Danger-Variante färbt den Stroke
   beim Hover rot, sodass die Wirkung klar ist (Löschen ist destruktiv). */
.ui-upload-item__actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: flex-start;
  margin-top: 2px;
}
.ui-upload-item__action {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.ui-upload-item__action:hover {
  background: var(--bg-muted);
  color: var(--text);
}
.ui-upload-item__action--danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Duplikat-Hinweis — gelbes Pill-artiges Banner unter dem Erfolgs-Subtitle.
   Bewusst diskret (kein Roter Alarm), weil der Beleg ja korrekt gespeichert
   wurde. Nur ein Hinweis: „schau mal nach". */
.ui-upload-item__dup {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 3px 8px;
  font-size: 11.5px;
  background: light-dark(#FEF3C7, rgba(252, 211, 77, 0.12));
  color:      light-dark(#92400E, #FCD34D);
  border-radius: 6px;
  line-height: 1.35;
}

.ui-upload-progress-mini {
  width: 100%; height: 3px; background: var(--bg-muted);
  border-radius: 999px; overflow: hidden; margin-top: 6px;
}
.ui-upload-progress-mini__fill {
  height: 100%; background: var(--info-text); border-radius: 999px;
  transition: width .3s;
  animation: ui-upload-pulse 1.5s ease-in-out infinite;
}
@keyframes ui-upload-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

.ui-upload-panel__footer {
  padding: 14px 22px;
  border-top: 0.5px solid var(--border-soft);
  background: var(--bg-page);
  font-size: 12px; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
}
.ui-upload-panel__footer-action {
  cursor: pointer; color: var(--text); font-weight: 500;
  background: transparent; border: 0; font-family: inherit; font-size: inherit; padding: 0;
}
.ui-upload-panel__footer-action:hover { text-decoration: underline; }

/* Mobile: Panel nimmt fast die ganze Breite, geringerer Abstand */
@media (max-width: 640px) {
  .ui-upload-panel { left: 16px; right: 16px; width: auto; bottom: 16px; }
  .ui-drop-overlay { inset: 8px; }
  .ui-drop-overlay__icon { width: 52px; height: 52px; }
  .ui-drop-overlay__title { font-size: 16px; }
}

/* ── Warning-Bar (sticky-top app-weite Warnung, z. B. „Kein Passwort gesetzt") ──
   Im Unterschied zu .ui-alert ist das ein Layout-Element: sitzt fixed am
   oberen Rand, nimmt die volle Breite, kein Border-Radius. Body bekommt
   passendes padding-top, damit Inhalt nicht überdeckt wird. */
.ui-warning-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--warning-bg);
  border-bottom: 0.5px solid var(--warning-border);
  color: var(--warning-text);
  font-size: 13px;
  font-family: var(--font-sans);
}
.ui-warning-bar__icon { flex-shrink: 0; display: inline-flex; color: var(--warning); }
.ui-warning-bar__action {
  margin-left: auto;
  color: var(--warning-text);
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}
.ui-warning-bar__action:hover { opacity: 0.8; }

/* ── Code-Row (Mono-Code-Display mit Copy-Button) ───────────────────── */
.ui-code-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--bg-page);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
}
.ui-code-row__code {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Cron-Row (Switch + Label links, Selects rechts) ────────────────── */
.ui-cron-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 0.5px solid var(--border-soft);
  flex-wrap: wrap;
}
.ui-cron-row:first-of-type { border-top: 0; padding-top: 4px; }
.ui-cron-row__left {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
}
.ui-cron-row__right {
  display: flex; align-items: center; gap: 8px;
}
.ui-cron-row__label {
  font-size: 13.5px; font-weight: 500; color: var(--text);
}
.ui-cron-row__note {
  font-size: 12px; color: var(--text-muted);
}
/* Schmalere Selects in Cron-Rows */
.ui-cron-row__right .ui-select {
  width: auto;
  min-width: 90px;
  padding: 6px 28px 6px 10px;
  font-size: 12.5px;
}
.ui-cron-row__unit { font-size: 12px; color: var(--text-muted); }

/* ── List-Item (generische Listen-Zeile mit Title + Sub + Actions) ──── */
.ui-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-top: 0.5px solid var(--border-soft);
  transition: background .12s;
}
.ui-list-item:first-of-type { border-top: 0; }
.ui-list-item:hover { background: var(--bg-subtle); }
.ui-list-item__main    { flex: 1; min-width: 0; }
.ui-list-item__title   { font-size: 14px; font-weight: 500; color: var(--text); }
.ui-list-item__sub     { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ui-list-item__meta    { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ui-list-item__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ui-list-item--empty {
  padding: 32px 22px;
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ── Modal (Overlay-Dialog mit Header + Body + Footer) ─────────────── */
.ui-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20,20,18,0.45);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
  animation: backdropFadeIn .15s ease-out;
}
.ui-modal {
  background: var(--bg-surface);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  max-width: 640px; width: 100%;
  max-height: calc(100vh - 64px);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn .2s ease-out;
}
@keyframes modalSlideIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.ui-modal--lg { max-width: 880px; }
.ui-modal--xl { max-width: 1100px; }

/* ── Globale Suche · Modal ────────────────────────────────────────────
   Eigene Overlay-Klasse statt .ui-modal-overlay, weil das Search-Modal
   etwas höher angedockt ist (ca. 12vh von oben statt zentriert) — das
   ist die übliche Konvention für Command-Palettes (Spotlight, Raycast,
   Linear). Auf Mobile geht das Modal in den Vollbild-Modus. */
.ui-search-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20,20,18,0.45);
  z-index: 9100;        /* über normalen Modals + Detail-Drawer */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 32px;
  animation: backdropFadeIn .15s ease-out;
}
.ui-search-modal {
  background: var(--bg-surface);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 640px;
  max-height: 540px;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn .2s ease-out;
}
.ui-search-modal__input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  border-bottom: 0.5px solid var(--border-soft);
}
.ui-search-modal__input-icon {
  color: var(--text-muted); flex-shrink: 0;
  display: inline-flex;
}
.ui-search-modal__input {
  flex: 1; min-width: 0;
  border: 0; outline: 0;
  background: transparent;
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
}
.ui-search-modal__input::placeholder { color: var(--text-subtle); }
/* (.ui-search-modal__shortcut entfallen — App ist Maus-/Touch-bedient,
   die Esc-Taste ist durch das X im Header ersetzt.) */

.ui-search-modal__body {
  overflow-y: auto;
  flex: 1;
}
.ui-search-modal__group { padding: 8px 0; }
.ui-search-modal__group + .ui-search-modal__group {
  border-top: 0.5px solid var(--border-soft);
}
.ui-search-modal__group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px 6px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-subtle); font-weight: 500;
}
.ui-search-modal__group-count {
  background: var(--bg-muted);
  padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: 0.4px;
  color: var(--text-muted);
  text-transform: none;
}
.ui-search-modal__item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  column-gap: 14px;
  padding: 10px 22px;
  cursor: pointer;
  align-items: center;
  transition: background .12s;
}
.ui-search-modal__item:hover { background: var(--bg-subtle); }
/* (.ui-search-modal__item--active entfallen — keine Tastatur-Navigation,
   daher kein „aktiver" Treffer ohne Hover.) */
.ui-search-modal__item-date {
  font-size: 12px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ui-search-modal__item-main { min-width: 0; }
.ui-search-modal__item-title {
  font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ui-search-modal__item-sub {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ui-search-modal__item-amount {
  font-size: 14px; font-weight: 500;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ui-search-modal__item-amount--neg { color: var(--text); }
.ui-search-modal__item-amount--pos { color: var(--success-text); }

/* (.ui-search-modal__footer mit kbd-Hints entfallen — keine Tastatur-
   Shortcuts mehr, der Footer wäre leer.) */

.ui-search-modal__empty {
  padding: 60px 22px;
  text-align: center;
  font-size: 13.5px; color: var(--text-muted);
  line-height: 1.6;
}
.ui-search-modal__empty-icon {
  margin: 0 auto 12px;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--bg-muted);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-subtle);
}

/* Match-Highlight im Treffer-Text — gemeinsam mit dem allgemeinen
   <mark>-Default. */
.ui-search-modal mark {
  background: var(--warning-bg);
  color: var(--warning-text);
  font-weight: 600;
  padding: 0 2px;
  border-radius: 2px;
}

.ui-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 0.5px solid var(--border-soft);
}
.ui-modal__title { font-size: 16px; font-weight: 500; color: var(--text); }
.ui-modal__close {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; cursor: pointer;
  color: var(--text-muted); background: none; border: 0;
}
.ui-modal__close:hover { background: var(--bg-muted); color: var(--text); }
.ui-modal__body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
  display: flex; flex-direction: column; gap: 14px;
}
.ui-modal__footer {
  padding: 14px 22px;
  border-top: 0.5px solid var(--border-soft);
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}

/* ── Reset-Row (destructive Action mit Title + Description + Button) ── */
.ui-reset-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 0;
  border-top: 0.5px solid var(--border-soft);
}
.ui-reset-row:first-of-type { border-top: 0; padding-top: 4px; }
.ui-reset-row__text  { flex: 1; min-width: 200px; }
.ui-reset-row__title { font-size: 14px; font-weight: 500; color: var(--text); }
.ui-reset-row__desc  { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.ui-reset-row__actions {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.ui-reset-row__confirm-text { font-size: 12.5px; color: var(--text-muted); }


/* ══════════════════════════════════════════════════════════════════════
   BUTTON-MODIFIER (Erweiterungen)
   ══════════════════════════════════════════════════════════════════════ */

/* Size-Modifier */
.ui-btn--sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.ui-btn--lg { height: 42px; padding: 0 20px; font-size: 14px; }

/* Danger-Variants */
.ui-btn--danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}
.ui-btn--danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.ui-btn--danger-solid {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.ui-btn--danger-solid:hover { opacity: 0.92; }


/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
   ──────────────────────────────────────────────────────────────────────
   ALLE Media-Queries leben hier am Ende der Datei. Konvention: Default-
   Stile bleiben pro Komponente lokal definiert (BEM-Kohäsion). Diese
   Sektion enthält ausschließlich die responsiven Overrides.

   Reihenfolge:
     1. Desktop-only-Overrides (verstecken Mobile-only-Elemente)
     2. Tablet (≤1023px)
     3. Mobile (≤639px)  ← spezifischer, gewinnt bei Konflikten

   WICHTIG: Niemals @media-Blöcke woanders im File einfügen — alle hierher.
   ══════════════════════════════════════════════════════════════════════ */


/* ── 1. Desktop-only: Mobile-Elemente garantiert ausblenden ────────── */

@media (min-width: 640px) {
  /* Mobile-Sheet existiert nie auf Desktop, auch wenn Alpine x-show es triggert */
  .ui-mobile-sheet,
  .ui-mobile-sheet-backdrop { display: none !important; }
}

@media (min-width: 1024px) {
  /* Detail-Backdrop nur Tablet/Mobile — Desktop nutzt Sidebar als Grid-Spalte */
  .ui-detail-backdrop { display: none !important; }
}


/* ── 2. Tablet (≤1023px) ────────────────────────────────────────────── */

@media (max-width: 1023px) {

  /* Layout-Wrapper kompakter */
  .ui-root { padding: 28px 22px 36px; }
  .ui-topbar__nav { gap: 22px; }

  /* Settings-Grid: auf Tablet/Mobile 1-spaltig (Sections untereinander) */
  .ui-settings-grid { grid-template-columns: 1fr; }

  /* (Dashboard-TX-Tabelle gibt's nicht mehr — Dashboard nutzt Cards.) */

  /* TX-Page: Sidebar wird Drawer-Overlay statt Spalten-Layout */
  .ui-tx-layout { grid-template-columns: minmax(0, 1fr); }
  .ui-tx-row {
    grid-template-columns: 36px 70px minmax(0,1fr) 110px 90px 130px;
    column-gap: 12px;
    padding: 13px 18px;
    font-size: 13px;
  }
  .ui-tx-row > .ui-tx-row__col--hide-tablet { display: none; }
  .ui-tx-row--head { padding: 11px 18px; }

  /* Detail-Sidebar wird zum fixed-positioned Drawer von rechts.
     Slide-in-Animation via CSS-Keyframes — läuft jedes Mal automatisch,
     wenn Alpine das Element via x-if neu in den DOM mountet. */
  .ui-detail {
    position: fixed;
    top: 0; bottom: 0; right: 0;
    left: auto;                       /* explizit — sonst rechnet Browser komisch */
    width: 480px; max-width: 90vw;
    height: 100vh;                    /* erzwingen, falls bottom:0 nicht greift (iOS) */
    height: 100dvh;                   /* dynamic viewport height (besser auf Mobile-Browsers) */
    border-radius: 0;
    border: 0;
    border-left: 0.5px solid var(--border);
    z-index: 90;
    max-height: none;
    box-shadow: -16px 0 40px rgba(0,0,0,0.10);
    animation: detailSlideIn .24s cubic-bezier(.2, .8, .25, 1);
  }
  .ui-detail-backdrop { animation: backdropFadeIn .18s ease-out; }
}
@keyframes detailSlideIn {
  from { transform: translateX(100%); opacity: 0.6; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes backdropFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ── 3. Mobile (≤639px) ─────────────────────────────────────────────── */

@media (max-width: 639px) {

  /* ─── Body & Layout ─── */
  body.ui-mode { padding-bottom: 100px; }   /* Platz für Bottom-Nav */
  body.ui-mode .main { padding: 0; }
  .ui-root { padding: 16px 14px 96px; }

  /* Horizontales Scrollen unterbinden — Page soll fest auf Device-Breite sitzen */
  html, body { overflow-x: hidden; max-width: 100vw; }

  /* ─── Topbar (kompakt: Logo-Mark + Page-Title + Bell + Logout) ─── */
  /* Mobile: Topbar sticky am oberen Rand mit kleinerem Top-Offset.
     16px matcht .ui-root padding-top — der Wrapper, in dem der Page-
     Inhalt unter der Topbar lebt. */
  .ui-topbar { padding: 12px 14px; gap: 10px; border-radius: 12px; top: 16px; }
  .ui-topbar__brand { gap: 12px; flex: 1; min-width: 0; }
  .ui-topbar__nav { display: none; }
  .ui-topbar__actions > .ui-pill { display: none; }
  .ui-topbar__divider { display: none; }
  .ui-topbar__month { display: none; }
  .ui-topbar__page-title { display: inline-block; }
  .ui-topbar__logo span { display: none; }   /* „klaro"-Schriftzug raus */

  /* Status-Strip unter der Topbar (Live-Lauf + Monat) */
  .ui-topbar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 14px;
    background: var(--bg-surface);
    border: 0.5px solid var(--border);
    border-radius: 10px;
    font-size: 12.5px;
    color: var(--text-muted);
  }
  .ui-topbar-status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
  .ui-topbar-status__month { margin-left: auto; color: var(--text); position: relative; }

  /* ─── Mobile-Sheet & Bottom-Nav & FAB sichtbar ─── */
  .ui-mobile-sheet         { display: block; }
  .ui-mobile-sheet-backdrop { display: block; }
  .ui-bottom-nav            { display: grid; }
  .ui-fab                   { display: inline-flex; bottom: 90px; }

  /* ─── Greeting kompakt ─── */
  .ui-greeting { padding: 20px 4px 14px; flex-wrap: wrap; gap: 10px; }
  .ui-greeting__title { font-size: 22px; }
  .ui-greeting__meta  { font-size: 13px; }

  /* ─── KPI-Karten 2-spaltig, kompakter ─── */
  .ui-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ui-kpi { padding: 16px 18px; }
  .ui-kpi__label { font-size: 12px; }
  .ui-kpi__value { font-size: 22px; letter-spacing: -0.5px; margin-top: 8px; }
  .ui-kpi__sub   { font-size: 11.5px; margin-top: 6px; }

  /* ─── Quick-Actions weg (FAB übernimmt) ─── */
  .ui-action-grid { display: none; }

  /* ─── Activity-Karte: kein eigener Border, Header eigene Karte ─── */
  .ui-activity {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    margin-top: 4px;
  }
  .ui-activity__title { display: none; }   /* Filter-Pills identifizieren genug */
  .ui-activity__head {
    background: var(--bg-surface);
    border: 0.5px solid var(--border);
    border-radius: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }
  .ui-activity__filters {
    margin-left: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .ui-activity__filters::-webkit-scrollbar { display: none; }
  .ui-activity__filter { white-space: nowrap; flex-shrink: 0; }
  .ui-activity__body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
  .ui-pipeline-bar {
    background: var(--bg-surface);
    border: 0.5px solid var(--border);
    border-radius: 12px;
    margin-top: 8px;
  }

  /* (Dashboard-TX-Row Mobile-Card-Layout entfällt — Dashboard nutzt
     jetzt .ui-tx-cards/.ui-tx-card überall.) */

  /* ─── TX-Page + Belege: Tabelle aus, Karten an, Bulk weg ─── */
  .ui-tx-table,
  .ui-receipt-table { display: none; }
  .ui-tx-cards,
  .ui-receipt-cards { display: flex; flex-direction: column; gap: 8px; }
  .ui-bulk-bar { display: none; }   /* Bulk-Mode auf Mobile bewusst ausgespart */

  /* ─── Filter-Bar Mobile (TX + Belege parallel) ─── */
  .ui-tx-filter-bar,
  .ui-receipt-filter-bar { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .ui-tx-filter-bar .ui-activity__filters,
  .ui-receipt-filter-bar .ui-activity__filters {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .ui-tx-filter-bar .ui-activity__filters::-webkit-scrollbar,
  .ui-receipt-filter-bar .ui-activity__filters::-webkit-scrollbar { display: none; }
  .ui-tx-filter-bar .ui-activity__filter,
  .ui-receipt-filter-bar .ui-activity__filter { white-space: nowrap; flex-shrink: 0; }
  .ui-tx-filter-bar__divider,
  .ui-receipt-filter-bar__divider { display: none; }
  .ui-tx-filter-bar .ui-search,
  .ui-receipt-filter-bar .ui-search { flex: 1; min-width: 0; }
  .ui-tx-filter-bar .ui-search__input,
  .ui-receipt-filter-bar .ui-search__input { width: 100%; min-width: 0; }

  /* ─── Detail-Drawer: echtes Vollbild ─── */
  .ui-detail {
    inset: 0;                         /* überschreibt top/right/bottom/left */
    width: 100%; max-width: 100%;
    height: 100vh; height: 100dvh;
    z-index: 95;
  }
  .ui-detail__head { padding: 14px 12px 12px; gap: 10px; }
  .ui-detail__back {
    display: inline-flex;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    border: 0; background: none;
    cursor: pointer; color: var(--text);
    border-radius: 9px;
    flex-shrink: 0;
    order: 1;
    margin-left: -8px;
  }
  .ui-detail__back:hover { background: var(--bg-muted); }
  .ui-detail__head-text     { order: 2; }
  .ui-detail__status-badge  { order: 3; margin-left: auto; }
  .ui-detail__close         { display: none; }

  /* ─── Generischer Helper ─── */
  .ui-hide-mobile { display: none !important; }

  /* ─── Notification-Panel & Search-Modal · Mobile Full-Screen ───
     Auf Mobile sollen overlay-Komponenten den ganzen Viewport nehmen —
     das 380px-Panel-Pattern aus Desktop wirkt auf schmalen Screens
     gequetscht und lässt die Inhalte zum Rand laufen. */
  .ui-notif-panel {
    inset: 0;
    width: 100%; max-width: 100%;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
    /* Slide-In von rechts beibehalten — fühlt sich auch bei Vollbild
       mobile natürlich an (Standard-Gesture-Richtung). */
  }
  .ui-search-modal-overlay {
    /* Kein vertikales Padding mehr — Modal nimmt vollen Viewport. */
    padding: 0;
    align-items: stretch;
  }
  .ui-search-modal {
    width: 100%; max-width: 100%;
    max-height: 100%;
    height: 100vh; height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    animation: none;          /* Kein slide-in auf Vollbild — wirkt sonst hektisch */
  }
  .ui-search-modal__input-wrap { padding: 16px 16px 14px; }
  .ui-search-modal__group-head,
  .ui-search-modal__item        { padding-left: 16px; padding-right: 16px; }
  .ui-search-modal__footer      { padding: 12px 16px; }

  /* ──────────────────────────────────────────────────────────────────
     Mobile-Bugfix-Sprint 2026-04-26
     Sammelt punktuelle Fixes, die durch Screenshots aufgefallen sind:
     überlaufende Beträge in TX-Karten, Settings 2-Spalten zu eng,
     Section-Header-Action abgeschnitten, Modal-Footer-Buttons eng.

     ROOT-CAUSE für die meisten Overflow-Probleme: Flex-Items haben in
     CSS-Default `min-width: auto` (= mindestens so breit wie ihr Inhalt).
     Das propagiert durch Eltern-Hierarchien und bläst Container auf,
     selbst wenn der Container eigentlich `overflow-x: auto` hat. Der
     Effekt: die ganze Page rutscht über die Viewport-Breite, statt
     dass der innere Scroll-Container scrollt.

     Fix: `min-width: 0` auf allen Containern in der Kette, plus
     `max-width: 100%` damit niemand größer wird als der Parent.
     ────────────────────────────────────────────────────────────────── */
  .ui-shell-wrap,
  .ui-root,
  .page,
  .ui-activity,
  .ui-activity__head,
  .ui-activity__filters,
  .ui-activity__body,
  .ui-section,
  .ui-section__head,
  .ui-section__body,
  .ui-section__body--grid-2,
  .ui-section__body--grid-3,
  .ui-settings-grid,
  .ui-tabs,
  .ui-tx-filter-bar,
  .ui-receipt-filter-bar,
  .ui-receipt-layout {
    min-width: 0;
    max-width: 100%;
  }
  /* Direct-Child-Wrapper (oft inline-style ohne Klasse, z. B. Dashboard
     Activity-Header). Brauchen min-width:0 + width:100% damit sie nicht
     ihre Min-Content-Breite nach oben durchdrücken. */
  .ui-activity__head > *,
  .ui-section__head > *,
  .ui-tx-filter-bar > *,
  .ui-receipt-filter-bar > * {
    min-width: 0;
    max-width: 100%;
  }

  /* Scroll-Container: hart auf Viewport-Breite minus Padding-Summe
     limitieren — die elegante min-width:0-Cascade hat in der Praxis
     nicht zuverlässig gegriffen, deshalb hier der pragmatische Anker
     direkt am Viewport.
     - .ui-tabs sitzt direkt in .ui-root → nur 2× 14px Page-Padding
     - .ui-activity__filters sitzt zusätzlich in .ui-activity__head
       (mit eigenen 2× 16px) → 28+32 = 60px */
  .ui-tabs {
    max-width: calc(100vw - 28px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ui-activity__filters {
    max-width: calc(100vw - 60px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ui-tabs::-webkit-scrollbar,
  .ui-activity__filters::-webkit-scrollbar { display: none; }

  /* Dashboard-TX-Row: angeglichen an das TX-Card-Layout (page-transactions
     Mobile), das der User als gut bezeichnet hat. Drei Zeilen:
       (Dashboard nutzt jetzt überall .ui-tx-cards/.ui-tx-card — die
       .ui-tx-row-Mobile-Verkleidung wird nicht mehr gebraucht. Die TX-Page-
       Tabellen-Row .ui-tx-row [vormals .ui-tx-row] wird auf Mobile
       komplett ausgeblendet, Cards übernehmen.) */

  /* ── Detail-Drawer Mobile-Hintergrund (beige) ──────────────────────
     Auf Mobile geht der Drawer Vollbild — alles im weißen Surface-Look
     wirkte zu nüchtern, weil der Body weiße Bereiche nicht mehr von
     den Karten trennt. Auf Beige (--bg-page) sitzen Beleg-Item, KI-
     Vorschlag-Karte etc. wieder als klare weiße Inseln. Header bleibt
     weiß (Surface), damit der Status-Badge sauber an seinem Anker sitzt. */
  .ui-detail {
    background: var(--bg-page);
  }
  .ui-detail__head {
    background: var(--bg-surface);
  }
  .ui-detail__actions {
    background: var(--bg-page);
  }
  /* Settings-Sections: 2-/3-Spalten-Grids fallen auf 1 Spalte zurück.
     Sonst sitzen Inputs auf Mobile gequetscht. */
  .ui-section__body--grid-2,
  .ui-section__body--grid-3 {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
  }
  .ui-section__body { padding: 16px; gap: 14px; }
  /* Section-Header: Title + Action wickeln, falls Action-Text-Label
     länger ist als Restplatz (z.B. „Schon konfiguriert", „Verbinden"). */
  .ui-section__head {
    flex-wrap: wrap;
    padding: 14px 16px;
    min-height: 0;
    row-gap: 6px;
  }

  /* Manual-Match-Modal-Footer: Buttons dürfen wrappen, „Verknüpfung lösen"
     darf eine eigene Zeile bekommen. */
  .ui-modal__footer-row {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .ui-modal__footer-row .ui-btn--ghost.ui-btn--danger {
    /* Unlink-Button auf Mobile in eigene Zeile, links bündig */
    flex: 1 1 100%;
    justify-content: center;
    order: 2;
  }
  /* Modal-Body Padding auf Mobile etwas runter — sonst ist die
     Beleg-Liste eng am Rand. */
  .ui-modal__body { padding: 16px; }
  .ui-modal__head { padding: 14px 16px; }
  .ui-modal__footer { padding: 12px 16px; }
  /* Suchfeld im Manual-Match-Modal: kein Min-Width sodass es auch
     auf engen Geräten nicht ausbüxt. */
  .ui-mm-status { padding: 12px; gap: 10px; font-size: 12.5px; }
}
