/* Wirthwein Digital Dashboard – „Atelier“
   Warmes Off-White, fast schwarze Schrift, Petrol als einziger Akzent (3-Farben-Regel, Webhandbuch).
   Weiße Karten mit großen Radien, feine Strich-Icons in Kreisen, runde schwarze Pfeil-Knöpfe.
   Pro Seite höchstens eine Hauptkarte mit körnigem Petrol-Verlauf (img/verlauf.webp), Statistik auf dunkler Fläche.
   Status-Farben (ok/warn/bad) nur als kleine Punkte und zarte Hinterlegung, nie als große Fläche.
   Schrift: DM Sans (selbst gehostet). Radien 12 / 16 / 22 / 30 / Kapsel · Raster 4/8 · Icons Strich 1.6. */
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --bg: #ECEAE4;
  --surface: #FBFAF7;
  --surface-2: #F3F1EC;
  --ink: #151515;
  --ink-2: #232323;
  --text: #151515;
  --text-2: #5C5A55;
  --text-3: #8A8780;
  --line: rgba(21, 21, 21, .09);
  --line-2: rgba(21, 21, 21, .16);
  --s3: rgba(21, 21, 21, .08);
  --accent: #0E5A62;
  --accent-soft: #DDE9E7;
  --accent-light: #8FC9C6;
  --ok: #2E8059; --ok-bg: #E2EFE6;
  --warn: #A9680C; --warn-bg: #F6EBD7;
  --bad: #B8402F; --bad-bg: #F6E1DC;
  --info: #0E5A62; --info-bg: #E1ECEA;
  --neutral-bg: #ECEAE4;
  --shadow: 0 1px 2px rgba(21, 21, 21, .04), 0 14px 34px -18px rgba(21, 21, 21, .22);
  --r-xs: 12px; --r-s: 16px; --r-m: 22px; --r-l: 30px; --r-pill: 999px;
  --font: "DM Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --tabbar-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: clip; }
html { overscroll-behavior-y: none; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; font-variant-emoji: text; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
code { font-family: var(--mono); font-size: .9em; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 16px; height: 16px; }
svg.i.l { width: 24px; height: 24px; }
.aurora { display: none; }

/* ---------- Grundgerüst ---------- */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-logo { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.94); } }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 16px 10px; transition: background .2s, box-shadow .2s; }
.topbar.scrolled { background: rgba(236, 234, 228, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); }
.brand-mark svg { width: 22px; height: 16px; }
.brand small { display: block; font-weight: 400; font-size: 12px; color: var(--text-3); }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; text-decoration: none; position: relative; transition: background .15s; }
.icon-btn:hover { background: var(--surface); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--bg); }
.icon-btn .dot.off { background: var(--bad); }
.demo-flag { font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 5px 11px; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn); }

.view { padding: 4px 16px calc(var(--tabbar-h) + var(--safe-b) + 36px); max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 10px 0 18px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.02; letter-spacing: -.035em; margin: 0; font-weight: 600; }
.page-head p { margin: 8px 0 0; color: var(--text-2); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; min-height: 44px; padding-right: 8px; }
.back:hover { color: var(--text); }
.help { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin: 0 0 18px; padding: 12px 16px; border-radius: var(--r-m); border: 1px solid var(--line-2); }
.help svg { color: var(--accent); margin-top: 1px; }
.help b { color: var(--text); font-weight: 600; }

/* Navigation: helle Leiste unten (Handy), Kapseln oben (Desktop) */
.tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 30px; background: rgba(251, 250, 247, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: 0 18px 40px -14px rgba(21, 21, 21, .28); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border-radius: 24px; text-decoration: none; color: var(--text-3); font-size: 11px; font-weight: 600; position: relative; transition: background .2s, color .2s; }
.tab[aria-current="page"] { color: var(--text); background: #fff; box-shadow: 0 6px 16px -8px rgba(21, 21, 21, .35); }
.tab[aria-current="page"]::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.tab[aria-current="page"] span:not(.badge-n) { display: none; }
.tab .badge-n { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }

@media (min-width: 900px) {
  .tabbar { top: calc(14px + var(--safe-t)); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); z-index: 45; display: flex; gap: 6px; padding: 0; border: 0; border-radius: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .tab { flex-direction: row; min-height: 38px; padding: 0 18px; font-size: 13px; border-radius: var(--r-pill); gap: 7px; border: 1px solid var(--line-2); color: var(--text-2); background: rgba(236, 234, 228, .8); }
  .tab:hover { color: var(--text); border-color: var(--text-3); }
  .tab svg { width: 16px; height: 16px; }
  .tab[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: none; }
  .tab[aria-current="page"]::after { display: none; }
  .tab[aria-current="page"] span:not(.badge-n) { display: inline; }
  .tab .badge-n { position: static; height: 18px; background: var(--accent); }
  .view { padding-bottom: 56px; padding-left: 32px; padding-right: 32px; }
  .topbar { padding-left: 32px; padding-right: 32px; }
}

/* ---------- Karten ---------- */
.card { position: relative; background: var(--surface); border-radius: var(--r-l); padding: 22px; box-shadow: var(--shadow); }
.card.tight { padding: 18px; border-radius: var(--r-m); }
.card.tint { background: var(--accent-soft); box-shadow: none; }
.card.ink { background: var(--ink); color: #F1EFEA; box-shadow: none; }
.card.ink .muted, .card.ink .faint { color: rgba(241, 239, 234, .58); }
.card h2, .card-title { margin: 0 0 14px; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.card-title .spacer, .row .spacer { flex: 1; }
.grid { display: grid; gap: 12px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Kreis-Icon und runder Pfeil-Knopf */
.ring { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--text); }
.go { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; transition: transform .15s; }
.go svg { width: 16px; height: 16px; }

/* ---------- Startseite ---------- */
.home { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.hero { position: relative; overflow: hidden; border-radius: var(--r-l); padding: 24px; min-height: 230px; display: flex; flex-direction: column; color: #fff;
  background: linear-gradient(15deg, rgba(4, 30, 33, .82) 0%, rgba(4, 30, 33, .45) 45%, rgba(4, 30, 33, .12) 100%), url("img/verlauf.webp") 30% 40% / cover, #0E5A62; }
.hero.calm { background: linear-gradient(15deg, rgba(4, 30, 33, .7) 0%, rgba(4, 30, 33, .3) 50%, rgba(4, 30, 33, 0) 100%), url("img/verlauf.webp") 70% 60% / cover, #0E5A62; }
.hero svg.orbs { display: none; }
.hero .label { font-weight: 600; font-size: 15px; position: relative; }
.hero .big { position: relative; font-size: clamp(76px, 14vw, 116px); line-height: .9; font-weight: 600; letter-spacing: -.055em; margin: 14px 0 8px; }
.hero .sub { position: relative; font-size: 15px; color: rgba(255, 255, 255, .88); max-width: 380px; }
.hero .actions { margin-top: auto; padding-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; position: relative; }

.tasks { display: flex; flex-direction: column; gap: 10px; }
.task { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; border-radius: var(--r-m); text-decoration: none; min-height: 74px; background: var(--surface); box-shadow: var(--shadow); transition: transform .15s; }
.task:hover .t-go { transform: rotate(45deg); }
.task:active { transform: scale(.985); }
.task .t-ic { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); }
.task .t-main { flex: 1; min-width: 0; }
.task .t-title { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.task .t-sub { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task .t-go { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; transition: transform .2s; }
.task .t-go svg { width: 16px; height: 16px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { padding: 16px; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 132px; }
.kpi .k-l { font-size: 13px; color: var(--text-2); line-height: 1.3; font-weight: 600; }
.kpi .k-v { font-size: 34px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin-top: auto; padding-top: 14px; line-height: 1; }
.kpi .k-s { font-size: 12px; color: var(--text-3); margin-top: 6px; }
@media (max-width: 520px) { .kpi { min-height: 116px; padding: 14px; } .kpi .k-v { font-size: 26px; } }

/* Statistik auf dunkler Fläche: feine Linien, Akzent nur am aktuellen Monat */
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 170px; margin-top: 14px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar .b { width: 2px; position: relative; border-radius: 2px; background: rgba(241, 239, 234, .32); min-height: 6px; font-size: 0; }
.bar .b::before { content: ""; position: absolute; top: -2px; left: 50%; transform: translateX(-50%); width: 18px; height: 3px; border-radius: 2px; background: rgba(241, 239, 234, .75); }
.bar .b::after { content: attr(data-v); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); font-size: 11px; color: rgba(241, 239, 234, .6); white-space: nowrap; }
.bar.cur .b { background: var(--accent-light); }
.bar.cur .b::before { background: var(--accent-light); width: 24px; }
.bar.cur .b::after { color: #fff; font-weight: 600; }
.bar .m { font-size: 12px; color: rgba(241, 239, 234, .55); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--text) !important; background: transparent !important; border: 1px solid var(--line-2); }
.feed .f-t { font-size: 14px; }
.feed .f-m { font-size: 12px; color: var(--text-3); }

details.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 17px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .chev { margin-left: auto; transition: transform .2s; color: var(--text-3); }
details.more[open] > summary .chev { transform: rotate(90deg); }

@media (min-width: 900px) {
  .home { grid-template-columns: 1fr 1.2fr; align-items: start; gap: 16px; }
  .home .hero { min-height: 320px; padding: 30px; position: sticky; top: 76px; }
  .home .span-2 { grid-column: 1 / -1; }
}

/* ---------- Bedienelemente ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .1s, background .15s, opacity .15s; }
.btn:hover { background: #fff; border-color: var(--text-3); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: var(--ink-2); }
.btn.ok { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.ok:hover { background: #0B4B52; }
.btn.danger { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(21, 21, 21, .05); }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.dark { background: rgba(10, 18, 20, .55); color: #fff; border-color: transparent; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.big { min-height: 54px; font-size: 15px; padding: 0 26px; }
kbd { font: 600 11px var(--mono); padding: 1px 6px; border-radius: 6px; border: 1px solid currentColor; color: inherit; opacity: .45; margin-left: 2px; }
@media (hover: none) { kbd { display: none; } }

.actionbar { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px); z-index: 20; display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: var(--r-pill); background: var(--surface); box-shadow: 0 18px 40px -14px rgba(21, 21, 21, .3); margin-top: 16px; }
.actionbar .btn { flex: 1 1 auto; }
.actionbar .btn.more { flex: 0 0 46px; width: 46px; padding: 0; }
.actionbar .hint-txt { flex-basis: 100%; text-align: center; font-size: 12px; color: var(--text-3); padding-bottom: 2px; }
.actionbar:has(.hint-txt) { flex-wrap: wrap; border-radius: var(--r-l); }
/* Feste Variante: bleibt an ihrem Platz (z. B. Website-Check neben der Checkliste) */
.actionbar.static { position: static; flex-direction: column; align-items: stretch; padding: 0; margin: 0; background: transparent; box-shadow: none; border-radius: 0; }
.actionbar.static .btn { width: 100%; flex: none; }
@media (min-width: 900px) { .actionbar { bottom: 18px; } .actionbar:not(.static) .btn { flex: 0 0 auto; } }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; margin: 0 -16px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.chip .n { font-size: 11px; opacity: .7; }

.seg { display: inline-flex; padding: 0; gap: 6px; }
.seg button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-2); background: transparent; border-radius: var(--r-pill); color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: #fff; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { min-height: 160px; resize: vertical; line-height: 1.55; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.input.err { border-color: var(--bad); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search .input { padding-left: 42px; border-radius: var(--r-pill); }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info, .badge.lime { background: var(--info-bg); color: var(--info); }
.badge.violet { background: var(--neutral-bg); color: var(--text); }
.badge.plain::before { display: none; }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-m); background: var(--surface); text-decoration: none; min-height: 70px; box-shadow: var(--shadow); transition: transform .15s; }
a.item:active { transform: scale(.985); }
.item .ic { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--text); }
.item .main { flex: 1; min-width: 0; }
.item .t, .item .s { display: block; }
.item .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.group-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 24px 4px 10px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.group-h:first-child { margin-top: 4px; }
.group-h span { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--text-3); }

.empty { text-align: center; padding: 40px 20px; color: var(--text-2); border: 1px dashed var(--line-2); border-radius: var(--r-l); }
.empty svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 4px; }

.notice { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--r-m); font-size: 14px; background: var(--info-bg); color: var(--text); }
.notice svg { color: var(--info); margin-top: 1px; }
.notice.warn { background: var(--warn-bg); }
.notice.warn svg { color: var(--warn); }
.notice.bad { background: var(--bad-bg); }
.notice.bad svg { color: var(--bad); }
.notice.ok { background: var(--ok-bg); }
.notice.ok svg { color: var(--ok); }

/* Fortschritt (Phasen): Punkte-Reihe */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 2px; }
.steps .st { height: 4px; border-radius: 2px; background: var(--line-2); }
.steps .st.on { background: var(--ink); }
.steps-l { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; font-size: 11px; color: var(--text-3); margin-top: 6px; line-height: 1.25; }
.steps-l .on { color: var(--text); font-weight: 600; }

/* Detailseiten */
.detail { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .detail { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; } .detail .side { position: sticky; top: 84px; } }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.mailtext { white-space: pre-wrap; font-size: 15px; line-height: 1.65; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; overflow-wrap: anywhere; }
.msg { padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); max-width: 92%; white-space: pre-wrap; font-size: 14px; }
.msg.in { background: var(--accent-soft); }
.msg.out { margin-left: auto; background: #fff; border: 1px solid var(--line); }
.msg .meta { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 8px 0 8px 18px; border-left: 1px solid var(--line-2); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.timeline .when { color: var(--text-3); font-size: 12px; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: var(--r-s); background: var(--surface-2); min-height: 44px; position: relative; transition: background .15s; }
.check .mark { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; border: 1px solid var(--line-2); color: var(--text-3); }
.check .mark svg { width: 13px; height: 13px; }
.check.ok .mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.check.no .mark { background: #fff; }
.check .hint { display: block; font-size: 12px; color: var(--text-3); }
label.check { cursor: pointer; }
label.check:hover { background: #ECE9E2; }
label.check input { position: absolute; opacity: 0; pointer-events: none; }
label.check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 80%); gap: 12px; overflow-x: auto; padding: 4px 16px 12px; scroll-snap-type: x mandatory; margin: 0 -16px; }
@media (min-width: 900px) { .board { grid-auto-columns: minmax(200px, 1fr); margin: 0; padding: 4px 0 12px; } }
.col { scroll-snap-align: start; background: var(--surface-2); border-radius: var(--r-l); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.col h3 { margin: 2px 4px 0; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; }
.col .col-hint { margin: 0 4px 4px; font-size: 11px; color: var(--text-3); line-height: 1.35; }
.lcard { display: block; padding: 12px 14px; border-radius: var(--r-s); background: var(--surface); text-decoration: none; box-shadow: 0 1px 2px rgba(21, 21, 21, .05); }
.lcard:hover { background: #fff; }
.lcard .t { font-weight: 600; font-size: 14px; }
.lcard .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* Website-Vorschau */
.preview-wrap { border-radius: var(--r-m); overflow: hidden; background: #fff; border: 1px solid var(--line); position: relative; box-shadow: var(--shadow); }
.preview-wrap.mobile { width: 390px; max-width: 100%; margin: 0 auto; height: min(720px, 64dvh); border-radius: 44px; border: 9px solid var(--ink); box-shadow: 0 30px 60px -24px rgba(21, 21, 21, .45); }
.preview-wrap.desktop { height: 560px; }
.preview-wrap iframe { border: 0; display: block; background: #fff; }
.preview-wrap.mobile iframe { width: 100%; height: 100%; }
.preview-wrap.desktop iframe { width: 1280px; height: calc(560px / var(--scale, 1)); transform: scale(var(--scale, 1)); transform-origin: 0 0; }
.preview-wrap.voll { position: fixed; inset: 0; z-index: 200; width: 100%; max-width: none; height: 100dvh; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.preview-wrap.voll iframe { width: 100%; height: 100%; }
.preview-wrap.voll.desktop iframe { width: 1280px; height: calc(100dvh / var(--scale, 1)); }
.preview-wrap .preview-tap { display: none; }
@media (max-width: 899px) {
  /* Am Handy: Vorschau als ruhiges Bild, Tippen öffnet das Vollbild zum Scrollen */
  .preview-wrap:not(.voll) iframe { pointer-events: none; }
  .preview-wrap.mobile:not(.voll) { height: 58dvh !important; cursor: pointer; }
  .preview-wrap:not(.voll) .preview-tap { display: flex; position: absolute; inset: auto 12px 12px 12px; z-index: 2; justify-content: center; align-items: center; gap: 8px; min-height: 46px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
  .tabbar { -webkit-transform: translateZ(0); transform: translateZ(0); }
}
.preview-zu { position: absolute; z-index: 2; top: calc(10px + env(safe-area-inset-top)); right: 10px; background: var(--ink); color: #fff; border-color: var(--ink); }
body.preview-voll { overflow: hidden; }
@media (max-width: 600px) {
  .preview-wrap.mobile:not(.voll) { width: 100%; height: 74dvh; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); }
}

/* Rechnung */
.pos-row { display: grid; grid-template-columns: 1fr 70px 110px 44px; gap: 8px; align-items: end; }
@media (max-width: 560px) { .pos-row { grid-template-columns: 1fr 1fr 44px; } .pos-row .pos-text { grid-column: 1 / -1; } }
.sum-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sum-table td { padding: 6px 0; }
.sum-table td:last-child { text-align: right; }
.sum-table tr.total td { border-top: 1px solid var(--line-2); font-weight: 600; font-size: 22px; letter-spacing: -.02em; padding-top: 10px; }
.pdf-frame { width: 100%; height: 640px; border: 0; border-radius: var(--r-m); background: #fff; box-shadow: var(--shadow); }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; color: var(--text-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
table.data td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll { overflow-x: auto; }

/* Dialog */
.dlg-back { position: fixed; inset: 0; z-index: 90; background: rgba(21, 21, 21, .32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; padding: 12px; animation: fade .15s ease; }
@media (min-width: 640px) { .dlg-back { align-items: center; } }
.dlg { width: 100%; max-width: 480px; max-height: calc(100dvh - 24px); overflow: auto; background: var(--surface); border-radius: var(--r-l); padding: 24px; padding-bottom: calc(24px + var(--safe-b)); box-shadow: 0 30px 70px -20px rgba(21, 21, 21, .45); animation: rise .22s cubic-bezier(.2, .8, .2, 1); }
.dlg h2 { margin: 0 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.dlg p { color: var(--text-2); margin: 0 0 14px; }
.dlg .btns { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.dlg .btns .btn { flex: 1; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-list .btn { justify-content: flex-start; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-radius: var(--r-pill); background: var(--ink); color: #F1EFEA; font-size: 14px; box-shadow: 0 16px 36px -12px rgba(21, 21, 21, .5); animation: rise .2s ease; }
.toast.ok svg { color: var(--accent-light); }
.toast.bad svg { color: #F2A094; }

.cloud-bar { display: flex; gap: 10px; align-items: flex-start; padding: 11px 16px; border-radius: var(--r-m); margin: 0 0 14px; font-size: 13px; background: var(--warn-bg); }
.cloud-bar svg { color: var(--warn); flex: none; }
.cloud-bar.ok { background: var(--ok-bg); }
.cloud-bar.ok svg { color: var(--ok); }

/* Anmeldung */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-card .brand-mark { width: 76px; height: 76px; margin: 0 auto 20px; }
.login-card .brand-mark svg { width: 40px; height: 30px; }
.login-card h1 { font-size: 32px; margin: 0 0 6px; font-weight: 600; letter-spacing: -.03em; }
.pin-input::placeholder { letter-spacing: .04em; font-size: 16px; }
.pin-input { text-align: center; font-size: 28px !important; letter-spacing: .5em; font-variant-numeric: tabular-nums; }

.swap { animation: swap .2s ease; }
@keyframes swap { from { opacity: 0; transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .topbar, .tabbar, .actionbar, #toasts { display: none !important; } body { background: #fff; } }

/* Liste mit Lösch-Knopf (Rechnungsentwürfe) */
.item.item-split { padding: 6px 10px 6px 6px; }
.item .item-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 8px; text-decoration: none; color: inherit; border-radius: var(--r-s); }
.item.item-split .icon-btn { flex: none; }
/* Aktionsleiste am Handy umbrechen, damit kein Knopf verschwindet */
@media (max-width: 899px) { .actionbar:not(.static) { flex-wrap: wrap; border-radius: var(--r-l); } }

/* Startseiten-Bild statt eingebetteter Website */
.preview-wrap .shot { display: block; width: 100%; height: auto; min-height: 220px; background: var(--surface); }
.preview-wrap:has(.shot) { height: auto !important; }

/* Claude-Start auf der Startkarte */
.claude-box { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: #8FC9C6; box-shadow: 0 0 0 0 rgba(143, 201, 198, .7); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(143, 201, 198, 0); } 100% { box-shadow: 0 0 0 0 rgba(143, 201, 198, 0); } }

/* Caller-App */
.prog { position: relative; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .24); overflow: hidden; margin-top: 16px; }
.prog > span { display: block; height: 100%; border-radius: inherit; background: #fff; }
.seg.wrap { flex-wrap: wrap; }
.choice { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice button { min-height: 64px; padding: 8px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.choice button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 480px) { .choice { grid-template-columns: 1fr; } .choice button { flex-direction: row; min-height: 52px; } }

/* Kalender */
.cal-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.cal-title { font-weight: 600; font-size: 17px; margin-left: auto; }
.cal-wrap { position: relative; overflow: auto; max-height: calc(100vh - 250px); min-height: 360px; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.cal-grid { display: grid; grid-template-columns: 46px repeat(var(--cols), minmax(var(--minw, 110px), 1fr)); min-width: min-content; }
.cal-colh { position: sticky; top: 0; z-index: 4; background: var(--surface); padding: 10px 6px 8px; font-size: 13px; font-weight: 600; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-colh.today { color: var(--accent); }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 6px; font-size: 11px; color: var(--text-3); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: copy; background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour)); }
.cal-col .now { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 3; pointer-events: none; }
.ev { position: absolute; z-index: 2; box-sizing: border-box; border-radius: 9px; padding: 3px 6px; font-size: 12px; line-height: 1.25; overflow: hidden; cursor: grab; color: var(--text); background: color-mix(in srgb, var(--c) 14%, #fff); border-left: 3px solid var(--c); touch-action: none; user-select: none; -webkit-user-select: none; }
.ev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { display: block; color: var(--text-2); white-space: nowrap; }
.ev.done { opacity: .55; }
.ev.drag { z-index: 6; box-shadow: var(--shadow); cursor: grabbing; }
.ev .rs { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; cursor: ns-resize; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-month .d { min-height: 88px; padding: 4px; font-size: 12px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); cursor: pointer; overflow: hidden; }
.cal-month .d.out { color: var(--text-3); }
.cal-month .d.today .n { color: #fff; background: var(--ink); border-radius: 999px; padding: 0 6px; }
.cal-month .d .n { font-weight: 600; display: inline-block; }
.cal-month .chip-ev { display: block; margin-top: 3px; padding: 1px 5px; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, #fff); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); vertical-align: middle; }
/* Spickzettel + Einweisung */
.guide { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 12px; }
.guide li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.guide li b { display: block; }
.guide .gn { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.md h2.md-h, .md h3.md-h, .md h4.md-h { margin: 18px 0 6px; letter-spacing: -.01em; }
.md h2.md-h:first-child { margin-top: 0; }
.md p, .md li { line-height: 1.55; }
.md ul, .md ol { padding-left: 20px; }
.chip[aria-pressed="true"] .cal-dot { box-shadow: 0 0 0 2px #fff; }
/* Untere Leiste: Spalten = Anzahl Tabs (Caller 4, Admin 5), bleibt fest unten */
.tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .tabbar { grid-auto-flow: unset; } }
/* Pitch-Skript + Kalender am Handy */
.skript p { margin: 0 0 10px; font-size: 16px; line-height: 1.5; }
.skript p:not(.small) { padding-left: 12px; border-left: 3px solid var(--accent); }
.card-title .seg button { min-height: 30px; padding: 0 12px; font-size: 13px; }
@media (max-width: 600px) {
  .cal-head { gap: 8px; }
  .cal-title { order: -1; width: 100%; margin: 0; font-size: 20px; }
  .cal-wrap { max-height: 58vh; min-height: 300px; }
  .ev { font-size: 13px; border-radius: 8px; }
  .cal-month .d { min-height: 64px; font-size: 11px; }
  .cal-month .chip-ev { font-size: 10px; padding: 0 3px; }
}
/* Weg A: 6 Phasen */
.steps, .steps-l { grid-template-columns: repeat(6, 1fr); }
.prog-dots { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.prog-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.prog-dots i.on { background: var(--accent); }
.task-group { margin-bottom: 18px; }
.step-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.step-btns button { min-height: 56px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.step-btns button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.step-btns button.done { border-color: var(--accent); color: var(--accent); }
.step-btns button.done[aria-pressed="true"] { background: var(--accent); color: #fff; }
.step-btns button[disabled] { opacity: .45; cursor: not-allowed; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slots button { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
/* Untere Leiste: gleich breite Felder, Text nie abgeschnitten */
@media (max-width: 899px) {
  .tabbar { padding-bottom: 6px; }
  .tab { min-width: 0; padding: 0 2px; }
  .tab span:not(.badge-n) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Feier-Animationen */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.fx i { position: absolute; display: block; font-style: normal; will-change: transform; }
.fx-geld { top: -60px; font-weight: 600; color: var(--accent); animation: fx-fall linear forwards; }
.fx-konfetti { bottom: -20px; border-radius: 2px; animation: fx-schuss cubic-bezier(.15,.6,.35,1) forwards; }
@keyframes fx-fall { 0% { transform: translate(0, 0) rotate(0); } 100% { transform: translate(var(--x), 115vh) rotate(var(--r)); } }
@keyframes fx-schuss { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 45% { transform: translate(calc(var(--x) * .8), var(--y)) rotate(calc(var(--r) * .5)); opacity: 1; } 100% { transform: translate(var(--x), 25vh) rotate(var(--r)); opacity: 0; } }
