/* miteinander – ruhige, weiche Gestaltung. Zwei Haushaltsfarben, die sich ergänzen: Rosé & Seegrün, gemeinsam: Pflaume */
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-ext.woff2') format('woff2'); font-weight: 300 900; font-display: swap;
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0; }

:root {
  /* Farben aus dem Logo: Grün (Haushalt 1), Sand (Haushalt 2), Nachtblau (Schrift) */
  --paper: #F4F5F1;
  --card: #FFFFFF;
  --ink: #0E2233;
  --muted: #5E6B72;
  --line: #DFE3DF;
  --soft: #E9ECE7;
  --primary: #0E2233;
  --on-primary: #F4F5F1;
  --A: #497662;  --A-soft: #E3EDE7;  --A-mid: #BCD4C6;
  --B: #9A7640;  --B-fill: #D6B98A;  --B-soft: #F6EFE2;  --B-mid: #EADBBF;
  --both: #3E6A73;
  --open: #A2661A; --open-soft: #F6EBD6;
  --danger: #B0473A;
  --r-card: 24px; --r-block: 18px; --r-field: 12px;
  --shadow: 0 1px 2px rgba(14, 34, 51, .05), 0 10px 28px -16px rgba(14, 34, 51, .22);
  --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
/* Dunkel: automatisch nach Gerät, außer die Person hat in den Einstellungen Hell/Dunkel festgelegt (data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1820; --card: #16222C; --ink: #E6ECEF; --muted: #93A2AB; --line: #26343F; --soft: #1D2A35;
    --primary: #E6ECEF; --on-primary: #0E2233;
    --A: #7FB39A; --A-soft: #1B2E27; --A-mid: #2C4A3D;
    --B: #D6B98A; --B-fill: #D6B98A; --B-soft: #2E2618; --B-mid: #4F4128;
    --both: #8FB8C2; --open: #E4B866; --open-soft: #3A301C; --danger: #F0907F;
    --shadow: 0 1px 0 rgba(0,0,0,.25), 0 12px 30px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1820; --card: #16222C; --ink: #E6ECEF; --muted: #93A2AB; --line: #26343F; --soft: #1D2A35;
  --primary: #E6ECEF; --on-primary: #0E2233;
  --A: #7FB39A; --A-soft: #1B2E27; --A-mid: #2C4A3D;
  --B: #D6B98A; --B-fill: #D6B98A; --B-soft: #2E2618; --B-mid: #4F4128;
  --both: #8FB8C2; --open: #E4B866; --open-soft: #3A301C; --danger: #F0907F;
  --shadow: 0 1px 0 rgba(0,0,0,.25), 0 12px 30px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--both); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ------------------------------------------------ Marke */
.wordmark { font-weight: 650; letter-spacing: -.02em; line-height: 1; color: var(--ink); }
.wordmark i { font-style: normal; color: var(--both); }
.logo { display: inline-block; flex: none; }
.slogan { color: var(--muted); font-size: 15px; line-height: 1.4; margin: 6px 0 0; max-width: 34ch; }

/* ------------------------------------------------ Gerüst */
.shell { max-width: 680px; margin: 0 auto; padding: calc(var(--safe-t) + 16px) 18px calc(var(--safe-b) + 112px); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .logo img { display: block; height: 30px; width: auto; }
.brand .wordmark { font-size: 22px; }
.who { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; }
.dot { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.dot.A { background: var(--A); } .dot.B { background: var(--B); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dot { color: var(--paper); } }
:root[data-theme="dark"] .dot { color: var(--paper); }

h1 { font-size: 30px; line-height: 1.15; font-weight: 750; letter-spacing: -.025em; margin: 0 0 6px; }
h2 { font-size: 18px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; margin: 30px 4px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
h2 .link { font-size: 14px; font-weight: 500; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }

/* ------------------------------------------------ Wochenband (Kernelement) */
[hidden] { display: none !important; }
.band { border-radius: var(--r-card); padding: 20px 16px 14px; background: var(--card); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.band::after { content: ''; position: absolute; right: -70px; top: -80px; width: 220px; height: 220px; border-radius: 50%; background: var(--A-soft); pointer-events: none; }
.band.B::after { background: var(--B-soft); }
.band > * { position: relative; z-index: 1; }
.band-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 0 2px; }
.band-kicker { margin: 0; font-size: 15px; color: var(--muted); }
.band-name { margin: 2px 0 0; font-size: clamp(38px, 11vw, 52px); line-height: 1; font-weight: 800; letter-spacing: -.035em; color: var(--A); }
.band.B .band-name { color: var(--B); }
.band-count { text-align: right; font-size: 13px; color: var(--muted); line-height: 1.25; max-width: 7.5em; }
.band-count b { display: block; font-size: 26px; font-weight: 750; color: var(--ink); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 18px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding-bottom: 2px; }
.day { border: 0; border-radius: 12px; min-height: 44px; padding: 0; display: grid; place-items: center; align-content: center; background: var(--soft); color: var(--ink); position: relative; }
.day b { font-size: 16px; font-weight: 700; }
.day.A { background: var(--A-mid); } .day.B { background: var(--B-mid); }
.day.past { opacity: .42; }
.day.today.A { background: var(--A); color: #fff; box-shadow: 0 6px 16px -8px var(--A); }
.day.today.B { background: var(--B-fill); color: var(--ink); box-shadow: 0 6px 16px -8px var(--B-fill); }
.day.today.B b { color: inherit !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .day.today { color: var(--paper) !important; } }
:root[data-theme="dark"] .day.today { color: var(--paper) !important; }
.day.ovr { box-shadow: inset 0 0 0 2px var(--both); }
.day.today.ovr { box-shadow: inset 0 0 0 2px var(--card), 0 0 0 2px var(--both); }
.day.has::after { content: ''; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.band-next { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 2px 0; border-top: 1px solid var(--line); font-size: 14px; }
.band-next .dot { width: 12px; height: 12px; }
.band-next b { font-weight: 700; }
.band-hint { margin: 6px 2px 0; font-size: 12px; color: var(--muted); }
.band-empty::after { display: none; }
.mini { display: inline-flex; gap: 3px; }
.mini i { width: 10px; height: 16px; border-radius: 3px; background: var(--soft); }
.mini i.A { background: var(--A); } .mini i.B { background: var(--B-fill); }
.late-head { color: var(--danger); }

/* Schalter */
.switch { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; margin-bottom: 18px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch > span:first-of-type { width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; margin-top: 2px; }
.switch > span:first-of-type::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--both); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--both); outline-offset: 2px; }
.switch b { display: block; font-size: 15px; }
.switch small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ------------------------------------------------ Gemeinsames Budget (Waage) */
.scale { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px 18px 18px; }
.scale-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.scale-verdict { font-size: 15px; color: var(--muted); margin: 0; }
.scale-amount { font-size: clamp(40px, 12vw, 54px); font-weight: 800; line-height: 1; letter-spacing: -.035em; margin: 8px 0 4px; }
.scale-sentence { font-size: 17px; font-weight: 600; margin: 0; }
.scale-sentence .A { color: var(--A); } .scale-sentence .B { color: var(--B); }
.beam { margin: 16px 0 8px; height: 118px; color: var(--primary); }
.beam svg { width: 100%; height: 100%; overflow: visible; }
.beam .pan-A { fill: var(--A); } .beam .pan-B { fill: var(--B-fill); }
.beam text { font-family: var(--font); font-size: 13px; fill: var(--ink); font-weight: 650; }
.beam .sub { fill: var(--muted); font-weight: 450; font-size: 12px; }
.scale-note { font-size: 13px; color: var(--muted); margin: 0; }
.scale-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ------------------------------------------------ Buttons & Felder */
.btn { border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 650; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.soft { background: var(--soft); color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; }

.field { display: block; margin: 0 0 18px; }
.field > span { display: block; font-size: 14px; font-weight: 650; margin-bottom: 7px; }
.field small { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=url], select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-field); padding: 11px 13px; min-height: 48px; outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--both); }
textarea { min-height: 84px; resize: vertical; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.row > * { min-width: 0; }
input[type=date], input[type=time] { min-width: 0; -webkit-appearance: none; appearance: none; }

.amount-input { display: flex; align-items: baseline; gap: 6px; background: var(--card); border-radius: var(--r-block); padding: 14px 18px; margin-bottom: 20px; box-shadow: var(--shadow); }
.amount-input input { border: 0; background: transparent; padding: 0; min-height: 0; font-size: 42px; font-weight: 750; letter-spacing: -.03em; width: 100%; font-variant-numeric: tabular-nums; outline: none; }
.amount-input span { font-size: 28px; font-weight: 600; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--card); border-radius: 999px; padding: 8px 15px; font-size: 14px; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed=true] { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.chip.A[aria-pressed=true] { background: var(--A); color: #fff; } .chip.B[aria-pressed=true] { background: var(--B); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.A[aria-pressed=true], :root:not([data-theme="light"]) .chip.B[aria-pressed=true] { color: var(--paper); } }
:root[data-theme="dark"] .chip.A[aria-pressed=true], :root[data-theme="dark"] .chip.B[aria-pressed=true] { color: var(--paper); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--soft); border-radius: 16px; padding: 4px; gap: 4px; margin-bottom: 18px; }
.seg button { border: 0; background: transparent; border-radius: 12px; padding: 10px 6px; font-weight: 650; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed=true] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(38,51,47,.12); }

.split-preview { display: flex; border-radius: 12px; overflow: hidden; height: 38px; margin: 12px 0 4px; font-size: 13px; font-weight: 700; color: #fff; }
.split-preview > div { display: flex; align-items: center; padding: 0 12px; white-space: nowrap; min-width: 0; transition: flex-grow .3s; }
.split-preview .A { background: var(--A); } .split-preview .B { background: var(--B); justify-content: flex-end; }
input[type=range] { width: 100%; accent-color: var(--both); }

/* ------------------------------------------------ Listen */
.list { background: var(--card); border-radius: var(--r-block); box-shadow: var(--shadow); overflow: hidden; }
.item { display: grid; grid-template-columns: 36px 1fr auto; gap: 0 12px; align-items: center; padding: 14px 16px; border: 0; border-top: 1px solid var(--line); width: 100%; text-align: left; background: none; }
.item:first-child { border-top: 0; }
.item .edge { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; align-self: start; }
.item .edge svg { width: 18px; height: 18px; }
.item .edge.A { background: var(--A-soft); color: var(--A); } .item .edge.B { background: var(--B-soft); color: var(--B); }
.item .t { font-weight: 650; line-height: 1.3; }
.item .m { font-size: 13px; color: var(--muted); margin-top: 2px; }
.item .amt { font-weight: 700; text-align: right; white-space: nowrap; }
.item .amt small { display: block; font-weight: 450; font-size: 12px; color: var(--muted); }
.amt.in { color: var(--B); }
.tag { display: inline-block; font-size: 12px; font-weight: 650; padding: 1px 9px; border-radius: 999px; background: var(--soft); color: var(--ink); margin-right: 5px; }
.tag.open { background: var(--open-soft); color: var(--open); }
.tag.A { background: var(--A-soft); color: var(--A); } .tag.B { background: var(--B-soft); color: var(--B); }
.month { font-size: 14px; font-weight: 650; color: var(--muted); margin: 24px 4px 8px; }
.empty { padding: 26px 20px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 12px; }

/* ------------------------------------------------ Übersicht */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stat { background: var(--card); border-radius: var(--r-block); padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.A { background: var(--A-soft); box-shadow: none; } .stat.A b { color: var(--A); }
.stat.B { background: var(--B-soft); box-shadow: none; } .stat.B b { color: var(--B); }
.bars { background: var(--card); border-radius: var(--r-block); box-shadow: var(--shadow); padding: 6px 16px 16px; margin-top: 10px; }
.bar { margin-top: 12px; }
.bar-head { display: flex; justify-content: space-between; font-size: 14px; gap: 8px; }
.bar-track { height: 8px; background: var(--soft); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--both); border-radius: 4px; }
.bar-fill.over { background: var(--danger); }
.yearpick { display: flex; align-items: center; gap: 6px; }
.yearpick button { border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--card); border-radius: 50%; width: 36px; height: 36px; font-weight: 700; }

/* ------------------------------------------------ Aufgaben */
.week-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 4px 10px; gap: 8px; }
.week-head b { font-size: 16px; font-weight: 700; }
.list.A { box-shadow: inset 4px 0 0 var(--A), var(--shadow); } .list.B { box-shadow: inset 4px 0 0 var(--B), var(--shadow); }
.task { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px 16px; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.check { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--muted); background: transparent; display: grid; place-items: center; padding: 0; margin-top: 1px; }
.task.termin .check { border-radius: 50%; }
.check svg { width: 16px; height: 16px; opacity: 0; stroke: var(--on-primary); }
.task.done .check { background: var(--primary); border-color: var(--primary); } .task.done .check svg { opacity: 1; }
.task.done .t { text-decoration: line-through; color: var(--muted); }
.task .t { font-weight: 650; }
.task .body { background: none; border: 0; padding: 0; text-align: left; }
.task .when { font-size: 13px; font-weight: 600; margin-top: 3px; color: var(--muted); }
.task .when.late { color: var(--danger); }
.task .m { font-size: 13px; margin-top: 4px; }
.bell { width: 18px; height: 18px; color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------ Navigation */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 12px); width: min(460px, calc(100% - 24px));
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 26px; box-shadow: 0 12px 32px -12px rgba(38,51,47,.35), 0 0 0 1px var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 6px; z-index: 20; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 650; color: var(--muted); text-decoration: none; padding: 7px 0; border-radius: 18px; position: relative; }
.nav a svg { width: 22px; height: 22px; }
.nav a[aria-current=page] { color: var(--ink); background: var(--soft); }
.nav .plus { justify-self: center; width: 54px; height: 54px; border-radius: 20px; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; }
.nav .plus svg { width: 26px; height: 26px; }
.badge { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--open); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 5px; line-height: 16px; }

/* ------------------------------------------------ Sheet */
.backdrop { position: fixed; inset: 0; background: rgba(20, 28, 26, .4); z-index: 40; opacity: 0; transition: opacity .2s; }
.backdrop.show { opacity: 1; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: min(620px, 100%); max-height: 92dvh; overflow: auto;
  background: var(--paper); border-radius: 28px 28px 0 0; z-index: 41; padding: 10px 20px calc(var(--safe-b) + 22px);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1); overscroll-behavior: contain; }
.sheet.show { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .sheet, .backdrop { transition: none; } }
.grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h3 { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.x { border: 0; background: var(--soft); width: 38px; height: 38px; border-radius: 50%; font-size: 20px; line-height: 1; }
.sheet-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.sheet-actions .btn:first-child { flex: 1; }
.pick { display: grid; gap: 10px; }
.pick button { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: center; text-align: left; padding: 14px; border-radius: var(--r-block); border: 0; background: var(--card); box-shadow: var(--shadow); }
.pick button b { display: block; font-size: 16px; }
.pick button span { color: var(--muted); font-size: 14px; }
.pick .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--both); }
.pick .ic svg { width: 22px; height: 22px; }

/* ------------------------------------------------ Anmeldung / Einrichtung */
.gate { max-width: 440px; margin: 0 auto; padding: calc(var(--safe-t) + 44px) 22px 40px; }
.gate-brand { text-align: center; margin-bottom: 30px; }
.gate-brand .logo-full img { display: block; width: min(260px, 70vw); height: auto; margin: 0 auto; }
.gate-brand .wordmark { font-size: 40px; }
.gate-brand .slogan { margin: 10px auto 0; font-size: 16px; max-width: 40ch; }
.gate h1 { font-size: 22px; text-align: center; margin-bottom: 16px; }
.gate p.lead { color: var(--muted); margin: 0 0 24px; font-size: 16px; text-align: center; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px; }
.person { background: var(--card); border: 0; box-shadow: var(--shadow); border-radius: var(--r-block); padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; }
.person .dot { width: 48px; height: 48px; font-size: 19px; }
.person[aria-pressed=true] { box-shadow: inset 0 0 0 2px var(--both), var(--shadow); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.pinpad button { height: 58px; border-radius: 18px; border: 0; background: var(--card); box-shadow: var(--shadow); font-size: 22px; font-weight: 650; }
.pindots { display: flex; justify-content: center; gap: 12px; margin: 12px 0 4px; min-height: 16px; }
.pindots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--both); }
.pindots i.on { background: var(--both); }
.err { color: var(--danger); font-weight: 600; font-size: 14px; min-height: 20px; text-align: center; }
.setup-block { background: var(--card); border-radius: var(--r-block); box-shadow: var(--shadow); padding: 18px 16px 4px; margin-bottom: 14px; }
.setup-block h3 { margin: 0 0 14px; font-size: 17px; }
.setup-block.A { background: var(--A-soft); box-shadow: none; } .setup-block.B { background: var(--B-soft); box-shadow: none; }

/* ------------------------------------------------ Einstellungen */
.panel { background: var(--card); border-radius: var(--r-block); box-shadow: var(--shadow); padding: 18px 16px; }
.panel + .panel { margin-top: 10px; }
.panel h3 { margin: 0 0 4px; font-size: 16px; }
.panel p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.copy { display: flex; gap: 8px; } .copy input { font-size: 13px; }
.feed { font-size: 14px; }
.feed div { padding: 10px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.feed div:first-child { border-top: 0; }
.feed time { color: var(--muted); font-size: 12px; display: block; }
.feed .dot { width: 22px; height: 22px; font-size: 11px; margin-top: 1px; }

#toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 98px); transform: translateX(-50%) translateY(20px); background: var(--primary); color: var(--on-primary);
  padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 760px) {
  .shell { padding-top: 36px; }
  h1 { font-size: 34px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------ Ablage & Zahlungen */
.who svg { width: 16px; height: 16px; color: var(--muted); margin-left: -2px; }
.amt-inline { font-weight: 700; color: var(--both); margin-left: 4px; white-space: nowrap; }
.task.zahlung .check { border-radius: 9px; border-style: dashed; }
.usage .bar-track { height: 10px; margin-top: 8px; }
.doc-item { grid-template-columns: 52px 1fr 0; }
.doc-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--soft); display: grid; place-items: center; align-self: start; color: var(--both); }
.doc-thumb svg { width: 24px; height: 24px; }
.doc-mini { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 0; border-radius: 14px; padding: 8px; box-shadow: var(--shadow); margin-bottom: 8px; }
.doc-mini .doc-thumb { width: 44px; height: 44px; }
.doc-mini small { display: block; color: var(--muted); font-size: 12px; }
.doc-img { width: 100%; max-height: 52dvh; object-fit: contain; border-radius: var(--r-block); background: var(--card); box-shadow: var(--shadow); display: block; }
.doc-pdf { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; background: var(--card); border-radius: var(--r-block); padding: 18px; box-shadow: var(--shadow); font-weight: 650; }
.doc-pdf svg { width: 44px; height: 44px; color: var(--both); }
.doc-pdf small { display: block; color: var(--muted); font-weight: 450; font-size: 13px; }
.upl { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.upl img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; flex: none; box-shadow: var(--shadow); }
.upl-pdf { flex: none; width: 110px; background: var(--card); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); display: grid; gap: 4px; justify-items: center; text-align: center; }
.upl-pdf svg { width: 30px; height: 30px; color: var(--both); }
.upl-pdf small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.upl-size { font-size: 14px; color: var(--muted); margin: 10px 0 16px; }
.upl-size b { color: var(--ink); }
.progress { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; width: 0; background: var(--both); transition: width .2s; }
input[type=search], input[type=datetime-local] { width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-field); padding: 11px 13px; min-height: 48px; outline: none; min-width: 0; }
.btn svg, .chip svg { width: 18px; height: 18px; }

/* ------------------------------------------------ Kalender zum Blättern & Suche */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.page-head h1 { margin: 0; }
.page-head .btn { min-height: 40px; padding: 8px 14px; font-size: 14px; }
#tq { margin-top: 14px; }
.band-hint { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.band-hint a { color: var(--ink); font-weight: 650; text-decoration: none; white-space: nowrap; font-size: 13px; }
.cal-jump .cal-row { display: flex; gap: 8px; align-items: center; }
.cal-jump .cal-row + .cal-row { margin-top: 10px; }
.cal-jump .cal-row > input, .cal-jump .cal-row > select { flex: 1; min-width: 0; }
.cal-jump .btn { min-height: 48px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; margin: 12px 0 0 !important; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 16px; height: 16px; border-radius: 5px; background: var(--soft); position: relative; flex: none; }
.lg.hol::before { content: ''; position: absolute; top: 3px; left: 3px; right: 3px; height: 3px; border-radius: 2px; background: var(--both); }
.lg.fei { background: transparent; box-shadow: inset 0 -3px 0 var(--ink); border-radius: 2px; }
.lg.ovr { box-shadow: inset 0 0 0 2px var(--both); }
.lg.has::after { content: ''; position: absolute; left: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.wk { background: var(--card); border-radius: var(--r-block); box-shadow: var(--shadow); padding: 12px 12px 12px; margin-top: 10px; scroll-margin: 90px; transition: box-shadow .3s; }
.wk.now { box-shadow: inset 0 0 0 2px var(--line), var(--shadow); }
.wk.focus { box-shadow: inset 0 0 0 2.5px var(--both), var(--shadow); }
.wk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 2px; }
.wk-head b { font-size: 15px; }
.wk-head .muted { font-size: 14px; }
.wk-own { margin-left: auto; display: inline-flex; gap: 4px; }
.wk-own .tag { margin: 0; }
.wk-labs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.wk-lab { font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; }
.wk-lab.hol { background: color-mix(in srgb, var(--both) 14%, transparent); color: var(--both); }
.wk-lab.fei { background: var(--soft); color: var(--ink); }
.wk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 10px; }
.wk-days .day { min-height: 52px; }
.day > span { font-size: 10.5px; font-weight: 600; opacity: .7; line-height: 1; margin-bottom: 2px; }
.day.hol::before { content: ''; position: absolute; top: 4px; left: 28%; right: 28%; height: 3px; border-radius: 2px; background: var(--both); }
.wk-days .day.hol::before { top: 3px; }
.day.fei b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cal .day.hol::before { top: 3px; }

/* ------------------------------------------------ Ferienbetreuung */
button.wk-lab { border: 0; cursor: pointer; font-family: inherit; }
.wk-lab.ruled { box-shadow: inset 0 0 0 1.5px var(--both); }
.stepper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stepper .btn { width: 46px; padding: 0; font-size: 22px; }
.stepper b { font-size: 24px; min-width: 1.4em; text-align: center; }
.stepper span { color: var(--muted); font-size: 14px; }
.seg-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.seg-row:first-child { border-top: 0; }
.seg-row small { display: block; color: var(--muted); font-size: 13px; }
.seg-row .chips { gap: 6px; }
.seg-row .chip { min-height: 34px; padding: 5px 12px; font-size: 13px; }
