.creditor-register-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 16px;
}

.creditor-register-title {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    justify-content: space-between;
}

.creditor-register-title span,
.creditor-register-title small,
.creditor-register-summary p,
.creditor-register-metrics span,
.creditor-register-metrics small {
    color: var(--text-muted);
    font-size: .72rem;
}

.creditor-register-title span,
.creditor-register-title strong,
.creditor-register-metrics span,
.creditor-register-metrics strong,
.creditor-register-metrics small {
    display: block;
}

.creditor-register-title strong {
    font-size: 1rem;
    margin-top: 3px;
}

.creditor-register-metrics {
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.creditor-register-metrics > div {
    padding: 12px;
}

.creditor-register-metrics > div + div {
    border-left: 1px solid var(--border-color);
}

.creditor-register-metrics strong {
    font-family: var(--font-mono);
    font-size: .92rem;
    font-variant-numeric: tabular-nums;
    margin: 4px 0 2px;
}

.creditor-register-summary p {
    line-height: 1.5;
    margin: 0;
}

.creditor-overview {
    display: grid;
    gap: 18px;
}

.creditor-heading,
.creditor-section-heading {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: space-between;
}

.creditor-heading h4,
.creditor-section-heading h4,
.creditor-section-heading h5 {
    margin: 0;
    text-wrap: balance;
}

.creditor-heading p,
.creditor-section-heading span {
    color: var(--text-muted);
    font-size: .78rem;
    margin: 4px 0 0;
}

.creditor-type,
.creditor-review,
.creditor-record {
    border-radius: 999px;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 650;
    line-height: 1;
    padding: 6px 9px;
}

.creditor-type {
    background: color-mix(in srgb, var(--accent-primary) 18%, transparent);
    color: var(--accent-primary);
    margin-bottom: 7px;
}

.creditor-review {
    background: color-mix(in srgb, var(--accent-warning) 15%, transparent);
    color: var(--accent-warning);
}

.creditor-review--bestaetigt,
.creditor-record--primaer {
    background: color-mix(in srgb, var(--accent-success) 15%, transparent);
    color: var(--accent-success);
}

.creditor-record--belegkopie,
.creditor-record--unterstuetzend {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.creditor-record--pruefen {
    background: color-mix(in srgb, var(--accent-danger) 14%, transparent);
    color: var(--accent-danger);
}

.creditor-metrics {
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.creditor-metrics--evidence {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.creditor-metrics .is-pending strong {
    color: var(--accent-warning);
}

.creditor-metrics > div {
    min-width: 0;
    padding: 14px 16px;
}

.creditor-metrics > div + div {
    border-left: 1px solid var(--border-color);
}

.creditor-metrics span,
.creditor-metrics small {
    color: var(--text-muted);
    display: block;
    font-size: .72rem;
}

.creditor-metrics strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    margin: 5px 0 2px;
}

.creditor-metrics .is-open strong,
.creditor-gap,
.creditor-file-missing {
    color: var(--accent-warning);
}

.creditor-metrics .is-clear strong {
    color: var(--accent-success);
}

.creditor-evidence-note {
    background: color-mix(in srgb, var(--accent-primary) 8%, var(--bg-secondary));
    border: 1px solid color-mix(in srgb, var(--accent-primary) 30%, var(--border-color));
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: .78rem;
    line-height: 1.55;
    padding: 10px 12px;
}

.creditor-missing-originals {
    background: color-mix(in srgb, var(--accent-warning) 7%, var(--bg-primary));
    border: 1px solid color-mix(in srgb, var(--accent-warning) 36%, var(--border-color));
    border-radius: var(--radius-md);
    padding: 14px;
}

.creditor-missing-table td:first-child small,
.creditor-missing-table td:nth-child(6) small {
    color: var(--text-muted);
    display: block;
    font-size: .68rem;
    margin-top: 3px;
}

.creditor-payment-ok {
    color: var(--accent-success);
    font-weight: 700;
}

@media (max-width: 1100px) {
    .creditor-metrics--evidence {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .creditor-metrics--evidence > div + div {
        border-left: 0;
    }
}

.creditor-section {
    display: grid;
    gap: 10px;
}

.creditor-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-width: 100%;
    overflow-x: auto;
}

.creditor-table {
    border-collapse: collapse;
    font-size: .78rem;
    min-width: 760px;
    width: 100%;
}

.creditor-table th,
.creditor-table td {
    border-bottom: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

.creditor-table th {
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: .7rem;
    font-weight: 650;
}

.creditor-table td:nth-last-child(-n+4),
.creditor-table th:nth-last-child(-n+4) {
    font-variant-numeric: tabular-nums;
}

.creditor-table tr:last-child td {
    border-bottom: 0;
}

.creditor-document-table {
    min-width: 960px;
}

.creditor-document-list {
    border-top: 1px solid var(--border-color);
}

.creditor-document-row {
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) auto minmax(110px, auto);
    padding: 10px 2px;
}

.creditor-document-row div > span {
    color: var(--text-muted);
    display: block;
    font-size: .72rem;
    margin-top: 3px;
}

.creditor-document-row > strong {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.creditor-empty,
.creditor-file-missing {
    font-size: .78rem;
}

.creditor-empty {
    color: var(--text-muted);
    padding: 18px;
    text-align: center;
}

@media (max-width: 820px) {
    .creditor-register-metrics {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
    .creditor-register-metrics > div + div {
        border-left: 0;
    }
    .creditor-register-metrics > div:nth-child(even) {
        border-left: 1px solid var(--border-color);
    }
    .creditor-register-metrics > div:nth-child(n + 3) {
        border-top: 1px solid var(--border-color);
    }
    .creditor-metrics {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
    .creditor-metrics > div + div {
        border-left: 0;
    }
    .creditor-metrics > div:nth-child(even) {
        border-left: 1px solid var(--border-color);
    }
    .creditor-metrics > div:nth-child(n + 3) {
        border-top: 1px solid var(--border-color);
    }
    .creditor-document-row {
        grid-template-columns: 1fr auto;
    }
    .creditor-document-row > :last-child {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .creditor-overview *,
    .creditor-overview *::before,
    .creditor-overview *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
