/* QUINT SALES — Gold on Void */
:root {
  --void:    #08070B;
  --void-2:  #0E0D13;
  --card:    #15141C;
  --card-2:  #1C1A25;
  --line:    #2A2735;
  --gold:    #D4AF37;
  --gold-hi: #F2D479;
  --gold-dim:rgba(212,175,55,.12);
  --ink:     #F4F2ED;
  --muted:   #948FA3;
  --rot:     #E05252;
  --gruen:   #4FB477;
  --orange:  #E2913C;
  --r:       12px;
  --gap:     1rem;
  --display: 'Space Grotesk', 'Segoe UI Semibold', 'Segoe UI', system-ui, sans-serif;
  --body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scrollbar-color: var(--line) var(--void); }

body {
  font-family: var(--body);
  background: var(--void);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* leichter Goldschimmer im Hintergrund */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -5%, rgba(212,175,55,.07), transparent 60%),
    radial-gradient(700px 400px at 95% 105%, rgba(212,175,55,.05), transparent 60%);
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.hidden { display: none !important; }

/* ---------- Layout ---------- */
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--void-2);
  border-right: 1px solid var(--line);
  padding: 1.4rem 0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}

.marke {
  font-family: var(--display); font-size: 1.15rem; font-weight: 600;
  padding: 0 1.4rem 1.3rem; letter-spacing: .04em;
}
.marke b { color: var(--gold); }
.marke small {
  display: block; font-family: var(--body); font-size: .68rem; font-weight: 500;
  color: var(--muted); letter-spacing: .16em; text-transform: uppercase; margin-top: .2rem;
}

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 .6rem; flex: 1; }
.nav button {
  display: flex; align-items: center; gap: .7rem;
  background: none; border: 0; cursor: pointer;
  padding: .62rem .8rem; border-radius: 9px;
  color: var(--muted); font-size: .9rem; font-weight: 500;
  text-align: left; width: 100%; transition: .14s;
}
.nav button:hover { background: var(--card); color: var(--ink); }
.nav button.aktiv { background: var(--gold-dim); color: var(--gold-hi); }
.nav button .ico { font-size: 1rem; width: 1.2rem; text-align: center; }
.nav button .pill {
  margin-left: auto; background: var(--card-2); color: var(--muted);
  font-size: .68rem; font-weight: 700; padding: .1rem .4rem; border-radius: 20px;
}
.nav button.aktiv .pill { background: var(--gold); color: #000; }

.sidebar-fuss { padding: 1rem 1.4rem 0; border-top: 1px solid var(--line); margin-top: 1rem; }
.sidebar-fuss .wer { font-size: .82rem; font-weight: 600; }
.sidebar-fuss .rolle { font-size: .72rem; color: var(--muted); }
.sidebar-fuss button {
  margin-top: .6rem; background: none; border: 1px solid var(--line);
  color: var(--muted); padding: .35rem .7rem; border-radius: 7px;
  font-size: .78rem; cursor: pointer;
}
.sidebar-fuss button:hover { border-color: var(--gold); color: var(--gold-hi); }

main { flex: 1; padding: 2rem 2.4rem 4rem; max-width: 1400px; min-width: 0; }

.kopf { margin-bottom: 1.8rem; }
.kopf .eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold); margin-bottom: .4rem;
}
.kopf h1 { font-size: 2rem; }
.kopf p { color: var(--muted); margin-top: .35rem; max-width: 62ch; }

/* ---------- Bausteine ---------- */
.karte {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.3rem;
}
.gitter { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }

.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; }
.kpi .label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi .wert { font-family: var(--display); font-size: 2.1rem; font-weight: 600; margin-top: .25rem; }
.kpi .wert.gold { color: var(--gold); }
.kpi .zusatz { font-size: .78rem; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--gold); color: #0A0A0A; border: 0;
  padding: .62rem 1.15rem; border-radius: 9px;
  font-weight: 700; font-size: .88rem; cursor: pointer; transition: .14s;
}
.btn:hover { background: var(--gold-hi); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.geist { background: none; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.btn.geist:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn.klein { padding: .38rem .75rem; font-size: .78rem; border-radius: 7px; }
.btn.rot { background: var(--rot); color: #fff; }
.btn.gruen { background: var(--gruen); color: #06210F; }

input, select, textarea {
  background: var(--void-2); border: 1px solid var(--line);
  border-radius: 8px; padding: .6rem .75rem; width: 100%;
  transition: border-color .14s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; }
label { display: block; font-size: .76rem; font-weight: 600; color: var(--muted);
        text-transform: uppercase; letter-spacing: .08em; margin-bottom: .35rem; }
.feld { margin-bottom: 1rem; }

.badge {
  display: inline-block; padding: .16rem .55rem; border-radius: 20px;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em;
}
.kat-A { background: rgba(224,82,82,.16);  color: #FF8A8A; }
.kat-B { background: rgba(226,145,60,.16); color: #F0B36B; }
.kat-C { background: rgba(212,175,55,.14); color: var(--gold-hi); }
.st { background: var(--card-2); color: var(--muted); }
.st-termin { background: rgba(79,180,119,.16); color: #7FD9A2; }
.st-kunde  { background: var(--gold); color: #000; }
.st-abgesagt, .st-gesperrt { background: rgba(224,82,82,.12); color: #E58A8A; }

.hinweis { padding: .8rem 1rem; border-radius: 9px; font-size: .86rem; border: 1px solid; }
.hinweis.info { background: var(--gold-dim); border-color: rgba(212,175,55,.3); color: var(--gold-hi); }
.hinweis.warn { background: rgba(224,82,82,.1); border-color: rgba(224,82,82,.3); color: #F0A0A0; }
.hinweis.gut  { background: rgba(79,180,119,.1); border-color: rgba(79,180,119,.3); color: #8FDCAE; }

/* ---------- Tabelle ---------- */
.tab-huelle { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th {
  background: var(--void-2); text-align: left; padding: .7rem .9rem;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700; white-space: nowrap;
  position: sticky; top: 0;
}
td { padding: .7rem .9rem; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--card); }
.leer { text-align: center; padding: 3rem 1rem; color: var(--muted); }

/* ---------- Login ---------- */
.login-seite { display: grid; place-items: center; min-height: 100vh; width: 100%; padding: 2rem; }
.login-box { width: 100%; max-width: 390px; }
.login-box .marke { text-align: center; font-size: 1.6rem; padding: 0 0 .4rem; }
.login-box .unter { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 1.8rem; }

/* ---------- Cockpit ---------- */
.cockpit { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.95fr); gap: 1.2rem; align-items: start; }

.skript-phase {
  border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: .7rem; overflow: hidden; background: var(--card);
  transition: border-color .16s;
}
.skript-phase.offen { border-color: var(--gold); }
.skript-phase > .titel {
  display: flex; align-items: center; gap: .7rem; cursor: pointer;
  padding: .8rem 1rem; background: var(--card-2); user-select: none;
}
.skript-phase > .titel .nr {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--void); border: 1px solid var(--line);
  font-size: .74rem; font-weight: 800; color: var(--muted);
}
.skript-phase.erledigt > .titel .nr { background: var(--gold); border-color: var(--gold); color: #000; }
.skript-phase > .titel .name { font-family: var(--display); font-weight: 600; font-size: .95rem; }
.skript-phase > .titel .zeit { margin-left: auto; font-size: .72rem; color: var(--muted); }
.skript-phase .inhalt { padding: 1rem 1.1rem 1.2rem; display: none; }
.skript-phase.offen .inhalt { display: block; }
.skript-phase .sagen {
  border-left: 3px solid var(--gold); background: var(--void-2);
  padding: .85rem 1rem; border-radius: 0 8px 8px 0;
  font-size: 1.02rem; line-height: 1.65; margin-bottom: .7rem;
}
.skript-phase .sagen + .sagen { margin-top: .5rem; }
.skript-phase .regie { font-size: .82rem; color: var(--muted); font-style: italic; }
.skript-phase .platzhalter { color: var(--gold-hi); font-weight: 600; }

.timer {
  font-family: var(--display); font-size: 1.5rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.timer.warn { color: var(--orange); }
.timer.rot { color: var(--rot); }

.rechner-ergebnis {
  background: var(--void-2); border: 1px dashed var(--gold);
  border-radius: 9px; padding: .9rem 1rem; margin-top: .8rem; font-size: .95rem;
}
.rechner-ergebnis b { color: var(--gold-hi); }

.einwand-treffer {
  border: 1px solid var(--line); border-radius: 9px;
  padding: .8rem .9rem; margin-bottom: .6rem; background: var(--void-2);
}
.einwand-treffer .frage { font-weight: 700; font-size: .88rem; margin-bottom: .45rem; color: var(--gold-hi); }
.einwand-treffer .antwort { font-size: .92rem; line-height: 1.6; }

/* ---------- Pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: .8rem; align-items: start; }
.spalte { background: var(--void-2); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem; min-height: 130px; }
.spalte > h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .7rem; }
.spalte > h3 span { color: var(--gold); }
.spalte.ziel { border-color: var(--gold); background: var(--gold-dim); }
.pk {
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  padding: .65rem .75rem; margin-bottom: .5rem; cursor: grab; font-size: .84rem;
}
.pk:active { cursor: grabbing; }
.pk .n { font-weight: 700; margin-bottom: .15rem; }
.pk .m { color: var(--muted); font-size: .76rem; }

/* ---------- Bibliothek ---------- */
.dok-karte {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.3rem; cursor: pointer; transition: .16s; display: flex; flex-direction: column;
}
.dok-karte:hover { border-color: var(--gold); transform: translateY(-2px); }
.dok-karte .ico { font-size: 1.7rem; margin-bottom: .55rem; }
.dok-karte h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.dok-karte p { color: var(--muted); font-size: .84rem; flex: 1; }
.dok-karte .aktionen { display: flex; gap: .5rem; margin-top: .9rem; }

.md { max-width: 78ch; }
.md h1 { font-size: 1.85rem; margin: 0 0 1rem; }
.md h2 { font-size: 1.35rem; margin: 2rem 0 .7rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; color: var(--gold-hi); }
.md h4 { font-size: .95rem; margin: 1rem 0 .4rem; }
.md p  { margin: .6rem 0; }
.md ul, .md ol { margin: .6rem 0 .6rem 1.3rem; }
.md li { margin: .3rem 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.md blockquote {
  border-left: 3px solid var(--gold); background: var(--void-2);
  padding: .8rem 1rem; margin: .8rem 0; border-radius: 0 8px 8px 0;
}
.md blockquote p { margin: .3rem 0; }
.md code {
  background: var(--void-2); border: 1px solid var(--line);
  padding: .1rem .35rem; border-radius: 5px; font-size: .87em;
  font-family: 'Cascadia Code', Consolas, monospace;
}
.md pre {
  background: var(--void-2); border: 1px solid var(--line);
  padding: 1rem; border-radius: 9px; overflow-x: auto; margin: .9rem 0;
}
.md pre code { background: none; border: 0; padding: 0; }
.md table { margin: .9rem 0; border: 1px solid var(--line); border-radius: 8px; }
.md th, .md td { border-top: 1px solid var(--line); }
.md strong { color: var(--ink); font-weight: 700; }

/* ---------- Modal ---------- */
.modal-hg {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  display: grid; place-items: center; padding: 2rem; z-index: 90;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.6rem; width: 100%; max-width: 620px; max-height: 86vh; overflow-y: auto;
}
.modal h2 { font-size: 1.25rem; margin-bottom: .3rem; }
.modal .modal-fuss { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.3rem; }

/* ---------- Toast ---------- */
#toasts { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
          display: flex; flex-direction: column; gap: .55rem; }
.toast {
  background: var(--card-2); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  padding: .75rem 1.1rem; border-radius: 9px; font-size: .87rem;
  box-shadow: 0 8px 28px rgba(0,0,0,.5); animation: rein .2s ease-out;
  max-width: 340px;
}
.toast.warn { border-left-color: var(--rot); }
.toast.gut  { border-left-color: var(--gruen); }
@keyframes rein { from { opacity: 0; transform: translateX(14px); } }

.lade { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--line);
        border-top-color: var(--gold); border-radius: 50%; animation: dreh .7s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* ---------- Mobil ---------- */
@media (max-width: 980px) {
  .cockpit { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  #app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: column; padding: 1rem 0; }
  .nav { flex-direction: row; overflow-x: auto; padding: 0 .6rem .3rem; }
  .nav button { white-space: nowrap; }
  .nav button .pill { display: none; }
  .sidebar-fuss { display: flex; align-items: center; gap: .8rem; }
  .sidebar-fuss button { margin-top: 0; margin-left: auto; }
  main { padding: 1.3rem 1.1rem 3rem; }
  .kopf h1 { font-size: 1.5rem; }
}

@media print {
  .sidebar, .nav, #toasts, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .md blockquote { border-left-color: #999; }
}

/* ================= Erweiterungen v2 ================= */

kbd {
  display: inline-block; min-width: 1.25em; text-align: center;
  background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.14);
  border-bottom-width: 2px; border-radius: 4px;
  padding: .05em .35em; font-size: .78em; font-family: var(--body);
  font-weight: 700; line-height: 1.4;
}
.btn kbd { background: rgba(0,0,0,.22); border-color: rgba(0,0,0,.2); }
.nav .pill.rot { background: var(--rot); color: #fff; }

.feld-hilfe { font-size: .76rem; color: var(--muted); margin-top: .35rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* --- Reiter --- */
.reiter { display: flex; gap: .35rem; background: var(--void-2);
          padding: .28rem; border-radius: 10px; border: 1px solid var(--line); }
.reiter-btn {
  flex: 1; background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: .5rem .8rem; border-radius: 7px; font-size: .86rem; font-weight: 600;
  transition: .14s;
}
.reiter-btn:hover { color: var(--ink); }
.reiter-btn.aktiv { background: var(--gold); color: #0A0A0A; }

/* --- Pakete --- */
.paket-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem; }
.paket {
  background: var(--void-2); border: 1px solid var(--line); color: var(--ink);
  padding: .6rem .7rem; border-radius: 9px; cursor: pointer;
  font-size: .84rem; font-weight: 600; text-align: left; transition: .14s;
}
.paket:hover { border-color: var(--gold); }
.paket.aktiv { background: var(--gold-dim); border-color: var(--gold); color: var(--gold-hi); }

/* --- Branchenauswahl --- */
.branchen-box {
  max-height: 340px; overflow-y: auto; border: 1px solid var(--line);
  border-radius: 9px; padding: .8rem; background: var(--void-2);
}
.branchen-gruppe { margin-bottom: 1rem; }
.branchen-gruppe:last-child { margin-bottom: 0; }
.gruppen-kopf {
  display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem;
  padding-bottom: .3rem; border-bottom: 1px solid var(--line);
  font-size: .82rem; color: var(--gold-hi);
}
.mini {
  margin-left: auto; background: none; border: 1px solid var(--line);
  color: var(--muted); font-size: .7rem; padding: .1rem .45rem;
  border-radius: 5px; cursor: pointer;
}
.mini:hover { border-color: var(--gold); color: var(--gold-hi); }
.haken {
  display: flex; align-items: center; gap: .45rem; cursor: pointer;
  font-size: .84rem; color: var(--ink); text-transform: none;
  letter-spacing: 0; font-weight: 400; margin-bottom: .2rem;
}
.haken input { width: auto; margin: 0; accent-color: var(--gold); }

.ort-treffer {
  display: block; width: 100%; text-align: left; margin-top: .3rem;
  background: var(--void-2); border: 1px solid var(--line); color: var(--ink);
  padding: .45rem .6rem; border-radius: 7px; cursor: pointer; font-size: .82rem;
}
.ort-treffer:hover { border-color: var(--gold); color: var(--gold-hi); }

.balken { height: 4px; background: var(--card-2); border-radius: 3px; overflow: hidden; margin-top: 1rem; }
.balken-fuell { height: 100%; width: 40%; background: var(--gold); border-radius: 3px;
                animation: wandern 1.4s ease-in-out infinite; }
@keyframes wandern { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* --- Cockpit --- */
.lead-kopf {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.lead-name { font-family: var(--display); font-size: 1.3rem; font-weight: 600; margin-top: .5rem; }
.lead-meta { color: var(--muted); font-size: .88rem; }
.karte-kopf {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .9rem; gap: 1rem; flex-wrap: wrap;
}

.aufhaenger {
  margin-bottom: 1rem;
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--gold-dim), var(--card) 70%);
}
.aufhaenger .sagen { font-size: 1.08rem; }

.mangel-liste { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.mangel-chip {
  background: var(--void-2); border: 1px solid var(--line);
  padding: .18rem .55rem; border-radius: 20px; font-size: .76rem; color: var(--muted);
}
.mangel-zahl {
  display: inline-block; margin-left: .5rem; font-size: .7rem;
  color: var(--orange); font-weight: 600;
}

.tool-block { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .8rem; }
.tool-name { font-weight: 700; color: var(--gold-hi); font-size: .88rem; }

.einwand-treffer.ki { border-color: var(--gold); }
.einwand-treffer .quelle {
  float: right; font-size: .7rem; color: var(--muted); font-weight: 400;
}

.wq-zeile {
  display: flex; align-items: center; gap: .6rem; padding: .45rem 0;
  border-top: 1px solid var(--line); cursor: pointer; font-size: .86rem;
}
.wq-zeile:hover { color: var(--gold-hi); }

.schnellwahl { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: -.5rem; margin-bottom: .5rem; }

.pk.faellig { border-color: var(--rot); }
.pk.faellig .m b { color: var(--rot); }

.mail-entwurf {
  background: var(--void-2); border: 1px solid var(--line); border-radius: 9px;
  padding: 1rem; white-space: pre-wrap; word-break: break-word;
  font-family: var(--body); font-size: .9rem; line-height: 1.6; margin: .5rem 0;
}

@media (max-width: 620px) {
  .row-2 { grid-template-columns: 1fr; }
  .paket-gitter { grid-template-columns: 1fr 1fr; }
}

/* ================= QUINT Command Center v3 ================= */
:root {
  --void: #07080b;
  --void-2: #0c0e13;
  --card: #11141b;
  --card-2: #171b24;
  --line: rgba(255,255,255,.085);
  --line-strong: rgba(255,255,255,.14);
  --gold: #d7b55b;
  --gold-hi: #f2d995;
  --gold-dim: rgba(215,181,91,.105);
  --ink: #f5f3ed;
  --muted: #8d93a2;
  --rot: #ef6767;
  --gruen: #57c88b;
  --orange: #eda552;
  --r: 16px;
  --shadow: 0 18px 45px rgba(0,0,0,.22);
  --shadow-hi: 0 22px 65px rgba(0,0,0,.35);
}
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(900px 600px at 13% -10%, rgba(215,181,91,.09), transparent 64%), radial-gradient(720px 520px at 100% 20%, rgba(80,104,160,.07), transparent 65%), var(--void);
  letter-spacing: -.005em;
}
body::before {
  background-image: linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 80%);
}
::selection { background: rgba(215,181,91,.32); color: #fff; }
#app { min-height: 100dvh; }
.app-rail {
  width: 264px; padding: 1.25rem .8rem 1rem; background: rgba(10,11,15,.94);
  border-right-color: rgba(255,255,255,.07); backdrop-filter: blur(22px);
  box-shadow: 18px 0 60px rgba(0,0,0,.16); z-index: 30;
}
.marke { display: flex; align-items: center; gap: .78rem; padding: .3rem .7rem 1.45rem; font-size: 1.02rem; letter-spacing: .055em; }
.marke-symbol {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px;
  border: 1px solid rgba(215,181,91,.36); border-radius: 12px;
  background: linear-gradient(145deg, rgba(215,181,91,.2), rgba(215,181,91,.04));
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 8px 30px rgba(215,181,91,.08);
  color: var(--gold-hi); font-size: 1rem;
}
.marke small { font-size: .59rem; letter-spacing: .14em; margin-top: .12rem; }
.rail-label { padding: 0 .82rem .45rem; color: #646a78; font-size: .61rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.nav { gap: .22rem; padding: 0; }
.nav button {
  position: relative; min-height: 44px; padding: .68rem .76rem; border: 1px solid transparent;
  border-radius: 11px; color: #a3a8b5; font-size: .86rem; letter-spacing: .005em;
}
.nav button::before {
  content: ''; position: absolute; left: -1px; width: 3px; height: 18px; border-radius: 0 4px 4px 0;
  background: var(--gold); opacity: 0; transform: scaleY(.4); transition: .18s ease;
}
.nav button:hover { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.05); }
.nav button.aktiv { color: var(--ink); border-color: rgba(215,181,91,.14); background: linear-gradient(90deg, rgba(215,181,91,.13), rgba(215,181,91,.035)); }
.nav button.aktiv::before { opacity: 1; transform: scaleY(1); }
.nav button .ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.035); filter: grayscale(.25); font-size: .9rem; }
.nav button.aktiv .ico { background: rgba(215,181,91,.14); filter: none; }
.nav button .pill { background: rgba(255,255,255,.06); color: #b4b8c3; }
.sidebar-fuss { margin: 1rem .15rem 0; padding: 1rem .65rem 0; border-top-color: rgba(255,255,255,.07); }
.sidebar-fuss .wer { color: #e9e7e1; }
.sidebar-fuss button { width: 100%; transition: .16s; }
main { width: 100%; max-width: 1540px; margin: 0 auto; padding: 2rem clamp(1.25rem, 3vw, 3.25rem) 5rem; }
.kopf {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; min-height: 84px;
  margin-bottom: 1.55rem; padding-bottom: 1.15rem; border-bottom: 1px solid rgba(255,255,255,.07);
}
.kopf .eyebrow { margin-bottom: .28rem; font-size: .64rem; letter-spacing: .19em; }
.kopf h1 { font-size: clamp(1.65rem, 2.3vw, 2.35rem); letter-spacing: -.035em; }
.kopf p { margin-top: .28rem; font-size: .86rem; }
.kopf-status {
  display: inline-flex; align-items: center; gap: .48rem; flex: 0 0 auto; padding: .42rem .65rem;
  border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.025);
  color: #9298a5; font-size: .68rem; font-weight: 650;
}
.status-punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 4px rgba(87,200,139,.1), 0 0 14px rgba(87,200,139,.4); }
.karte, .kpi, .tab-huelle, .spalte {
  border-color: rgba(255,255,255,.075); background: linear-gradient(145deg, rgba(20,23,31,.96), rgba(14,16,22,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.karte { padding: 1.25rem; }
.karte h3 { letter-spacing: -.02em; }
.kpi { position: relative; overflow: hidden; padding: 1rem 1.05rem; }
.kpi::after { content: ''; position: absolute; right: -28px; bottom: -32px; width: 85px; height: 85px; border-radius: 50%; background: rgba(215,181,91,.035); }
.kpi .label { color: #797f8d; font-size: .64rem; }
.kpi .wert { font-size: 1.85rem; letter-spacing: -.045em; }
.kpi .zusatz { font-size: .72rem; }
.btn {
  min-height: 40px; border-radius: 10px; background: linear-gradient(180deg, #e2c46f, #cda94e);
  box-shadow: inset 0 1px rgba(255,255,255,.3), 0 8px 24px rgba(215,181,91,.12);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px rgba(255,255,255,.3), 0 12px 28px rgba(215,181,91,.2); }
.btn:active { transform: translateY(0); }
.btn.geist { background: rgba(255,255,255,.025); box-shadow: none; border-color: rgba(255,255,255,.11); }
.btn.geist:hover { background: rgba(215,181,91,.07); }
.btn.rot { background: linear-gradient(180deg, #ef7171, #d55353); }
.btn.gruen { background: linear-gradient(180deg, #69d99b, #47b77b); }
input, select, textarea { min-height: 43px; border-color: rgba(255,255,255,.09); background: rgba(5,7,10,.68); }
input:hover, select:hover, textarea:hover { border-color: rgba(255,255,255,.16); }
input:focus, select:focus, textarea:focus { border-color: rgba(215,181,91,.7); box-shadow: 0 0 0 3px rgba(215,181,91,.09); }
.dashboard-page .kopf {
  min-height: 150px; align-items: center; padding: 1.6rem 1.75rem; border: 1px solid rgba(215,181,91,.15);
  border-radius: 20px; background: linear-gradient(120deg, rgba(215,181,91,.12), rgba(20,23,31,.88) 42%, rgba(14,16,22,.96)), var(--card);
  box-shadow: var(--shadow-hi);
}
.dashboard-page .kopf h1 { font-size: clamp(2rem, 3vw, 3rem); }
.dashboard-page .kopf p { color: #adb1bc; }
.dashboard-alarm { border-radius: 13px; box-shadow: 0 10px 35px rgba(239,103,103,.08); }
.kpi-band { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.dashboard-focus { grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); }
.action-card {
  position: relative; overflow: hidden; min-height: 210px; display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center; padding: clamp(1.4rem, 3vw, 2.2rem);
  border-color: rgba(215,181,91,.24); background: linear-gradient(125deg, rgba(215,181,91,.15), rgba(20,23,31,.97) 62%);
}
.action-card::after { content: 'Q'; position: absolute; right: 2rem; top: 50%; transform: translateY(-54%); color: rgba(215,181,91,.06); font-family: var(--display); font-size: 11rem; font-weight: 800; line-height: 1; pointer-events: none; }
.action-card > * { position: relative; z-index: 1; max-width: 650px; }
.action-card .btn { min-height: 48px; padding-inline: 1.4rem; }
.tab-huelle { box-shadow: var(--shadow); }
th { top: 0; z-index: 2; background: rgba(10,12,17,.96); backdrop-filter: blur(14px); }
td { border-top-color: rgba(255,255,255,.055); }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: rgba(215,181,91,.045); }
.cockpit { grid-template-columns: minmax(0, 1.6fr) minmax(340px, .82fr); gap: 1.1rem; }
.cockpit-rail { display: flex; flex-direction: column; min-width: 0; }
.cockpit-rail .abschluss-karte {
  order: -10; position: sticky; top: 1rem; z-index: 12; margin-bottom: 1rem;
  border-color: rgba(87,200,139,.26); box-shadow: 0 22px 50px rgba(0,0,0,.3);
}
.abschluss-karte h3::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: .55rem; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 12px rgba(87,200,139,.5); }
.lead-kopf { position: sticky; top: .7rem; z-index: 10; box-shadow: var(--shadow); }
.aufhaenger { background: linear-gradient(135deg, rgba(215,181,91,.14), rgba(17,20,27,.98) 65%); }
.skript-phase { border-color: rgba(255,255,255,.07); }
.skript-phase > .titel { min-height: 52px; }
.skript-phase.offen { box-shadow: 0 10px 30px rgba(0,0,0,.16); }
.pipeline { grid-template-columns: repeat(7, minmax(245px, 1fr)); overflow-x: auto; padding: .1rem .1rem 1rem; scroll-snap-type: x proximity; scrollbar-color: var(--gold) rgba(255,255,255,.04); }
.spalte { scroll-snap-align: start; min-height: 68vh; }
.pk { transition: transform .14s ease, border-color .14s ease, background .14s ease; }
.pk:hover { transform: translateY(-1px); border-color: rgba(215,181,91,.28); background: #191c25; }
.login-seite::before { content: 'QUINT / REVENUE OPERATIONS'; position: fixed; top: 1.4rem; left: 1.6rem; color: #656b77; font-size: .62rem; font-weight: 800; letter-spacing: .18em; }
.login-box { max-width: 410px; }
.login-box .karte { padding: 1.6rem; box-shadow: var(--shadow-hi); }
.login-box .marke { justify-content: center; }
@media (max-width: 1100px) {
  .app-rail { width: 226px; }
  .kpi-band { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .dashboard-focus { grid-template-columns: 1fr; }
  .cockpit { grid-template-columns: 1fr; }
  .cockpit-rail .abschluss-karte, .lead-kopf { position: static; }
}
@media (max-width: 760px) {
  body { padding-bottom: 74px; }
  #app { display: block; }
  .app-rail { position: fixed; inset: auto 0 0; width: 100%; height: 72px; padding: .42rem .35rem calc(.42rem + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid rgba(255,255,255,.1); box-shadow: 0 -16px 45px rgba(0,0,0,.38); background: rgba(9,10,14,.94); }
  .app-rail .marke, .app-rail .rail-label, .app-rail .sidebar-fuss { display: none; }
  .nav { flex-direction: row; gap: .12rem; padding: 0; overflow-x: auto; }
  .nav button { flex: 1 0 62px; min-width: 62px; min-height: 58px; flex-direction: column; justify-content: center; gap: .12rem; padding: .22rem .18rem; border-radius: 10px; font-size: .59rem; }
  .nav button::before { left: 50%; top: -1px; width: 20px; height: 3px; transform: translateX(-50%) scaleX(.4); }
  .nav button.aktiv::before { transform: translateX(-50%) scaleX(1); }
  .nav button .ico { width: 25px; height: 25px; background: transparent; font-size: .88rem; }
  .nav button .pill { display: none; }
  main { padding: 1.05rem .9rem 2.2rem; }
  .kopf { min-height: 72px; align-items: center; margin-bottom: 1rem; }
  .kopf-status { display: none; }
  .kopf h1 { font-size: 1.55rem; }
  .dashboard-page .kopf { min-height: 128px; padding: 1.25rem; border-radius: 16px; }
  .dashboard-page .kopf h1 { font-size: 2rem; }
  .kpi-band { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .kpi .wert { font-size: 1.55rem; }
  .action-card { min-height: 190px; }
  .action-card::after { right: .5rem; font-size: 8rem; }
  .cockpit { display: block; }
  .cockpit-rail { margin-top: 1rem; }
  .pipeline { margin-right: -.9rem; grid-template-columns: repeat(7, minmax(82vw, 1fr)); }
  .modal-hg { padding: .65rem; align-items: end; }
  .modal { max-height: 92vh; border-radius: 18px 18px 10px 10px; padding: 1.2rem; }
  #toasts { left: .8rem; right: .8rem; bottom: 84px; }
  .toast { max-width: none; }
}
@media (max-width: 430px) {
  .kpi { padding: .85rem; }
  .kpi .label { letter-spacing: .06em; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .kpi-band { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================= Sales Operations v4 ================= */
.lead-filter {
  position: sticky; top: .6rem; z-index: 20; display: flex; gap: .75rem; flex-wrap: wrap;
  align-items: flex-end; margin-bottom: .7rem; padding: 1rem; box-shadow: var(--shadow);
}
.lead-filter > div:not(:first-child) { min-width: 135px; }
.lead-filter label { white-space: nowrap; }
.lead-tel-filter { margin: 0 0 .65rem; }
.lead-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 .8rem; color: var(--muted); font-size: .82rem; }
.lead-table tbody tr { cursor: pointer; }
.lead-table tbody tr:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.lead-table td:nth-child(3), .lead-table td:nth-child(4) { color: var(--muted); }
.score-zahl { color: var(--muted); font-size: .76rem; margin-left: .25rem; }
.aktiv-check { display: inline-flex; margin-left: .5rem; padding: .08rem .4rem; border-radius: 999px; background: rgba(87,200,139,.1); color: #77d9a1; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.tab-aktionen { display: flex; gap: .35rem; justify-content: flex-end; }
.muted { color: var(--muted); }

.modal-hg:has(#lead-edit-form) .modal { max-width: 1050px; }
.lead-modal-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.lead-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.lead-edit-section { padding: 1rem; border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,.13); }
.lead-edit-section h3 { margin-bottom: 1rem; }
.lead-edit-section .feld { margin-bottom: .75rem; }
.lead-insights { display: grid; grid-template-columns: repeat(3,1fr); gap: .7rem; margin: 1rem 0; }
.lead-insight { padding: .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--void-2); }
.lead-insight span { display: block; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lead-insight b { display: block; margin-top: .25rem; font-size: .86rem; }
.aktiv-text { color: var(--gruen); }
.aktiv-signale { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.3rem 0 1rem; }
.aktiv-signale span { padding: .2rem .55rem; border-radius: 999px; background: rgba(87,200,139,.08); color: #86dbaa; font-size: .72rem; }
.call-history { margin: 1rem 0; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.12); }
.call-history summary { cursor: pointer; color: var(--gold-hi); font-weight: 700; }
.call-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .7rem 0; border-top: 1px solid var(--line); font-size: .8rem; }
.call-row:first-of-type { margin-top: .7rem; }
.call-row div:first-child span { margin-left: .5rem; color: var(--muted); }
.call-row p { grid-column: 1/-1; color: var(--muted); }
.lead-modal-fuss { position: sticky; bottom: -1.6rem; z-index: 5; margin: 1rem -1.6rem -1.6rem; padding: .9rem 1.6rem; border-top: 1px solid var(--line); background: rgba(17,20,27,.95); backdrop-filter: blur(16px); }
.modal-spacer { flex: 1; }
.rot-text { color: #ef8585 !important; }

.bibliothek-toolbar { display: grid; grid-template-columns: minmax(240px,1fr) auto; align-items: end; gap: 1rem; margin-bottom: .7rem; }
.bibliothek-toolbar .feld { margin: 0; }
.dok-filter { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.dok-filter .aktiv { border-color: var(--gold); color: var(--gold-hi); background: var(--gold-dim); }
.bibliothek-meta { margin: 0 0 .9rem; color: var(--muted); font-size: .78rem; }
.dok-grid { grid-template-columns: repeat(3,minmax(220px,1fr)); }
.dok-card-top { display: flex; align-items: center; gap: .65rem; margin-bottom: .7rem; }
.dok-card-top .ico { margin: 0; }
.dok-kategorie { padding: .16rem .5rem; border-radius: 999px; background: var(--gold-dim); color: var(--gold-hi); font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.dok-favorit { margin-left: auto; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: #5f6470; cursor: pointer; }
.dok-favorit:hover, .dok-favorit.aktiv { color: var(--gold-hi); border-color: rgba(215,181,91,.4); background: var(--gold-dim); }
.dok-reader-toolbar { position: sticky; top: .5rem; z-index: 30; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: 1rem; padding: .6rem; border: 1px solid var(--line); border-radius: 13px; background: rgba(10,12,17,.9); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.dok-reader-suche { display: flex; align-items: center; gap: .35rem; flex: 1; min-width: 260px; }
.dok-reader-suche input { min-width: 160px; }
.dok-reader-suche span { min-width: 55px; color: var(--muted); font-size: .7rem; }
.dok-reader-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: clamp(1rem,3vw,3rem); align-items: start; }
.dok-toc { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow: auto; padding: 1rem; border: 1px solid var(--line); border-radius: 13px; background: rgba(10,12,17,.65); }
.dok-toc nav { display: flex; flex-direction: column; gap: .18rem; margin-top: .5rem; }
.dok-toc a { padding: .38rem .5rem; border-radius: 7px; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.dok-toc a:hover, .dok-toc a.aktiv { background: var(--gold-dim); color: var(--gold-hi); text-decoration: none; }
.dok-toc .toc-h3 { padding-left: 1.1rem; font-size: .7rem; }
.dok-artikel { width: 100%; max-width: 84ch; margin: 0; padding: clamp(1.2rem,3vw,2.4rem); border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg,rgba(20,23,31,.96),rgba(14,16,22,.96)); box-shadow: var(--shadow); line-height: 1.72; }
.dok-artikel h1, .dok-artikel h2, .dok-artikel h3 { scroll-margin-top: 6rem; }
.lese-fortschritt { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; background: rgba(255,255,255,.03); }
.lese-fortschritt span { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--gold),var(--gold-hi)); transition: width .12s linear; }
.kopierbar { position: relative; }
.copy-block { position: absolute; top: .45rem; right: .45rem; padding: .22rem .45rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card-2); color: var(--muted); font-size: .65rem; cursor: pointer; opacity: 0; transition: opacity .15s; }
.kopierbar:hover .copy-block, .copy-block:focus { opacity: 1; }

@media (max-width: 980px) {
  .dok-grid { grid-template-columns: repeat(2,minmax(220px,1fr)); }
  .dok-reader-layout { grid-template-columns: 1fr; }
  .dok-toc { position: static; max-height: 240px; }
}
@media (max-width: 760px) {
  .lead-filter { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .lead-filter > div:first-child { grid-column: 1/-1; }
  .lead-tel-filter { grid-column: 1/-1; }
  .lead-toolbar { align-items: flex-start; }
  .lead-table thead { display: none; }
  .lead-table, .lead-table tbody, .lead-table tr, .lead-table td { display: block; width: 100%; }
  .lead-table tr { margin-bottom: .7rem; padding: .8rem; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
  .lead-table td { display: grid; grid-template-columns: 88px 1fr; gap: .6rem; padding: .38rem 0; border: 0; }
  .lead-table td::before { content: attr(data-label); color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  .tab-aktionen { justify-content: flex-start; }
  .lead-edit-grid, .lead-insights { grid-template-columns: 1fr; }
  .lead-modal-fuss { position: static; margin: 1rem 0 0; padding: 1rem 0 0; }
  .lead-modal-fuss .modal-spacer { display: none; }
  .lead-modal-fuss .btn { width: 100%; }
  .bibliothek-toolbar { grid-template-columns: 1fr; }
  .dok-filter { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .dok-grid { grid-template-columns: 1fr; }
  .dok-reader-toolbar { top: .25rem; }
  .dok-reader-suche { order: 2; flex-basis: 100%; }
  .dok-artikel { padding: 1.1rem; border-radius: 13px; }
}

/* ================= Adaptive Software Shell v5 ================= */
.nav-short, .mobile-appbar, .mobile-finish, .mobile-section-label { display: none; }
.nav button .ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav button .ico svg path:first-child:last-child { vector-effect: non-scaling-stroke; }
.nav button:first-child .ico svg path { fill: currentColor; stroke: none; }
.mobile-home { font-family: var(--display); }
.workflow-kicker {
  display: flex; align-items: center; gap: .5rem; margin: -.1rem 0 1.1rem;
  color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
}
.workflow-kicker span {
  display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(215,181,91,.32);
  border-radius: 50%; background: var(--gold-dim); color: var(--gold-hi); font-size: .66rem;
}
.workflow-kicker i { flex: 1; height: 1px; max-width: 40px; background: var(--line); }
.radar-layout { grid-template-columns: minmax(0,1.15fr) minmax(310px,.85fr); align-items: start; }
.radar-result { position: sticky; top: 1rem; }
.mobile-finish {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 45; align-items: center; gap: .7rem;
  min-height: 48px; padding: .75rem 1rem; border: 1px solid rgba(87,200,139,.34); border-radius: 12px;
  background: rgba(20,31,27,.94); color: #8be0af; box-shadow: 0 18px 45px rgba(0,0,0,.38);
  backdrop-filter: blur(18px); font-weight: 750; cursor: pointer;
}
.mobile-finish span { font-size: 1rem; }
.modal[role="dialog"]:focus { outline: none; }
button:disabled { cursor: not-allowed; opacity: .5; transform: none !important; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold-hi); outline-offset: 2px;
}

@media (min-width: 761px) and (max-width: 1180px) {
  .app-rail { width: 86px; padding-inline: .55rem; }
  .marke { justify-content: center; padding: .25rem 0 1.4rem; }
  .marke > span:last-child, .rail-label, .nav-text { display: none; }
  .nav { align-items: center; }
  .nav button { justify-content: center; width: 54px; min-height: 50px; padding: .45rem; }
  .nav button .ico { width: 32px; height: 32px; }
  .nav button .pill { position: absolute; top: 2px; right: 0; min-width: 18px; padding: .05rem .28rem; text-align: center; }
  .sidebar-fuss { padding-inline: .2rem; }
  .sidebar-fuss > div { display: none; }
  .sidebar-fuss button { width: 46px; min-height: 42px; margin-inline: auto; padding: 0; font-size: 0; }
  .sidebar-fuss button::before { content: '↪'; font-size: 1rem; }
  main { padding-inline: clamp(1.2rem,3vw,2.4rem); }
}

@media (max-width: 1100px) {
  .mobile-finish { display: inline-flex; }
  .lead-edit-grid { grid-template-columns: 1fr; }
  .lead-filter { position: static; }
  .radar-result { position: static; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  #app { min-height: 100dvh; }
  .mobile-appbar {
    position: sticky; top: 0; z-index: 28; display: grid; grid-template-columns: 40px 1fr 38px;
    align-items: center; gap: .7rem; min-height: calc(62px + env(safe-area-inset-top));
    padding: calc(.55rem + env(safe-area-inset-top)) .9rem .55rem;
    border-bottom: 1px solid rgba(255,255,255,.075); background: rgba(8,9,13,.9);
    backdrop-filter: blur(20px); box-shadow: 0 12px 35px rgba(0,0,0,.18);
  }
  .mobile-home {
    display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(215,181,91,.34);
    border-radius: 11px; background: var(--gold-dim); color: var(--gold-hi); font-weight: 800; cursor: pointer;
  }
  .mobile-appbar div { min-width: 0; line-height: 1.15; }
  .mobile-appbar small { display: block; color: var(--gold); font-size: .55rem; font-weight: 800; letter-spacing: .14em; }
  .mobile-appbar strong { display: block; overflow: hidden; margin-top: .22rem; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-status {
    position: relative; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line);
    border-radius: 50%; background: var(--card); color: var(--ink); font-size: .74rem; font-weight: 800;
  }
  .mobile-status i { position: absolute; right: 0; bottom: 1px; width: 8px; height: 8px; border: 2px solid var(--card); border-radius: 50%; background: var(--gruen); }
  .app-rail { height: calc(72px + env(safe-area-inset-bottom)); }
  .nav { width: 100%; overflow: hidden; justify-content: space-around; }
  .nav button { flex: 1 1 0; min-width: 0; min-height: 58px; gap: .13rem; font-size: 0; }
  .nav button .nav-text { display: none; }
  .nav button .nav-short { display: block; max-width: 100%; overflow: hidden; color: inherit; font-size: clamp(.52rem,2.2vw,.62rem); text-overflow: ellipsis; white-space: nowrap; }
  .nav button .ico { width: 26px; height: 26px; }
  .nav button .ico svg { width: 18px; height: 18px; }
  main { padding: .9rem .85rem 2.4rem; }
  .kopf { min-height: 60px; padding-bottom: .85rem; }
  .kopf .eyebrow { font-size: .58rem; }
  .kopf h1 { font-size: 1.42rem; }
  .kopf p { font-size: .79rem; line-height: 1.5; }
  .dashboard-page .kopf { min-height: 116px; margin-top: .1rem; padding: 1.1rem; }
  .dashboard-page .kopf h1 { font-size: clamp(1.72rem,8vw,2rem); }
  .karte { padding: 1rem; }
  .btn { min-height: 44px; }
  input, select, textarea { min-height: 46px; font-size: 16px; }
  .mobile-finish {
    left: .85rem; right: .85rem; bottom: calc(79px + env(safe-area-inset-bottom)); justify-content: center;
    min-height: 48px; border-radius: 13px; box-shadow: 0 16px 44px rgba(0,0,0,.48);
  }
  .mobile-section-label { display: flex; flex-direction: column; margin: -.15rem 0 .75rem; }
  .mobile-section-label span { color: var(--gold); font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
  .mobile-section-label b { margin-top: .12rem; color: var(--muted); font-size: .72rem; font-weight: 500; }
  .workflow-kicker { gap: .35rem; overflow: hidden; font-size: .59rem; white-space: nowrap; }
  .workflow-kicker span { flex: 0 0 21px; }
  .radar-layout { display: block; }
  .radar-result { margin-top: .8rem; }
  .lead-filter { gap: .65rem; padding: .8rem; }
  .lead-filter label { font-size: .68rem; }
  .lead-table tr { box-shadow: 0 10px 28px rgba(0,0,0,.12); }
  .lead-table td:nth-child(3) { display: none; }
  .lead-table td { grid-template-columns: 76px minmax(0,1fr); }
  .lead-table td[data-label="Betrieb"] { padding-top: .15rem; }
  .tab-aktionen .btn { flex: 1; }
  .modal-hg { padding: 0; }
  .modal { width: 100%; max-height: 94dvh; padding: 1.05rem; border-radius: 20px 20px 0 0; }
  .modal-fuss, .lead-modal-fuss { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; }
  .modal-fuss .btn, .lead-modal-fuss .btn { width: 100%; }
  .lead-modal-fuss [data-call] { order: -3; }
  .lead-modal-fuss [data-save] { order: -2; }
  .lead-modal-fuss [data-zu] { order: -1; }
  .lead-modal-kopf { flex-direction: column; }
  .lead-edit-section { padding: .85rem; }
  .call-row { grid-template-columns: 1fr; }
  .call-row p { grid-column: 1; }
  .dok-reader-toolbar { position: static; }
  .dok-reader-suche { min-width: 100%; }
  .dok-toc { max-height: 180px; }
}

@media (max-width: 380px) {
  .nav button .nav-short { font-size: .5rem; }
  .kpi-band { gap: .5rem; }
  .kpi { padding: .75rem; }
  .kpi .zusatz { font-size: .64rem; }
}

@media (hover: none), (pointer: coarse) {
  .copy-block { opacity: 1; }
  .dok-favorit { width: 44px; height: 44px; }
  .pk:hover, .btn:hover { transform: none; }
}

/* ================= Digital Cockpit v6 ================= */
.ui-icon {
  width: 1.05em; height: 1.05em; flex: 0 0 auto; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.14em;
}
.btn, a.btn { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; }
.btn .ui-icon, a.btn .ui-icon { width: 17px; height: 17px; }
.inline-link { display: inline-flex; align-items: center; gap: .2rem; }
.inline-link .ui-icon { width: 13px; height: 13px; }
.workspace-shell { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 100dvh; }
.desktop-appbar {
  position: sticky; top: 0; z-index: 27; display: flex; align-items: center; justify-content: space-between;
  min-height: 58px; padding: .55rem clamp(1.25rem,3vw,3.25rem); border-bottom: 1px solid rgba(255,255,255,.065);
  background: rgba(8,9,13,.84); backdrop-filter: blur(22px); box-shadow: 0 10px 32px rgba(0,0,0,.12);
}
.appbar-route { display: flex; align-items: center; gap: .48rem; min-width: 0; color: #767c89; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.appbar-route b { color: #c9cbd1; font-size: .67rem; letter-spacing: .12em; }
.appbar-route > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-live { width: 7px; height: 7px; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 4px rgba(87,200,139,.09), 0 0 13px rgba(87,200,139,.36); }
.appbar-actions { display: flex; align-items: center; gap: .65rem; }
.command-button {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 36px; padding: .35rem .5rem .35rem .65rem;
  border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: rgba(255,255,255,.025);
  color: #8f95a2; font-size: .71rem; cursor: pointer;
}
.command-button:hover { border-color: rgba(215,181,91,.28); color: var(--ink); background: var(--gold-dim); }
.command-button .ui-icon { width: 15px; height: 15px; }
.command-button kbd { margin-left: .25rem; padding: .12rem .35rem; border: 1px solid rgba(255,255,255,.08); border-radius: 5px; background: rgba(255,255,255,.035); color: #737986; font-size: .6rem; }
.appbar-metric { display: flex; align-items: baseline; gap: .4rem; min-height: 36px; padding: .35rem .65rem; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; background: rgba(255,255,255,.018); }
.appbar-metric small { color: #707683; font-size: .59rem; letter-spacing: .08em; text-transform: uppercase; }
.appbar-metric strong { color: var(--gold-hi); font-family: var(--display); font-size: .84rem; }
.appbar-actions time { color: #747a87; font-size: .67rem; font-weight: 650; white-space: nowrap; }
.sidebar-fuss button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.sidebar-fuss button .ui-icon { width: 14px; height: 14px; }
.nav button .ico .ui-icon { width: 17px; height: 17px; }
.nav .mobile-more { display: none; }
.account-sheet { display: flex; align-items: center; gap: 1rem; padding: .4rem 0 1.2rem; }
.account-avatar { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 52px; border: 1px solid rgba(215,181,91,.3); border-radius: 15px; background: var(--gold-dim); color: var(--gold-hi); font-family: var(--display); font-size: 1.1rem; font-weight: 800; }
.account-sheet .eyebrow, .more-sheet .eyebrow { color: var(--gold); font-size: .61rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.account-sheet h2 { margin-top: .2rem; }
.account-sheet p { margin-top: .15rem; color: var(--muted); font-size: .78rem; }
.more-sheet h2 { margin: .3rem 0 1rem; }
.more-tile { display: grid; grid-template-columns: 42px 1fr 18px; align-items: center; gap: .8rem; width: 100%; margin-top: .55rem; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); color: var(--ink); text-align: left; cursor: pointer; }
.more-tile:hover { border-color: rgba(215,181,91,.3); background: var(--gold-dim); }
.more-tile > .ui-icon:first-child { width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: rgba(215,181,91,.1); color: var(--gold-hi); }
.more-tile > .ui-icon:last-child { color: var(--muted); }
.more-tile span { display: flex; flex-direction: column; }
.more-tile small { margin-top: .12rem; color: var(--muted); font-size: .71rem; }
.dok-card-top .ico .ui-icon { width: 24px; height: 24px; color: var(--gold-hi); }
.dok-favorit .ui-icon { width: 16px; height: 16px; }
.dok-favorit.aktiv .ui-icon { fill: currentColor; }
.frage > .ui-icon { margin-right: .25rem; color: var(--gold-hi); }
.pk .ui-icon { width: 13px; height: 13px; color: var(--gold); }

@media (min-width: 761px) and (max-width: 1180px) {
  .desktop-appbar { padding-inline: 1.2rem; }
  .appbar-route > span:last-child, .appbar-actions time { display: none; }
  .sidebar-fuss button span { display: none; }
  .sidebar-fuss button::before { content: none; }
  .sidebar-fuss button .ui-icon { width: 17px; height: 17px; }
}

@media (max-width: 760px) {
  .workspace-shell { display: block; min-height: 100dvh; }
  .desktop-appbar { display: none; }
  .app-rail .nav button[data-ans="pipeline"], .app-rail .nav button[data-ans="bibliothek"] { display: none; }
  .app-rail .nav .mobile-more { display: flex; flex: 1 1 0; min-width: 0; min-height: 58px; flex-direction: column; align-items: center; justify-content: center; gap: .13rem; padding: .22rem .18rem; border: 1px solid transparent; border-radius: 10px; background: none; color: #a3a8b5; cursor: pointer; }
  .mobile-more .ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; }
  .mobile-more .ui-icon { width: 18px; height: 18px; }
  .mobile-more .nav-short { display: block; font-size: clamp(.52rem,2.2vw,.62rem); }
  .mobile-status { padding: 0; cursor: pointer; }
  .account-sheet { align-items: flex-start; }
}

/* ================= Accounts & Revenue Cockpit v7 ================= */
.decision-card{display:flex;align-items:center;gap:.7rem;margin-top:.85rem;padding:.72rem;border:1px solid rgba(215,181,91,.18);border-radius:12px;background:rgba(215,181,91,.045)}
.decision-card>div{display:flex;min-width:0;flex:1;flex-direction:column}.decision-card span{color:var(--gold);font-size:.62rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.decision-card b{margin-top:.16rem}.decision-card small{margin-top:.1rem;color:var(--muted);font-size:.68rem}.decision-card>a{display:grid;place-items:center;width:34px;height:34px;color:var(--gold)}
.lead-lineage{display:flex;flex-wrap:wrap;gap:.45rem .9rem;margin-top:.65rem;color:var(--muted);font-size:.72rem}.lead-lineage b{color:var(--ink)}
.budget-card h3{margin-bottom:.35rem}.budget-card .muted{font-size:.79rem;line-height:1.45}.budget-questions{display:flex;flex-wrap:wrap;gap:.35rem;margin:.7rem 0}.budget-questions span{padding:.28rem .45rem;border:1px solid var(--line);border-radius:7px;color:var(--muted);font-size:.67rem}.budget-range{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin:.5rem 0}.budget-card textarea{margin:.5rem 0}
.admin-kpis{margin-bottom:1rem}.admin-kpis .wert{font-size:clamp(1.25rem,2vw,2rem)}.admin-kpis .wert span{font-size:.8em;color:var(--muted)}
.admin-layout{align-items:start;margin-bottom:1rem}.admin-section{margin-top:1rem}.admin-form{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:.6rem;margin:1rem 0}.admin-form input,.admin-form select{min-width:0}
.account-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:.65rem}.account-card{display:grid;grid-template-columns:44px 1fr auto auto auto;align-items:center;gap:.65rem;padding:.75rem;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.02)}.account-card.inaktiv{opacity:.55}.account-card .account-avatar{width:42px;height:42px;flex-basis:42px}.account-card>div:nth-child(2){display:flex;min-width:0;flex-direction:column}.account-card small{overflow:hidden;color:var(--muted);text-overflow:ellipsis}.account-card span{margin-top:.1rem;color:var(--gold);font-size:.68rem}
.funnel-list{display:grid;gap:.65rem;margin-top:1rem}.funnel-list>div{display:grid;grid-template-columns:120px 1fr 32px;align-items:center;gap:.65rem;font-size:.75rem}.funnel-list i{height:7px;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.06)}.funnel-list em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--gold),var(--gold-hi))}
.deal-list{display:grid;gap:.45rem}.deal-row{display:grid;grid-template-columns:1fr auto 100px;align-items:center;gap:.8rem;width:100%;padding:.75rem;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.018);color:var(--ink);text-align:left;cursor:pointer}.deal-row:hover{border-color:rgba(215,181,91,.3)}.deal-row span:first-child{display:flex;min-width:0;flex-direction:column}.deal-row small{margin-top:.15rem;color:var(--muted)}.deal-row strong{text-align:right;color:var(--gold-hi)}
table td small{display:block;margin-top:.12rem;color:var(--muted);font-size:.68rem}
@media(max-width:1180px){.admin-form{grid-template-columns:repeat(2,1fr)}.admin-form .btn{grid-column:span 2}}
@media(max-width:760px){.decision-card{align-items:flex-start;flex-wrap:wrap}.budget-range,.admin-form{grid-template-columns:1fr}.admin-form .btn{grid-column:auto}.account-card{grid-template-columns:42px 1fr}.account-card .btn{grid-column:span 1}.deal-row{grid-template-columns:1fr auto}.deal-row strong{grid-column:2}.funnel-list>div{grid-template-columns:95px 1fr 25px}.admin-layout{display:block}.admin-layout>.karte+ .karte{margin-top:1rem}.app-rail .nav button[data-ans="monitoring"]{display:none}}

