* {
    box-sizing: border-box;
}

:root {
    --background: #f5f7f9;
    --surface: #ffffff;
    --border: #e1e6ea;
    --text: #20252a;
    --muted: #6f7881;
    --primary: #1769aa;
    --primary-soft: #eaf3fb;
    --hover: #f1f4f6;
    --warning: #d99a16;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

button,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.topbar {
    height: 76px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 20px;
}

.brand small {
    color: var(--muted);
    margin-top: 2px;
}

.top-context {
    display: flex;
    gap: 12px;
}

.top-context label span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin: 0 0 4px 3px;
}

.top-context select {
    border: 1px solid var(--border);
    background: white;
    border-radius: 7px;
    padding: 8px 30px 8px 10px;
    min-width: 280px;
}

.top-context .year-select select {
    min-width: 90px;
}

.app-layout {
    display: flex;
    min-height: calc(100vh - 76px);
}

.sidebar {
    width: 240px;
    flex: 0 0 240px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
}

.navigation {
    flex: 1;
}

.nav-section {
    margin-bottom: 23px;
}

.nav-label {
    font-size: 10px;
    font-weight: bold;
    color: #9aa1a8;
    letter-spacing: 1px;
    padding: 0 12px 7px;
}

.navigation a {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 7px;
    text-decoration: none;
    color: #42494f;
    margin: 2px 0;
    font-size: 14px;
}

.navigation a:hover {
    background: var(--hover);
}

.navigation a.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: bold;
}

.nav-icon {
    width: 23px;
    text-align: center;
    font-size: 17px;
}

.nav-badge {
    margin-left: auto;
    background: #f0f2f4;
    color: #727980;
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 20px;
    text-align: center;
    font-size: 11px;
}

.sidebar-footer {
    color: #a1a8ae;
    font-size: 11px;
    padding: 10px 12px;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 36px 40px 60px;
    max-width: 1500px;
}

.mobile-title {
    display: none;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 27px;
}

.page-header h1 {
    font-size: 29px;
    margin: 0 0 7px;
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    padding: 11px 18px;
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}

.button.primary {
    background: var(--primary);
    color: white;
}

.button.secondary {
    background: white;
    color: #42494f;
    border-color: var(--border);
}

.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.hero-card h2 {
    margin: 7px 0 8px;
}

.hero-card p {
    max-width: 720px;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.eyebrow {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--primary);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 34px 0 14px;
}

.section-title h2 {
    margin: 0;
    font-size: 19px;
}

.section-title span {
    color: var(--muted);
    font-size: 13px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.stats-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 20px;
    color: var(--text);
    text-decoration: none;
}

a.stat-card:hover {
    border-color: #bdc8d0;
}

.stat-top {
    display: flex;
    justify-content: space-between;
    color: #555e66;
    font-size: 13px;
}

.stat-card > strong {
    display: block;
    font-size: 30px;
    margin: 13px 0 5px;
}

.stat-card small {
    color: var(--muted);
}

.status-neutral {
    color: #aeb5bb;
}

.status-warning {
    color: var(--warning);
}

.workflow-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.workflow-item {
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
}

.workflow-item strong {
    margin-top: 8px;
}

.workflow-item small {
    color: var(--muted);
    margin-top: 4px;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: bold;
}

.workflow-arrow {
    color: #adb4ba;
    font-size: 21px;
}

.simple-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 13px;
}

.mini-step {
    display: flex;
    align-items: center;
    gap: 7px;
}

.mini-step span {
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eceff1;
    color: #69727a;
}

.active-step {
    color: var(--primary);
    font-weight: bold;
}

.active-step span {
    background: var(--primary);
    color: white;
}

.mini-arrow {
    color: #b3b9be;
}

.panel,
.table-panel,
.proposal-card,
.review-placeholder,
.settings-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.upload-panel {
    min-height: 245px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    border-style: dashed;
}

.upload-panel h2 {
    margin: 10px 0 5px;
}

.upload-panel p {
    margin: 0 0 18px;
    color: var(--muted);
}

.upload-panel small {
    margin-top: 13px;
    color: var(--muted);
}

.upload-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.table-panel {
    min-height: 190px;
}

.empty-state {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px;
}

.empty-state p {
    color: var(--muted);
    max-width: 520px;
    line-height: 1.5;
}

.info-banner {
    background: #f2f7fb;
    border: 1px solid #d9e7f1;
    border-radius: 9px;
    padding: 18px;
    display: flex;
    gap: 14px;
}

.info-symbol {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.info-banner p {
    color: var(--muted);
    margin: 5px 0 0;
}

.proposal-card {
    padding: 25px;
}

.proposal-placeholder {
    display: flex;
    align-items: center;
    gap: 16px;
}

.proposal-placeholder p {
    color: var(--muted);
    margin: 5px 0 0;
}

.ai-mark {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.review-placeholder {
    margin-top: 22px;
    padding: 45px;
    text-align: center;
}

.review-placeholder p {
    color: var(--muted);
}

.check-circle {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.module-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 23px;
    min-height: 180px;
}

.module-card h3 {
    margin: 14px 0 7px;
}

.module-card p {
    color: var(--muted);
    line-height: 1.5;
}

.module-icon {
    width: 39px;
    height: 39px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.text-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font-weight: bold;
}

.featured {
    border-color: #c8ddeb;
}

.dashed {
    border-style: dashed;
}

.muted-card {
    opacity: 0.72;
}

.settings-list {
    overflow: hidden;
}

.settings-row {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.settings-row:last-child {
    border-bottom: 0;
}

.settings-row p {
    color: var(--muted);
    margin: 5px 0 0;
}

@media (max-width: 1050px) {
    .stats-grid,
    .stats-grid.three,
    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .top-context select {
        min-width: 190px;
    }
}

@media (max-width: 800px) {
    .topbar {
        padding: 0 15px;
    }

    .brand small {
        display: none;
    }

    .top-context label:first-child {
        display: none;
    }

    .sidebar {
        width: 185px;
        flex-basis: 185px;
    }

    .main-content {
        padding: 25px 20px 45px;
    }

    .workflow-card {
        flex-direction: column;
        gap: 12px;
    }

    .workflow-arrow {
        transform: rotate(90deg);
    }

    .simple-steps {
        display: none;
    }
}

@media (max-width: 620px) {
    .sidebar {
        display: none;
    }

    .stats-grid,
    .stats-grid.three,
    .module-grid {
        grid-template-columns: 1fr;
    }

    .page-header,
    .hero-card,
    .settings-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .main-content {
        padding: 20px 15px 40px;
    }
}


/* ========================================================
   DATEV-KI KERN-WORKFLOW V0.3
   ======================================================== */

.workflow-counter {
    background: white;
    border: 1px solid var(--border);
    padding: 9px 13px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 13px;
}

.process-bar {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 19px 22px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.process-step {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 115px;
}

.process-step strong,
.process-step small {
    display: block;
}

.process-step strong {
    font-size: 12px;
}

.process-step small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
}

.process-circle {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: #edf0f2;
    color: #788087;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.process-step.completed .process-circle {
    background: #e7f5ed;
    color: #25834d;
}

.process-step.current .process-circle {
    background: var(--primary);
    color: white;
}

.process-step.current strong {
    color: var(--primary);
}

.process-line {
    height: 2px;
    flex: 1;
    min-width: 18px;
    background: #e2e6e9;
    margin: 0 9px;
}

.completed-line {
    background: #a9d8bd;
}

.workflow-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
    gap: 20px;
    align-items: start;
}

.detail-card,
.ai-proposal,
.decision-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 23px;
    margin-bottom: 20px;
}

.detail-card-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.detail-card-header h2 {
    margin: 6px 0 0;
    font-size: 19px;
}

.success-pill {
    background: #e8f6ee;
    color: #277b4b;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 11px;
    white-space: nowrap;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.detail-grid span,
.bank-match span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 5px;
}

.detail-grid strong,
.bank-match strong {
    font-size: 14px;
}

.link-button {
    border: 0;
    background: transparent;
    color: var(--primary);
    padding: 0;
    font-weight: bold;
}

.bank-match {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1fr;
    gap: 16px;
}

.match-info {
    background: #f3faf6;
    border: 1px solid #d8eee1;
    border-radius: 8px;
    padding: 13px;
    display: flex;
    gap: 10px;
    margin-top: 19px;
    color: #276c45;
}

.match-info strong,
.match-info small {
    display: block;
}

.match-info small {
    margin-top: 3px;
    color: #658071;
}

.ai-proposal {
    border-color: #bfd8e9;
}

.ai-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ai-header h2 {
    margin: 5px 0 0;
    font-size: 19px;
}

.ai-logo {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border-radius: 9px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.confidence {
    margin: 23px 0;
    background: #f7f9fa;
    border-radius: 8px;
    padding: 14px;
}

.confidence > div:first-child {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.confidence-bar {
    height: 7px;
    border-radius: 20px;
    background: #e2e7ea;
    overflow: hidden;
    margin: 9px 0 6px;
}

.confidence-fill {
    width: 97%;
    height: 100%;
    background: #3c9562;
}

.confidence small {
    color: var(--muted);
}

.posting-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.posting-row {
    display: grid;
    grid-template-columns: 125px 1fr;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.posting-row:last-child {
    border-bottom: 0;
}

.posting-row > span {
    color: var(--muted);
    font-size: 12px;
}

.posting-row strong,
.posting-row small {
    display: block;
}

.posting-row strong {
    font-size: 13px;
}

.posting-row small {
    color: var(--muted);
    margin-top: 3px;
}

.why-button {
    margin-top: 15px;
    border: 0;
    background: transparent;
    color: var(--primary);
    padding: 0;
    font-weight: bold;
}

.ai-explanation {
    margin-top: 14px;
    background: #f5f8fa;
    border-radius: 8px;
    padding: 15px;
    font-size: 13px;
    line-height: 1.5;
}

.ai-explanation p:last-child {
    margin-bottom: 0;
}

.decision-card h2 {
    margin: 7px 0 5px;
}

.decision-card > p {
    color: var(--muted);
    margin-top: 0;
}

.decision-buttons {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.approve-button {
    background: #25834d;
    color: white;
}

.edit-demo {
    margin-top: 18px;
    background: #f6f7f8;
    border-radius: 8px;
    padding: 15px;
}

.edit-demo p {
    color: var(--muted);
    line-height: 1.5;
}

.workflow-success {
    background: white;
    border: 1px solid #cde5d7;
    border-radius: 11px;
    padding: 55px 30px;
    text-align: center;
}

.success-large {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #e5f5ec;
    color: #25834d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.workflow-success p {
    color: var(--muted);
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.review-list {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 22px;
}

.review-list-header {
    padding: 17px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-list-header strong,
.review-list-header small {
    display: block;
}

.review-list-header small {
    color: var(--muted);
    margin-top: 3px;
}

.review-count {
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 20px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: bold;
}

.review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--text);
}

.review-item:hover {
    background: #fafbfc;
}

.review-item-main,
.review-item-side {
    display: flex;
    align-items: center;
    gap: 13px;
}

.review-item-main strong,
.review-item-main small {
    display: block;
}

.review-item-main small {
    color: var(--muted);
    margin-top: 4px;
}

.review-type {
    background: #f0f3f5;
    padding: 7px 9px;
    border-radius: 6px;
    font-size: 11px;
}

.confidence-pill {
    background: #e8f6ee;
    color: #277b4b;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 11px;
}

.open-arrow {
    color: var(--primary);
    font-size: 19px;
}

.hidden {
    display: none !important;
}

@media (max-width: 1150px) {
    .workflow-main-grid {
        grid-template-columns: 1fr;
    }

    .process-step small {
        display: none;
    }
}

@media (max-width: 850px) {
    .process-bar {
        overflow-x: auto;
    }

    .process-step {
        min-width: 90px;
    }

    .detail-grid,
    .bank-match {
        grid-template-columns: 1fr;
    }
}


/* ========================================================
   DATEV-KI PRÜFEN & ÄNDERN V0.4
   ======================================================== */

.inline-message {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 7px;
    background: #f5f7f8;
    color: var(--muted);
    font-size: 12px;
}

.reason-list {
    margin-top: 14px;
    display: grid;
    gap: 7px;
}

.reason-list div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reason-list span {
    color: #25834d;
    font-weight: bold;
}

.proposal-edit {
    margin-top: 20px;
}

.edit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.edit-header strong {
    font-size: 18px;
}

.edit-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.edit-badge {
    background: #fff4db;
    color: #936912;
    border-radius: 20px;
    padding: 5px 9px;
    font-size: 11px;
}

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 7px;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cfd6db;
    border-radius: 7px;
    background: white;
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus {
    outline: 2px solid #cce1f1;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.4;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.input-with-unit {
    display: flex;
    align-items: center;
    border: 1px solid #cfd6db;
    border-radius: 7px;
    background: white;
    overflow: hidden;
}

.input-with-unit input {
    border: 0;
    border-radius: 0;
}

.input-with-unit span {
    padding: 0 13px;
    color: var(--muted);
}

.beginner-warning {
    background: #fff8e8;
    border: 1px solid #ecdcae;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 17px;
}

.beginner-warning p {
    margin: 5px 0 0;
    color: #716446;
    line-height: 1.5;
    font-size: 13px;
}

.edit-actions {
    display: flex;
    gap: 9px;
    margin-top: 21px;
}

.decision-main-actions {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 9px;
    margin-top: 18px;
}

.decision-help {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 15px;
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
}

.decision-help button {
    border: 0;
    background: transparent;
    color: var(--primary);
    padding: 0;
    font-weight: bold;
}

.unsure-box {
    margin-top: 15px;
    padding: 15px;
    background: #f6f7f8;
    border-radius: 8px;
}

.unsure-box p {
    color: var(--muted);
    line-height: 1.5;
    font-size: 13px;
}

.unsure-actions {
    display: flex;
    gap: 8px;
    margin-top: 13px;
}

.decision-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.saved-notice {
    background: #e8f6ee;
    color: #277b4b;
    border: 1px solid #cce8d7;
    border-radius: 7px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: bold;
}

.success-summary {
    max-width: 570px;
    margin: 25px auto 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: left;
}

.success-summary > div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
}

.success-summary > div:last-child {
    border-bottom: 0;
}

.success-summary span {
    color: var(--muted);
    font-size: 12px;
}

.success-summary strong {
    font-size: 13px;
}

.later-success {
    border-color: #eadcb8;
}

.later-large {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fff4d9;
    color: #a27517;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
}

@media (max-width: 700px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .decision-main-actions {
        grid-template-columns: 1fr;
    }

    .edit-actions,
    .unsure-actions {
        flex-direction: column;
    }

    .decision-help {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ========================================================
   DATEV-KI BELEGE V0.5
   ======================================================== */

.documents-page-header {
    align-items: center;
}

.document-flow {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.document-flow-step {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
}

.document-flow-step > span {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    border-radius: 50%;
    background: #edf0f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.document-flow-step.active > span {
    background: var(--primary);
    color: white;
}

.document-flow-step strong,
.document-flow-step small {
    display: block;
}

.document-flow-step strong {
    font-size: 12px;
}

.document-flow-step small {
    color: var(--muted);
    margin-top: 2px;
    font-size: 10px;
}

.document-flow-arrow {
    color: #b3bbc0;
    margin: 0 12px;
}

.document-upload-panel,
.document-detail-panel {
    background: white;
    border: 1px solid #bdd7e9;
    border-radius: 10px;
    padding: 23px;
    margin-bottom: 20px;
}

.upload-panel-header,
.document-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.upload-panel-header h2,
.document-detail-header h2 {
    margin: 5px 0;
}

.upload-panel-header p {
    color: var(--muted);
    margin: 0;
}

.close-button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f1f3f4;
    font-size: 20px;
    cursor: pointer;
}

.document-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 22px 0;
}

.type-option {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 13px;
    display: flex;
    gap: 9px;
    cursor: pointer;
}

.type-option.selected {
    border-color: var(--primary);
    background: #f4f9fc;
}

.type-option input {
    margin-top: 3px;
}

.type-option strong,
.type-option small {
    display: block;
}

.type-option small {
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.35;
}

.drop-zone {
    border: 2px dashed #cbd3d8;
    border-radius: 10px;
    padding: 38px 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.15s ease;
}

.drop-zone:hover,
.drop-zone.dragging {
    border-color: var(--primary);
    background: #f7fbfd;
}

.drop-zone.has-file {
    border-color: #8cc8a7;
    background: #f6fbf8;
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
}

.drop-zone h3 {
    margin: 0 0 5px;
}

.drop-zone p {
    color: var(--muted);
    margin: 0 0 10px;
}

.supported-files {
    font-size: 10px;
    color: var(--muted);
}

.selected-file-box {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f3faf6;
}

.selected-file-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dff1e7;
    color: #26784a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-file-info {
    flex: 1;
}

.selected-file-info strong,
.selected-file-info small {
    display: block;
}

.selected-file-info small {
    color: var(--muted);
    margin-top: 3px;
}

.upload-actions {
    display: flex;
    gap: 9px;
    margin-top: 18px;
}

.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.processing-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.processing-panel strong,
.processing-panel small {
    display: block;
}

.processing-panel small {
    color: var(--muted);
    margin-top: 4px;
}

.processing-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #dfe5e8;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: datevSpin 0.8s linear infinite;
}

@keyframes datevSpin {
    to {
        transform: rotate(360deg);
    }
}

.document-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 11px;
    margin-bottom: 15px;
}

.document-stat {
    border: 1px solid var(--border);
    background: white;
    border-radius: 9px;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
}

.document-stat span,
.document-stat strong {
    display: block;
}

.document-stat span {
    color: var(--muted);
    font-size: 11px;
}

.document-stat strong {
    font-size: 22px;
    margin-top: 5px;
}

.document-stat.active {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.document-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 190px 210px;
    gap: 9px;
    margin-bottom: 14px;
}

.document-search {
    background: white;
    border: 1px solid var(--border);
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 11px;
}

.document-search input {
    width: 100%;
    border: 0;
    padding: 10px 10px 10px 0;
    outline: 0;
}

.document-toolbar select {
    border: 1px solid var(--border);
    background: white;
    border-radius: 7px;
    padding: 9px 10px;
}

.documents-list-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.documents-list-head,
.document-row {
    display: grid;
    grid-template-columns:
        minmax(250px, 1.5fr)
        150px
        110px
        170px
        90px;
    align-items: center;
    gap: 12px;
}

.documents-list-head {
    background: #f7f8f9;
    padding: 10px 16px;
    color: var(--muted);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.document-row {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
}

.document-row:hover {
    background: #fbfcfc;
}

.document-main {
    display: flex;
    align-items: center;
    gap: 11px;
}

.document-main strong,
.document-main small {
    display: block;
}

.document-main small {
    color: var(--muted);
    margin-top: 3px;
}

.document-file-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    border-radius: 7px;
    background: #eef3f6;
    color: #536873;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
}

.document-file-icon.image {
    background: #f4f0e8;
}

.document-type-pill {
    font-size: 10px;
    background: #eef4f7;
    padding: 5px 7px;
    border-radius: 15px;
}

.document-type-pill.outgoing {
    background: #eef5ec;
}

.document-type-pill.other {
    background: #f4f1e9;
}

.document-amount {
    font-weight: bold;
    font-size: 13px;
}

.status-pill {
    display: inline-block;
    padding: 5px 7px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: bold;
}

.status-ready {
    background: #e5f4eb;
    color: #277b4b;
}

.status-review {
    background: #fff1d5;
    color: #916611;
}

.status-processing {
    background: #e9f1f7;
    color: #406b88;
}

.ki-small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
    font-size: 9px;
}

.document-row-action {
    text-align: right;
}

.open-document-button {
    border: 0;
    background: transparent;
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
}

.documents-empty {
    padding: 50px 20px;
    text-align: center;
}

.documents-empty > div {
    font-size: 30px;
    color: #aeb8be;
    margin-bottom: 9px;
}

.documents-empty strong,
.documents-empty small {
    display: block;
}

.documents-empty small {
    color: var(--muted);
    margin-top: 5px;
}

.document-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.document-detail-grid > div {
    background: #f7f8f9;
    border-radius: 7px;
    padding: 12px;
}

.document-detail-grid span,
.document-detail-grid strong {
    display: block;
}

.document-detail-grid span {
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 5px;
}

.demo-notice {
    margin-top: 17px;
    padding: 14px;
    background: #fff9ea;
    border-radius: 8px;
}

.demo-notice p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

@media (max-width: 1050px) {
    .document-flow {
        overflow-x: auto;
    }

    .document-flow-step {
        min-width: 150px;
    }

    .document-type-selector {
        grid-template-columns: 1fr;
    }

    .document-toolbar {
        grid-template-columns: 1fr;
    }

    .documents-list-card {
        overflow-x: auto;
    }

    .documents-list-head,
    .document-row {
        min-width: 850px;
    }

    .document-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 650px) {
    .document-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .document-detail-grid {
        grid-template-columns: 1fr;
    }

    .upload-actions {
        flex-direction: column;
    }
}


/* ========================================================
   DATEV-KI ECHTER BELEGUPLOAD V0.6
   ======================================================== */

.real-upload-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 11px 14px;
    border: 1px solid #cde4d6;
    border-radius: 8px;
    background: #f4faf6;
}

.real-upload-info strong {
    white-space: nowrap;
    color: #277b4b;
    font-size: 12px;
}

.real-upload-info span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.document-file-icon.real {
    background: #def1e6;
    color: #26784a;
}

.real-document-row {
    background: #fbfefc;
}

.status-error {
    background: #fbe5e5;
    color: #9a3434;
}

.real-document-result {
    margin-bottom: 18px;
    padding: 22px;
    background: white;
    border: 1px solid #bcdac8;
    border-radius: 10px;
}

.real-result-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.real-result-header h2 {
    margin: 5px 0 0;
}

.real-result-status {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 18px;
    padding: 12px 14px;
    background: #f3faf6;
    border-radius: 7px;
}

.real-result-status span {
    color: var(--muted);
    font-size: 12px;
}

.real-result-grid {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 10px;
    margin-top: 13px;
}

.real-result-grid > div {
    padding: 12px;
    background: #f7f8f9;
    border-radius: 7px;
}

.real-result-grid span,
.real-result-grid strong {
    display: block;
}

.real-result-grid span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
}

.real-result-grid strong {
    font-size: 13px;
}

.real-warning {
    margin-top: 13px;
    padding: 13px 15px;
    background: #fff7e5;
    border: 1px solid #ead8aa;
    border-radius: 7px;
}

.real-warning ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.real-warning li {
    margin: 4px 0;
    color: #6f6243;
    font-size: 12px;
}

.real-result-actions {
    display: flex;
    gap: 9px;
    margin-top: 17px;
}

@media (max-width: 750px) {
    .real-upload-info {
        align-items: flex-start;
        flex-direction: column;
    }

    .real-result-grid {
        grid-template-columns: 1fr;
    }

    .real-result-actions {
        flex-direction: column;
    }
}
