@font-face {
  font-family: "Now";
  src: url("https://db.onlinewebfonts.com/t/8dfa80454571c17a3d4edb713a54389f.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/8dfa80454571c17a3d4edb713a54389f.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Now";
  src: url("https://db.onlinewebfonts.com/t/903ebe10b757dc8185071c84b359f5fd.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/903ebe10b757dc8185071c84b359f5fd.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #1e322d;
  --muted: #68736f;
  --line: #dfe4df;
  --line-strong: #cbd2cc;
  --paper: #ffffff;
  --canvas: #f5f6f3;
  --accent: #1e322d;
  --accent-strong: #13241f;
  --accent-soft: #f1f4eb;
  --brand-lime: #dbfe7a;
  --brand-lime-soft: #f4ffd6;
  --warning: #8a6418;
  --warning-soft: #fff9e8;
  --danger: #9a3f42;
  --danger-soft: #fff2f2;
  --success: #3c6f57;
  --radius: 5px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: "Now", Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.48; }
a { color: #315c50; text-decoration: none; }
a:hover { color: #172a24; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: 220px; display: flex; flex-direction: column; padding: 24px 14px 18px; color: var(--ink); background: #fff; border-right: 1px solid var(--line); }
.brand { display: grid; gap: 1px; padding: 0 10px 25px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-wordmark { display: inline-flex; align-items: baseline; width: fit-content; color: #1e322d; font-size: 32px; line-height: 1; font-weight: 790; letter-spacing: -.055em; }
.brand-dot { color: #b9ee42; }
.brand-product { display: block; margin-top: 6px; color: #89918d; font-size: 10px; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; }
.nav { display: grid; gap: 2px; }
.nav-label { margin: 19px 10px 7px; color: #8d9792; font-size: 10px; text-transform: none; letter-spacing: .02em; font-weight: 650; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 3px; color: #59645f; font-weight: 590; }
.nav a:hover { color: var(--ink); background: #f6f7f4; }
.nav a.active { color: #172923; background: #f0f3e9; }
.nav a.active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; background: #c8f35a; }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: #bac1bd; }
.nav a.active .nav-dot { background: #8eb827; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 16px 8px 0; }
.user-mini { display: grid; grid-template-columns: 30px 1fr; gap: 9px; align-items: center; color: var(--ink); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 3px; color: #1e322d; background: var(--brand-lime); font-size: 11px; font-weight: 800; }
.user-mini small { display: block; max-width: 135px; color: #8a9490; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 38px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.topbar-leading { display: flex; align-items: center; gap: 12px; }
.topbar-title { color: #52605b; font-size: 12px; font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 3px; color: #69736f; background: #f3f5f2; font-size: 10px; font-weight: 650; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #929b97; }
.status-pill.on { color: #355743; background: var(--brand-lime-soft); }
.status-pill.on::before { background: #84aa28; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; color: var(--ink); }
.content { width: 100%; max-width: none; margin: 0; padding: 34px 40px 72px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head h1 { margin: 0; font-size: clamp(25px, 2.2vw, 34px); font-weight: 710; letter-spacing: -.04em; line-height: 1.08; }
.page-head p { max-width: 760px; margin: 7px 0 0; color: #77817d; font-size: 13px; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.eyebrow { margin: 0 0 7px; color: #6e7b75; font-size: 9px; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }

.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 3px; color: #2d3b36; background: #fff; font-weight: 640; line-height: 1.2; }
.button:hover { color: #172622; border-color: #aeb8b2; background: #f8f9f7; }
.button-primary { color: #fff; background: #1e322d; border-color: #1e322d; }
.button-primary:hover { color: #1e322d; background: var(--brand-lime); border-color: #badf58; }
.button-danger { color: #8e3e41; background: #fff; border-color: #e1c5c5; }
.button-danger:hover { color: #742d30; background: #fff5f5; border-color: #d9b5b6; }
.button-quiet { color: #6b7571; background: transparent; border-color: transparent; }
.button-quiet:hover { color: var(--ink); background: #f4f5f2; border-color: transparent; }
.button-small { min-height: 31px; padding: 6px 9px; font-size: 11px; }
.button-large { min-height: 44px; padding: 10px 15px; font-size: 14px; }
.button[disabled] { opacity: .5; cursor: not-allowed; }
.button-block { width: 100%; }
.button-spaced { margin-top: 13px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.kpi { position: relative; padding: 18px 19px 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.kpi-label { color: #737d79; font-size: 11px; font-weight: 600; }
.kpi-value { display: block; margin: 8px 0 2px; font-size: 28px; font-weight: 720; letter-spacing: -.035em; }
.kpi small { color: #939b97; font-size: 10px; }
.kpi-accent { border-top: 2px solid #b9e84d; }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: minmax(0, 1.75fr) minmax(320px, .72fr); }
.card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.card-head { min-height: 53px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.card-body { padding: 18px; }
.card-empty { padding: 42px 18px; text-align: center; color: var(--muted); }
.card-spaced { margin-top: 14px; }
.section-stack { display: grid; gap: 14px; }

.invoice-list-card { overflow: hidden; }
.filter-panel { padding: 14px 16px 13px; border-bottom: 1px solid var(--line); background: #fafbf9; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { min-height: 37px; }
.filters-wide { display: grid; grid-template-columns: minmax(300px, 2.2fr) minmax(145px, .7fr) minmax(180px, .9fr) minmax(130px, .65fr) auto; align-items: end; gap: 8px; }
.filters-wide > div { min-width: 0; }
.filters-wide label { margin-bottom: 5px; color: #7b8581; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.filter-search input { min-width: 0; }
.filter-actions { display: flex; gap: 6px; align-items: center; }
.filter-actions .button { min-height: 37px; }
.filter-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; color: #89938f; font-size: 10px; }
.invoice-reference { display: inline-block; margin-right: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }

.table-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #c7cec9 transparent; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 10px 13px; color: #79837e; background: #fafbf9; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 720; text-transform: uppercase; letter-spacing: .075em; text-align: left; white-space: nowrap; }
.data-table td { padding: 12px 13px; border-bottom: 1px solid #edf0ed; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover > td { background: #fafbf8; }
.data-table tbody tr.row-paid > td,
.data-table tbody tr.row-due > td,
.data-table tbody tr.row-open > td { background: #fff; }
.data-table tbody tr.row-paid > td:first-child { box-shadow: inset 2px 0 0 #87aa93; }
.data-table tbody tr.row-due > td:first-child { box-shadow: inset 2px 0 0 #bd7274; }
.data-table tbody tr.row-open > td:first-child { box-shadow: inset 2px 0 0 #d2b15d; }
/* Mahnstufe: sehr dezente Flächenfarbe, damit die Priorität ohne visuelle Unruhe erkennbar bleibt. */
.data-table tbody tr.row-level-1 > td { background: #f4f8e8; }
.data-table tbody tr.row-level-2 > td { background: #fff4dc; }
.data-table tbody tr.row-level-3 > td { background: #fdebe5; }
.data-table tbody tr.row-level-4 > td { background: #fbe1df; }
.data-table tbody tr.row-level-1:hover > td { background: #edf4d8; }
.data-table tbody tr.row-level-2:hover > td { background: #ffedcd; }
.data-table tbody tr.row-level-3:hover > td { background: #fbe2da; }
.data-table tbody tr.row-level-4:hover > td { background: #f7d5d3; }
.amount { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.primary-cell { color: #243a33; font-weight: 690; }
.secondary-cell { display: block; margin-top: 2px; color: #8a9490; font-size: 10px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 3px; color: #68736e; background: #f0f2ef; font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge-success { color: #426853; background: #edf5ef; }
.badge-warning { color: #80601e; background: #fff8e8; }
.badge-danger { color: #8d4143; background: #fff1f1; }
.badge-accent { color: #40522e; background: #f1f7df; }
.badge-dark { color: #fff; background: #2b403a; }
.badge-payment { color: #59645f; background: #f1f3f1; border: 1px solid #e0e5e2; }
.badge-debit { color: #a12f32; background: #fff0f0; border: 1px solid #efc8c9; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; border-top: 1px solid var(--line); background: #fff; }
.pagination-pages { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.pagination a { min-width: 31px; height: 31px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 3px; color: #43514f; background: #fff; font-size: 11px; font-weight: 700; }
.pagination a:hover { border-color: #aeb8b2; background: #f7f8f6; }
.pagination a.active { color: #1e322d; border-color: #c1e75d; background: var(--brand-lime); }
.pagination-link { padding: 0 10px; white-space: nowrap; }
.pagination a.disabled { pointer-events: none; opacity: .45; }
.pagination-pages span { padding: 0 3px; color: var(--muted); }

.alert { padding: 10px 12px; margin: 0 0 15px; border: 1px solid; border-left-width: 3px; border-radius: 3px; }
.alert-success { color: #365c48; background: #f2f7f3; border-color: #a8c3af; }
.alert-error { color: #863a3d; background: #fff6f6; border-color: #d9a8aa; }
.alert-warning { color: #765918; background: #fffaf0; border-color: #dfc67d; }
.alert-info { color: #38595e; background: #f4f8f8; border-color: #a9c6ca; }

label { display: grid; gap: 5px; color: #43504b; font-size: 11px; font-weight: 620; }
input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid #cfd5d0; border-radius: 3px; color: var(--ink); background: #fff; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #8d9b94; box-shadow: 0 0 0 2px rgba(219,254,122,.55); }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; font-weight: 500; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack-form { display: grid; gap: 12px; }
.form-section-title { margin-top: 8px; padding-bottom: 7px; color: #31423c; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 750; }
.form-help { color: #858f8a; font-size: 10px; font-weight: 450; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 6px; }
.form-spaced { margin-top: 14px; }
.form-spaced-sm { margin-top: 7px; }

.tabs { display: flex; gap: 0; width: 100%; max-width: 100%; overflow-x: auto; padding: 0; margin-bottom: 18px; background: transparent; border-bottom: 1px solid var(--line); }
.tabs a { position: relative; padding: 9px 13px 10px; color: #7a8580; white-space: nowrap; font-size: 11px; font-weight: 650; }
.tabs a:hover { color: #2f4039; }
.tabs a.active { color: #1e322d; }
.tabs a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: #b9e84d; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .62fr); gap: 14px; }
.detail-list { display: grid; grid-template-columns: 145px 1fr; gap: 8px 18px; margin: 0; }
.detail-list dt { color: #7a8580; font-size: 11px; }
.detail-list dd { margin: 0; font-weight: 590; }
.amount-hero { padding: 18px; color: #1e322d; border: 1px solid #dce3c9; border-radius: 4px; background: #f8fbef; }
.amount-hero small { color: #71806f; }
.amount-hero strong { display: block; margin: 4px 0 12px; font-size: 29px; font-weight: 720; letter-spacing: -.04em; }
.amount-hero .split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 12px; border-top: 1px solid #dfe6cd; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 28px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 5px; width: 7px; height: 7px; border-radius: 2px; background: #a4bd61; box-shadow: 0 0 0 3px #f1f5e7; }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 15px; bottom: -2px; border-left: 1px solid #dfe4df; }
.timeline li:last-child::after { display: none; }
.timeline time { color: var(--muted); font-size: 10px; }
.timeline strong { display: block; margin: 1px 0; }

.level-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); overflow: hidden; }
.level-order { display: grid; place-items: center; color: #657253; background: #f4f6ef; font-size: 16px; font-weight: 720; }
.level-content { padding: 16px; }
.level-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.level-head h3 { margin: 0; }
.placeholder-list { display: flex; flex-wrap: wrap; gap: 5px; }
.placeholder-list-spaced { margin-top: 7px; }
.placeholder-list code { padding: 3px 6px; border-radius: 2px; color: #53605b; background: #f0f2ef; font-size: 10px; }

.integration { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #e8edec; }
.integration:last-child { border-bottom: 0; }
.integration-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 3px; color: #31483f; background: #f1f4eb; font-size: 13px; font-weight: 800; }
.integration h3 { margin: 0 0 2px; font-size: 13px; }
.integration p { margin: 0; color: var(--muted); font-size: 10px; }
.code-line { padding: 10px 12px; border-radius: 3px; color: #e2ebe7; background: #253732; font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }

.install-body, .login-body { background: #f2f4ef; }
.install-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, .8fr) minmax(480px, 1fr); align-items: center; gap: 7vw; max-width: 1240px; margin: 0 auto; padding: 48px 36px; }
.install-brand { color: #52605a; }
.install-wordmark { margin-bottom: 28px; color: #1e322d; font-size: 42px; line-height: 1; font-weight: 790; letter-spacing: -.06em; }
.install-brand .eyebrow { color: #6f7d76; }
.install-brand h1 { margin: 0 0 18px; color: #1e322d; font-size: clamp(40px, 6vw, 64px); font-weight: 710; letter-spacing: -.065em; }
.install-brand > p:not(.eyebrow) { max-width: 480px; color: #69756f; font-size: 17px; }
.install-points { display: grid; gap: 10px; margin-top: 30px; color: #69756f; }
.install-card, .login-card { padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.install-card h2, .login-card h1 { margin: 0 0 6px; letter-spacing: -.03em; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(410px, 100%); }
.login-brand { display: grid; gap: 4px; margin-bottom: 30px; }
.login-brand .brand-wordmark { font-size: 38px; }
.login-brand .brand-product { margin-top: 4px; }
.login-footer { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: center; }

.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(20,35,30,.50); }
.modal.open { display: grid; }
.modal-card { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border: 1px solid #d7dcd8; border-radius: 5px; box-shadow: 0 20px 60px rgba(20,34,29,.16); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 17px; background: #fff; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-body { padding: 18px; }
.close-modal { border: 0; background: transparent; font-size: 22px; color: var(--muted); }

@media (min-width: 1500px) {
  .content { padding-left: 48px; padding-right: 48px; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
}

@media (max-width: 1100px) {
  .filters-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-search { grid-column: 1 / -1; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two, .detail-grid { grid-template-columns: 1fr; }
  .content { padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 760px) {
  .filters-wide { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .filter-actions { flex-wrap: wrap; }
  .filter-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination-link { width: 100%; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { width: 220px; transform: translateX(-102%); transition: transform .18s ease; box-shadow: 12px 0 35px rgba(22,38,32,.12); }
  .sidebar.open { transform: translateX(0); }
  .main { grid-column: 1; }
  .mobile-menu { display: block; }
  .topbar { height: 54px; padding: 0 15px; }
  .topbar-title { display: none; }
  .content { padding: 22px 15px 46px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 21px; }
  .page-actions { justify-content: flex-start; }
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .install-shell { grid-template-columns: 1fr; padding: 28px 15px; }
  .install-brand { display: none; }
  .install-card { padding: 22px; }
  .integration { grid-template-columns: 38px 1fr; }
  .integration > :last-child { grid-column: 2; justify-self: start; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .status-pill { display: none; }
  .card-head { align-items: flex-start; flex-direction: column; }
  .detail-list { grid-template-columns: 1fr; gap: 2px; }
  .detail-list dd { margin-bottom: 9px; }
}
