/* KK Belege – Designsystem
   Warmes Papier-Weiß, tiefes Petrol als Markenfarbe, Bernstein als Akzent. */

:root {
  --bg: #f6f3ee;
  --bg-2: #efebe3;
  --surface: #ffffff;
  --surface-2: #fbf9f6;
  --border: #e6e0d6;
  --border-strong: #d6cec1;
  --text: #1c1917;
  --text-2: #57534e;
  --text-3: #8a847c;
  --brand: #0f5c55;
  --brand-2: #0b4a44;
  --brand-soft: #e3efec;
  --accent: #f2b84b;
  --ok: #15803d;  --ok-soft: #e4f3e8;
  --warn: #b45309; --warn-soft: #fdf0dc;
  --bad: #b91c1c;  --bad-soft: #fbe5e3;
  --info: #1d4ed8; --info-soft: #e5ecfb;
  --shadow: 0 1px 2px rgba(28,25,23,.04), 0 4px 16px rgba(28,25,23,.05);
  --shadow-lg: 0 10px 40px rgba(28,25,23,.16);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter var", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "SF Pro Display", var(--font);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1514; --bg-2: #131c1b; --surface: #172120; --surface-2: #1b2726;
    --border: #25322f; --border-strong: #34433f;
    --text: #ece8e1; --text-2: #b6b0a6; --text-3: #847e75;
    --brand: #3fb3a3; --brand-2: #5cc7b8; --brand-soft: #173a36; --accent: #f2b84b;
    --ok: #4ade80; --ok-soft: #13301f; --warn: #fbbf24; --warn-soft: #33270f;
    --bad: #f87171; --bad-soft: #3a1717; --info: #93b4fd; --info-soft: #172341;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1514; --bg-2: #131c1b; --surface: #172120; --surface-2: #1b2726;
  --border: #25322f; --border-strong: #34433f;
  --text: #ece8e1; --text-2: #b6b0a6; --text-3: #847e75;
  --brand: #3fb3a3; --brand-2: #5cc7b8; --brand-soft: #173a36; --accent: #f2b84b;
  --ok: #4ade80; --ok-soft: #13301f; --warn: #fbbf24; --warn-soft: #33270f;
  --bad: #f87171; --bad-soft: #3a1717; --info: #93b4fd; --info-soft: #172341;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.015em; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 650; }
h2 { font-size: 1.12rem; font-weight: 620; }
h3 { font-size: 1rem; font-weight: 620; }
p { margin: 0 0 .8em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-2); padding: .1em .4em; border-radius: 6px; }
code.wrap { word-break: break-all; display: inline-block; margin-top: .3em; }
.ico { flex-shrink: 0; display: block; }
.muted { color: var(--text-2); }
.small { font-size: .86rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.row.center { justify-content: center; }
.gap { gap: .6rem; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 1rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: .5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.align-start { align-items: start; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .hide-sm { display: none; } }

/* ---------- App-Gerüst ---------- */
.app { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 1.25rem .9rem; background: var(--surface); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--text); padding: .2rem .5rem 1.4rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--brand); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}
.brand-mark.lg { width: 58px; height: 58px; border-radius: 17px; margin: 0 auto 1rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; }
.brand-text small { color: var(--text-3); font-size: .78rem; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-link.disabled { opacity: .5; cursor: default; }
.nav-link.disabled:hover { background: none; color: var(--text-2); }
.nav-link em { margin-left: auto; font-style: normal; font-size: .7rem; background: var(--bg-2); padding: .05rem .45rem; border-radius: 99px; }
.sidebar-foot { display: flex; align-items: center; gap: .3rem; border-top: 1px solid var(--border); padding-top: .9rem; }
.me { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; color: var(--text); padding: .3rem; border-radius: var(--radius-sm); }
.me:hover { background: var(--bg); text-decoration: none; }
.me-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.me-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.me-text small { color: var(--text-3); font-size: .76rem; }
.avatar {
  display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
  background: var(--accent); color: #3b2a07; font-weight: 700;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 0; background: transparent; color: var(--text-2); cursor: pointer; font: inherit;
}
.icon-btn:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.icon-btn.sm { width: 28px; height: 28px; font-size: .7rem; }
.icon-btn:disabled { opacity: .3; cursor: default; }

.main { min-width: 0; }
.topbar { display: none; }
.content { max-width: 1120px; margin: 0 auto; padding: 2rem 2rem 4rem; }
.tabbar { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20;
    padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem; background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  }
  .brand-mobile { padding: 0; gap: .55rem; }
  .brand-mobile .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .avatar-mobile { width: 34px; height: 34px; }
  .avatar-mobile:hover { text-decoration: none; }
  .content { padding: 1.2rem 1rem calc(6rem + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .35rem 0; color: var(--text-3); font-size: .7rem; font-weight: 500; border-radius: 10px; }
  .tab:hover { text-decoration: none; }
  .tab.active { color: var(--brand); }
  .tab.active .ico { transform: translateY(-1px); }
  .tab.disabled { opacity: .35; }
}

/* ---------- Seitenkopf ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p.muted { margin: .3rem 0 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 650; color: var(--text-3); margin: 0 0 .35rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 2rem 0 .8rem; }
.section-head h2 { margin: 0; }
.back { display: inline-block; margin-bottom: 1rem; color: var(--text-2); font-size: .9rem; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.card + .card, section.card { margin-top: 1rem; }
.card h2 { margin-bottom: .8rem; }
.muted-card { background: var(--surface-2); box-shadow: none; }
.highlight { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.danger-zone { margin-top: 2rem; }

/* ---------- Kennzahlen ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin-bottom: 1.2rem; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; box-shadow: var(--shadow); }
.stat-label { color: var(--text-2); font-size: .82rem; font-weight: 500; }
.stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-sub { color: var(--text-3); font-size: .76rem; }

/* ---------- Checkliste ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.checklist li { display: flex; align-items: center; gap: .9rem; padding: .8rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.checklist li p { margin: 0; color: var(--text-2); font-size: .86rem; }
.checklist li > div { flex: 1; }
.tick { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); color: transparent; flex-shrink: 0; }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li.done strong { text-decoration: line-through; text-decoration-color: var(--text-3); color: var(--text-2); }

/* ---------- Personen ---------- */
.person-avatar {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  background: var(--c); color: var(--cf); font-weight: 700; font-size: .9rem; letter-spacing: .02em;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12);
}
.person-avatar.xl { width: 68px; height: 68px; border-radius: 20px; font-size: 1.25rem; }
.person-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
.person-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: 1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); position: relative; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.person-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.person-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.person-tile .person-avatar { margin-bottom: .4rem; }
.person-tile small { color: var(--text-3); }
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.person-grid .card { margin: 0; }
.person-card { display: flex; flex-direction: column; gap: .9rem; position: relative; overflow: hidden; }
.person-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.person-card.inactive { opacity: .6; }
.person-card-head { display: flex; align-items: center; gap: .8rem; }
.person-card-head h3 { margin: 0; }
.reorder { display: flex; flex-direction: column; }
.person-hero { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.person-hero h1 { margin: 0; }
.person-hero p { margin: .2rem 0 0; }
.chip { display: inline-flex; align-items: center; gap: .4rem; }
.chip-dot { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 .3rem; border-radius: 7px; background: var(--c); color: var(--cf); font-size: .7rem; font-weight: 700; }

/* ---------- Versicherungen ---------- */
.ins-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.ins-list li { display: flex; align-items: center; gap: .6rem; font-size: .92rem; }
.rate { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }
.kind { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .18rem .5rem; border-radius: 6px; flex-shrink: 0; }
.kind-pkv { background: var(--info-soft); color: var(--info); }
.kind-beihilfe { background: var(--warn-soft); color: var(--warn); }
.kind-zusatz { background: var(--ok-soft); color: var(--ok); }
.kind-sonstige { background: var(--bg-2); color: var(--text-2); }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.ins-grid .card { margin: 0; }
.ins-card { display: flex; flex-direction: column; gap: .9rem; }
.ins-card header h3 { margin: .5rem 0 .15rem; font-size: 1.08rem; }
.ins-card header p { margin: 0; }
.ins-card footer { margin-top: auto; padding-top: .3rem; border-top: 1px solid var(--border); padding-top: .8rem; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1rem; margin: 0; }
.kv div { display: flex; flex-direction: column; }
.kv dt { color: var(--text-3); font-size: .76rem; }
.kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv-wide { grid-template-columns: 1fr; }
.kv-wide div { flex-direction: row; gap: 1rem; align-items: center; }
.kv-wide dt { width: 120px; flex-shrink: 0; font-size: .86rem; }
.kv-wide dd { font-weight: 500; }
.archived { margin-top: 1rem; }
.archived summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.archived .ins-list { margin-top: 1rem; }

/* ---------- Listen ---------- */
.list { padding: .3rem 0; }
.list-row { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.4rem; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.tag { display: inline-block; font-size: .74rem; padding: .12rem .55rem; border-radius: 99px; background: var(--bg-2); color: var(--text-2); font-weight: 500; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.badge { display: inline-block; font-size: .7rem; font-weight: 600; padding: .1rem .45rem; border-radius: 6px; background: var(--bg-2); color: var(--text-2); vertical-align: middle; }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

.settings-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.settings-links .card { margin: 0; }
.link-card { display: flex; align-items: center; gap: .9rem; color: var(--text); padding: 1rem 1.1rem; transition: border-color .15s; }
.link-card:hover { text-decoration: none; border-color: var(--brand); }
.link-card .ico { color: var(--brand); }
.link-card div { display: flex; flex-direction: column; }
.link-card small { color: var(--text-3); }
.link { font-weight: 600; font-size: .9rem; }

.empty { text-align: center; padding: 2.5rem 1.5rem; }
.empty-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); margin-bottom: 1rem; }
.empty p { max-width: 440px; margin: 0 auto 1.2rem; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-size: .84rem; font-weight: 600; color: var(--text-2); padding: 0; }
.field em { font-style: normal; font-weight: 400; color: var(--text-3); }
.hint { color: var(--text-3); font-size: .78rem; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); width: 100%;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .62rem .8rem; min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--brand); }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 4.6rem; }
.input-suffix em { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--text-3); font-style: normal; font-size: .86rem; pointer-events: none; }
.check { display: flex; align-items: center; gap: .55rem; cursor: pointer; }
.check input { width: 18px; height: 18px; }
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .25em; text-align: center; }

.swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 11px; background: var(--c); cursor: pointer; border: 3px solid transparent; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); transition: transform .12s; }
.swatch input:checked + span { border-color: var(--surface); box-shadow: 0 0 0 2px var(--c); transform: scale(1.05); }
.swatch input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 600; font-size: .92rem; line-height: 1; cursor: pointer; white-space: nowrap;
  padding: .72rem 1.1rem; min-height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { text-decoration: none; background: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
:root[data-theme="dark"] .btn-primary { color: #06201d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #06201d; } }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-small { padding: .5rem .8rem; min-height: 34px; font-size: .84rem; }
.btn-block { width: 100%; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad-soft); }

/* ---------- Hinweise ---------- */
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .92rem; border: 1px solid transparent; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 20%, transparent); }
.alert-error { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 20%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-warning { background: var(--warn-soft); color: var(--warn); }

/* ---------- Dialoge ---------- */
.dialog {
  border: 0; padding: 0; border-radius: 20px; width: min(600px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(14, 21, 20, .45); backdrop-filter: blur(3px); }
.dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dialog > form { padding: 1.4rem; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { margin: 0; }
.dialog-foot { display: flex; justify-content: flex-end; gap: .6rem; padding-top: .4rem; }
.dialog-extra { padding: 1rem 1.4rem 1.3rem; border-top: 1px solid var(--border); background: var(--surface-2); }
@media (max-width: 640px) {
  .dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .dialog[open] { animation: slide .22s ease-out; }
  .dialog > form { padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }
  @keyframes slide { from { transform: translateY(40px); opacity: 0; } }
}

/* ---------- Anmeldung ---------- */
body.auth {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--bg);
}
.auth-wrap { width: 100%; max-width: 440px; padding: 2rem 1rem; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 2rem 1.75rem; box-shadow: var(--shadow-lg); }
.auth-card.wide { max-width: 640px; }
.auth-wrap:has(.wide) { max-width: 640px; }
.auth-card h2 { margin-top: .6rem; }
.auth-brand { text-align: center; margin-bottom: 1.5rem; }
.auth-brand h1 { margin: 0; font-size: 1.5rem; }
.auth-brand p { color: var(--text-2); margin: .3rem 0 0; }
.auth-foot { text-align: center; color: var(--text-3); font-size: .8rem; margin-top: 1.2rem; }
.steps { padding-left: 1.2rem; color: var(--text-2); font-size: .92rem; }
.steps li { margin-bottom: .45rem; }
.qr-box { display: grid; place-items: center; margin: 1rem 0; }
.qr { background: #fff; padding: 12px; border-radius: 14px; border: 1px solid var(--border); line-height: 0; }
.qr img, .qr svg { width: 196px; height: 196px; image-rendering: pixelated; }
.secret { letter-spacing: .08em; user-select: all; }
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 1rem 0; }
.recovery-grid code { text-align: center; padding: .55rem; font-size: .95rem; letter-spacing: .05em; }
.check-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; font-size: .9rem; }
.check-list .ok { color: var(--ok); }
.check-list .bad { color: var(--bad); font-weight: 600; }

@media print {
  .sidebar, .tabbar, .topbar, .btn, form { display: none !important; }
  body.auth { background: #fff; }
}
.danger-zone .row { margin-bottom: .8rem; }

/* =================== Etappe 2 =================== */
.mono { font-family: var(--mono); letter-spacing: .02em; }
.text-bad { color: var(--bad); font-weight: 600; }
.text-warn { color: var(--warn); font-weight: 600; }
.danger-text { color: var(--bad); }
.auto-w { width: auto; }
.section-head.tight { margin: 0 0 .9rem; }
.count-badge { background: var(--bad); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 99px; padding: .1rem .55rem; }

/* Status-Pillen */
.status { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; padding: .16rem .55rem; border-radius: 99px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.st-open { background: var(--bg-2); color: var(--text-2); }
.st-sent { background: var(--info-soft); color: var(--info); }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-part { background: var(--warn-soft); color: var(--warn); }
.st-bad { background: var(--bad-soft); color: var(--bad); }
.st-skip { background: transparent; color: var(--text-3); border: 1px dashed var(--border-strong); }
.st-due { background: var(--warn-soft); color: var(--warn); }

.person-avatar.sm { width: 36px; height: 36px; border-radius: 11px; font-size: .74rem; }
.person-avatar.xs { width: 28px; height: 28px; border-radius: 9px; font-size: .64rem; }

/* Kennzahlen-Varianten */
.stats-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .stats-3 { grid-template-columns: 1fr; } }
.link-stat { color: var(--text); transition: border-color .15s, transform .15s; }
.link-stat:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-1px); }
.stat-warn .stat-value { color: var(--warn); }
.stat-bad .stat-value { color: var(--bad); }

/* Filter */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .9rem; margin-bottom: 1rem; }
.filters select, .filters input { width: auto; min-height: 40px; padding: .45rem .7rem; }
.filters .grow-input { flex: 1 1 220px; }
@media (max-width: 640px) { .filters select { flex: 1 1 45%; } }

/* Belegliste */
.doc-list { padding: .25rem 0; }
.doc-list.compact { padding: 0; border: 0; box-shadow: none; background: none; }
.doc-list.card.compact { padding: .25rem 0; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.doc-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: 0; }
.doc-check { display: flex; align-items: center; padding-left: 1.1rem; }
.doc-check input { width: 18px; height: 18px; }
.doc-main { flex: 1; display: flex; align-items: center; gap: .85rem; padding: .85rem 1.2rem .85rem .8rem; color: var(--text); min-width: 0; }
.doc-list.compact .doc-main { padding: .65rem .2rem; border-bottom: 1px solid var(--border); }
.doc-list.card.compact .doc-main { padding: .7rem 1.2rem; }
.doc-list.compact .doc-main:last-child { border-bottom: 0; }
.doc-main:hover { text-decoration: none; background: var(--surface-2); }
.doc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.doc-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-text small { font-size: .8rem; }
.doc-claims { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.doc-amount { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

.bulk-bar {
  position: sticky; bottom: 1rem; z-index: 25; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  margin-top: 1rem; padding: .7rem 1rem; border-radius: 14px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg);
}
.bulk-bar select, .bulk-bar input { width: auto; min-height: 34px; padding: .3rem .5rem; background: var(--surface); color: var(--text); }
.bulk-fields { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; flex: 1; }
@media (max-width: 900px) { .bulk-bar { bottom: calc(5rem + env(safe-area-inset-bottom)); } }

.pager { display: flex; justify-content: center; gap: .3rem; margin: 1.2rem 0; flex-wrap: wrap; }
.pager a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); color: var(--text-2); }
.pager a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.fab { display: none; }
@media (max-width: 900px) {
  .fab {
    display: grid; place-items: center; position: fixed; right: 1.1rem; bottom: calc(5.3rem + env(safe-area-inset-bottom)); z-index: 26;
    width: 58px; height: 58px; border-radius: 18px; background: var(--brand); color: #fff; box-shadow: var(--shadow-lg);
  }
  .fab:hover { text-decoration: none; }
  :root[data-theme="dark"] .fab { color: #06201d; }
}

/* Erfassung */
.beleg-form { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1rem; align-items: start; }
.beleg-form > .card { margin: 0; }
.capture { position: sticky; top: 1rem; }
@media (max-width: 1000px) { .beleg-form { grid-template-columns: 1fr; } .capture { position: static; } }
.dropzone { border: 2px dashed var(--border-strong); border-radius: 14px; padding: 1.4rem 1rem; text-align: center; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.has-files { padding: .8rem; border-style: solid; }
.dropzone.has-files .dz-empty { display: none; }
.dz-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); margin-bottom: .6rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; }
.thumbs[data-hint]:not([data-hint=""])::after { content: attr(data-hint); grid-column: 1 / -1; font-size: .78rem; color: var(--text-3); }
.thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdf-thumb { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; font-weight: 800; color: var(--bad); padding: .4rem; }
.pdf-thumb small { font-weight: 500; color: var(--text-2); font-size: .66rem; word-break: break-all; text-align: center; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
#capture-actions { margin-top: .8rem; }
.ocr-bar { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; padding: .6rem .8rem; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: .88rem; font-weight: 500; }
.ocr-bar:not(.busy) .spinner { display: none; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ocr-text { max-height: 260px; overflow: auto; white-space: pre-wrap; font-size: .76rem; background: var(--bg-2); padding: .8rem; border-radius: 10px; margin-top: .8rem; }
.capture > p.small { margin: .9rem 0 0; }
input.ocr-filled { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 70%, var(--border-strong)); }
input.invalid { border-color: var(--bad); }
.fields { display: flex; flex-direction: column; gap: 1rem; }
.fields h2 { margin: 0; }

.person-pick { display: flex; flex-wrap: wrap; gap: .45rem; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem .35rem .35rem; border-radius: 99px; border: 1px solid var(--border-strong); cursor: pointer; font-weight: 500; transition: all .12s; }
.pick b { display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 .3rem; border-radius: 99px; background: var(--c); color: var(--cf); font-size: .68rem; }
.pick input:checked + span { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.pick input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }

.segmented { display: inline-flex; flex-wrap: wrap; background: var(--bg-2); border-radius: 12px; padding: 3px; gap: 2px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: .45rem .85rem; border-radius: 9px; cursor: pointer; font-size: .88rem; font-weight: 500; color: var(--text-2); }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }

.beleg-form:not(.is-kv) .only-kv, .beleg-form.is-kv .no-kv { display: none !important; }

.claims-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; display: flex; flex-direction: column; gap: .4rem; }
.claims-title { margin: 0; font-size: .84rem; font-weight: 600; color: var(--text-2); }
.claim-line { display: flex; align-items: center; gap: .55rem; font-size: .9rem; }
.claim-line input { width: 17px; height: 17px; }
.claim-line b { font-variant-numeric: tabular-nums; }
.kind-tag { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--bg-2); color: var(--text-2); padding: .12rem .4rem; border-radius: 5px; }

.pay-box { border: 1px solid var(--border); border-radius: 12px; padding: .75rem .9rem; }
.pay-box summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .5rem; list-style: none; }
.pay-box summary::-webkit-details-marker { display: none; }
.pay-box summary::after { content: "▾"; margin-left: auto; color: var(--text-3); transition: transform .15s; }
.pay-box[open] summary::after { transform: rotate(180deg); }
.inline-date { width: auto; min-height: 38px; padding: .35rem .6rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; padding-top: .3rem; border-top: 1px solid var(--border); padding-top: 1rem; }
@media (max-width: 640px) { .form-actions .btn { flex: 1; } }

.file-list { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-direction: column; gap: .45rem; }
.file-list li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .9rem; }
.file-list li a:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Beleg-Detail */
.doc-hero { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.doc-hero h1 { margin: .2rem 0; }
.doc-hero p.muted { margin: 0; }
.doc-hero .eyebrow { text-transform: none; letter-spacing: 0; font-size: .86rem; color: var(--text-2); display: flex; align-items: center; gap: .4rem; }
.doc-hero-amount { font-family: var(--font-display); font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-actions { margin-bottom: 1.4rem; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 1rem; align-items: start; }
.doc-col > .card:first-child { margin-top: 0; }
@media (max-width: 1000px) { .doc-layout { grid-template-columns: 1fr; } }
.claims { display: flex; flex-direction: column; gap: .8rem; }
.claim { border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .75rem; background: var(--surface-2); }
.claim-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.claim p { margin: 0; }
.kv-3 { grid-template-columns: repeat(3, 1fr); }
.totals { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.totals dd { font-size: 1.05rem; }
.paid-box { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.giro { display: flex; gap: 1.1rem; align-items: flex-start; flex-wrap: wrap; }
.giro .qr svg { width: 168px; height: 168px; }
.giro-text { flex: 1; min-width: 200px; }
.giro-text p { margin: .2rem 0 .7rem; }
.kv-wide.small dt { width: 90px; }
.preview { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); margin-bottom: .6rem; }
.preview img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; }
.preview iframe { display: block; width: 100%; height: 70vh; min-height: 420px; border: 0; background: #fff; }
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }

/* Zahlungen */
.pay-list { display: flex; flex-direction: column; gap: .7rem; }
.pay-list .card { margin: 0; }
.pay-item { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; flex-wrap: wrap; }
.pay-item.overdue { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.pay-main { flex: 1 1 320px; display: flex; align-items: center; gap: .85rem; color: var(--text); min-width: 0; }
.pay-main:hover { text-decoration: none; }
.pay-right { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.pay-actions { display: flex; gap: .5rem; align-items: center; }
@media (max-width: 640px) { .pay-actions { width: 100%; } .pay-actions > * { flex: 1; } .pay-actions .btn { width: 100%; } }
.dialog-sm { width: min(400px, calc(100vw - 2rem)); }
.qr-dialog { padding: 1.4rem; }
.qr.big svg { width: 240px; height: 240px; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dash-grid > .card { margin: 0; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.all-good { display: flex; align-items: center; gap: .7rem; color: var(--ok); background: var(--ok-soft); padding: .9rem 1rem; border-radius: 12px; font-size: .92rem; font-weight: 500; }
.todo-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.todo-list a { display: flex; align-items: center; gap: .75rem; padding: .65rem .2rem; color: var(--text); border-bottom: 1px solid var(--border); }
.todo-list li:last-child a { border-bottom: 0; }
.todo-list a:hover { text-decoration: none; background: var(--surface-2); }
.todo-list strong, .ready-list strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-list small { color: var(--text-2); font-size: .8rem; }
.todo-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; }
.todo-ico.warn { background: var(--warn-soft); color: var(--warn); }
.todo-ico.bad { background: var(--bad-soft); color: var(--bad); }
.todo-ico.info { background: var(--info-soft); color: var(--info); }
.todo-amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ready-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .7rem; }
.ready-list li { display: flex; align-items: center; gap: .7rem; }
.ready-list strong { display: inline; }
.ready-list small { display: block; }
.ready-list b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars { display: flex; flex-direction: column; gap: .7rem; }
.bar-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: .7rem; font-size: .88rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bar-track { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--c); min-width: 2px; }
.bar-val { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 84px; text-align: right; }

.cron-box { display: flex; flex-direction: column; gap: .5rem; padding: .9rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 1rem; }
.pdf-pages { display: flex; flex-direction: column; gap: 6px; background: var(--bg-2); max-height: 78vh; overflow: auto; }
.pdf-pages canvas { width: 100%; height: auto; display: block; background: #fff; }
.pad { padding: 2rem 1rem; margin: 0; }

/* Feinschliff Mobil */
[hidden] { display: none !important; }
.doc-row .doc-main { align-items: flex-start; }
.doc-row .person-avatar { margin-top: 2px; }
.doc-row .doc-check { align-items: flex-start; padding-top: 1.45rem; }
@media (max-width: 640px) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters .grow-input { grid-column: 1 / -1; }
  .filters select, .filters .btn { width: 100%; }
  .doc-main { gap: .65rem; padding-right: .9rem; }
  .doc-check { padding-left: .8rem; }
  .page-head .btn-primary[href*="beleg_neu"] { display: none; }
}

/* =================== Etappe 3 =================== */
.lead { max-width: 720px; margin-bottom: 1.2rem; }
.note { margin-top: 1.2rem; max-width: 820px; }
.text-ok { color: var(--ok); font-weight: 600; }
.tabs { display: flex; gap: .3rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: .6rem .9rem; color: var(--text-2); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.stat-ok .stat-value { color: var(--ok); }
.stat-accent { background: var(--brand-soft); border-color: transparent; }

.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 1rem; }
.calc-grid .card { margin: 0; }
.calc { display: flex; flex-direction: column; gap: .9rem; border-top: 4px solid var(--tone); }
.tone-ok { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.tone-warn { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.tone-bad { --tone: var(--bad); --tone-soft: var(--bad-soft); }
.tone-neutral { --tone: var(--border-strong); --tone-soft: var(--bg-2); }
.calc-head { display: flex; align-items: center; gap: .7rem; }
.calc-head strong { display: block; }
.verdict { display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start; background: var(--tone-soft); color: var(--tone); font-weight: 700; padding: .35rem .75rem; border-radius: 99px; font-size: .9rem; }
.tone-neutral .verdict { color: var(--text-2); }
.verdict .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.compare { display: flex; flex-direction: column; gap: .5rem; }
.cmp-row { display: grid; grid-template-columns: 1fr; gap: .2rem .7rem; font-size: .85rem; }
.cmp-row { grid-template-columns: 1fr auto; }
.cmp-row .cmp-bar { grid-column: 1 / -1; grid-row: 2; height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.cmp-row .cmp-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; min-width: 2px; }
.cmp-row.bre .cmp-bar i { background: var(--accent); }
.cmp-row b { font-variant-numeric: tabular-nums; }
.small-kv dd { font-size: .88rem; }
.calc-text { margin: 0; }

.export-actions { margin-bottom: 1rem; }
.table-card { padding: .4rem .2rem; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; padding: .6rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.details-card summary { cursor: pointer; font-weight: 600; }
.details-card .table-scroll { margin-top: 1rem; }

.match-list { display: flex; flex-direction: column; gap: .5rem; }
.match-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface-2); transition: border-color .12s, background .12s; }
.match-row.checked { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.match-row > input { width: 19px; height: 19px; }
.match-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.match-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-amt { width: 128px; flex-shrink: 0; }
.match-amt input { padding-right: 2rem; text-align: right; min-height: 40px; }
.match-amt em { right: .7rem; }
.match-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .match-row { flex-wrap: wrap; } .match-amt { width: 100%; margin-left: 2rem; } .match-foot .btn { width: 100%; } }

/* =================== Version 0.4 =================== */
.claim-line { flex-wrap: wrap; }
.claim-line.skipped .grow, .claim-line.skipped b { text-decoration: line-through; color: var(--text-3); }
.mini-check { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.mini-check input { width: 16px; height: 16px; }
.mini-skip { border: 0; background: none; color: var(--text-3); font: inherit; font-size: .78rem; cursor: pointer; text-decoration: underline; padding: 0; }
.st-obj { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #7c3aed; }
:root[data-theme="dark"] .st-obj { color: #c4b5fd; }
.objection { border: 1px dashed color-mix(in srgb, #7c3aed 50%, var(--border)); border-radius: 10px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .4rem; background: var(--surface); }
.objection p { margin: 0; }
.obj-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.kv .span-2 { grid-column: 1 / -1; }
.todo-ico.obj { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #7c3aed; font-size: 1.05rem; }
.toggle-done.on { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.hidden-note { margin: -.4rem 0 1rem .2rem; }
@media (max-width: 640px) { .filters .toggle-done { grid-column: 1 / -1; } }
