:root { --ink: #263640; --muted: #687680; --line: #dbe1e5; --canvas: #f4f6f7; --paper: #ffffff; --mint: #e6ebef; --green: #AEBBC5; --accent-dark: #596b78; }
* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: var(--font-manrope, Arial), sans-serif; }
button, input, select { font: inherit; }
a { color: inherit; }
.mobile-nav { display:none; }
.workspace > main { min-width:0; }
.notice { margin:18px clamp(24px,4vw,56px) 0; padding:12px 15px; border-radius:10px; font-size: 15px; }
.notice.success { color:#174b35; background:#dff2e7; }
.notice.error { color:#7b3030; background:#f8e3e3; }
.error-text { color:#a23f3f; font-size: 13px; }
.field-help { color: #7a8790; font-size: 12px; font-weight: 500; line-height: 1.5; }
.stack-form { display:grid; gap:14px; }
.inline-form { display:flex; gap:10px; align-items:end; }
.panel-body { padding:22px; }
.table-link { color:var(--green); font-weight:800; text-decoration:none; }
.searchbar { display:flex; align-items:center; gap:8px; }
.searchbar input { flex:1; min-width:230px; max-width:360px; }
.searchbar .button { flex:0 0 auto; text-decoration:none; white-space:nowrap; }
.searchbar.live-searching input { color: #52636d; background: #f2f5f7; }
.search-loading { color: #657681; font-size: 12px; font-weight: 700; white-space: nowrap; }
.search-loading[hidden], .search-reset[hidden] { display: none; }
.search-reset { color: var(--accent-dark); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.search-reset:hover { text-decoration: underline; }
.typeahead-wrap { position:relative; }
.suggestions { position:absolute; z-index:12; left:0; right:0; top:calc(100% + 4px); overflow:hidden; border:1px solid #d8e1dc; border-radius:10px; background:white; box-shadow:0 14px 34px rgba(21,49,38,.16); }
.suggestion { display:flex; justify-content:space-between; gap:12px; width:100%; padding:10px 12px; border:0; border-top:1px solid #edf1ef; text-align:left; background:white; cursor:pointer; }
.suggestion:first-child { border-top:0; }
.suggestion:hover,.suggestion.active { background:#eff7f3; }
.suggestion span { display:flex; flex-direction:column; font-size: 14px; }
.suggestion small { margin-top:2px; color:#7a857f; font-size: 12px; }
.suggestion strong { color:var(--green); font-size: 14px; white-space:nowrap; }
.suggestion-note { padding: 9px 12px; border-top: 1px solid #edf1ef; color: #7a857f; font-size: 12px; font-weight: 600; }
.suggestion-note:first-child { border-top: 0; }
/* Kundensuche im Rechnungsformular (Combobox, ersetzt per JS das Select) */
.customer-picker-field { display: grid; gap: 6px; }
.customer-search { padding-right: 44px; }
.picker-clear { position: absolute; top: 50%; right: 8px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: #425560; border: 0; border-radius: 7px; background: #e6ebef; font-size: 19px; line-height: 1; cursor: pointer; transform: translateY(-50%); }
.picker-clear:hover, .picker-clear:focus-visible { color: #263640; background: #d7dfe5; outline: none; }
.picker-clear:focus-visible { box-shadow: 0 0 0 3px rgba(89,107,120,.3); }
.picker-clear[hidden] { display: none; }
.customer-option[aria-selected="true"] { background: #eef2f4; }
.customer-picker-empty a { color: var(--accent-dark); font-weight: 700; }
/* Stornogrund: Anzeige auf der Rechnungsseite, Hinweis im Steuer-Export */
.reason-text { white-space: pre-line; }
.muted-text { color: var(--muted); font-weight: 500; }
.export-reason { display: block; max-width: 100%; margin-top: 4px; overflow: hidden; color: #7b8790; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cancel-reason-form textarea, .correction-form textarea { max-width: 640px; }
.login-page { min-height:100vh; display:grid; place-items:center; padding:24px; background:linear-gradient(145deg,#153b2d,#245944); }
.login-card { width:min(420px,100%); padding:36px; border-radius:20px; background:white; box-shadow:0 28px 80px rgba(4,22,15,.3); }
.login-card img { width:155px; height:80px; object-fit:contain; object-position:left; }
.login-card h1 { margin-top:20px; font-size: 32px; }
.login-card > p { color:var(--muted); font-size: 16px; line-height:1.6; }
.login-card .button { margin-top:8px; padding:13px; }
.auth-card { gap: 15px; }
.login-card .auth-logo { display: block; width: 180px; height: 82px; margin: 0 auto 4px; object-fit: contain; object-position: center; }
.auth-heading { text-align: center; }
.auth-heading h1 { margin: 8px 0 7px; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.auth-notice { margin: 0; text-align: left; line-height: 1.5; }
.auth-form-links { display: flex; justify-content: flex-end; margin-top: -6px; }
.auth-form-links a, .auth-back-link { color: var(--accent-dark); font-size: 13px; font-weight: 750; text-decoration: none; }
.auth-form-links a:hover, .auth-back-link:hover { text-decoration: underline; }
.auth-back-link { display: block; margin-top: 4px; text-align: center; }
.auth-link-button { display: block; width: 100%; padding: 3px; color: var(--accent-dark); border: 0; background: none; cursor: pointer; font-size: 13px; font-weight: 750; text-align: center; }
.auth-link-button:hover { text-decoration: underline; }
.auth-security-icon { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 5px; color: #344752; border-radius: 12px; background: #dfe5e9; font-size: 21px; font-weight: 900; }
.otp-input { font-size: 24px; font-weight: 800; letter-spacing: .2em; text-align: center; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.detail-list { display:grid; grid-template-columns:170px 1fr; gap:10px; font-size: 15px; }
.detail-list dt { color:var(--muted); }
.detail-list dd { margin:0; font-weight:650; }
.form-footer { display:flex; justify-content:flex-end; gap:10px; position:sticky; bottom:0; padding:14px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.94); backdrop-filter:blur(8px); }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; background: var(--canvas); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 20px 22px; color: var(--ink); background: #AEBBC5; }
.brand { display: flex; align-items: center; gap: 11px; width: 100%; padding: 0 8px 30px; color: inherit; border: 0; text-align: left; text-decoration: none; background: transparent; cursor: pointer; }
.brand-mark, .paper-logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-weight: 800; color: #173d2f; background: var(--mint); }
.brand-copy { display: flex; flex-direction: column; }
.sidebar-logo { width: 58px; height: 42px; object-fit: contain; object-position: left center; border-radius: 7px; background: rgba(255,255,255,.92); }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 1px; color: #a8c8ba; font-size: 14px; }
.main-nav { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; color: #b8d0c5; font-size: 16px; font-weight: 600; text-align: left; text-decoration: none; background: transparent; cursor: pointer; }
.nav-link > span { width: 22px; color: #9ab8aa; font-size: 20px; text-align: center; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.09); }
.nav-link.active > span { color: #bff1d5; }
.nav-link.future { cursor: not-allowed; opacity: .76; }
.nav-link.future small { margin-left: auto; color: #739687; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.sidebar-footer { margin-top: auto; }
.tax-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 13px; padding: 13px 12px; border: 1px solid rgba(214,240,226,.16); border-radius: 12px; background: rgba(0,0,0,.08); }
.status-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #70d6a3; box-shadow: 0 0 0 3px rgba(112,214,163,.12); }
.tax-note div { display: flex; flex-direction: column; }
.tax-note strong { font-size: 15px; }
.tax-note small { margin-top: 3px; color: #98b8aa; font-size: 13px; }
.connection { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 0 12px; color: #89a99a; font-size: 12px; }
.connection > span { width: 6px; height: 6px; border-radius: 50%; background: #7a9588; }
.connection.connected > span { background: #70d6a3; }
.connection.loading > span { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 94px; padding: 20px clamp(24px, 4vw, 56px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.72); }
.eyebrow { margin: 0 0 2px; color: #87918c; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; letter-spacing: -.035em; }
.top-actions { display: flex; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; font-size: 15px; font-weight: 750; line-height: 1.2; text-align: center; text-decoration: none; }
.button.secondary { color: #43504a; border-color: #dce2de; background: white; }
.button.primary { color: white; background: var(--green); box-shadow: 0 7px 18px rgba(29,92,67,.16); }
.button.primary span { margin-left: 7px; }
.button.danger { color: #812f2f; border-color: #e4b8b8; background: #fff3f3; }
.button.danger:hover { color: white; background: #a44747; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.content-grid { display: grid; grid-template-columns: minmax(560px, 1fr) 410px; gap: clamp(24px, 3vw, 42px); max-width: 1450px; margin: 0 auto; padding: 34px clamp(24px, 4vw, 56px) 70px; }
.form-column { display: grid; gap: 16px; align-content: start; }
.card { padding: 23px 24px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 4px 18px rgba(34,52,44,.025); }
.section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 21px; }
.step { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--green); background: #e2f3ea; font-size: 15px; font-weight: 800; }
.section-heading h2 { margin-bottom: 2px; font-size: 18px; letter-spacing: -.02em; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.customer-select { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; text-align: left; border: 1px solid #dce3df; border-radius: 11px; background: #fbfcfb; cursor: pointer; }
.avatar { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; color: #355748; background: #e4eee8; font-size: 14px; font-weight: 800; }
.customer-select > span:nth-child(2) { display: flex; flex-direction: column; }
.customer-select strong { font-size: 15px; }
.customer-select small { margin-top: 3px; color: #748079; font-size: 13px; }
.chevron { margin-left: auto; color: #7c8882; }
.customer-picker { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #dce3df; border-radius: 11px; background: #fbfcfb; }
.customer-picker label { flex: 1; }
.customer-picker select { padding: 0; border: 0; color: var(--ink); background: transparent; font-weight: 750; box-shadow: none; }
.customer-picker small { color: #748079; font-size: 12px; }
.text-button { padding: 0; border: 0; color: var(--green); background: transparent; cursor: pointer; font-size: 13px; font-weight: 800; }
.customer-picker + .text-button { margin-top: 12px; }
.empty-action { width: 100%; padding: 16px; border: 1px dashed #b7d1c5; border-radius: 10px; color: var(--green); background: #f7fbf8; cursor: pointer; font-size: 14px; font-weight: 800; }
.field-grid { display: grid; gap: 12px; }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }
label { display: grid; gap: 6px; }
label > span { color: #536059; font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-width: 0; padding: 11px 12px; color: #28342e; border: 1px solid #dce3df; border-radius: 8px; outline: none; background: #fbfcfb; font-size: 14px; }
input:focus, select:focus { border-color: #6d9f89; box-shadow: 0 0 0 3px rgba(109,159,137,.11); }
.full-field { width: calc((100% - 24px) / 3); margin-top: 14px; }
.received-option { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 11px 12px; border: 1px solid #dce3df; border-radius: 9px; background: #f8fafb; cursor: pointer; }
.received-option input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: #718796; }
.received-option > span { display: flex; flex-direction: column; gap: 2px; }
.received-option strong { color: #263640; font-size: 14px; }
.received-option small { color: #687680; font-size: 12px; font-weight: 500; }
.toggle-option { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #dce3df; border-radius: 9px; background: #f8fafb; cursor: pointer; }
.toggle-option input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: #718796; }
.toggle-option > span { display: flex; flex-direction: column; gap: 2px; }
.toggle-option strong { color: #263640; font-size: 14px; }
.toggle-option small { color: #687680; font-size: 12px; font-weight: 500; line-height: 1.45; }
.items-head, .item-row { display: grid; grid-template-columns: minmax(180px, 1.7fr) minmax(115px, .7fr) minmax(115px, .7fr) 95px 30px; gap: 9px; align-items: center; }
.items-head { padding: 0 3px 7px; color: #7b8680; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.item-row { padding: 9px 0; border-top: 1px solid #edf0ee; }
.item-row > strong { font-size: 14px; text-align: right; }
.quantity, .price { position: relative; }
.price span { position: absolute; right: 9px; top: 10px; color: #7b8680; font-size: 13px; pointer-events: none; }
.price input { padding-right: 25px; }
.quantity { display: grid; grid-template-columns: 1fr 78px; }
.quantity input { border-radius: 8px 0 0 8px; }
.quantity select { padding: 8px 4px; border-left: 0; border-radius: 0 8px 8px 0; color: #6f7a74; font-size: 12px; }
input[type=number]::-webkit-inner-spin-button { appearance: none; }
.icon-button { border: 0; color: #9ca49f; background: transparent; cursor: pointer; font-size: 20px; }
.add-item { margin-top: 8px; padding: 8px 11px; color: var(--green); border: 1px dashed #b7d1c5; border-radius: 8px; background: #f7fbf8; cursor: pointer; font-size: 13px; font-weight: 800; }
.sum-box { width: 330px; margin: 23px 0 0 auto; padding-top: 15px; border-top: 1px solid var(--line); }
.sum-box > div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.sum-box .muted { color: #7c8781; font-size: 12px; }
.sum-box .grand-total { align-items: baseline; margin-top: 7px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.grand-total strong { color: var(--green); font-size: 20px; }
.notes-field { margin-top: 18px; }
textarea { min-height: 80px; padding: 11px 12px; border: 1px solid #dce3df; border-radius: 8px; outline: none; resize: vertical; color: #28342e; background: #fbfcfb; font: inherit; font-size: 14px; }
textarea:focus { border-color: #6d9f89; box-shadow: 0 0 0 3px rgba(109,159,137,.11); }
.invoice-preview { position: sticky; top: 18px; align-self: start; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: #69756f; font-size: 13px; font-weight: 700; }
.preview-toolbar button { border: 0; color: var(--green); background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.paper { position: relative; aspect-ratio: 1 / 1.414; padding: 38px 34px 90px; background: white; box-shadow: 0 15px 45px rgba(41,56,49,.12); }
.paper-letterhead { display: grid; grid-template-columns: 1fr 106px; gap: 20px; align-items: center; }
.paper-issuer { display: block; color: #7d8982; font-size: 5.5px; line-height: 1.35; }
.paper-issuer strong { display: inline; margin-right: 4px; color: #263640; font-size: 7px; }
.paper-issuer span { display: inline; }
.invoice-logo { display: block; width: 106px; height: 46px; object-fit: contain; object-position: right center; }
.paper-title { display: flex; justify-content: space-between; align-items: end; margin-top: 12px; padding-bottom: 7px; border-bottom: 2px solid #AEBBC5; }
.paper-title > span { color: #718796; font-size: 17px; font-weight: 800; letter-spacing: .08em; }
.paper-title > div { display: flex; flex-direction: column; align-items: flex-end; }
.paper-title small { margin-bottom: 2px; color: #829087; font-size: 5px; font-weight: 800; letter-spacing: .08em; }
.paper-title strong { font-size: 7px; }
.paper-addresses { display: grid; grid-template-columns: 1fr 132px; gap: 20px; margin-top: 16px; }
.paper-addresses > div { display: flex; flex-direction: column; font-size: 7px; line-height: 1.4; }
.paper-addresses small { margin-bottom: 4px; color: #829087; font-size: 5px; font-weight: 800; letter-spacing: .09em; }
.paper-addresses .paper-return-address { font-size: 4.5px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.paper-meta-lines { gap: 4px; }
.paper-meta-lines > span { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; }
.paper-meta-lines small { margin: 0; font-size: 4.5px; letter-spacing: .04em; }
.paper-meta-lines strong { font-size: 6px; white-space: nowrap; }
.paper-line { display: grid; grid-template-columns: minmax(0,1fr) 62px 46px 62px; margin-top: 6px; padding: 7px 6px; color: #fff; background: #AEBBC5; font-size: 6px; font-weight: 800; text-transform: uppercase; }
.paper-line span:not(:first-child) { text-align: right; }
.paper-item { display: grid; grid-template-columns: minmax(0,1fr) 62px 46px 62px; align-items: start; padding: 11px 6px; border-bottom: 1px solid #e6eae8; font-size: 7px; }
.paper-item > span:not(:first-child), .paper-item > strong { text-align: right; }
.paper-totals { width: 190px; margin: 14px 0 0 auto; color: #6e7b74; font-size: 6px; }
.paper-totals > div { display: flex; justify-content: space-between; padding: 4px 6px; }
.paper-total { margin-top: 5px; padding-top: 9px!important; border-top: 1px solid #283b32; color: #263640; font-size: 8px; }
.paper-total strong { color: var(--accent-dark); font-size: 11px; }
.paper-additional-note { margin: 10px 0 0; padding: 7px; color: #3c4d58; background: #f7f8f9; font-size: 5.5px; line-height: 1.45; white-space: pre-line; }
.small-business-note { margin: 12px 0 0; color: #748178; font-size: 5px; text-align: right; }
.paper-thanks { margin: 22px 0 0; color: #718796; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.paper-thanks .heart { display: inline-block; margin-left: 3px; color: #C94F4F; font-size: 16px; line-height: .75; vertical-align: -1px; }
.paper-payment { margin-top: 8px; padding: 7px; color: #3c4d58; background: #f1f4f6; font-size: 5.5px; line-height: 1.45; }
.paper-footer { position: absolute; right: 34px; bottom: 28px; left: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid #e3e8e5; color: #7d8982; font-size: 5px; line-height: 1.6; }
.paper-footer strong { color: #263640; }
.paper-footer-company { text-align: left; }
.paper-footer-bank { justify-self: center; text-align: left; }
.paper-footer-paypal { justify-self: end; text-align: right; }

.page-body, .dashboard, .settings-form { max-width: 1180px; margin: 0 auto; padding: 34px clamp(24px, 4vw, 56px) 70px; }
.dashboard, .settings-form { display: grid; gap: 20px; }
.dashboard > * { min-width: 0; }
.invoice-paid-summary { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 20px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 4px 18px rgba(38,54,64,.035); }
.invoice-paid-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #344752; border-radius: 11px; background: #dfe5e9; font-size: 21px; font-weight: 900; }
.invoice-paid-copy { display: flex; flex-direction: column; gap: 3px; }
.invoice-paid-copy > strong { font-size: 15px; }
.invoice-paid-copy > small { color: #7d8991; font-size: 12px; }
.invoice-paid-value { color: var(--accent-dark); font-size: 30px; letter-spacing: -.04em; text-align: right; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.metric { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.metric > span { color: #77837c; font-size: 13px; font-weight: 700; }
.metric > strong { margin-top: 10px; font-size: 30px; letter-spacing: -.04em; }
.metric > small { margin-top: 4px; color: #89938e; font-size: 12px; }
.metric.green { color: #f3fbf7; border-color: #235b45; background: #1d4e3b; }
.metric.green > span, .metric.green > small { color: #abd0be; }
a.metric { color: inherit; text-decoration: none; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
a.metric:hover, a.metric:focus-visible { border-color: #718796; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(38,54,64,.09); }
a.metric:focus-visible { outline: 3px solid rgba(89,107,120,.3); outline-offset: 2px; }
.metric.open { color: #263640; border-color: #d5dce1; background: #eef1f3; }
.metric.open > span, .metric.open > small { color: #5b6b76; }
.metric.open > strong { color: #425560; }
.invoice-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.invoice-summary-grid .invoice-paid-summary { margin-bottom: 0; }
a.invoice-paid-summary { color: inherit; text-decoration: none; transition: transform .12s ease, border-color .12s ease; }
a.invoice-paid-summary:hover, a.invoice-paid-summary:focus-visible { border-color: #718796; transform: translateY(-1px); }
a.invoice-paid-summary:focus-visible { outline: 3px solid rgba(89,107,120,.3); outline-offset: 2px; }
.invoice-paid-summary.open { border-color: #d5dce1; background: #eef1f3; }
.invoice-paid-summary.open .invoice-paid-icon { color: #7b8a95; border: 2px solid #b8c3cb; background: #fff; }
.invoice-paid-summary.open .invoice-paid-value { color: #5b6b76; }
.invoice-paid-summary.active { border-color: #718796; box-shadow: inset 0 0 0 1px #718796; }
.status-filter { width: 100%; max-width: 130px; padding: 5px 24px 5px 8px; color: #7b8680; border: 1px solid #dbe1e5; border-radius: 6px; background: white; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; cursor: pointer; }
.status-filter.active { color: #263640; border-color: #718796; background: #e6ebef; }
.status-filter:focus-visible { outline: 3px solid rgba(89,107,120,.3); outline-offset: 2px; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 4px 18px rgba(34,52,44,.025); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid #edf0ee; }
.panel-heading h2 { margin-bottom: 3px; font-size: 18px; }
.panel-heading p { margin: 0; color: #7f8a84; font-size: 13px; }
.mini-list > div { display: grid; grid-template-columns: 36px 1fr auto 120px; gap: 11px; align-items: center; padding: 13px 22px; border-top: 1px solid #f0f2f1; }
.mini-list > div:first-child { border-top: 0; }
.mini-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--green); background: #e5f2eb; font-size: 17px; }
.mini-list > div > span:nth-child(2) { display: flex; flex-direction: column; }
.mini-list strong { font-size: 14px; }
.mini-list small { margin-top: 2px; color: #7c8781; font-size: 12px; }
.mini-list > div > strong:last-child { text-align: right; }
.invoice-quick-list > div { grid-template-columns: 36px minmax(170px, 1fr) auto 120px 40px; }
.invoice-quick-list .invoice-amount { text-align: right; }
.invoice-quick-list form, .row-actions form { margin: 0; }
.paid-check-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #9fcdb2; border-radius: 9px; color: #236440; background: #e1f3e8; cursor: pointer; font-size: 19px; font-weight: 900; line-height: 1; transition: transform .12s ease, color .12s ease, background .12s ease; }
.paid-check-button:hover { color: #17472d; border-color: #2d7a50; background: #d0eadb; transform: translateY(-1px); }
.paid-check-button:focus-visible { outline: 3px solid rgba(45,122,80,.22); outline-offset: 2px; }
.paid-check-button.compact { width: 30px; height: 30px; border-radius: 7px; font-size: 16px; }
/* Offene Rechnung = leeres Kästchen (überfällig mit "!"); Hover zeigt den Haken als Vorschau der Aktion. */
.unpaid-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; color: #7b8a95; border: 2px solid #b8c3cb; border-radius: 9px; background: #fff; cursor: pointer; font-size: 18px; font-weight: 900; line-height: 1; transition: transform .12s ease, color .12s ease, background .12s ease, border-color .12s ease; }
.unpaid-button::after { content: ''; }
.unpaid-button.overdue { color: #a23f3f; border-color: #d99a9a; background: #fbeeee; }
.unpaid-button.overdue::after { content: '!'; }
.unpaid-button:hover, .unpaid-button:focus-visible { color: #236440; border-color: #2d7a50; background: #e1f3e8; transform: translateY(-1px); }
.unpaid-button:hover::after, .unpaid-button:focus-visible::after { content: '✓'; }
.unpaid-button:focus-visible { outline: 3px solid rgba(45,122,80,.22); outline-offset: 2px; }
.unpaid-button.compact { width: 30px; height: 30px; border-radius: 7px; font-size: 15px; }
.paid-check-placeholder { width: 36px; height: 36px; }
.quiet-empty { margin: 0; padding: 35px; color: #829087; font-size: 14px; text-align: center; }
.status { display: inline-flex; justify-content: center; min-width: 64px; padding: 5px 9px; border-radius: 999px; color: #56635d; background: #eef1ef; font-size: 11px; font-weight: 800; }
.status.issued { color: #8b6515; background: #fbf1d8; }
.status.paid { color: #246244; background: #dff2e7; }
.status.cancelled { color: #8b4444; background: #f7e5e5; }
.next-steps { display: flex; gap: 18px; padding: 20px 22px; color: #d9ece2; border-radius: 14px; background: #26483a; }
.next-steps > span { flex: 0 0 auto; height: fit-content; padding: 5px 8px; border-radius: 999px; color: #1c513b; background: #cdebdc; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.next-steps strong { font-size: 15px; }
.next-steps p { margin: 5px 0 0; color: #b1ccbf; font-size: 13px; line-height: 1.55; }
.data-table { overflow-x: auto; }
.data-head, .data-row { display: grid; grid-template-columns: 150px minmax(190px, 1fr) 110px 130px 120px 150px; gap: 12px; align-items: center; min-width: 930px; padding: 12px 22px; }
.data-head { color: #7b8680; background: #fafbfa; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.data-row { border-top: 1px solid #edf0ee; font-size: 13px; }
.clickable-row { position: relative; cursor: pointer; transition: background-color .14s ease; }
.data-row.clickable-row:hover, .customer-tile.clickable-row:hover { background: #f4f7f8; }
.row-hit-area { position: absolute; z-index: 1; inset: 0; border-radius: inherit; }
.row-hit-area:focus-visible { outline: 3px solid rgba(89,107,120,.3); outline-offset: -3px; }
.clickable-row > :not(.row-hit-area) { position: relative; z-index: 2; pointer-events: none; }
.clickable-row .row-actions form, .clickable-row .row-actions button, .clickable-row .row-actions a { pointer-events: auto; }
.data-row > strong:nth-of-type(2) { text-align: right; }
.invoice-status-stack { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; }
.mail-state { display: inline-flex; align-items: center; width: fit-content; padding: 3px 6px; border-radius: 999px; font-size: 10px; font-weight: 850; line-height: 1; white-space: nowrap; }
.mail-state.sent { color: #425560; background: #e4eaee; }
.mail-state.failed { color: #8b4444; background: #f7e5e5; }
.product-row { grid-template-columns: 100px minmax(190px, 1fr) 95px 105px 80px 85px 105px; }
.invoice-item-summary { grid-template-columns: minmax(240px, 1fr) 130px 130px 130px; }
.invoice-item-summary > span:not(:first-child), .invoice-item-summary > strong:last-child { text-align: right; }
.product-edit-form { max-width: 850px; margin: 0 auto; }
.permission-state p { max-width: 610px; font-size: 14px; line-height: 1.65; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-actions button { padding: 5px 8px; color: var(--green); border: 1px solid #d6e3dd; border-radius: 6px; background: white; cursor: pointer; font-size: 11px; font-weight: 700; }
.empty-state { display: flex; align-items: center; flex-direction: column; padding: 70px 20px; text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: var(--green); background: #e5f2eb; font-size: 22px; }
.empty-state h3 { margin: 14px 0 5px; font-size: 18px; }
.empty-state p { margin-bottom: 16px; color: #7d8982; font-size: 13px; }
.customer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #edf0ee; }
.customer-tile { position: relative; display: flex; gap: 13px; min-height: 130px; padding: 22px; border: 0; text-align: left; background: white; cursor: pointer; }
.avatar.large { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; }
.customer-copy { display: flex; flex-direction: column; }
.customer-tile strong { font-size: 15px; }
.customer-tile small { margin-top: 3px; color: #78847d; font-size: 12px; }
.customer-tile em { margin-top: 8px; color: #8e9893; font-size: 10px; font-style: normal; font-weight: 700; }
.edit-mark { position: absolute; right: 18px; bottom: 15px; color: var(--green); font-size: 10px; font-weight: 800; opacity: 0; }
.customer-tile:hover .edit-mark, .customer-tile:focus-within .edit-mark { opacity: 1; }
/* "Rechnung erstellen" direkt aus der Kundenkachel; liegt über der Klickfläche der Kachel (siehe .clickable-row .row-actions a) */
.tile-actions { justify-content: flex-start; margin-top: 12px; }
.tile-action { display: inline-flex; align-items: center; padding: 6px 11px; color: var(--accent-dark); border: 1px solid #AEBBC5; border-radius: 7px; background: white; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.tile-action:hover { color: #263640; border-color: #718796; background: #e6ebef; }
.tile-action:focus-visible { outline: 3px solid rgba(89,107,120,.3); outline-offset: 2px; }
/* "Bearbeiten →" wieder unten rechts: die Regel .clickable-row > :not(.row-hit-area) setzt sonst position:relative */
.customer-tile.clickable-row > .edit-mark { position: absolute; }
.customer-tile:has(.tile-action:hover, .tile-action:focus-visible) { background: white; }
.customer-tile:has(.tile-action:hover, .tile-action:focus-visible) .edit-mark { opacity: 0; }
/* Kunde bearbeiten: "Änderungen speichern" bleibt Standardknopf (erster Submit im DOM), "Speichern & Rechnung erstellen" steht davor */
.customer-edit-actions { flex-wrap: wrap; gap: 10px; }
.customer-edit-actions .button.primary { order: 2; }
.customer-edit-actions .save-and-invoice { order: 1; }
.settings-form { max-width: 900px; gap: 14px; }
.settings-jump-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.settings-jump-nav a { display: flex; min-width: 0; flex-direction: column; padding: 12px; color: #354954; border: 1px solid #dbe1e5; border-radius: 11px; background: white; text-decoration: none; box-shadow: 0 3px 12px rgba(38,54,64,.025); }
.settings-jump-nav a:hover, .settings-jump-nav a:focus-visible { border-color: #AEBBC5; background: #f5f7f8; outline: none; }
.settings-jump-nav a > span { display: grid; place-items: center; width: 22px; height: 22px; margin-bottom: 8px; color: #4d6471; border-radius: 7px; background: #e6ebef; font-size: 12px; font-weight: 900; }
.settings-jump-nav strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.settings-jump-nav small { overflow: hidden; margin-top: 3px; color: #7b8790; font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.settings-company-form { display: grid; gap: 12px; }
.customer-edit-form { max-width: 850px; margin: 0 auto; }
.settings-section { padding: 0; overflow: hidden; scroll-margin-top: 18px; }
.settings-summary { display: flex; align-items: center; gap: 13px; min-height: 70px; padding: 17px 20px; cursor: pointer; list-style: none; user-select: none; }
.settings-summary::-webkit-details-marker { display: none; }
.settings-summary:focus-visible { outline: 3px solid rgba(89,107,120,.18); outline-offset: -3px; }
.settings-summary > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.settings-summary strong { color: #263640; font-size: 16px; }
.settings-summary small { color: #7b8790; font-size: 12px; line-height: 1.45; }
.settings-summary .step { width: 32px; height: 32px; margin: 0; }
.settings-chevron { display: grid; place-items: center; width: 30px; height: 30px; color: #5b6f7b; border-radius: 8px; background: #edf1f3; font-size: 20px; transition: transform .18s ease; }
.settings-accordion[open] > .settings-summary { border-bottom: 1px solid #edf0f2; background: #fafbfc; }
.settings-accordion[open] > .settings-summary .settings-chevron { transform: rotate(180deg); }
.settings-accordion-body { padding: 23px 24px 24px; }
.settings-accordion-body > .settings-actions { margin-top: 22px; padding-top: 18px; border-top: 1px solid #edf0f2; }
.field-grid.two { grid-template-columns: repeat(2, 1fr); }
.settings-lower { margin-top: 20px; }
.logo-setting { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; margin-bottom: 24px; padding: 18px; border: 1px solid #dce5e0; border-radius: 12px; background: #f8faf9; }
.logo-preview { display: grid; place-items: center; min-height: 100px; padding: 12px; border: 1px solid #e4e9e6; border-radius: 10px; background: white; }
.logo-preview img { max-width: 125px; max-height: 90px; object-fit: contain; }
.logo-setting strong { font-size: 15px; }
.logo-setting p { max-width: 440px; margin: 5px 0 11px; color: #77837d; font-size: 12px; line-height: 1.55; }
.upload-button { display: inline-flex; width: fit-content; padding: 8px 11px; color: white; border-radius: 8px; background: var(--green); cursor: pointer; font-size: 12px; font-weight: 800; }
.upload-button input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; }
.reset-logo { margin-left: 10px; padding: 0; color: var(--green); border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; }
.wide-field { grid-column: 1 / -1; }
.tax-mode-card { display: flex; align-items: center; justify-content: space-between; padding: 14px; border: 1px solid #b9d7c9; border-radius: 10px; background: #f2faf6; }
.tax-mode-card > div { display: grid; grid-template-columns: 16px 1fr; align-items: center; }
.tax-mode-card strong { font-size: 14px; }
.tax-mode-card small { grid-column: 2; margin-top: 3px; color: #6c7b73; font-size: 12px; }
.tax-mode-card > span { padding: 4px 8px; border-radius: 999px; color: #2b684a; background: #d9efe3; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.settings-actions { display: flex; justify-content: flex-end; }
.split-actions { justify-content: space-between; gap: 10px; }
.invoice-email-settings { display: grid; gap: 18px; }
.email-template-intro { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; color: #465d69; border: 1px solid #dbe2e6; border-radius: 10px; background: #f6f8f9; }
.email-template-intro > span { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #e3e8ec; font-size: 17px; }
.email-template-intro strong { font-size: 14px; }
.email-template-intro p { margin: 3px 0 0; color: #70808a; font-size: 12px; line-height: 1.55; }
.invoice-email-body { min-height: 230px; line-height: 1.6; }
.template-placeholders { padding: 14px; border: 1px dashed #b9c4cb; border-radius: 10px; background: #fafbfc; }
.template-placeholders > strong { font-size: 13px; }
.template-placeholders > p { margin: 3px 0 11px; color: #76838c; font-size: 12px; line-height: 1.5; }
.template-placeholders > div { display: flex; flex-wrap: wrap; gap: 7px; }
.template-placeholders button { display: flex; align-items: center; gap: 6px; padding: 7px 9px; color: #3e535f; border: 1px solid #dce3e7; border-radius: 8px; background: white; cursor: pointer; }
.template-placeholders button:hover { border-color: #AEBBC5; background: #f1f4f6; }
.template-placeholders code { font-size: 12px; font-weight: 800; }
.template-placeholders small { color: #7b8890; font-size: 10px; }
.smtp-state-card { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-bottom: 22px; padding: 13px 14px; border: 1px solid #dbe1e5; border-radius: 10px; background: #f6f8f9; }
.smtp-state-card > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.smtp-state-card strong { font-size: 14px; }
.smtp-state-card small { color: #71808a; font-size: 12px; }
.smtp-state-card > span:last-child { padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.smtp-state-card.configured > span:last-child { color: #344752; background: #dfe5e9; }
.smtp-state-card.incomplete > span:last-child { color: #8b4444; background: #f7e5e5; }
.smtp-state-card.incomplete .status-dot { background: #b75c5c; box-shadow: 0 0 0 3px rgba(183,92,92,.13); }
.smtp-settings-form { padding-top: 2px; }
.smtp-inline-error { margin: 0; padding: 10px 12px; color: #8b4444; border-radius: 8px; background: #f7e5e5; font-size: 13px; }
.smtp-test { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 18px; margin-top: 24px; padding-top: 21px; border-top: 1px solid #e7ebee; }
.smtp-test h3 { margin: 0 0 4px; font-size: 15px; }
.smtp-test p { max-width: 500px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.smtp-test .inline-form label { min-width: 230px; }
.smtp-test > .error-text { grid-column: 1 / -1; }
.dialog-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(13,31,24,.55); backdrop-filter: blur(3px); }
.dialog-backdrop[hidden] { display: none; }
.dialog { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 25px; border-radius: 16px; background: white; box-shadow: 0 24px 80px rgba(0,0,0,.2); }
.dialog-heading { display: flex; justify-content: space-between; margin-bottom: 22px; }
.dialog-heading h2 { margin-bottom: 0; font-size: 21px; }
.dialog-close { width: 34px; height: 34px; color: #758079; border: 1px solid #e0e5e2; border-radius: 9px; background: white; cursor: pointer; font-size: 21px; }
.dialog-intro { margin: -10px 0 20px; color: var(--muted); font-size: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #edf0ee; }
body.dialog-open { overflow: hidden; }
.mail-panel { overflow: hidden; }
.mail-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid #edf0ee; }
.mail-panel-heading h2 { margin-bottom: 3px; font-size: 18px; }
.mail-panel-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.mail-delivery-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.mail-delivery-badge.accepted { color: #344752; background: #dfe5e9; }
.mail-delivery-badge.rejected { color: #8b4444; background: #f7e5e5; }
.mail-delivery-badge.pending { color: #687680; background: #eef1f3; }
.mail-panel-body { padding: 20px 22px 22px; }
.mail-explanation { margin-bottom: 18px; padding: 11px 13px; color: #596b78; border: 1px solid #dbe2e6; border-radius: 9px; background: #f6f8f9; font-size: 13px; line-height: 1.6; }
.mail-history { display: grid; gap: 8px; margin-bottom: 20px; }
.mail-history h3 { margin: 0 0 2px; font-size: 14px; }
.mail-history-entry { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: flex-start; gap: 10px; padding: 10px 11px; border: 1px solid #e3e8eb; border-radius: 9px; }
.mail-history-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-size: 16px; font-weight: 900; }
.mail-history-entry.accepted .mail-history-icon { color: #344752; background: #dfe5e9; }
.mail-history-entry.rejected .mail-history-icon { color: #8b4444; background: #f7e5e5; }
.mail-history-entry > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.mail-history-entry strong { font-size: 13px; }
.mail-history-entry small { overflow-wrap: anywhere; color: #7a8790; font-size: 12px; }
.mail-history-entry em { margin-top: 3px; color: #8b4444; font-size: 12px; font-style: normal; line-height: 1.45; }
.mail-send-form { padding-top: 18px; border-top: 1px solid #edf0ee; }
.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; max-width: 380px; padding: 13px 16px; color: white; border-radius: 10px; background: #173f30; box-shadow: 0 12px 30px rgba(18,42,33,.22); font-size: 14px; font-weight: 650; }
.shipping-field { width: 220px; margin: 16px 0 0 auto; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fa; }
.correction-panel { border-left: 4px solid #AEBBC5; }
.correction-panel p { max-width: 760px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.users-page { display: grid; gap: 20px; }
.user-count { padding: 5px 8px; color: #536773; border-radius: 999px; background: #edf1f3; font-size: 12px; font-weight: 800; }
.user-row { grid-template-columns: minmax(170px, 1.1fr) minmax(230px, 1.4fr) 100px 90px 140px 90px; }
.user-row > strong { display: flex; align-items: center; gap: 7px; min-width: 0; }
.current-user-mark, .current-user-heading { display: inline-flex; padding: 3px 6px; color: #536773; border-radius: 999px; background: #e6ebef; font-size: 10px; font-weight: 850; vertical-align: middle; }
.two-factor-mark { color: #28563e; background: #dff0e6; }
.role-badge { display: inline-flex; justify-content: center; width: fit-content; min-width: 70px; padding: 5px 9px; color: #4f616c; border-radius: 999px; background: #e9eef1; font-size: 11px; font-weight: 850; }
.role-badge.owner { color: #70551e; background: #f5e8c9; }
.role-badge.admin { color: #435968; background: #dfe7ec; }
.role-badge.member { color: #5e6870; background: #edf0f2; }
.user-edit-mark { position: static; right: auto; bottom: auto; color: var(--accent-dark); text-align: right; opacity: 1; }
.protected-user-row { opacity: .72; }
.protected-user-row .user-edit-mark { color: #7b8790; }
.backup-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.backup-panel h2 { margin-bottom: 4px; font-size: 18px; }
.backup-panel p { max-width: 700px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.user-dialog { width: min(760px, 100%); }
.user-edit-form { max-width: 900px; margin: 0 auto; }
.user-edit-form > .panel-heading { gap: 18px; }
.user-form-section { padding-bottom: 4px; border-bottom: 1px solid #edf0f2; }
.user-form-section:last-of-type { border-bottom: 0; }
.user-account-state { align-self: end; }
.toggle-option.protected { cursor: not-allowed; opacity: .72; }
.user-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 14px; border-radius: 10px; background: #f5f7f8; }
.user-meta > div { display: flex; flex-direction: column; gap: 3px; }
.user-meta dt { color: #74818a; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.user-meta dd { margin: 0; font-size: 13px; font-weight: 700; }
.admin-two-factor-reset { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px; border: 1px solid #ead1d1; border-radius: 11px; background: #fff8f8; }
.admin-two-factor-reset strong { font-size: 14px; }
.admin-two-factor-reset p { max-width: 650px; margin: 4px 0 0; color: #7d6868; font-size: 12px; line-height: 1.55; }
.admin-two-factor-action { display: grid; flex: 0 0 245px; gap: 9px; }
.admin-two-factor-action .button { width: 100%; }

.security-page { display: grid; gap: 20px; max-width: 960px; }
.security-status { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.security-status.enabled { color: #28563e; background: #dff0e6; }
.security-status.disabled { color: #6d5555; background: #f4e7e7; }
.security-status.pending { color: #65531e; background: #f5eacb; }
.security-status.warning { color: #744921; background: #f7e4cc; }
.security-intro, .security-detail { display: flex; align-items: flex-start; gap: 14px; }
.security-intro > span, .security-detail > span { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; color: #405765; border-radius: 12px; background: #e6ebef; font-size: 20px; font-weight: 900; }
.security-intro strong, .security-detail strong { font-size: 15px; }
.security-intro p, .security-detail p { max-width: 740px; margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.setup-start { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.setup-start ol { margin: 0; padding-left: 22px; color: #596974; font-size: 13px; line-height: 1.9; }
.two-factor-setup-grid { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 30px; }
.qr-column { display: flex; align-items: center; flex-direction: column; gap: 10px; text-align: center; }
.qr-column small { max-width: 220px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.qr-box { display: grid; place-items: center; width: 222px; height: 222px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.qr-box img, .qr-box canvas { display: block; width: 190px !important; height: 190px !important; }
.setup-instructions h3 { margin: 0 0 4px; font-size: 16px; }
.setup-instructions p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.secret-copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.secret-copy-row .button { margin: 0; }
.monospace, .recovery-code-list { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.confirm-two-factor { margin-top: 5px; padding-top: 16px; border-top: 1px solid var(--line); }
.active-security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.danger-panel { border-color: #ead1d1; }
.recovery-panel { border-color: #e4c793; }
.recovery-warning { padding: 12px 14px; color: #674c22; border-radius: 10px; background: #fff5e3; font-size: 13px; line-height: 1.6; }
.recovery-code-list { width: 100%; min-height: 235px; padding: 18px; color: #263640; border: 1px dashed #9daab2; border-radius: 11px; background: #f8fafb; font-size: 16px; font-weight: 750; line-height: 1.75; letter-spacing: .08em; text-align: center; resize: vertical; }
.two-factor-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.two-factor-method { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: stretch; padding: 20px; border: 1px solid #dce3e7; border-radius: 13px; background: #fbfcfd; }
.two-factor-method.recommended { border-color: #9cabb6; background: #f5f7f8; box-shadow: inset 0 0 0 1px rgba(174,187,197,.25); }
.method-badge { position: absolute; top: 14px; right: 14px; padding: 4px 7px; color: #425560; border-radius: 999px; background: #dfe5e9; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.method-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 13px; color: #405765; border-radius: 11px; background: #e6ebef; font-size: 20px; font-weight: 900; }
.two-factor-method h3 { margin: 0 0 6px; font-size: 16px; }
.two-factor-method > p { min-height: 45px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.two-factor-method ul { flex: 1; margin: 15px 0 19px; padding-left: 18px; color: #596b76; font-size: 12px; line-height: 1.85; }
.two-factor-method .button { width: 100%; }
.email-method-form { margin-top: auto; }
.email-method-form label { margin-bottom: 1px; }
.email-two-factor-warning { color: #5d502d; border-top: 1px solid #eadfbf; background: #fffaf0; font-size: 12px; line-height: 1.65; }
.email-code-confirm { max-width: 620px; }
.email-security-note { padding: 13px 14px; color: #465d69; border: 1px solid #dbe2e6; border-radius: 10px; background: #f6f8f9; }
.email-security-note strong { font-size: 14px; }
.email-security-note p { margin: 4px 0 0; color: #70808a; font-size: 12px; line-height: 1.55; }
.email-otp-input { letter-spacing: .16em; }
.inline-security-actions { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.manage-email-code { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #edf0f2; background: #fafbfc; }
.manage-email-code strong { font-size: 14px; }
.manage-email-code p { max-width: 620px; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-resend-help { display: block; margin-top: -7px; color: #6c7a83; font-size: 12px; line-height: 1.5; text-align: center; }

/* fritz.bube Farbwelt: kühles Blaugrau #AEBBC5 statt Grün. */
.brand-copy small, .nav-link, .nav-link > span, .tax-note small, .connection { color: #425560; }
.nav-link:hover, .nav-link.active { color: #263640; background: rgba(255,255,255,.38); }
.nav-link.active > span, .text-button, .table-link, .add-item, .suggestion strong, .preview-toolbar button, .row-actions button, .edit-mark, .reset-logo, .empty-action { color: var(--accent-dark); }
.tax-note { border-color: rgba(38,54,64,.18); background: rgba(255,255,255,.18); }
.status-dot, .connection.connected > span { background: #718796; box-shadow: 0 0 0 3px rgba(89,107,120,.14); }
.button.primary { color: #263640; background: #AEBBC5; box-shadow: 0 7px 18px rgba(89,107,120,.18); }
.step, .mini-icon, .empty-state > span { color: #506571; background: #e6ebef; }
.empty-action, .add-item { border-color: #AEBBC5; background: #f5f7f8; }
.metric.green { color: #263640; border-color: #9cabb6; background: #AEBBC5; }
.metric.green > span, .metric.green > small { color: #425560; }
.next-steps { color: #263640; background: #AEBBC5; }
.next-steps > span { color: #344752; background: #e9edf0; }
.next-steps p { color: #425560; }
.tax-mode-card { border-color: #AEBBC5; background: #f4f7f8; }
.tax-mode-card > span { color: #425560; background: #dfe5e9; }
.upload-button { color: #263640; background: #AEBBC5; }
.toast { color: #263640; background: #AEBBC5; box-shadow: 0 12px 30px rgba(89,107,120,.22); }
.login-page { background: linear-gradient(145deg,#AEBBC5,#e3e8ec); }
.grand-total strong { color: var(--accent-dark); }
.suggestion:hover,.suggestion.active { background:#eef2f4; }
.notice.success { color:#425560; background:#e6ebef; }
.suggestions { border-color:#dbe1e5; box-shadow:0 14px 34px rgba(38,54,64,.14); }
.suggestion { border-color:#e9edf0; }
.brand-mark, .paper-logo { color:#344752; background:#e6ebef; }
.button.secondary, label > span { color:#425560; border-color:#dbe1e5; }
.card, .panel { box-shadow:0 4px 18px rgba(38,54,64,.035); }
.avatar { color:#425560; background:#e6ebef; }
.customer-select, .customer-picker, input, select, textarea { border-color:#dbe1e5; background:#fbfcfd; }
input:focus, select:focus, textarea:focus { border-color:#718796; box-shadow:0 0 0 3px rgba(89,107,120,.12); }
.empty-action, .add-item, .row-actions button { border-color:#AEBBC5; }
.status.paid { color:#344752; background:#dfe5e9; }
.logo-setting { border-color:#dbe1e5; background:#f7f9fa; }
.logo-preview { border-color:#e3e8ec; }
.dialog-backdrop { background:rgba(38,54,64,.55); }
.row-actions .paid-check-button { padding: 0; color: #236440; border-color: #9fcdb2; background: #e1f3e8; font-size: 16px; }
.row-actions .paid-check-button:hover { color: #17472d; border-color: #2d7a50; background: #d0eadb; }
.row-actions .unpaid-button { padding: 0; color: #7b8a95; border: 2px solid #b8c3cb; background: #fff; font-size: 15px; }
.row-actions .unpaid-button.overdue { color: #a23f3f; border-color: #d99a9a; background: #fbeeee; }
.row-actions .unpaid-button:hover, .row-actions .unpaid-button:focus-visible { color: #236440; border-color: #2d7a50; background: #e1f3e8; }

/* Steuer-Export */
.export-form { display: grid; gap: 16px; margin-top: 6px; }
.export-presets { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 14px; }
.export-presets a { padding: 7px 12px; color: #425560; border: 1px solid #dbe1e5; border-radius: 999px; background: #f5f7f8; font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.export-presets a:hover, .export-presets a.active { color: #263640; border-color: #AEBBC5; background: #e6ebef; }
.export-actions { display: flex; justify-content: flex-end; gap: 10px; }
.export-hint { margin: 0; padding: 12px 14px; color: #596b78; border: 1px solid #dbe2e6; border-radius: 9px; background: #f6f8f9; font-size: 13px; line-height: 1.6; }
.metric-grid.four { grid-template-columns: repeat(4, 1fr); }
.export-row { grid-template-columns: 145px 105px 110px minmax(180px, 1fr) 110px 110px 125px; }
.export-row .export-amount { text-align: right; }

/* Zahlungsdatum */
.paid-on-field { width: 220px; }
.panel-heading-tools { flex-wrap: wrap; gap: 12px; }
.list-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.paid-on-picker { display: flex; align-items: center; gap: 8px; }
.paid-on-picker > span { color: #536059; font-size: 12px; font-weight: 700; white-space: nowrap; }
.paid-on-picker input { width: 160px; padding: 8px 10px; }
.product-filter { width: auto; max-width: 280px; padding: 8px 32px 8px 10px; color: #425560; font-weight: 700; cursor: pointer; }
.product-filter.active { color: #263640; border-color: #718796; background: #e6ebef; }
.product-filter:focus-visible { outline: 3px solid rgba(89,107,120,.3); outline-offset: 2px; }

/* Auswertung */
.year-switch { display: flex; flex-wrap: wrap; gap: 7px; }
.year-switch a { padding: 7px 12px; color: #425560; border: 1px solid #dbe1e5; border-radius: 999px; background: #f5f7f8; font-size: 13px; font-weight: 750; text-decoration: none; }
.year-switch a:hover, .year-switch a.active { color: #263640; border-color: #AEBBC5; background: #e6ebef; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; color: #5b6b76; font-size: 12px; font-weight: 700; }
.chart-legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; background: #AEBBC5; }
.chart-legend .paid::before { background: #2d7a50; }
.chart-scroll { overflow-x: auto; padding: 20px 22px 8px; }
.chart-inner { min-width: 560px; }
.bar-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; align-items: end; height: 240px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.chart-month { display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.chart-value { flex: 0 0 auto; margin-top: auto; margin-bottom: 6px; color: #5b6b76; font-size: 11px; font-weight: 700; white-space: nowrap; }
.chart-bars { display: flex; align-items: flex-end; gap: 3px; width: 100%; max-width: 46px; height: 200px; }
.chart-bar { flex: 1; min-height: 0; border-radius: 4px 4px 0 0; background: #AEBBC5; }
.chart-bar.paid { background: #2d7a50; }
.chart-bar.empty { height: 2px !important; background: #e3e8ec; }
.chart-labels { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; padding: 8px 4px 0; color: #7b8690; font-size: 12px; font-weight: 700; text-align: center; text-transform: uppercase; }
.chart-labels .current { color: #263640; }
.stats-row { grid-template-columns: 140px 120px minmax(160px, 1fr) minmax(160px, 1fr); min-width: 0; }
.stats-row.total { font-weight: 800; background: #fafbfa; }
.years-row { grid-template-columns: 100px 120px minmax(140px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr); min-width: 0; }
.stats-row .amount, .years-row .amount { text-align: right; }
.top-customers { display: grid; gap: 12px; padding: 20px 22px; }
.top-customer { display: grid; grid-template-columns: minmax(160px, 1fr) 130px; gap: 12px; align-items: center; }
.top-customer > span { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.top-customer strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.top-customer small { color: #7b8690; font-size: 12px; }
.top-customer-bar { height: 8px; border-radius: 999px; background: #e6ebef; overflow: hidden; }
.top-customer-bar > span { display: block; height: 100%; border-radius: 999px; background: #718796; }
.top-customer > strong { text-align: right; }
@media (max-width: 1120px) { .content-grid { grid-template-columns: 1fr; } .invoice-preview { position: static; max-width: 500px; width: 100%; margin: 0 auto; } .metric-grid.four { grid-template-columns: repeat(2, 1fr); } .invoice-summary-grid { grid-template-columns: 1fr; } }
@media (max-width: 880px) { .metric-grid { grid-template-columns: 1fr; } .metric-grid.four { grid-template-columns: repeat(2, 1fr); } .invoice-quick-list > div { grid-template-columns: 36px minmax(140px, 1fr) auto 100px 40px; } .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; width: 100%; height: auto; padding: 14px 18px; } .brand { padding: 0; } .main-nav, .sidebar-footer { display: none; } .mobile-nav { display:flex; gap:5px; overflow-x:auto; padding:9px 12px; color:#263640; background:#AEBBC5; } .mobile-nav a { padding:8px 10px; border-radius:8px; text-decoration:none; font-size: 14px; white-space:nowrap; background:rgba(255,255,255,.28); } .topbar { align-items: flex-start; gap: 14px; padding: 18px; } .top-actions { flex-direction: column-reverse; } .content-grid, .page-body, .dashboard, .settings-form { min-width: 0; padding: 18px; } .card { padding: 18px 15px; } .field-grid.three, .field-grid.two, .metric-grid, .customer-grid, .logo-setting,.detail-grid { grid-template-columns: 1fr; } .full-field { width: 100%; } .items-head { display: none; } .item-row { grid-template-columns: 1fr 1fr 25px; } .item-row > .typeahead-wrap { grid-column: 1 / -1; } .item-row > strong { text-align: left; } .sum-box, .shipping-field { width: 100%; } .dialog { padding: 20px 16px; } .mini-list > div { grid-template-columns: 36px 1fr auto; } .mini-list > div > strong:last-child { grid-column: 2; text-align: left; } .inline-form { flex-direction:column; align-items:stretch; } }

@media (max-width: 760px) {
  .settings-jump-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-summary { min-height: 64px; padding: 14px 15px; }
  .settings-accordion-body { padding: 18px 15px; }
  .split-actions { align-items: stretch; flex-direction: column-reverse; }
  .split-actions .button { width: 100%; }
  .customer-edit-actions { align-items: stretch; flex-direction: column-reverse; }
  .customer-edit-actions .button { width: 100%; }
  .template-placeholders button { flex: 1 1 145px; }
  .mobile-nav-disabled { padding: 8px 10px; border-radius: 8px; font-size: 14px; white-space: nowrap; background: rgba(255,255,255,.18); cursor: not-allowed; opacity: .68; }
  .invoice-quick-list > div { grid-template-columns: 36px minmax(140px, 1fr) auto 40px; }
  .metric-grid.four { grid-template-columns: 1fr; }
  .export-actions { flex-direction: column-reverse; }
  .export-actions .button { width: 100%; }
  .invoice-summary-grid { grid-template-columns: 1fr; }
  .list-tools, .paid-on-picker { width: 100%; }
  .paid-on-picker { flex-wrap: wrap; }
  .paid-on-picker input { flex: 1 1 100%; width: auto; }
  .product-filter { width: 100%; max-width: none; }
  .paid-on-field { width: 100%; }
  .chart-scroll { padding: 16px 15px 8px; }
  .stats-row { grid-template-columns: 100px 90px minmax(120px, 1fr) minmax(120px, 1fr); }
  .years-row { grid-template-columns: 70px 90px minmax(110px, 1fr) minmax(110px, 1fr) minmax(110px, 1fr); }
  .top-customer { grid-template-columns: 1fr; }
  .top-customer > strong { text-align: left; }
  .invoice-quick-list .invoice-amount { grid-column: 2; text-align: left; }
  .panel-heading { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .searchbar { width: 100%; flex-wrap: wrap; }
  .searchbar input { min-width: 180px; max-width: none; }
  .invoice-paid-summary { grid-template-columns: 38px minmax(0, 1fr); }
  .invoice-paid-value { grid-column: 2; text-align: left; }
  .mail-panel-heading { align-items: stretch; flex-direction: column; }
  .mail-delivery-badge { width: fit-content; }
  .smtp-state-card { grid-template-columns: 10px minmax(0, 1fr); }
  .smtp-state-card > span:last-child { grid-column: 2; width: fit-content; }
  .smtp-test { grid-template-columns: 1fr; }
  .smtp-test .inline-form label { min-width: 0; }
  .backup-panel { align-items: stretch; flex-direction: column; }
  .backup-panel .button { width: 100%; }
  .user-meta { grid-template-columns: 1fr; }
  .admin-two-factor-reset, .setup-start { align-items: stretch; flex-direction: column; }
  .two-factor-setup-grid, .active-security-grid, .two-factor-methods { grid-template-columns: 1fr; }
  .secret-copy-row { grid-template-columns: 1fr; }
  .manage-email-code { align-items: stretch; flex-direction: column; }
  .manage-email-code .button { width: 100%; }
}

@media print {
  @page { size: A4; margin: 0; }
  body { background: white; }
  .sidebar, .topbar, .form-column, .preview-toolbar, .toast, .dialog-backdrop { display: none !important; }
  .app-shell, .workspace, .content-grid { display: block; min-height: 0; margin: 0; padding: 0; background: white; }
  .invoice-preview { position: static; width: 210mm; max-width: none; margin: 0; }
  .paper { width: 210mm; height: 297mm; padding: 20mm 18mm 38mm; box-shadow: none; }
  .paper-letterhead { grid-template-columns: 1fr 38mm; } .paper-issuer { font-size: 7.5pt; } .paper-issuer strong { font-size: 9.5pt; }
  .invoice-logo { width: 38mm; height: 17mm; margin-left: auto; }
  .paper-addresses small, .small-business-note, .paper-footer { font-size: 7pt; }
  .paper-addresses > div, .paper-item, .paper-title strong { font-size: 9pt; }
  .paper-addresses { grid-template-columns: 1fr 58mm; margin-top: 6mm; } .paper-meta-lines small { font-size: 6.5pt; } .paper-meta-lines strong { font-size: 8.5pt; } .paper-addresses .paper-return-address { font-size: 6.2pt; }
  .paper-title { margin-top: 5mm; } .paper-title > span { font-size: 22pt; } .paper-title small, .paper-line { font-size: 7pt; }
  .paper-line, .paper-item { grid-template-columns: 1fr 32mm 24mm 32mm; }
  .paper-totals { width: 75mm; font-size: 8pt; } .paper-total { font-size: 10pt; }
  .paper-total strong { font-size: 14pt; } .paper-additional-note, .paper-payment { font-size: 8pt; } .paper-thanks { font-size: 15pt; } .paper-thanks .heart { font-size: 20pt; }
  .paper-footer { right: 18mm; bottom: 15mm; left: 18mm; }
  .security-page > :not(.recovery-panel), .recovery-panel .panel-heading .security-status, .recovery-panel .settings-actions, .sidebar, .mobile-nav { display: none !important; }
  .security-page, .recovery-panel { display: block; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
}
