/* ====== Schriften: selbst gehostet, wie auf 360sec.de ====== */
@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url("../assets/fonts/roboto-flex-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url("../assets/fonts/roboto-flex-latin-wght-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Staatliches";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("../assets/fonts/staatliches-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Staatliches";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("../assets/fonts/staatliches-latin-400-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ====== Farben pro Theme ====== */
/* Hell ist Standard und orientiert sich an der hellen Seite /webapps der Webseite.
   Dunkel (<html data-theme="dark">) nutzt die Werte aus global.scss. */
:root {
  color-scheme: light;
  --bg: #ffffff;            /* Hintergrund /webapps */
  --surface: #f8f9fb;       /* Karten auf /webapps */
  --surface-2: #f1f2f5;     /* Eingabefelder, Tabellenköpfe */
  --ink: #060508;           /* --color-dark-primary */
  --ink-soft: #3a4150;      /* Fließtext auf /webapps */
  --muted: #5b6472;         /* Nebentext auf /webapps, mind. 5,3:1 */
  --placeholder: #5b6472;
  --line: #e8eaef;          /* Kartenränder auf /webapps */
  --line-strong: #80858f;   /* Ränder von Bedienelementen, mind. 3:1 zum Hintergrund */
  --pink: #e72c63;          /* --color-primary, einziger Akzent (Ränder, Icons, Fokus) */
  --pink-strong: #de285e;   /* Pinkflächen mit weißer Schrift (4,6:1) */
  --pink-text: #d01f55;     /* pinke Schrift auf hellem Grund (5,2:1) */
  --on-pink: #ffffff;       /* Schrift auf Pinkflächen */
  --pink-ink: var(--ink);   /* Schrift auf pink getönten Flächen */
  --pink-tint: rgba(231, 44, 99, 0.15); /* Fokusring wie im Kontaktformular der Webseite */
  --pink-soft: rgba(231, 44, 99, 0.08); /* Hover der Themen-Chips auf der Webseite */
  --danger: #c82333;
  --danger-line: #dc3545;   /* --color-danger */
  --danger-soft: rgba(220, 53, 69, 0.08);
  --danger-border: rgba(220, 53, 69, 0.45);
  --ok: #28a745;            /* --color-success */
  --ok-soft: rgba(40, 167, 69, 0.1);
  --ok-border: rgba(40, 167, 69, 0.45);
  --warn-line: #b88427;     /* Rand "bin unsicher" an Trunk-Karten */
  --chip-x-bg: rgba(6, 5, 8, 0.08);
  --overlay: rgba(6, 5, 8, 0.5);
  --shadow-sm: 0 1px 2px rgba(6, 5, 8, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* .card der Webseite */
  /* Navigation: die Pille bleibt dunkel, auch auf hellem Grund (wie auf /webapps) */
  --nav-pill: #060508;
  --nav-pill-ink: #f9f9f9;
  --nav-pill-hover: rgba(249, 249, 249, 0.1);
  --nav-ink: #060508;       /* Telefonnummer und runde Icon-Knöpfe neben der Pille */
  --nav-shadow: 0 1px 1px rgba(0, 0, 0, 0.07), 0 2px 2px rgba(0, 0, 0, 0.07), 0 4px 4px rgba(0, 0, 0, 0.07), 0 8px 8px rgba(0, 0, 0, 0.07), 0 16px 16px rgba(0, 0, 0, 0.07);
  /* Anrufflussdiagramm: je Knotenart Rand und Fläche */
  --flow-hours: #b88427;
  --flow-hours-fill: #fbf3e4;
  --flow-routing-fill: #fdebf1;
  --flow-ivr: #4a8cd6;
  --flow-ivr-fill: #e9f1fb;
  --flow-dept: #2a9c77;
  --flow-dept-fill: #e5f4ee;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060508;            /* --color-dark-primary */
  --surface: #0f0e12;       /* Karten (wie rgba(255,255,255,.04) auf --bg) */
  --surface-2: #18171b;     /* Eingabefelder, Tabellenköpfe */
  --ink: #f9f9f9;           /* --color-white */
  --ink-soft: #d4d4d6;
  --muted: #a9a9a9;         /* --color-medium-gray */
  --placeholder: #8e8d91;
  --line: #2a292d;          /* Trennlinien und Kartenränder */
  --line-strong: #67666a;   /* Ränder von Bedienelementen, mind. 3:1 zum Hintergrund */
  --pink-text: #e72c63;     /* 4,8:1 auf --bg */
  --danger: #ff6b7a;
  --danger-soft: rgba(220, 53, 69, 0.12);
  --ok-soft: rgba(40, 167, 69, 0.12);
  --warn-line: #8a6a1c;
  --chip-x-bg: rgba(255, 255, 255, 0.12);
  --overlay: rgba(6, 5, 8, 0.82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --nav-ink: #f9f9f9;
  --flow-hours-fill: #3a2b0d;
  --flow-routing-fill: #2a0d17;
  --flow-ivr-fill: #142238;
  --flow-dept-fill: #102620;
}

/* ====== Typografie und Abstände: berechnete Werte von 360sec.de ====== */
:root {
  --radius: 7px;            /* --border-radius */
  --radius-lg: 14px;        /* --border-radius-big */
  --radius-pill: 50px;      /* Themen-Chips */
  --font-sans: "Roboto Flex", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Staatliches", var(--font-sans);
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  --fs-body: 1rem;          /* 16px, body */
  --fs-lead: 1.1rem;        /* 17,6px, Absätze (p, .pagecontent) */
  --fs-control: 0.95rem;    /* 15,2px, Eingabefelder und Kartenwerte */
  --fs-chip: 0.85rem;       /* 13,6px, Themen-Chips */
  --fs-small: 0.8rem;       /* 12,8px, Zustimmungstext */
  --fs-caption: 0.75rem;    /* 12px, Kartenbeschriftung */
  --lh-text: 1.6;           /* Absätze */
  --lh-ui: normal;          /* Beschriftungen, Felder, Knöpfe, Chips */
  --lh-title: 1;            /* große Überschriften */
  --lh-heading: 1.05;       /* kleinere Überschriften (h2 auf /webapps) */
  --fw-title: 700;          /* h1 bis h3 der Webseite */
  --space-xs: 4px;          /* Abstände aus global.scss */
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --gap-title: 2rem;        /* Seitenüberschrift bis Text (h1 margin-bottom) */
  --gap-subtitle: 1rem;     /* Zwischenüberschrift bis Text (h2 bis Untertitel) */
  --gap-card-title: 0.75rem;/* Kartenüberschrift bis Text (h3) */
  --gap-text: 2rem;         /* Absatz bis nächster Block (p margin-bottom) */
  --gap-block: 3rem;        /* zwischen Formularblöcken (.contact-options) */
  --gap-label: 0.75rem;     /* Beschriftung bis Feld (.step-label) */
  --gap-row: 0.9rem;        /* Felder nebeneinander und untereinander (.kontakt-form) */
  --gap-field: 2rem;        /* zwischen beschrifteten Feldgruppen (Trenner mit 1,25rem je Seite) */
  --gap-chip: 0.5rem;       /* Chips */
  --gap-card: 1rem;         /* Karten (.contact-info-cards) */
  --pad-control: 0.75rem 1rem; /* Eingabefelder */
  --pad-chip: 0.5rem 1rem;
  --pad-btn: calc(0.9rem - 2px) calc(2rem - 2px); /* .submit-btn, abzüglich 2px Rand */
  --pad-btn-sm: calc(0.5rem - 2px) calc(1rem - 2px); /* .btn aus global.scss */
  --pad-card: 1.5rem;       /* .form-card-body */
  --pad-card-sm: 1rem 1.25rem; /* .info-card */
  --pad-page-top: var(--space-xl); /* erster Block unter der Kopfzeile */
  --pad-section-end: 8rem;  /* .kontakt-form-section unten */
  --gutter: 20px;           /* Seitenrand mobil (.centerMid 90 % bei 390px) */
}
@media (max-width: 768px) {
  :root { --pad-page-top: var(--space-lg); --pad-section-end: 6rem; }
}
@media (max-width: 480px) {
  :root { --pad-card: 1.25rem; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
/* Lucide-Icons (XsecIcon) */
.xicon { display: inline-block; flex-shrink: 0; vertical-align: -0.15em; }
::placeholder { color: var(--placeholder); opacity: 1; }

/* ====== Hauptnavigation wie nav.svelte (Desktop) und navMobile.svelte (bis 1024px) ====== */
.xnav { padding: 1rem 2rem; background: var(--bg); }
.xnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
/* Logo wie auf der Webseite: Grundlogo plus darübergelegtes X (logo-base, logo-transform) */
.xnav-logo { position: relative; display: block; width: 121.5px; height: 40px; flex-shrink: 0; overflow: hidden; }
.xnav-logo img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.xnav-logo-transform { z-index: 1; }
/* Schwarzes Logo auf hellem Grund, weißes auf dunklem Grund */
.xnav-logo .on-light { display: none; }
:root:not([data-theme="dark"]) .xnav-logo .on-light { display: block; }
:root:not([data-theme="dark"]) .xnav-logo .on-dark { display: none; }
/* Dunkle Pille ohne Rahmen; auf dunklem Grund geht sie wie auf der Webseite in der Fläche auf */
.xnav-menu {
  display: flex;
  gap: 1rem;
  background: var(--nav-pill);
  border-radius: var(--radius);
  padding: 0.35rem;
}
.xnav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1rem;
  line-height: var(--lh-ui);
  color: var(--nav-pill-ink);
  background: transparent;
  border: 0;
  padding: 0.8rem 1.8rem;
  border-radius: calc(var(--radius) - 0.3rem);
  cursor: pointer;
  white-space: nowrap;
  transition: 0.25s ease;
}
.xnav-item:hover, .xnav-item:focus-visible { background: var(--nav-pill-ink); color: var(--nav-pill); }
.xnav-item.is-active { background: var(--pink-strong); color: var(--on-pink); }
.xnav-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.xnav-phone { color: var(--nav-ink); text-decoration: none; font-size: 13.333px; line-height: var(--lh-ui); padding: 1px 6px; white-space: nowrap; }
/* Runde Icon-Knöpfe (.action-item) */
.xnav-icon {
  width: 35px;
  height: 35px;
  border: 2px solid var(--nav-ink);
  border-radius: 100%;
  color: var(--nav-ink);
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}
.xnav-icon:hover, .xnav-icon:focus-visible { background: var(--nav-ink); color: var(--bg); }
.xnav-icon svg { width: 20px; height: 20px; transition: transform 0.3s ease; }
.xnav-icon:hover svg, .xnav-icon:focus-visible svg { transform: scale(1.1); }
.xnav-burger {
  display: none;
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--nav-pill-ink);
  cursor: pointer;
}
.xnav-burger span { position: absolute; left: 0; top: 14px; width: 100%; height: 2px; background: currentColor; border-radius: 2px; transition: all 0.3s ease; }
.xnav-burger span:nth-child(1) { transform: translateY(-8px); }
.xnav-burger span:nth-child(3) { transform: translateY(8px); }
.xnav.is-open .xnav-burger span:nth-child(1) { transform: rotate(45deg); }
.xnav.is-open .xnav-burger span:nth-child(2) { opacity: 0; }
.xnav.is-open .xnav-burger span:nth-child(3) { transform: rotate(-45deg); }

/* Abstufungen wie nav.svelte */
@media (max-width: 1536px) {
  .xnav-menu { gap: 0.5rem; }
  .xnav-item { padding: 0.8rem 1rem; }
}
@media (max-width: 1320px) {
  .xnav-menu { gap: 0.25rem; }
  .xnav-item { padding: 0.7rem 0.6rem; font-size: 0.9rem; }
}
@media (max-width: 1150px) {
  .xnav-phone { display: none; }
}
/* Mobil wie navMobile.svelte: dunkle Karte mit Logo, runden Icon-Knöpfen und Menüknopf */
@media (max-width: 1024px) {
  .xnav { padding: 1rem 1rem 0.5rem; }
  .xnav-inner {
    flex-wrap: wrap;
    gap: 0;
    background: var(--nav-pill);
    color: var(--nav-pill-ink);
    border-radius: 0.5rem;
    box-shadow: var(--nav-shadow);
    overflow: hidden;
  }
  /* In der dunklen Karte immer das weiße Logo */
  :root:not([data-theme="dark"]) .xnav-logo .on-light { display: none; }
  :root:not([data-theme="dark"]) .xnav-logo .on-dark { display: block; }
  .xnav-logo { margin-left: 1rem; }
  /* Kopfzeile 0,75rem 1rem plus Knopfleiste 1rem */
  .xnav-actions { gap: 1rem; padding: 1.75rem 2rem 1.75rem 1rem; }
  .xnav-icon { width: 34px; height: 34px; border-color: var(--nav-pill-ink); color: var(--nav-pill-ink); }
  .xnav-icon:hover, .xnav-icon:focus-visible { background: var(--nav-pill-ink); color: var(--nav-pill); }
  .xnav-burger { display: block; }
  .xnav-menu {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: 0;
  }
  .xnav.is-open .xnav-menu { display: flex; }
  .xnav-item { justify-content: flex-start; text-align: left; font-size: 1.2rem; padding: 1rem; border-radius: 0; }
  .xnav-item:not(.is-active):hover, .xnav-item:not(.is-active):focus-visible { background: var(--nav-pill-hover); color: var(--nav-pill-ink); }
  .xnav-item:focus-visible { outline-offset: -2px; }
}
@media (max-width: 768px) {
  .xnav { padding: 0.5rem 1.5rem; }
  .xnav-logo { margin-left: 0.95rem; }
  .xnav-actions { padding: 1.7rem 1.7rem 1.7rem 0.75rem; }
  .xnav-item { font-size: 1.3rem; }
}

/* ====== App shell ====== */
.app {
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
.app > .xnav { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }

/* ====== Sidebar ====== */
.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg);
  padding: var(--space-lg) 1.5rem 2.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.brand {
  display: flex;
  flex-direction: column;
  gap: var(--gap-label);
}
.brand-badge {
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  color: var(--muted);
}
.doc-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: var(--fw-title);
  line-height: var(--lh-heading);
  margin: 0;
  color: var(--ink);
}
.doc-sub {
  color: var(--muted);
  font-size: var(--fs-control);
  margin-top: var(--space-sm);
}

.progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.progress-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--pink);
  transition: width 300ms ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-caption);
  line-height: var(--lh-ui);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: var(--fs-control);
  line-height: 1.3;
}
.nav-item:hover { background: var(--ink); color: var(--bg); }
.nav-item:hover .nav-num { color: var(--bg); }
.nav-item.is-active { background: var(--pink-strong); color: var(--on-pink); }
.nav-num {
  font-size: var(--fs-caption);
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.nav-item.is-active .nav-num { color: var(--on-pink); }
/* Häkchen bei ausgefüllten Abschnitten */
.nav-check { display: inline-flex; color: var(--pink); }
.nav-item:hover .nav-check { color: var(--pink-strong); }
.nav-item.is-active .nav-check { color: var(--on-pink); }

/* Abschnittsliste und Hilfe: am Desktop immer sichtbar, mobil per Knopf aufklappbar */
.side-sections { display: flex; flex-direction: column; gap: var(--space-lg); }
.side-toggle { display: none; }
@media (max-width: 960px) {
  .side-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: var(--pad-control);
    font: inherit;
    font-size: 1rem;
    line-height: var(--lh-ui);
    font-weight: 600;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    cursor: pointer;
  }
  .side-toggle:hover { border-color: var(--ink); }
  .side-toggle[aria-expanded="true"] .xicon { transform: rotate(180deg); }
  .side-sections:not(.is-open) { display: none; }
}

.side-foot {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-control);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: var(--gap-label);
}
.side-foot a { color: var(--pink-text); text-decoration: none; }
.side-foot a:hover { text-decoration: underline; }
.save-state {
  font-size: var(--fs-small);
}

/* ====== Main content ====== */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* Zweite Zeile im Formular: Pfad, Modus-Umschalter, Übersicht */
.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
  padding: 0.75rem var(--space-lg);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
/* Pfad wie die Breadcrumb der Webseite: normale Schreibweise */
.crumbs {
  font-size: 14px;
  line-height: var(--lh-ui);
  color: var(--muted);
}
.crumbs .sep { margin: 0 8px; opacity: 0.6; }
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }

.content {
  max-width: 880px;
  padding: var(--pad-page-top) var(--space-lg) var(--pad-section-end);
  width: 100%;
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 1.5rem var(--gutter) var(--space-lg); }
  .content { padding: var(--pad-page-top) var(--gutter) var(--pad-section-end); }
  .topbar { padding: 0.75rem var(--gutter); }
}

/* Section header */
.section-head { margin-bottom: var(--gap-text); }
/* Fortschritt "Abschnitt x von y" als normaler kleiner Text */
.section-eyebrow {
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  color: var(--muted);
  margin-bottom: var(--gap-label);
}
.section-title {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: var(--lh-title);
  font-weight: var(--fw-title);
  margin: 0 0 var(--gap-title);
  color: var(--ink);
  text-wrap: balance;
}
.section-intro {
  color: var(--ink-soft);
  font-size: var(--fs-lead);
  line-height: var(--lh-text);
  max-width: 62ch;
  margin: 0;
  text-wrap: pretty;
}
@media (max-width: 560px) {
  .section-title { font-size: 36px; }
}

/* Fields */
.fields { display: flex; flex-direction: column; gap: var(--gap-field); }
.field { display: flex; flex-direction: column; gap: var(--gap-label); }
.field-label { display: flex; flex-direction: column; gap: var(--space-xs); }
.field-label-main {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
}
.field-label-main.small { font-size: var(--fs-small); color: var(--muted); font-weight: 500; }
.field-hint { font-size: var(--fs-control); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.field-error { font-size: var(--fs-control); line-height: 1.5; color: var(--danger); font-weight: 600; }
.req-star { color: var(--pink-text); margin-left: 4px; }

/* Eingabefelder wie das Kontaktformular der Webseite */
.input, .textarea, .select {
  width: 100%;
  padding: var(--pad-control);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  transition: border-color 120ms, box-shadow 120ms, background 120ms;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-tint);
}
.textarea { resize: vertical; min-height: 120px; font-family: inherit; line-height: 1.5; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select {
  border-color: var(--danger);
}

/* Radio cards */
.radio-group {
  display: grid;
  gap: var(--gap-chip);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.radio-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: var(--pad-control);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 120ms, background 120ms;
}
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card:hover { border-color: var(--ink); }
.radio-card:focus-within { outline: 2px solid var(--pink); outline-offset: 2px; }
/* Auswahl: voller Rahmen in Pink, Fläche bleibt neutral */
.radio-card.is-active {
  border-color: var(--pink);
  box-shadow: inset 0 0 0 1px var(--pink);
}
.radio-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: transparent;
  position: relative;
  flex-shrink: 0;
}
.radio-card.is-active .radio-dot { border-color: var(--pink); }
.radio-card.is-active .radio-dot::after {
  content: "";
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: var(--pink);
}
.radio-text { font-size: var(--fs-control); line-height: 1.35; color: var(--ink); }

/* Yes/No */
.yesno-group { display: flex; gap: var(--gap-chip); }
.yesno-btn {
  padding: var(--pad-btn);
  border: 2px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: var(--lh-ui);
  cursor: pointer;
  transition: border-color 120ms, background 120ms, color 120ms;
  min-width: 84px;
}
.yesno-btn:hover { border-color: var(--ink); }
.yesno-btn.yes.is-active { background: var(--pink-strong); border-color: var(--pink-strong); color: var(--on-pink); }
.yesno-btn.no.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Buttons wie .submit-btn / .btn-primary der Webseite, Hover invertiert */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--pad-btn);
  border-radius: var(--radius);
  border: 2px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: var(--lh-ui);
  cursor: pointer;
  text-decoration: none;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-primary {
  background: var(--pink-strong);
  border-color: var(--pink-strong);
  color: var(--on-pink);
}
.btn-primary:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-primary:disabled:hover { background: var(--pink-strong); border-color: var(--pink-strong); color: var(--on-pink); }
/* Kleine Knöpfe wie .btn aus global.scss (Kopfzeile, Seitenleiste) */
.topbar .btn, .side-foot .btn { padding: var(--pad-btn-sm); font-size: var(--fs-control); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ink:hover { background: transparent; color: var(--ink); }

/* Step nav */
.step-nav {
  margin-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--gap-row);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}

/* Helper / info boxes */
.info-box {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--pad-card-sm);
  border-radius: var(--radius);
  margin-bottom: var(--gap-text);
}
.info-box h4 {
  margin: 0 0 var(--space-sm);
  font-size: 1rem;
  line-height: var(--lh-ui);
  font-weight: 600;
  color: var(--ink);
}
.info-box p { margin: 0 0 var(--gap-label); font-size: var(--fs-control); color: var(--ink-soft); }
.info-box .rule {
  font-size: var(--fs-control);
  padding: var(--pad-control);
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--ink);
}

.legend {
  background: var(--surface);
  padding: var(--pad-card-sm);
  border-radius: var(--radius);
  font-size: var(--fs-control);
  margin-bottom: var(--gap-text);
  border: 1px solid var(--line);
}
.legend h4 {
  margin: 0 0 var(--gap-label);
  font-size: 1rem;
  line-height: var(--lh-ui);
  color: var(--ink);
  font-weight: 600;
}
.legend ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: var(--space-sm); }
.legend li { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.legend li strong { color: var(--ink); font-weight: 600; }
.legend li span { color: var(--muted); }
@media (max-width: 560px) {
  .legend li { grid-template-columns: 1fr; gap: 0; }
}

/* Users list */
.users-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
/* Schmale Bildschirme: Tabelle scrollt in sich, die Seite bleibt fest */
@media (max-width: 760px) {
  .users-list { overflow-x: auto; }
  .users-head, .users-row { min-width: 760px; }
}
.users-head, .users-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.6fr 1.2fr 1.4fr 1fr 84px;
  gap: 0;
  align-items: stretch;
}
.users-head {
  background: var(--surface-2);
  padding: 0.75rem 0;
  font-weight: 600;
  font-size: var(--fs-small);
  line-height: var(--lh-ui);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.users-head span { padding: 0 12px; border-right: 1px solid var(--line); }
.users-head span:last-child { border-right: none; }
.users-row { border-bottom: 1px solid var(--line); }
.users-row:last-child { border-bottom: none; }
.users-cell { padding: 0.75rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.users-cell:last-child { border-right: none; }
.users-cell.stack { gap: 2px; }
.users-cell.actions { flex-direction: row; gap: 4px; justify-content: center; }
.input-bare {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  padding: 4px 0;
  outline: none;
}
.input-bare:focus-visible { box-shadow: inset 0 -2px 0 0 var(--pink); }
.input-bare.muted { color: var(--muted); font-size: var(--fs-small); }
.input-bare:focus { color: var(--ink); }
.input-bare.is-invalid {
  color: var(--danger);
  box-shadow: inset 0 -1px 0 0 var(--danger);
}
.cell-error {
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
  margin-top: 2px;
  line-height: 1.2;
}
select.input-bare { cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 9px) center, calc(100% - 5px) center; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; padding-right: 16px; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 13px;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.icon-btn:hover { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.icon-btn:disabled:hover { color: var(--ink-soft); background: transparent; border-color: var(--line-strong); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }

.list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--pad-card-sm);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.count { font-size: var(--fs-control); color: var(--muted); }
.empty { padding: var(--pad-card); color: var(--muted); font-size: var(--fs-control); text-align: center; font-style: italic; }

/* Departments */
.dept-list { display: flex; flex-direction: column; gap: var(--gap-card); }
.dept-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--pad-card);
}
.dept-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: var(--gap-row);
}
.dept-remove { position: absolute; top: 10px; right: 10px; }
.field.inline { gap: var(--space-sm); }

/* IVR tree */
.ivr-tree { }
.ivr-root {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-lg);
  margin-bottom: 6px;
}
.ivr-root-icon {
  width: 35px; height: 35px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.ivr-root-title { font-weight: 600; font-size: 1rem; line-height: var(--lh-ui); }
.ivr-root-sub { font-size: var(--fs-control); color: var(--muted); }
.ivr-branches { display: flex; flex-direction: column; gap: 10px; padding-left: 22px; position: relative; }
.ivr-branches::before {
  content: "";
  position: absolute;
  left: 22px; top: 0; bottom: 22px;
  width: 1.5px;
  background: var(--line-strong);
}
.ivr-branch { display: grid; grid-template-columns: 40px 1fr; align-items: stretch; gap: 10px; position: relative; }
.ivr-connector {
  position: absolute;
  left: 0; top: 24px;
  width: 22px; height: 1.5px;
  background: var(--line-strong);
}
.ivr-key {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}
.key-input { text-align: center; font-weight: 600; font-size: 16px; color: inherit; }
.ivr-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--pad-card-sm);
  position: relative;
}
.ivr-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-row); padding-right: 32px; }
.ivr-card .icon-btn { position: absolute; top: 10px; right: 10px; }

/* Review / summary screen */
.review {
  display: flex; flex-direction: column; gap: var(--gap-card);
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--pad-card);
}
.review-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: var(--lh-heading);
  margin: 0 0 var(--gap-subtitle);
  font-weight: var(--fw-title);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.review-card h3 .num { font-family: var(--font-sans); font-size: var(--fs-control); font-weight: 400; color: var(--muted); }
.review-list { display: grid; grid-template-columns: 200px 1fr; gap: var(--gap-label) var(--space-md); font-size: var(--fs-control); line-height: 1.5; margin: 0; }
.review-list dt { color: var(--muted); }
.review-list dd { margin: 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-empty { color: var(--muted); font-style: italic; font-size: var(--fs-control); }
@media (max-width: 560px) {
  .review-list { grid-template-columns: 1fr; gap: 2px; }
  .review-list dd { margin-bottom: var(--gap-label); }
}

.submit-zone {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: var(--pad-card);
  border-radius: var(--radius-lg);
}
.submit-zone h3 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: var(--lh-heading);
  font-weight: var(--fw-title);
  margin: 0 0 var(--gap-subtitle);
  color: var(--ink);
}
.submit-zone p { margin: 0 0 var(--pad-card); font-size: 1rem; color: var(--ink-soft); }
.submit-actions { display: flex; flex-wrap: wrap; gap: var(--gap-row); }
@media (max-width: 560px) {
  .submit-actions .btn { width: 100%; }
}

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tweaks-panel h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks-row { display: flex; flex-direction: column; gap: 6px; }
.tweaks-row .tw-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tw-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.tw-chip {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
}
.tw-chip.is-active { background: var(--pink-strong); border-color: var(--pink-strong); color: var(--on-pink); }

/* Print view: hell, schwarze Schrift, ohne Navigation */
@media print {
  /* Druck bleibt in beiden Themes hell */
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #fff;
    --surface: #fff;
    --surface-2: #f3f3f3;
    --ink: #000;
    --ink-soft: #222;
    --muted: #555;
    --placeholder: #555;
    --line: #ccc;
    --line-strong: #999;
    --pink-text: #d01f55;
    --pink-soft: #fff;
    --danger: #c82333;
    --flow-hours-fill: #fbf3e4;
    --flow-routing-fill: #fdebf1;
    --flow-ivr-fill: #e9f1fb;
    --flow-dept-fill: #e5f4ee;
  }
  .xnav, .story-top, .sidebar, .topbar, .tweaks-panel, .step-nav, .submit-zone, .defaults-banner, .welcome-overlay { display: none !important; }
  .app { display: block; }
  .content { max-width: none; padding: 20px; }
  .review-card { break-inside: avoid; page-break-inside: avoid; box-shadow: none; border-color: var(--line); }
  body { background: var(--bg); color: var(--ink); }
}

/* ====== Warn box ====== */
.warn-box {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--pad-card-sm);
  border-radius: var(--radius);
  margin-bottom: var(--gap-text);
  font-size: var(--fs-control);
  color: var(--ink-soft);
}

/* ====== Multi-chip select ====== */
.multichip { position: relative; width: 100%; }
.multichip-trigger {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 14px 4px 0;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--ink);
  position: relative;
}
.multichip-trigger .caret { color: var(--muted); font-size: 10px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 3px; }
.chip {
  background: var(--pink-soft);
  color: var(--pink-ink);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  border: 1px solid var(--pink-tint);
}
.muted-text { color: var(--muted); font-style: italic; font-size: 12.5px; }
.multichip-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.multichip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.75rem;
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink);
}
.multichip-item:hover { background: var(--surface-2); }
/* Gewählt: dezent hellere Fläche und fette Schrift, dazu das gesetzte Häkchen */
.multichip-item.is-on { background: var(--line); font-weight: 600; }
.multichip-empty { padding: 0.75rem; font-size: var(--fs-control); color: var(--muted); text-align: center; font-style: italic; }

/* ====== Trunks ====== */
.trunks { display: flex; flex-direction: column; gap: var(--gap-card); }
.trunk-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.trunk-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.trunk-head-title { display: flex; align-items: center; gap: 10px; flex: 1; }
.trunk-name {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px solid var(--line-strong);
  outline: none;
}
.trunk-name:focus { border-bottom-color: var(--pink); }
.trunk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.unsure-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.unsure-toggle:hover { border-color: var(--ink-soft); color: var(--ink); }

.numbers-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.numbers-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.numbers-head h5 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
}
.numbers-add { display: flex; gap: var(--space-sm); }
.btn.sm { padding: calc(0.5rem - 1px) calc(0.75rem - 1px); font-size: var(--fs-chip); border-width: 1px; }

.number-row {
  display: grid;
  grid-template-columns: 70px 1fr 220px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.number-row.block { background: var(--pink-soft); border-color: var(--pink-tint); }
.number-kind { display: flex; align-items: center; justify-content: flex-start; }
.kind-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--bg);
}
.kind-badge.block { background: var(--pink-strong); color: var(--on-pink); }
.number-fields {
  display: grid;
  grid-template-columns: 70px 90px 1fr 90px 90px 1fr;
  gap: 8px;
}
.number-row.einzel .number-fields {
  grid-template-columns: 70px 90px 1fr 110px 1fr;
}
.nf { display: flex; flex-direction: column; gap: var(--space-sm); }
.nf label {
  font-size: var(--fs-small);
  line-height: var(--lh-ui);
  font-weight: 500;
  color: var(--muted);
}
.nf .input { padding: 0.6rem 0.75rem; font-size: var(--fs-control); }
.nf .input.mono { font-family: var(--font-mono); }
.number-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  text-align: right;
}
.preview-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.preview-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.empty.small { padding: 12px; font-size: 12.5px; }

@media (max-width: 900px) {
  .number-row { grid-template-columns: 1fr; }
  .number-fields { grid-template-columns: 1fr 1fr !important; }
}

/* ====== Week hours ====== */
.weekhours {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.wh-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-row) 1.25rem;
  padding: var(--pad-card-sm);
  border-bottom: 1px solid var(--line);
  transition: background 150ms;
}
.wh-row:last-child { border-bottom: none; }
.wh-row.is-closed { background: var(--surface-2); }
.wh-row.is-closed .wh-day-name { color: var(--muted); }
.wh-day { display: flex; align-items: center; flex: 0 0 120px; }
.wh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}
.wh-toggle input[type="checkbox"] { accent-color: var(--pink); width: 16px; height: 16px; }
.wh-toggle.sm { font-weight: 400; font-size: var(--fs-control); color: var(--ink-soft); }
.wh-day-name { font-size: 1rem; color: var(--ink); font-weight: 600; }
.wh-times { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.wh-time { display: flex; flex-direction: column; gap: 2px; }
.wh-time label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
}
.wh-time .input { padding: 0.5rem 0.75rem; font-size: var(--fs-control); width: 110px; }
.wh-dash { color: var(--muted); padding-top: 14px; }
.wh-pause { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; min-height: 32px; }
.wh-pause-times { display: flex; align-items: center; gap: 6px; }
.wh-pause-times .input { padding: 0.4rem 0.6rem; font-size: var(--fs-control); width: 104px; }
.wh-pause-times .wh-dash { padding-top: 0; }
.wh-closed {
  flex: 1 1 auto;
  color: var(--muted);
  font-style: italic;
  font-size: var(--fs-control);
}
.wh-copy { margin-left: auto; white-space: nowrap; }

@media (max-width: 560px) {
  .wh-day { flex-basis: 100%; }
  .wh-copy { margin-left: 0; }
}

/* ====== Support card (sidebar) ====== */
.support-card {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: var(--pad-card-sm);
  display: flex;
  flex-direction: column;
  gap: var(--gap-label);
}
.support-title {
  font-size: 1rem;
  line-height: var(--lh-ui);
  font-weight: 600;
  color: var(--ink);
}
.support-body p {
  margin: 0;
  font-size: var(--fs-control);
  line-height: 1.5;
  color: var(--ink-soft);
}
.support-body p strong { color: var(--ink); font-weight: 600; }
.support-phone {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: var(--pad-control);
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: border-color 150ms;
}
.support-phone:hover { border-color: var(--pink); }
.support-phone-icon {
  width: 35px; height: 35px; border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.support-phone:hover .support-phone-icon { background: var(--ink); color: var(--bg); }
/* Beschriftung wie .info-card-label der Webseite */
.support-phone-label {
  display: block;
  font-size: var(--fs-caption);
  line-height: var(--lh-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.support-phone-num {
  display: block;
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  font-weight: 500;
}
.support-mail {
  font-size: var(--fs-control);
  color: var(--ink-soft);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.support-mail:hover { color: var(--pink-text); text-decoration: underline; }

/* ====== Flow diagram ====== */
.flow-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-soft);
  align-items: center;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.flow-legend .lgd {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -2px;
}
.flow-legend .lgd.trunk { background: var(--ink); }
.flow-legend .lgd.hours { background: var(--flow-hours); }
.flow-legend .lgd.routing { background: var(--pink); }
.flow-legend .lgd.ivr { background: var(--flow-ivr); }
.flow-legend .lgd.dept { background: var(--flow-dept); }
.flow-legend .hint { margin-left: auto; color: var(--muted); font-style: italic; font-size: 12px; }

.flow-canvas {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: auto;
  padding: 10px;
}
.flow-svg { display: block; }
.flow-edge {
  stroke: var(--line-strong);
  stroke-width: 1.5;
  fill: none;
}
.flow-edge-label {
  font-family: var(--font-sans);
  font-size: 10.5px;
  fill: var(--muted);
}
.flow-node { cursor: pointer; }
.flow-node rect {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.5;
  transition: fill 120ms, stroke 120ms, transform 150ms;
}
.flow-node:hover rect { stroke: var(--ink-soft); }
.flow-node.is-selected rect { stroke: var(--pink); stroke-width: 2.5; }
.flow-node.trunk rect { fill: var(--ink); stroke: var(--ink); }
.flow-node.trunk .fn-label, .flow-node.trunk .fn-sub { fill: var(--bg); }
.flow-node.trunk.placeholder rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-dasharray: 4 3; }
.flow-node.trunk.placeholder .fn-label, .flow-node.trunk.placeholder .fn-sub { fill: var(--muted); }
.flow-node.hours rect { fill: var(--flow-hours-fill); stroke: var(--flow-hours); }
.flow-node.routing rect { fill: var(--flow-routing-fill); stroke: var(--pink); }
.flow-node.routing.alt rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-dasharray: 4 3; }
.flow-node.ivr rect { fill: var(--flow-ivr-fill); stroke: var(--flow-ivr); }
.flow-node.dept rect { fill: var(--flow-dept-fill); stroke: var(--flow-dept); }
.flow-node.dept.placeholder rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-dasharray: 4 3; }
.fn-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink);
}
.fn-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: var(--muted);
}
.flow-node.routing .fn-label, .flow-node.ivr .fn-label, .flow-node.dept .fn-label, .flow-node.hours .fn-label { fill: var(--ink); }

.flow-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--pad-card);
  display: flex;
  flex-direction: column;
  gap: var(--gap-label);
}
.flow-details-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.flow-details-head h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.flow-details-actions { display: flex; gap: 6px; align-items: center; }
.flow-details-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-sm) var(--space-md);
  margin: 0;
  font-size: var(--fs-control);
  line-height: 1.5;
}
.flow-details-list dt { color: var(--muted); }
.flow-details-list dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) {
  .flow-details-list { grid-template-columns: 1fr; gap: 2px; }
  .flow-legend .hint { margin-left: 0; }
}

/* Phone-select column: ellipsis if long */
select.input-bare.phone-select {
  max-width: 100%;
  text-overflow: ellipsis;
}

/* Misc */
hr.divider { border: none; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.bc-pink { color: var(--pink-text); }

/* ====== Trunk path picker ====== */
.path-picker {
  margin: var(--gap-row) 0 var(--space-xs);
}
.path-picker-label {
  font-size: 1rem;
  line-height: var(--lh-ui);
  color: var(--ink);
  font-weight: 600;
  margin-bottom: var(--gap-label);
}
.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap-chip);
}
.path-card {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-xs) 0.75rem;
  align-items: start;
  padding: var(--pad-card-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  font-family: inherit;
  color: var(--ink);
}
.path-card:hover { border-color: var(--ink); }
.path-card.is-active {
  border-color: var(--pink);
  box-shadow: inset 0 0 0 1px var(--pink);
}
.path-icon {
  grid-row: 1 / span 2;
  font-size: 20px;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
}
.path-card.is-active .path-icon {
  background: var(--pink-strong);
  color: var(--on-pink);
}
.path-label {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink);
}
.path-sub {
  font-size: var(--fs-control);
  color: var(--muted);
  line-height: 1.5;
}

/* ====== Provider guide ====== */
.provider-guide {
  margin: var(--gap-row) 0 var(--space-xs);
  padding: var(--pad-card-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.provider-guide-tag {
  font-size: 1rem;
  line-height: var(--lh-ui);
  color: var(--ink);
  font-weight: 600;
  margin-bottom: var(--gap-label);
}
.provider-guide-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  font-size: var(--fs-control);
  line-height: 1.5;
  padding: var(--space-xs) 0;
}
@media (max-width: 560px) {
  .provider-guide-row { grid-template-columns: 1fr; gap: 0; }
}
.provider-guide-row strong { color: var(--ink); font-weight: 600; }
.provider-guide-row span { color: var(--ink-soft); }

/* ====== Path bodies (credentials / port / unknown) ====== */
.path-body {
  margin: var(--gap-row) 0 var(--space-xs);
  padding: var(--pad-card-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.section-tag {
  font-size: 1rem;
  line-height: var(--lh-ui);
  color: var(--ink);
  font-weight: 600;
  margin-bottom: var(--gap-label);
}

.creds-grid, .port-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--gap-row);
}
.creds-note {
  margin-top: var(--gap-label);
  font-size: var(--fs-control);
  color: var(--muted);
  font-style: italic;
}

.callout-dark {
  background: var(--surface);
  color: var(--ink);
  padding: var(--pad-card-sm);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.callout-dark .callout-head {
  font-size: 1rem;
  line-height: var(--lh-ui);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.callout-dark p { margin: 0 0 var(--space-sm); font-size: var(--fs-control); color: var(--ink-soft); }
.callout-dark .checklist { color: var(--ink); }
.callout-dark .consent-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--pad-control);
  background: var(--surface-2);
  border-radius: var(--radius);
  font-size: var(--fs-control);
}
.callout-dark .consent-row input[type="checkbox"] { accent-color: var(--pink); }

.callout-soft {
  margin-top: var(--gap-label);
  padding: var(--pad-card-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--fs-control);
}
.callout-soft strong { color: var(--ink); }

.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 0;
  display: grid;
  gap: var(--space-sm);
  font-size: var(--fs-control);
  line-height: 1.5;
}
.checklist.tight { gap: var(--space-xs); font-size: var(--fs-control); }
.checklist li {
  position: relative;
  padding-left: 22px;
}
/* Häkchen als Lucide-Icon "check" (Maske, Farbe aus background) */
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 15px;
  height: 15px;
  background: var(--pink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ====== Docs block ====== */
.docs-block {
  margin: var(--gap-row) 0 var(--space-xs);
}
.doc-drop {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--pad-card-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .12s;
}
.doc-drop:hover {
  border-color: var(--ink);
}
.doc-drop-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 300;
  flex-shrink: 0;
}
.doc-drop-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc-drop-text strong {
  font-size: 1rem;
  line-height: var(--lh-ui);
  font-weight: 600;
  color: var(--ink);
}
.doc-drop-text small {
  font-size: var(--fs-control);
  color: var(--muted);
}
.doc-list {
  list-style: none;
  padding: 0;
  margin: var(--gap-label) 0 0;
  display: grid;
  gap: var(--space-sm);
}
.doc-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--fs-control);
}
.doc-list .doc-file { flex: 1; color: var(--ink); overflow-wrap: anywhere; }
.doc-list .doc-size { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.icon-btn.sm { width: 22px; height: 22px; font-size: 12px; }

/* ====== Trunk numbers table ====== */
.numbers-block { margin-top: var(--gap-row); }
.numbers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gap-label);
  gap: 12px;
  flex-wrap: wrap;
}
.numbers-head h5 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
}
.numbers-add { display: flex; gap: var(--space-sm); }

.num-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto; /* nur falls die Spalten nicht passen, scrollt die Tabelle in sich */
}
/* Vorschau steht in einer eigenen Zeile unter den Eingaben, damit die volle Nummer sichtbar bleibt */
.num-row {
  display: grid;
  grid-template-columns:
    78px   /* kind */
    56px   /* country */
    68px   /* area */
    minmax(90px, 1fr)    /* base */
    minmax(120px, 1.3fr) /* dw */
    minmax(100px, 1.4fr) /* label */
    28px;  /* remove */
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.num-row:last-child { border-bottom: none; }
.num-row.num-head {
  background: var(--surface-2);
  padding: 0.6rem 10px;
  font-size: var(--fs-small);
  line-height: var(--lh-ui);
  color: var(--muted);
  font-weight: 600;
}
.num-row.num-body:hover { background: var(--surface-2); }

.num-row .input,
.num-row .input-bare {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-size: var(--fs-control);
  height: 38px;
  line-height: 1.2;
  box-sizing: border-box;
}
.num-row .input.mono { font-family: var(--font-mono); }

.kind-select {
  font-size: 13px !important;
  font-weight: 600;
  padding: 6px 6px !important;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink);
}

.dw-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
}
.dw-range .input { text-align: center; padding: 6px 4px; }
.dw-sep { text-align: center; color: var(--muted); font-size: 13px; }

.c-preview {
  font-size: var(--fs-control);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 4px;
}
.num-row.num-head .c-preview { display: none; }
.num-row.num-body .c-preview { grid-column: 2 / -2; grid-row: 2; }
.num-row.num-body .c-preview:empty { display: none; }
/* Pfeil als Lucide-Icon "arrow-right" */
.num-row.num-body .c-preview::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 6px;
  vertical-align: -2px;
  background: var(--pink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.c-remove { display: flex; justify-content: flex-end; }

.unsure-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--gap-label) 0 var(--space-xs);
  font-size: var(--fs-control);
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}
.unsure-toggle input[type="checkbox"] { accent-color: var(--pink); }

/* Zeile unter Listen: Hinzufügen-Knopf und Anzahl, ohne eigenen Rahmen */
.list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  background: transparent;
  border: 0;
  margin-top: var(--gap-row);
}
.users-list .list-footer { margin-top: 0; padding: var(--pad-card-sm); border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  .list-footer { flex-wrap: wrap; gap: var(--gap-label); }
}

/* Responsive: stack into 2-row layout on narrow widths */
@media (max-width: 900px) {
  .num-row {
    grid-template-columns: 78px 1fr 1fr 28px;
    grid-auto-rows: auto;
    row-gap: 6px;
  }
  .num-row.num-head { display: none; }
  .num-row.num-body {
    padding: 12px;
  }
  .num-row.num-body > div { grid-column: span 2; }
  .num-row.num-body .c-kind { grid-column: 1; grid-row: 1; }
  .num-row.num-body .c-remove { grid-column: 4; grid-row: 1; }
  .num-row.num-body .c-country { grid-column: 2 / 4; grid-row: 1; max-width: 80px; }
  .num-row.num-body .c-area { grid-column: 1; grid-row: 2; }
  .num-row.num-body .c-base { grid-column: 2 / 5; grid-row: 2; }
  .num-row.num-body .c-dw { grid-column: 1 / 3; grid-row: 3; }
  .num-row.num-body .c-label { grid-column: 3 / 5; grid-row: 3; }
  .num-row.num-body .c-preview { grid-column: 1 / 5; grid-row: 4; border-top: 1px solid var(--line); padding: 6px 0 0; }
}

/* ====== Trunk card wrapper ====== */
.trunk-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--pad-card);
  margin-bottom: var(--gap-card);
  display: flex;
  flex-direction: column;
  gap: var(--gap-row);
}
.trunk-card.is-unsure { border-color: var(--warn-line); }

.trunk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.trunk-head-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.trunk-badge {
  font-size: var(--fs-control);
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.trunk-name {
  flex: 1;
  min-width: 0;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 0;
}
.trunk-name:focus {
  outline: none;
  border-bottom-color: var(--pink);
}

.trunk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-row);
}
@media (max-width: 640px) {
  .trunk-grid { grid-template-columns: 1fr; }
}
.field.inline { display: flex; flex-direction: column; gap: var(--space-sm); }
.field-label-main.small {
  font-size: var(--fs-control);
  color: var(--ink-soft);
  font-weight: 600;
}

.empty {
  padding: var(--pad-card-sm);
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-control);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.empty.small { padding: 0.75rem; font-size: var(--fs-control); }

/* ====== Entity picker (Nutzer/Abteilungen/Warteschlangen etc.) ====== */
.entity-picker { position: relative; width: 100%; }
.entity-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0.4rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms, box-shadow 120ms;
}
.entity-trigger:hover { border-color: var(--ink); }
.entity-trigger:focus-visible {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-tint);
}
.entity-trigger .caret { color: var(--muted); font-size: 11px; flex: 0 0 auto; }

/* Chip (shared: .chip, .entity-chip): neutral wie die Themen-Chips der Webseite */
.chip, .entity-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 4px 5px 4px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-chip);
  line-height: 1.4;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  max-width: 100%;
}
.chip .chip-label, .entity-chip .chip-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: var(--chip-x-bg);
  border: none;
  border-radius: 999px;
  color: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms;
}
.chip-x:hover { background: var(--ink); color: var(--bg); }

.chiprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.entity-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px;
  max-height: 360px;
  overflow-y: auto;
}
.entity-group + .entity-group { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.entity-group-label {
  padding: 0.5rem 0.75rem 0.25rem;
  font-weight: 600;
  font-size: var(--fs-small);
  line-height: var(--lh-ui);
  color: var(--muted);
}
.entity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.75rem;
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink);
}
.entity-item:hover { background: var(--surface-2); }
.entity-item.is-on { background: var(--line); font-weight: 600; }
.entity-item input { accent-color: var(--pink); }
.entity-empty { padding: 0.75rem; text-align: center; font-size: var(--fs-control); color: var(--muted); font-style: italic; }
.entity-custom { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.entity-custom-row { display: flex; gap: 6px; padding: 4px 4px 6px; }
.entity-custom-row .input { flex: 1; }

/* MultiChip (Abteilungs-Auswahl in Nutzerliste), angepasst an entity-trigger */
.multichip-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.multichip-trigger:hover { border-color: var(--ink); }

/* ====== Shortcut maps (interne + externe Kurzwahlen) ====== */
.shortcut-map {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--pad-card-sm);
}
.shortcut-head {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.2fr 34px;
  gap: 8px;
  padding: 2px 4px 8px;
  font-weight: 600;
  font-size: var(--fs-small);
  line-height: var(--lh-ui);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.shortcut-head.ext { grid-template-columns: 1.4fr 1.1fr 0.8fr 34px; }
.shortcut-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.2fr 34px;
  gap: 8px;
  align-items: center;
}
.shortcut-row.ext { grid-template-columns: 1.4fr 1.1fr 0.8fr 34px; }
.shortcut-row .sc-code { text-align: center; }
.shortcut-row .input { padding: 0.5rem 0.75rem; font-size: var(--fs-control); }
.shortcut-map .list-footer { padding-top: var(--gap-label); border-top: 1px solid var(--line); margin-top: var(--space-xs); }
@media (max-width: 700px) {
  .shortcut-head { display: none; }
  .shortcut-row, .shortcut-row.ext {
    grid-template-columns: 1fr 34px;
    grid-auto-rows: auto;
  }
  .shortcut-row .sc-name { grid-column: 1 / 2; }
  .shortcut-row .sc-code, .shortcut-row .sc-number, .shortcut-row .sc-target {
    grid-column: 1 / 2;
  }
  .shortcut-row .icon-btn { grid-column: 2 / 3; grid-row: 1 / -1; align-self: start; }
}

/* ====== Info callout (neutrale Hinweiskarten) ====== */
.info-callout {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: var(--pad-card-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--fs-control);
  color: var(--ink);
  line-height: 1.5;
}
.info-callout-icon {
  flex: 0 0 auto;
  font-size: 15px;
  color: var(--pink);
  font-weight: 600;
  margin-top: 1px;
}

/* ====== Dept-hours editor (pro Abteilung ein Wochenplan) ====== */
.dept-hours-stack { display: flex; flex-direction: column; gap: var(--gap-card); }
.dept-hours-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--pad-card-sm);
}
.dept-hours-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: var(--lh-ui);
  margin-bottom: var(--gap-label);
  color: var(--ink);
}
.dept-hours-block .weekhours { border-radius: var(--radius); }

/* ====== Phone select (Nutzerliste): schmaler Reset ====== */
.phone-select optgroup { font-weight: 600; color: var(--muted); font-style: normal; }
.phone-select option { color: var(--ink); font-weight: 400; }


/* ====== Easy-Mode UI ====== */

/* Modus-Umschalter: dunkle Pille ohne Rahmen wie die Navigation der Webseite */
.mode-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--nav-pill);
  border-radius: var(--radius);
  padding: 0.35rem;
  gap: 0.25rem;
}
.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: calc(0.5rem - 2px) calc(1rem - 2px);
  border-radius: calc(var(--radius) - 0.3rem);
  font: inherit;
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.25s ease;
}
.mode-tab:hover { background: var(--ink); color: var(--bg); }
.mode-toggle .mode-tab { padding: 0.5rem 1rem; color: var(--nav-pill-ink); }
.mode-toggle .mode-tab:hover { background: var(--nav-pill-ink); color: var(--nav-pill); }
.mode-toggle .mode-tab.is-active { background: var(--pink-strong); color: var(--on-pink); font-weight: 600; }
/* Einzelne Modus-Knöpfe neben dem Umschalter (z. B. Einfach-Modus) */
.topbar-actions > .mode-tab { border: 2px solid var(--line-strong); border-radius: var(--radius); }
.topbar-actions > .mode-tab:hover { border-color: var(--ink); }
.mode-tab-icon { display: inline-flex; font-size: 13px; }

/* "Weiß nicht / X-sec entscheidet" affordance per field */
.field-wrap { display: flex; flex-direction: column; gap: var(--space-sm); }
.field-wrap.is-unsure .field { opacity: 0.55; }
.field-unsure-row {
  display: flex;
  justify-content: flex-end;
}
/* Wie die Themen-Chips der Webseite */
.unsure-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: var(--fs-chip);
  line-height: var(--lh-ui);
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: calc(0.5rem - 1px) calc(1rem - 1px);
  cursor: pointer;
}
.unsure-btn:hover {
  color: var(--ink);
  border-color: var(--pink);
}
.unsure-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-chip);
  line-height: var(--lh-ui);
  background: var(--surface-2);
  color: var(--ink);
  padding: calc(0.5rem - 1px) calc(1rem - 1px);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
}
.unsure-pill-icon {
  display: inline-flex;
  color: var(--pink);
}
.unsure-pill-undo {
  background: transparent;
  border: 0;
  color: var(--ink);
  text-decoration: underline;
  font: inherit;
  font-size: var(--fs-chip);
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}
.unsure-pill-undo:hover { color: var(--pink-text); }

/* Welcome modal */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: welcome-fade 0.2s ease;
}
@keyframes welcome-fade { from { opacity: 0; } to { opacity: 1; } }
.welcome-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 680px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.welcome-eyebrow {
  font-size: var(--fs-control);
  line-height: var(--lh-ui);
  color: var(--muted);
  margin-bottom: var(--gap-label);
}
.welcome-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: var(--fw-title);
  line-height: var(--lh-heading);
  margin: 0 0 var(--gap-subtitle);
  text-wrap: balance;
}
.welcome-lead {
  font-size: 1rem;
  line-height: var(--lh-text);
  color: var(--ink-soft);
  margin: 0 0 var(--gap-text);
}
.welcome-lead strong { color: var(--ink); font-weight: 600; }

.welcome-defaults {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-card-sm);
  margin-bottom: var(--pad-card);
}
.welcome-defaults-head {
  font-size: 1rem;
  line-height: var(--lh-ui);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--gap-label);
}
.welcome-defaults-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs-control);
  line-height: 1.5;
  color: var(--ink-soft);
}
.welcome-defaults-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.welcome-defaults-check {
  display: inline-flex;
  margin-top: 3px;
  color: var(--pink);
  font-weight: 700;
  flex-shrink: 0;
}
.welcome-defaults-more {
  color: var(--muted);
  font-style: italic;
  grid-column: 1 / -1;
}

.welcome-modes {
  display: flex;
  flex-direction: column;
  gap: var(--gap-label);
  margin-bottom: var(--gap-text);
}
.welcome-mode {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--pad-card-sm);
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.welcome-mode-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 15px;
  flex-shrink: 0;
}
.welcome-mode strong {
  display: block;
  font-size: 1rem;
  line-height: var(--lh-ui);
  margin-bottom: var(--space-xs);
}
.welcome-mode p {
  font-size: var(--fs-control);
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.welcome-actions {
  display: flex;
  gap: var(--gap-row);
  align-items: center;
  flex-wrap: wrap;
}
.btn-lg { padding: var(--pad-btn); font-size: 1rem; }
.welcome-foot {
  font-size: var(--fs-control);
  color: var(--muted);
  margin: var(--space-md) 0 0;
  text-align: center;
}

/* Defaults banner (after applying smart defaults) */
.defaults-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  z-index: 900;
  animation: welcome-fade 0.2s ease;
  font-size: var(--fs-control);
  max-width: calc(100vw - 32px);
}
.defaults-banner-icon {
  display: flex;
  color: var(--pink);
  flex-shrink: 0;
}
.defaults-banner-body strong { font-weight: 600; }
.defaults-banner-body span { color: var(--ink-soft); }
.defaults-banner-close {
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.defaults-banner-close:hover { color: var(--pink-text); }

@media (max-width: 600px) {
  .welcome-card { padding: var(--pad-card); }
  .welcome-title { font-size: 30px; }
  .welcome-defaults-list { grid-template-columns: 1fr; }
  .welcome-actions .btn { width: 100%; }
  .defaults-banner { bottom: 16px; width: calc(100vw - 32px); }
}
.tw-desc{margin:6px 0 0;font-size:12px;color:var(--muted);line-height:1.4;max-width:220px}

/* ====== Versandstatus (Übersicht), wie die Meldungen im Kontaktformular der Webseite ====== */
.info-box.send-status p { margin: 0; opacity: 1; color: var(--ink); }
.info-box.send-status.is-ok { background: var(--ok-soft); border-color: var(--ok-border); }
.info-box.send-status.is-error { background: var(--danger-soft); border-color: var(--danger-border); }
.info-box.send-status.is-error h4 { color: var(--danger); }
.submit-zone .send-status { margin: var(--space-md) 0 0; }
.submit-zone .btn:disabled { opacity: 0.6; cursor: progress; }
@media print { .send-status { display: none !important; } }
