/* Schrift lokal ausgeliefert (kein Google-Fonts-Abruf, DSGVO) */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #0c0c0e;
  --bg-2: #111114;
  --surface: #17171b;
  --surface-2: #1d1d22;
  --surface-3: #25252b;
  --border: #2a2a31;
  --border-2: #34343c;
  --text: #f4f4f6;
  --text-2: #b4b4bd;
  --muted: #7d7d88;
  --accent: #a1a1aa;
  --accent-2: #d4d4d8;
  --accent-bg: rgba(255, 255, 255, .07);
  --accent-strong: #3f3f46;
  --green: #3ecf8e;
  --green-bg: rgba(62, 207, 142, .12);
  --red: #ff6464;
  --red-bg: rgba(255, 100, 100, .12);
  --amber: #ffb547;
  --amber-bg: rgba(255, 181, 71, .12);
  --blue: #5aa9ff;
  --blue-bg: rgba(90, 169, 255, .12);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .5);
  --sidebar: 256px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
:where(svg:not([width]):not(.chart)) { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.kpi .label svg { width: 15px; height: 15px; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1, 'cv11' 1;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #52525b; color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c2c33; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2);
  border-right: 1px solid var(--border); padding: 16px 12px 24px; display: flex; flex-direction: column; gap: 2px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 17px; }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; display: block; flex: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.brand { letter-spacing: -.02em; }
.org-switch { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; }
.org-switch .avatar { width: 28px; height: 28px; font-size: 12px; }
.org-switch b { display: block; font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.org-switch small { color: var(--muted); font-size: 11px; }
.nav-group { margin-top: 14px; padding: 0 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--text-2);
  cursor: pointer; font-weight: 500; font-size: 13.5px; text-decoration: none !important; position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item .count { margin-left: auto; font-size: 11px; background: var(--accent-bg); color: var(--accent-2); padding: 1px 7px; border-radius: 20px; font-weight: 600; }
.nav-item .count.warn { background: var(--amber-bg); color: var(--amber); }
.nav-sub { display: none; flex-direction: column; gap: 1px; margin: 2px 0 4px 20px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-sub.open { display: flex; }
.nav-sub .nav-item { padding: 6px 10px; font-size: 13px; }
.nav-sub .nav-item.active::before { display: none; }
.sidebar-foot { margin-top: auto; padding-top: 20px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 32px;
  background: rgba(12, 12, 14, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.search { flex: 1; max-width: 460px; position: relative; }
.search input { width: 100%; padding: 9px 12px 9px 36px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; outline: none; }
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--muted); }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); max-height: 420px; overflow: auto; padding: 6px; }
.search-results a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.search-results a:hover { background: var(--surface-2); text-decoration: none; }
.search-results small { color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 5px 10px; border: 1px solid var(--border); border-radius: 20px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.live.on i { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.topbar .spacer { flex: 1; }
.content { padding: 28px 32px 64px; max-width: 1360px; width: 100%; }
.menu-toggle { display: none; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; color: var(--muted); font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-color: var(--accent); }
.tab .count { font-size: 11px; color: var(--muted); margin-left: 5px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap; font-size: 13.5px; text-decoration: none !important;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: #e4e4e7; border-color: #e4e4e7; color: #111113; }
.btn.primary:hover { background: #fff; border-color: #fff; }
.btn.white { background: #fff; color: #111; border-color: #fff; }
.btn.white:hover { background: #e8e8ec; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.icon { padding: 7px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-group { display: inline-flex; }
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 50; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: none; color: var(--text); cursor: pointer; font-size: 13.5px; text-decoration: none !important; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-menu svg { width: 16px; height: 16px; color: var(--muted); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px 0; }

/* ---------- Cards / KPIs ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 10px; }
.card-head h3 { font-size: 15px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.grid.k4 { grid-template-columns: repeat(4, 1fr); }
.grid.k3 { grid-template-columns: repeat(3, 1fr); }
.grid.k2 { grid-template-columns: repeat(2, 1fr); }
.grid.main-side { grid-template-columns: 1.7fr 1fr; }
.kpi { padding: 18px 20px; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; }
.kpi .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.balance-hero { padding: 24px; background: linear-gradient(135deg, #26262b 0%, #17171b 60%); position: relative; overflow: hidden; }
/* Glow liegt auf ::before, damit er nicht mit dem Maus-Lichtschein (::after) kollidiert */
.balance-hero::before { content: ''; position: absolute; right: -90px; top: -90px; width: 280px; height: 280px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255,255,255,.09), transparent 70%); animation: heroGlow 9s ease-in-out infinite; }
.balance-hero > * { position: relative; z-index: 1; }
@keyframes heroGlow { 50% { transform: translate(-30px, 24px) scale(1.12); opacity: .75; } }
.balance-hero .value { font-size: 36px; }
.up { color: var(--green); } .down { color: var(--red); } .muted { color: var(--muted); } .warn { color: var(--amber); }
.mt { margin-top: 16px; } .mt2 { margin-top: 24px; } .mb { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 10px; } .row.between { justify-content: space-between; } .row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.right { text-align: right; } .nowrap { white-space: nowrap; } .small { font-size: 12.5px; } .strong { font-weight: 600; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
table.t th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: var(--surface-2); }
/* Hover-Fläche mit abgerundeten Ecken statt kantigem Rechteck */
table.t tbody tr.click:hover td { border-bottom-color: transparent; }
table.t tbody tr.click:hover td:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
table.t tbody tr.click:hover td:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 600; border-top: 1px solid var(--border-2); padding: 12px 16px; }
.cell-main { font-weight: 500; }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 36px; height: 36px; opacity: .5; margin-bottom: 8px; }
.empty h4 { color: var(--text); margin-bottom: 4px; font-size: 15px; }
.tx-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); font-weight: 600; font-size: 13px; flex: none; color: var(--text-2); }
.tx-icon.in { background: var(--green-bg); color: var(--green); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.violet { background: var(--accent-bg); color: var(--accent-2); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field > small { color: var(--muted); font-size: 12px; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 9px; outline: none; transition: border-color .12s, box-shadow .12s;
}
.field textarea { min-height: 80px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d7d88' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px !important; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin-top: 2px; }
.radio-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.radio-card { border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; background: var(--bg-2); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.radio-card input { accent-color: var(--accent); margin-top: 3px; }
.radio-card b { display: block; font-weight: 500; }
.radio-card small { color: var(--muted); }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 22px; cursor: pointer; transition: .15s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: #d4d4d8; }
.switch input:checked + span::before { background: #111113; }
.switch input:checked + span::before { transform: translateX(16px); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { font-weight: 500; display: block; }
.setting-row small { color: var(--muted); }
.section-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.section-desc { color: var(--muted); margin: 0 0 16px; font-size: 13px; }

/* ---------- Settings layout ---------- */
.settings { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav .h { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 14px 10px 6px; }
.settings-nav a { padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.settings-nav a:hover { background: var(--surface); color: var(--text); }
.settings-nav a.active { background: var(--surface-2); color: var(--text); }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .12s; }
.modal { background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow); animation: pop .15s; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); }
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 90; animation: fade .12s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--border-2); z-index: 91; display: flex; flex-direction: column; animation: slide .18s; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }

/* ---------- Toast ---------- */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); max-width: 400px; display: flex; gap: 12px; align-items: flex-start; animation: pop .2s; }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast.ok svg { color: var(--green); } .toast.err svg { color: var(--red); } .toast.info svg { color: var(--accent-2); }
.toast b { display: block; font-weight: 600; }
.toast small { color: var(--text-2); }

/* ---------- Editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.editor-side { position: sticky; top: 84px; }
.items-table { table-layout: fixed; min-width: 820px; }
.items-table th:first-child { width: 38px; }
.items-table th { padding: 8px 6px !important; }
.items-table td { padding: 6px 6px !important; vertical-align: top !important; }
.items-table select { padding-right: 22px !important; background-position: right 7px center; }
.items-table input, .items-table select, .items-table textarea { width: 100%; padding: 7px 9px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 7px; outline: none; }
.items-table textarea { min-height: 34px; font-size: 12.5px; resize: vertical; margin-top: 4px; color: var(--text-2); }
.items-table input:focus, .items-table select:focus, .items-table textarea:focus { border-color: var(--accent); }
.items-table .drag { color: var(--muted); padding-top: 12px !important; text-align: center; width: 26px; }
.totals-box { display: flex; flex-direction: column; gap: 8px; }
.totals-box .line { display: flex; justify-content: space-between; color: var(--text-2); }
.totals-box .line.grand { color: var(--text); font-weight: 650; font-size: 18px; border-top: 1px solid var(--border-2); padding-top: 10px; margin-top: 4px; }
.product-picker { position: absolute; z-index: 300; background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: var(--shadow); max-height: 260px; overflow: auto; width: 360px; padding: 4px; }
.product-picker div { padding: 8px 10px; border-radius: 7px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.product-picker div:hover { background: var(--surface-2); }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline .ev { display: flex; gap: 10px; font-size: 13px; }
.timeline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: 240px; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: Inter, sans-serif; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bar-list .bar-row { display: grid; grid-template-columns: 160px 1fr 110px; gap: 12px; align-items: center; padding: 7px 0; }
.bar-list .bar { height: 8px; background: var(--surface-3); border-radius: 8px; overflow: hidden; }
.bar-list .bar i { display: block; height: 100%; background: var(--accent); border-radius: 8px; }

/* ---------- Integrations ---------- */
.integ-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.integ-logo { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; flex: none; }
.integ-card p { color: var(--muted); margin: 0; font-size: 13px; flex: 1; }
.code { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 12.5px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; word-break: break-all; color: var(--text-2); }
pre.code { white-space: pre-wrap; margin: 0; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-left { display: flex; flex-direction: column; justify-content: center; padding: 60px; max-width: 520px; margin: 0 auto; width: 100%; }
.auth-right { background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.10), transparent 50%), radial-gradient(circle at 80% 80%, rgba(62,207,142,.18), transparent 45%), #111113; display: flex; flex-direction: column; justify-content: center; padding: 60px; border-left: 1px solid var(--border); }
.auth h1 { font-size: 30px; margin: 22px 0 6px; letter-spacing: -.02em; }
.auth-right h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; max-width: 460px; }
.auth-right ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 12px; color: var(--text-2); }
.auth-right li { display: flex; gap: 10px; align-items: center; }
.auth-right li svg { color: var(--green); width: 18px; }
.mock-card { margin-top: 36px; max-width: 420px; padding: 20px; background: rgba(23,23,27,.8); border: 1px solid var(--border-2); border-radius: 16px; backdrop-filter: blur(8px); }

.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-strong); display: grid; place-items: center; font-weight: 600; font-size: 12.5px; color: #fff; flex: none; }
.pill-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-filter button { padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border-2); background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; }
.pill-filter button.active { background: var(--text); color: #111; border-color: var(--text); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input { max-width: 280px; }
.info-box { padding: 12px 14px; border-radius: 10px; background: var(--accent-bg); border: 1px solid rgba(255,255,255,.1); color: var(--text-2); font-size: 13px; display: flex; gap: 10px; }
.info-box svg { width: 18px; flex: none; color: var(--accent-2); }
.info-box.warn { background: var(--amber-bg); border-color: rgba(255,181,71,.3); } .info-box.warn svg { color: var(--amber); }
.dropzone { border: 1.5px dashed var(--border-2); border-radius: 12px; padding: 28px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-bg); color: var(--text); }
.file-thumb { width: 38px; height: 38px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--text-2); flex: none; }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; }
.kbd { font-size: 11px; padding: 1px 6px; border: 1px solid var(--border-2); border-radius: 5px; color: var(--muted); }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); }

@media (max-width: 1100px) {
  .grid.k4 { grid-template-columns: repeat(2, 1fr); }
  .grid.main-side, .editor { grid-template-columns: 1fr; }
  .editor-side { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 80; left: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .menu-toggle { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .grid.k3, .grid.k2, .form-grid, .form-grid.c3, .form-grid.c4, .settings, .radio-cards { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .settings-nav .h { display: none; }
  .auth { grid-template-columns: 1fr; } .auth-right { display: none; } .auth-left { padding: 32px 16px; }
  .bar-list .bar-row { grid-template-columns: 110px 1fr 90px; }
  .live span { display: none; }
}
@media (max-width: 560px) { .grid.k4 { grid-template-columns: 1fr; } .page-head h1 { font-size: 24px; } }
@media print { .sidebar, .topbar, .page-head .actions { display: none !important; } .shell { display: block; } }

/* ---------- Eigene Steuerelemente (Dropdown, Kalender, Vorschläge) ---------- */
.cx-hidden { display: none !important; }
.cx-select, .cx-date {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 8px 12px; text-align: left; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 9px; color: var(--text); font-size: 14px;
  transition: border-color .12s, box-shadow .12s, background .12s; background-image: none !important;
}
.cx-select:hover:not(:disabled), .cx-date:hover:not(:disabled) { border-color: #4a4a53; }
.cx-select:focus-visible, .cx-date:focus-visible, .cx-select.open, .cx-date.open { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.cx-select:disabled, .cx-date:disabled { cursor: default; opacity: .6; }
.cx-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-placeholder { color: var(--muted); }
.cx-chev { width: 14px !important; height: 14px !important; color: var(--muted); transition: transform .15s; }
.cx-select.open .cx-chev { transform: rotate(180deg); }
.cx-cal { width: 15px !important; height: 15px !important; color: var(--muted); }
.items-table .cx-select { min-height: 34px; padding: 6px 8px; border-color: var(--border); border-radius: 7px; font-size: 13.5px; }
.toolbar .cx-select, .page-head .cx-select { width: auto; min-width: 150px; }

.cx-pop {
  position: fixed; z-index: 300; background: #1c1c21; border: 1px solid var(--border-2); border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .3); animation: cxIn .12s ease-out;
}
@keyframes cxIn { from { opacity: 0; transform: translateY(-4px); } }
.cx-menu { padding: 5px; max-width: min(420px, calc(100vw - 16px)); }
.cx-menu .cx-list { max-height: 280px; overflow-y: auto; }
.cx-search { width: 100%; margin: 0 0 5px; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; outline: none; color: var(--text); }
.cx-search:focus { border-color: var(--accent); }
.cx-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-opt.active { background: var(--surface-3); color: var(--text); }
.cx-opt.sel { color: var(--text); font-weight: 500; }
.cx-opt svg { width: 15px; height: 15px; flex: none; color: var(--text); }
.cx-opt.dis { opacity: .4; cursor: default; }
.cx-empty { padding: 10px; color: var(--muted); font-size: 13px; }

.cx-calendar { width: 292px; padding: 12px; user-select: none; }
.cx-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cx-cal-head button { background: none; border: 0; color: var(--text); cursor: pointer; border-radius: 8px; }
.cx-nav { width: 32px; height: 32px; font-size: 20px; line-height: 1; color: var(--text-2) !important; }
.cx-nav:hover, .cx-title:hover { background: var(--surface-3); }
.cx-title { padding: 6px 10px; font-weight: 600; font-size: 14px; }
.cx-week, .cx-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cx-week span { text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; font-weight: 500; }
.cx-day { height: 34px; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums; }
.cx-day:hover { background: var(--surface-3); }
.cx-day.out { color: #55555e; }
.cx-day.we:not(.sel) { color: var(--text-2); }
.cx-day.out.we { color: #4a4a52; }
.cx-day.today { box-shadow: inset 0 0 0 1px var(--accent); }
.cx-day.focus { background: var(--surface-3); }
.cx-day.sel { background: #e4e4e7; color: #111113; font-weight: 600; }
.cx-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cx-month { padding: 12px 0; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; }
.cx-month:hover { background: var(--surface-3); }
.cx-month.sel { background: #e4e4e7; color: #111113; font-weight: 600; }
.cx-cal-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.cx-link { background: none; border: 0; color: var(--text-2); cursor: pointer; font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.cx-link:hover { background: var(--surface-3); color: var(--text); }

/* ---------- Effekte & Micro-Interactions ---------- */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.4, .64, 1); }

/* Seitenübergang: Inhalte gleiten gestaffelt ein */
.view-enter > * { animation: riseIn .5s var(--ease-out) both; }
.view-enter > *:nth-child(2) { animation-delay: 40ms; } .view-enter > *:nth-child(3) { animation-delay: 80ms; }
.view-enter > *:nth-child(4) { animation-delay: 120ms; } .view-enter > *:nth-child(5) { animation-delay: 160ms; }
.view-enter > *:nth-child(n+6) { animation-delay: 200ms; }
.view-enter .grid > .card { animation: riseIn .55s var(--ease-out) both; }
.view-enter .grid > .card:nth-child(2) { animation-delay: 60ms; } .view-enter .grid > .card:nth-child(3) { animation-delay: 120ms; }
.view-enter .grid > .card:nth-child(4) { animation-delay: 180ms; } .view-enter .grid > .card:nth-child(n+5) { animation-delay: 220ms; }
.view-enter table.t tbody tr { animation: rowIn .45s var(--ease-out) both; animation-delay: calc(var(--r, 0) * 22ms + 140ms); }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-6px); } }

/* Diagramme: Balken wachsen, Linien zeichnen sich */
.view-enter svg.chart rect { transform-box: fill-box; transform-origin: 50% 100%; animation: barGrow .8s var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 150ms); }
.view-enter svg.chart polyline { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: drawLine 1.3s .35s var(--ease-out) forwards; }
.view-enter svg.chart circle { animation: popIn .4s 1.1s var(--ease-spring) both; transform-box: fill-box; transform-origin: center; }
svg.chart rect { transition: opacity .2s, filter .2s; }
svg.chart rect:hover { filter: brightness(1.25); }
@keyframes barGrow { from { transform: scaleY(0); } }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes popIn { from { transform: scale(0); opacity: 0; } }
.bar-list .bar i { transform-origin: left; }
.view-enter .bar-list .bar i { animation: barX .9s .2s var(--ease-out) both; }
@keyframes barX { from { transform: scaleX(0); } }
.progress i { transition: width .8s var(--ease-out); }

/* Karten: sanftes Anheben + Lichtschein, der der Maus folgt */
.card { position: relative; transition: border-color .25s, transform .25s var(--ease-out), box-shadow .25s; }
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .055), transparent 45%);
}
.card:hover::after { opacity: 1; }
.card:hover { border-color: var(--border-2); }
a.card:hover, .kpi.card:hover, .integ-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }

/* Zahlen: Aufleuchten bei Änderung (z. B. neue Zahlung live) */
.value, [data-count] { font-variant-numeric: tabular-nums; }
.value-flash-up { animation: flashUp 1.6s ease-out; }
.value-flash-down { animation: flashDown 1.6s ease-out; }
@keyframes flashUp { 0%, 30% { color: var(--green); text-shadow: 0 0 24px rgba(62, 207, 142, .45); } }
@keyframes flashDown { 0%, 30% { color: var(--red); text-shadow: 0 0 24px rgba(255, 100, 100, .4); } }

/* Neue Live-Buchung in Tabellen */
tr.flash-new td { animation: rowFlash 2.4s ease-out; }
@keyframes rowFlash { 0%, 25% { background: rgba(62, 207, 142, .14); } }

/* Buttons: Druckgefühl + Klickwelle */
.btn, .tab, .pill-filter button, .bank-tile { position: relative; overflow: hidden; }
.btn { transition: background .15s, border-color .15s, transform .12s var(--ease-out), box-shadow .2s, color .15s; }
.btn:active { transform: scale(.97); }
.btn.primary:hover { box-shadow: 0 6px 20px rgba(255, 255, 255, .12); transform: translateY(-1px); }
.btn.primary:active { transform: scale(.97); }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .16; transform: scale(0); animation: ripple .6s var(--ease-out) forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.nav-item { transition: background .15s, color .15s; }
/* Hover ohne Layout-Verschiebung: nur die Beschriftung gleitet (transform statt padding) */
.nav-item > svg + span { transition: transform .2s var(--ease-out); }
.nav-item:hover > svg + span { transform: translateX(3px); }
.nav-item .nav-2l { line-height: 1.25; }
.nav-item.active::before { animation: navBar .35s var(--ease-spring); }
@keyframes navBar { from { transform: scaleY(0); } }
.nav-sub.open { animation: subOpen .3s var(--ease-out); }
@keyframes subOpen { from { opacity: 0; transform: translateY(-4px); } }
.tab { transition: color .2s, border-color .25s; }
.pill-filter button { transition: background .2s, color .2s, border-color .2s; }
table.t tbody tr td { transition: background .15s; }

/* Modals & Seitenleisten: weiches Schließen */
.modal-bg.closing { animation: fadeOut .16s ease-in forwards; }
.modal-bg.closing .modal { animation: popOut .16s ease-in forwards; }
.drawer-bg.closing { animation: fadeOut .2s ease-in forwards; }
.drawer.closing { animation: slideOut .2s ease-in forwards; }
.modal { animation: popIn2 .22s var(--ease-spring); }
@keyframes popIn2 { from { opacity: 0; transform: scale(.96) translateY(8px); } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popOut { to { opacity: 0; transform: scale(.97) translateY(6px); } }
@keyframes slideOut { to { opacity: 0; transform: translateX(40px); } }
.dropdown-menu { transform-origin: top right; }
.dropdown.open .dropdown-menu, .dropdown-menu.dd-floating { animation: menuIn .16s var(--ease-out); }
.dropdown-menu.dd-floating { display: block; z-index: 350; }
@keyframes menuIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } }

/* Toasts: Einfahren, Countdown-Leiste, Ausfahren */
.toast { position: relative; overflow: hidden; cursor: pointer; animation: toastIn .35s var(--ease-spring); }
.toast.leaving { animation: toastOut .26s ease-in forwards; }
.toast-timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .35; transform-origin: left; animation: timer linear forwards; }
.toast.ok .toast-timer { color: var(--green); } .toast.err .toast-timer { color: var(--red); } .toast.info .toast-timer { color: var(--text-2); }
.toast.paused .toast-timer { animation-play-state: paused; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }
@keyframes timer { to { transform: scaleX(0); } }

/* Ladebalken oben */
.top-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 400; background: linear-gradient(90deg, transparent, #e4e4e7); opacity: 0; box-shadow: 0 0 10px rgba(255, 255, 255, .5); pointer-events: none; }
.top-progress.active { opacity: 1; animation: progress 8s cubic-bezier(.1, .7, .2, 1) forwards; }
.top-progress.done { width: 100% !important; animation: none; opacity: 0; transition: width .2s, opacity .35s .2s; }
@keyframes progress { from { width: 0; } to { width: 88%; } }

/* Skeleton-Platzhalter */
.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 10px; }
.skel-title { height: 30px; width: 260px; } .skel-sub { height: 14px; width: 180px; margin-top: 10px; }
.skel-card { height: 104px; border-radius: var(--radius); } .skel-block { height: 320px; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Live-Indikator */
.live.on { border-color: rgba(62, 207, 142, .35); color: var(--text-2); }

/* Bankauswahl */
.bank-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.bank-steps span { font-size: 12.5px; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border-2); color: var(--muted); transition: all .3s; }
.bank-steps span.on { color: #111113; background: #e4e4e7; border-color: #e4e4e7; }
.bank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.bank-tile { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); cursor: pointer; text-align: left; font-size: 13px; min-height: 56px; transition: border-color .2s, transform .2s var(--ease-out), background .2s; animation: riseIn .35s var(--ease-out) both; }
.bank-tile:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface-2); }
.bank-tile img, .bank-ph { width: 30px; height: 30px; border-radius: 8px; background: #fff; object-fit: contain; flex: none; }
.bank-ph { display: grid; place-items: center; color: #111; font-weight: 700; }
.bank-tile.loading { pointer-events: none; opacity: .6; }
.bank-tile.loading::after { content: ''; width: 16px; height: 16px; margin-left: auto; border: 2px solid var(--muted); border-top-color: var(--text); border-radius: 50%; animation: spin .7s linear infinite; }
.bank-tile.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .bank-grid { grid-template-columns: 1fr 1fr; } }

/* Rechtliches im Editor */
.legal-check { border-color: rgba(255, 181, 71, .35); background: linear-gradient(180deg, rgba(255, 181, 71, .06), transparent); }
.legal-check ul, .notice-list { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.legal-check svg { width: 16px; height: 16px; color: var(--amber); vertical-align: -3px; }
.legal-ok { display: flex; gap: 10px; align-items: center; color: var(--green); font-size: 13px; border-color: rgba(62, 207, 142, .3); }
.legal-links { display: flex; gap: 16px; margin-top: 40px; font-size: 12.5px; }
.legal-links a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}

/* ---------- Abo, Tarife, Adminpanel ---------- */
.trial-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 11px; border-radius: 20px; border: 1px solid rgba(90, 169, 255, .35); background: var(--blue-bg); color: var(--blue); text-decoration: none !important; white-space: nowrap; }
.trial-pill svg { width: 13px; height: 13px; }
.cycle-toggle { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); gap: 4px; }
.cycle-toggle button { border: 0; background: none; color: var(--text-2); padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 500; transition: background .2s, color .2s; }
.cycle-toggle button.on { background: #e4e4e7; color: #111113; }
.cycle-toggle button span { font-size: 11px; color: var(--green); margin-left: 4px; }
.cycle-toggle button.on span { color: #15803d; }
.plan-card { text-align: left; padding: 20px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; color: var(--text); background: var(--surface); }
.plan-card.selected { border-color: #e4e4e7; box-shadow: 0 0 0 1px #e4e4e7 inset; }
.plan-card .plan-flag { position: absolute; top: 16px; right: 16px; }
.plan-price { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.plan-price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.dimmed { opacity: .55; }
.upgrade-hero { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-2); }
.upgrade-hero svg { width: 22px; height: 22px; flex: none; color: var(--amber); }
.steps-list { margin: 0; padding-left: 20px; color: var(--text-2); line-height: 1.9; }
.inline-code { display: inline-block; padding: 2px 8px; }

/* ---------- Eigene Checkboxen & Radio-Buttons (statt Browser-Standard) ---------- */
input[type=checkbox], input[type=radio] {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; flex: none; margin: 2px 0 0; padding: 0;
  display: inline-grid; place-content: center; cursor: pointer; vertical-align: middle;
  background: var(--bg-2); border: 1.5px solid #4a4a53; border-radius: 5px;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .12s;
}
input[type=radio] { border-radius: 50%; }
input[type=checkbox]::after {
  content: ''; width: 9px; height: 5px; border-left: 2px solid #111113; border-bottom: 2px solid #111113;
  transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .2s var(--ease-spring, ease);
}
input[type=radio]::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #111113; transform: scale(0); transition: transform .2s var(--ease-spring, ease); }
input[type=checkbox]:checked, input[type=radio]:checked { background: #e4e4e7; border-color: #e4e4e7; }
input[type=checkbox]:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
input[type=radio]:checked::after { transform: scale(1); }
input[type=checkbox]:hover:not(:disabled), input[type=radio]:hover:not(:disabled) { border-color: #a1a1aa; }
input[type=checkbox]:active:not(:disabled), input[type=radio]:active:not(:disabled) { transform: scale(.9); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .5; cursor: default; }
input[type=checkbox]:invalid:not(:checked).touched { border-color: var(--red); }
.check input, .radio-card input { width: 18px; height: 18px; margin-top: 2px; }
/* Schalter behalten ihr eigenes Design */
.switch input { width: 0 !important; height: 0 !important; border: 0 !important; opacity: 0; position: absolute; }

/* Positionsbeschreibung: kein Größen-Anfasser, wächst automatisch mit dem Text */
.items-table textarea { resize: none; overflow: hidden; field-sizing: content; min-height: 34px; }
/* Bankzahlung zuordnen (Rechnung) */
.tx-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); color: var(--text); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.tx-pick:hover { border-color: var(--accent); background: var(--surface-2); }
.tx-pick .grow { flex: 1; min-width: 0; }
.tx-pick .grow small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-pick .match { font-size: 11px; color: var(--green); }
.badge svg { width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; }
