/* youbooth — Konto-Flotte (Paket D, PKD, 19.11.2026): Sendungen, Flotte,
   Duplizieren mit Auswahl, Bericht. Baut auf konfetti.css/layout.css und
   konto-cockpit.css auf (Farben, .knopf, .kc-chip, .kc-dialog). */

/* ---------- Sendungen (U37) ---------- */
.kf-sendungen { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  display: flex; flex-direction: column-reverse; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.kf-sendung { pointer-events: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px;
  border: 2px solid var(--tinte, #1B1030); background: var(--hell, #FFFBF2); color: var(--tinte, #1B1030); box-shadow: 0 5px 0 var(--tinte, #1B1030);
  font: 400 13.5px/1.4 var(--schrift, system-ui); animation: kf-rein .35s cubic-bezier(.2,.8,.2,1); transition: opacity .35s ease, transform .35s ease; }
.kf-sendung[data-status="erledigt"] { background: #E9FFF6; }
.kf-sendung[data-status="fehler"] { background: #FFE8F0; }
.kf-sendung.kf-weg { opacity: 0; transform: translateX(-24px); }
@keyframes kf-rein { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.kf-s-kopf { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.kf-s-titel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kf-s-titel b { font: 800 14.5px/1.25 var(--schrift, system-ui); overflow-wrap: anywhere; }
.kf-s-titel span { overflow-wrap: anywhere; color: #4A4060; }
.kf-s-zu { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; border-radius: 99px; background: none; color: inherit; cursor: pointer; }
.kf-s-zu:focus-visible { outline: 3px solid var(--violett, #6B3DF5); }
.kf-stufen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.kf-stufen li { position: relative; padding: 6px 4px 0; border-top: 4px solid rgba(27,16,48,.15); font: 800 11.5px/1.2 var(--schrift, system-ui); color: #6E6585; transition: border-color .3s, color .3s; }
.kf-stufen li[data-stand="fertig"] { border-color: var(--minze, #2EE6A8); color: var(--tinte, #1B1030); }
.kf-stufen li[data-stand="fertig"]::before { content: '✓ '; }
.kf-stufen li[data-stand="dran"] { border-color: var(--sonne, #FFC83D); color: var(--tinte, #1B1030); }
.kf-stufen li[data-stand="dran"]::after { content: ''; position: absolute; top: -4px; left: 0; height: 4px; width: 40%; background: var(--tinte, #1B1030); animation: kf-lauf 1.2s ease-in-out infinite; }
.kf-stufen li[data-stand="aus"] { border-color: var(--pink, #FF3D7F); }
@keyframes kf-lauf { 0% { left: 0; width: 10%; } 50% { width: 40%; } 100% { left: 90%; width: 10%; } }
.kf-s-text { margin: 0; }
.kf-s-uhr, .kf-warnung { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 10px; border-radius: 12px; background: #FFF3C4; border: 2px solid var(--sonne, #FFC83D); font: 600 13px/1.4 var(--schrift, system-ui); }
.kf-s-uhr .kc-ikon, .kf-warnung .kc-ikon { margin-top: 1px; }

/* ---------- Flotte (U39) ---------- */
.kf-flotte { display: flex; flex-direction: column; gap: 12px; }
.kf-kopf { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.kf-zahlen { display: flex; flex-wrap: wrap; gap: 8px; }
.kf-zahl { display: flex; align-items: baseline; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 14px; border: 2px solid var(--tinte, #1B1030); background: var(--weiss, #fff); }
.kf-zahl b { font: 800 20px/1 var(--schrift, system-ui); font-variant-numeric: tabular-nums; }
.kf-zahl span { font: 600 13px/1 var(--schrift, system-ui); color: #4A4060; }
.kf-zahl[data-art="gut"] { background: #E9FFF6; }
.kf-zahl[data-art="warn"] { background: #FFF3C4; }
.kf-umschalt { display: inline-flex; border: 2px solid var(--tinte, #1B1030); border-radius: 99px; overflow: hidden; background: var(--weiss, #fff); }
.kf-ans { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; background: none; color: inherit; font: 800 13.5px/1 var(--schrift, system-ui); cursor: pointer; }
.kf-ans[aria-pressed="true"] { background: var(--tinte, #1B1030); color: var(--weiss, #fff); }
.kf-ans:focus-visible, .kf-chipknopf:focus-visible { outline: 3px solid var(--violett, #6B3DF5); outline-offset: 2px; }
.kf-leiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.kf-filter, .kf-schnell { display: flex; flex-wrap: wrap; gap: 6px; }
.kf-chipknopf { min-height: 44px; padding: 0 14px; border-radius: 99px; border: 2px solid var(--tinte, #1B1030); background: var(--weiss, #fff); color: inherit; font: 800 13px/1 var(--schrift, system-ui); cursor: pointer; transition: background .2s, transform .15s; }
.kf-chipknopf[aria-pressed="true"] { background: var(--sonne, #FFC83D); }
.kf-chipknopf:active { transform: translateY(1px); }
.kf-suche { flex: 1 1 220px; max-width: 360px; min-height: 44px; }
.kf-aktion { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border-radius: 16px; border: 2px dashed rgba(27,16,48,.35); background: var(--hell, #FFFBF2); transition: border-color .2s, box-shadow .2s; }
.kf-aktion[data-aktiv="1"] { border-style: solid; border-color: var(--tinte, #1B1030); box-shadow: 0 4px 0 var(--tinte, #1B1030); }
.kf-wahl { flex: 1 1 100%; font: 800 13.5px/1.3 var(--schrift, system-ui); }
@media (min-width: 900px) { .kf-wahl { flex: 0 0 auto; margin-right: 6px; } }
.kf-tabelle { display: flex; flex-direction: column; border: 2px solid var(--tinte, #1B1030); border-radius: 16px; background: var(--weiss, #fff); overflow: hidden; }
.kf-zeile { display: grid; grid-template-columns: 44px minmax(140px, 1.3fr) minmax(130px, 1fr) minmax(100px, 1fr) 80px minmax(140px, 1.4fr); gap: 10px; align-items: center; padding: 8px 12px; border-top: 1.5px solid rgba(27,16,48,.1); font: 400 14px/1.35 var(--schrift, system-ui); transition: background .15s; }
.kf-zeile:first-child { border-top: 0; }
.kf-zeile[data-gewaehlt] { background: #F3EEFF; }
.kf-kopfzeile { font: 800 11.5px/1.2 var(--schrift, system-ui); text-transform: uppercase; letter-spacing: .05em; color: #4A4060; background: var(--hell, #FFFBF2); }
.kf-z-wahl { display: grid; place-items: center; width: 44px; height: 44px; }
.kf-z-wahl input { width: 22px; height: 22px; accent-color: var(--violett, #6B3DF5); cursor: pointer; }
.kf-z-name { display: flex; flex-direction: column; min-width: 0; }
.kf-z-name b { font-weight: 800; overflow-wrap: anywhere; }
.kf-z-name small { color: #6E6585; font-size: 12px; }
.kf-z-status { display: flex; align-items: center; gap: 8px; }
.kf-punkt { flex: none; width: 12px; height: 12px; border-radius: 99px; border: 2px solid var(--tinte, #1B1030); background: #D9D4E4; }
.kf-punkt[data-an="1"] { background: var(--minze, #2EE6A8); box-shadow: 0 0 0 0 rgba(46,230,168,.6); animation: kf-puls 2.2s ease-out infinite; }
@keyframes kf-puls { 70% { box-shadow: 0 0 0 8px rgba(46,230,168,0); } 100% { box-shadow: 0 0 0 0 rgba(46,230,168,0); } }
.kf-z-event, .kf-z-fassung { overflow-wrap: anywhere; }
.kf-z-fassung { font: 600 13px/1.3 var(--mono, ui-monospace, monospace); }
.kf-z-hinweis { display: flex; flex-wrap: wrap; gap: 4px; }
.kf-z-hinweis .kc-chip { white-space: normal; text-transform: none; letter-spacing: 0; font-size: 12px; line-height: 1.25; padding: 4px 10px; }
.kf-nichts { padding: 16px; }
@media (max-width: 760px) {
  .kf-kopfzeile { display: none; }
  .kf-zeile { grid-template-columns: 44px 1fr; grid-template-areas: "w n" "w s" "w e" "w h"; gap: 2px 10px; padding: 10px 12px; }
  .kf-z-wahl { grid-area: w; align-self: start; }
  .kf-z-name { grid-area: n; } .kf-z-status { grid-area: s; } .kf-z-hinweis { grid-area: h; padding-top: 4px; }
  .kf-z-event { grid-area: e; color: #4A4060; font-size: 13px; }
  .kf-z-fassung { display: none; }
  .kf-z-event:empty, .kf-z-event:only-child { display: none; }
  .kf-suche { max-width: none; }
}

/* ---------- Duplizieren (U38) und Bericht (U40) ---------- */
.kf-unter { display: block; margin-top: 4px; font: 800 14px/1.3 var(--schrift, system-ui); }
.kf-wahlliste { display: flex; flex-direction: column; gap: 0; max-height: 46vh; overflow: auto; padding-right: 4px; }
.kf-wahlliste [data-aus] { opacity: .5; }
:is(.welt-a, .welt-b) .kc-dialog.kf-breit { width: min(720px, calc(100vw - 32px)); }
.kf-bericht { display: flex; flex-direction: column; gap: 12px; }
.kf-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kf-kachel { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; border: 2px solid var(--tinte, #1B1030); background: var(--weiss, #fff); animation: kf-rein .4s cubic-bezier(.2,.8,.2,1) backwards; }
.kf-kachel:nth-child(2) { animation-delay: .04s; } .kf-kachel:nth-child(3) { animation-delay: .08s; } .kf-kachel:nth-child(4) { animation-delay: .12s; } .kf-kachel:nth-child(5) { animation-delay: .16s; } .kf-kachel:nth-child(6) { animation-delay: .2s; }
.kf-kachel b { font: 400 clamp(26px, 4vw, 36px)/1 var(--plakat, system-ui); font-variant-numeric: tabular-nums; }
.kf-kachel span { font: 600 12.5px/1.3 var(--schrift, system-ui); color: #4A4060; }
@media (max-width: 520px) { .kf-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  .kf-sendung, .kf-kachel, .kf-punkt[data-an="1"], .kf-stufen li[data-stand="dran"]::after { animation: none; }
  .kf-sendung, .kf-chipknopf, .kf-zeile { transition: none; }
}

/* Handy: Sendungen nehmen hoechstens die halbe Hoehe, der Rest bleibt bedienbar. */
@media (max-width: 520px) {
  .kf-sendungen { max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; }
  .kf-sendung { gap: 6px; padding: 10px 12px; }
}
