/* Akquise-Tool – modest-ui mit silcoplan-Farben */

/* Schrift Hind – lokal (latin + latin-ext), keine externen Quellen */
@font-face { font-family: "Hind"; font-weight: 400; font-display: swap; src: url("fonts/hind-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind"; font-weight: 400; font-display: swap; src: url("fonts/hind-400-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hind"; font-weight: 500; font-display: swap; src: url("fonts/hind-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind"; font-weight: 500; font-display: swap; src: url("fonts/hind-500-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hind"; font-weight: 600; font-display: swap; src: url("fonts/hind-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind"; font-weight: 600; font-display: swap; src: url("fonts/hind-600-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Farben aus silcoplan.de */
:root {
  --navy: #112946;      /* Logo, Überschriften, Linien, Primärbutton */
  --blue: #2c5a8f;      /* Fließtext-Blau, Links */
  --sky: #dbe7f6;       /* helle Buttons, Footer */
  --sky-2: #c4d7ef;
  --paper: #f3f6fb;     /* Hintergrund */
  --line: #112946;      /* harte Linien */
  --line-soft: #dbe3ee; /* Tabellenzeilen */
  --muted: #5d6f86;
  --accent: #406898;   /* Stufen-Auswahl und -Anzeige */

  --mdst-color-fg: var(--navy);
  --mdst-color-bg: #fff;
  --mdst-color-border: var(--line);
  --mdst-color-muted: var(--muted);
  --mdst-color-subtle: var(--sky);
  --mdst-color-focus: var(--blue);
  --mdst-color-info: var(--blue);
  --mdst-font-sans: "Hind", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mdst-radius: 0;
  --mdst-border-width: 1px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; margin: 0; background: var(--paper); color: var(--navy); font-family: var(--mdst-font-sans); line-height: 1.5; }
:where(.mdst-ui) h1, :where(.mdst-ui) h2, :where(.mdst-ui) h3 { color: var(--navy); font-weight: 600; letter-spacing: -.01em; }
:where(.mdst-ui) a { color: var(--blue); }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; }

/* modest-ui Buttons in Markenfarben */
.mdst-button, :where(.mdst-ui) button.mdst-button { --mdst-button-hover-shadow: none; }
.mdst-button:hover { background: var(--sky); }
.mdst-button--solid:hover, .mdst-button[aria-pressed="true"]:hover { background: #1c3a5f; }
a.mdst-button--solid, a.mdst-button--solid:hover { color: #fff; }
.mdst-button--borderless { padding-inline: 0 !important; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.mdst-button--borderless:hover { background: none; color: var(--navy); }
.mdst-button--borderless.danger { color: #8f2a2a; }
.mdst-dropdown, .mdst-input { background-color: #fff; }

/* ---------- Header ---------- */
.app-header {
  flex: none; z-index: 10; height: 4.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 1.5rem; background: #fff; border-bottom: 1px solid var(--line);
}
.brand, :where(.mdst-ui) button.brand {
  display: flex; align-items: center; gap: .9rem; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer;
}
.brand img { height: 34px; width: auto; display: block; }
.brand span { padding-left: .9rem; border-left: 1px solid var(--line); font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); line-height: 1.6; }
.brand:hover { background: none; }
.app-header .search { flex: 0 1 30rem; margin-left: auto; }
.header-right { display: flex; align-items: center; gap: 1rem; }
.today { font-size: .85rem; color: var(--muted); }
.icon-btn { width: 2.4rem; height: 2.4rem; padding: 0 !important; }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }

/* ---------- Zweiteilung ---------- */
.split, .settings, .leads-view, .status-tabs { margin: 0 !important; }
.leads-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(22rem, 30rem) 1fr; }
.list-pane { position: relative; display: flex; flex-direction: column; min-height: 0; background: #fff; border-right: 1px solid var(--line); }
.list-head { padding: 1rem 1rem .5rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .75rem; }
.search input { width: 100%; }
.status-tabs { flex: none; display: grid; grid-template-columns: repeat(7, 1fr); background: #fff; border-bottom: 1px solid var(--line); }
.s-tab, :where(.mdst-ui) button.s-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  padding: .8rem 1.25rem .7rem; border: 0; border-right: 1px solid var(--line-soft); border-bottom: 3px solid transparent;
  border-radius: 0; box-shadow: none; background: #fff; color: var(--navy); font-family: inherit; text-align: left; cursor: pointer;
}
.s-tab:last-child { border-right: 0; }
.s-tab:hover { background: var(--paper); }
.s-tab b { font-size: 1.5rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.s-tab span { font-size: .8rem; color: var(--muted); }
.s-tab[aria-selected="true"] { border-bottom-color: var(--navy); background: var(--paper); }
.s-tab.due b { color: var(--blue); }
.filter-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filter-row select { width: auto; flex: 1 1 8rem; min-width: 0; }
.seg { display: flex; }
.list-count { font-size: .78rem; color: var(--muted); }

.lead-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.lead-list li { padding: .7rem 1rem .75rem; border-bottom: 1px solid var(--line-soft); cursor: pointer; border-left: 3px solid transparent; }
.lead-list li:hover { background: var(--paper); }
.lead-list li:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.lead-list li[aria-selected="true"] { background: var(--paper); border-left-color: var(--navy); }
.li-top { display: flex; align-items: center; gap: .6rem; }
.li-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-score { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.li-meta { font-size: .8rem; color: var(--muted); margin: .15rem 0 .4rem 1.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-bottom { display: flex; align-items: center; gap: .7rem; margin-left: 1.95rem; }
.li-bottom .next { margin-left: auto; font-size: .8rem; }
.empty { padding: 1.5rem 1rem; margin: 0; color: var(--muted); }

.detail-pane { position: relative; overflow-y: auto; min-height: 0; background: var(--paper); }
.detail-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; color: var(--muted); padding: 2rem; text-align: center; }
.detail-empty svg { width: 3rem; height: 3rem; stroke-width: 1; color: var(--sky-2); }

/* ---------- Einstellungen ---------- */
.settings { flex: 1; overflow-y: auto; width: 100%; padding: 1.5rem max(2rem, calc((100% - 64rem) / 2)) 0; display: flex; flex-direction: column; gap: 1.25rem; }
.settings-head h1 { font-size: 1.6rem; margin: .25rem 0 0; }
.settings-h2 { font-size: 1.25rem; margin: .75rem 0 0; }
.export-body { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; }
.export-body p { margin: 0; flex: 1 1 20rem; }
.export-body a { text-decoration: none; }

/* Badges & Tags */
.stufe {
  display: inline-grid; place-items: center; flex: none; width: 1.35rem; height: 1.35rem;
  font-size: .72rem; font-weight: 600; line-height: 1; border: 1px solid var(--line-soft); border-radius: 4px;
  color: var(--muted); background: #fff; padding-top: .14em;
}
.stufe-A { color: var(--navy); border-color: var(--accent); }
.stufe-B { color: var(--accent); }
.stufe-C { color: var(--muted); }
.stufe-D, .stufe-U { color: var(--muted); border-color: var(--line-soft); }
.mdst-tag.prod { background: #fff; border-color: var(--line-soft); color: var(--blue); margin: 0 .25rem .25rem 0; font-size: .75rem; padding: .15em .45em; }
.mdst-badge, .mdst-tag { border-radius: 0; }
.mdst-badge { font-size: .75rem; padding: .25em .55em .2em; }
.st-neu { border-color: var(--line-soft); color: var(--muted); }
.st-in_bearbeitung { background: #fff; border-color: var(--accent); color: var(--accent); }
.st-kontaktiert { background: var(--navy); border-color: var(--navy); color: #fff; }
.st-nicht_erreicht { background: var(--paper); border-color: var(--line-soft); color: var(--muted); text-decoration: line-through; }
.st-kein_interesse { background: #fff; border-color: var(--muted); color: var(--muted); }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 10px; height: 10px; border: 1px solid var(--navy); display: block; }
.dots i.on { background: var(--navy); }
.next { font-size: .85rem; white-space: nowrap; }
.next.due { color: var(--blue); font-weight: 600; }
.next.due::before { content: ""; display: inline-block; width: .5rem; height: .5rem; background: var(--blue); margin-right: .4rem; vertical-align: .05rem; }
.next.muted { color: var(--muted); }

/* ---------- Detail ---------- */
.d-head { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid var(--line); padding: 1.25rem 1.75rem 1rem; }
.d-head-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.d-head h2 { font-size: 1.45rem; margin: 0; line-height: 1.2; }
.d-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; margin-top: .5rem; font-size: .88rem; color: var(--muted); }
.d-back { display: none !important; margin-bottom: .4rem; }
.status-bar { display: flex; flex-wrap: wrap; margin-top: .9rem; }
.status-bar .mdst-button { margin-left: -1px; }
.status-bar .mdst-button:first-child { margin-left: 0; }

.d-body { padding: 1.25rem 1.75rem 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.mdst-card { background: #fff; }
.mdst-card__header h3 { font-size: 1.05rem; margin: 0; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.mdst-card__header small { font-weight: 400; font-size: .82rem; color: var(--muted); }
.d-grid { display: grid; grid-template-columns: 9rem 1fr; gap: .3rem 1rem; font-size: .92rem; margin: 0; }
.d-grid dt { color: var(--muted); }
.d-grid dd { margin: 0; }
.d-text { font-size: .95rem; margin: .75rem 0 0; }
details.d-more { margin-top: .75rem; font-size: .92rem; }
details.d-more summary { cursor: pointer; color: var(--blue); }
.prod-pick { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; }
.prod-pick label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--navy); }
.hint { font-size: .82rem; color: var(--muted); margin: .6rem 0 0; }
.notice { font-size: .875rem; padding: .65rem .9rem; margin: 0 0 1rem; border-left: 3px solid var(--accent); background: var(--paper); color: var(--navy); }
.notice.soft { border-left-color: var(--line-soft); }

.field { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--muted); margin-bottom: .8rem; }
.field .mdst-input, .field .mdst-dropdown { font-size: .95rem; color: var(--navy); }
.field textarea.mdst-input { min-height: 18rem; font-family: inherit; line-height: 1.5; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > .field { flex: 1 1 12rem; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.actions a.mdst-button { text-decoration: none; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); margin-bottom: 1.1rem; }
.step { padding: .6rem .85rem; border-right: 1px solid var(--line); font-size: .82rem; }
.step:last-child { border-right: 0; }
.step b { display: block; font-size: .92rem; }
.step small { color: var(--muted); }
.step.done { background: var(--navy); color: #fff; }
.step.done small { color: #c9d6e7; }
.step.current { background: var(--paper); box-shadow: inset 0 -2px 0 var(--accent); }

.log { list-style: none; margin: 0; padding: 0; }
.log li { border-top: 1px solid var(--line-soft); padding: .7rem 0; font-size: .9rem; }
.log li:first-child { border-top: 0; padding-top: 0; }
.log-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.log time { color: var(--muted); font-size: .8rem; }
.log pre { white-space: pre-wrap; font-family: inherit; font-size: .88rem; background: var(--paper); padding: .75rem; margin: .5rem 0; }
.note-text { white-space: pre-wrap; margin: .25rem 0 0; }
.note-form textarea.mdst-input { min-height: 4.5rem; }
.sub-h { font-size: .95rem; margin: 1.25rem 0 .5rem; }

/* ---------- Vorlagen ---------- */
.tpl-editor { display: flex; flex-direction: column; gap: 1.25rem; }
.tpl-editor .mdst-tabs__list { border-bottom: 0; }
.tpl-editor textarea.mdst-input { min-height: 14rem; font-family: inherit; }
.tpl-editor textarea.mdst-input.short { min-height: 5.5rem; }
.placeholders { font-size: .85rem; color: var(--muted); margin: 0; }
.placeholders code { background: var(--paper); color: var(--navy); padding: .05rem .3rem; font-size: .8rem; }
.save-bar { padding: .25rem 0 2rem; display: flex; gap: 1rem; align-items: center; }

/* Toasts */
.toasts { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: var(--navy); color: #fff; padding: .7rem 1rem; font-size: .9rem; border-left: 4px solid var(--sky-2); max-width: 24rem; }
.toast.error { border-left-color: #fff; font-weight: 500; }


/* ---------- Bedienelemente: weicher, wie die Buttons auf silcoplan.de ---------- */
:root {
  --ui-radius: 5px;
  --field-bg: #fff;      /* Eingabefelder */
  --btn-bg: #fff;        /* Buttons */
  --btn-bg-hover: #f3f6fb;
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

/* Eingabefelder & Dropdowns */
.mdst-input, .mdst-dropdown,
:where(.mdst-ui) input[type="search"], :where(.mdst-ui) input[type="text"], :where(.mdst-ui) input[type="email"],
:where(.mdst-ui) select, :where(.mdst-ui) textarea {
  background-color: var(--field-bg);
  border: 1px solid var(--navy);
  border-radius: var(--ui-radius);
  color: var(--navy);
  padding: .5rem .75rem;
  transition: background-color .15s, box-shadow .15s;
}
.mdst-input::placeholder, :where(.mdst-ui) input::placeholder, :where(.mdst-ui) textarea::placeholder { color: #7d8ea5; }
.mdst-input:hover, .mdst-dropdown:hover { border-color: var(--accent); }
.mdst-input:focus, .mdst-dropdown:focus, .mdst-input:focus-visible, .mdst-dropdown:focus-visible {
  outline: none; background-color: #fff; box-shadow: var(--focus);
}
.mdst-dropdown, :where(.mdst-ui) select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23112946' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: .8rem;
}
.mdst-dropdown--sm { padding-block: .3rem; padding-left: .6rem; font-size: .875rem; }

/* Checkboxen */
:where(.mdst-ui) input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 1.15rem; height: 1.15rem; border: 1px solid var(--navy); border-radius: 4px;
  background: var(--field-bg) no-repeat center / .75rem; transition: background-color .15s;
}
:where(.mdst-ui) input[type="checkbox"]:hover { background-color: var(--btn-bg-hover); }
:where(.mdst-ui) input[type="checkbox"]:checked {
  background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
:where(.mdst-ui) input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--focus); }

/* Buttons */
.mdst-button:not(.mdst-button--borderless):not(.mdst-button--solid), :where(.mdst-ui) button.mdst-button:not(.mdst-button--borderless):not(.mdst-button--solid) {
  background: var(--btn-bg); border: 1px solid var(--navy); color: var(--navy);
  border-radius: var(--ui-radius); font-weight: 500;
}
.mdst-button:not(.mdst-button--borderless):not(.mdst-button--solid):hover { background: var(--btn-bg-hover); }
.mdst-button--solid, a.mdst-button--solid { border-radius: var(--ui-radius); background: var(--navy); border-color: var(--navy); }
.mdst-button[aria-pressed="true"], :where(.mdst-ui) button.mdst-button[aria-pressed="true"] {
  background: var(--navy) !important; border-color: var(--navy) !important; color: #fff !important;
}
.mdst-button:focus-visible { outline: none; box-shadow: var(--focus); }
.icon-btn { color: var(--navy) !important; }

/* Text vertikal zentrieren: Hind sitzt optisch ~0,09em zu hoch → oben mehr, unten weniger Innenabstand */
:root { --nudge: .09em; }
.mdst-button, :where(.mdst-ui) button.mdst-button, .mdst-badge, .mdst-tag { line-height: 1.2; }
.mdst-button:not(.mdst-button--borderless), :where(.mdst-ui) button.mdst-button:not(.mdst-button--borderless) {
  padding: calc(.55rem + var(--nudge)) 1rem calc(.55rem - var(--nudge));
}
.mdst-button--sm:not(.mdst-button--borderless), :where(.mdst-ui) button.mdst-button--sm:not(.mdst-button--borderless) {
  padding: calc(.4rem + var(--nudge)) .7rem calc(.4rem - var(--nudge)); font-size: .85rem;
}
.mdst-badge { padding: calc(.25rem + var(--nudge)) .5rem calc(.25rem - var(--nudge)); }
.mdst-tag.prod { padding: calc(.25rem + var(--nudge)) .45rem calc(.25rem - var(--nudge)); }
.icon-btn { padding: 0 !important; }
.mdst-input, .mdst-dropdown, :where(.mdst-ui) input[type="search"], :where(.mdst-ui) input[type="text"],
:where(.mdst-ui) input[type="email"], :where(.mdst-ui) select { padding-top: .58rem; padding-bottom: .42rem; line-height: 1.25; }
.mdst-dropdown--sm { padding-top: .42rem !important; padding-bottom: .28rem !important; }

/* Knopfgruppen: nur Außenecken abrunden */
.status-bar .mdst-button { border-radius: 0 !important; border-color: var(--navy) !important; }
.status-bar .mdst-button:first-child { border-radius: var(--ui-radius) 0 0 var(--ui-radius) !important; }
.status-bar .mdst-button:last-child { border-radius: 0 var(--ui-radius) var(--ui-radius) 0 !important; }
.seg { gap: .25rem; }
.seg .mdst-button, :where(.mdst-ui) .seg button.mdst-button {
  margin: 0 !important; min-width: 1.9rem; padding: calc(.3rem + var(--nudge)) .45rem calc(.3rem - var(--nudge)) !important; font-size: .82rem;
  border: 1px solid var(--line-soft) !important; border-radius: var(--ui-radius) !important;
  background: #fff !important; color: #9aa8ba !important; font-weight: 500;
}
.seg .mdst-button:hover, :where(.mdst-ui) .seg button.mdst-button:hover { background: var(--btn-bg-hover) !important; border-color: var(--navy) !important; }
.seg .mdst-button[aria-pressed="true"], :where(.mdst-ui) .seg button.mdst-button[aria-pressed="true"] {
  background: var(--navy) !important; border-color: var(--navy) !important; color: #fff !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .status-tabs { grid-template-columns: repeat(4, 1fr); }
  .s-tab, :where(.mdst-ui) button.s-tab { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 900px) {
  body { height: auto; overflow: visible; }
  .app-header { position: sticky; top: 0; flex-wrap: wrap; height: auto; padding-block: .75rem; }
  .app-header .search { order: 3; flex-basis: 100%; margin-left: 0; }
  .status-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .s-tab, :where(.mdst-ui) button.s-tab { flex: none; min-width: 7.5rem; padding: .55rem 1rem; border-top: 0; }
  .s-tab b { font-size: 1.2rem; }
  .show-detail .status-tabs { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); height: auto; }
  .list-pane, .detail-pane { min-width: 0; }
  .list-pane { border-right: 0; }
  .lead-list { overflow: visible; }
  .detail-pane { display: none; overflow: visible; }
  .show-detail .list-pane { display: none; }
  .show-detail .detail-pane { display: block; }
  .d-back { display: inline-flex !important; }
  .d-head { position: static; }
}
@media (max-width: 640px) {
  .app-header { padding: 0 1rem; }
  .brand img { height: 26px; }
  .brand span, .today { display: none; }
  .settings { padding: 1rem 1rem 0; }
  .d-head { padding-inline: 1rem; }
  .d-body { padding-inline: .75rem; }
  .d-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
}

/* ---------- Login ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; height: auto; overflow: auto; padding: 1.5rem; }
.login-box { width: min(24rem, 100%); display: flex; flex-direction: column; gap: 1.5rem; }
.login-brand { display: flex; align-items: center; gap: .9rem; justify-content: center; }
.login-brand img { height: 36px; }
.login-brand span { padding-left: .9rem; border-left: 1px solid var(--line); font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.login-card h1 { font-size: 1.15rem; margin: 0; }
.login-card .field input { width: 100%; }
.login-submit { width: 100%; margin-top: .4rem; }
.logout-form { margin: 0; display: flex; }

/* ---------- Einführungstour ---------- */
.tour { position: fixed; inset: 0; z-index: 3000; margin-block-start: 0; }
.tour-blocker { position: absolute; inset: 0; }
.tour-spot {
  position: fixed; border-radius: 6px; pointer-events: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 9999px rgba(11, 12, 12, 0.55);
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}
.tour:has(.tour-spot[hidden]) .tour-blocker { background: rgba(17, 41, 70, .55); }
.tour-card {
  position: fixed; width: min(23rem, calc(100vw - 24px)); border-radius: 8px; border-color: var(--navy);
  box-shadow: 0 12px 32px rgba(17, 41, 70, .25); transition: top .25s ease, left .25s ease, opacity .15s;
}
.tour-card.is-moving { opacity: 0; }
.tour-card.is-center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(27rem, calc(100vw - 24px)); }
.tour-card .mdst-card__body { padding: 1.1rem 1.25rem 1rem; }
.tour-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.tour-count { font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
.tour-card h2 { font-size: 1.1rem; margin: 0 0 .4rem; line-height: 1.3; }
.tour-card p { font-size: .92rem; margin: 0 0 1rem; color: #2b3f5a; }
.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tour-buttons { display: flex; gap: .5rem; }
.tour-dots { display: flex; gap: 4px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-soft); }
.tour-dots i.on { background: var(--navy); }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }
