/* ══════════════════════════════════════════════════════════════════
   MIETBAR — COCKPIT-DESIGN  (Verwaltung / admin/*)
   ------------------------------------------------------------------
   Quelle: .claude/skills/cockpit-design (SKILL.md + references/cockpit.css)
   Beschlossen 26.08.2026.

   WICHTIG — Ladereihenfolge (admin/_includes/head.php):
       ../styles.css  ->  cockpit.css  ->  shared.css  ->  <seiten-css>
       ->  print_pdf.css  ->  responsive.css

   Diese Datei wird NUR von Admin-Seiten geladen (head.php). Die
   POS-Oberflaechen (index.html, kasse*.html, app/, editor/) laden sie
   nicht und bleiben deshalb unveraendert.

   Aufbau:
     1. Tokens  — ueberschreibt die Homer-:root aus styles.css
     2. Basis & Typografie
     3. Neue Komponenten-Bibliothek (Karten, Charts, Bon, Rang …)
     4. Motion
   Die Shell (Rail, Panel, Topbar) und die Alt-Komponenten stehen in
   shared.css — dort direkt auf Cockpit gehoben.
   ══════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════
   1. TOKENS
   Alte Homer-Namen behalten ihren Namen (kein Such-&-Ersetz-Risiko),
   bekommen aber die Cockpit-Werte. Neue Namen kommen dazu.
   ══════════════════════════════════════════════════════════════════ */
:root {
  /* ── Flaechen ──────────────────────────────────────────── */
  --bg:             #F1F4EF;
  --canvas:         #F1F4EF;
  --surface:        #FFFFFF;
  --surface-2:      #F6F8F4;
  --surface-3:      #EBEFE8;

  /* ── Linien ────────────────────────────────────────────── */
  --border:         #E2E8DF;
  --border-2:       #CDD6CB;
  --line:           #E2E8DF;
  --line-2:         #CDD6CB;

  /* ── Text ──────────────────────────────────────────────── */
  --text-1:         #1A241D;
  --text-2:         #5B6A5F;
  --text-3:         #8D9C90;
  --text-inv:       #FFFFFF;
  --ink:            #1A241D;
  --ink-2:          #5B6A5F;
  --ink-3:          #8D9C90;

  /* ── Marken-Gruen ──────────────────────────────────────── */
  --primary:        #3E9A1F;
  --primary-hover:  #2F7A16;
  --primary-soft:   #E3F2DA;
  --accent:         #3E9A1F;
  --brand:          #3E9A1F;
  --brand-deep:     #2F7A16;   /* textfaehig auf Weiss */
  --brand-bright:   #62CB31;   /* nur als Glow/Akzent auf Dunkel */
  --brand-soft:     #E3F2DA;
  --brand-faint:    #B5DCA0;   /* unbetonte Chart-Balken */

  /* ── Status ────────────────────────────────────────────── */
  --success:        #2F7A16;
  --success-soft:   #E3F2DA;
  --success-hover:  #276512;
  --pos:            #2F7A16;
  --danger:         #C2453A;
  --danger-soft:    #F7E4E2;
  --danger-hover:   #A6352B;
  --neg:            #C2453A;
  --neg-soft:       #F7E4E2;
  --warn:           #B97E0A;
  --warn-soft:      #FBF0DA;
  --blue:           #2E9BC6;
  --blue-deep:      #1F6E8C;   /* textfaehige Tiefvariante von --blue */
  --orange:         #E05A33;
  --purple:         #7B4FA6;

  /* ── Nacht-Rail ────────────────────────────────────────── */
  --sidebar-bg:     #0C120E;
  --night:          #0C120E;
  --night-2:        #141C16;
  --night-line:     rgba(255,255,255,.07);
  --night-text:     #8FA396;
  --sidebar-text:   #8FA396;
  --sidebar-hover:  #D9E5DB;
  --sidebar-active: rgba(255,255,255,.07);

  /* ── Kategoriefarben — feste Zuordnung, CVD-validiert ──── */
  --cat-wein:       #7B4FA6;
  --cat-bier:       #E0A106;
  --cat-spritz:     #E05A33;
  --cat-af:         #2E9BC6;
  --cat-slush:      #C94F7C;

  /* ── Kosten-Sequenz dunkel->hell: Ware, Belege, Personal, USt, GewSt
     --k3b ist der Zwischenton fuer Aufstellungen mit sechs Kostenarten
     (Bilanz: zusaetzlich Umsatzprovision) — Reihenfolge nie rotieren. */
  --k1:             #35423A;
  --k2:             #52645A;
  --k3:             #71857A;
  --k3b:            #82968A;
  --k4:             #93A69B;
  --k5:             #B7C6BC;

  /* ── Radien ────────────────────────────────────────────── */
  --radius-sm:      7px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-pill:    99px;
  --r-sm:           7px;
  --r-md:           10px;
  --r-lg:           16px;
  --r-pill:         99px;

  /* ── Schatten ──────────────────────────────────────────── */
  --shadow-sm:      0 1px 2px rgba(26,36,29,.05);
  --shadow:         0 1px 2px rgba(26,36,29,.04), 0 8px 28px -12px rgba(26,36,29,.10);
  --shadow-lg:      0 2px 4px rgba(26,36,29,.05), 0 16px 40px -16px rgba(26,36,29,.16);
  --shadow-card:    0 1px 2px rgba(26,36,29,.04), 0 8px 28px -12px rgba(26,36,29,.10);
  --shadow-lift:    0 2px 4px rgba(26,36,29,.05), 0 16px 40px -16px rgba(26,36,29,.16);

  /* ── Motion ────────────────────────────────────────────── */
  --ease:           cubic-bezier(.32,.72,0,1);
  --transition:     300ms cubic-bezier(.32,.72,0,1);

  /* ── Schrift ───────────────────────────────────────────── */
  --mono:           'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --sans:           'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* ── Layout ────────────────────────────────────────────── */
  --topbar-height:  58px;
  --sidebar-width:  64px;    /* Icon-Rail */
  --panel-width:    228px;   /* Event-Panel */
}

/* ══════════════════════════════════════════════════════════════════
   2. BASIS & TYPOGRAFIE
   Die Basis-Schriftgroesse bleibt bewusst bei 13px (Bestand), damit die
   dichten Tabellen der Verwaltung nicht umbrechen. Komponenten setzen
   ihre Groessen selbst.
   ══════════════════════════════════════════════════════════════════ */
html, body {
  font-family: var(--sans);
  color: var(--text-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--brand-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brand-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  letter-spacing: -.02em;
  text-wrap: balance;
}

/* styles.css setzt global `header { display:flex; flex-direction:column }`
   fuer die POS-Topbar. Karten-Koepfe in den Seiten-CSS, die ein <header>
   benutzen, kippten dadurch in die Senkrechte. Hier einmal neutralisiert;
   die Admin-Topbar (#admin-app > header) setzt ihre Richtung selbst. */
.admin-content header,
.modal header,
.mb-modal-card header {
  flex-direction: row;
  align-items: center;
  background: none;
  border-bottom: 0;
}

/* ── Ziffern sprechen Kassenbon ───────────────────────────── */
.num, .mono, .tnum {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.num { font-weight: 700; }

/* Betraege in Tabellen & Listen immer mit Tabellenziffern */
.admin-table td,
.admin-table th { font-variant-numeric: tabular-nums; }

/* Kennzahl-Wert: die eine betonte Zahl einer Karte */
.kpi-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -.035em;
  font-size: clamp(24px, 2vw, 29px);
  line-height: 1.05;
}
.kpi-value.hero { font-size: clamp(30px, 3.2vw, 42px); }
.kpi-value.pos  { color: var(--brand-deep); }
.kpi-value.neg  { color: var(--neg); }

.big { font-size: clamp(24px, 2vw, 29px); line-height: 1.05; margin: 11px 0 3px; }
.big small { font-size: .55em; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.sub    { font-size: 12px;   color: var(--ink-2); margin: 0; }
.sub-3  { font-size: 11.5px; color: var(--ink-3); margin: 0; }
.delta-pos { color: var(--brand-deep); }
.delta-neg { color: var(--neg); }

/* Eyebrow / Kicker-Text (Mono-Uppercase) */
.eyebrow {
  font: 600 10px/1.3 var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ══════════════════════════════════════════════════════════════════
   3. KOMPONENTEN-BIBLIOTHEK
   Neue Klassen aus dem Cockpit-Entwurf. Kollidieren nicht mit den
   Alt-Klassen in shared.css / den Seiten-CSS.
   ══════════════════════════════════════════════════════════════════ */

/* ── Raster ───────────────────────────────────────────────── */
.ck-grid, .grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.c3  { grid-column: span 3; }
.c4  { grid-column: span 4; }
.c5  { grid-column: span 5; }
.c6  { grid-column: span 6; }
.c7  { grid-column: span 7; }
.c8  { grid-column: span 8; }
.c9  { grid-column: span 9; }
.c12 { grid-column: span 12; }

/* Zeilen-Spannen fuer Bento-Layouts (Hero-Karte ueber zwei Rasterzeilen) */
.r2 { grid-row: span 2; }
.r3 { grid-row: span 3; }

@media (max-width: 1360px) {
  .c7, .c8, .c9 { grid-column: span 12; }
  .c3, .c4, .c5 { grid-column: span 6; }
  /* Row-Span aufheben, sonst reisst das 2-Spalten-Layout */
  .r2, .r3 { grid-row: auto; }
}
@media (max-width: 760px) {
  .c3, .c4, .c5, .c6, .c7, .c8, .c9 { grid-column: span 12; }
}

/* ── Karte ────────────────────────────────────────────────── */
.ck-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 19px 17px;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: box-shadow .45s var(--ease), transform .45s var(--ease), border-color .45s var(--ease);
}
.ck-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
  border-color: var(--line-2);
}
.ck-card.flat:hover { transform: none; box-shadow: var(--shadow-card); border-color: var(--line); }

/* ── Kicker (Icon-Kachel + Mono-Label) ────────────────────── */
.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 10px/1.3 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.kicker .ic {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--ink-2);
  flex: none;
}
.kicker .ic svg { width: 14px; height: 14px; }
.kicker.pos .ic { background: var(--brand-soft); color: var(--brand-deep); }
.kicker.neg .ic { background: var(--neg-soft);   color: var(--neg); }

/* ── Sektions-Header (Mono-Titel + Untertitel + Hairline) ─── */
.sect-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.sect-head h2 {
  margin: 0;
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.sect-head p { margin: 0; font-size: 12px; color: var(--ink-3); }
.sect-head .rule { flex: 1; border-top: 1px solid var(--line); translate: 0 -3px; }

/* ── Hero (Seitenkopf) ────────────────────────────────────── */
.ck-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.ck-hero h1 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 31px);
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.08;
}
.ck-hero-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 7px;
  font: 500 11.5px/1 var(--mono);
  color: var(--ink-3);
}
.ck-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Status-Chip mit Puls-Punkt ───────────────────────────── */
.chip-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  font: 600 10px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.chip-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  animation: ck-pulse 2.4s infinite;
}
.chip-status.quiet { background: var(--surface-2); color: var(--ink-3); }
.chip-status.quiet .dot { background: var(--ink-3); animation: none; }
.chip-status.warn { background: var(--warn-soft); color: var(--warn); }
.chip-status.warn .dot { background: var(--warn); animation: none; }
@keyframes ck-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(62,154,31,.4); }
  50%      { box-shadow: 0 0 0 5px rgba(62,154,31,0); }
}

/* ── Buttons: Primaer dunkel (nicht gruen!), alles Pillen ─── */
.ck-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: var(--r-pill);
  background: var(--ink); color: #fff;
  padding: 9px 17px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  box-shadow: 0 8px 20px -10px rgba(26,36,29,.5);
}
.ck-btn-primary:hover  { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(26,36,29,.55); }
.ck-btn-primary:active { transform: scale(.98); }
.ck-btn-primary .pip {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.16);
  display: grid; place-items: center;
  margin-right: -8px;
  transition: transform .3s var(--ease);
}
.ck-btn-primary:hover .pip { transform: translateX(2px); }

.ck-btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-pill);
  padding: 8.5px 16px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}
.ck-btn-ghost:hover { border-color: var(--ink-3); }

.ck-btn-quiet {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2);
  border-radius: var(--r-pill);
  padding: 6.5px 14px;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.ck-btn-quiet:hover { border-color: var(--ink-3); color: var(--ink); }

/* ── Segmented-Toggle & Filter-Chips ──────────────────────── */
.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px; gap: 2px;
}
.seg button {
  border: 0; background: transparent;
  border-radius: var(--r-pill);
  padding: 5.5px 14px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
/* .on und .active sind gleichwertig — die Alt-Seiten nutzen .active */
.seg button.on,
.seg button.active {
  background: var(--surface);
  color: var(--brand-deep);
  box-shadow: 0 1px 3px rgba(26,36,29,.12);
}

.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 4px 10.5px;
  font: 600 10.5px/1 var(--mono);
  color: var(--ink-2); cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.chips button:hover { border-color: var(--ink-3); color: var(--ink); }
.chips button.on,
.chips button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ── Neutrale Zuordnungs-Pille ────────────────────────────────
   Fuer Zuordnungen ohne Wertung: Event einer Kasse, Transfer-Typ,
   Lagerort-Typ. Bewusst NICHT gruen — Gruen bleibt Datenfarbe. */
.event-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font: 600 9.5px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* ── Tages-Pillen ─────────────────────────────────────────── */
.daypill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--r-pill);
  padding: 4px 10px;
  font: 600 10.5px/1 var(--mono);
  background: var(--brand-soft); color: var(--brand-deep);
}
.daypill.open {
  background: var(--surface-2); color: var(--ink-3);
  border: 1px dashed var(--line-2);
}
/* Entwurf: begonnen, aber nicht bestaetigt */
.daypill.draft { background: var(--warn-soft); color: var(--warn); }
/* Verwaist / kaputt: echter Fehler */
.daypill.orphan { background: var(--neg-soft); color: var(--neg); }

/* ── Chart-Wanne (Doppelrand-Prinzip) ─────────────────────── */
.well {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 14px 10px;
  margin-top: 14px;
}
.chart-flex { display: flex; flex-direction: column; }
.chart-flex .well { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }

/* ── SVG-Charts ───────────────────────────────────────────── */
.chart-svg { display: block; width: 100%; height: auto; }
.chart-svg text { font-family: var(--mono); }
.chart-svg .axis     { fill: var(--ink-3); font-size: 10px; }
.chart-svg .gridline { stroke: var(--line); stroke-width: 1; }
.chart-svg .baseline { stroke: var(--line-2); stroke-width: 1.2; }
.chart-svg .bar {
  fill: var(--brand);
  transform-box: fill-box; transform-origin: bottom;
  animation: ck-growY .9s var(--ease) both .2s;
}
.chart-svg .bar.faint { fill: var(--brand-faint); }
.chart-svg .bar.peak  { fill: var(--brand-deep); }
.chart-svg .goal-line { stroke: var(--ink-2); stroke-width: 1.4; stroke-dasharray: 4 4; }
/* Heller Unterzug, damit die gestrichelte Ziellinie auch auf dunklen
   Balken lesbar bleibt — immer VOR der .goal-line zeichnen. */
.chart-svg .goal-line-halo { stroke: var(--surface); stroke-width: 3; opacity: .8; }
.chart-svg .val-label { fill: var(--ink); font-size: 11.5px; font-weight: 600; }

/* ── Bullet-Chart (Quoten mit beschrifteten Zielmarken) ───── */
.bullet-scale { position: relative; height: 34px; }
.bullet-track {
  position: absolute; left: 0; right: 0; top: 20px;
  height: 9px; border-radius: var(--r-pill);
  background: var(--surface-3); overflow: hidden;
}
.bullet-fill {
  position: absolute; top: 0; bottom: 0; left: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  transform-origin: left;
  animation: ck-growX 1s var(--ease) both .25s;
}
.tick {
  position: absolute; top: 16px;
  width: 2px; height: 17px; border-radius: 2px;
  background: var(--ink-2);
}
.tick.warn { background: var(--warn); }
.tick-label {
  position: absolute; top: 0; translate: -100% 0; padding-right: 5px;
  font: 600 9px/1 var(--mono); color: var(--ink-3); white-space: nowrap;
}
.tick-label.after { translate: 0 0; padding-right: 0; padding-left: 5px; }
.tick-label.warn  { color: var(--warn); }
.bullet-ends {
  display: flex; justify-content: space-between;
  font: 500 9.5px/1 var(--mono); color: var(--ink-3); margin-top: 5px;
}
.bullet-note {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px; color: var(--ink-2);
}

/* ── Splitbar + Legende ───────────────────────────────────── */
.splitbar {
  display: flex; gap: 2px; height: 12px;
  border-radius: var(--r-pill); overflow: hidden; margin-top: 14px;
}
.splitbar span { height: 100%; }
.ck-legend { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 11px; }
.ck-legend.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.lg { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); min-width: 0; }
.lg .sw { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.lg .num { font-size: 11.5px; font-weight: 600; color: var(--ink); margin-left: auto; }

/* ── Fortschrittsbalken ───────────────────────────────────── */
.pbar { height: 9px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.pbar span {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  transform-origin: left;
  animation: ck-growX 1s var(--ease) both .35s;
}

/* ── Rangliste (Kaestchen-Rang, Hairline-Trenner) ─────────── */
.rank-row {
  display: grid;
  grid-template-columns: 21px 1fr auto;
  align-items: center; gap: 11px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}
.rank-row:last-of-type { border-bottom: 0; }
.rank-n {
  width: 21px; height: 21px; border-radius: 6px;
  display: grid; place-items: center;
  font: 700 10.5px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--ink-2);
}
.rank-row.top .rank-n { background: var(--ink); color: #fff; }
.rank-name { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val  { font: 600 12px/1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Einheiten-Suffix hinter dem Wert („x", „Liter") — leise und in Sans */
.rank-val small {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 3px;
}
/* Varianten-Hinweis im Namen */
.rank-name small {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 5px;
}

/* ── Kategorie-Zeilen ─────────────────────────────────────── */
.cat-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr auto; gap: 12px; align-items: center; }
.cat-name { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; min-width: 0; }
.cat-name i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.cat-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Schmal: der Balken weicht, Name und Wert bleiben lesbar */
@media (max-width: 560px) {
  .cat-row { grid-template-columns: 1fr auto; }
  .cat-row .cat-bar { display: none; }
}
.cat-bar { height: 9px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.cat-bar span {
  display: block; height: 100%; border-radius: var(--r-pill);
  transform-origin: left; animation: ck-growX .9s var(--ease) both .3s;
}

/* ── Bon (Mono-Aufstellung mit Doppellinien-Summe) ────────── */
.bon { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.bon h3 {
  margin: 0 0 4px;
  font: 700 10px/1 var(--mono);
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-2);
  display: flex; justify-content: space-between; align-items: baseline;
}
.bon-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 6.5px 0;
  border-bottom: 1px dashed var(--line-2);
}
.bon-row .lbl { color: var(--ink-2); }
.bon-row .lbl small { display: block; font-size: 10px; color: var(--ink-3); }
.bon-row .num { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bon-row.total {
  border-bottom: 0;
  border-top: 3px double var(--ink-2);
  margin-top: 2px; padding-top: 8px;
}
.bon-row.total .lbl, .bon-row.total .num { font-weight: 700; color: var(--ink); }
/* Eingerueckte Unterposition (z. B. einzelne Sonderartikel) */
.bon-row.sub {
  padding: 4px 0 4px 14px;
  border-bottom-style: dotted;
  font-size: 11px;
  color: var(--ink-3);
}
.bon-row.sub .lbl { color: var(--ink-3); }
/* Leiser Nachsatz hinter der Summenzeile (z. B. Wechselgeld-Bestaende) */
.bon-foot { margin-top: 8px; color: var(--ink-3); }
.bon-foot .bon-row { border-bottom-style: dashed; color: var(--ink-3); }
.bon-foot .bon-row:last-child { border-bottom: 0; }

/* ── Generische Tabellenzellen (ersetzen Inline-Styles) ───── */
.cell-muted { color: var(--ink-3); }
.cell-dash  { color: var(--line-2); }
.cell-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font: 600 9.5px/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cell-sub svg { width: 11px; height: 11px; flex: none; opacity: .8; }
.cell-clip {
  /* Kein display:block — als <td> muss die Zelle table-cell bleiben,
     sonst fällt die Spalte aus dem Zeilenraster (Versatz). */
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
}
.cell-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.cell-link:hover { color: var(--brand-deep); border-color: var(--brand); }
.col-sort {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

/* ── Ruhige Hinweis-Notiz ─────────────────────────────────── */
.ck-note {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.ck-note strong { color: var(--ink); font-weight: 600; }
.ck-note.warn { background: var(--warn-soft); border-color: #EBDCBC; color: var(--ink); }
.ck-note.neg  { background: var(--neg-soft);  border-color: #EFD2CE; color: var(--ink); }

/* ── Filter-Checkbox als Pille (aktiv = Ink) ──────────────── */
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 6px 13px 6px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.check-pill:hover { border-color: var(--ink-3); color: var(--ink); }
.check-pill:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ── Leerer Zustand ───────────────────────────────────────── */
.ck-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 34px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 12.5px; text-align: center;
}

/* ══════════════════════════════════════════════════════════════════
   4. MOTION
   ══════════════════════════════════════════════════════════════════ */
.rise { animation: ck-rise .7s var(--ease) both; }
.rise-1 { animation-delay: .05s; }
.rise-2 { animation-delay: .10s; }
.rise-3 { animation-delay: .15s; }
.rise-4 { animation-delay: .20s; }
.rise-5 { animation-delay: .25s; }
.rise-6 { animation-delay: .30s; }

@keyframes ck-rise  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ck-growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ck-growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
