/* Zynxta – Apple-inspiriertes Design, hell & dunkel */
:root {
  --page: #F5F5F7; --card: #FFFFFF; --soft: #F5F5F7; --field: #FFFFFF;
  --text: #1D1D1F; --text2: #6E6E73; --side: #ECECEF; --sideLine: #D9D9DE;
  --fill: #EFEFF2; --fill2: #E3E3E8; --sep: #F0F0F3; --line: #D2D2D7;
  --green: #248A3D; --red: #D70015; --orange: #8A4B00;
  --accent: #1D1D1F; --onAccent: #FFFFFF; --segOn: #FFFFFF;
  --okBg: #E6F4EA; --okFg: #1E6B33; --warnBg: #FDF0E1; --warnFg: #8A4B00; --badBg: #FDE8E7; --badFg: #B4231F;
  --tabBg: rgba(249,249,251,0.86);
  --shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.04);
  --logoFilter: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --page: #000000; --card: #1C1C1E; --soft: #2C2C2E; --field: #2C2C2E;
    --text: #F5F5F7; --text2: #A1A1A6; --side: #161618; --sideLine: #2C2C2E;
    --fill: #3A3A3C; --fill2: #48484A; --sep: #2C2C2E; --line: #48484A;
    --green: #30D158; --red: #FF453A; --orange: #FFB340;
    --accent: #F5F5F7; --onAccent: #000000; --segOn: #636366;
    --okBg: rgba(48,209,88,0.2); --okFg: #30D158; --warnBg: rgba(255,159,10,0.2); --warnFg: #FFB340; --badBg: rgba(255,69,58,0.2); --badFg: #FF6961;
    --tabBg: rgba(22,22,24,0.86); --shadow: 0 0 0 1px rgba(255,255,255,0.06);
    --logoFilter: invert(1); color-scheme: dark;
  }
}
html[data-theme="dark"] {
  --page: #000000; --card: #1C1C1E; --soft: #2C2C2E; --field: #2C2C2E;
  --text: #F5F5F7; --text2: #A1A1A6; --side: #161618; --sideLine: #2C2C2E;
  --fill: #3A3A3C; --fill2: #48484A; --sep: #2C2C2E; --line: #48484A;
  --green: #30D158; --red: #FF453A; --orange: #FFB340;
  --accent: #F5F5F7; --onAccent: #000000; --segOn: #636366;
  --okBg: rgba(48,209,88,0.2); --okFg: #30D158; --warnBg: rgba(255,159,10,0.2); --warnFg: #FFB340; --badBg: rgba(255,69,58,0.2); --badFg: #FF6961;
  --tabBg: rgba(22,22,24,0.86); --shadow: 0 0 0 1px rgba(255,255,255,0.06);
  --logoFilter: invert(1); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 14px; line-height: 1.4; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
a:hover { opacity: .8; }
h1, h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { flex: 0 0 auto; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text2); }
.small { font-size: 12px; }
.logo { height: 20px; width: auto; display: block; filter: var(--logoFilter); }

/* ---------- Bausteine ---------- */
.card { background: var(--card); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card h2 { font-size: 17px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.grow2 { flex: 2 1 520px; min-width: 0; }
.grow1 { flex: 1 1 300px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi { background: var(--card); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 13px; color: var(--text2); font-weight: 500; }
.kpi .value { font-size: 28px; font-weight: 600; letter-spacing: -0.6px; }
.kpi .hint { font-size: 12px; color: var(--text2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--fill); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { opacity: .88; }
.btn-primary { background: var(--accent); color: var(--onAccent); font-weight: 600; }
.btn-danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px var(--red); font-weight: 600; }
.btn-danger-solid { background: #D70015; color: #fff; font-weight: 600; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; min-height: 46px; font-size: 15px; border-radius: 12px; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 20px; background: transparent; color: var(--text2); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--text); font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text2); font-weight: 500; min-width: 0; }
.input { min-height: 44px; width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--text); background: var(--field); }
textarea.input { padding: 10px 12px; min-height: 70px; resize: vertical; }
.input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--fill2); }
.input-code { text-align: center; letter-spacing: 8px; font-size: 22px; min-height: 52px; }
.pw { position: relative; }
.pw .input { padding-right: 44px; }
.pw button { position: absolute; right: 0; top: 0; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; cursor: pointer; color: var(--text); font-weight: 400; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 18px; accent-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

.seg { display: inline-flex; flex-wrap: wrap; background: var(--fill); border-radius: 9px; padding: 2px; }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; }
.seg .on { background: var(--segOn); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.seg .n { color: var(--text2); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--fill); color: var(--text2); white-space: nowrap; }
.badge-accent { background: var(--accent); color: var(--onAccent); }
.dot { width: 8px; height: 8px; border-radius: 4px; display: inline-block; flex: 0 0 8px; }
.dot.active { background: #34C759; } .dot.pending { background: #30B0C7; } .dot.unverified { background: #FF9F0A; } .dot.locked { background: #FF3B30; }
.avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 17px; background: var(--fill2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.avatar.lg { width: 56px; height: 56px; border-radius: 28px; font-size: 19px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.notice.success { background: var(--okBg); color: var(--okFg); }
.notice.error { background: var(--badBg); color: var(--badFg); }
.notice.info { background: var(--warnBg); color: var(--warnFg); }
.notice .ic { margin-top: 1px; }

.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 48px; border-top: 1px solid var(--sep); }
.list-row:first-child { border-top: 0; }
.list-row .main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row .main b { font-weight: 600; }
.list-row .main span { font-size: 12px; color: var(--text2); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text2); padding: 8px; }
.tbl td { padding: 10px 8px; border-top: 1px solid var(--sep); vertical-align: middle; }
.tbl tr.sel td { background: var(--soft); }
.scroll-x { overflow-x: auto; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; }
.codes span { background: var(--soft); border-radius: 8px; padding: 8px; text-align: center; }
.qr { width: 184px; height: 184px; padding: 12px; background: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.qr img, .qr canvas, .qr svg { width: 160px; height: 160px; image-rendering: pixelated; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 1px; word-break: break-all; }
dl.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
dl.facts dt { color: var(--text2); } dl.facts dd { margin: 0; }

/* ---------- Anmeldeseiten ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 48px 16px; }
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.auth-head .logo { height: 34px; margin-bottom: 10px; }
.auth-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.6px; }
.auth-head p { margin: 0; font-size: 15px; color: var(--text2); max-width: 360px; line-height: 1.45; }
.auth-card { width: 100%; max-width: 380px; background: var(--card); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 8px 30px rgba(0,0,0,0.06); }
.auth-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13px; color: var(--text2); text-align: center; }
.pill { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: var(--warnBg); color: var(--warnFg); font-size: 12px; font-weight: 600; }
.big-icon { width: 56px; height: 56px; border-radius: 28px; display: flex; align-items: center; justify-content: center; }
.big-icon.ok { background: var(--okBg); color: var(--okFg); } .big-icon.error { background: var(--badBg); color: var(--badFg); } .big-icon.mail { background: var(--fill); color: var(--text); }

/* ---------- App-Rahmen ---------- */
.shell { min-height: 100vh; display: flex; align-items: stretch; }
.side { align-self: flex-start; flex: 0 0 240px; background: var(--side); border-right: 1px solid var(--sideLine); padding: 24px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; flex-direction: column; gap: 6px; padding: 4px 10px 22px; }
.side .group { font-size: 11px; font-weight: 600; color: var(--text2); padding: 16px 10px 6px; text-transform: uppercase; letter-spacing: .4px; }
.side .group:first-of-type { padding-top: 6px; }
.nav { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav:hover { background: var(--fill); opacity: 1; }
.nav.on { background: var(--accent); color: var(--onAccent); }
.nav .soon { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--text2); }
.nav.on .soon { color: inherit; opacity: .7; }
.side .spacer { flex: 1 1 auto; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; }
.me .who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.me .who b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12px; color: var(--text2); }
.content { flex: 1 1 auto; min-width: 0; padding: 32px 40px 48px; }
.content-inner { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head .kicker { font-size: 13px; color: var(--text2); font-weight: 500; }
.page-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.8px; }
.page-head .actions { display: flex; gap: 10px; align-items: center; }
.tabbar { display: none; }
.sheet-wrap { display: none; }

.subnav { display: flex; flex-direction: column; gap: 2px; background: var(--card); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); flex: 0 0 220px; }
.subnav a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; text-decoration: none; font-weight: 500; }
.subnav a.on { background: var(--fill); font-weight: 600; }

/* ---------- Smartphone ---------- */
@media (max-width: 760px) {
  .side { display: none; }
  .content { padding: 20px 16px 116px; }
  .page-head h1 { font-size: 28px; }
  .d-only { display: none !important; }
  .input { font-size: 16px; }
  .subnav { flex: 1 1 100%; flex-direction: row; overflow-x: auto; }
  .subnav a { white-space: nowrap; }
  .tabbar { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); background: var(--tabBg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--sideLine); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; border: 0; background: transparent; color: var(--text2); font-size: 10px; font-weight: 600; text-decoration: none; cursor: pointer; padding: 4px 0; }
  .tabbar .on { color: var(--text); }
  .tabbar .plus span { width: 52px; height: 52px; border-radius: 26px; background: var(--accent); color: var(--onAccent); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,0.22); margin-top: -18px; }
  .sheet-wrap.open { display: flex; position: fixed; inset: 0; z-index: 60; flex-direction: column; justify-content: flex-end; }
  .sheet-bg { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,0.35); }
  .sheet { position: relative; background: var(--page); border-radius: 20px 20px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-height: 80vh; overflow-y: auto; }
  .sheet .grabber { align-self: center; width: 36px; height: 5px; border-radius: 3px; background: var(--line); }
  .sheet .list { background: var(--card); border-radius: 14px; display: flex; flex-direction: column; }
  .sheet .list a, .sheet .list button { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 16px; border: 0; border-top: 1px solid var(--sep); background: transparent; color: var(--text); font-size: 16px; text-decoration: none; text-align: left; width: 100%; }
  .sheet .list > :first-child { border-top: 0; }
}

/* ---------- Admin ---------- */
.admin .side .brand .badge { font-size: 10px; letter-spacing: .5px; }
.admin-auth { background: #000; color: #F5F5F7; }
@media (max-width: 760px) {
  .admin .side { display: flex; position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; overflow-x: auto; align-items: center; padding: 10px 12px; gap: 6px; border-right: 0; border-bottom: 1px solid var(--sideLine); flex: 1 1 100%; }
  .admin .shell { flex-direction: column; }
  .admin .side .brand { padding: 0 8px 0 4px; flex: 0 0 auto; }
  .admin .side .nav { flex: 0 0 auto; white-space: nowrap; }
  .admin .content { padding-bottom: 40px; }
}
.m-only-btn { display: none !important; }
@media (max-width: 760px) { .m-only-btn { display: inline-flex !important; } }

/* ---------- Etappe 2: Finanzen ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 8px; align-items: center; }
.month-nav { display: flex; align-items: center; gap: 4px; }
.month-nav .month-label { font-weight: 600; font-size: 15px; min-width: 130px; text-align: center; }
.month-nav .btn-icon { width: 36px; height: 36px; color: var(--text); }
.m-only-inline { display: none; }
.bar { position: relative; height: 8px; border-radius: 4px; background: var(--fill); overflow: visible; }
.bar > span { display: block; height: 8px; border-radius: 4px; max-width: 100%; }
.bar > i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text2); border-radius: 1px; }
.seg label { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label.on { background: var(--segOn); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.seg label:focus-within { outline: 2px solid var(--text); outline-offset: 1px; }
.seg-full { display: flex; }
.seg-full label { flex: 1 1 0; min-height: 36px; text-align: center; }
.tx-form[data-type="transfer"] .only-cat, .tx-form:not([data-type="transfer"]) .only-transfer { display: none !important; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; background: var(--fill); border-radius: 9px; color: var(--text2); flex: 1 1 140px; }
.search input { border: 0; background: transparent; outline: none; min-width: 0; flex: 1; font-size: 14px; color: var(--text); }
.tx-list { display: flex; flex-direction: column; }
.tx-day { font-size: 12px; font-weight: 600; color: var(--text2); padding: 14px 0 4px; text-transform: uppercase; letter-spacing: .3px; }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sep); }
.tx-day + .tx-row { border-top: 0; }
.tx-row .main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tx-row .main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.tx-row .main span { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-row form { display: contents; }
.tx-dot { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.tx-amt { font-weight: 600; white-space: nowrap; }
.tx-amt.in { color: var(--green); } .tx-amt.transfer { color: var(--text2); }
.btn-icon.btn-sm { width: 34px; height: 34px; min-height: 34px; }
.empty { text-align: center; padding: 28px 0; margin: 0; }
.acc-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.acc-card { text-decoration: none; color: var(--text); gap: 10px; padding: 18px; }
.acc-card:hover { opacity: 1; box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0,0,0,0.06); }
.acc-card.sel { box-shadow: 0 0 0 2px var(--text); }
.acc-line { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--sep); text-decoration: none; color: var(--text); }
.acc-line:first-child { border-top: 0; }
.acc-line .main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.acc-line .main span { font-size: 12px; color: var(--text2); }
.acc-strip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--soft); border-radius: 12px; }
.icon-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 10px; background: var(--soft); border-radius: 12px; }
.icon-opt { position: relative; cursor: pointer; }
.icon-opt input { position: absolute; opacity: 0; }
.icon-opt > span:first-of-type { height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--text2); background: var(--card); }
.icon-opt input:checked + span { color: var(--text); box-shadow: 0 0 0 2px var(--text); }
.icon-opt input:focus-visible + span { outline: 2px solid var(--text); }
.color-row { display: flex; gap: 6px; flex-wrap: wrap; }
.color-opt { position: relative; cursor: pointer; width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; }
.color-opt input { position: absolute; opacity: 0; }
.color-opt > span:first-of-type { width: 22px; height: 22px; border-radius: 11px; display: block; }
.color-opt:has(input:checked) { box-shadow: 0 0 0 2px var(--text); }
.budget-list { display: flex; flex-direction: column; }
.budget-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--sep); }
.budget-row:first-child { border-top: 0; }
.b-name { flex: 0 0 150px; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.b-bar { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.b-input { flex: 0 0 120px; display: flex; align-items: center; gap: 6px; }
.b-input .input, .b-grp .input { min-height: 36px; font-size: 14px; }
.b-input .input { text-align: right; padding: 0 8px; }
.b-grp { flex: 0 0 110px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 4px 0 12px; border-radius: 17px; background: var(--fill); font-size: 13px; font-weight: 500; }
.chip form { display: contents; }
.chip button { width: 28px; height: 28px; border: 0; border-radius: 14px; background: transparent; color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.steps li span { color: var(--text2); font-size: 13px; }
.due-card { box-shadow: 0 0 0 1px var(--warnBg), var(--shadow); }
@media (max-width: 760px) {
  .m-only-inline { display: inline-flex; }
  .b-name { flex-basis: 100%; }
  .b-input { flex: 1 1 100px; }
  .b-grp { flex: 1 1 100px; }
  #neu[style*="sticky"] { position: static !important; }
  .icon-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
[hidden]{display:none!important}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; border-radius: 14px; }
  .kpi .value { font-size: 21px; }
  .kpi .hint { font-size: 11px; }
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg a, .seg button { padding: 0 10px; white-space: nowrap; }
}

/* ---------- Etappe 3 ---------- */
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.quick form { display: contents; }
.quick .btn[disabled] { opacity: .4; cursor: default; }
details.more { border-top: 1px solid var(--sep); padding-top: 10px; }
details.more > summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); margin-top: -3px; transition: transform .15s; }
details.more[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
details.more[open] > summary { margin-bottom: 10px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form .input { min-height: 36px; font-size: 14px; flex: 1 1 120px; width: auto; }
.inline-form .field .input { min-height: 44px; }
.input-sm { min-height: 34px !important; font-size: 13px !important; padding: 0 8px; }
.pocket { gap: 12px; }
.seg button { font: inherit; font-size: 13px; }
.cmp { display: flex; flex-direction: column; border-radius: 12px; background: var(--soft); padding: 4px 14px; }
.cmp-row { display: grid; grid-template-columns: 1.2fr 1.6fr 1fr; gap: 8px; padding: 10px 0; font-size: 13px; border-top: 1px solid var(--sep); align-items: center; }
.cmp-row:first-child { border-top: 0; }
.cmp-row span:last-child { text-align: right; font-weight: 600; }
.cmp-row.on b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 4px; background: var(--text); margin-right: 7px; vertical-align: 1px; }
.debt { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--sep); }
.debt:first-child { border-top: 0; padding-top: 4px; }
.debt .tx-row { padding: 0; }
.kind { font-weight: 600; }
.hist { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.hist-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; position: relative; }
.hist-bar { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; }
.hist-val { font-size: 10px; color: var(--text2); white-space: nowrap; }
.hist-lbl { font-size: 11px; color: var(--text2); }
.plan-form input[type=range] { width: 100%; accent-color: var(--accent); }
.plan-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-kpis > div { display: flex; flex-direction: column; gap: 4px; background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.plan-kpis b { font-size: 18px; font-weight: 600; letter-spacing: -.3px; }
.plan-chart { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-bottom: 18px; border-bottom: 1px solid var(--sep); }
.plan-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.plan-col span { display: block; width: 100%; }
.plan-col .g { background: var(--green); border-radius: 4px 4px 0 0; }
.plan-col .p { background: var(--fill2); }
.plan-col i { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 10px; color: var(--text2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .muted { margin-left: auto; }
.cls-seg { max-width: 100%; }
.cls-seg .dot { width: 7px; height: 7px; flex-basis: 7px; }
.asset-list { display: flex; flex-direction: column; }
.asset { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--sep); }
.asset:first-child { border-top: 0; padding-top: 4px; }
.asset-top { display: flex; align-items: center; gap: 12px; }
.asset-top .main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.asset-top .main b { font-weight: 600; }
.asset-top .main span { font-size: 12px; color: var(--text2); }
.asset-val { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.asset-val b { font-size: 15px; }
.asset-val span { font-size: 12px; font-weight: 600; }
.asset-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; color: var(--text2); padding-left: 46px; }
.asset details.more { margin-left: 46px; }
.price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.price-grid .input { min-height: 38px; font-size: 14px; }
.asset-form[data-kind="metal"] .only-manual:not(.only-metal), .asset-form[data-kind="metal"] .only-priced,
.asset-form[data-kind="priced"] .only-metal, .asset-form[data-kind="priced"] .only-manual,
.asset-form[data-kind="manual"] .only-metal:not(.only-manual), .asset-form[data-kind="manual"] .only-priced { display: none !important; }
@media (max-width: 640px) {
  .plan-kpis { grid-template-columns: 1fr 1fr; }
  .plan-kpis > div:last-child { grid-column: 1 / -1; }
  .cmp-row { grid-template-columns: 1fr auto; }
  .cmp-row span:nth-child(2) { grid-column: 1 / -1; order: 3; color: var(--text2); }
  .asset-meta { padding-left: 0; }
  .asset details.more { margin-left: 0; }
  .hist-val { display: none; }
}
.pocket-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pocket-mini a { display: flex; flex-direction: column; gap: 7px; text-decoration: none; padding: 12px 14px; background: var(--soft); border-radius: 12px; min-width: 0; }
.pocket-mini .bar { display: block; }
.inline-form .field .input { flex: 0 0 auto; width: 100%; }
.quick .btn-sm { padding: 0 10px; }

/* ---------- Etappe 4 ---------- */
.verdict { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; }
.checks { display: flex; flex-direction: column; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--sep); }
.check-row:first-child { border-top: 0; padding-top: 2px; }
.check-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-row b { font-weight: 600; }
.check-row span { font-size: 13px; color: var(--text2); line-height: 1.45; }
.check-ic { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-actions form { display: contents; }
.plan-actions .btn { flex: 1 1 220px; }
.buy-form { border-top: 1px solid var(--sep); padding-top: 12px; }
.buy-form .input { max-width: 220px; }
.room { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.room > div { display: flex; justify-content: space-between; gap: 8px; }
.room > div span { color: var(--text2); }
.room > div b { font-weight: 500; white-space: nowrap; }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 6px 12px 14px; border-radius: 14px; box-shadow: var(--shadow); }
.tip > .ic { margin-top: 2px; }
.tip-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tip-body b { font-weight: 600; }
.tip-body span { font-size: 13px; line-height: 1.45; opacity: .9; }
.tip-body a { color: inherit; font-size: 13px; font-weight: 600; }
.tip form { display: contents; }
.install-steps { display: flex; flex-direction: column; gap: 10px; }
.install-steps > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; background: var(--soft); border-radius: 12px; }
.install-steps span { font-size: 13px; color: var(--text2); }
.file-input { padding: 9px 10px; font-size: 13px; }
.tbl.imp td { padding: 6px 6px; font-size: 13px; }
.tbl.imp .input-sm { min-width: 140px; }
.tbl.imp tr.dup td { opacity: .55; }
.imp-desc { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .buy-form .input { max-width: none; } }
@media (max-width: 640px) {
  .tbl.imp thead { display: none; }
  .tbl.imp, .tbl.imp tbody { display: block; }
  .tbl.imp tr { display: grid; grid-template-columns: 28px 1fr auto; gap: 2px 8px; padding: 10px 0; border-top: 1px solid var(--sep); }
  .tbl.imp td { border: 0; padding: 0; }
  .tbl.imp td:nth-child(1) { grid-row: 1 / span 3; padding-top: 2px; }
  .tbl.imp td:nth-child(2) { grid-column: 2; font-size: 12px; color: var(--text2); }
  .tbl.imp td:nth-child(3) { grid-column: 2 / span 2; grid-row: 2; max-width: none; }
  .tbl.imp td:nth-child(4) { grid-column: 3; grid-row: 1; }
  .tbl.imp td:nth-child(5) { grid-column: 2 / span 2; grid-row: 3; padding-top: 6px; }
  .tbl.imp .input-sm { width: 100%; }
}
