/* Aufgaben-Board: Grundlayout. Die vier Designs (A–D) unterscheiden sich über Variablen und wenige Zusatzregeln. */

/* Designs A und B folgen dem Brand Guide ALEX-SOUND (Nov. 2026): Schwarz, Off-White, wenig Gold; Helvetica Neue, Ersatz Arial. */

:root,
html[data-theme="A"] {
  --bg: #F5F1E8;
  --ink: #0E0D0B;
  --muted: #5F594C;
  --card: #FFFFFF;
  --card-border: #E2DAC8;
  --col-bg: transparent;
  --col-border: transparent;
  --accent: #0E0D0B;
  --accent-ink: #F5F1E8;
  --brand: #B8860B;
  --brand-ink: #0E0D0B;
  --kicker: #8A6410;
  --focus: #8A6410;
  --od: #A1260D;
  --banner-bg: #FFFFFF;
  --banner-border: #E2DAC8;
  --field-bg: #FFFFFF;
  --field-border: #B8B2A4;
  --prio-h-bg: #A1260D; --prio-h-ink: #FFFFFF; --prio-h-border: #A1260D;
  --prio-m-bg: #E6C25F; --prio-m-ink: #0E0D0B; --prio-m-border: #B8860B;
  --prio-l-bg: transparent; --prio-l-ink: #4A443A; --prio-l-border: #8A8272; --prio-l-style: dashed;
  --radius: 12px;
  --radius-pill: 999px;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-head: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-meta: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --head-weight: 800;
  --col-head-bg: transparent;
  --col-head-ink: var(--ink);
  --card-od-border: 2px solid var(--od);
  --card-od-bg: var(--card);
  --shadow: 0 1px 2px rgba(14, 13, 11, 0.06), 0 6px 18px rgba(14, 13, 11, 0.05);
}

html[data-theme="B"] {
  --bg: #0E0D0B;
  --ink: #F5F1E8;
  --muted: #B8B2A4;
  --card: #201D14;
  --card-border: #3A3423;
  --col-bg: #17150F;
  --col-border: transparent;
  --accent: #D4A62A;
  --accent-ink: #0E0D0B;
  --brand: #D4A62A;
  --brand-ink: #0E0D0B;
  --kicker: #D4A62A;
  --focus: #E6C25F;
  --od: #FFA28F;
  --banner-bg: #17150F;
  --banner-border: #3A3423;
  --field-bg: #17150F;
  --field-border: #6A6250;
  --prio-h-bg: #FFA28F; --prio-h-ink: #3B0A05; --prio-h-border: #FFA28F;
  --prio-m-bg: transparent; --prio-m-ink: #E6C25F; --prio-m-border: #D4A62A;
  --prio-l-bg: #2B271C; --prio-l-ink: #D3CFC4; --prio-l-border: #2B271C; --prio-l-style: solid;
  --radius: 12px;
  --radius-pill: 999px;
  --card-od-border: 2px solid var(--od);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="C"] {
  --bg: #FFFCF5;
  --ink: #2B2620;
  --muted: #6B6355;
  --card: #FFFCF5;
  --card-border: #EFE7D6;
  --col-bg: #FFFFFF;
  --accent: #B53A0F;
  --accent-ink: #FFFFFF;
  --focus: #8F1D14;
  --od: #8F1D14;
  --banner-bg: #FFE9A8;
  --banner-border: #FFE9A8;
  --field-bg: #FFFFFF;
  --field-border: #B9AF9B;
  --prio-h-bg: #8F1D14; --prio-h-ink: #FFFFFF; --prio-h-border: #8F1D14;
  --prio-m-bg: #FFD966; --prio-m-ink: #2B2620; --prio-m-border: #FFD966;
  --prio-l-bg: #FFFFFF; --prio-l-ink: #5A5245; --prio-l-border: #B9AF9B; --prio-l-style: solid;
  --radius: 16px;
  --font-head: "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head-weight: 800;
  --card-od-border: 3px solid var(--od);
}

html[data-theme="D"] {
  --bg: #FFFFFF;
  --ink: #111111;
  --muted: #555555;
  --card: #FFFFFF;
  --card-border: #111111;
  --col-bg: #FFFFFF;
  --col-border: #111111;
  --accent: #111111;
  --accent-ink: #FFFFFF;
  --focus: #111111;
  --od: #111111;
  --banner-bg: #FFE600;
  --banner-border: #111111;
  --field-bg: #FFFFFF;
  --field-border: #111111;
  --prio-h-bg: #111111; --prio-h-ink: #FFFFFF; --prio-h-border: #111111;
  --prio-m-bg: #FFFFFF; --prio-m-ink: #111111; --prio-m-border: #111111;
  --prio-l-bg: #FFFFFF; --prio-l-ink: #555555; --prio-l-border: #888888; --prio-l-style: dashed;
  --radius: 0px;
  --radius-pill: 0px;
  --font-head: "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-meta: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --head-weight: 700;
  --col-head-bg: #111111;
  --col-head-ink: #FFFFFF;
  --card-od-border: 1px solid #111111;
  --card-od-bg: #FFE600;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
html[data-theme="B"] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font-body);
}
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { color: var(--muted); padding: 8px 4px; }
.empty.big { font-size: 18px; padding: 24px 0; }

/* ---------- Anmeldung ---------- */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; flex-direction: column; gap: 12px; }
.card-form { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.center-link { margin: 0; }

/* ---------- Eingabefelder ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); }
input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; background: var(--field-bg); border: 1.5px solid var(--field-border); border-radius: min(var(--radius), 10px);
}
textarea { resize: vertical; }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; }
.form-error { color: var(--od); font-weight: 700; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Schaltflächen ---------- */
.btn { min-height: 44px; padding: 8px 18px; border-radius: min(var(--radius), 12px); border: 1.5px solid var(--ink); background: transparent; cursor: pointer; font-weight: 700; }
.btn.small { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { border-color: var(--field-border); font-weight: 600; }
.btn.danger { border-color: var(--od); color: var(--od); }
.btn:disabled { opacity: 0.5; cursor: default; }
html[data-theme="C"] .btn { border-radius: 999px; }

/* ---------- Kopf und Reiter ---------- */
.shell { max-width: 1480px; margin: 0 auto; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 18px; }
.top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.top h1 { font-size: 32px; }
.date { color: var(--muted); font-size: 15px; }
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.avatar { width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
html[data-theme="C"] .avatar { border-radius: 50%; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { min-height: 44px; padding: 8px 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--field-border); background: transparent; cursor: pointer; font-weight: 600; }
.tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
html[data-theme="D"] .tabs { gap: 0; }
html[data-theme="D"] .tab { border: 2px solid #111; margin-right: -2px; }
.banner { background: var(--banner-bg); border: 1px solid var(--banner-border); border-radius: min(var(--radius), 14px); padding: 12px 18px; }
html[data-theme="D"] .banner { border-width: 2px; }
.od-text { color: var(--od); }
html[data-theme="D"] .od-text { background: #111; color: #FFE600; padding: 2px 8px; }

/* ---------- Board ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; background: var(--col-bg); border: 3px solid var(--col-border); border-radius: calc(var(--radius) + 6px); padding: 12px; }
.col-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 4px; background: var(--col-head-bg); color: var(--col-head-ink); }
.col-head h2 { font-size: 21px; }
.count { margin-left: auto; font-size: 14px; color: var(--muted); }
html[data-theme="B"] .col { padding: 14px; border-radius: 16px; border: 1px solid var(--card-border); }
html[data-theme="B"] .col-head .avatar { background: #0E0D0B; color: var(--brand); border: 2px solid var(--brand); }
html[data-theme="C"] .col { padding: 0 0 14px; overflow: hidden; border-color: var(--pc); gap: 12px; }
html[data-theme="C"] .col-head { padding: 16px; background: var(--pc); color: #2B2620; }
html[data-theme="C"] .col-head h2 { font-size: 25px; }
html[data-theme="C"] .col-head .avatar { background: #2B2620; color: #fff; }
html[data-theme="C"] .col-head .count { background: #2B2620; color: #fff; border-radius: 8px; padding: 4px 12px; font-weight: 800; }
html[data-theme="C"] .col > .task, html[data-theme="C"] .col > .empty, html[data-theme="C"] .col > .done-list { margin: 0 12px; }
.col[data-pi="0"] { --pc: #F6D5A8; }
.col[data-pi="1"] { --pc: #BFE3D0; }
.col[data-pi="2"] { --pc: #F4B79A; }
.col[data-pi="3"] { --pc: #E6E0A3; }
html[data-theme="D"] .board { gap: 0; border: 2px solid #111; }
html[data-theme="D"] .col { border: 0; border-left: 2px solid #111; padding: 0; gap: 0; border-radius: 0; }
html[data-theme="D"] .col:first-child { border-left: 0; }
html[data-theme="D"] .col-head { padding: 12px 14px; }
html[data-theme="D"] .col-head h2 { text-transform: uppercase; letter-spacing: 1px; font-size: 18px; }
html[data-theme="D"] .col-head .avatar { display: none; }
html[data-theme="D"] .col-head .count { color: #fff; font-family: var(--font-meta); }
html[data-theme="D"] .col > .empty, html[data-theme="D"] .col > .done-list { padding: 12px 14px; }

.task { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.task.overdue { border: var(--card-od-border); background: var(--card-od-bg); }
html[data-theme="D"] .task { border: 0; border-bottom: 1px solid #111; }
.task.is-done { opacity: 0.75; }
.task.is-done .task-title { text-decoration: line-through; }
.od-flag { font-size: 13px; font-weight: 800; color: var(--od); }
html[data-theme="D"] .od-flag { font-family: var(--font-meta); background: #111; color: #FFE600; align-self: flex-start; padding: 2px 8px; text-transform: uppercase; }
.task-title { background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; font-weight: 600; font-size: 15px; line-height: 1.35; color: inherit; min-height: 24px; }
.task-title:hover { text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.meta .due, .meta .rec { color: var(--muted); font-family: var(--font-meta); }
.meta .due.od { color: var(--od); font-weight: 700; }
.follows { color: var(--muted); }
.prio { font-size: 13px; font-weight: 800; padding: 3px 11px; border: 1.5px solid; border-radius: var(--radius-pill); white-space: nowrap; font-family: var(--font-meta); }
.prio-h { background: var(--prio-h-bg); color: var(--prio-h-ink); border-color: var(--prio-h-border); }
.prio-m { background: var(--prio-m-bg); color: var(--prio-m-ink); border-color: var(--prio-m-border); }
.prio-l { background: var(--prio-l-bg); color: var(--prio-l-ink); border-color: var(--prio-l-border); border-style: var(--prio-l-style, solid); }
.done-btn { align-self: flex-start; border-color: var(--field-border); font-weight: 700; padding: 6px 16px; }
.done-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.done-list summary { cursor: pointer; padding: 6px 2px; color: var(--muted); min-height: 36px; }
.done-list .task { margin-top: 8px; }
.unassigned { margin-top: 24px; }
.unassigned h2 { font-size: 20px; margin-bottom: 10px; }
.unassigned-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }

/* ---------- Meine Aufgaben heute ---------- */
.today, .templates, .archive, .team, .profile { max-width: 860px; display: flex; flex-direction: column; gap: 16px; }
.today-group h3 { font-size: 18px; margin-bottom: 8px; }
.today-list { display: flex; flex-direction: column; gap: 10px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Vorlagen, Archiv, Team, Profil ---------- */
.tpl { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
html[data-theme="D"] .tpl { border: 2px solid #111; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.search { display: flex; gap: 8px; }
.arch-list, .user-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.arch-list li { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.user-list li { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.user-list li.inactive { opacity: 0.6; }
.u-name { flex: 1 1 200px; display: flex; flex-direction: column; }
.profile section { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 260px; }
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.theme-opt { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--card); border: 2px solid var(--field-border); border-radius: min(var(--radius), 12px); cursor: pointer; min-height: 44px; }
.theme-opt.active { border-color: var(--accent); outline: 3px solid var(--accent); outline-offset: -3px; }
.theme-swatch { height: 44px; border-radius: 6px; border: 1px solid #888; }
.sw-A { background: linear-gradient(90deg, #F5F1E8 55%, #0E0D0B 55% 70%, #B8860B 70% 85%, #FFFFFF 85%); }
.sw-B { background: linear-gradient(90deg, #0E0D0B 55%, #D4A62A 55% 70%, #201D14 70% 85%, #F5F1E8 85%); }
.sw-C { background: linear-gradient(90deg, #F6D5A8 25%, #BFE3D0 25% 50%, #F4B79A 50% 75%, #E6E0A3 75%); }
.sw-D { background: linear-gradient(90deg, #FFFFFF 30%, #111111 30% 60%, #FFE600 60%); }
.temp-pw { font: 700 22px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; padding: 12px; background: var(--field-bg); border: 1.5px solid var(--field-border); border-radius: 8px; user-select: all; word-break: break-all; }

/* ---------- Dialoge ---------- */
.dlg { border: 0; border-radius: var(--radius); padding: 22px; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 24px); background: var(--bg); color: var(--ink); box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35); }
.dlg.wide { width: min(980px, calc(100% - 24px)); }
.dlg::backdrop { background: rgba(0, 0, 0, 0.5); }
.dlg h2 { font-size: 22px; margin-bottom: 14px; }
.dlg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.seg { display: inline-flex; margin-bottom: 14px; border: 1.5px solid var(--field-border); border-radius: var(--radius-pill); overflow: hidden; }
.seg-btn { min-height: 44px; padding: 8px 16px; border: 0; background: transparent; cursor: pointer; font-weight: 600; }
.seg-btn.active { background: var(--accent); color: var(--accent-ink); }
.preview { border-top: 1px solid var(--card-border); padding-top: 8px; }
.step-list { display: flex; flex-direction: column; gap: 10px; }
.step-row { display: grid; grid-template-columns: 24px minmax(160px, 2fr) 110px 110px minmax(120px, 1.2fr) 72px minmax(150px, 1.4fr) 44px 44px 44px; gap: 6px; align-items: center; }
.step-num { font-weight: 800; text-align: center; }
.step-row.step-head { font-size: 12px; font-weight: 700; color: var(--muted); }
.step-row .btn.small { padding: 6px 4px; }

/* ---------- Navigation in zwei Reihen ---------- */
.navbar { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.tabs-2 { margin-left: auto; }
.tab.small { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.link { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font: inherit; text-align: left; }
.link.strong { font-weight: 700; text-decoration: none; }
.link.strong:hover { text-decoration: underline; }
.link.small { font-size: 13px; }
.strong { font-weight: 700; }
.warn-text { color: var(--od); font-weight: 600; }
.good-text { font-weight: 600; }
.notes { white-space: pre-wrap; margin: 6px 0 0; }

/* ---------- Zentrale ---------- */
.zentrale, .inquiries, .customers, .projects, .calendar, .detail { display: flex; flex-direction: column; gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 14px 16px; background: var(--card); border: 1.5px solid var(--card-border); border-radius: var(--radius); cursor: pointer; text-align: left; min-height: 44px; }
.tile:hover { border-color: var(--accent); }
.tile-value { font: var(--head-weight) 30px/1.1 var(--font-head); }
.tile-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile.warn { border-color: var(--od); }
.tile.warn .tile-value { color: var(--od); }
html[data-theme="D"] .tile { border: 2px solid #111; }
html[data-theme="D"] .tile.warn { background: #FFE600; }
.dash-grid, .detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel h3 { font-size: 18px; }
html[data-theme="D"] .panel { border: 2px solid #111; }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mini-list li { border-bottom: 1px solid var(--card-border); padding-bottom: 8px; display: flex; flex-direction: column; gap: 2px; }
.mini-list li:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------- Status-Chips (immer Symbol + Text) ---------- */
.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border: 1.5px solid var(--field-border); border-radius: var(--radius-pill); white-space: nowrap; font-family: var(--font-meta); background: var(--card); }
.chip.big { font-size: 16px; padding: 6px 14px; }
.chip.st-neu, .chip.st-laufend { border-color: var(--accent); }
.chip.st-warten_kunde { border-style: dashed; }
.chip.st-abgesagt, .chip.st-keine_antwort, .chip.st-keine_anfrage, .chip.verdict-passt_nicht { border-color: var(--od); color: var(--od); }
.chip.st-zugesagt, .chip.st-abgeschlossen, .chip.verdict-passt { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.verdict-klaerung, .chip.verdict-offen { border-style: dashed; color: var(--muted); }
.chip.verdict-unter { border-color: var(--prio-m-border); background: var(--prio-m-bg); color: var(--prio-m-ink); }

/* ---------- Anfragen und Kunden ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card.overdue { border: var(--card-od-border); }
.card-top { display: flex; flex-wrap: wrap; gap: 6px; }
html[data-theme="D"] .card { border: 2px solid #111; }
.card .dismiss { align-self: flex-start; }
.inq-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--card-border); padding-top: 12px; }
.cust-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cust-list li { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cust-list li.inactive { opacity: 0.6; }
.cust-stats { flex: 0 1 auto; }
.task.proj .task-title { font-size: 16px; }
.task.is-waiting { border-style: dashed; }

/* ---------- Detailseiten (Projekt, Kunde) ---------- */
.crumbs { font-size: 14px; }
.kv-list { display: flex; flex-direction: column; gap: 6px; }
.kv { display: grid; grid-template-columns: minmax(110px, 150px) 1fr; gap: 8px; align-items: baseline; }
.kv .k { color: var(--muted); font-size: 13px; font-weight: 600; }
.kv .v { min-width: 0; overflow-wrap: anywhere; }
.status-select { min-height: 44px; width: auto; }
.log { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
html[data-theme="D"] .log { border: 2px solid #111; }
.log h3 { font-size: 18px; }
.log-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.log-form select { flex: 0 1 140px; width: auto; }
.log-form input { flex: 1 1 200px; }
.log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.log-list li { border-left: 3px solid var(--field-border); padding-left: 10px; display: flex; flex-direction: column; gap: 2px; }
.log-text { white-space: pre-wrap; }

/* ---------- Checkliste, Ressourcen, Dokumente ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-progress { height: 8px; background: var(--field-border); border-radius: 4px; overflow: hidden; }
.cl-bar { height: 100%; background: var(--accent); }
.cl-group h4 { font-size: 14px; margin: 10px 0 4px; color: var(--muted); }
.cl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cl-list li { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--card-border); }
.cl-list li:last-child { border-bottom: 0; }
.cl-list li.done .cl-title { text-decoration: line-through; color: var(--muted); }
.cl-item { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 auto; cursor: pointer; min-width: 0; }
.cl-item input { margin-top: 2px; flex: none; }
.cl-tools { display: flex; gap: 10px; flex: none; }
.mini-list li.inactive { opacity: 0.6; }

/* ---------- Einsatzplan, Ablaufplan ---------- */
.sched { width: 100%; border-collapse: collapse; font-size: 14px; }
.sched td { padding: 6px 8px; border-bottom: 1px solid var(--card-border); vertical-align: top; }
.sched tr:last-child td { border-bottom: 0; }
.sched-time { white-space: nowrap; font-family: var(--font-meta); font-weight: 700; width: 70px; }
.sched-row { display: grid; grid-template-columns: 110px minmax(160px, 2fr) minmax(90px, 1fr) minmax(120px, 1.4fr) 44px 44px 44px; gap: 6px; align-items: center; }
@media (max-width: 800px) { .sched-row { grid-template-columns: 1fr 1fr; } .sched-row > .s-title { grid-column: 1 / 3; } .sched-row.step-head { display: none; } }

/* ---------- Druckansicht (Ablaufplan) ---------- */
.print-sheet { display: none; }
@media print {
  html.printing #app, html.printing .toast, html.printing dialog { display: none !important; }
  html.printing .print-sheet { display: block; font: 13px/1.5 system-ui, sans-serif; color: #111; }
  .print-sheet h1 { font-size: 22px; margin: 0 0 4px; }
  .print-sheet h2 { font-size: 16px; margin: 20px 0 6px; }
  .print-meta { color: #555; margin-bottom: 16px; }
  .print-sheet table { border-collapse: collapse; width: 100%; }
  .print-sheet td, .print-sheet th { border-bottom: 1px solid #ccc; padding: 6px 8px; text-align: left; vertical-align: top; }
  .print-sheet th { font-size: 12px; color: #555; }
  .print-time { white-space: nowrap; font-weight: 700; }
}

/* ---------- Kunden-Check ---------- */
.check-result { background: var(--banner-bg); border: 1px solid var(--banner-border); border-radius: min(var(--radius), 12px); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.check-score { font-size: 16px; }
.check-pts { font: var(--head-weight) 36px/1 var(--font-head); }
.clarify { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.check h3 { font-size: 17px; margin-top: 6px; }
.check-row { border: 1px solid var(--card-border); border-radius: min(var(--radius), 12px); padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--card); }
.check-row p { margin: 0; }
.check-row.req { border-style: dashed; }

/* ---------- Kalender ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { font-size: 13px; font-weight: 700; color: var(--muted); padding: 4px 6px; }
.cal-cell { min-height: 96px; background: var(--card); border: 1px solid var(--card-border); border-radius: min(var(--radius), 8px); padding: 4px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.other { opacity: 0.55; }
.cal-cell.today { border: 2px solid var(--accent); }
.cal-cell.clash { border-color: var(--od); border-style: dashed; }
.clash-flag { color: var(--od); font-weight: 800; }
.arch-list li .row-btns { margin-left: auto; }
html[data-theme="D"] .cal-cell.today { background: #FFE600; }
.cal-day { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.cal-add { opacity: 0.35; min-height: 24px; }
.cal-cell:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-entry { background: none; border: 1px solid var(--card-border); border-radius: 6px; padding: 2px 6px; font: 600 12px/1.3 var(--font-meta); color: inherit; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-entry.t-project { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cal-entry.t-event { border-color: var(--ink); }
.cal-entry.t-task { border-style: dashed; }
.cal-entry.t-task.mine { border-style: solid; border-color: var(--ink); }
.cal-entry.t-inquiry, .cal-entry.t-istep { color: var(--muted); }
.agenda { display: flex; flex-direction: column; gap: 12px; }
.agenda h3 { font-size: 18px; }
.agenda-day h4 { font-size: 15px; margin: 0 0 4px; }
.agenda-list { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.agenda-list .cal-entry { white-space: normal; font-size: 14px; padding: 6px 10px; min-height: 36px; }

/* ---------- Hinweis ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #111; color: #fff; padding: 12px 20px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: calc(100% - 32px); z-index: 1000; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 800px) {
  .shell { padding: 16px 14px 40px; }
  .board { grid-template-columns: 1fr; }
  .col[data-me="1"] { order: -1; }
  html[data-theme="D"] .col { border-left: 0; border-top: 2px solid #111; }
  .two { grid-template-columns: 1fr; }
  .step-row { grid-template-columns: 24px 1fr 1fr; }
  .step-row > input.s-title { grid-column: 2 / 4; }
  .step-row.step-head { display: none; }
  .top h1 { font-size: 26px; }
  .tabs-2 { margin-left: 0; }
  .cal-grid { display: none; }
  .kv { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

/* ---------- Firmenlook (Designs A und B) nach Brand Guide ---------- */
html[data-theme="A"] body, html[data-theme="B"] body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
html[data-theme="A"] .top, html[data-theme="B"] .top { padding-bottom: 16px; border-bottom: 2px solid var(--brand); }
html[data-theme="A"] .top h1, html[data-theme="B"] .top h1 { text-transform: uppercase; letter-spacing: 0.01em; font-size: 28px; line-height: 1.1; display: flex; align-items: center; gap: 14px; }
.brand-logo { display: none; height: 36px; width: auto; }
html[data-theme="B"] .brand-logo { display: block; }
html[data-theme="B"] .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.brand-sub { color: var(--kicker, var(--muted)); font-size: 12px; font-weight: 700; letter-spacing: 0.4em; text-transform: uppercase; }
html[data-theme="A"] h2, html[data-theme="B"] h2, html[data-theme="A"] h3, html[data-theme="B"] h3 { text-transform: uppercase; line-height: 1.1; letter-spacing: 0.01em; }
html[data-theme="A"] .panel h3, html[data-theme="B"] .panel h3 { font-size: 16px; }
html[data-theme="A"] .col-head h2, html[data-theme="B"] .col-head h2 { font-size: 19px; }
html[data-theme="A"] .panel, html[data-theme="B"] .panel, html[data-theme="A"] .task, html[data-theme="B"] .task,
html[data-theme="A"] .tile, html[data-theme="B"] .tile, html[data-theme="A"] .card, html[data-theme="B"] .card { box-shadow: var(--shadow); }
html[data-theme="A"] .tile, html[data-theme="B"] .tile { border-width: 1px; transition: transform 0.12s ease, border-color 0.12s ease; }
html[data-theme="A"] .tile:hover, html[data-theme="B"] .tile:hover { transform: translateY(-2px); border-color: var(--brand); }
html[data-theme="A"] .tile-value, html[data-theme="B"] .tile-value { color: var(--brand); font-weight: 800; }
html[data-theme="A"] .tile.warn .tile-value, html[data-theme="B"] .tile.warn .tile-value { color: var(--od); }
html[data-theme="A"] .tile-label, html[data-theme="B"] .tile-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; font-weight: 700; }
html[data-theme="A"] .tab, html[data-theme="B"] .tab { border-color: transparent; background: transparent; font-size: 14.5px; }
html[data-theme="A"] .tab:hover, html[data-theme="B"] .tab:hover { border-color: var(--field-border); }
html[data-theme="A"] .tab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
html[data-theme="B"] .tab.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
html[data-theme="A"] .banner, html[data-theme="B"] .banner { border-left: 4px solid var(--brand); }
html[data-theme="A"] dialog, html[data-theme="B"] dialog { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
html[data-theme="B"] .btn.primary:hover { background: #E6C25F; border-color: #E6C25F; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none !important; } }

/* ---------- Umschalter (Firma / Ich, Hell / Dunkel) ---------- */
.seg { display: inline-flex; border: 1.5px solid var(--field-border); border-radius: var(--radius-pill); padding: 3px; gap: 3px; background: var(--card); }
.seg-opt { min-height: 40px; padding: 6px 16px; border: 0; border-radius: var(--radius-pill); background: transparent; cursor: pointer; font-weight: 600; }
.seg-opt[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.scope-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.scope-bar .hint { font-size: 13px; }

/* ---------- Board: eine Person im Fokus ---------- */
.col-name { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.col-name:hover { text-decoration: underline; text-decoration-color: var(--brand, var(--accent)); text-underline-offset: 4px; }
.board.single { grid-template-columns: 1fr; }
.board.single .col { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.board.single .col > .col-head, .board.single .col > .done-list, .board.single .col > .empty { grid-column: 1 / -1; }

/* ---------- Meine Übersicht ---------- */
.my-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.my-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px 12px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--card-border); }
.my-row:last-child { border-bottom: 0; }
.my-row input[type="checkbox"] { width: 26px; height: 26px; margin-top: 2px; cursor: pointer; }
.my-row.is-done .task-title { text-decoration: line-through; opacity: 0.7; }
.my-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.my-notes { color: var(--muted); font-size: 13px; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.my-group-head { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.my-group-head h3 { font-size: 17px; }
.my-group-head.od h3 { color: var(--od); }
.help-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.help-prompt { min-height: 190px; font-size: 14px; }
@media (max-width: 560px) { .my-row { grid-template-columns: 34px 1fr; } .my-row > .btn { grid-column: 2; justify-self: start; } }
.tile { min-width: 0; }
.tile-value.long { font-size: 21px; white-space: nowrap; }

/* ---------- Akquise ---------- */
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--brand, var(--accent)); }
.inquiries .card .chips .chip, dialog .chip { white-space: normal; font-weight: 600; }
dialog .detail-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
dialog .kv { grid-template-columns: 1fr; gap: 0; margin-bottom: 6px; }
