/* ============ Design Tokens ============ */
:root {
  --bg: #f4f5f9;
  --bg-elev: #ffffff;
  --bg-sunken: #eceef5;
  --sidebar: #12141d;
  --sidebar-muted: #8b91a7;
  --text: #171a22;
  --text-muted: #6b7280;
  --text-soft: #9aa1b1;
  --border: #e3e6ef;
  --border-strong: #ced3e0;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --accent-text: #ffffff;
  --teal: #0d9488;
  --green: #16a34a;
  --green-soft: #e8f7ee;
  --amber: #d97706;
  --amber-soft: #fdf3e3;
  --red: #dc2626;
  --red-soft: #fdeaea;
  --blue-soft: #e8f0fe;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .08);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .18);
  --radius: 10px;
  --radius-lg: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 232px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1016;
    --bg-elev: #171a23;
    --bg-sunken: #12141c;
    --sidebar: #0a0c11;
    --text: #e8eaf2;
    --text-muted: #9aa1b4;
    --text-soft: #6f7689;
    --border: #262a36;
    --border-strong: #343a49;
    --accent-soft: #1e1f3d;
    --green-soft: #12251a;
    --amber-soft: #2a2011;
    --red-soft: #2b1414;
    --blue-soft: #131d2e;
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--accent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ Layout ============ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; overflow: hidden; }

.sidebar {
  background: var(--sidebar);
  color: #cfd3e0;
  display: flex; flex-direction: column;
  padding: 18px 12px;
  gap: 4px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
}
.brand__name { font-weight: 650; color: #fff; letter-spacing: -.01em; }
.brand__sub { font-size: 11px; color: var(--sidebar-muted); }

.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #5b6176; padding: 14px 10px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  color: #b8bdcd; border: 0; background: none; width: 100%; text-align: left;
  font-size: 13.5px;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.is-active { background: rgba(99, 102, 241, .22); color: #fff; font-weight: 550; }
.nav-item__count { margin-left: auto; font-size: 11px; color: var(--sidebar-muted); background: rgba(255,255,255,.07); padding: 1px 7px; border-radius: 20px; }
.nav-item.is-active .nav-item__count { background: rgba(255,255,255,.16); color: #fff; }
.nav-item__dot { width: 7px; height: 7px; border-radius: 50%; }
.sidebar__foot { margin-top: auto; padding: 14px 10px 4px; font-size: 11px; color: #4d5468; }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: var(--bg-elev);
  border-bottom: 1px solid var(--border); min-height: 60px; flex-wrap: wrap;
}
.topbar__title { font-size: 17px; font-weight: 650; letter-spacing: -.015em; margin: 0; }
.topbar__sub { font-size: 12px; color: var(--text-muted); }
.topbar__spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-sunken); border: 1px solid transparent;
  border-radius: 9px; padding: 7px 11px; min-width: 240px;
}
.search:focus-within { border-color: var(--accent); background: var(--bg-elev); }
.search input { border: 0; background: none; outline: 0; width: 100%; }
.search svg { flex: none; color: var(--text-soft); }

.view { flex: 1; overflow: auto; padding: 20px; }
.view--board { padding: 0; overflow: hidden; display: flex; flex-direction: column; }

/* ============ Buttons & Chips ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); padding: 7px 13px; cursor: pointer;
  font-size: 13px; font-weight: 550; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { border-color: var(--text-soft); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--bg-sunken); color: var(--text); }
.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn--block { width: 100%; }
.btn--icon { padding: 6px; width: 30px; height: 30px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: var(--bg-sunken); color: var(--text-muted); white-space: nowrap;
}
.chip--tag { color: #fff; }
.chip--outline { background: none; border: 1px solid var(--border-strong); }
.chip button { border: 0; background: none; cursor: pointer; opacity: .7; padding: 0 0 0 2px; line-height: 1; }

.filter-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-elev); font-size: 12.5px; color: var(--text-muted);
}
.filter-chip.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.badge { font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 6px; }
.badge--overdue { background: var(--red-soft); color: var(--red); }
.badge--today { background: var(--amber-soft); color: var(--amber); }
.badge--soon { background: var(--blue-soft); color: #2563eb; }
.badge--later { background: var(--bg-sunken); color: var(--text-muted); }
.badge--ok { background: var(--green-soft); color: var(--green); }

.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.tiny { font-size: 11.5px; }

/* ============ Board ============ */
.board-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  border-bottom: 1px solid var(--border); background: var(--bg-elev); flex-wrap: wrap;
}
.seg { display: inline-flex; background: var(--bg-sunken); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: none; cursor: pointer; padding: 5px 13px;
  border-radius: 7px; font-size: 13px; color: var(--text-muted); font-weight: 550;
}
.seg button.is-on { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }

.board { flex: 1; overflow-x: auto; overflow-y: hidden; padding: 16px 20px 20px; display: flex; gap: 22px; align-items: flex-start; }
.phase { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.phase__head {
  display: flex; align-items: center; gap: 8px; padding: 0 2px;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-soft);
}
.phase__line { flex: 1; height: 1px; background: var(--border); }
.phase__cols { display: flex; gap: 12px; height: 100%; min-height: 0; }

.col {
  width: 286px; flex: none; display: flex; flex-direction: column;
  background: var(--bg-sunken); border-radius: var(--radius-lg);
  border: 1px solid transparent; min-height: 0; max-height: 100%;
}
.col.is-drop { border-color: var(--accent); background: var(--accent-soft); }
.col__head { padding: 11px 12px 8px; display: flex; align-items: flex-start; gap: 8px; }
.col__code {
  font-size: 11px; font-weight: 700; color: #fff; background: var(--text-soft);
  border-radius: 6px; padding: 2px 6px; flex: none; letter-spacing: .02em;
}
.col--decision .col__code { background: var(--amber); }
.col--exit .col__code { background: var(--red); }
.col--final .col__code { background: var(--green); }
.col--process .col__code { background: var(--accent); }
.col__title { font-size: 12.8px; font-weight: 650; line-height: 1.25; }
.col__meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.col__count { margin-left: auto; font-size: 11px; color: var(--text-muted); background: var(--bg-elev); border-radius: 20px; padding: 1px 7px; }
.col__body { overflow-y: auto; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 40px; }
.col__empty { text-align: center; color: var(--text-soft); font-size: 12px; padding: 14px 6px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.col__add { margin: 0 8px 8px; }

/* ============ Card ============ */
.card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 11px; cursor: pointer; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 7px;
  border-left: 3px solid transparent;
  transition: box-shadow .12s, transform .08s, border-color .12s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card.is-dragging { opacity: .45; }
.card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.card--overdue { border-left-color: var(--red); }
.card--today { border-left-color: var(--amber); }
.card--snoozed { opacity: .72; background: repeating-linear-gradient(135deg, var(--bg-elev), var(--bg-elev) 8px, var(--bg-sunken) 8px, var(--bg-sunken) 9px); }
.card__top { display: flex; align-items: center; gap: 6px; }
.card__ref { font-size: 10.5px; color: var(--text-soft); font-weight: 600; letter-spacing: .03em; }
.card__title { font-weight: 620; font-size: 13.6px; line-height: 1.3; letter-spacing: -.01em; }
.card__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-muted); }
.card__tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag-dot { width: 22px; height: 5px; border-radius: 3px; }
.card__progress { height: 4px; border-radius: 3px; background: var(--bg-sunken); overflow: hidden; }
.card__progress i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.avatar {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); flex: none;
}
.card.is-compact .card__row--contact, .card.is-compact .card__progress { display: none; }

/* ============ Drawer ============ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10, 12, 20, .32); z-index: 40; animation: fade .12s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: var(--bg-elev); z-index: 41; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slide .18s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slide { from { transform: translateX(28px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }

.drawer__head { padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 18px 40px; display: flex; flex-direction: column; gap: 18px; }
.drawer__title { font-size: 18px; font-weight: 680; letter-spacing: -.02em; margin: 6px 0 2px; }
.drawer__title input { border: 0; background: none; outline: 0; font-size: 18px; font-weight: 680; width: 100%; letter-spacing: -.02em; }

.section__head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.section__title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.section__line { flex: 1; height: 1px; background: var(--border); }

.stage-banner {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 13px;
  background: var(--bg-sunken); display: flex; flex-direction: column; gap: 10px;
}
.stage-banner__top { display: flex; align-items: center; gap: 8px; }
.stage-actions { display: flex; flex-direction: column; gap: 7px; }
.action-btn {
  display: flex; align-items: center; gap: 9px; text-align: left; width: 100%;
  padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); cursor: pointer; font-size: 13px; font-weight: 550;
}
.action-btn:hover { border-color: var(--accent); }
.action-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.action-btn--primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.action-btn--danger { color: var(--red); border-color: var(--red-soft); background: var(--red-soft); }
.action-btn--snooze { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-soft); }
.action-btn--archive { color: var(--text-muted); }
.action-btn__arrow { margin-left: auto; opacity: .55; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.field input, .field select, .field textarea {
  border: 1px solid var(--border); background: var(--bg-elev); border-radius: 8px;
  padding: 7px 9px; outline: 0; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 64px; }

.checklist { display: flex; flex-direction: column; gap: 2px; }
.check {
  display: flex; align-items: flex-start; gap: 9px; padding: 6px 8px; border-radius: 8px; cursor: pointer;
}
.check:hover { background: var(--bg-sunken); }
.check input { margin: 2px 0 0; width: 15px; height: 15px; accent-color: var(--green); cursor: pointer; }
.check.is-done span { text-decoration: line-through; color: var(--text-soft); }
.check__del { margin-left: auto; opacity: 0; border: 0; background: none; cursor: pointer; color: var(--text-soft); }
.check:hover .check__del { opacity: 1; }
.progress-bar { height: 6px; background: var(--bg-sunken); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-bar i { display: block; height: 100%; background: var(--green); transition: width .2s; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-btn {
  border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; cursor: pointer;
  background: var(--bg-elev); font-size: 12px; display: inline-flex; align-items: center; gap: 6px;
}
.tag-btn.is-on { color: #fff; border-color: transparent; font-weight: 600; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 12px; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 10px; top: 20px; bottom: 0; width: 1px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-sunken); font-size: 10px; z-index: 1; }
.tl-body { font-size: 12.8px; line-height: 1.45; }
.tl-time { font-size: 11px; color: var(--text-soft); }

/* ============ Tabellen / Listen ============ */
.table-wrap { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-soft); padding: 10px 12px; border-bottom: 1px solid var(--border); font-weight: 700;
  background: var(--bg-elev); position: sticky; top: 0; cursor: pointer; white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: var(--bg-sunken); }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* ============ Dashboard ============ */
.grid { display: grid; gap: 14px; }
.grid--kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 15px 16px; }
.panel__title { font-size: 13px; font-weight: 650; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.kpi__label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi__value { font-size: 27px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; }
.kpi__hint { font-size: 11.5px; color: var(--text-soft); margin-top: 3px; }

.funnel { display: flex; flex-direction: column; gap: 7px; }
.funnel__row { display: grid; grid-template-columns: 130px 1fr 42px; align-items: center; gap: 10px; font-size: 12.5px; }
.funnel__bar { height: 22px; border-radius: 6px; background: var(--bg-sunken); overflow: hidden; }
.funnel__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #8b5cf6); border-radius: 6px; }

.list-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover .list-row__title { color: var(--accent); }
.list-row__title { font-weight: 600; font-size: 13px; }

/* ============ Modal ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10, 12, 20, .45); z-index: 60;
  display: grid; place-items: center; padding: 20px; animation: fade .12s ease;
}
.modal {
  background: var(--bg-elev); border-radius: 16px; box-shadow: var(--shadow-lg);
  width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 20px;
}
.modal--sm { width: min(400px, 100%); }
.modal h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.02em; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ============ Toasts ============ */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #1b1e29; color: #fff; padding: 9px 15px; border-radius: 10px;
  font-size: 13px; box-shadow: var(--shadow-lg); transition: opacity .35s, transform .35s;
}
.toast--success { background: #14532d; }
.toast--error { background: #7f1d1d; }
.toast.is-out { opacity: 0; transform: translateY(8px); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3 { margin: 10px 0 4px; color: var(--text); }

@media (max-width: 900px) {
  .app { grid-template-columns: 64px 1fr; }
  .brand__name, .brand__sub, .nav-item span:not(:first-child), .nav-label { display: none; }
  .nav-item > span:first-child { width: auto !important; font-size: 17px; }
  .nav-item { justify-content: center; }
  .sidebar__foot { padding: 10px 2px 4px; }
  .userbox { justify-content: center; }
  .userbox__text { display: none; }
  .userbox__actions { flex-direction: column; }
  .userbox__btn { padding: 4px 0; font-size: 9px; min-width: 0; }
  .field-grid { grid-template-columns: 1fr; }
}

/* Schritt-Kennzeichnung ohne Nummer: farbiger Punkt nach Schritt-Typ */
.col__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 4px; }
.col--decision .col__dot { background: var(--amber); }
.col--exit .col__dot { background: var(--red); }
.col--final .col__dot { background: var(--green); }
.stage-banner__top .col__dot { margin-top: 6px; }

/* Anrufversuche */
.action-btn--call { background: var(--blue-soft); border-color: transparent; color: #2563eb; }
.action-btn--call .action-btn__arrow { font-size: 11.5px; font-weight: 600; opacity: .8; }
.chip--call { background: var(--blue-soft); color: #2563eb; }
.call-counter { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #2563eb; background: var(--blue-soft); padding: 5px 9px; border-radius: 8px; }

/* Doppelter Abstand zwischen Übergabe-Buttons und manueller Schritt-Auswahl */
.stage-banner .stage-manual { margin-top: 10px; }

/* Rückruf-Termine */
.window-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.window-btn {
  border: 1px solid var(--border-strong); background: var(--bg-elev); border-radius: 8px;
  padding: 7px 12px; cursor: pointer; font-size: 13px; font-weight: 550;
}
.window-btn:hover { border-color: var(--accent); }
.window-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.callback-summary { padding: 7px 9px; border-radius: 8px; background: var(--bg-sunken); font-size: 13px; }
.card__callback {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  background: var(--amber-soft); color: var(--amber); border-radius: 6px;
  padding: 2px 7px; font-size: 11.5px; font-weight: 600;
}
.callback-row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.callback-row:last-child { border-bottom: 0; }
.callback-row__when { font-size: 12px; font-weight: 650; }

/* Gesperrte Übergabe (z. B. fehlender Rückruftermin) */
.action-btn:disabled { opacity: .45; cursor: not-allowed; }
.action-btn:disabled:hover { border-color: var(--border-strong); filter: none; }
.action-btn--primary:disabled:hover { border-color: var(--accent); }
.action-hint { margin: 2px 0 0; font-size: 11.5px; color: var(--amber); font-weight: 600; }

/* Rückruf-Hinweis im Anruf-Schritt */
.callback-hint {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: var(--amber); background: var(--amber-soft); padding: 6px 9px; border-radius: 8px;
}

/* Paketauswahl in der Buchung */
.package-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 7px; }
.package-btn {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  border: 1px solid var(--border-strong); background: var(--bg-elev); border-radius: 9px;
  padding: 9px 11px; cursor: pointer; text-align: left;
}
.package-btn:hover { border-color: var(--accent); }
.package-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.package-btn__price { font-size: 11.5px; color: var(--text-muted); }
.package-btn.is-on .package-btn__price { color: rgba(255, 255, 255, .85); }

/* Archiv-Unterordner */
.archive-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }

/* Arbeitsvorrat auf der Übersicht */
.grid--queues { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.queue .panel__title { font-size: 12.5px; }
.queue--empty { opacity: .6; }

/* Anklickbare Kacheln auf der Übersicht */
.panel--clickable { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.panel--clickable:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.queue .panel__title { cursor: pointer; }

/* Wiederholter Durchlauf durch denselben Schritt */
.chip--repeat { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* Pflichtfeld-Hinweis */
.field-hint { margin: 2px 0 0; font-size: 11.5px; color: var(--amber); font-weight: 600; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Prozess-Kennzeichen (z. B. "Entwurf vor Anruf") */
.chip--mark { color: #fff; font-weight: 700; }

/* Telefonie */
.card__phone { font-size: 12.5px; font-weight: 600; }
.card__phone a { color: var(--accent); text-decoration: none; }
.card__phone a:hover { text-decoration: underline; }
.col__later {
  border: 1px dashed var(--border-strong); background: none; border-radius: 10px;
  padding: 8px; font-size: 12px; color: var(--text-muted); cursor: pointer;
}
.col__later:hover { border-color: var(--accent); color: var(--accent); }

/* Notizen im Verlauf: Vorschau auf zwei Zeilen, per Klick aufklappbar */
.tl-note {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: pre-line; cursor: pointer;
}
.tl-note.is-open { display: block; -webkit-line-clamp: unset; }
.tl-note strong { font-weight: 700; }
.tl-more {
  display: none; border: 0; background: none; padding: 1px 0 0; cursor: pointer;
  font-size: 11.5px; font-weight: 600; color: var(--accent);
}
.tl-more.is-visible { display: inline-block; }
.tl-more:hover { text-decoration: underline; }

/* ============ Anmeldung ============ */
.auth-wrap {
  position: relative; min-height: 100%; display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg);
}
.auth-stage {
  position: relative; display: flex; align-items: center; justify-content: center; padding: 32px 20px;
  background: radial-gradient(60% 50% at 85% 8%, var(--accent-soft), transparent 70%);
}

/* Markenfläche links */
.auth-hero {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 22px; overflow: hidden;
  padding: 56px clamp(32px, 6vw, 88px); color: #fff;
  background: radial-gradient(120% 90% at 0% 0%, #6366f1 0%, #4f46e5 42%, #2e2a7a 100%);
}
.auth-hero::before, .auth-hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none;
  animation: auth-drift 19s ease-in-out infinite alternate;
}
.auth-hero::before { width: 380px; height: 380px; background: #22d3ee; opacity: .32; top: -140px; right: -90px; }
.auth-hero::after { width: 340px; height: 340px; background: #a78bfa; opacity: .5; bottom: -130px; left: -70px; animation-duration: 24s; animation-delay: -7s; }
@keyframes auth-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-46px, 34px, 0) scale(1.18); } }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero__grid {
  position: absolute !important; inset: 0; z-index: 0 !important; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .2) 1px, transparent 1px); background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at 25% 30%, #000, transparent 72%); mask-image: radial-gradient(ellipse at 25% 30%, #000, transparent 72%);
}
.auth-hero__brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.auth-hero__mark {
  position: relative; overflow: hidden; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; color: #4f46e5; font-size: 22px; font-weight: 800; box-shadow: 0 8px 24px rgba(15, 12, 60, .35);
}
.auth-hero__mark::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-130%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .35), transparent);
  animation: auth-shine 6s ease-in-out 1.2s infinite;
}
@keyframes auth-shine { 0%, 70% { transform: translateX(-130%) skewX(-20deg); } 100% { transform: translateX(130%) skewX(-20deg); } }
.auth-hero__title { margin: 6px 0 0; max-width: 15em; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.1; letter-spacing: -.03em; }
.auth-hero__text { margin: 0; max-width: 30em; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .78); }

/* Pipeline-Animation */
.flow { display: flex; align-items: center; margin-top: 34px; max-width: 560px; padding-bottom: 26px; }
.flow__node { position: relative; display: block; flex: none; width: 14px; height: 14px; }
.flow__node i { display: block; width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, .26); transition: background .35s, transform .35s; }
.flow__node b {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 11.5px; font-weight: 600; letter-spacing: .03em; color: rgba(255, 255, 255, .5); transition: color .35s;
}
.flow__node.is-on i { background: #fff; transform: scale(1.12); animation: flow-pulse 1s ease-out; }
.flow__node.is-on b { color: #fff; }
@keyframes flow-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 100% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); } }
.flow__line { position: relative; flex: 1; min-width: 20px; height: 2px; margin: 0 6px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .2); }
.flow__line::after {
  content: ''; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, #fff, #a5f3fc); transition: transform .7s cubic-bezier(.4, 0, .2, 1);
}
.flow__line.is-on::after { transform: scaleX(1); }

/* Karte */
.auth-card {
  position: relative; width: min(424px, 100%); overflow: hidden; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-md), 0 24px 60px -24px rgba(79, 70, 229, .28); padding: 30px;
}
.auth-card.is-entering { animation: auth-in .55s cubic-bezier(.2, .8, .2, 1) both; }
.auth-card.is-entering > * { animation: auth-rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.auth-card.is-entering > :nth-child(1) { animation-delay: .04s; }
.auth-card.is-entering > :nth-child(2) { animation-delay: .09s; }
.auth-card.is-entering > :nth-child(3) { animation-delay: .14s; }
.auth-card.is-entering > :nth-child(4) { animation-delay: .19s; }
.auth-card.is-entering > :nth-child(n+5) { animation-delay: .24s; }
@keyframes auth-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes auth-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.auth-card.is-shaking { animation: auth-shake .45s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes auth-shake {
  10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); }
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-brand__name { color: var(--text); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.auth-title { margin: 0 0 6px; font-size: 22px; letter-spacing: -.025em; }
.auth-sub { margin: 0 0 20px; color: var(--text-muted); font-size: 13.5px; line-height: 1.55; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .field input:not(.otp__input) { padding: 10px 12px; border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.auth-error { color: var(--red); font-size: 13px; }
.auth-error:empty { display: none; }
.auth-error:not(:empty) { background: var(--red-soft); border-radius: 8px; padding: 8px 10px; animation: auth-rise .25s ease-out both; }
.auth-notice { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 14px; }
.auth-form .auth-notice { margin-bottom: 0; }
.auth-link {
  background: none; border: 0; color: var(--accent); cursor: pointer; padding: 2px 0;
  font: inherit; font-size: 13px; text-align: left;
}
.auth-link:hover { text-decoration: underline; }
.auth-steps { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.auth-details { font-size: 13px; }
.auth-details summary { cursor: pointer; color: var(--accent); }
.auth-row { display: flex; gap: 8px; margin: 12px 0; }
.auth-check { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0 14px; cursor: pointer; }
.field-hint { font-size: 11px; color: var(--text-soft); }
.field-hint.is-ok { color: var(--green); }
.btn--block { width: 100%; justify-content: center; }
.auth-card .btn--primary { padding-block: 10px; border-radius: 10px; transition: transform .15s, box-shadow .15s, background .15s; }
.auth-card .btn--primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .7); }
.auth-card .btn--primary:not(:disabled):active { transform: translateY(0); }

/* Ladekreis im Knopf */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: auth-spin .7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Erfolg: Haken */
.auth-card.is-success > :not(.auth-success) { opacity: 0; transition: opacity .25s; }
.auth-success { position: absolute; inset: 0; display: grid; place-items: center; }
.auth-success__tick {
  position: relative; width: 68px; height: 68px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); animation: auth-pop .5s cubic-bezier(.2, 1.4, .4, 1) both, auth-ring 1s ease-out .15s both;
}
.auth-success__tick::after {
  content: ''; position: absolute; left: 24px; top: 14px; width: 15px; height: 28px;
  border: solid #fff; border-width: 0 5px 5px 0; border-radius: 1px; transform: rotate(45deg);
}
@keyframes auth-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes auth-ring { to { box-shadow: 0 0 0 26px rgba(22, 163, 74, 0); } }

/* Code-Eingabe mit sechs Feldern */
.otp { position: relative; }
.otp__boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp__box {
  display: grid; place-items: center; height: 54px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg-elev);
  font: 600 22px ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.otp__box.is-filled { border-color: var(--accent); background: var(--accent-soft); animation: otp-pop .18s ease-out; }
.otp__box.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.otp__box.is-active:not(.is-filled)::after { content: ''; width: 2px; height: 22px; border-radius: 1px; background: var(--accent); animation: otp-blink 1s steps(1) infinite; }
@keyframes otp-pop { from { transform: scale(.88); } to { transform: scale(1); } }
@keyframes otp-blink { 50% { opacity: 0; } }
.field .otp__input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; opacity: 0; font-size: 16px; cursor: text; }
.field .otp.is-plain .otp__input {
  position: static; height: auto; opacity: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elev); font-size: 17px; letter-spacing: .1em; text-transform: uppercase;
}
.otp.is-plain .otp__boxes { display: none; }

/* QR-Code mit Scan-Linie */
.qr-box { display: flex; justify-content: center; }
.qr-frame { position: relative; overflow: hidden; border-radius: 12px; background: #fff; padding: 10px; border: 1px solid var(--border); }
.qr-frame img { display: block; }
.qr-scan {
  position: absolute; left: 8px; right: 8px; top: 10px; height: 3px; border-radius: 2px; pointer-events: none;
  height: 2px; opacity: .55; background: linear-gradient(90deg, transparent, #6366f1, transparent); box-shadow: 0 0 8px 1px rgba(99, 102, 241, .35);
  animation: qr-scan 2.6s ease-in-out infinite alternate;
}
@keyframes qr-scan { from { transform: translateY(0); } to { transform: translateY(206px); } }
.secret-box {
  font-family: ui-monospace, Menlo, monospace; font-size: 13px; letter-spacing: .04em; word-break: break-all;
  background: var(--bg-sunken); border-radius: 8px; padding: 10px; margin: 8px 0;
}

/* Wiederherstellungscodes erscheinen nacheinander */
.codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.code-item {
  font-family: ui-monospace, Menlo, monospace; font-size: 14px; letter-spacing: .06em; text-align: center;
  background: var(--bg-sunken); border-radius: 8px; padding: 8px; animation: auth-rise .4s cubic-bezier(.2, .8, .2, 1) both;
}
.codes-grid .code-item:nth-child(1) { animation-delay: 0.23s; }
.codes-grid .code-item:nth-child(2) { animation-delay: 0.28s; }
.codes-grid .code-item:nth-child(3) { animation-delay: 0.33s; }
.codes-grid .code-item:nth-child(4) { animation-delay: 0.38s; }
.codes-grid .code-item:nth-child(5) { animation-delay: 0.43s; }
.codes-grid .code-item:nth-child(6) { animation-delay: 0.48s; }
.codes-grid .code-item:nth-child(7) { animation-delay: 0.53s; }
.codes-grid .code-item:nth-child(8) { animation-delay: 0.58s; }
.codes-grid .code-item:nth-child(9) { animation-delay: 0.63s; }
.codes-grid .code-item:nth-child(10) { animation-delay: 0.68s; }

/* Schmale Bildschirme: nur die Karte, Marke oben in der Karte */
@media (max-width: 899px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-stage { min-height: 100vh; padding: 24px 16px; }
}
@media (min-width: 900px) {
  .auth-card .auth-brand { display: none; }
}

/* Reduzierte Bewegung: keine Animationen */
@media (prefers-reduced-motion: reduce) {
  .auth-wrap *, .auth-wrap *::before, .auth-wrap *::after { animation: none !important; transition: none !important; }
}

/* Benutzerbereich in der Seitenleiste */
.userbox { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.userbox__avatar { width: 30px; height: 30px; font-size: 12px; flex: none; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.userbox__text { min-width: 0; }
.userbox__name { color: #d6d9e6; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbox__role { color: var(--sidebar-muted); font-size: 11px; }
.userbox__actions { display: flex; gap: 6px; }
.userbox__btn { color: var(--sidebar-muted); border: 1px solid #262a36; flex: 1; justify-content: center; }
.userbox__btn:hover { color: #fff; }
.modal--wide { width: min(720px, 100%); }
.panel--wide { grid-column: 1 / -1; }
.badge--ok { background: var(--green-soft); color: var(--green); }

.row-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; min-width: 150px; }

/* ============ Telefonleitfaden ============ */
.card__guide-row { margin-top: 7px; display: flex; }
.card__guide {
  border: 1px solid var(--border); background: var(--accent-soft); color: var(--accent);
  border-radius: 7px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.card__guide:hover { border-color: var(--accent); }
.action-btn--guide { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.action-btn--guide .action-btn__arrow { font-size: 10.5px; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; opacity: .7; }

.guide-overlay { place-items: start center; padding: 3vh 16px; z-index: 65; }
.guide-modal {
  background: var(--bg-elev); border-radius: 16px; box-shadow: var(--shadow-lg);
  width: min(820px, 100%); max-height: 94vh; display: flex; flex-direction: column; overflow: hidden;
}
.guide-modal__head { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px 10px; border-bottom: 1px solid var(--border); }
.guide-modal__stages { display: flex; gap: 6px; flex-wrap: wrap; }
.guide-modal__title { margin: 6px 0 4px; font-size: 18px; letter-spacing: -.02em; }
.guide-modal__who { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; align-items: baseline; }
.guide-modal__objections {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px; align-items: center;
  background: var(--bg-sunken); border-bottom: 1px solid var(--border);
}
.guide-modal__objections:empty { display: none; }
.guide-modal__label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); margin-right: 2px; }
.objection-btn {
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text);
  border-radius: 20px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.objection-btn:hover { border-color: var(--amber); color: var(--amber); }
.objection-btn.is-on { background: var(--amber); border-color: var(--amber); color: #fff; font-weight: 600; }
.guide-modal__body { flex: 1; overflow-y: auto; padding: 16px 22px 24px; }
.guide-modal__foot { display: flex; gap: 10px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--border); }
.guide-back { margin-bottom: 10px; }
.guide-objection-title { margin: 4px 0 10px; font-size: 16px; color: var(--amber); }

.guide-goal { background: var(--green-soft); color: var(--text); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; margin-bottom: 6px; }
.guide-text { font-size: 14px; line-height: 1.55; }
.guide-text h4 { margin: 18px 0 6px; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: var(--text-muted); }
.guide-text p { margin: 6px 0; }
.guide-text ul { margin: 4px 0 8px; padding-left: 20px; }
.guide-text li { margin: 3px 0; }
.guide-say {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 7px 12px; margin: 6px 0; border-radius: 0 8px 8px 0; font-size: 14.5px;
}
.ph { border-radius: 5px; padding: 0 4px; font-weight: 600; }
.ph--filled { background: var(--green-soft); color: var(--green); }
.ph--missing { background: var(--amber-soft); color: var(--amber); }
.ph--preview { background: var(--blue-soft); color: #2563eb; font-weight: 500; font-size: .92em; }
.ph--btn { border: 0; cursor: pointer; font-family: inherit; font-size: 11.5px; padding: 2px 6px; }
.guide-technique { margin-top: 16px; font-size: 13px; }
.guide-technique summary { cursor: pointer; color: var(--text-muted); font-weight: 600; }

/* Bereich Leitfaden */
.guides-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.guides-nav {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px; position: sticky; top: 0; max-height: calc(100vh - 110px); overflow-y: auto;
}
.guides-nav__head {
  display: flex; align-items: center; justify-content: space-between; margin: 16px 0 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-soft);
}
.guides-nav__item {
  display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; border: 0; background: none;
  padding: 7px 9px; border-radius: 8px; cursor: pointer; font-family: inherit; color: var(--text);
}
.guides-nav__item:hover { background: var(--bg-sunken); }
.guides-nav__item.is-on { background: var(--accent-soft); color: var(--accent); }
.guides-nav__title { font-size: 13px; font-weight: 600; }
.guides-nav__sub { font-size: 11px; color: var(--text-muted); }
.guides-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.guides-savebar {
  display: flex; align-items: center; gap: 8px; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 8px 12px; position: sticky; top: 0; z-index: 2;
}
.guide-editor { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.guide-editor__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.guide-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.guide-source { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; min-height: 360px; }
.guide-preview { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; max-height: 620px; overflow-y: auto; background: var(--bg); }
.guide-help { display: flex; flex-direction: column; gap: 5px; margin-bottom: 4px; }
.guide-help__ph { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.guide-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-chip {
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text-muted);
  border-radius: 20px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.guide-chip.is-call { color: var(--text); }
.guide-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.guide-chip__owner { opacity: .7; font-weight: 400; }
@media (max-width: 1000px) {
  .guides-layout { grid-template-columns: 1fr; }
  .guides-nav { position: static; max-height: none; }
  .guide-split { grid-template-columns: 1fr; }
}
.guides-savebar__inner { display: flex; align-items: center; gap: 8px; width: 100%; }
.guides-nav__add {
  width: 100%; margin-top: 6px; padding: 7px 9px; border: 1px dashed var(--border-strong); border-radius: 8px;
  background: none; color: var(--accent); font-weight: 600; font-size: 12.5px; cursor: pointer; font-family: inherit; text-align: left;
}
.guides-nav__add:hover { border-color: var(--accent); background: var(--accent-soft); }
.guide-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 18px; border-bottom: 1px solid var(--border); }
.guide-tab {
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text-muted);
  border-radius: 8px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.guide-tab.is-on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ============ Anrufmodus ============ */
.callmode-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 20px;
  background: var(--green-soft); border-bottom: 1px solid var(--border);
}
.callmode-bar__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.callmode-drawer {
  background: var(--green-soft); border-radius: 10px; padding: 9px 11px; margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.callmode-drawer__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.callmode-drawer__progress { height: 4px; background: var(--bg-elev); border-radius: 3px; overflow: hidden; }
.callmode-drawer__progress i { display: block; height: 100%; background: var(--green); transition: width .3s; }

/* ============ Zuständigkeit ============ */
.owner-filter { display: inline-flex; gap: 6px; align-items: center; }
.owner-select {
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); border-radius: 8px;
  padding: 4px 8px; font: inherit; font-size: 12.5px;
}
.owner-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.owner-row__by { flex-basis: 100%; }
.tl-author { color: var(--text-muted); font-weight: 650; }

/* Leitfäden: eigene Version / Master */
.guides-scope { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.guides-scope--master { background: var(--amber-soft); border-color: var(--amber); }
.guides-scope__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guides-scope__tabs { padding: 0; border: 0; }

/* =====================================================================
   Gesamtdesign: gleiche Sprache wie die Anmeldung (Verlauf, Glow, sanfte Bewegung)
   ===================================================================== */
:root {
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 48%, #7c3aed 100%);
  --shadow-glow: 0 10px 26px -12px rgba(79, 70, 229, .65);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* Tastaturfokus gut sichtbar */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.card:focus-visible, .panel--clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.search input:focus-visible { outline: 0; }

/* ---------- Seitenleiste ---------- */
.sidebar {
  position: relative; isolation: isolate; overflow-x: hidden;
  background: radial-gradient(130% 55% at 0% 0%, #1c1f4c 0%, transparent 60%), linear-gradient(180deg, #12141d, #0d0f17);
}
.sidebar::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .9;
  background-image: radial-gradient(rgba(255, 255, 255, .075) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%); mask-image: linear-gradient(180deg, #000, transparent 55%);
}
.sidebar::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none; width: 260px; height: 260px; left: -120px; top: -100px;
  border-radius: 50%; background: #6366f1; filter: blur(72px); opacity: .3; animation: auth-drift 22s ease-in-out infinite alternate;
}
.brand__mark {
  position: relative; overflow: hidden; background: var(--brand-gradient); box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .9);
}
.brand__mark::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-130%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: auth-shine 7s ease-in-out 1.5s infinite;
}
.nav-item { position: relative; transition: background .18s, color .18s, transform .2s var(--ease); }
.nav-item > span:first-child { transition: transform .22s var(--ease); }
.nav-item:hover { transform: translateX(2px); }
.nav-item:hover > span:first-child, .nav-item.is-active > span:first-child { transform: scale(1.14); }
.nav-item::before {
  content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand-gradient); transform: scaleY(0); transition: transform .25s var(--ease);
}
.nav-item.is-active::before { transform: scaleY(1); }
.nav-item.is-active { background: linear-gradient(90deg, rgba(99, 102, 241, .32), rgba(99, 102, 241, .1)); box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .22); }
.userbox__avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }

/* ---------- Kopfzeile und Hintergrund ---------- */
.main { background: radial-gradient(55% 26% at 86% 0%, var(--accent-soft), transparent 72%), var(--bg); }
.topbar { position: relative; }
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent); opacity: .3;
}

/* ---------- Ansichtswechsel ---------- */
.view-enter { animation: view-in .38s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-enter .grid--kpi > *, .view-enter .grid--queues > *, .view-enter .grid--2 > *, .view-enter .col__body > .card {
  animation: auth-rise .5s var(--ease) both;
}
.view-enter .grid--kpi > :nth-child(1) { animation-delay: 0.03s; }
.view-enter .grid--kpi > :nth-child(2) { animation-delay: 0.06s; }
.view-enter .grid--kpi > :nth-child(3) { animation-delay: 0.09s; }
.view-enter .grid--kpi > :nth-child(4) { animation-delay: 0.12s; }
.view-enter .grid--kpi > :nth-child(5) { animation-delay: 0.15s; }
.view-enter .grid--kpi > :nth-child(6) { animation-delay: 0.18s; }
.view-enter .grid--kpi > :nth-child(7) { animation-delay: 0.21s; }
.view-enter .grid--kpi > :nth-child(8) { animation-delay: 0.24s; }
.view-enter .grid--queues > :nth-child(1), .view-enter .grid--2 > :nth-child(1) { animation-delay: 0.24s; }
.view-enter .grid--queues > :nth-child(2), .view-enter .grid--2 > :nth-child(2) { animation-delay: 0.28s; }
.view-enter .grid--queues > :nth-child(3), .view-enter .grid--2 > :nth-child(3) { animation-delay: 0.32s; }
.view-enter .grid--queues > :nth-child(4), .view-enter .grid--2 > :nth-child(4) { animation-delay: 0.36s; }
.view-enter .grid--queues > :nth-child(5), .view-enter .grid--2 > :nth-child(5) { animation-delay: 0.40s; }
.view-enter .grid--queues > :nth-child(6), .view-enter .grid--2 > :nth-child(6) { animation-delay: 0.44s; }
.view-enter .grid--queues > :nth-child(7), .view-enter .grid--2 > :nth-child(7) { animation-delay: 0.48s; }
.view-enter .grid--queues > :nth-child(8), .view-enter .grid--2 > :nth-child(8) { animation-delay: 0.52s; }
.view-enter .col__body > .card:nth-child(1) { animation-delay: 0.16s; }
.view-enter .col__body > .card:nth-child(2) { animation-delay: 0.21s; }
.view-enter .col__body > .card:nth-child(3) { animation-delay: 0.26s; }
.view-enter .col__body > .card:nth-child(4) { animation-delay: 0.30s; }
.view-enter .col__body > .card:nth-child(5) { animation-delay: 0.34s; }
.view-enter .col__body > .card:nth-child(6) { animation-delay: 0.39s; }
.view-enter .funnel__bar i { transform-origin: left; animation: bar-grow .8s var(--ease) .3s both; }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Karten, Flächen, Schaltflächen ---------- */
.card { transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md), 0 12px 28px -16px rgba(79, 70, 229, .4); }
.card.is-selected { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-glow); }
.panel { transition: border-color .18s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.panel--clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md), 0 12px 28px -16px rgba(79, 70, 229, .35); }
.grid--kpi .panel:hover { border-color: var(--accent); }
.btn { transition: background .15s, border-color .15s, transform .15s var(--ease), box-shadow .2s var(--ease); }
.btn--primary { background: var(--brand-gradient); border-color: transparent; }
.btn--primary:hover { filter: none; transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn--primary:active { transform: translateY(0); box-shadow: none; }
.seg button { transition: background .18s, color .18s, box-shadow .18s; }

/* ---------- Dialoge, Detailansicht, Hinweise ---------- */
.modal { animation: modal-in .3s var(--ease) both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.975); } to { opacity: 1; transform: none; } }
.modal-overlay, .drawer-backdrop { animation-duration: .2s; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.drawer { animation: slide .32s var(--ease) both; box-shadow: var(--shadow-lg), -24px 0 60px -30px rgba(79, 70, 229, .35); }
@keyframes slide { from { transform: translateX(36px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { animation: toast-in .38s cubic-bezier(.2, 1.2, .3, 1) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Reduzierte Bewegung (gilt für die gesamte App) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
