/* ===============================================================
   Theme „Hell & ruhig“ (2026-11)
   ---------------------------------------------------------------
   Wird NACH tailwind.css geladen und ersetzt den Glas-Look.
   Werte aus den Vorlage-Screenshots des Auftraggebers vermessen
   (umgerechnet auf 1440 px Breite):
     - Inhalt rein weiss, Raender #ececec, Schatten kaum sichtbar
     - Text tiefschwarz, Navigation inaktiv #5c5d63, Nebentext #5f5f64
     - Menue 14 px, Kartentitel 14 px, Kennzahlen 19 px / 500
     - Buttons 36 px hoch, Radius 10, Rand + weicher kurzer Schatten
     - Karten Radius 12, Innenabstand 20, Abstand 24
   Die Einzelkomponenten in tailwind.css haengen an denselben Variablen
   und ziehen dadurch automatisch mit. Hell ist Standard.
   =============================================================== */

html:not([data-theme="dark"]) {
  color-scheme: light;

  --bg: #ffffff;
  --bg-deep: #ffffff;
  --bloom-a: transparent;
  --bloom-b: transparent;
  --bloom-c: transparent;

  --glass-soft: #fafafa;
  --glass: #ffffff;
  --glass-strong: #ffffff;
  --glass-solid: #ffffff;
  --glass-border: #ececec;
  --glass-border-strong: #e4e4e4;
  --glass-highlight: transparent;

  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-raised: #ffffff;
  --line: #ececec;
  --line-strong: #e4e4e4;
  --hover: #f6f8fa;

  --text: #0a0a0a;
  --muted: #5f5f64;
  --muted-strong: #3f3f46;
  --faint: #a5a7aa;
  --nav: #5c5d63;

  --ink: #0b0b0c;
  --ink-hover: #26262a;
  --ink-text: #ffffff;

  --danger: #dc2626;
  --success: #15803d;
  --warning: #c2410c;

  --shadow-card: 0 1px 2px rgba(10, 10, 12, 0.03);
  --shadow-btn: 0 1px 2px rgba(10, 10, 12, 0.06), 0 2px 5px rgba(10, 10, 12, 0.04);
  --shadow-sm: var(--shadow-card);
  --shadow-md: 0 6px 18px rgba(10, 10, 12, 0.07);
  --shadow-lg: 0 18px 44px rgba(10, 10, 12, 0.12);
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;

  --tone-green-bg: #dcf5e6;  --tone-green: #0b4a32;
  --tone-red-bg: #fde2e2;    --tone-red: #9b1c1c;
  --tone-blue-bg: #dce9fd;   --tone-blue: #1e3a8a;
  --tone-orange-bg: #ffe8d5; --tone-orange: #9a3412;
  --tone-purple-bg: #efe4fd; --tone-purple: #5b21b6;
  --tone-gray-bg: #f0f1f3;   --tone-gray: #3f3f46;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0f1013;
  --bg-deep: #0f1013;
  --bloom-a: transparent;
  --bloom-b: transparent;
  --bloom-c: transparent;

  --glass-soft: #131418;
  --glass: #16171b;
  --glass-strong: #1a1b20;
  --glass-solid: #16171b;
  --glass-border: #24262c;
  --glass-border-strong: #2e3038;
  --glass-highlight: transparent;

  --surface: #16171b;
  --surface-soft: #131418;
  --surface-raised: #1a1b20;
  --line: #24262c;
  --line-strong: #2e3038;
  --hover: #1e2026;

  --text: #f4f4f5;
  --muted: #a1a1aa;
  --muted-strong: #d4d4d8;
  --faint: #71717a;
  --nav: #a1a1aa;

  --ink: #f4f4f5;
  --ink-hover: #ffffff;
  --ink-text: #0b0b0c;

  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-btn: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: var(--shadow-card);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;

  --tone-green-bg: rgba(74, 222, 128, 0.13);  --tone-green: #86efac;
  --tone-red-bg: rgba(248, 113, 113, 0.14);   --tone-red: #fca5a5;
  --tone-blue-bg: rgba(96, 165, 250, 0.15);   --tone-blue: #93c5fd;
  --tone-orange-bg: rgba(251, 146, 60, 0.15); --tone-orange: #fdba74;
  --tone-purple-bg: rgba(192, 132, 252, 0.15);--tone-purple: #d8b4fe;
  --tone-gray-bg: #23252b;                    --tone-gray: #d4d4d8;
}

/* --- Schriftgewichte angleichen (automatisch aus tailwind.css erzeugt) ----
   Alte Regeln mit 650–850 werden auf 500/600 gesetzt – die Vorlage nutzt
   mittlere Gewichte. Gleiche Selektoren, spaetere Position => gewinnt.
   Neu erzeugen: siehe docs/familie/STATUS.md (Design). */
.back-link,
.button,
.content .stat-value,
.datev-fehlt,
.error-text,
.mobile-menu-head strong,
.nav-group a,
.nav-more > summary,
.pill,
.progress-label,
.push-status,
.ref-hosting-schild,
.ref-kunde-text strong,
.ticket-thread-head p,
.today-block-count,
.todo-react-assignee,
.todo-react-date,
.todo-react-main p,
.todo-react-main small,
.todo-react-relation span,
.user-menu,
button,
input[type="submit"],
label { font-weight: 500; }
.avatar-chip,
.brand strong,
.brand-mark,
.control-tile span,
.dashboard-task-row em,
.entity-avatar,
.font-medium,
.font-semibold,
.kanban-card-meta,
.kanban-column-head h2,
.kanban-subtask-heading,
.metric-label,
.metric-value,
.mobile-menu-logout,
.mobile-menu-panel a,
.nav-label,
.notification-badge span,
.preview-task-group-label,
.preview-task-kind,
.project-react-metric span,
.project-react-section-head > span,
.react-pill,
.ref-kopf,
.section-head a,
.section-head span,
.stat-label,
.stat-value,
.subtask-mini-list span,
.table td a:not(.button),
.table th,
.table-actions a,
.ticket-attachment-chip,
.ticket-message-meta,
.toast-message,
.today-chip strong,
.todo-list-count,
.todo-list-icon,
.todo-list-open-link,
.todo-page .todo-smart-card strong,
.todo-react-head,
.todo-react-main strong,
.todo-react-relation a,
.todo-react-relation strong,
.todo-react-status select,
.todo-react-subtasks span,
.todo-scope-card span,
.todo-smart-card span,
.todo-status-pill-select,
h1,
h2 { font-weight: 600; }

/* --- Grund ----------------------------------------------------------------- */
html, body { background: var(--bg); }
body::before { display: none; }
*, *::before, *::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: "cv11", "ss01";
}

h1 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; color: var(--text); }
h2 { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
h3 { font-size: 14px; font-weight: 500; }
label { color: var(--muted-strong); font-size: 13px; font-weight: 500; }
strong, b { font-weight: 600; }

/* --- App-Rahmen ------------------------------------------------------------ */
.app-shell { background: var(--bg); }
@media (min-width: 901px) {
  .app-shell { grid-template-columns: 280px minmax(0, 1fr); }
  .app-shell[data-sidebar="collapsed"] { grid-template-columns: 76px minmax(0, 1fr); }
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: none;
}
html[data-theme="light"] .sidebar,
html[data-theme="light"] .topbar { background: var(--surface); }

.sidebar-brand-row { padding: 20px 16px 14px 12px; border-bottom: 0; gap: 4px; }
.brand { min-height: 0; padding: 4px 8px; border-bottom: 0; gap: 12px; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.brand strong { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.brand small { font-size: 13px; color: var(--muted); margin-top: 1px; }

.sidebar-toggle {
  width: 32px; height: 32px; margin-right: 0;
  color: var(--nav);
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}
.sidebar-toggle:hover { color: var(--text); background: var(--hover); }

@media (min-width: 901px) {
  .sidebar .nav-group {
    gap: 2px;
    margin: 4px 16px 0;
    padding: 14px 0;
    border-top: 1px solid var(--line);
  }
  .sidebar .nav-group a,
  .sidebar .nav-more summary {
    min-height: 38px;
    gap: 12px;
    padding: 8px 12px;
    color: var(--nav);
    background: transparent;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.005em;
  }
  .sidebar .nav-more summary { list-style: none; }
}
html[data-theme="light"] .sidebar .nav-group a { color: var(--nav); }
.sidebar .nav-group a:hover,
.sidebar .nav-more summary:hover,
html[data-theme="light"] .sidebar .nav-group a:hover {
  color: var(--text);
  background: var(--hover);
  border-color: transparent;
  box-shadow: none;
}
.sidebar .nav-group a.is-active,
html[data-theme="light"] .sidebar .nav-group a.is-active {
  color: var(--text);
  background: var(--hover);
  border-color: transparent;
  box-shadow: none;
}
.sidebar .nav-group svg, .sidebar .nav-group i { width: 18px; height: 18px; color: var(--nav); stroke-width: 1.75; }
.sidebar .nav-group a.is-active svg, .sidebar .nav-group a.is-active i,
.sidebar .nav-group a:hover svg, .sidebar .nav-group a:hover i { color: var(--text); }
.nav-label { margin: 14px 12px 6px; color: var(--faint); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }

/* Benutzer unten: Avatar, Name, E-Mail (wie in der Vorlage) */
.sidebar-footer {
  margin: auto 16px 16px;
  padding: 14px 4px 2px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
}
html[data-theme="light"] .sidebar-footer { background: transparent; }
.sidebar-footer small { color: var(--muted); font-weight: 400; font-size: 13px; }
.sidebar-user { display: flex; align-items: center; gap: 12px; text-decoration: none; border-radius: 0; }
.sidebar-user:hover .sidebar-user-text > span { text-decoration: underline; text-underline-offset: 3px; }
.sidebar-user-avatar {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  color: var(--text); background: var(--hover);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.sidebar-user-text { display: grid; min-width: 0; flex: 1; line-height: 1.35; }
.sidebar-user-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user > i, .sidebar-user > svg { width: 16px; height: 16px; color: var(--nav); }
.app-shell[data-sidebar="collapsed"] .sidebar-user-text,
.app-shell[data-sidebar="collapsed"] .sidebar-user > i,
.app-shell[data-sidebar="collapsed"] .sidebar-user > svg { display: none; }
.app-shell[data-sidebar="collapsed"] .sidebar-user { justify-content: center; }

/* --- Kopfzeile: Seitentitel links, Symbol-Buttons rechts ------------------- */
.topbar {
  min-height: 68px;
  justify-content: space-between;
  padding: 10px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.topbar-copy { display: block; min-width: 0; }
.topbar-title {
  display: block;
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eyebrow { display: none; }
.user-menu { gap: 10px; color: var(--text); font-size: 14px; font-weight: 500; }
.topbar-actions { gap: 10px; }
.avatar-chip {
  width: 36px; height: 36px;
  color: var(--text); background: var(--hover);
  border: 1px solid var(--line);
  font-weight: 600; font-size: 13px;
}

.content { padding: 24px 32px 56px; }

/* Erste Kopfzeile einer Seite wie die Werkzeugleiste der Vorlage:
   volle Breite, weiss, feine Linie darunter. */
.page-heading { align-items: center; margin-bottom: 20px; gap: 16px; }
.content .page-heading { padding-top: 0; padding-bottom: 0; }
.content > .page-heading:first-child {
  margin: -24px -32px 24px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
}
.content .page-heading h1 { font-size: 16px; font-weight: 500; margin-bottom: 2px; letter-spacing: -0.01em; }
.page-heading p, .content .page-heading p { color: var(--muted); font-size: 13px; margin: 0; }

/* --- Buttons --------------------------------------------------------------- */
.button,
button,
input[type="submit"] {
  min-height: 36px;
  gap: 8px;
  padding: 8px 14px;
  color: var(--ink-text);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  filter: none;
}
.button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  filter: none;
}
.button-muted,
html[data-theme="light"] .button-muted {
  color: var(--text);
  background: var(--surface);
  border: 1px solid #e6e6e6;
  box-shadow: var(--shadow-btn);
}
html[data-theme="dark"] .button-muted { border-color: var(--line-strong); }
.button-muted:hover,
html[data-theme="light"] .button-muted:hover {
  color: var(--text);
  background: #fafafa;
  border-color: #e0e0e0;
}
html[data-theme="dark"] .button-muted:hover { background: var(--hover); }
.button-primary {
  color: #ffffff;
  background: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 80%, #000);
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.button-primary:hover { background: color-mix(in srgb, var(--primary) 90%, #000); }
.button-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-icon {
  width: 38px; min-width: 38px; height: 38px; padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #e6e6e6;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-btn);
}
html[data-theme="dark"] .button-icon { border-color: var(--line-strong); }
.button-icon:hover { background: var(--hover); }
.button svg, .button i { width: 17px; height: 17px; stroke-width: 1.75; }

/* --- Formulare ------------------------------------------------------------- */
input, textarea, select,
.modern-input,
.form-grid input, .form-grid textarea, .form-grid select,
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #e6e6e6;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(10, 10, 12, 0.04);
  font-size: 14px;
}
html[data-theme="dark"] :is(input, textarea, select) { border-color: var(--line-strong); }
input:focus, textarea:focus, select:focus,
.modern-input:focus,
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  background: var(--surface);
  border-color: #c9c9cf;
  box-shadow: 0 0 0 3px rgba(10, 10, 12, 0.06);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
html body input[type="checkbox"],
html body input[type="radio"] {
  width: 16px; height: 16px; min-height: 16px; padding: 0;
  border-radius: 4px; box-shadow: none; accent-color: var(--ink);
  justify-self: start;
}
.form-field-check { background: var(--surface-soft); border-color: var(--line); }

/* --- Flaechen -------------------------------------------------------------- */
.card,
.bg-white,
.entity-card,
.template-card,
.metric,
.modal-card,
html[data-theme="light"] .card,
html[data-theme="light"] .bg-white,
html[data-theme="light"] .entity-card,
html[data-theme="light"] .template-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card { padding: 20px; }
.card:hover, .entity-card:hover, .template-card:hover { box-shadow: var(--shadow-card); }
.card h2 { margin-bottom: 12px; }

.list-card,
.content .list-card,
html[data-theme="light"] .list-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
}
.list-card:hover,
.content .list-card:hover {
  border-color: var(--line-strong);
  background: #fcfcfc;
  box-shadow: none;
}
html[data-theme="dark"] .content .list-card:hover { background: var(--hover); }
.list-card strong { color: var(--text); font-weight: 500; }

/* Kennzahlen: Titel 14 px, Zahl 19 px mittelstark – wie „Leads 129“ */
.stat-card, .content .stat-card { padding: 18px 20px; min-height: 0; }
.stat-card::after { display: none; }
.stat-label, .content .stat-label, .metric-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-transform: none;
}
.stat-value, .content .stat-value, .metric-value {
  margin-top: 14px;
  color: var(--text);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* --- Pills / Status -------------------------------------------------------- */
.pill,
.content .pill,
html[data-theme="light"] .pill {
  min-height: 22px;
  padding: 2px 8px;
  color: var(--tone-gray);
  background: var(--tone-gray-bg);
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
/* „html body“ hebt die Spezifitaet ueber die Grundregel .content .pill */
html body .pill.pill-green { color: var(--tone-green); background: var(--tone-green-bg); }
html body .pill.pill-orange { color: var(--tone-orange); background: var(--tone-orange-bg); }
html body .pill.pill-primary, html body .pill.pill-blue { color: var(--tone-blue); background: var(--tone-blue-bg); }
html body .pill.pill-purple { color: var(--tone-purple); background: var(--tone-purple-bg); }
html body .pill.pill-red, html body .pill.pill-danger { color: var(--tone-red); background: var(--tone-red-bg); }

.value-positive { color: var(--success) !important; }
.value-negative { color: var(--danger) !important; }

/* --- Tabellen (wie „Companies“: weisser Kopf, graue Schrift, feine Linien) - */
.table th, .table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th,
.content th {
  color: var(--muted);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.table td { font-size: 14px; color: var(--text); }
.table td a:not(.button) { font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.table tbody tr:hover td { background: #fcfcfc; }
/* Tabelle bis an den Kartenrand, feine Spaltenlinien – wie in der Vorlage */
.card:has(> .table), .card:has(> .table-wrap > .table), .card:has(> div > table.table) { padding: 0; overflow-x: auto; }
.table th + th, .table td + td { border-left: 1px solid var(--line); }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table th { height: 48px; }
.table td { height: 52px; }
html[data-theme="dark"] .table tbody tr:hover td { background: var(--hover); }

/* --- Tabs / Segmente (wie „Status | Sources | Qualification“) -------------- */
.tabs-list,
html[data-theme="light"] .tabs-list {
  padding: 3px;
  gap: 2px;
  background: #f4f4f5;
  border: 0;
  border-radius: 10px;
}
html[data-theme="dark"] .tabs-list { background: var(--hover); }
.tab-trigger { min-height: 32px; padding: 6px 14px; color: var(--muted); border-radius: 8px; font-weight: 500; font-size: 14px; }
.tab-trigger:hover { color: var(--text); background: transparent; }
.tab-trigger.is-active,
.tab-trigger[aria-selected="true"],
.tab-trigger.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(10, 10, 12, 0.08), 0 0 0 1px rgba(10, 10, 12, 0.04);
}

/* --- Meldungen, Menues, Dialoge ------------------------------------------- */
.toast-message {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-weight: 500;
}
.toast-message.success { border-left: 3px solid var(--success); }
.toast-message.error { border-left: 3px solid var(--danger); }

.mobile-menu-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.mobile-menu-panel a:hover, .mobile-menu-logout:hover { color: var(--text); background: var(--hover); }

.kanban-column,
html[data-theme="light"] .kanban-column {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.empty-state { color: var(--muted); }

/* Unter-Navigation im Inhalt (z. B. Finanzen: Dashboard | Bereiche | Zugaenge) */
.content .nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; margin: 0 0 20px; border: 0; }
.content .nav-group a.button {
  min-height: 34px; padding: 6px 12px;
  color: var(--text); background: var(--surface);
  border: 1px solid #e6e6e6; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-btn); font-size: 14px; font-weight: 500;
}
.content .nav-group a.button:hover,
.content .nav-group a.button.is-active { color: var(--text); background: #fafafa; }
html body .content .nav-group a.button-primary,
html body .content .nav-group a.button-primary:hover { color: var(--ink-text); background: var(--ink); border-color: var(--ink); }

/* Seiten mit eigenen grossen Ueberschriften angleichen */
.control-hero h1, .todo-ios-head h1, .today-head h1 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.todo-smart-card span { font-size: 15px; }

/* To-do-Liste (React): Kopfzeile wie Tabellenkopf, Zellen mittelstark */
.todo-react-head {
  min-height: 48px;
  color: var(--muted);
  background: var(--surface);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}
.todo-react-main strong, .todo-react-relation a, .todo-react-relation strong { font-size: 14px; }
.today-chip strong { font-weight: 600; }

/* Loeschen-Symbole dezent: grau, erst beim Ueberfahren rot */
.danger-icon-button, button.danger-icon-button {
  width: 34px; min-width: 34px; min-height: 34px; padding: 0;
  color: var(--nav);
  background: var(--surface);
  border: 1px solid #e6e6e6;
  box-shadow: var(--shadow-btn);
}
.danger-icon-button:hover, button.danger-icon-button:hover {
  color: var(--danger);
  background: var(--tone-red-bg);
  border-color: color-mix(in srgb, var(--danger) 30%, #e6e6e6);
}
/* Die To-do-Zeile war bei 280 px Seitenleiste ~40 px zu breit – Spalten etwas schmaler */
@media (min-width: 1101px) {
  .todo-react-head,
  .todo-react-card {
    grid-template-columns: 22px minmax(200px, 1.45fr) minmax(150px, 0.95fr) minmax(112px, 0.55fr) minmax(90px, 0.5fr) minmax(130px, 0.8fr) minmax(80px, 0.45fr) 36px;
    gap: 14px;
    padding-left: 18px;
    padding-right: 14px;
  }
}

/* To-do-Kacheln: weiss, Farbe nur im Symbol */
.todo-smart-card,
.todo-smart-card[class*="todo-tone-"] {
  min-height: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.todo-smart-card:hover { transform: none; box-shadow: var(--shadow-md); }
.todo-smart-card.is-active,
.todo-smart-card.is-active[class*="todo-tone-"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.todo-smart-card strong { font-size: 19px; font-weight: 500; color: var(--text); }
.todo-smart-card span, .todo-smart-card b { font-weight: 500; }
.todo-smart-card svg { width: 20px; height: 20px; }

/* Kundenkarten: Aktionen klein und rechtsbuendig */
.entity-card h2 { font-size: 15px; }
.entity-head { align-items: flex-start; }
.entity-title { flex: 1; }
.entity-actions { flex: 0 0 auto; gap: 10px; font-size: 13px; color: var(--muted); }
.entity-actions a:hover { color: var(--text); }

/* --- Anmeldung ------------------------------------------------------------- */
.auth-shell { background: #f4f5f7; }
html[data-theme="dark"] .auth-shell { background: var(--bg); }
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.login-card h1 { font-size: 20px; font-weight: 500; }

/* --- Handy: Seitenleiste wird zur Tab-Leiste unten ------------------------ */
@media (max-width: 900px) {
  .topbar { padding: 10px 16px; min-height: 60px; }
  .topbar-copy { display: none; }
  .content { padding: 16px 16px 104px; }
  .content > .page-heading:first-child { margin: -16px -16px 16px; padding: 12px 16px; }
  .sidebar { background: transparent; border-right: 0; }
  .sidebar .nav-group {
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(10, 10, 12, 0.05);
  }
  .sidebar .nav-group a { color: var(--nav); background: transparent; font-size: 11.5px; font-weight: 500; }
  .sidebar .nav-group a.is-active { color: var(--text); background: transparent; font-weight: 600; }
  .sidebar .nav-group a.is-active svg, .sidebar .nav-group a.is-active i { color: var(--text); }
  .card { padding: 16px; }
  .sidebar-user { display: none; }
}
