/* =============================================================================
   PROJEKTCOCKPIT · ANZEIGEN                                             design/anzeigen.css
   Toast, Leerzustand, Hinweise, Avatare, Stepper, Kacheln
   Teil von design/components.css (ADR-088, Teilung je Baustein-Familie 20.10.2026). Reihenfolge im <head>: app/design/README.md.
   ============================================================================= */

/* ============================================================================
   10 RÜCKMELDUNG: Toast, Leerzustand, Hinweise
   ========================================================================== */
#toast { position: fixed; left: 50%; bottom: calc(var(--sp-7) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: var(--sp-2); background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); font-size: var(--fs-ui); font-weight: var(--fw-medium); z-index: var(--z-toast); box-shadow: var(--e-3); max-width: calc(100vw - 32px); animation: toastIn var(--dur-2) var(--ease); }
#toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }   /* Runde 6: hell, unten mittig, Punkt wie Status – kein Schwarz */
#toast.err::before { background: var(--crit); }
#toast .toast-akt { margin-left: var(--sp-3); padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: var(--fw-semibold); cursor: pointer; }
#toast { width: max-content; }   /* sonst halbe Breite (left: 50%) */
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.leer, .laden { padding: var(--sp-9) 20px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
#drawer-geruest { position: fixed; inset: var(--banner-h) 0 0 auto; z-index: var(--z-drawer); width: min(var(--drawer-b), 100vw); padding: var(--sp-6); pointer-events: none;
  background: var(--surface); border-left: 1px solid var(--line); border-radius: var(--r-xl) 0 0 var(--r-xl); box-shadow: -12px 0 40px rgba(0,0,0,.18);
  animation: drawer-in .22s var(--ease); }   /* wie dialog#dialog */
@media (max-width: 640px) { #drawer-geruest { width: auto; left: 0; } }
.laden.sk { padding: var(--sp-4) 0; justify-items: start; gap: var(--sp-3); }
.laden.sk i { width: 72%; height: var(--fs-sm); border-radius: var(--r-xs); background: var(--surface-2); animation: sk 1.4s ease-in-out infinite alternate; }
.laden.sk i:nth-child(2n) { width: 48%; }
@keyframes sk { to { opacity: .4; } }
.leer p { margin: 0; font-size: var(--fs-lg); }
.leer > svg { width: 36px; height: var(--feld-h); stroke: var(--line-2); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.note { font-size: var(--fs-sm); color: var(--muted); margin-top: 10px; padding-inline: 4px; }
.hint { font-size: var(--fs-ui); color: var(--ink-2); background: var(--surface); border-left: 2px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 12px 14px; margin: 0; }
.hint b { color: var(--ink); font-weight: var(--fw-semibold); }
.hinweis { margin-top: 14px; padding: 9px 14px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn-ink); font-size: var(--fs-ui); }
pre.expose { font: var(--fs-sm)/1.55 var(--fm); white-space: pre-wrap; word-break: break-word; margin: 0; color: var(--ink); }


/* ============================================================================
   11 DIVERSES: Avatare, Stepper, Projektbild, Kacheln
   ========================================================================== */
.avat {
  width: 36px; height: var(--feld-h); border-radius: var(--r-sm); background: var(--avatar); color: var(--on-avatar); display: inline-flex; align-items: center; justify-content: center;
  font: var(--fw-semibold) var(--fs-sm) var(--fb); letter-spacing: .02em; flex: none;
}
.avat.h { background: var(--primary); color: var(--on-primary); }
.avat.p { background: var(--avatar); color: var(--on-avatar); }
.avat.e { background: var(--warn); color: #fff; }
.avat.plus { background: var(--primary); color: var(--on-primary); font-size: var(--fs-3xl); font-weight: var(--fw-light); }
.avat svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.avat.xl { width: 56px; height: 56px; border-radius: 16px; font-size: var(--fs-lg); } .avat.xl svg { width: 26px; height: 26px; }
.avat.xxl { width: 72px; height: 72px; border-radius: 22px; font-size: var(--fs-4xl); flex: none; }
.avat.xs { width: var(--sp-5); height: var(--sp-5); border-radius: var(--r-pill); font-size: var(--fs-xs); }
.kontakt-tag { display: inline-flex; align-items: center; gap: var(--sp-2); border: 0; background: none; padding: 0; font: inherit; color: var(--ink); cursor: pointer; max-width: 100%; }
.kontakt-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .kontakt-tag:hover span { color: var(--accent); }
/* Logo statt Initialen: weiße Fläche mit feinem Rahmen, Bild eingepasst (nicht beschnitten) */
.avat.logo { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 3px; overflow: hidden; }
.avat.logo img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: calc(var(--r-sm) - 3px); }
.avat.xxl.logo { padding: 6px; } .avat.xxl.logo img { border-radius: 12px; }
.avat[data-act] { cursor: pointer; position: relative; }
.avat.xxl[data-act]::after { content: "Logo"; position: absolute; inset: auto 0 0; background: rgba(0,0,0,.55); color: #fff; font: var(--fw-medium) 10px var(--fb); text-align: center; padding: 2px 0; opacity: 0; transition: opacity var(--dur-1); border-radius: 0 0 22px 22px; }
.avat.xxl[data-act]:hover::after, .avat.xxl[data-act]:focus-visible::after { opacity: 1; }
/* Phasen-Stepper (Deals) */
.stepper { display: flex; gap: 6px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; }
.stepper button {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted);
  font: var(--fw-medium) var(--fs-ui) var(--fb); cursor: default;
}
.stepper button i { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); font: var(--fw-semibold) var(--fs-xs) var(--fb); font-style: normal; display: inline-flex; align-items: center; justify-content: center; }
.stepper button.done { color: var(--ink-2); } .stepper button.done i { background: var(--surface-3); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }   /* erledigt grau (felder.md) */
.stepper button.cur { background: var(--accent-2); color: var(--accent-ink); } .stepper button.cur i { background: var(--primary); color: var(--on-primary); }
.stepper button[data-phase] { cursor: pointer; } .stepper button[data-phase]:hover { background: var(--surface-2); color: var(--ink); }
/* Modul-Kacheln (Übersicht Projekte) */
.mtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--sp-3); }
.mtile {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--e-1); cursor: pointer; font-family: inherit; color: var(--ink); min-width: 0;
  transition: transform var(--dur-1), box-shadow var(--dur-2), border-color var(--dur-1);
}
.mtile:hover { transform: translateY(-1px); box-shadow: var(--e-2); border-color: var(--line-2); }
.mtile > svg { width: 26px; height: 26px; stroke: var(--accent-ink); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mtile > div { min-width: 0; }
.mtile .mt { font-size: var(--fs-sm); color: var(--muted); }
.mtile .mv { font-size: var(--fs-lg); font-weight: var(--fw-medium); margin-top: 1px; letter-spacing: var(--ls-snug); }
.mtile .ms { font-size: var(--fs-sm); color: var(--ink-2); }
@media (max-width: 560px) { .mtile { grid-template-columns: auto 1fr auto; } .mtile .chip { display: none; } }
.vorschau { display: block; margin-top: 8px; max-width: 100%; max-height: 220px; border-radius: var(--r-sm); object-fit: cover; }
/* Fortschrittsbalken in Karten */
.prog { position: relative; height: 6px; background: var(--surface-3); border-radius: 3px; margin: 4px 16px 8px; } .prog i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width var(--dur-3); } .prog small { position: absolute; right: 0; top: -18px; font-size: var(--fs-xs); color: var(--muted); }

/* Testumgebung (ADR-027): schmaler Hinweis oben, damit Vorschau und Produktion nie verwechselt werden */
#testbanner{position:fixed;inset:0 0 auto 0;height:var(--testbanner-h);box-sizing:border-box;z-index:1000;background:var(--warn);color:var(--n-900);
  font:var(--fw-semibold) var(--fs-sm)/16px var(--fb);text-align:center;padding:var(--sp-1) var(--sp-3);letter-spacing:.02em}
body.ist-test{padding-top:var(--testbanner-h)}   /* Banner liegt fest über Leiste und Inhalt (ADR-043) */

/* Spezifikationsleiste (ui.spezLeiste, 02 Budget & Bedarf): feste Spalten in einer Zeile, jede Spalte ein Knopf */
.spez{display:grid;grid-template-columns:repeat(var(--spez-n,7),minmax(0,1fr));border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden;background:var(--surface)}
.spez-s{all:unset;box-sizing:border-box;display:grid;gap:2px;align-content:start;min-width:0;padding:var(--sp-2) var(--sp-3);border-left:1px solid var(--line-2);cursor:pointer}
.spez-s:first-child{border-left:0} .spez-s:hover{background:var(--surface-2)} .spez-s:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.spez-s small{font-size:var(--fs-sm);color:var(--muted)} .spez-s b{font:var(--fw-semibold) var(--fs-md) var(--fb);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.spez-s b.ohne{color:var(--muted);font-weight:var(--fw-medium)}
.spez-s span{font-size:var(--fs-sm);color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .spez-s span.warn{color:var(--warn-ink)} .spez-s span.offen{color:var(--muted)}
@media (max-width:1100px){.spez{grid-template-columns:repeat(4,minmax(0,1fr))} .spez-s:nth-child(4n+1){border-left:0}}
@media (max-width:640px){.spez{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Chip-Zeile (ui.chipZeile, #2248) */
.chipz{display:flex;flex-wrap:wrap;gap:var(--sp-1) var(--sp-4)} .chipz .chip{font-size:var(--fs-sm);color:var(--ink-2)} .chipz .crit{color:var(--crit-ink)} .chipz .off{color:var(--muted)}
