/* Design aus dem Invoice Bot übernommen, ergänzt um Editor, Vorschau und Dialoge. */
:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-sidebar: #1c1c1e;
  --bg-table-head: #f5f5f7;
  --bg-hover: #fafafa;
  --bg-input: #ffffff;
  --bg-soft: #f2f2f4;
  --text: #1d1d1f;
  --text-muted: #888;
  --text-sidebar: #aeaeb2;
  --text-sidebar-active: #ffffff;
  --border: #d1d1d6;
  --border-table: #f0f0f0;
  --border-sidebar: #3a3a3c;
  --shadow: rgba(0,0,0,.08);
  --btn-secondary-bg: #e5e5ea;
  --btn-secondary-text: #333;
  --btn-secondary-hover: #d1d1d6;
  --sidebar-active-bg: #2c2c2e;
  --accent: #007aff;
  --danger: #E53935;
  --ok: #34c759;
  --warn-bg: #fff3cd;
  --warn-text: #664d03;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-card: #1c1c1e;
  --bg-sidebar: #111111;
  --bg-table-head: #2c2c2e;
  --bg-hover: #2c2c2e;
  --bg-input: #2c2c2e;
  --bg-soft: #2c2c2e;
  --text: #f5f5f7;
  --text-muted: #8e8e93;
  --border: #3a3a3c;
  --border-table: #2c2c2e;
  --border-sidebar: #2c2c2e;
  --shadow: rgba(0,0,0,.3);
  --btn-secondary-bg: #3a3a3c;
  --btn-secondary-text: #f5f5f7;
  --btn-secondary-hover: #48484a;
  --warn-bg: #3d3214;
  --warn-text: #ffd76a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-card: #1c1c1e;
    --bg-sidebar: #111111;
    --bg-table-head: #2c2c2e;
    --bg-hover: #2c2c2e;
    --bg-input: #2c2c2e;
    --bg-soft: #2c2c2e;
    --text: #f5f5f7;
    --text-muted: #8e8e93;
    --border: #3a3a3c;
    --border-table: #2c2c2e;
    --border-sidebar: #2c2c2e;
    --shadow: rgba(0,0,0,.3);
    --btn-secondary-bg: #3a3a3c;
    --btn-secondary-text: #f5f5f7;
    --btn-secondary-hover: #48484a;
    --warn-bg: #3d3214;
    --warn-text: #ffd76a;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); transition: background 0.2s, color 0.2s; }

#app { display: flex; height: 100vh; }

.sidebar { width: 210px; background: var(--bg-sidebar); color: #fff; padding: 20px 0; flex-shrink: 0; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar .logo { font-size: 15px; font-weight: 700; padding: 0 20px 18px; border-bottom: 1px solid var(--border-sidebar); line-height: 1.3; }
.sidebar .logo-sub { font-size: 11px; font-weight: 400; color: var(--text-sidebar); margin-top: 3px; }
.sidebar ul { list-style: none; margin-top: 10px; flex: 1; }
.sidebar li a { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; color: var(--text-sidebar); text-decoration: none; font-size: 14px; }
.sidebar li a:hover, .sidebar li a.active { background: var(--sidebar-active-bg); color: var(--text-sidebar-active); }
.sidebar li a.nav-cta { color: #fff; font-weight: 600; }
.nav-count { background: var(--danger); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.nav-count-muted { background: rgba(255,255,255,0.18); color: #fff; }
.sidebar-footer { padding: 12px 20px; border-top: 1px solid var(--border-sidebar); }
.theme-toggle { width: 100%; background: var(--sidebar-active-bg); color: var(--text-sidebar); border: none; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; text-align: left; }
.theme-toggle:hover { color: #fff; }
#timer-widget { padding: 12px 16px; border-top: 1px solid var(--border-sidebar); margin-top: 8px; }
.tw-label { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.tw-name { font-weight: 600; font-size: 13px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-clock { font-size: 20px; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; margin-bottom: 8px; }

#content { flex: 1; overflow-y: auto; padding: 30px; }

h1 { font-size: 24px; margin-bottom: 20px; }
h2 { font-size: 18px; margin-bottom: 14px; }
h3 { font-size: 15px; margin-bottom: 10px; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 30px; }
.card { background: var(--bg-card); border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px var(--shadow); }
.card .label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.card .value { font-size: 28px; font-weight: 700; }
.card .sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.card.danger .value { color: #ff3b30; }

table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px var(--shadow); }
th { background: var(--bg-table-head); text-align: left; padding: 10px 14px; font-size: 12px; text-transform: uppercase; color: var(--text-muted); }
td { padding: 10px 14px; border-top: 1px solid var(--border-table); font-size: 14px; vertical-align: middle; }
tr:hover td { background: var(--bg-hover); }
td.actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-erstellt, .badge-entwurf, .badge-offen { background: #e5e5ea; color: #555; }
.badge-verschickt { background: #d1ecf1; color: #0c5460; }
.badge-fällig { background: #f8d7da; color: #721c24; }
.badge-gemahnt { background: #fff3cd; color: #856404; }
.badge-bezahlt, .badge-angenommen { background: #d4edda; color: #155724; }
.badge-storniert, .badge-abgelehnt { background: #e5e5ea; color: #888; text-decoration: line-through; }
.badge-pt { background: #ede7f6; color: #4527a0; }
.badge-off { background: #e3f2fd; color: #0d47a1; }

button { padding: 8px 16px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-family: inherit; }
button:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0056b3; }
.btn-danger { background: #ff3b30; color: #fff; }
.btn-secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-text); }
.btn-secondary:hover { background: var(--btn-secondary-hover); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-xs { padding: 2px 8px; font-size: 12px; }
.btn-link { background: none; color: var(--accent); padding: 0; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.toolbar select, .toolbar input { width: auto; }

input, select, textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--bg-input); color: var(--text); font-family: inherit; }
input[type=checkbox], input[type=radio] { width: auto; padding: 0; margin-right: 6px; vertical-align: middle; }
label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; margin-top: 12px; }
label.inline { display: inline-flex; align-items: center; font-size: 14px; color: var(--text); margin: 0 16px 0 0; cursor: pointer; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg-card); border-radius: 16px; padding: 28px; width: 560px; max-width: calc(100vw - 40px); max-height: 85vh; overflow-y: auto; }
.modal h2 { margin-bottom: 16px; }
.modal-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; }

.banner { background: var(--warn-bg); color: var(--warn-text); padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.inline-form { background: var(--bg-soft); border-radius: 12px; padding: 16px; margin-bottom: 16px; max-width: 520px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1d1d1f; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; max-width: 80vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--danger); }

/* Editor */
.editor { display: grid; grid-template-columns: minmax(520px, 1fr) minmax(380px, 46%); gap: 20px; align-items: start; }
.editor-form .card { margin-bottom: 16px; }
.preview-pane { position: sticky; top: 0; height: calc(100vh - 60px); display: flex; flex-direction: column; }
.preview-pane .card { flex: 1; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.preview-info { font-size: 12px; color: var(--text-muted); padding: 10px 14px; border-bottom: 1px solid var(--border-table); }
.preview-pane iframe { flex: 1; width: 100%; border: 0; background: #e5e5ea; }
.preview-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 14px; padding: 20px; text-align: center; }
.seg { display: inline-flex; background: var(--btn-secondary-bg); border-radius: 9px; padding: 2px; }
.seg button { background: none; color: var(--btn-secondary-text); padding: 6px 16px; border-radius: 7px; }
.seg button.on { background: var(--bg-card); box-shadow: 0 1px 3px var(--shadow); font-weight: 600; }
.pos-table { box-shadow: none; border: 1px solid var(--border-table); }
.pos-table td { padding: 6px 6px; border-top: 1px solid var(--border-table); }
.pos-table th { padding: 8px 6px; }
.pos-table input { padding: 6px 8px; font-size: 13px; }
.pos-table .sum { text-align: right; font-weight: 600; white-space: nowrap; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { background: var(--btn-secondary-bg); color: var(--btn-secondary-text); padding: 3px 10px; font-size: 12px; border-radius: 14px; }
.chip:hover { background: var(--btn-secondary-hover); }
.date-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--btn-secondary-bg); border-radius: 14px; padding: 3px 4px 3px 10px; font-size: 13px; margin: 0 6px 6px 0; }
.date-chip button { background: none; padding: 0 6px; color: var(--text-muted); font-size: 14px; }
.total-line { font-size: 22px; font-weight: 700; text-align: right; margin: 6px 0 12px; }
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; margin-top: 4px; background: var(--bg-card); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.18); min-width: 220px; z-index: 50; padding: 6px; max-height: 360px; overflow-y: auto; }
.dropdown-menu.open { display: block; }
.dropdown-menu button { display: block; width: 100%; text-align: left; background: none; color: var(--text); padding: 7px 10px; border-radius: 6px; font-size: 13px; }
.dropdown-menu button:hover { background: var(--bg-hover); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--border-table); margin: 4px 0; }

.changelog-entry { border-left: 3px solid var(--danger); padding-left: 20px; margin-bottom: 32px; }
.changelog-entry ul { margin: 0; padding-left: 20px; line-height: 1.8; }

@media print {
  .sidebar, .toolbar, button { display: none !important; }
  #content { padding: 0; overflow: visible; }
  #app { height: auto; }
}

/* E-Mail-Dialog */
.ml-templates { display: flex; flex-direction: column; gap: 4px; }
.ml-tpl { margin: 0; }
.ml-preview { background: var(--bg-soft); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; }
.ml-subject { font-weight: 600; }
.ml-missing { background: transparent; color: var(--danger); font-weight: 700; }
.ml-blockers { color: var(--danger); font-size: 13px; margin: 10px 0 0 18px; }
.drop-zone { border: 2px dashed var(--border); border-radius: 10px; padding: 18px; text-align: center; cursor: pointer; font-size: 14px; }
.drop-zone:hover, .drop-zone.drop-over { border-color: var(--accent, #0a84ff); background: var(--bg-soft); }
.sig-edit { min-height: 90px; border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: #fff; color: #1d1d1f; font-family: Arial, Helvetica, sans-serif; font-size: 14px; overflow: auto; }
.sig-edit:focus { outline: 2px solid var(--accent); }
.sig-edit img { max-width: 100%; }
.ml-sig { width: 100%; height: 160px; border: 1px solid var(--border); border-radius: 8px; margin-top: 6px; background: #fff; }
/* Signatur im Einfügefeld so zeigen wie in der Mail: Programm-Stile (Tabellen, Links) nicht anwenden */
.sig-edit * { all: revert; }

/* Social Media */
.modal-wide { width: 980px; max-height: 90vh; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--bg-card); }
.tile-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.tile-state { font-size: 12px; font-weight: 600; white-space: nowrap; }
.tile-ok { border-color: var(--ok); }
.tile-ok .tile-state { color: #1e8e3e; }
.tile-open .tile-state { color: var(--text-muted); }
.tile-planned { opacity: .55; border-style: dashed; }
.ampel { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; background: var(--btn-secondary-bg); border: 1px solid var(--border); }
.ampel-gruen { background: #34c759; border-color: #2a9d48; }
.ampel-gelb { background: #ffcc00; border-color: #d4a900; }
.ampel-rot { background: #ff3b30; border-color: #c62828; }
.kpi .value { font-size: 26px; }
.kpi-arrow { font-weight: 700; margin-right: 4px; }
.kpi-good { color: #1e8e3e; }
.kpi-bad { color: var(--danger); }
.kpi-flat { color: var(--text-muted); }
.chart-box { background: var(--bg-card); border-radius: 12px; padding: 14px; box-shadow: 0 1px 4px var(--shadow); }
.chart-box svg { width: 100%; height: auto; display: block; }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-label { fill: var(--text-muted); font-size: 11px; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart-dot { fill: var(--accent); }
.chart-target { stroke: #ff9500; stroke-width: 1.5; stroke-dasharray: 5 4; }
.progress { height: 10px; border-radius: 6px; background: var(--btn-secondary-bg); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); }
.report-text { width: 100%; min-height: 70px; font-size: 14px; line-height: 1.5; }

/* Seitenleiste: Bereiche */
.sidebar ul.nav { list-style: none; margin-top: 10px; flex: 0 0 auto; }
.sidebar ul.nav-bottom { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border-sidebar); }
.nav-group > ul { list-style: none; display: none; margin-top: 0; flex: none; }
.nav-group.open > ul { display: block; }
.nav-group-head { display: flex; align-items: center; gap: 6px; width: 100%; background: none; color: #fff; border-radius: 0;
  padding: 12px 20px 6px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; text-align: left; }
.nav-group-head:hover { color: var(--text-sidebar-active); background: var(--sidebar-active-bg); }
.nav-chev { margin-left: auto; transition: transform .15s; color: var(--text-sidebar); }
.nav-group:not(.open) .nav-chev { transform: rotate(-90deg); }
.nav-group.open #nav-group-badge { display: none !important; }
.nav-group li a { padding-left: 28px; }
.sidebar li a.nav-sub { font-size: 13px; padding-left: 40px; }

/* Schloss im Logo */
.sidebar .logo { display: flex; gap: 10px; align-items: center; }
.logo-lock { width: 26px; height: 32px; flex: none; }

/* ── Handy & Tablet ───────────────────────────────────────────── */
.mobile-bar, #nav-backdrop { display: none; }
@media (max-width: 900px) {
  body { -webkit-text-size-adjust: 100%; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: fixed; top: 0; left: 0; right: 0; z-index: 90;
    height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0;
    background: var(--bg-sidebar); color: #fff; font-weight: 700; font-size: 16px; }
  .mobile-bar #menu-btn { background: none; color: #fff; font-size: 24px; padding: 6px 10px; min-width: 44px; min-height: 44px; }
  .mobile-lock { width: 20px; height: 25px; }
  #app { height: auto; min-height: 100vh; display: block; padding-top: calc(52px + env(safe-area-inset-top)); }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; width: 270px; max-width: 85vw;
    transform: translateX(-105%); transition: transform .2s ease; padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom); }
  body.menu-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.5); }
  body.menu-open #nav-backdrop { display: block; position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.45); }
  .sidebar li a, .nav-group-head { min-height: 44px; }
  #content { padding: 16px 12px calc(24px + env(safe-area-inset-bottom)); overflow: visible; }
  h1 { font-size: 21px; margin-bottom: 14px; }

  /* Eingaben: 16px verhindert das automatische Zoomen auf dem iPhone */
  input, select, textarea { font-size: 16px; }
  button { min-height: 40px; }
  .btn-sm, .btn-xs { min-height: 34px; }
  .row { flex-direction: column; gap: 0; }
  .toolbar { gap: 8px; }
  .toolbar > * { flex: 1 1 auto; }
  .toolbar input[type=search] { width: 100% !important; }

  /* Tabellen seitlich wischen statt quetschen */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  td.actions { flex-wrap: nowrap; }

  .cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .card { padding: 14px; }
  .card .value { font-size: 22px; }

  /* Fenster (Dialoge) als Vollbild-Blatt */
  .modal-overlay { align-items: flex-end; }
  .modal, .modal-wide { width: 100% !important; max-width: 100vw; max-height: 92vh; border-radius: 16px 16px 0 0;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom)); }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions button { flex: 1 1 auto; }
  .seg { display: flex; overflow-x: auto; max-width: 100%; }
  .seg button { white-space: nowrap; }

  /* Editor einspaltig, Vorschau unten */
  .editor { grid-template-columns: 1fr; }
  .preview-pane { position: static; height: 70vh; }
  .tiles { grid-template-columns: 1fr 1fr; }
  #toast { bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 92vw; }
  #timer-widget { display: none !important; }
}
@media (max-width: 420px) {
  .tiles { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .chart-box > div:first-child { flex-wrap: wrap; }
  .chart-box > div:first-child strong { flex: 1 1 100%; }
  .chart-box select { width: 100% !important; }
}

/* Belege */
.scan-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.scan-btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 20px; border-radius: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer; margin: 0; color: inherit; }
label.btn-primary.scan-btn { color: #fff; }
.beleg-month { margin-bottom: 18px; }
.beleg-month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 2px; }
.beleg-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--bg-card); color: var(--text);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; box-shadow: 0 1px 3px var(--shadow); }
.beleg-row:hover { background: var(--bg-hover); }
.beleg-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; background: var(--bg-soft); }
.beleg-thumb.pdf { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--danger); }
.beleg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.beleg-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beleg-amount { text-align: right; font-weight: 600; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.beleg-preview { width: 100%; max-height: 45vh; object-fit: contain; border-radius: 10px; background: var(--bg-soft); }
@media (max-width: 900px) { .scan-actions .scan-btn { flex: 1 1 100%; } }

/* Dashboard: Schnellknöpfe, Heute, Kalender, Ampel */
.dash-date { display: block; font-size: 14px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 18px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px 8px;
  border-radius: 14px; background: var(--bg-card); color: var(--text); box-shadow: 0 1px 3px var(--shadow);
  font-size: 14px; font-weight: 600; cursor: pointer; margin: 0; min-height: 84px; text-align: center; }
.quick-btn:hover { background: var(--bg-hover); }
.quick-btn .qi { font-size: 26px; line-height: 1; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-box { background: var(--bg-card); border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 3px var(--shadow); margin-bottom: 14px; }
.dash-box h2 { font-size: 17px; margin: 0 0 10px; }
.dash-h { margin-top: 18px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; color: var(--text);
  padding: 10px 8px; border-radius: 10px; border-left: 4px solid transparent; font-size: 14px; }
.todo-item:hover { background: var(--bg-hover); }
.todo-item.tone-rot { border-left-color: #ff3b30; }
.todo-item.tone-orange { border-left-color: #ff9500; }
.todo-item.tone-blau { border-left-color: #007aff; }
.todo-icon { font-size: 18px; flex: none; }
.todo-go { margin-left: auto; color: var(--text-muted); font-size: 20px; }
.todo-done { color: #34c759; font-weight: 600; margin: 6px 0; }
.cal-day { padding: 6px 0 8px; border-bottom: 1px solid var(--border); }
.cal-day:last-child { border-bottom: 0; }
.cal-day-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 4px; }
.cal-today .cal-day-name { color: #007aff; }
.cal-ev { display: flex; gap: 10px; padding: 3px 0; font-size: 14px; }
.cal-time { flex: none; width: 62px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ampel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ampel-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--bg-soft);
  color: var(--text); font-size: 14px; }
.ampel-chip:hover { background: var(--bg-hover); }
@media (max-width: 900px) {
  .quick { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; gap: 0; }
  .dash-date { font-size: 13px; }
}
