:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px; color: #263c3d; background: #ebebeb; font-synthesis: none;
  --teal: #33ada1; --cyan: #68c2c2; --ink: #263c3d; --action: #187e78; --action-dark: #11655f;
  --muted: #637779; --line: #e2e9e8; --soft: #eef8f7; --shadow: 0 8px 32px #294d4b06;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 100% 0%,#d7eeea80,transparent 48%); }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; transition: background .15s,border-color .15s,box-shadow .15s; }
button:disabled { cursor: not-allowed; opacity: .48; }
button,a,input,select,textarea,[tabindex] { outline-offset: 3px; }
button:focus-visible,a:focus-visible,[tabindex]:focus-visible { outline: 3px solid var(--action); }
input:focus,select:focus,textarea:focus { outline: 2px solid var(--action); outline-offset: 1px; border-color: var(--action); }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Navigation */
.topbar { min-height: 86px; background: #ffffffed; border-bottom: 1px solid #ffffff; padding: 18px max(32px,calc((100% - 1320px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; color: var(--ink); font-weight: 700; font-size: 1.75rem; letter-spacing: -.8px; text-decoration: none; line-height: 1.1; }
.brand-wordmark { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.datev-logo { display: block; width: auto; height: 22px; flex-shrink: 0; }
.brand-light { color: var(--action); }
.brand small { display: block; font-size: .625rem; letter-spacing: 1.8px; margin-top: 7px; color: var(--muted); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 17px; }
.local-label { display: flex; align-items: center; gap: 8px; color: #45706c; background: #f0f7f5; border: 1px solid #e6efeb; border-radius: 30px; padding: 10px 14px; font-size: .75rem; }
.local-label svg { width: 15px; height: 15px; color: var(--action); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--muted); font-size: 1.25rem; }
.icon-button:hover { background: var(--soft); color: var(--action); }
.help-button { border-radius: 50%; font-size: .9375rem; font-weight: 600; }

/* Introduction and progress */
main { max-width: 1384px; margin: 0 auto; padding: 42px 32px 22px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #506e6e; font-size: .6875rem; letter-spacing: 1.8px; font-weight: 650; margin-bottom: 16px; }
.eyebrow>span { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px #33ada116; }
h1 { font-size: clamp(2rem,3.15vw,2.8rem); font-weight: 650; letter-spacing: -1.5px; margin: 0; line-height: 1.16; color: #233b3d; }
h1>span { color: var(--action); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  h1>span {
    background-image: linear-gradient(115deg,#90d033 0%,#03abab 42%,#039a9a 68%,#00595c 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}
@media (forced-colors: active) {
  h1>span { background-image: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
}
.page-heading p { font-size: .9375rem; margin: 15px 0 0; color: var(--muted); line-height: 1.6; }
.steps { display: flex; align-items: center; gap: 18px; margin: 30px 0 26px; padding: 0 2px; max-width: 850px; }
.step { display: flex; align-items: center; min-width: 0; gap: 10px; color: #677979; font-size: .8125rem; line-height: 1.45; }
.step span { overflow-wrap: anywhere; }
.step b { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: #e0e5e4; color: #657879; border: 1px solid #d8e0de; border-radius: 50%; font-size: .75rem; font-weight: 650; flex-shrink: 0; }
.step.current { color: #2b615d; font-weight: 600; }
.step.current b { background: var(--action); border-color: var(--action); color: white; box-shadow: 0 0 0 4px #33ada111; }
.step-line { height: 1px; background: #cedbd7; min-width: 12px; flex: 1; }
.setup-grid { display: grid; gap: 19px; }
.panel { background: white; border: 1px solid #ffffff; border-radius: 20px; box-shadow: var(--shadow); }
.upload-panel,.settings-panel { padding: 25px 28px; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
h2 { font-size: 1.0625rem; font-weight: 650; letter-spacing: -.25px; margin: 0; color: var(--ink); }
.subtle { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.tag { font-size: .6875rem; color: #467673; background: var(--soft); padding: 7px 10px; border-radius: 7px; white-space: nowrap; font-weight: 550; }

/* Upload and compact profile */
.dropzone { display: flex; min-height: 152px; align-items: center; gap: 25px; border: 1.5px dashed #8fcfc6; border-radius: 15px; padding: 25px 30px; background: linear-gradient(115deg,#f3fbf9,#f8fcfc); cursor: pointer; transition: background .15s,border-color .15s; }
.dropzone:hover,.dropzone.dragover { border-color: var(--action); background: #e8f7f3; }
.upload-icon { display: flex; align-items: center; justify-content: center; width: 68px; height: 74px; flex-shrink: 0; background: white; color: var(--action); border: 1px solid #deeeeb; border-radius: 17px; transform: rotate(-5deg); box-shadow: 4px 4px 0 #68c2c223; }
.upload-icon svg { width: 38px; height: 38px; stroke-width: 1.5; }
.upload-copy { flex: 1; min-width: 0; }
.dropzone h3 { margin: 0 0 8px; color: #2d5654; font-size: 1.1875rem; letter-spacing: -.3px; font-weight: 600; }
.dropzone p { font-size: .875rem; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.dropzone small { display: block; font-size: .6875rem; color: #617c79; line-height: 1.5; }
.dropzone small span { margin: 0 7px; }
.primary-button,.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--action); border-radius: 10px; font-size: .8125rem; font-weight: 600; line-height: 1.4; padding: 12px 17px; min-height: 44px; text-decoration: none; }
.primary-button { background: var(--action); color: white; box-shadow: 0 3px 8px #187e7814; }
.primary-button:hover:not(:disabled) { background: var(--action-dark); border-color: var(--action-dark); }
.dropzone .primary-button { flex-shrink: 0; }
.dropzone .primary-button>span { margin-left: 12px; font-size: 1.1rem; }
.secondary-button { background: white; color: var(--action); border-color: #b9d7d1; }
.secondary-button:hover:not(:disabled) { background: var(--soft); border-color: var(--action); }
.upload-caption { display: flex; align-items: center; gap: 8px; margin-top: 15px; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.caption-dot { width: 5px; height: 5px; background: var(--teal); border-radius: 50%; flex-shrink: 0; }
.configuration-grid { display: grid; grid-template-columns: minmax(0,1fr) 155px; gap: 28px; align-items: stretch; }
.settings-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 17px; }
label { font-size: .75rem; font-weight: 550; color: #47615f; }
input,select,textarea { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 11px 12px; border: 1px solid #d6e2de; border-radius: 9px; background: #fff; color: var(--ink); font-size: .875rem; line-height: 1.4; }
input::placeholder,textarea::placeholder { color: #7d8d8a; opacity: 1; }
select { cursor: pointer; padding-right: 28px; }
.bank-setting select,.framework-setting select { font-weight: 650; border-color: #abd9d0; background: #f4fbf9; color: var(--action-dark); }
.defaults { display: grid; grid-template-columns: 1fr; align-items: center; gap: 20px; margin: 0; padding: 1px 0 0 28px; border-left: 1px solid var(--line); }
.defaults dt { font-size: .6875rem; color: var(--muted); line-height: 1.5; }
.defaults dd { margin: 8px 0 0; font-size: 1.0625rem; font-weight: 650; color: var(--action); }
.settings-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 19px; padding-top: 16px; border-top: 1px solid #edf1ef; }
.field-hint { font-size: .6875rem; color: #6c807d; line-height: 1.6; margin: 0; }
.setting-note { display: flex; align-items: center; gap: 6px; color: #507d75; font-size: .6875rem; line-height: 1.5; }
.setting-note svg { width: 15px; height: 15px; stroke-width: 2; color: var(--action); }
.empty-note { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 24px 0 6px; padding: 15px 12px; color: #587470; }
.empty-note svg { width: 32px; height: 36px; color: #8daba5; }
.empty-note strong { font-size: .875rem; font-weight: 550; }
.empty-note p { font-size: .75rem; color: #6d827e; margin: 6px 0 0; line-height: 1.5; }

/* Statement cards */
.workspace { margin-top: 34px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.workspace-heading h2 { display: flex; align-items: center; gap: 10px; font-size: 1.1875rem; }
.workspace-heading p { margin: 7px 0 0; }
.count-badge { color: var(--action); background: #dceee8; border-radius: 7px; min-width: 26px; padding: 4px 7px; text-align: center; font-size: .75rem; font-weight: 650; }
.workspace-actions { display: flex; flex-wrap: wrap; gap: 17px; align-items: center; }
.text-button { border: 0; background: none; color: #5d7b74; font-size: .8125rem; padding: 7px 3px; }
.text-button:hover { color: var(--action); text-decoration: underline; text-underline-offset: 3px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); gap: 15px; margin-bottom: 22px; }
.file-card { position: relative; min-width: 0; border: 1px solid #ffffff; border-radius: 15px; background: white; padding: 21px; box-shadow: var(--shadow); }
.file-card.selected { border-color: var(--teal); box-shadow: 0 0 0 3px #33ada113; }
.file-card.has-error { border-color: #e4c9bc; background: #fffefa; }
.file-card-top { display: flex; align-items: flex-start; gap: 12px; padding-right: 29px; }
.file-select { display: flex; align-items: center; gap: 13px; min-width: 0; flex: 1; padding: 0; border: 0; border-radius: 5px; background: none; color: inherit; text-align: left; }
.file-icon { display: flex; align-items: center; justify-content: center; width: 43px; height: 46px; flex-shrink: 0; background: #edf8f4; border-radius: 11px; color: var(--action); }
.file-card-title { min-width: 0; }
.file-card-title strong { display: block; font-size: .9375rem; font-weight: 650; color: #315550; line-height: 1.4; }
.file-name { display: block; font-size: .6875rem; color: #70857f; margin-top: 5px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.file-remove { position: absolute; top: 14px; right: 13px; border: 0; color: #8da29a; width: 29px; height: 29px; }
.file-remove:hover { color: #a64d34; background: #fcf1eb; }
.file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; color: #6c817a; font-size: .75rem; margin-top: 18px; line-height: 1.5; }
.file-account { padding: 3px 7px; color: #4a7168; background: #f0f7f3; border-radius: 5px; font-weight: 550; }
.file-card-labels { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 15px; margin-top: 15px; font-size: .75rem; }
.status { display: inline-flex; align-items: center; gap: 5px; color: var(--action); font-size: .8125rem; font-weight: 550; }
.status.warning { color: #916413; }
.status svg { width: 16px; height: 16px; stroke-width: 2; }
.progress-track { height: 4px; background: #edf2ef; margin-top: 18px; border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--teal); transition: width .18s; }
.file-error { font-size: .8125rem; color: #a04e31; line-height: 1.6; margin: 14px 0 0; }

/* Validated bookings and export */
.booking-panel { overflow: hidden; }
.booking-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 26px; }
.booking-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; }
.bank-period { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; }
.bank-period h2 { font-size: 1.1875rem; }
.period-pill { color: #5b7b71; font-size: .6875rem; padding: 6px 9px; background: #f0f7f3; border-radius: 6px; }
.booking-header p { margin: 9px 0 0; }
.verified { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; background: #edf8f3; border-radius: 9px; color: var(--action); font-size: .75rem; white-space: nowrap; }
.verified svg { width: 17px; height: 17px; }
.balance-strip { display: grid; grid-template-columns: repeat(4,1fr); margin: 0 26px; border: 1px solid #e1ece6; border-radius: 13px; background: #f8fbf9; overflow: hidden; }
.balance-strip>div { min-width: 0; padding: 22px; border-right: 1px solid #e1ece6; }
.balance-strip>div:last-child { background: #dff4ee; border: 0; }
.balance-strip>div>span { display: block; font-size: .75rem; color: #658075; margin-bottom: 10px; }
.balance-strip strong { font-size: 1.45rem; font-weight: 650; color: #355b4d; letter-spacing: -.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.balance-strip .positive,.balance-strip>div:last-child>strong { color: var(--action); }
.export-fields { display: grid; grid-template-columns: minmax(105px,.8fr) minmax(120px,.9fr) repeat(2,minmax(130px,1fr)) minmax(100px,.6fr) auto; align-items: end; gap: 16px; padding: 24px 26px 13px; }
.export-fields label { min-width: 0; }
.export-fields select { font-weight: 600; color: var(--action-dark); background: #f5fbf8; border-color: #c2dbd0; }
.year-label { min-width: 0; padding-bottom: 12px; }
.year-label>span { display: block; color: #678071; font-size: .75rem; margin-bottom: 15px; }
.year-label>strong { color: #44694f; font-size: .875rem; font-weight: 600; }
.export-hint { font-size: .75rem; color: #5c7d79; line-height: 1.5; margin: 0 26px 21px; }
.export-hint.needs-input { color: #92661b; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 26px; border-top: 1px solid var(--line); }
.table-label { color: var(--muted); font-size: .8125rem; font-weight: 550; }
.prebooked-account { display: inline-block; font-weight: 600; color: var(--action); font-variant-numeric: tabular-nums; }
.filters { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 4px; background: #f0f5f4; border-radius: 9px; }
.filter-button { border: 0; background: none; padding: 8px 13px; font-size: .8125rem; color: #607b77; border-radius: 6px; white-space: nowrap; }
.filter-button.active { background: white; color: var(--action-dark); font-weight: 600; box-shadow: 0 1px 5px #3156510d; }
.search-field { position: relative; width: 255px; min-width: 170px; }
.search-field input { margin: 0; min-height: 39px; padding: 10px 10px 10px 35px; font-size: .8125rem; }
.search-field svg { position: absolute; left: 10px; top: 12px; width: 17px; height: 17px; color: #77918e; }
.table-scroll { overflow: auto; max-height: 660px; scrollbar-color: #afccc0 #f1f6f5; scrollbar-width: thin; }
table { width: 100%; min-width: 990px; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
th { position: sticky; top: 0; z-index: 1; padding: 14px 16px; border-top: 1px solid #e0eae9; border-bottom: 1px solid #dbe8e6; background: #f1f7f6; text-align: left; font-size: .75rem; font-weight: 600; color: #4e736e; white-space: nowrap; }
th:first-child,td:first-child { padding-left: 26px; }
th:last-child,td:last-child { padding-right: 26px; }
td { border-bottom: 1px solid #e9f2f1; padding: 14px 16px; vertical-align: middle; color: #486a66; }
tbody tr:nth-child(even) { background: #fbfdfd; }
tbody tr:hover { background: #f2faf9; }
.date-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.date-cell small { display: block; font-size: .6875rem; color: #789490; margin-top: 4px; }
.partner-cell { min-width: 230px; max-width: 400px; }
.partner-name { display: block; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #385d58; font-size: .8125rem; font-weight: 600; }
.purpose { display: block; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: #6f8d89; margin-top: 5px; }
.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.amount.positive { color: var(--action); }
.account-input,.tax-input { margin: 0; padding: 8px; min-height: 36px; border: 1px solid #cbe1de; background: white; border-radius: 7px; width: 82px; text-align: center; font-weight: 600; font-size: .8125rem; color: #3f6f69; }
.tax-input { width: 76px; font-weight: 400; }
.tax-input:disabled { background: #f0f7f6; border-color: #deecea; }
.account-input[aria-invalid=true],.tax-input[aria-invalid=true] { border-color: #bb5741; background: #fff4ed; color: #a5412a; }
.row-status { display: inline-block; font-size: .6875rem; padding: 6px 8px; border-radius: 6px; white-space: nowrap; background: #fcf5e4; color: #89641c; }
.row-status.prebooked { background: #e7f7f5; color: #30746b; }
.row-status.manual { background: #edf2fa; color: #506e91; }
.detail-button { border: 0; background: none; color: var(--action); font-size: .75rem; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.detail-button:hover { color: var(--action-dark); }
.no-results { text-align: center; padding: 35px; color: #638480; }
.table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 17px 26px; color: #60847f; font-size: .75rem; }
.table-footer strong { color: #3d6d67; font-weight: 600; }
.note-line { margin: 0; padding: 0 26px 20px; color: #678682; font-size: .75rem; line-height: 1.6; }

/* Editable recognition */
.review-content { padding: 0 26px 26px; }
.review-notice { background: #f1f9f7; border: 1px solid #d8eae4; border-radius: 12px; padding: 17px 20px; color: #456a61; font-size: .8125rem; line-height: 1.6; }
.review-notice strong { color: var(--action-dark); font-weight: 650; }
.review-notice p { margin: 5px 0; }
.review-notice ul { margin: 8px 0 0; padding-left: 18px; }
.review-metadata { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 19px; padding: 25px 0; }
.review-iban { grid-column: span 2; }
.review-iban .subtle { font-size: .6875rem; margin-left: 5px; }
.review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 2px 0 15px; }
.review-toolbar h3 { margin: 0; font-size: .9375rem; font-weight: 600; }
.review-toolbar .secondary-button { min-height: 38px; padding: 9px 12px; font-size: .75rem; }
.review-scroll { border: 1px solid var(--line); border-radius: 12px; max-height: 540px; }
.review-table { min-width: 1100px; }
.review-table th,.review-table td { padding: 11px; }
.review-table th:first-child,.review-table td:first-child { padding-left: 15px; }
.review-table input,.review-table select,.review-table textarea { margin: 0; font-size: .8125rem; }
.review-table input[type=date] { min-width: 144px; }
.review-table input[data-row-field=amount] { width: 108px; font-variant-numeric: tabular-nums; text-align: right; }
.review-table select { width: 140px; padding-left: 9px; }
.review-table textarea { min-width: 240px; resize: vertical; line-height: 1.5; }
.review-row-note { display: block; max-width: 340px; color: #8f6726; font-size: .6875rem; line-height: 1.5; margin-top: 6px; }
.review-confirm { margin: 23px 0; }
.review-confirm label { display: flex; align-items: flex-start; gap: 10px; max-width: 870px; font-size: .8125rem; font-weight: 450; line-height: 1.65; }
.review-confirm input[type=checkbox] { margin: 3px 0 0; padding: 0; width: 17px; height: 17px; min-height: 17px; flex-shrink: 0; accent-color: var(--action); }
#review-error { color: #a14d33; font-size: .8125rem; line-height: 1.6; margin: 12px 0; }
#review-error:empty { margin: 15px 0 0; }
.source-panel { border-top: 1px solid var(--line); padding-top: 17px; color: #5d796b; font-size: .75rem; }
.source-panel summary { cursor: pointer; }
.source-panel .source-text { max-height: 400px; overflow: auto; margin-bottom: 0; }

/* Dialogs and feedback */
.toasts { position: fixed; bottom: 25px; right: 25px; z-index: 50; display: flex; flex-direction: column; gap: 10px; max-width: 430px; }
.toast { background: white; border: 1px solid #d4e4e2; border-left: 4px solid var(--teal); box-shadow: 0 8px 35px #294d3820; padding: 16px 19px; border-radius: 12px; font-size: .875rem; line-height: 1.55; }
.toast-error { border-left-color: #b16342; }
.detail-dialog,.help-dialog { border: 1px solid white; border-radius: 20px; box-shadow: 0 24px 90px #1c382740; width: min(740px,calc(100% - 32px)); padding: 0; max-height: 86vh; color: #3b5b57; }
.detail-dialog::backdrop,.help-dialog::backdrop { background: #16352b60; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; position: sticky; top: 0; padding: 21px 25px; background: #f4faf6; border-bottom: 1px solid #e2eeec; }
.help-content,#detail-content { padding: 23px 25px; font-size: .9375rem; line-height: 1.7; }
.help-content ol { padding-left: 22px; margin-top: 0; }
.help-content li { margin-bottom: 19px; }
.help-content h3,#detail-content h3 { font-size: 1rem; font-weight: 650; margin: 25px 0 9px; }
.help-content p { color: #60807c; font-size: .875rem; }
.help-content a { color: var(--action-dark); text-underline-offset: 3px; }
.tax-examples { min-width: 0; width: 100%; font-size: .875rem; margin: 16px 0; }
.tax-examples th { position: static; white-space: normal; }
.tax-examples th,.tax-examples td { padding: 11px 14px; }
.tax-examples td:first-child { width: 115px; font-weight: 650; color: var(--action-dark); }
.tax-examples code { background: #e9f5f1; border-radius: 5px; padding: 3px 9px; }
.detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-bottom: 24px; }
.detail-stats>div>span { display: block; color: #688b86; font-size: .75rem; margin-bottom: 5px; }
.detail-stats strong { font-size: 1rem; font-weight: 600; }
.detail-reason { font-size: .875rem; padding: 14px 16px; background: #eef8f7; border-left: 3px solid var(--cyan); border-radius: 8px; }
.source-text { font: .75rem/1.7 ui-monospace,Consolas,monospace; white-space: pre-wrap; overflow-wrap: anywhere; padding: 17px; background: #f4faf9; border: 1px solid #e0eeec; border-radius: 9px; }
.detail-source { font-size: .75rem; overflow-wrap: anywhere; color: #6f8d89; }
footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; padding: 20px 2px 0; border-top: 1px solid #d5dfde; margin-top: 24px; color: #738c89; font-size: .6875rem; }
footer>span:first-child { font-size: .8125rem; font-weight: 650; color: #4c736e; }
.footer-brand { display: inline-flex; align-items: center; gap: 7px; }
.footer-brand .brand-wordmark { gap: 4px; }
.footer-brand .datev-logo { height: 11px; }
.footer-version { display: inline-block; font-size: .625rem; font-weight: 400; margin-left: 6px; padding: 4px 6px; background: #dce8e6; border-radius: 5px; }
.footer-links,.legal-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.legal-nav a { color: var(--action-dark); font-size: .875rem; font-weight: 400; text-decoration: none; text-underline-offset: 4px; line-height: 1.5; }
.legal-nav a:hover { text-decoration: underline; }
footer .footer-link {
  font-family: inherit; font-size: .75rem; font-weight: 400; font-style: normal;
  line-height: 1.5; letter-spacing: normal; color: #638480;
  text-decoration: none; text-underline-offset: 3px; padding: 7px 3px; margin: 0;
}
footer .footer-link:hover { color: var(--action); text-decoration: underline; }

/* Legal information */
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; background: white; border: 2px solid var(--action); border-radius: 8px; color: var(--action-dark); }
.skip-link:focus { top: 12px; }
.legal-main { max-width: 1040px; width: 100%; }
.legal-main>.legal-nav { margin: 0 0 22px; gap: 8px; }
.legal-main>.legal-nav a { padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; }
.legal-main>.legal-nav a[aria-current="page"] { background: white; border-color: #d5e3df; color: var(--ink); }
.legal-content { padding: clamp(22px,4vw,48px); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.legal-content h1 { font-size: clamp(1.8rem,4vw,2.6rem); letter-spacing: -.7px; }
.legal-content h2 { margin: 0 0 12px; font-size: 1.2rem; line-height: 1.45; }
.legal-content p { margin: 0 0 16px; }
.legal-content section { margin-top: 30px; }
.legal-content section+section { border-top: 1px solid var(--line); padding-top: 28px; }
.legal-content a { color: var(--action-dark); text-underline-offset: 4px; }
.legal-content ul { padding-left: 22px; margin: 0 0 18px; }
.legal-content li { margin-bottom: 10px; }
.legal-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; font-size: .75rem; color: #637779; letter-spacing: .6px; margin-bottom: 18px; }
.legal-meta span { letter-spacing: 0; }
.legal-content .legal-intro { margin-top: 14px; color: #526d6d; }
.legal-content address { font-style: normal; line-height: 1.9; margin-bottom: 16px; }
.legal-details { margin: 12px 0 20px; }
.legal-details>div { display: grid; grid-template-columns: minmax(135px,1fr) 3fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.legal-details dt { color: #506968; font-weight: 600; }
.legal-details dd { margin: 0; min-width: 0; }
.legal-sources { font-size: .875rem; }
.legal-sources h2 { font-size: 1rem; }
.legal-page footer { margin-top: 28px; }

@media (max-width: 1150px) {
  .configuration-grid { grid-template-columns: minmax(0,1fr) 145px; gap: 20px; }
  .defaults { padding-left: 20px; gap: 16px; }
  .settings-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .export-fields { grid-template-columns: repeat(3,minmax(110px,1fr)); gap: 14px; }
  .export-fields .primary-button { grid-column: 1 / -1; justify-self: end; }
  .balance-strip>div { padding: 19px 16px; }
  .balance-strip strong { font-size: 1.2rem; }
}
@media (max-width: 900px) {
  main { padding: 32px 24px 20px; }
  .topbar { padding: 17px 24px; }
  .configuration-grid { grid-template-columns: 1fr; gap: 20px; }
  .defaults { display: flex; gap: 36px; padding: 17px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .defaults>div { display: flex; align-items: center; gap: 10px; }
  .defaults dd { margin: 0; font-size: .875rem; }
  .settings-footer { margin-top: 15px; padding-top: 0; border: 0; }
  .dropzone { gap: 18px; padding: 23px; }
  .dropzone .primary-button { padding: 12px; }
  .upload-icon { width: 57px; height: 64px; }
  .dropzone h3 { font-size: 1.0625rem; }
  .review-metadata { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .topbar { min-height: 76px; padding: 15px 18px; gap: 13px; }
  .brand { font-size: 1.45rem; }
  .brand .datev-logo { height: 19px; }
  .brand small { font-size: .5625rem; letter-spacing: 1.2px; }
  .topbar-right { gap: 8px; }
  .local-label { font-size: 0; gap: 0; padding: 9px; }
  .local-label svg { width: 16px; height: 16px; }
  .help-button { width: 32px; height: 32px; }
  main { padding: 28px 16px 20px; }
  .page-heading { gap: 8px; align-items: flex-start; position: relative; }
  h1 { font-size: 2.05rem; letter-spacing: -1px; }
  .eyebrow { font-size: .5625rem; letter-spacing: 1.3px; margin-bottom: 16px; }
  .page-heading p { font-size: .8125rem; max-width: 285px; }
  .steps { gap: 8px; margin: 25px 0 22px; }
  .step { flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; }
  .step span { font-size: .6875rem; line-height: 1.45; }
  .step-line { flex: 0 0 15px; align-self: flex-start; margin-top: 14px; }
  .step b { width: 26px; height: 26px; font-size: .6875rem; }
  .upload-panel,.settings-panel { padding: 19px; border-radius: 17px; }
  .panel-heading { margin-bottom: 17px; gap: 8px; }
  .panel-heading h2 { font-size: .9375rem; }
  .panel-heading .subtle,.panel-heading .tag { font-size: .625rem; }
  .tag { padding: 6px 8px; }
  .dropzone { flex-direction: column; text-align: center; padding: 23px 15px; gap: 19px; }
  .upload-icon { width: 57px; height: 62px; }
  .dropzone h3 { font-size: 1.0625rem; }
  .dropzone p { font-size: .8125rem; margin-bottom: 10px; }
  .dropzone .primary-button { padding: 12px 18px; }
  .upload-caption { font-size: .6875rem; align-items: flex-start; }
  .caption-dot { margin-top: 6px; }
  .settings-fields { grid-template-columns: 1fr 1fr; gap: 17px 12px; }
  .settings-fields input { padding-left: 10px; padding-right: 10px; font-size: .8125rem; }
  .defaults { gap: 15px; justify-content: space-between; }
  .defaults>div { flex-direction: column; align-items: flex-start; gap: 6px; }
  .settings-footer { gap: 10px; }
  .empty-note { margin-top: 14px; padding: 18px 4px; gap: 13px; align-items: flex-start; }
  .empty-note strong { font-size: .8125rem; }
  .empty-note p { font-size: .6875rem; }
  .workspace-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
  .workspace-actions { width: 100%; justify-content: space-between; gap: 12px; }
  .workspace-actions .secondary-button { padding: 10px 13px; }
  .file-card { padding: 19px; }
  .file-card-labels { align-items: flex-start; }
  .booking-header { padding: 21px 18px; gap: 15px; }
  .bank-period h2 { font-size: 1.0625rem; }
  .booking-header p { overflow-wrap: anywhere; }
  .balance-strip { margin: 0 18px; grid-template-columns: 1fr 1fr; }
  .balance-strip>div { padding: 17px 13px; }
  .balance-strip>div:nth-child(2) { border-right: 0; }
  .balance-strip>div:nth-child(-n+2) { border-bottom: 1px solid #e1ece6; }
  .balance-strip strong { font-size: 1.125rem; }
  .export-fields { padding: 22px 18px 13px; grid-template-columns: 1fr 1fr; gap: 15px 12px; }
  .export-fields .primary-button { justify-self: stretch; }
  .export-hint { margin: 0 18px 20px; }
  .table-toolbar { padding: 15px 18px; flex-direction: column; align-items: stretch; gap: 12px; }
  .filters { align-self: flex-start; max-width: 100%; }
  .filter-button { padding: 8px 10px; font-size: .75rem; }
  .search-field { width: 100%; }
  .table-scroll { max-height: 540px; }
  .table-footer,.note-line { padding-left: 18px; padding-right: 18px; }
  .review-content { padding: 0 18px 20px; }
  .review-notice { padding: 14px; font-size: .75rem; }
  .review-metadata { gap: 17px 12px; }
  .review-metadata input { padding: 10px; font-size: .8125rem; }
  .review-confirm label { font-size: .75rem; }
  .review-confirm .primary-button { width: 100%; }
  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  footer { justify-content: flex-start; gap: 12px 18px; }
  footer .copyright { flex-basis: 100%; order: 3; }
  .footer-links { flex-basis: 100%; gap: 10px 16px; }
  .footer-links .text-button { margin-left: 0; }
  .legal-page .topbar { flex-wrap: wrap; }
  .legal-back { padding: 10px 12px; font-size: .875rem; }
  .legal-main>.legal-nav a { padding: 8px 11px; }
  .legal-details>div { grid-template-columns: 1fr; gap: 6px; }
  .legal-content section+section { padding-top: 22px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition: none !important; } }
