/* ======================================================================
   AUFBAU DIESER DATEI (Stand 1.5.2) – Reihenfolge = Priorität, spätere Regeln überschreiben frühere
   1. Grundstile (Farben, Karten, Formulare, Tabellen)            – Zeilen oben
   2. CI kopfdenker.de (Orange #E75214, #333)                    – Abschnitt „Corporate Design“
   3. Funktionsblöcke: Kalender, Board, Timer-Fenster, Suche …    – je ein kommentierter Abschnitt
   4. „1.5.1 – Mobil & Konsistenz“ und „1.5.2 – …“               – zentrale Schicht für Smartphone/Tablet,
      Kontraste, Touch-Größen, Fokus. Hier zuerst nachsehen, wenn etwas auf dem Handy anders aussieht.
   Breakpoints (nur diese): 560 (kleines Handy) · 700 (Handy: Karten statt Tabellen, Board-Tabs) · 900 (einspaltig) ·
   1199 (kompakte Kopfzeile mit Seitenmenü; ab 1200 volle Navigation) · 1500 (Timer-Name in der Kopfzeile).
   Touch-Regeln hängen zusätzlich an (pointer: coarse), damit auch Tablets große Tippflächen bekommen.
   ====================================================================== */
:root {
  --bg: #f4f6f8; --surface: #fff; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --brand: #0f766e; --brand-d: #0b5d57; --brand-l: #ccfbf1;
  --blue: #1d4ed8; --blue-l: #dbeafe; --red: #b91c1c; --red-l: #fee2e2;
  --yellow: #a16207; --yellow-l: #fef3c7; --green: #15803d; --green-l: #dcfce7;
  --pink: #be185d; --pink-l: #fce7f3; --grey-l: #f1f5f9;
  --radius: 12px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.45; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 .15rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
code { background: var(--grey-l); padding: .1em .4em; border-radius: 5px; font-size: .9em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; }
.neg { color: var(--red); } .pos { color: var(--green); } .warn { color: var(--yellow); }
.inline { display: inline; margin: 0; }

/* Layout */
.topbar { display: flex; align-items: center; gap: 1.25rem; padding: .6rem 1.25rem; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); font-size: 1.05rem; } .brand:hover { text-decoration: none; }
.logo { color: var(--brand); margin-right: .2rem; }
.nav { display: flex; gap: .15rem; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: .4rem .75rem; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--grey-l); text-decoration: none; color: var(--ink); }
.nav a.on { background: var(--brand-l); color: var(--brand-d); }
.topright { display: flex; align-items: center; gap: .6rem; }
.icon-link { font-size: 1.2rem; color: var(--muted); } .icon-link:hover { text-decoration: none; color: var(--ink); }
.container { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.container.narrow { max-width: 460px; padding-top: 4rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.page-head p { margin: 0; }
.crumb { font-size: .85rem; color: var(--muted); margin: 0 0 .1rem !important; }
.actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.grid-2-wide-left { grid-template-columns: 1.7fr 1fr; } .grid-2-wide-right { grid-template-columns: 1fr 1.5fr; }
.col { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
@media (max-width: 900px) { .grid-2, .grid-2-wide-left, .grid-2-wide-right { grid-template-columns: 1fr; } }

/* Karten */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; } .card .pad { padding: 1rem 1.2rem 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.card-head h2 { margin: 0; }
.card-pink { background: #fff7fb; border-color: #f9c4de; } .card-green { background: #f3fcf6; border-color: #b7ebc8; }
.center-card { text-align: center; max-width: 520px; margin: 3rem auto; padding: 2rem; }
.auth-card { padding: 2rem; text-align: center; } .auth-card form { text-align: left; margin-top: 1rem; }
.auth-logo { font-size: 2.4rem; color: var(--brand); line-height: 1; }
.danger-zone { margin-top: 2rem; text-align: right; }

/* Buttons & Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .5rem .95rem; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.btn:hover { background: var(--grey-l); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn-primary:hover { background: var(--brand-d); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); } .btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: .3rem .65rem; font-size: .85rem; } .btn-block { display: flex; width: 100%; cursor: pointer; list-style: none; }
summary.btn::-webkit-details-marker, summary::-webkit-details-marker { display: none; }
.link-btn { background: none; border: 0; padding: 0; margin: 0 .5rem 0 0; font: inherit; font-size: .85rem; color: var(--brand); cursor: pointer; }
.link-btn:hover { text-decoration: underline; } .link-btn.danger, .danger { color: var(--red); }
label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: #334155; }
label.check-inline { flex-direction: row; align-items: center; gap: .45rem; font-weight: 500; font-size: .92rem; color: var(--ink); }
input, select, textarea { font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
  padding: .5rem .65rem; width: 100%; min-width: 0; }
input[type=checkbox], input[type=radio] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-l); border-color: var(--brand); }
textarea { resize: vertical; }
.stack { display: flex; flex-direction: column; gap: .8rem; } .form-wide { max-width: 820px; }
.row { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; } .row > label { flex: 1 1 140px; } .row .grow { flex: 2 1 220px; }
.row.tight { gap: .4rem; flex-wrap: nowrap; } .row.radios { align-items: center; }
.w-140 { width: 140px !important; }
.fieldset { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .7rem; }
.fieldset legend { font-weight: 600; font-size: .85rem; padding: 0 .4rem; color: #334155; }
.filters { display: flex; gap: .6rem; margin-bottom: 1rem; align-items: flex-end; flex-wrap: wrap; }
.filters input[type=search], .filters select { width: auto; min-width: 180px; } .filters-wrap label { flex: 0 1 auto; } .filters-wrap input, .filters-wrap select { width: auto; }
.pop { margin-top: .6rem; padding: .8rem; background: var(--grey-l); border-radius: 10px; }
details.inline-details { position: relative; } details.inline-details[open] > .pop { position: absolute; right: 0; z-index: 10; width: min(380px, 90vw); box-shadow: 0 8px 24px rgba(15,23,42,.15); background: #fff; border: 1px solid var(--line); }
details.mini { margin-top: .3rem; } details.mini > summary { cursor: pointer; list-style: none; display: inline; }
details > summary { cursor: pointer; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .65rem .9rem; border-bottom: 1px solid var(--line); background: #fafbfc; }
.table td { padding: .65rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; } .table tbody tr:hover { background: #fafcfc; }
.table.compact td, .table.compact th { padding: .5rem .6rem; } .num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card:not(.flush) .table { margin: 0 -.6rem; width: calc(100% + 1.2rem); }

/* Badges etc. */
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; vertical-align: middle; margin-left: .25rem; white-space: nowrap; }
.badge-blue { background: var(--blue-l); color: var(--blue); } .badge-pink { background: var(--pink-l); color: var(--pink); }
.badge-green { background: var(--green-l); color: var(--green); } .badge-grey { background: var(--grey-l); color: var(--muted); }
.pill { display: inline-block; min-width: 1.25rem; text-align: center; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .05rem .4rem; margin-left: .35rem; }
.pill-pink { background: var(--pink); color: #fff; }
.count { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--grey-l); border-radius: 999px; padding: .05rem .5rem; }
.light { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: middle; }
.light-green { background: #22c55e; } .light-yellow { background: #eab308; } .light-red { background: #ef4444; } .light-grey { background: #cbd5e1; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; width: 90px; margin-bottom: .2rem; }
.progress > span { display: block; height: 100%; background: var(--brand); } .progress.over > span { background: var(--red); }
dl.facts { display: grid; grid-template-columns: 110px 1fr; gap: .45rem .8rem; margin: 0; } dl.facts dt { color: var(--muted); font-size: .85rem; } dl.facts dd { margin: 0; min-width: 0; }
.notice { padding: .65rem .9rem; border-radius: 10px; margin: .8rem 0; font-size: .9rem; }
.notice-pink { background: var(--pink-l); color: #831843; } .notice-red { background: var(--red-l); color: #7f1d1d; } .notice-yellow { background: var(--yellow-l); color: #713f12; }
.empty { color: var(--muted); text-align: center; padding: 1.4rem 1rem; margin: 0; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tab { padding: .55rem .9rem; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { text-decoration: none; color: var(--ink); } .tab.on { color: var(--brand-d); border-bottom-color: var(--brand); } .tab-pink .count { background: var(--pink-l); color: var(--pink); }
.monthnav { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; flex-wrap: wrap; } .monthnav b { min-width: 9rem; text-align: center; font-size: 1.05rem; }

/* Flash */
.flashes { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.flash { padding: .7rem 1rem; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; }
.flash-ok { background: var(--green-l); color: #14532d; } .flash-error { background: var(--red-l); color: #7f1d1d; }
.flash-x { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: .6; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; display: flex; flex-direction: column; color: var(--ink); box-shadow: var(--shadow); }
a.kpi:hover { text-decoration: none; border-color: var(--brand); }
.kpi-v { font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; } .kpi-l { color: var(--muted); font-size: .82rem; }
.kpi-alert { border-color: #fca5a5; background: #fff5f5; } .kpi-alert .kpi-v { color: var(--red); }
.kpi-pink { border-color: #f9c4de; background: #fff7fb; } .kpi-pink .kpi-v { color: var(--pink); }

/* Aufgaben */
.tasks, .plain { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: flex-start; gap: .65rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; } .task-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.check { width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 2px solid #94a3b8; background: #fff; cursor: pointer; padding: 0; color: #fff; font-size: .8rem; line-height: 1; flex: none; margin-top: .1rem; }
.check:hover { border-color: var(--brand); background: var(--brand-l); } .task.done .check { background: var(--brand); border-color: var(--brand); }
.due { font-size: .78rem; font-weight: 600; padding: .1rem .5rem; border-radius: 6px; background: var(--grey-l); color: var(--muted); white-space: nowrap; }
.due-late { background: var(--red-l); color: var(--red); } .due-today { background: var(--blue-l); color: var(--blue); }
.sec { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; margin: 1rem 0 .2rem; font-weight: 700; } .sec:first-of-type { margin-top: 0; }
.sec-red { color: var(--red); } .sec-blue { color: var(--blue); } .sec-teal { color: var(--brand); } .sec-grey { color: var(--muted); }
summary.sec { list-style: none; } summary.sec::before { content: "▸ "; } details[open] > summary.sec::before { content: "▾ "; }
.add-task { display: flex; gap: .5rem; margin-bottom: .6rem; align-items: flex-start; } .add-task textarea { min-height: 2.4rem; height: 2.4rem; } .add-task input[type=date] { width: 150px; flex: none; } .add-task .btn { flex: none; }
.task-edit { margin: 0; } .task-edit > summary { font-size: 1rem; } .task-edit[open] { flex-basis: 100%; }
.split { display: flex; justify-content: space-between; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); } .split:last-child { border-bottom: 0; }
.invoice-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid #f9d4e6; flex-wrap: wrap; } .invoice-row:last-child { border-bottom: 0; }

/* Timer */
.timer-chip { display: inline-flex; align-items: center; gap: .45rem; background: #fef2f2; color: var(--red); border: 1px solid #fecaca; padding: .25rem .7rem; border-radius: 999px; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .88rem; }
.timer-chip:hover { text-decoration: none; } .timer-name { color: var(--muted); font-weight: 500; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: #ef4444; animation: pulse 1.4s infinite; } @keyframes pulse { 50% { opacity: .25; } }
.timer-big { font-size: 2.6rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--brand-d); }

/* Kunden: Zugangsdaten & Notizen */
.cred, .note { padding: .7rem 0; border-top: 1px solid var(--line); } .cred:first-of-type, .note:first-of-type { border-top: 0; }
.cred-head { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; } .cred-line { display: flex; gap: .5rem; align-items: center; margin-top: .2rem; flex-wrap: wrap; }
.cred-line .muted { width: 62px; } .pw { letter-spacing: .02em; word-break: break-all; }
.note-head { display: flex; gap: .6rem; align-items: baseline; margin-bottom: .2rem; } .note-date { font-size: .8rem; color: var(--muted); background: var(--grey-l); padding: .05rem .5rem; border-radius: 6px; }

/* Kalender */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-h { background: #fafbfc; padding: .45rem; text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.cal-d { background: var(--surface); min-height: 112px; padding: .35rem .4rem; display: flex; flex-direction: column; gap: 3px; color: var(--ink); overflow: hidden; }
.cal-d:hover { text-decoration: none; background: #f8fffe; } .cal-d.other { background: #f8fafc; opacity: .55; } .cal-d.weekend { background: #fcfcfd; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--brand); } .cal-n { font-weight: 700; font-size: .85rem; } .cal-d.today .cal-n { color: var(--brand-d); }
.cal-sum { position: absolute; } .cal-d { position: relative; } .cal-sum { top: .3rem; right: .4rem; font-size: .72rem; font-weight: 700; color: var(--brand-d); background: var(--brand-l); padding: 0 .35rem; border-radius: 5px; }
.chip { display: block; font-size: .72rem; line-height: 1.25; padding: .12rem .35rem; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-time { background: var(--brand-l); color: var(--brand-d); } .chip-task { background: var(--blue-l); color: var(--blue); } .chip-task.done { background: var(--grey-l); color: var(--muted); text-decoration: line-through; }
.cal-more { font-size: .7rem; color: var(--muted); } .legend { margin: .4rem 0 .7rem; } .legend .chip { display: inline-block; }
@media (max-width: 700px) { .cal-sum { display: none; } }

/* Mobil */
@media (max-width: 700px) {
  .table th, .table td { padding: .5rem .5rem; } .card.flush { overflow-x: auto; }
}

/* ======================================================================
   Corporate Design kopfdenker.de: Orange #E75214, Text #333333, Weiß/Schwarz,
   eckige Flächen, schlichte Typografie (Neo Sans Pro, falls installiert)
   ====================================================================== */
:root {
  --bg: #f2f2f2; --ink: #333333; --muted: #6f6f6f; --line: #dedede;
  --brand: #E75214; --brand-d: #c4430d; --brand-l: #fde8dd;
  --pink: #c4430d; --pink-l: #fde8dd;
  --radius: 2px; --shadow: 0 1px 2px rgba(0,0,0,.06);
  --font: "Neo Sans Pro", "Neo Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
body { font-family: var(--font); background: var(--bg); color: var(--ink); }
h1 { font-weight: 500; font-size: 1.7rem; } h2 { font-weight: 500; letter-spacing: .2px; }
.topbar { background: #333; border-bottom: 3px solid var(--brand); }
.brand { color: #fff; display: inline-flex; align-items: center; gap: .5rem; }
.logo { display: inline-block; width: .85rem; height: .85rem; background: var(--brand); margin-right: .1rem; }
.brand-logo { height: 28px; width: auto; max-width: 160px; background: #fff; padding: 2px 6px; }
.brand-text { font-weight: 500; letter-spacing: .3px; }
.nav a { color: #d6d6d6; border-radius: 0; font-weight: 500; }
.nav a:hover { background: #4a4a4a; color: #fff; }
.nav a.on { background: var(--brand); color: #fff; }
.topright .btn-ghost { color: #d6d6d6; } .topright .btn-ghost:hover { color: #fff; background: #4a4a4a; }
.pill-pink { background: var(--brand); } .nav a.on .pill-pink { background: #fff; color: var(--brand-d); }
.btn { border-radius: 2px; } .btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-l); border-color: var(--brand); }
input, select, textarea { border-radius: 2px; }
.tab.on { color: var(--brand-d); border-bottom-color: var(--brand); }
a { color: var(--brand-d); }
.table th { background: #f7f7f7; color: #555; }
.badge-blue { background: #e8e8e8; color: #333; }
.kpi-v { color: var(--ink); } a.kpi:hover { border-color: var(--brand); }
.timer-big { color: var(--brand-d); }
.progress > span { background: var(--brand); }
.check:hover { border-color: var(--brand); background: var(--brand-l); } .task.done .check { background: var(--brand); border-color: var(--brand); }
.chip-time { background: var(--brand-l); color: var(--brand-d); }
.cal-sum { background: var(--brand-l); color: var(--brand-d); }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--brand); } .cal-d.today .cal-n { color: var(--brand-d); }
.auth-logo { width: 2.2rem; height: 2.2rem; background: var(--brand); margin: 0 auto .4rem; }
.auth-img { max-height: 70px; max-width: 220px; margin-bottom: .6rem; }
.logo-preview { background: #fff; border: 1px dashed var(--line); padding: .6rem; text-align: center; } .logo-preview img { max-height: 60px; max-width: 100%; }

/* ---- Neue Bausteine ---- */
.play { width: 1.7rem; height: 1.7rem; border: 0; border-radius: 50%; background: var(--brand); color: #fff; font-size: .65rem; cursor: pointer; flex: none; padding: 0 0 0 2px; line-height: 1; }
.play:hover { background: var(--brand-d); }
.running-tag { font-size: .75rem; font-weight: 700; color: var(--brand-d); background: var(--brand-l); padding: .15rem .5rem; white-space: nowrap; }
.task.is-running { background: #fff6f1; box-shadow: inset 3px 0 0 var(--brand); padding-left: .5rem; }
.h2-summary { font-weight: 500; font-size: 1.05rem; list-style: none; cursor: pointer; } .h2-summary::before { content: "▸ "; } details[open] > .h2-summary::before { content: "▾ "; }
.pop-flat { margin-top: .8rem; } .tip { margin: .6rem 0 0; }
.chip-appt { background: #333; color: #fff; }
.add-task-wide select { width: 240px; flex: none; }
.note.appt { border-left: 3px solid #333; padding-left: .7rem; }

/* ---- Wochenansicht ---- */
.week { background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.week-row { display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); }
.week-head { background: #fafafa; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
.week-day { padding: .45rem .5rem; color: var(--ink); border-left: 1px solid var(--line); font-weight: 600; display: flex; gap: .35rem; align-items: baseline; flex-wrap: wrap; }
.week-day:hover { text-decoration: none; background: #f0f0f0; } .week-day .wd { color: var(--muted); font-size: .78rem; text-transform: uppercase; } .week-day.today { background: var(--brand-l); color: var(--brand-d); }
.week-axis-h { padding: .45rem .3rem; text-align: right; } 
.week-allday { border-bottom: 1px solid var(--line); background: #fcfcfc; }
.week-cell { border-left: 1px solid var(--line); padding: 3px; display: flex; flex-direction: column; gap: 2px; min-height: 26px; } .week-cell.today { background: #fff9f5; }
.week-cell .chip { display: block; }
.week-body { position: relative; }
.week-axis { position: relative; } .week-axis span { position: absolute; right: 6px; transform: translateY(-50%); font-size: .7rem; color: var(--muted); background: var(--surface); padding: 0 2px; }
.week-axis span:first-child { transform: none; }
.week-col { position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, #ececec 47px, #ececec 48px); }
.week-col.weekend { background-color: #fafafa; } .week-col.today { background-color: #fffaf6; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #d11; z-index: 2; } .now-line::before { content: ""; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #d11; }
.slot { position: absolute; box-sizing: border-box; padding: 2px 5px; font-size: .74rem; line-height: 1.25; overflow: hidden; border-left: 3px solid var(--brand); background: var(--brand-l); color: #5a1d05; z-index: 1; border-radius: 2px; box-shadow: 0 0 0 1px #fff; }
.slot:hover { text-decoration: none; z-index: 4; box-shadow: 0 2px 8px rgba(0,0,0,.25); overflow: visible; }
.slot-appt { background: #333; color: #fff; border-left-color: #000; } .slot .slot-sub { display: block; opacity: .85; font-size: .68rem; }
.slot-time b, .slot-appt b { font-weight: 600; }
@media (max-width: 900px) { .week-row { grid-template-columns: 44px repeat(7, 120px); } }

/* ---- Sicherheitscheck ---- */
.checks { list-style: none; margin: 1rem 0; padding: 0; } .checks li { display: flex; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.check-icon { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; flex: none; background: var(--grey-l); }
.check-ok .check-icon { background: var(--green-l); color: var(--green); } .check-warn .check-icon { background: var(--yellow-l); color: var(--yellow); } .check-bad .check-icon { background: var(--red-l); color: var(--red); }

/* Kopfleiste kompakt halten (eine Zeile auch mit Logo und Timer) */
.topbar { gap: .9rem; flex-wrap: nowrap; padding: .5rem 1rem; }
.nav { flex-wrap: nowrap; gap: .05rem; min-width: 0; } .nav a { padding: .4rem .6rem; font-size: .94rem; white-space: nowrap; }
.brand-text { font-size: .98rem; white-space: nowrap; } .topright { flex: none; } .timer-chip { white-space: nowrap; }

/* ---- Roadmap 1.5: Tags, Schnellmenü, Board, Suche ---- */
.tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: .05rem .4rem; margin-left: .25rem; border-radius: 2px; background: var(--grey-l); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.tag-prio1 { background: #fde2e2; color: #a11; } .tag-prio3 { background: #eef1f4; color: #7a8591; }
.tag-doing { background: var(--brand-l); color: var(--brand-d); } .tag-waiting { background: #fff3cd; color: #8a6200; }
.tag-recur { background: #e8eefc; color: #2c4a9a; } .tag-cl { background: #eef6ee; color: #2d6a2d; } .tag-nb { background: #f0e8f7; color: #6a3a8a; }
.task.prio-1:not(.done) { box-shadow: inset 3px 0 0 #d33; padding-left: .5rem; }
.task-link { color: inherit; } .task-link:hover { color: var(--brand); }
.is-done { text-decoration: line-through; color: var(--muted); }
.quick { position: relative; margin: 0; } .quick > summary { font-size: 1.1rem; padding: 0 .3rem; }
.quick[open] > .quick-pop { position: absolute; right: 0; z-index: 20; width: 260px; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.quick-pop .quick-group { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .5rem; align-items: center; } .quick-pop .quick-group b { width: 100%; font-size: .72rem; text-transform: uppercase; color: var(--muted); }
.quick-pop button { border: 1px solid var(--line); background: #fff; padding: .2rem .5rem; font-size: .8rem; cursor: pointer; } .quick-pop button:hover { border-color: var(--brand); color: var(--brand-d); }
.progress { height: 6px; background: var(--grey-l); margin-bottom: .6rem; } .progress span { display: block; height: 100%; background: var(--brand); }
.topsearch { margin: 0; } .topsearch input { width: 150px; padding: .3rem .6rem; font-size: .88rem; transition: width .15s; } .topsearch input:focus { width: 230px; }
mark { background: #ffe9a8; color: inherit; padding: 0 1px; }
.search-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); } .search-list li:last-child { border-bottom: 0; }
.board { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: .8rem; align-items: start; overflow-x: auto; }
.board-col { background: #ebebeb; padding: .6rem; min-height: 180px; border: 2px dashed transparent; } .board-col.drop { border-color: var(--brand); background: var(--brand-l); }
.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; min-height: 40px; }
.board-card { background: #fff; padding: .55rem .65rem; border-left: 3px solid var(--line); box-shadow: var(--shadow); cursor: grab; display: block; } .board-card.prio-1 { border-left-color: #d33; } .board-card.dragging { opacity: .4; }
.board-card .task-link { font-weight: 600; display: block; }
.board-meta { margin-top: .25rem; } .board-move { margin-top: .3rem; display: flex; gap: .25rem; } .board-move button { border: 1px solid var(--line); background: #fff; cursor: pointer; padding: 0 .45rem; }
.board-empty { color: var(--muted); text-align: center; padding: .5rem; }
.quick-capture textarea { min-height: 2.4rem; height: 2.4rem; }
.add-task-multi { flex-wrap: wrap; }
.add-task-multi textarea { flex: 1 1 100%; }
.add-task-multi select, .add-task-wide.add-task-multi select { width: auto; flex: 1 1 140px; min-width: 120px; max-width: 260px; }
.add-task-multi input[type=date] { flex: none; width: 150px; }

/* ---- Timer-Fenster (Widget) ---- */
body.widget { margin: 0; background: #333; color: #fff; min-height: 100vh; }
.tw { padding: .8rem .9rem; display: flex; flex-direction: column; gap: .5rem; font-size: .9rem; }
.tw-project { font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; } .tw-sub { color: #cfcfcf; font-size: .8rem; overflow-wrap: anywhere; }
.tw-title { font-weight: 700; } .tw-muted { color: #bbb; padding: 1rem; }
.tw-time { font-size: 2.6rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; line-height: 1.1; color: #fff; margin: .2rem 0; }
.tw-time.paused { color: #f1a37f; } .tw-badge { text-align: center; color: #f1a37f; font-weight: 600; font-size: .8rem; }
.tw-row { display: flex; gap: .5rem; } .tw-row .tw-btn { flex: 1; }
.tw-btn { border: 1px solid #777; background: #4a4a4a; color: #fff; padding: .55rem .6rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 40px; border-radius: 0; }
.tw-btn:hover { background: #5a5a5a; } .tw-primary { background: var(--brand); border-color: var(--brand); } .tw-primary:hover { background: var(--brand-d); } .tw-stop { background: #8b2a1a; border-color: #8b2a1a; } .tw-stop:hover { background: #a63322; }
.tw-select, .tw-note { width: 100%; padding: .5rem; font: inherit; min-height: 38px; background: #fff; color: #333; border: 1px solid #aaa; border-radius: 0; }
.tw-check { font-size: .85rem; color: #ddd; } .tw-link { background: none; border: 0; color: #cfcfcf; text-decoration: underline; cursor: pointer; font: inherit; font-size: .78rem; padding: .2rem; text-align: center; }
.tw-flash { padding: .4rem .6rem; font-size: .82rem; background: #2d6a2d; } .tw-flash.error { background: #8b2a1a; }

/* ======================================================================
   1.5.1 – Mobil & Konsistenz (zentrale Schicht, überschreibt ältere Regeln)
   ====================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, svg, video { max-width: 100%; }
h1, h2, h3, .task-title, .crumb, .badge, .note-head b, .cred-head { overflow-wrap: anywhere; }
.page-head > div, .task-main, .card-head > *, .split > *, .invoice-row > div, .row > label, .col, .card, .grow { min-width: 0; }
select, input, textarea, button { font-family: inherit; }
input[type=date], input[type=time], input[type=month] { -webkit-appearance: none; appearance: none; min-height: 2.45rem; }
select { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 1.9rem; }
.muted, .small.muted { color: #666; }
.small { font-size: .85rem; } .count { font-size: .78rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-scroll > .table:not(.rtable) { min-width: 560px; }
@media (min-width: 701px) { .table-scroll > .table.rtable { min-width: 720px; } }
.card:not(.flush) .table-scroll > .table { margin: 0; width: 100%; }
.btn, button.btn { min-height: 2.45rem; } .btn-sm { min-height: 2.1rem; }

/* Kopfzeile */
.nav-toggle, .search-toggle, .nav-logout, .nav-backdrop { display: none; }
.icon-btn { background: none; border: 0; color: #d6d6d6; cursor: pointer; width: 40px; height: 40px; display: inline-grid; place-items: center; font-size: 1.15rem; padding: 0; border-radius: 0; }
.icon-btn:hover { background: #4a4a4a; color: #fff; }
.topbar { z-index: 60; } .topright { gap: .35rem; }
@media (hover: none) and (pointer: coarse) { .timer-open { display: none; } }
.topsearch { position: relative; }
.suggest { position: absolute; top: calc(100% + 4px); right: 0; width: 360px; max-width: 92vw; background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 90; max-height: 70vh; overflow-y: auto; }
.suggest[hidden] { display: none; }
.suggest .sg-head { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #666; padding: .5rem .8rem .2rem; }
.suggest a { display: block; padding: .55rem .8rem; color: var(--ink); border-bottom: 1px solid #f0f0f0; overflow-wrap: anywhere; }
.suggest a:hover, .suggest a.sel { background: var(--brand-l); text-decoration: none; }
.suggest a small { display: block; color: #666; font-size: .78rem; }
.suggest .sg-all { color: var(--brand-d); font-weight: 600; }
.timer-chip.paused { background: #fff7ed; color: #9a3412; border-color: #fed7aa; } .pause-ico { font-size: .8rem; }

@media (max-width: 1199px) {
  .topbar { flex-wrap: wrap; gap: .3rem .5rem; padding: .35rem .6rem; padding-top: max(.35rem, env(safe-area-inset-top)); padding-left: max(.6rem, env(safe-area-inset-left)); padding-right: max(.6rem, env(safe-area-inset-right)); }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: 0; padding: 0 10px; cursor: pointer; }
  .nav-toggle span { display: block; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); } body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; } body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .brand { min-width: 0; } .brand-logo { max-width: 130px; height: 26px; }
  .topright { margin-left: auto; flex: none; }
  .search-toggle { display: inline-grid; }
  .logout-desktop { display: none; }
  .topsearch { display: none; order: 20; flex: 1 1 100%; margin: 0 0 .3rem; }
  .topbar.search-open .topsearch { display: block; }
  .topsearch input { width: 100%; min-height: 44px; font-size: 16px; padding: .5rem .8rem; } .topsearch input:focus { width: 100%; }
  .suggest { left: 0; right: 0; width: auto; max-width: none; }
  .nav { position: fixed; z-index: 90; top: 0; left: 0; bottom: 0; width: min(310px, 86vw); background: #2b2b2b; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; padding: calc(.7rem + env(safe-area-inset-top)) .6rem calc(1rem + env(safe-area-inset-bottom)); overflow-y: auto; transform: translateX(-104%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; box-shadow: 4px 0 24px rgba(0,0,0,.45); }
  .nav a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: .6rem .9rem; font-size: 1.02rem; white-space: normal; }
  .nav-logout { display: block; margin: auto 0 0; padding-top: 1rem; border-top: 1px solid #555; }
  .nav-logout-btn { width: 100%; min-height: 48px; background: none; border: 1px solid #777; color: #eee; font: inherit; cursor: pointer; text-align: left; padding: 0 .9rem; }
  .nav-logout-btn .muted { color: #aaa; }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .22s; }
  body.nav-open .nav { transform: none; visibility: visible; transition: transform .22s ease; }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 560px) { .brand-text { display: none; } .timer-name { display: none; } }
@media (min-width: 561px) and (max-width: 1199px) { .brand-text { display: inline; } }

/* Aufgaben-Menü und andere Aufklapp-Menüs: auf Telefonen als Fußleiste statt über den Rand hinaus */
@media (max-width: 700px) {
  .quick[open] > .quick-pop { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; z-index: 100; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); max-height: 80vh; overflow-y: auto; box-shadow: 0 -8px 30px rgba(0,0,0,.35); }
  .quick-pop button { min-height: 44px; padding: .4rem .8rem; font-size: .95rem; }
  .quick > summary, .task-edit > summary { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
  .sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 95; }
}

/* Seiten-Kopf, Tabs, Filter */
.page-head h1 { margin: 0; }
@media (max-width: 700px) {
  html { font-size: 15.5px; }
  .container { padding: .9rem max(.8rem, env(safe-area-inset-left)) 3rem max(.8rem, env(safe-area-inset-right)); }
  .card { padding: .9rem .85rem; } .grid-2, .col { gap: .85rem; }
  .page-head { align-items: stretch; gap: .6rem; margin-bottom: .8rem; } .page-head > .actions, .page-head > div + .actions { width: 100%; }
  .actions { gap: .45rem; } .actions > .btn, .actions > form, .actions > a { flex: 1 1 calc(50% - .45rem); } .actions > form .btn { width: 100%; }
  .btn { min-height: 44px; padding: .55rem .9rem; } .btn-sm { min-height: 40px; padding: .4rem .8rem; font-size: .9rem; }
  input, select, textarea { font-size: 16px; min-height: 44px; padding: .55rem .7rem; width: 100%; max-width: 100%; }
  input[type=checkbox], input[type=radio] { min-height: 0; width: 20px; height: 20px; flex: none; }
  label.check-inline { min-height: 44px; }
  textarea { min-height: 5.5rem; }
  .row { gap: .6rem; } .row > label, .row .grow { flex: 1 1 100%; }
  .row > label:has(input[type=date]), .row > label:has(input[type=time]) { flex: 1 1 calc(50% - .6rem); }
  .filters, .filters-wrap { gap: .5rem; } .filters label, .filters-wrap label { flex: 1 1 calc(50% - .5rem); } .filters input[type=search], .filters select, .filters-wrap input, .filters-wrap select { width: 100%; min-width: 0; }
  .filters > .btn, .filters-wrap > .btn { flex: 1 1 100%; }
  .add-task { flex-wrap: wrap; } .add-task textarea { flex: 1 1 100%; } .add-task > .btn { flex: 1 1 100%; }
  .add-task-multi select, .add-task-wide.add-task-multi select, .add-task-multi input[type=date] { flex: 1 1 calc(50% - .5rem); width: auto; max-width: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; padding: .75rem .9rem; min-height: 44px; }
  .monthnav { gap: .4rem; } .monthnav b { min-width: 0; flex: 1 1 auto; text-align: center; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-bottom: .85rem; } .kpi { padding: .6rem .7rem; } .kpi-v { font-size: 1.25rem; } .kpi-l { font-size: .75rem; }
  h1 { font-size: 1.3rem; } h2 { font-size: 1.05rem; }
  .task { gap: .5rem; } .check { width: 1.7rem; height: 1.7rem; } .play { width: 2.2rem; height: 2.2rem; font-size: .75rem; }
  .task .check, .task .play { margin-top: 0; }
  .tag { font-size: .72rem; } .chip { font-size: .72rem; }
  .invoice-row { align-items: stretch; } .invoice-row form { width: 100%; } .invoice-row .row.tight { flex-wrap: wrap; } .invoice-row .w-140 { width: 100%; flex: 1 1 100%; }
  .split { flex-wrap: wrap; }
  .timer-big { font-size: 2.3rem; }
  .flash { font-size: .95rem; }
  .pop { padding: .7rem; }
  .cred-line .muted { width: auto; }
  .danger-zone { text-align: center; }
}

/* Formular-Aktionen: gut erreichbar am unteren Rand */
@media (max-width: 700px) {
  form.card.stack > .row:last-of-type:has(> .btn-primary), form.card.stack > .form-actions { position: sticky; bottom: 0; z-index: 5; background: #fff; margin: .4rem -.85rem -.9rem; padding: .7rem .85rem calc(.7rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); box-shadow: 0 -6px 14px rgba(0,0,0,.06); }
  form.card.stack > .row:last-of-type:has(> .btn-primary) > .btn, form.card.stack > .form-actions > .btn { flex: 1 1 calc(50% - .6rem); }
}

/* Tabellen: auf Telefonen als Karten */
.table .cell { display: contents; }
@media (max-width: 700px) {
  .card:not(.flush) .table.rtable, .table.rtable { margin: 0; width: 100%; }
  .table.rtable, .table.rtable tbody, .table.rtable tr { display: block; width: 100%; }
  .table.rtable thead { display: none; }
  .table.rtable tr { border: 1px solid var(--line); background: #fff; margin-bottom: .6rem; padding: .45rem .7rem; box-shadow: var(--shadow); }
  .table.rtable tbody tr:hover { background: #fff; }
  .table.rtable td { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; padding: .3rem 0; border: 0; text-align: left; width: 100%; }
  .table.rtable td .cell { display: block; flex: 1; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  .table.rtable td[data-label]::before { content: attr(data-label); flex: 0 0 5.2rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #666; }
  .table.rtable td.num { text-align: left !important; white-space: normal; }
  .table.rtable td.is-empty { display: none; }
  .table.rtable td.is-main { display: block; font-weight: 600; font-size: 1.02rem; padding-bottom: .15rem; } .table.rtable td.is-main::before { display: none; } .table.rtable td.is-main .cell { text-align: left; }
  .table.rtable td.is-actions { justify-content: flex-end; gap: .4rem; border-top: 1px solid #f0f0f0; margin-top: .3rem; padding-top: .4rem; }
  .table.rtable td.is-actions .cell { display: flex; gap: .4rem; flex: none; }
  .table.rtable td.is-actions a, .table.rtable td.is-actions button { display: inline-grid; place-items: center; min-width: 44px; min-height: 40px; border: 1px solid var(--line); background: #fff; font-size: 1rem; cursor: pointer; }
  .table.rtable td.is-actions form { display: inline; }
}

/* Kanban mobil: eine Spalte pro Tab */
.board-tabs { display: none; }
.board-move button { min-height: 32px; padding: 0 .6rem; font-size: .8rem; }
@media (max-width: 700px) {
  .board, .board.js { display: block; overflow: visible; }
  .board-tabs { display: flex; gap: .3rem; margin: 0 0 .7rem; position: sticky; top: var(--topbar-h, 52px); z-index: 40; background: var(--bg); padding: .35rem 0; }
  .board-tabs button { flex: 1 1 0; min-height: 46px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; padding: .3rem .2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
  .board-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
  .board-tabs .count { background: rgba(0,0,0,.08); color: inherit; } .board-tabs button.on .count { background: rgba(255,255,255,.25); }
  .board-col { margin-bottom: .8rem; border: 0; padding: .4rem; min-height: 0; }
  .js .board-col > h3 { display: none; }
  .board-card { cursor: default; padding: .7rem .8rem; } .board-card .task-link { font-size: 1rem; }
  .board-move { gap: .4rem; flex-wrap: wrap; } .board-move button { min-height: 44px; flex: 1 1 auto; font-size: .9rem; }
}

.dash-actions .btn { white-space: nowrap; }
.proj-mini { display: flex; justify-content: space-between; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); } .proj-mini:last-child { border-bottom: 0; }
.proj-mini > a { min-width: 0; overflow-wrap: anywhere; } .proj-mini .muted { white-space: nowrap; }

/* Kalender mobil: Monatsraster mit Punkten statt Text */
@media (max-width: 700px) {
  .cal-h { padding: .3rem 0; font-size: .68rem; } .cal-d { min-height: 54px; padding: .25rem; align-items: center; }
  .cal-d .chip { font-size: 0; height: 6px; width: 100%; padding: 0; } .cal-more { font-size: .6rem; } .legend { display: none; }
  .week-wrap, .week { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Weitere Konsistenz */
.suggest-empty { padding: .8rem; color: #666; font-size: .9rem; }
.is-busy { position: relative; opacity: .75; pointer-events: none; }
.is-busy::after { content: ""; display: inline-block; width: .9em; height: .9em; margin-left: .5em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -.1em; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint { color: #666; font-size: .9rem; text-align: center; padding: 1rem; }
.empty a { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .nav, .nav-backdrop, .nav-toggle span, .is-busy::after { transition: none; animation: none; } }
.daynav { justify-content: space-between; } .daynav .btn { flex: 1 1 0; }
@media (min-width: 701px) { .daynav { justify-content: flex-start; } .daynav .btn { flex: none; } }
select { max-width: 100%; text-overflow: ellipsis; }
.filters label, .filters-wrap label { min-width: 0; max-width: 100%; }
.filters select, .filters-wrap select, .filters input[type=search] { max-width: min(100%, 320px); }
@media (max-width: 700px) { .filters select, .filters-wrap select, .filters input[type=search] { max-width: 100%; } }
.proj-mini .muted { white-space: normal; } .proj-mini > .muted { white-space: nowrap; flex: none; }
dd, .facts a, .note, .cred, .pre, .card p, .suggest a { overflow-wrap: anywhere; }
@media (hover: none) and (pointer: coarse) { [data-timer-window] { display: none !important; } }
@media (max-width: 700px) {
  .check, .play, .link-btn, .flash-x, .quick > summary { position: relative; }
  .check::after, .play::after, .link-btn::after, .flash-x::after { content: ""; position: absolute; inset: -9px; }
}
@media (max-width: 700px) { .link-btn { min-height: 40px; display: inline-flex; align-items: center; } }

/* Aufgabenzeilen auf dem Handy: Titel bekommt die volle Breite, Termin steht darunter */
@media (max-width: 700px) {
  .tasks:not(.checklist) > .task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: .5rem; row-gap: 0; align-items: start; }
  .tasks:not(.checklist) > .task > form:first-child { grid-column: 1; grid-row: 1; }
  .tasks:not(.checklist) > .task > .task-main { grid-column: 2; grid-row: 1; }
  .tasks:not(.checklist) > .task > .due { grid-column: 2; grid-row: 2; justify-self: start; margin: .1rem 0 .1rem; }
  .tasks:not(.checklist) > .task > form.inline:not(:first-child), .tasks:not(.checklist) > .task > .running-tag { grid-column: 3; grid-row: 1; }
  .tasks:not(.checklist) > .task > details.quick { grid-column: 4; grid-row: 1; }
  .tasks:not(.checklist) > .task > :not(form):not(.task-main):not(.due):not(details):not(.running-tag) { grid-column: 2; }
}

/* ======================================================================
   1.5.2 – Breakpoints (einheitlich): ≤560 kleines Handy · ≤700 Handy (Karten, Tabs) ·
   ≤900 Tablet hochkant (einspaltig) · ≤1199 kompakte Kopfzeile mit Seitenmenü · darüber Desktop
   ====================================================================== */
.board { grid-template-columns: repeat(4, minmax(210px, 1fr)); }
@media (min-width: 701px) and (max-width: 1199px) {
  .container { padding: 1.1rem 1.1rem 3.5rem; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .row > label { flex: 1 1 200px; }
  .filters label, .filters-wrap label { flex: 0 1 auto; }
}
/* Touch-Geräte (auch Tablets): Eingabefelder und Knöpfe in Fingergröße, 16 px gegen Zoomen */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; } .btn-sm { min-height: 40px; }
  .check, .play, .link-btn, .flash-x, .quick > summary { position: relative; }
  .check::after, .play::after, .link-btn::after, .flash-x::after { content: ""; position: absolute; inset: -9px; }
  .quick > summary { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
  .nav a { min-height: 44px; }
}

/* ======================================================================
   1.5.2 – Barrierefreiheit, Timer-Ansicht (Touch), Feldfehler, Board ohne Aufblitzen
   ====================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: .5rem; top: -4rem; z-index: 200; background: #fff; color: #111; padding: .7rem 1rem; border: 2px solid var(--brand); font-weight: 700; transition: top .15s; }
.skip-link:focus { top: .5rem; text-decoration: none; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 1px; border-color: #1d4ed8; }
.topbar :focus-visible, .nav :focus-visible, .timer-sheet :focus-visible, body.widget :focus-visible, .tw-btn:focus-visible { outline-color: #fff; outline-offset: -3px; }
.tw-select:focus-visible, .tw-note:focus-visible { outline-color: #fff; outline-offset: 1px; }
.field-error { display: block; color: #b3261e; font-size: .85rem; font-weight: 600; margin-top: .15rem; }
input.invalid, select.invalid, textarea.invalid { border-color: #b3261e; box-shadow: 0 0 0 1px #b3261e; }
.due-late::before { content: "⚠ "; }
.light-yellow { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); } .light-red { border-radius: 2px; }
.cal-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: .6rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.cal-bar .tabs { border-bottom: 0; margin-bottom: 0; } .cal-remember { font-size: .85rem; color: #555; padding-bottom: .4rem; }

/* Timer als Fußleiste (Smartphone/Tablet) */
.timer-sheet-btn { display: none; }
@media (hover: none) and (pointer: coarse), (max-width: 700px) { .timer-sheet-btn { display: inline-grid; } }
.timer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 120; }
.timer-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 130; background: #333; color: #fff; max-height: 92vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -10px 30px rgba(0,0,0,.45); max-width: 560px; margin: 0 auto; }
.timer-backdrop[hidden], .timer-sheet[hidden] { display: none; }
.timer-sheet-bar { display: flex; justify-content: space-between; align-items: center; padding: .2rem .4rem .2rem 1rem; border-bottom: 1px solid #555; }
.timer-sheet .icon-btn { width: 48px; height: 48px; }
.timer-sheet .tw-btn { min-height: 52px; font-size: 1.05rem; } .timer-sheet .tw-time { font-size: 3.2rem; }
.timer-sheet .tw-select, .timer-sheet .tw-note { min-height: 48px; font-size: 16px; }
body.sheet-open { overflow: hidden; }

/* Klebende Speichern-Leiste bleibt über der Bildschirmtastatur */
@media (max-width: 700px) {
  form.card.stack > .row:last-of-type:has(> .btn-primary), form.card.stack > .form-actions { bottom: var(--kb, 0px); }
}

/* Kanban auf dem Handy: richtiger Tab schon beim ersten Zeichnen (html.js + gemerkter Tab aus early.js) */
@media (max-width: 700px) {
  .js .board-col { display: none; } .js .board-col.active { display: block; }
  html[data-board-tab] .board-col.active { display: none; }
  html[data-board-tab="todo"] .board-col[data-status="todo"], html[data-board-tab="doing"] .board-col[data-status="doing"],
  html[data-board-tab="waiting"] .board-col[data-status="waiting"], html[data-board-tab="done"] .board-col[data-status="done"] { display: block; }
  html[data-board-tab] .board-tabs button.on { background: #fff; border-color: var(--line); color: var(--ink); }
  html[data-board-tab="todo"] .board-tabs button[data-tab="todo"], html[data-board-tab="doing"] .board-tabs button[data-tab="doing"],
  html[data-board-tab="waiting"] .board-tabs button[data-tab="waiting"], html[data-board-tab="done"] .board-tabs button[data-tab="done"] { background: var(--brand); border-color: var(--brand); color: #fff; }
}

/* ======================================================================
   1.5.2 – Kontraste (WCAG AA ≥ 4.5:1), Mindestschriftgrößen, Tippflächen
   Orange #E75214 bleibt Akzent (Linien, Logo, Fokus); Text auf Hell und gefüllte Flächen mit weißem Text nutzen die dunklere Variante.
   ====================================================================== */
:root { --muted: #5f5f5f; --brand-d: #B93C0A; --brand-fill: #C2410C; }
a { color: var(--brand-d); }
.link-btn, .sec-teal, .task-link:hover, .crumb a { color: var(--brand-d); }
.task-link { color: inherit; }
.btn-primary, .nav a.on, .pill-pink, .pill, .play, .tw-primary, .task.done .check,
.board-tabs button.on, html[data-board-tab] .board-tabs button.on { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }
html[data-board-tab] .board-tabs button.on { background: #fff; border-color: var(--line); color: var(--ink); }
html[data-board-tab="todo"] .board-tabs button[data-tab="todo"], html[data-board-tab="doing"] .board-tabs button[data-tab="doing"],
html[data-board-tab="waiting"] .board-tabs button[data-tab="waiting"], html[data-board-tab="done"] .board-tabs button[data-tab="done"] { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }
.btn-primary:hover, .play:hover, .tw-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.nav a.on .pill-pink { background: #fff; color: var(--brand-d); }
.board-tabs .count { background: rgba(0,0,0,.1); } .board-tabs button.on .count { background: rgba(0,0,0,.25); color: #fff; }
.board-empty { color: #595959; }
mark { color: #111; }
.tag { color: #566170; } .tag-prio1 { color: #a11; } .tag-prio3 { color: #566170; } .tag-doing, .tag-recur, .tag-cl, .tag-nb, .tag-waiting { color: #1f2d4d; }
.tag-doing { color: var(--brand-d); } .tag-cl { color: #1d5a1d; } .tag-nb { color: #5b2a7a; } .tag-waiting { color: #6b4a00; } .tag-recur { color: #1f3f8a; }
.suggest a small, .suggest .sg-head, .cal-remember, .week-day .wd { color: #555; }
.nav a { color: #e6e6e6; } .topright .btn-ghost { color: #e6e6e6; } .icon-btn { color: #e6e6e6; }
.tw-muted, .tw-sub { color: #d6d6d6; } .tw-link { color: #e0e0e0; }

/* Mindestschrift 12 px (bei Handy-Basis 15,5 px ≈ .78rem) – gilt für Kennzeichen, Kalender und Wochenraster */
.badge, .tag, .chip, .count, .cal-sum, .cal-more, .running-tag, .pill, .slot, .slot-sub, .week-axis span, .tw-link, .kpi-l, code, .note-date, .due, .small { font-size: max(.8rem, 12px); }
.badge { font-size: max(.76rem, 12px); } .play { font-size: .8rem; }
.slot { font-size: max(.78rem, 12px); } .slot .slot-sub { font-size: max(.74rem, 12px); }
.week-axis span { font-size: max(.74rem, 12px); }

/* Tippflächen ≥ 44 px (Touch) */
@media (pointer: coarse), (max-width: 700px) {
  .btn-sm { min-height: 44px; } .btn-ghost.btn-sm { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .timer-chip { min-height: 44px; }
  .brand { min-height: 44px; }
  .link-btn { min-height: 44px; }
  .task-link { display: inline-block; padding: .3rem 0; }
  .week-day { min-height: 44px; }
}
.timer-chip { display: inline-flex; align-items: center; }
.brand { display: inline-flex; align-items: center; }
:root { --pink: #B93C0A; }
.checklist .link-btn { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; margin: 0; }
.checklist .link-btn::after { display: none; }
@media (pointer: coarse), (max-width: 700px) {
  .btn, button.btn { min-height: 44px; } .btn-sm, button.btn-sm { min-height: 44px; }
  .btn-sm { min-width: 44px; }
  .brand { padding: 0 .5rem; min-width: 44px; justify-content: center; }
  .table.rtable td.is-actions a, .table.rtable td.is-actions button { min-height: 44px; }
  .task-link { padding: .6rem 0; margin: -.6rem 0; }
}

.tw-btn { min-height: 44px; } .tw-link { min-height: 44px; padding: .6rem; }
@media (pointer: coarse), (max-width: 700px) {
  summary.link-btn, .h2-summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .3rem; }
  .h2-summary { display: flex; }
  .task-link { padding: .65rem 0; margin: -.65rem 0; }
}
/* Absolut positionierte Hilfstexte (sr-only) dürfen den Rahmen nie verbreitern */
td, th, .card, .table-scroll, .task, .proj-mini { position: relative; }
/* Kopfzeile: Lupe nur in der kompakten Ansicht (.icon-btn setzt sonst display); Timer-Name erst bei viel Platz */
.icon-btn.search-toggle, .icon-btn.nav-toggle { display: none; }
@media (max-width: 1199px) { .icon-btn.search-toggle { display: inline-grid; } }
@media (min-width: 1200px) and (max-width: 1499px) { .timer-name { display: none; } .topsearch input { width: 130px; } .topsearch input:focus { width: 200px; } }
@media (min-width: 1200px) { .nav a { padding: .4rem .55rem; } }
.due { white-space: nowrap; align-self: flex-start; }
.table th { font-size: max(.78rem, 12px); }
.cal-h, .week-day .wd, .week-day, .tab .count { font-size: max(.78rem, 12px); }

/* Übersicht: volle Zeile oben + zwei Spalten; Blöcke frei verschiebbar (Anpassen-Modus) */
.dash { display: block; }
.dash-zone { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.dash-top { margin-bottom: 1.1rem; } .dash-top:empty { display: none; margin: 0; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.dslot { min-width: 0; } .dslot-body { min-width: 0; }
.dash-top .kpis { margin-bottom: 0; }
.dash > .dash-zone > .dslot > .dslot-body > .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (max-width: 900px) {
  /* Handy/Tablet hochkant: alles untereinander, Reihenfolge über „order“ (oben, dann abwechselnd links/rechts) */
  .dash { display: flex; flex-direction: column; gap: .85rem; }
  .dash-cols, .dash-zone { display: contents; }
  .dash-top { margin: 0; }
}
/* Anpassen-Modus */
.dash-editing .dash-zone { outline: 2px dashed #bbb; outline-offset: 2px; min-height: 96px; padding: .5rem; background: rgba(255,255,255,.4); }
.dash-editing .dash-zone.drop-target { outline-color: var(--brand); background: var(--brand-l); }
@media (max-width: 900px) { .dash-editing .dash-zone { outline: 0; padding: 0; min-height: 0; background: none; } }
.dash-editing .dslot-body { pointer-events: none; opacity: .9; user-select: none; }
.dslot-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: #333; color: #fff; padding: .25rem .5rem; cursor: grab; }
.dslot-bar b { flex: 1 1 8rem; min-width: 0; } .dslot-handle { font-size: 1.2rem; line-height: 1; opacity: .85; }
.dslot.dragging { opacity: .45; } .dslot-empty { border: 1px dashed #bbb; padding: .9rem; text-align: center; background: #fff; }
.dash-ctl { display: flex; gap: .25rem; margin: 0; flex-wrap: wrap; }
.dash-ctl button { min-width: 44px; min-height: 44px; border: 1px solid #888; background: #444; color: #fff; font: inherit; cursor: pointer; padding: 0 .4rem; }
.dash-ctl button:hover:not([disabled]) { background: #666; } .dash-ctl button[disabled] { opacity: .3; cursor: not-allowed; }
@media (pointer: fine) { .dash-ctl button { min-width: 32px; min-height: 32px; } }
.dash-hidden { margin: .3rem 0 0; }
.dash-edit { margin-bottom: 1.1rem; border-color: var(--brand); }

.week-head { position: static; }
@media (min-width: 901px) { .week { overflow: visible; } .week-head { position: sticky; top: var(--topbar-h, 0px); } }
.week-mode { margin-left: auto; }
.badge-work { background: var(--brand-l); color: var(--brand-d); }

.btn-danger { background: #b3261e; border-color: #b3261e; color: #fff; } .btn-danger:hover { background: #8c1d17; border-color: #8c1d17; }
.btn-danger-ghost { color: #b3261e; } .btn-danger-ghost:hover { background: #fdecea; color: #8c1d17; }
.card-danger { border-color: #e7b4b0; background: #fffafa; }
.delete-facts { margin: .4rem 0 1rem; padding-left: 1.2rem; } .delete-facts li { margin: .2rem 0; }
.delete-alt { background: var(--grey-l); padding: .7rem .9rem; margin: .8rem 0 1.1rem; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.row-del { font-size: 1rem; text-decoration: none; } .link-btn.danger { color: #b3261e; }
.quick-foot { justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: .5rem; margin: .3rem 0 0; }
.quick-pop .quick-del { border-color: #e7b4b0; color: #b3261e; } .quick-pop .quick-del:hover { background: #fdecea; border-color: #b3261e; color: #8c1d17; }

.kpi-rev { font-size: 1.05rem; font-weight: 700; color: var(--brand-d); font-variant-numeric: tabular-nums; margin-top: .1rem; }
.kpis-slim { margin: 0 0 1rem; } .kpis-slim .kpi { min-width: 0; }
.period-tabs { margin-bottom: .6rem; }
.customer-revenue .kpi-l { text-transform: none; }
.task-sub td { background: #fafafa; font-size: .95em; } .task-sub td:nth-child(2) { padding-left: 1.4rem; } .sub-arrow { color: var(--muted); }
.kind-tag { display: inline-block; font-size: max(.7rem, 12px); font-weight: 700; padding: 0 .4rem; margin-right: .35rem; border: 1px solid currentColor; vertical-align: middle; }
.kind-project { color: #1f3f8a; } .kind-task { color: var(--brand-d); }
.row-task td { background: #fffdfb; }
.sum-row td { border-top: 2px solid var(--line); background: #f7f7f7; }
@media (max-width: 700px) { .table.rtable tfoot, .table.rtable tfoot tr { display: block; } .table.rtable .sum-row td:first-child { display: none; } .table.rtable .sum-row td[colspan] { display: none; } .table.rtable .sum-row td { display: block; } }

/* ===== 1.5.6: sortierbare Tabellen ===== */
.sort-btn { font: inherit; font-weight: inherit; color: inherit; background: none; border: 0; padding: 2px 0; margin: 0; cursor: pointer; text-align: inherit; white-space: nowrap; border-radius: 4px; }
.sort-btn:hover { text-decoration: underline; }
.sort-btn:focus-visible { outline: 2px solid var(--brand-d); outline-offset: 2px; }
.sort-ind { display: inline-block; min-width: 1em; font-size: 12px; }
.sort-ind.dim { color: var(--muted); font-weight: 400; }
.sort-mobile { display: none; padding: 8px 12px 0; font-size: 14px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
.sort-mobile select { max-width: 70%; min-height: 44px; }
@media (max-width: 700px) { .sort-mobile { display: flex; } }
.tw-search { margin-bottom: 0; }
.tw-hint { font-size: 12px; color: #f0d9d9; min-height: 0; }
.tw-hint:empty { display: none; }
.table.rtable td.is-actions button.play { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; border-radius: 4px; width: auto; height: auto; padding: 0 2px 0 4px; }
.table.rtable td.is-actions button.play:hover { background: var(--brand-d); }

/* ===== 1.6.0: Angebote ===== */
.badge.offer-entwurf, .badge.offer-abgelaufen, .badge.offer-zurueckgezogen { background: var(--grey-l); color: #404040; }
.badge.offer-versendet { background: var(--blue-l); color: #1e40af; }
.badge.offer-angesehen { background: #cffafe; color: #155e75; }
.badge.offer-angenommen { background: var(--green-l); color: #166534; }
.badge.offer-abgelehnt { background: var(--red-l); color: #991b1b; }
.orows { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.orow { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; background: var(--surface); display: grid; gap: .5rem; position: relative; }
.orow.has-error { border-color: #b3261e; box-shadow: 0 0 0 1px #b3261e; }
.orow-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.orow-no { font-weight: 700; font-size: .85rem; color: var(--muted); }
.orow-ctl { display: inline-flex; gap: .25rem; }
.icon-mini { min-width: 44px; min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: 1rem; color: var(--ink); }
.icon-mini.danger { color: #b3261e; }
.icon-mini:hover { background: var(--grey-l); }
.of-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; align-items: end; }
.of-net { display: grid; gap: .1rem; text-align: right; align-self: end; padding-bottom: .55rem; }
.of-net-l { font-size: max(12px, .75rem); color: var(--muted); }
.of-nums input, .of-nums select { width: 100%; min-width: 0; }
@media (min-width: 701px) { .of-nums { grid-template-columns: 5.5rem 8.5rem minmax(7rem, 1fr) 5rem 5.5rem minmax(6rem, auto); } }
.of-totals { display: grid; gap: .75rem; margin-top: .25rem; }
@media (min-width: 701px) { .of-totals { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.of-tgroup { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; background: var(--grey-l); }
.of-tgroup h3 { margin: 0 0 .3rem; font-size: .9rem; }
.of-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.of-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.of-picker { align-items: end; }
.self-end { align-self: end; }
@media (max-width: 700px) { .of-actions .btn { flex: 1 1 100%; min-height: 48px; } .of-picker { flex-direction: column; align-items: stretch; } .of-picker .btn { min-height: 48px; } }
/* 1.6.0: neunter Menüpunkt (Angebote) – im engen Desktop-Bereich etwas kompakter, damit nichts überlappt */
@media (min-width: 1200px) and (max-width: 1499px) { .nav a { padding: .4rem .42rem; font-size: .9rem; } .brand-text { font-size: .95rem; } }
@media (min-width: 1200px) and (max-width: 1279px) { .brand-text { display: none; } .topsearch input { width: 110px; } }

/* ===== 1.7.0: öffentliche Seiten (Angebot, Onboarding) ===== */
body.public { background: var(--bg); }
.pub-head { padding: .9rem 1rem; background: #fff; border-bottom: 3px solid var(--brand); }
.pub-logo { max-height: 44px; max-width: 70vw; width: auto; }
.pub-name { font-size: 1.1rem; }
.pub-main { max-width: 860px; margin: 0 auto; padding: 1rem; display: grid; gap: 1rem; }
.pub-card { overflow-wrap: anywhere; }
.pub-foot { text-align: center; padding: 1rem; }
.pub-terms { max-height: 22rem; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; background: var(--grey-l); font-size: .92rem; }
.pub-check { align-items: flex-start; font-size: 1rem; }
.pub-check input { width: 1.4rem; height: 1.4rem; flex: none; margin-top: .1rem; }
.btn-big { min-height: 52px; font-size: 1.05rem; width: 100%; justify-content: center; text-align: center; }
.pub-reject { margin-top: .75rem; }
.pub-state { font-size: 1.05rem; }
.notice-ok { background: var(--green-l); color: #14532d; border-color: #86efac; }
.sync-row { display: grid; gap: .5rem; padding: .6rem 0; border-top: 1px solid var(--line); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 701px) { .sync-row { grid-template-columns: 1fr minmax(220px, 280px); } }
.sync-row ul { margin: .25rem 0 0 1rem; padding: 0; } .sync-act select { width: 100%; min-height: 44px; }

/* ===== 1.7.1: Status „Wartet“, Direktauswahl ===== */
.badge-wait { background: #fef3c7; color: #854d0e; }
.status-form { display: inline-block; margin: .2rem 0 0; }
.status-sel { font: inherit; font-size: .85rem; min-height: 36px; padding: .15rem .4rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); max-width: 11rem; }
.status-sel.status-wartet { background: #fef3c7; color: #713f12; border-color: #eab308; }
.status-sel.status-abgeschlossen { background: var(--grey-l); }
.status-sel.busy { opacity: .6; }
.status-card .status-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
@media (max-width: 700px) { .status-sel { min-height: 44px; font-size: 1rem; max-width: 100%; } }

/* Tabellen: Überschriften dürfen umbrechen, lange Namen/Adressen brechen um; Rand-Schatten zeigt, dass seitlich noch Spalten liegen */
@media (min-width: 701px) {
  .table.rtable th { white-space: normal; vertical-align: bottom; line-height: 1.2; }
  .table.rtable td.cell-wrap, .table.rtable td.cell-wrap a { overflow-wrap: anywhere; word-break: normal; min-width: 8rem; }
  .table.rtable td:first-child { overflow-wrap: anywhere; }
}
.table-scroll { background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0)), linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) 100% 0,
  radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.18), rgba(0,0,0,0)), radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.18), rgba(0,0,0,0)) 100% 0;
  background-repeat: no-repeat; background-color: #fff; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }

/* Versions-Button + Änderungsprotokoll-Fenster */
.page-head { gap: 1rem; flex-wrap: wrap; }
.version-btn { background: none; border: 1px solid var(--line, #d7dce3); border-radius: 999px; padding: .3rem .8rem; font: inherit; font-size: .85rem; color: var(--muted, #566170); cursor: pointer; min-height: 36px; }
.version-btn:hover, .version-btn:focus-visible { color: var(--ink, #111); border-color: var(--brand, #2563eb); }
.dlg { border: 0; border-radius: 12px; padding: 0; width: min(680px, calc(100vw - 1.5rem)); max-height: calc(100vh - 3rem); box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--ink, #111); background: var(--card, #fff); }
.dlg[open] { display: flex; flex-direction: column; }
.dlg::backdrop { background: rgba(15, 23, 42, .55); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line, #e3e7ee); }
.dlg-head h2 { margin: 0; font-size: 1.15rem; } .dlg-head form { margin: 0; }
.dlg-body { overflow-y: auto; padding: 1rem 1.2rem 1.4rem; overscroll-behavior: contain; }
.dlg-body h3 { margin: 1.2rem 0 .3rem; font-size: 1.02rem; } .dlg-body h3:first-child { margin-top: 0; }
.dlg-body h4 { margin: .7rem 0 .2rem; font-size: .9rem; color: var(--muted, #566170); } .dlg-body ul { margin: .2rem 0 .6rem 1.1rem; padding: 0; } .dlg-body li { margin: .15rem 0; }
.changelog h3 { margin: 1.2rem 0 .3rem; } .changelog ul { margin: .2rem 0 .6rem 1.1rem; padding: 0; }
.mail-preview { border: 1px solid var(--line, #e3e7ee); border-radius: 8px; padding: .8rem 1rem; background: #fff; overflow-wrap: anywhere; }
.ph-list { grid-template-columns: minmax(120px, auto) 1fr; }
.count-warn { background: var(--red, #dc2626); color: #fff; }
.settings-tabs { flex-wrap: wrap; }
.changelog, .changelog *, .dlg-body, .dlg-body * { overflow-wrap: anywhere; } .changelog code, .dlg-body code { white-space: normal; }
.work { display: grid; gap: 1rem; } .work .card { margin: 0; }
.work-list { display: grid; gap: .1rem; } .work-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line, #e3e7ee); } .work-item:last-child { border-bottom: 0; }
.work-item > div { flex: 1 1 260px; min-width: 0; } .row-actions { margin: 0; display: inline-flex; }
.work-filter { align-items: end; margin-bottom: 1rem; } .work-wait summary { cursor: pointer; }
.nav-work { font-weight: 700; }
/* Zehn Menüpunkte + laufender Timer: bis 1699 px platzsparender (Markenname weg, engere Abstände), darunter Seitenmenü auf dem Handy */
@media (min-width: 1200px) and (max-width: 1699px) {
  .brand-text { display: none; } .topbar { gap: .6rem; } .topsearch input { width: 120px; } .topsearch input:focus { width: 200px; }
}
@media (min-width: 1200px) and (max-width: 1319px) { .nav a { padding: .4rem .36rem; font-size: .88rem; } }

/* Kalender: Ebenen-Filter und laufender Timer (vorläufig, gestrichelt) */
.cal-layers { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin: .2rem 0 .6rem; }
.cal-layer { padding: .15rem .1rem; } .cal-layer input { width: 18px; height: 18px; }
.chip-running, .slot-running { border: 1.5px dashed var(--brand-d, #b0176b) !important; background: repeating-linear-gradient(135deg, var(--brand-l, #fde7f3), var(--brand-l, #fde7f3) 6px, #fff 6px, #fff 12px) !important; }
@media (max-width: 700px) { .cal-layer { min-height: 44px; } }

/* Öffentliche Angebotsseite (1.7.1) */
.pub-hero h1 { margin: .1rem 0 .3rem; font-size: 1.6rem; line-height: 1.2; } .pub-eyebrow { margin: 0; color: var(--muted); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; } .pub-lead { margin: 0 0 .8rem; font-size: 1.05rem; }
.pub-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; margin: .8rem 0; }
.pub-sum-item { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .9rem; border: 1px solid var(--line, #e3e7ee); border-radius: 10px; background: var(--grey-l, #f6f7f9); }
.pub-sum-l { font-size: .8rem; color: var(--muted); } .pub-sum-v { font-size: 1.35rem; line-height: 1.2; }
.pub-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 0; } .pub-gross b { font-size: 1.15rem; }
.pub-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } @media (max-width: 600px) { .pub-parties { grid-template-columns: 1fr; } .pub-actions .btn { flex: 1 1 100%; justify-content: center; } }
.pub-decision .pub-opt { margin-top: .8rem; } .pub-decision summary.btn { list-style: none; text-align: center; cursor: pointer; display: block; }
.pub-decision summary::-webkit-details-marker { display: none; }
.pub-recap { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: .6rem .8rem; background: var(--grey-l, #f6f7f9); border-radius: 8px; }
.pub-thanks { text-align: center; padding: 1rem .5rem; border: 2px solid #86efac; background: #f0fdf4; border-radius: 12px; margin: .6rem 0; }
.pub-thanks h2 { margin: .3rem 0; } .pub-check-ico { width: 56px; height: 56px; line-height: 56px; margin: 0 auto; border-radius: 50%; background: #16a34a; color: #fff; font-size: 1.8rem; }
.pub-steps { text-align: left; max-width: 520px; margin: .8rem auto 0; padding-left: 1.3rem; } .pub-steps li { margin: .3rem 0; }
.pub-preview { position: sticky; top: 0; z-index: 5; }

/* Angebotseditor in drei Schritten */
.offer-wizard { display: grid; gap: 1rem; }
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.step-tab { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border: 1px solid var(--line, #d7dce3); border-radius: 999px; background: #fff; font: inherit; cursor: pointer; min-height: 44px; color: #374151; }
.step-tab.on { background: var(--brand-fill); color: #fff; border-color: var(--brand-fill); font-weight: 600; }
.step-no { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #e5e7eb; color: #111827; font-weight: 700; font-size: .85rem; } .step-tab.on .step-no { background: #fff; color: var(--brand-fill); }
.step-save { margin-left: auto; }
.step[hidden] { display: none; }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .4rem; flex-wrap: wrap; }
.of-quick { border: 1px dashed var(--line, #d7dce3); border-radius: 10px; padding: .6rem .7rem; background: var(--grey-l, #f6f7f9); }
.of-quick-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; } .of-quick-filter { max-width: 260px; }
.of-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .05rem; padding: .4rem .7rem; min-height: 44px; border: 1px solid var(--line, #d7dce3); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; text-align: left; }
.chip-btn:hover, .chip-btn:focus-visible { border-color: var(--brand, #c2185b); } .chip-btn small { color: var(--muted); font-size: .82rem; } .chip-btn em { font-style: normal; color: var(--muted); font-size: .85rem; } .chip-btn.added { background: #dcfce7; border-color: #16a34a; }
.chip-btn[hidden] { display: none; }
.orow-more > summary { cursor: pointer; color: var(--brand-d, #8e1250); font-size: .9rem; padding: .3rem 0; } .of-nums-adv { grid-template-columns: repeat(2, minmax(0, 160px)); }
.rv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } @media (max-width: 700px) { .rv-grid { grid-template-columns: 1fr; } }
.rv-card { border: 1px solid var(--line, #e3e7ee); border-radius: 10px; padding: .7rem .9rem; } .rv-card h3 { margin: 0 0 .3rem; font-size: .95rem; } .rv-card p { margin: .15rem 0; }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; } .rv-ico { display: inline-block; width: 1.4rem; } .rv-ok .rv-ico { color: #16a34a; } .rv-warn .rv-ico { color: #b45309; }
.of-actions .btn-big { flex: 1 1 260px; }
@media (max-width: 700px) {
  .step-nav { position: sticky; bottom: 0; background: #fff; padding: .6rem 0; border-top: 1px solid var(--line, #e3e7ee); z-index: 20; }
  .step-nav .btn-big { flex: 1 1 auto; } .step-save { margin-left: 0; flex: 1 1 100%; } .step-tab { flex: 1 1 30%; justify-content: center; padding: .4rem .5rem; } .step-label { font-size: .82rem; }
}

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem 1rem; margin: 1rem 0; } .pager [aria-disabled] { opacity: .45; }
