/* Digipfy Rechnungen: Oberfläche */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  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-display: swap; font-weight: 100 900; src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  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: #f4f5f8; --card: #ffffff; --ink: #0f172a; --text: #1e293b; --muted: #64748b; --faint: #94a3b8;
  --line: #e6e8ee; --line2: #d5d9e1; --hover: #f8fafc;
  --brand: #2f5bea; --brand-600: #2449c9; --brand-50: #eef2fe; --brand-100: #dde5fd;
  --ok: #15803d; --ok-50: #ecfdf3; --warn: #b45309; --warn-50: #fff7e8; --bad: #c0262d; --bad-50: #fef2f2; --violet: #6d28d9; --violet-50: #f3f0ff;
  --nav: #0b1220; --nav-2: #141d31; --nav-text: #a9b4c9;
  --r: 12px; --r-sm: 8px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05); --sh-2: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04); --sh-3: 0 12px 32px rgba(16,24,40,.14);
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; font: 14px/1.5 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-feature-settings: 'cv11', 'ss01'; background: var(--bg); color: var(--text); }
a { color: var(--brand); text-decoration: none; }
.ic { width: 16px; height: 16px; flex: 0 0 auto; stroke-width: 2; vertical-align: -3px; }
.ic.lg { width: 20px; height: 20px; }

/* Layout */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
nav { background: var(--nav); color: var(--nav-text); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
nav .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; padding: 2px 10px 22px; letter-spacing: -.01em; }
nav .brand .logo { width: 30px; height: 30px; display: grid; place-items: center; }
.logo img { height: 100%; width: auto; display: block; }
nav .brand small { display: block; font-weight: 500; font-size: 11.5px; color: #7f8aa3; margin-top: -2px; }
nav .new { margin: 0 4px 14px; }
nav .new .btn { width: 100%; justify-content: center; }
nav a { display: flex; align-items: center; gap: 11px; color: var(--nav-text); padding: 8px 11px; border-radius: 8px; margin-bottom: 2px; font-weight: 500; font-size: 13.5px; position: relative; transition: background .12s, color .12s; }
nav a .ic { opacity: .85; }
nav a:hover { background: var(--nav-2); color: #fff; }
nav a.active { background: rgba(79,123,255,.16); color: #fff; }
nav a.active::before { content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: #6f93ff; }
nav a .pill { margin-left: auto; background: #c0262d; color: #fff; font-size: 11px; padding: 0 7px; border-radius: 99px; line-height: 18px; }
.nav-sep { height: 1px; background: #1b2539; margin: 12px 8px; }
.nav-foot { margin-top: auto; padding: 12px 10px 0; font-size: 11.5px; color: #5f6b84; }
main { padding: 28px 34px 70px; max-width: 1280px; width: 100%; }

/* Page header */
.ph { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.ph h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin: 0; display: flex; align-items: center; gap: 10px; }
.ph .sub { color: var(--muted); margin-top: 3px; font-size: 13.5px; }
.ph .spacer { flex: 1; }
.ph .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--brand); }
h2 { font-size: 15px; font-weight: 650; margin: 0 0 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
h2 .spacer { flex: 1; }
h3 { font-size: 11.5px; margin: 18px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 16px; box-shadow: var(--sh-1); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 16px 20px 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--sh-1); display: block; color: inherit; transition: box-shadow .15s, transform .15s, border-color .15s; }
a.kpi:hover { box-shadow: var(--sh-2); transform: translateY(-1px); border-color: var(--line2); }
.kpi .top { display: flex; align-items: center; justify-content: space-between; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .chip { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.kpi .chip.ok { background: var(--ok-50); color: var(--ok); } .kpi .chip.warn { background: var(--warn-50); color: var(--warn); } .kpi .chip.bad { background: var(--bad-50); color: var(--bad); }
.kpi .value { font-size: 23px; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Tables */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; background: #fafbfc; }
.card table th:first-child, .card table td:first-child { padding-left: 20px; }
.card table th:last-child, .card table td:last-child { padding-right: 20px; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; transition: background .1s; } tr.click:hover td { background: var(--hover); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; }
td .strong { font-weight: 600; color: var(--ink); }
td .sub { font-size: 12.5px; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border: 1px solid var(--line2); background: #fff; color: var(--text); border-radius: var(--r-sm);
  padding: 0 14px; font: inherit; font-weight: 550; font-size: 13.5px; cursor: pointer; white-space: nowrap; box-shadow: var(--sh-1); transition: background .12s, border-color .12s, box-shadow .12s, transform .06s, color .12s; }
.btn:hover { background: var(--hover); border-color: #b8c0cd; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 1px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.08), inset 0 1px 0 rgba(255,255,255,.12); }
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); box-shadow: 0 4px 12px rgba(47,91,234,.3); }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.success:hover { background: #126c33; box-shadow: 0 4px 12px rgba(21,128,61,.28); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--bad); } .btn.danger:hover { background: var(--bad-50); border-color: #f3b9bc; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; } .btn.ghost:hover { background: rgba(15,23,42,.05); }
.btn.icon { width: 36px; padding: 0; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; } .btn.small.icon { width: 30px; padding: 0; }
.btn.lg { height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; }
.btn-group .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; padding: 0 9px; }
.btn-group .btn.primary:not(:first-child) { border-left-color: rgba(255,255,255,.25); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; padding: 2px 9px 2px 8px; border-radius: 99px; background: #f1f5f9; color: #475569; white-space: nowrap; line-height: 18px; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--ok-50); color: var(--ok); } .badge.warn { background: var(--warn-50); color: var(--warn); }
.badge.bad { background: var(--bad-50); color: var(--bad); } .badge.info { background: var(--brand-50); color: var(--brand); }
.badge.violet { background: var(--violet-50); color: var(--violet); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: #f1f5f9; color: #475569; letter-spacing: .02em; }

/* Forms */
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
label.check { display: flex; gap: 9px; align-items: center; color: var(--text); font-size: 13.5px; margin: 0; font-weight: 450; cursor: pointer; }
label.check input { width: 16px; height: 16px; accent-color: var(--brand); }
input, select, textarea { width: 100%; font: inherit; font-size: 13.5px; padding: 0 11px; height: 36px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: #fff; color: var(--text); box-shadow: var(--sh-1); transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 64px; padding: 8px 11px; height: auto; resize: vertical; line-height: 1.45; }
select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
input:hover, select:hover, textarea:hover { border-color: #b8c0cd; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
input:disabled, select:disabled, textarea:disabled { background: #f8fafc; color: #334155; box-shadow: none; }
input[type=file] { height: auto; padding: 6px; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g5 { grid-template-columns: repeat(5, 1fr); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; }
.row { display: flex; gap: 8px; align-items: center; } .row > .grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: var(--faint); margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: var(--brand-50); color: #1e3a8a; margin-bottom: 14px; border: 1px solid var(--brand-100); }
.notice .ic { margin-top: 2px; }
.notice.warn { background: var(--warn-50); color: #7c2d12; border-color: #fde5b8; }
.notice.bad { background: var(--bad-50); color: #7f1d1d; border-color: #f8cdd0; }
.notice.ok { background: var(--ok-50); color: #14532d; border-color: #bbf0cf; }

/* Toast, modal */
#toast { position: fixed; right: 22px; bottom: 22px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; max-width: 460px; display: none; z-index: 60; white-space: pre-line; box-shadow: var(--sh-3); font-weight: 500; animation: pop .18s ease-out; }
#toast.err { background: var(--bad); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px; z-index: 50; overflow: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 660px; padding: 24px; box-shadow: var(--sh-3); animation: pop .18s ease-out; }
.modal.wide { max-width: 920px; }
.modal h2 { font-size: 18px; margin-bottom: 18px; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal .foot .grow { flex: 1; }

/* Tabs, filters, dropdown */
.tabs { display: flex; gap: 2px; margin-bottom: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 14px; font: inherit; font-size: 13.5px; font-weight: 550; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .active { color: var(--brand); border-bottom-color: var(--brand); }
.split { display: grid; grid-template-columns: 238px 1fr; gap: 18px; align-items: start; }
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; position: sticky; top: 14px; box-shadow: var(--sh-1); }
.filters a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.filters a .ic { color: var(--faint); }
.filters a.active, .filters a:hover { background: var(--brand-50); color: var(--brand); } .filters a.active .ic, .filters a:hover .ic { color: var(--brand); }
.filters .sep { height: 1px; background: var(--line); margin: 6px 6px; }
.filters .count { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.filters .count.bad { color: var(--bad); font-weight: 600; }
.searchbox { position: relative; } .searchbox .ic { position: absolute; left: 11px; top: 10px; color: var(--faint); } .searchbox input { padding-left: 34px; }
.dropdown { position: relative; display: inline-flex; }
.dropdown .menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); min-width: 240px; z-index: 30; padding: 6px; display: none; }
.dropdown.left .menu { left: 0; right: auto; }
.dropdown.open .menu { display: block; animation: pop .12s ease-out; }
.dropdown .menu a, .dropdown .menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; color: var(--text); background: none; border: 0; font: inherit; font-size: 13.5px; cursor: pointer; }
.dropdown .menu a .ic, .dropdown .menu button .ic { color: var(--muted); }
.dropdown .menu a:hover, .dropdown .menu button:hover { background: var(--brand-50); color: var(--brand); }
.dropdown .menu a:hover .ic, .dropdown .menu button:hover .ic { color: var(--brand); }
.dropdown .menu .sep { height: 1px; background: var(--line); margin: 5px 4px; }
.dropdown .menu .danger { color: var(--bad); } .dropdown .menu .danger:hover { background: var(--bad-50); color: var(--bad); }

/* Chart */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; margin: 8px 0 26px; border-bottom: 1px solid var(--line); }
.bars .m { flex: 1; display: flex; gap: 3px; align-items: flex-end; height: 100%; position: relative; }
.bars .m div { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; transition: opacity .12s; }
.bars .m:hover div { opacity: .8; }
.bars .m .in { background: linear-gradient(180deg, #5b80ff, #2f5bea); } .bars .m .out { background: linear-gradient(180deg, #fbbf54, #f59e0b); }
.bars .m span { position: absolute; bottom: -21px; left: 0; right: 0; text-align: center; font-size: 11.5px; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); font-weight: 500; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Editor */
.doc-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; }
.addr-box { border: 1px dashed var(--line2); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.55; min-height: 92px; background: #fcfcfd; }
.items { width: 100%; }
.items th { padding: 8px 4px; background: none; border-bottom: 1px solid var(--line); }
.items td { padding: 6px 4px; border: 0; vertical-align: top; }
.items tr.line td { border-bottom: 1px solid #f0f2f5; }
.items input, .items select, .items textarea { height: 34px; box-shadow: none; }
.items textarea { min-height: 34px; height: auto; }
.items .desc-input { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.items tr.text-row td { background: #fafbfd; }
.items .tot { padding-top: 13px; text-align: right; white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }
.items .pos { padding-top: 13px; color: var(--faint); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.items .rowtools { padding-top: 6px; white-space: nowrap; opacity: .55; transition: opacity .12s; } .items tr:hover .rowtools { opacity: 1; }
.add-row { display: flex; gap: 8px; justify-content: center; padding: 14px 0 4px; flex-wrap: wrap; }
.sumbar { margin: 16px -20px -20px; background: #0f172a; color: #cbd5e1; border-radius: 0 0 var(--r) var(--r); padding: 14px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.sumbar .grow { flex: 1; }
.sumbar .s { text-align: right; } .sumbar .s small { display: block; font-size: 11.5px; color: #8b97ad; } .sumbar .s b { font-size: 17px; color: #fff; font-weight: 650; font-variant-numeric: tabular-nums; }
.sumbar .s.big b { font-size: 22px; }
.sumbar input { width: 70px; height: 30px; background: #1e293b; border-color: #334155; color: #fff; box-shadow: none; text-align: right; }
.sumbar label { color: #8b97ad; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; box-shadow: var(--sh-1); background: #fff; }
.seg button { border: 0; background: transparent; padding: 0 12px; height: 32px; font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }
.with-tpl { display: flex; gap: 6px; align-items: flex-start; } .with-tpl > :first-child { flex: 1; }
.pick { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick > div { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick > div:last-child { border-bottom: 0; }
.pick > div:hover { background: var(--brand-50); }
.pick b { color: var(--ink); font-weight: 600; }
.timeline > div { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.timeline > div:last-child { border-bottom: 0; }
.kz td { padding: 9px 14px; } .kz td:first-child { width: 64px; } .kz .tag { background: var(--brand-50); color: var(--brand); }
.kz tr.total td { font-weight: 700; color: var(--ink); background: #fafbfc; }
.drop { border: 2px dashed var(--line2); border-radius: 12px; padding: 28px; text-align: center; color: var(--muted); cursor: pointer; transition: background .12s, border-color .12s; background: #fcfcfd; }
.drop .ic { width: 28px; height: 28px; color: var(--brand); margin-bottom: 6px; }
.drop.over, .drop:hover { border-color: var(--brand); background: var(--brand-50); }
.xmlview td { padding: 5px 8px; font-size: 13px; border-bottom: 1px solid var(--line); }
iframe.preview { width: 100%; height: 680px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.side-card { position: sticky; top: 14px; }
.stat-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; } .stat-row b { font-variant-numeric: tabular-nums; }
.avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.status-steps { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.status-steps span.on { color: var(--ok); font-weight: 600; }

@media (max-width: 1000px) { .doc-head { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  nav { position: sticky; top: 0; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; gap: 2px; z-index: 20; }
  nav .brand, .nav-sep, .nav-foot, nav .new { display: none; } nav a { white-space: nowrap; } nav a.active::before { display: none; }
  main { padding: 18px 12px 70px; } .kpis, .g3, .g4, .g5 { grid-template-columns: 1fr 1fr; } .g2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; } .filters { position: static; display: flex; overflow-x: auto; } .filters .sep { display: none; } .filters a { white-space: nowrap; }
  .hide-m { display: none; } .card table th:first-child, .card table td:first-child { padding-left: 14px; }
}

/* Aktionsleiste */
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions .grow { flex: 1; }
.sticky-actions { position: sticky; bottom: 0; z-index: 6; margin: 8px -34px 0; padding: 14px 34px; background: rgba(244,245,248,.92); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
@media (max-width: 900px) { .sticky-actions { margin: 8px -12px 0; padding: 10px 12px; } }
.dash-grid { grid-template-columns: 2fr 1fr; align-items: start; }
.contact-grid { grid-template-columns: 1fr 2fr; align-items: start; }
.two-col { grid-template-columns: 1fr 1fr; }
.grid > *, .kpis > * { min-width: 0; }
@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi .value { font-size: 19px; }
  .dash-grid, .contact-grid, .two-col { grid-template-columns: 1fr; }
  .ph { align-items: flex-start; } .ph .tools { width: 100%; }
  .card { padding: 16px; } .sumbar { margin: 16px -16px -16px; flex-direction: column; align-items: stretch; }
  .bars { gap: 4px; } .bars .m span { font-size: 9.5px; }
  .card.flush { overflow-x: auto; }
}
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr; } }
main { min-width: 0; }
@media (max-width: 900px) { .app { grid-template-columns: minmax(0, 1fr); } .doc-head .grid.g2 { grid-template-columns: 1fr 1fr; } .items { min-width: 760px; } .items-wrap { overflow-x: auto; } }
@media (max-width: 900px) { .sumbar .row { flex-wrap: wrap; justify-content: flex-end; gap: 12px 18px !important; } }
.split > * { min-width: 0; }
@media (max-width: 900px) { .card { overflow-x: auto; } }

/* Anmeldung */
.login-bg { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 20% 0%, #1c2b55 0%, #0b1220 60%); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 30px; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: pop .2s ease-out; }
.login-card h2 { font-size: 20px; margin: 6px 0 18px; }
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.login-logo .logo { width: 36px; height: 36px; display: grid; place-items: center; }
.login-logo small { display: block; color: var(--muted); font-size: 12px; margin-top: -2px; }
.nav-foot a { color: #a9b4c9; }

/* Kategorie-Suche */
.combo { position: relative; }
.combo input { padding-right: 34px; }
.combo .combo-caret { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); z-index: 40; max-height: 340px; overflow-y: auto; padding: 6px; display: none; }
.combo.open .combo-list { display: block; }
.combo-group { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 4px; }
.combo-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.combo-item .acc { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.combo-item.active, .combo-item:hover { background: var(--brand-50); }
.combo-item mark { background: #fff1c2; color: inherit; border-radius: 3px; padding: 0 1px; }
.combo-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.suggest { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ok); margin-top: 6px; }

/* PDF-Vorschau im A4-Format */
.modal-bg:has(.modal.pdfview) { padding: 20px 16px; }
.modal.pdfview { padding: 16px 24px 24px; max-width: 900px; }
.modal.pdfview .pdf-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.modal.pdfview .pdf-head h2 { margin: 0; }
iframe.preview.pdf-a4 { display: block; width: 100%; height: 80vh; background: #525659; }
