/* kundenverwaltung.eu – Demo */
:root {
  --bg: #F4F6F9; --card: #FFFFFF; --line: #E3E8EF; --line-soft: #EEF2F7;
  --text: #1F2937; --strong: #111827; --muted: #5B6474; --text2: #3D4656;
  --blue: #2563EB; --blue-d: #1D5FD1; --blue-dd: #174EA8; --blue-l: #E6F0FC; --blue-b: #CFE0F8;
  --green: #1E7A46; --green-l: #E3F4EA; --orange: #A4520B; --orange-l: #FDF0E1;
  --red: #B42318; --red-l: #FDECEA; --purple: #6941C6; --purple-l: #F1ECFD;
  --r: 12px; --shadow: 0 1px 2px rgba(17,24,39,.04), 0 8px 24px rgba(17,24,39,.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--blue-d); text-underline-offset: 3px; }
a:hover { color: var(--blue-dd); }
h1, h2, h3 { color: var(--strong); line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 26px; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 .8em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }
.grow { flex: 1; min-width: 0; }
.inline { display: inline; }
:focus-visible { outline: 3px solid #93B8F3; outline-offset: 2px; border-radius: 6px; }
svg { flex: none; }

/* ---------- Demo-Leiste ---------- */
.link-btn { background: none; border: 0; color: #C9D3E1; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; }
.link-btn:hover { color: #fff; }

/* ---------- Grundlayout ---------- */
.app { display: flex; min-height: calc(100vh - 37px); }
.sidebar { width: 252px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--strong); font-weight: 750; font-size: 17px; padding: 4px 8px; letter-spacing: -0.02em; }
.brand:hover { color: var(--strong); }
.brand .tld { color: var(--blue-d); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text2); font-weight: 500; min-height: 42px; }
.nav-link:hover { background: var(--bg); color: var(--strong); }
.nav-link.active { background: var(--blue-l); color: var(--blue-d); font-weight: 600; }
.nav-link .count { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--blue-l); color: var(--blue-d); border-radius: 10px; padding: 1px 8px; }
.nav-link.active .count { background: #fff; }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.plan { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.plan b { color: var(--strong); }
.plan span { color: var(--muted); font-size: 12px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 28px; }
.search { position: relative; flex: 1 1 260px; max-width: 460px; }
.search svg { position: absolute; left: 13px; top: 13px; color: var(--muted); }
.search input { width: 100%; height: 44px; border: 1px solid #DCE2EA; border-radius: 10px; padding: 0 14px 0 40px; font: inherit; background: #fff; color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-btn, .icon-btn.menu-btn { display: none; }
.content { padding: 4px 28px 48px; display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); overflow-y: auto; }
  .sidebar.open { transform: none; }
  .menu-btn, .icon-btn.menu-btn { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .content { padding: 4px 16px 40px; }
  .topbar .btn span { display: none; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid #D3DAE4; background: #fff; color: var(--strong); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #AFC3DE; color: var(--blue-d); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); border-color: var(--blue-d); color: #fff; }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: #F3B6B0; color: var(--red); background: var(--red-l); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.icon-btn { width: 42px; height: 42px; border: 1px solid #DCE2EA; border-radius: 10px; background: #fff; color: var(--text2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { color: var(--blue-d); }
.icon-btn-sm { width: 32px; height: 32px; border-radius: 8px; }

.dropdown { position: relative; }
.dropdown summary { list-style: none; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; display: flex; flex-direction: column; }
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.dropdown-menu a:hover { background: var(--bg); color: var(--blue-d); }

/* ---------- Bausteine ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head p { margin: 4px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head a { font-size: 13px; font-weight: 600; text-decoration: none; }
.card-flush { padding: 0; overflow: hidden; }
.card-blue { background: #EAF2FD; border-color: var(--blue-b); }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col-2 { flex: 2 1 420px; min-width: 0; }
.col-1 { flex: 1 1 300px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--blue-b); color: inherit; }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 700; color: var(--strong); letter-spacing: -0.02em; }
.kpi .sub { font-size: 13px; color: var(--text2); }
.flash { background: var(--green-l); color: #14532D; border: 1px solid #BFE5CC; border-radius: 10px; padding: 11px 14px; display: flex; gap: 10px; align-items: center; }
.empty { padding: 32px 20px; text-align: center; color: var(--muted); }
.notice { background: var(--blue-l); border: 1px solid var(--blue-b); border-radius: 10px; padding: 12px 16px; color: #2B3A52; font-size: 14px; }
.notice-orange { background: var(--orange-l); border-color: #F5D3AE; color: #6B3A08; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.badge-gray { color: var(--text2); background: var(--line-soft); }
.badge-blue { color: var(--blue-d); background: var(--blue-l); }
.badge-green { color: var(--green); background: var(--green-l); }
.badge-orange { color: var(--orange); background: var(--orange-l); }
.badge-red { color: var(--red); background: var(--red-l); }
.badge-purple { color: var(--purple); background: var(--purple-l); }

.avatar { width: 30px; height: 30px; border-radius: 50%; background: #DCEAFB; color: var(--blue-d); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }
.avatar-xl { width: 64px; height: 64px; font-size: 22px; font-weight: 700; }

/* ---------- Tabellen ---------- */
.table-box { position: relative; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: #F9FAFC; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FAFCFF; }
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 700; color: var(--strong); background: #F9FAFC; border-top: 1px solid var(--line); }
.name-cell { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--strong); font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border: 1px solid #DCE2EA; border-radius: 17px; background: #fff; color: var(--text2); font-size: 13px; text-decoration: none; }
.chip:hover { border-color: var(--blue-b); color: var(--blue-d); }
.chip.active { background: var(--blue-l); border-color: var(--blue-b); color: var(--blue-d); font-weight: 600; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--text2); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search]:not(.search input), input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: #fff; border: 1px solid #CBD3DE; border-radius: 9px; padding: 9px 12px; min-height: 42px; width: 100%;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px #D6E5FB; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500 !important; color: var(--text) !important; font-size: 14px !important; min-height: 42px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.form-actions .right-side { margin-left: auto; }
fieldset { border: 0; margin: 0; padding: 0; }

/* ---------- Dashboard ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 120px; align-items: center; gap: 12px; font-size: 13px; }
.bar { height: 10px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; }
.task-list { display: flex; flex-direction: column; }
.task-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.task-item:last-child { border-bottom: 0; }
.task-item input { width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.task-item .t { flex: 1; min-width: 0; }
.task-item.done .t-title { color: var(--muted); text-decoration: line-through; }
.task-item .t-meta { font-size: 12px; color: var(--muted); }
.feed { display: flex; flex-direction: column; gap: 14px; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; }
.feed-ic { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--line-soft); color: var(--text2); }
.feed-ic.blue { background: var(--blue-l); color: var(--blue-d); }
.feed-ic.green { background: var(--green-l); color: var(--green); }
.feed-ic.orange { background: var(--orange-l); color: var(--orange); }
.feed-text { font-size: 14px; color: var(--text); }
.feed-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Pipeline ---------- */
.board-wrap { position: relative; overflow-x: auto; padding-bottom: 8px; }
.board { display: grid; grid-template-columns: repeat(6, minmax(250px, 1fr)); gap: 14px; min-width: 1560px; }
.column { background: #EAEFF5; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; }
.column.drop { outline: 2px dashed var(--blue); outline-offset: -2px; background: #E1EBF8; }
.column-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 0; }
.column-head h2 { font-size: 14px; }
.column-line { height: 4px; border-radius: 2px; }
.deal-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; display: flex; flex-direction: column; gap: 6px; cursor: grab; text-decoration: none; color: inherit; }
.deal-card:hover { border-color: var(--blue-b); color: inherit; box-shadow: var(--shadow); }
.deal-card.dragging { opacity: .5; }
.deal-card .d-title { font-weight: 600; color: var(--strong); font-size: 14px; text-decoration: none; }
.deal-card .d-title:hover { color: var(--blue-d); text-decoration: underline; }
.deal-card .d-firm { font-size: 13px; color: var(--text2); }
.deal-card .d-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.deal-card .d-value { font-weight: 700; color: var(--strong); font-size: 14px; }
.stage-select { display: none; }
@media (hover: none) { .stage-select { display: block; } }

/* ---------- Kontakt-Detail ---------- */
.profile { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.dl { display: grid; gap: 12px; }
.dl div { display: flex; flex-direction: column; gap: 2px; }
.dl dt { font-size: 12px; color: var(--muted); }
.dl dd { margin: 0; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; padding: 0 12px; }
.tabs a { padding: 13px 12px; text-decoration: none; color: var(--text2); border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.tabs a.active { color: var(--blue-d); border-bottom-color: var(--blue); font-weight: 600; }
.note-box { background: #F9FAFC; border: 1px solid var(--line-soft); border-radius: 9px; padding: 9px 12px; margin-top: 6px; white-space: pre-line; }

/* ---------- Kalender ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-h { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; background: #F9FAFC; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-d { min-height: 112px; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-d.other { background: #FAFBFC; }
.cal-d.other .cal-n { color: #A7B0BD; }
.cal-n { font-size: 13px; font-weight: 600; color: var(--text2); }
.cal-d.today .cal-n { background: var(--blue); color: #fff; border-radius: 10px; padding: 0 7px; align-self: flex-start; }
.cal-e { font-size: 12px; border-radius: 5px; padding: 2px 6px; background: var(--blue-l); color: var(--blue-dd); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-e.task { background: var(--orange-l); color: #7A3C05; }
@media (max-width: 760px) { .cal-d { min-height: 70px; } .cal-e { font-size: 10px; } }

/* ---------- Belege ---------- */
.items td { vertical-align: top; }
.items input, .items select { min-height: 38px; padding: 7px 9px; }
.items .w-qty { width: 90px; }
.items .w-unit { width: 100px; }
.items .w-price { width: 130px; }
.items .w-vat { width: 100px; }
.totals { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 16px 22px; }
.totals div { display: flex; gap: 32px; }
.totals span:last-child { min-width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 18px; font-weight: 700; color: var(--strong); border-top: 1px solid var(--line); padding-top: 8px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #CBD3DE; border-radius: 10px; padding: 11px 13px; cursor: pointer; }
.radio-card input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--blue); }
.radio-card:has(input:checked) { border: 2px solid var(--blue); padding: 10px 12px; background: #F3F8FE; }
.radio-card b { display: block; color: var(--strong); font-size: 14px; }
.radio-card small { color: var(--text2); font-size: 12px; }

/* ---------- Berichte ---------- */
.vbars { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 10px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.vbar i { display: block; width: 100%; max-width: 46px; background: var(--blue); border-radius: 6px 6px 0 0; min-height: 2px; }
.vbar i.light { background: #A9C8F5; }
.vbar span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.vbar b { font-size: 11px; color: var(--text2); font-weight: 600; white-space: nowrap; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Automationen ---------- */
.auto { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.auto:last-child { border-bottom: 0; }
.auto .flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); margin-top: 6px; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; background: #CBD3DE; border-radius: 13px; transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px #93B8F3; }

/* ---------- Einrichtung ---------- */
.setup-body { background: linear-gradient(#fff, var(--bg) 320px); }
.setup { max-width: 820px; margin: 0 auto; padding: 40px 20px 60px; display: flex; flex-direction: column; gap: 16px; }
.brand-lg { font-size: 22px; padding: 0; align-self: flex-start; margin-bottom: 12px; }
.setup h1 { font-size: 30px; }
.setup-card { padding: 8px 28px 28px; box-shadow: var(--shadow); }
.step { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.step h2 { margin-bottom: 10px; font-size: 17px; }
.step-no { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-l); color: var(--blue-d); font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label { display: flex; align-items: center; gap: 10px; border: 1px solid #CBD3DE; border-radius: 10px; padding: 12px 14px; cursor: pointer; font-weight: 500; min-height: 50px; height: 100%; }
.choice input:checked + label { border: 2px solid var(--blue); background: #F3F8FE; padding: 11px 13px; color: var(--blue-dd); }
.choice input:focus-visible + label { box-shadow: 0 0 0 3px #D6E5FB; }
.setup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 22px; }

/* ---------- Hilfe ---------- */
.help-btn { background: #fff; }
.help-btn svg { color: var(--blue); }
.help-panel { width: min(400px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; padding: 18px 18px 12px; font-size: 14px; line-height: 1.55; color: var(--text); display: block; }
.help-panel h2 { font-size: 16px; margin: 0 0 6px; }
.help-panel p { margin: 0 0 10px; }
.help-steps { margin: 0 0 12px; padding-left: 1.3em; display: grid; gap: 6px; }
.help-steps li::marker { color: var(--blue); font-weight: 700; }
.help-tip { display: flex; gap: 8px; align-items: flex-start; background: var(--blue-l); color: var(--blue-dd); border-radius: 10px; padding: 9px 11px; font-size: 13px; }
.help-tip svg { flex: none; margin-top: 2px; }
.dropdown-menu a.help-all { border-top: 1px solid var(--line); border-radius: 0; margin-top: 4px; padding: 10px 0 4px; color: var(--blue-d); font-weight: 600; }
.help-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.help-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.help-item summary { cursor: pointer; padding: 10px 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: "+"; color: var(--blue); font-size: 18px; font-weight: 500; }
.help-item[open] summary::after { content: "–"; }
.help-body { padding: 0 14px 12px; font-size: 14px; line-height: 1.55; }
.help-body > p { margin: 0 0 8px; }
@media (max-width: 760px) { .help-btn span { display: none; } .help-drop { position: static; } .help-drop .dropdown-menu { left: 12px; right: 12px; top: calc(100% - 4px); width: auto; max-height: 72vh; } }

/* ---------- Anmeldung, Einrichtung ---------- */
.auth-body { background: linear-gradient(#fff, var(--bg) 360px); min-height: 100vh; }
.auth { max-width: 440px; margin: 0 auto; padding: 48px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.auth-wide { max-width: 720px; }
.auth-brand { display: flex; align-items: center; gap: 12px; justify-content: center; font-weight: 800; font-size: 22px; color: var(--strong); letter-spacing: -.01em; margin-bottom: 4px; }
.auth-brand .tld { color: var(--blue); }
.auth-card { padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; }
.auth-card h2 { font-size: 16px; margin: 6px 0 12px; }
.auth-card section { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.auth-card > p.muted { margin: 0 0 18px; }
.auth-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--blue-l); color: var(--blue); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.center { text-align: center; }
.btn-block { width: 100%; justify-content: center; }
.form-error { background: var(--red-l); color: var(--red); border: 1px solid #F3B6B0; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.mono, .secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.code-input { font-size: 26px; letter-spacing: .3em; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 12px; }
.notice { display: flex; gap: 10px; align-items: flex-start; }
.notice svg { flex: none; margin-top: 2px; color: var(--blue); }
.checks { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; }
.checks summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.checks ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks li.ok svg { color: var(--green); } .checks li.bad { color: var(--red); }

/* ---------- Konto, Zwei-Faktor ---------- */
.codes-box { border: 1px solid #F5D3AE; background: var(--orange-l); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.codes-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.codes { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; }
.codes li { background: #fff; border: 1px solid #F5D3AE; border-radius: 8px; padding: 8px 10px; text-align: center; letter-spacing: .05em; }
.setup-steps { padding-left: 1.3em; margin: 0 0 12px; display: grid; gap: 6px; }
.qr-wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin: 4px 0 18px; }
.qr { border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: #fff; line-height: 0; }
.qr svg { width: 200px; height: 200px; }
.secret { display: inline-block; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; word-break: break-all; }
.card .link-btn, .auth .link-btn { color: var(--blue-d); padding: 0; }
.card .link-btn:hover { color: var(--blue-dd); text-decoration: underline; }
.log-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.log-list li { display: flex; flex-direction: column; border-left: 3px solid var(--green); padding-left: 10px; }
.log-list li.warn { border-left-color: var(--orange); }

/* ---------- Benutzer ---------- */
.row-muted td { opacity: .6; }
.roles { margin: 0; display: grid; gap: 4px; font-size: 13.5px; }
.roles dt { font-weight: 700; margin-top: 6px; }
.roles dd { margin: 0; color: var(--muted); }
.notice-card { border-color: var(--blue-b); background: #F7FAFF; margin-bottom: 16px; }
.notice-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.notice-card input { width: 100%; }
.danger-card { border-color: #F3B6B0; }
.danger-card h2 { color: var(--red); margin: 0 0 6px; }

/* ---------- Benutzermenü ---------- */
.user-drop summary { list-style: none; cursor: pointer; }
.user-drop summary::-webkit-details-marker { display: none; }
.user-btn { display: block; border-radius: 50%; }
.user-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; display: flex; flex-direction: column; }
.user-head span { font-size: 12.5px; color: var(--muted); }
.dropdown-menu form { margin: 0; }
.dropdown-menu form button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 8px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.dropdown-menu form button:hover { background: var(--bg); color: var(--red); }
@media print { .sidebar, .topbar, .card:not(.codes-print) { box-shadow: none; } .sidebar, .topbar, form, .btn { display: none !important; } }

/* ---------- Belege ---------- */
.checklist { background: var(--orange-l); border: 1px solid #F5D3AE; border-radius: 10px; padding: 10px 12px; color: #6B3A08; }
.checklist ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.checklist li { display: flex; gap: 6px; align-items: flex-start; }
.checklist li svg { flex: none; margin-top: 2px; }
.danger-zone { border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 4px; }
.danger-zone summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.danger-zone[open] summary { margin-bottom: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.logo-preview { display: flex; align-items: center; gap: 14px; margin: 4px 0 8px; }
.logo-preview img { max-height: 48px; max-width: 200px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.notice-orange svg { color: var(--orange); }
.card-head h2 svg { vertical-align: -3px; color: var(--blue); }

/* ---------- Belegeingang ---------- */
[hidden] { display: none !important; }
.upload-card { padding: 0; overflow: hidden; margin-bottom: 16px; }
.dropzone { border: 2px dashed var(--blue-b); border-radius: 14px; margin: 16px; padding: 26px 18px; text-align: center; background: #F8FBFF; transition: background .15s, border-color .15s; }
.dropzone.drag { background: var(--blue-l); border-color: var(--blue); }
.dz-icon { color: var(--blue); margin-bottom: 6px; }
.dz-title { font-weight: 700; font-size: 16px; margin: 0 0 4px; color: var(--strong); }
.dropzone .actions { margin-top: 12px; }
.dropzone label.btn { cursor: pointer; }
.camera-btn { display: none; }
@media (hover: none) and (pointer: coarse) { .camera-btn { display: inline-flex; } }
.progress { margin: 16px auto 0; max-width: 520px; text-align: left; }
.progress .bar { height: 8px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.progress span { font-size: 13px; color: var(--muted); display: block; margin-top: 6px; }
.upload-log { list-style: none; margin: 10px auto 0; padding: 0; max-width: 620px; max-height: 180px; overflow: auto; text-align: left; }
.upload-log li { padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
.upload-log li.ok { color: var(--green); }
.upload-log li.skip { color: var(--orange); }
.inbox-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line-soft); background: var(--bg); }
.learned { display: inline-block; font-size: 11px; font-weight: 600; color: var(--purple); background: var(--purple-l); border-radius: 6px; padding: 1px 6px; vertical-align: 1px; }
.trunc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
#receipts-table .name-cell { display: inline-flex; }
#receipts-table td > .small { display: block; margin-left: 26px; }
.receipt-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.receipt-preview { position: sticky; top: 12px; height: calc(100vh - 120px); min-height: 480px; background: #fff; display: flex; align-items: center; justify-content: center; }
.receipt-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.receipt-preview iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 1100px) { .receipt-layout { grid-template-columns: minmax(0, 1fr); } .receipt-preview { position: static; height: 60vh; } }
.receipt-form h3 { font-size: 15px; }
.vat-lines input, .vat-lines select { width: 100%; min-width: 0; }
.vat-lines td { padding: 6px 6px; }
[data-conf="prüfen"] input, [data-conf="prüfen"] select { border-color: #F0B66B; background: #FFFBF4; }
[data-conf="sicher"] input, [data-conf="sicher"] select { border-color: #A6D9B9; }
[data-conf="ki"] input, [data-conf="vorschlag"] select, [data-conf="gelernt"] select { border-color: #CBB8F5; }
.conf-chip[data-conf="sicher"]::after { content: "sicher erkannt"; font-size: 11px; color: var(--green); background: var(--green-l); border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.conf-chip[data-conf="prüfen"]::after { content: "bitte prüfen"; font-size: 11px; color: var(--orange); background: var(--orange-l); border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.conf-chip[data-conf="ki"]::after { content: "KI"; font-size: 11px; color: var(--purple); background: var(--purple-l); border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.tool-status { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.tool-status li { display: flex; gap: 6px; align-items: center; }
.tool-status li svg { color: var(--green); }
.tool-status li.bad { color: var(--orange); }
.tool-status li.bad svg { color: var(--orange); }
.bank-table .bank-action { min-width: 340px; }
.bank-action .actions { gap: 6px; }
.bank-action select { width: auto; }
#receipts-table tr.loading td { opacity: .5; }
@media (max-width: 600px) { .vat-lines { min-width: 420px; } .receipt-layout .card { padding: 16px; } .bank-table .bank-action { min-width: 260px; } }
.items .w-type { width: 118px; }
.items .w-disc { width: 84px; }
.items tr[data-type="text"] [name="qty[]"], .items tr[data-type="text"] [name="unit[]"], .items tr[data-type="text"] [name="price[]"], .items tr[data-type="text"] [name="disc[]"], .items tr[data-type="text"] [name="vat[]"] { visibility: hidden; }
.items tr[data-type="text"] [name="desc[]"] { font-weight: 600; }
.items tr[data-type="optional"] td, .items tr[data-type="alternative"] td { background: #FAFBFD; }
.items tr[data-type="optional"] [data-line], .items tr[data-type="alternative"] [data-line] { color: var(--muted); }
.tpl-select { display: inline-block; width: auto; min-height: 0; padding: 2px 6px; font-size: 12px; margin-left: 8px; font-weight: 400; }
.tpl-link { font-size: 12px; font-weight: 400; margin-left: 8px; }

/* ---------- Kundenportal ---------- */
.portal-body { background: var(--bg); min-height: 100vh; }
.portal { max-width: 860px; margin: 0 auto; padding: 28px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.portal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.portal-logo { max-height: 46px; max-width: 220px; }
.portal-firm { font-size: 20px; color: var(--strong); }
.portal-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.portal-title h1 { font-size: 24px; margin: 2px 0; }
.row-option td { background: #FAFBFD; }
.row-text td { background: transparent; }
.portal-accept { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.portal-accept h2 { font-size: 18px; margin: 0 0 12px; }
.portal-pay { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.portal-pay .qr svg { width: 180px; height: 180px; }
.portal-pay h2 { margin: 0 0 6px; }
.portal-files { justify-content: center; }

/* ---------- Protokoll & Betrieb ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px 16px; margin-bottom: 14px; }
.filter-bar .field { min-width: 150px; flex: 0 1 190px; }
.pager { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.change-table details summary { cursor: pointer; color: var(--blue-d); }
table.diff { border-collapse: collapse; margin-top: 6px; font-size: 12.5px; }
table.diff th { text-align: left; font-weight: 600; padding: 3px 10px 3px 0; color: var(--text2); vertical-align: top; white-space: nowrap; }
table.diff td { padding: 3px 8px; vertical-align: top; word-break: break-word; max-width: 320px; }
table.diff td.old { background: var(--red-l); color: var(--red); text-decoration: line-through; border-radius: 4px 0 0 4px; }
table.diff td.new { background: var(--green-l); color: var(--green); border-radius: 0 4px 4px 0; }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ops-grid .kpi .value { font-size: 18px; }
.backup-list { list-style: none; margin: 0; padding: 0; }
.backup-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; flex-wrap: wrap; }

/* ---------- CRM-Ausbau ---------- */
.board { grid-template-columns: repeat(var(--cols, 6), minmax(250px, 1fr)); min-width: calc(var(--cols, 6) * 264px); }
.tabs.tabs-plain { padding: 0; margin-bottom: 12px; }
.pipeline-filter { border: 0; padding: 0 0 12px; }
.pipeline-filter select { width: auto; min-width: 180px; }
.forecast { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; }
.fc-col { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.fc-bars { position: relative; width: 100%; max-width: 70px; height: 110px; display: flex; align-items: flex-end; justify-content: center; }
.fc-bars i { position: absolute; bottom: 0; width: 100%; border-radius: 6px 6px 2px 2px; }
.fc-v { background: #D5E3F8; }
.fc-w { background: #2F74E0; width: 56% !important; }
.fc-col b { font-size: 13px; }
@media (max-width: 640px) { .forecast { grid-template-columns: repeat(3, 1fr); row-gap: 18px; } }
.file-list { list-style: none; margin: 0 0 12px; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.file-list li a { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; min-width: 0; overflow-wrap: anywhere; flex: 1 1 180px; }
.file-list li form { margin-left: auto; }
.file-drop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border: 1.5px dashed #C9D4E2; border-radius: 10px; }
.file-drop.drag { border-color: var(--blue); background: var(--blue-l); }
.file-drop label.btn { cursor: pointer; }
.saved-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.saved-filters:empty { display: none; }
.chip-saved { gap: 4px; padding-right: 4px; }
.chip-saved a { color: inherit; text-decoration: none; display: inline-flex; gap: 5px; align-items: center; }
.chip-x { border: 0; background: none; font-size: 16px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 10px; }
.chip-x:hover { background: var(--red-l); color: var(--red); }
.save-filter { display: inline-flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.save-filter input[name=name] { width: 170px; min-height: 34px; }
.list-filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: flex-end; background: #FAFBFD; }
.list-filters .field { flex: 0 1 170px; min-width: 140px; }
.list-filters .field label { font-size: 12px; }
.table th a.sort { color: inherit; text-decoration: none; white-space: nowrap; }
.table th a.sort:hover { color: var(--blue-d); }
.table th a.sort.on::after { content: ' ▲'; font-size: 10px; }
.table th a.sort.on.desc::after { content: ' ▼'; }
.dup-box { border: 1px solid #F3D19C; background: #FFF8EC; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.dup-box ul { margin: 6px 0 10px; padding-left: 18px; }
.dup-group { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dup-group:last-child { border-bottom: 0; }
.dup-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 10px 0; }
.dup-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.dup-card label { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.readonly-bar { background: #FFF4E5; color: #8A4B08; border-bottom: 1px solid #F3D19C; padding: 9px 20px; font-size: 13.5px; text-align: center; }
/* Kalender Woche/Tag */
.cal-views { display: inline-flex; border: 1px solid #DCE2EA; border-radius: 9px; overflow: hidden; }
.cal-views a { padding: 6px 12px; font-size: 13px; text-decoration: none; color: var(--text2); background: #fff; }
.cal-views a + a { border-left: 1px solid #DCE2EA; }
.cal-views a.active { background: var(--blue-l); color: var(--blue-d); font-weight: 600; }
.week { display: grid; grid-template-columns: 56px repeat(7, minmax(84px, 1fr)); min-width: 660px; }
.week.day { grid-template-columns: 56px 1fr; min-width: 0; }
.week-h.allday-label { font-size: 10.5px; font-weight: 500; color: var(--muted); padding: 8px 2px; }
.week-h { padding: 8px 6px; font-size: 12.5px; font-weight: 600; text-align: center; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.week-h.today { color: var(--blue-d); }
.week-h a { color: inherit; text-decoration: none; }
.week-allday { grid-column: 1 / -1; display: grid; grid-template-columns: inherit; border-bottom: 1px solid var(--line); }
.week-col { position: relative; border-left: 1px solid var(--line-soft); height: calc(var(--hours) * 48px); }
.week-col.today { background: #F7FAFF; }
.week-times { position: relative; height: calc(var(--hours) * 48px); }
.week-times span { position: absolute; right: 6px; font-size: 11px; color: var(--muted); transform: translateY(-6px); }
.week-times span:first-child { transform: none; top: 2px !important; }
.week-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); }
.week-ev { position: absolute; left: 3px; right: 3px; background: #E6F0FC; border-left: 3px solid var(--blue); border-radius: 6px; padding: 3px 6px; font-size: 12px; overflow: hidden; line-height: 1.3; text-decoration: none; color: var(--text); }
.week-ev.task { background: #FDF0E1; border-left-color: #E08A1E; }
.week-ev small { display: block; color: var(--muted); }
.week-allday-cell { padding: 4px; min-height: 28px; display: flex; flex-direction: column; gap: 3px; border-left: 1px solid var(--line-soft); }
.week-allday-cell .cal-e { font-size: 11.5px; }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid #E5484D; z-index: 1; }
.field-highlight input { border-color: #E08A1E; box-shadow: 0 0 0 3px #FDF0E1; }

/* ---------- Schnellsuche Strg+K ---------- */
.search { position: relative; }
.kbd-hint { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 0; display: flex; gap: 3px; cursor: pointer; }
kbd { display: inline-block; min-width: 20px; padding: 1px 5px; border: 1px solid #DCE2EA; border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 600 11px/1.5 inherit; color: var(--text2); text-align: center; }
@media (max-width: 760px) { .kbd-hint { display: none; } }
.palette { position: fixed; inset: 0; z-index: 90; background: rgba(17, 24, 39, .38); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.palette[hidden] { display: none !important; }
.palette-box { width: 100%; max-width: 620px; background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(17, 24, 39, .3); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { border: 0; outline: 0; box-shadow: none; padding: 4px 0; font-size: 16px; flex: 1; min-height: 0; background: none; }
.palette-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.palette-group { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.palette-item a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); align-items: baseline; }
.palette-item a span { color: var(--muted); font-size: 12.5px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.palette-item.sel a { background: var(--blue-l); }
.palette-item.sel a b { color: var(--blue-d); }
.palette-empty { padding: 18px; color: var(--muted); text-align: center; }
.palette-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); background: #FAFBFD; flex-wrap: wrap; }
body.palette-open { overflow: hidden; }
@media (min-width: 761px) { .search input[type=search] { padding-right: 76px; } }

/* ---------- Steuer-Ampel & Liquidität ---------- */
.ampel { list-style: none; margin: 0; padding: 0; }
.ampel li a { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.ampel li.sel a, .ampel li a:hover { background: var(--blue-l); }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-green { background: #1E9E5A; } .dot-red { background: #E5484D; } .dot-orange { background: #F08A24; } .dot-yellow { background: #F2C94C; } .dot-blue { background: #A9C8F5; }
.uva-table td.mono { font-variant-numeric: tabular-nums; color: var(--text2); }
.uva-total td { font-weight: 700; border-top: 2px solid var(--line); }
.liq-wrap { width: 100%; overflow-x: auto; }
.liq-chart { width: 100%; min-width: 560px; height: auto; display: block; }
.liq-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.liq-form .field { flex: 1 1 180px; }
.progress { height: 12px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 6px; transition: width .3s; }
.mail-pre { white-space: pre-wrap; font-family: inherit; background: #FAFBFD; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0; overflow-wrap: anywhere; }
.recipient-list { list-style: none; padding: 0; margin: 6px 0; }
.recipient-list li { padding: 3px 0; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.code-block { background: #0F172A; color: #E2E8F0; border-radius: 10px; padding: 14px 16px; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; margin: 8px 0; }
.alert-link { text-decoration: none; margin-bottom: 12px; align-items: center; } .alert-link span { flex: 1; } .alert-link:hover { filter: brightness(.98); }
.dot-gray { background: #D5DBE3; }

/* ---------- Reiter in den Einstellungen ---------- */
.settings-tabs { margin: 0 0 18px; padding: 0; background: transparent; scrollbar-width: none; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tabs a { display: inline-flex; align-items: center; gap: 7px; }
.settings-tabs a svg { opacity: .75; }
.settings-tabs a.active svg { opacity: 1; }
.tab-pane > .card:first-child, .tab-pane > form:first-child { margin-top: 0; }
.tab-pane[hidden] { display: none !important; }
.settings-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.settings-links .card-link { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 16px 18px; text-decoration: none; color: var(--text); }
.settings-links .card-link .feed-ic { grid-row: 1 / 3; }
.settings-links .card-link:hover { border-color: var(--blue-b); }

/* ---------- Ladeanzeige in Knöpfen ---------- */
.btn.is-loading { position: relative; pointer-events: none; opacity: .85; }
.btn.is-loading > svg { visibility: hidden; width: 16px; }
.btn.is-loading::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: kv-spin .7s linear infinite; flex: none; }
.btn.is-loading > svg:first-child { display: none; }
.icon-btn.is-loading > svg { visibility: hidden; }
.icon-btn.is-loading { position: relative; }
.icon-btn.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--blue); border-right-color: transparent; animation: kv-spin .7s linear infinite; }
@keyframes kv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::before, .icon-btn.is-loading::after { animation-duration: 2s; } }
.profile > .grow { flex: 1 1 280px; } .profile > .actions { flex-wrap: wrap; }

/* ---------- Live-Demo (nur im Demo-Paket aktiv) ---------- */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 8px 18px; background: #1D5FD1; color: #fff; font-size: 13.5px; }
.demo-bar svg { vertical-align: -3px; }
.demo-bar-actions { display: flex; gap: 14px; align-items: center; }
.demo-bar a { color: #fff; font-weight: 600; }
.demo-bar .demo-buy { background: #fff; color: #1D5FD1; border-radius: 8px; padding: 4px 12px; text-decoration: none; }
.demo-lobby h2 { font-size: 16px; margin: 6px 0 0; }
.demo-branches { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.demo-countries { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.demo-branches .radio-card b svg { vertical-align: -3px; color: var(--blue); }
@media (max-width: 600px) { .demo-countries { grid-template-columns: 1fr; } }
