html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Einheitliche, ruhige Sortierköpfe */
.table-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    color: inherit !important;
    line-height: 1.25;
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
    color: #182d76 !important;
}

.sort-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 0.9rem;
    width: 0.9rem;
    min-width: 0.9rem;
    color: #53677d;
    font-size: 0.7rem;
    line-height: 1;
}

/* Kundennamen als ruhige, großzügige Kontolinks */
.customer-account-link {
    display: block;
    width: 100%;
    min-height: 2rem;
    margin: -0.25rem -0.35rem;
    padding: 0.25rem 0.35rem;
    color: inherit;
    font-weight: 600;
    line-height: 1.5;
    text-decoration-line: underline;
    text-decoration-color: rgba(92, 102, 112, 0.42);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    border-radius: 0.3rem;
    transition:
        color 120ms ease,
        background-color 120ms ease,
        text-decoration-color 120ms ease;
}

.customer-account-link:hover {
    color: #182d76;
    background: rgba(23, 59, 99, 0.06);
    text-decoration-color: rgba(23, 59, 99, 0.7);
}

.customer-account-link:focus-visible {
    color: #182d76;
    background: rgba(23, 59, 99, 0.08);
    outline: 2px solid rgba(23, 59, 99, 0.35);
    outline-offset: 1px;
}


/* Kundenkonto-Link: dezente endgültige Darstellung */
a.customer-account-link {
    display: block;
    width: 100%;
    min-height: 2.15rem;
    margin: -0.3rem -0.4rem;
    padding: 0.3rem 0.4rem;
    color: #2f3439 !important;
    font-weight: 600;
    line-height: 1.5;
    text-decoration-line: underline !important;
    text-decoration-color: rgba(95, 102, 109, 0.42) !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 0.22em;
    border-radius: 0.3rem;
    transition:
        color 120ms ease,
        background-color 120ms ease,
        text-decoration-color 120ms ease;
}

a.customer-account-link:hover {
    color: #182d76 !important;
    background: rgba(23, 59, 99, 0.055);
    text-decoration-color: rgba(23, 59, 99, 0.72) !important;
}

a.customer-account-link:focus-visible {
    color: #182d76 !important;
    background: rgba(23, 59, 99, 0.08);
    outline: 2px solid rgba(23, 59, 99, 0.32);
    outline-offset: 1px;
}


/* Kompakter Kundenkonto-Link in Tabellen */
table a.customer-account-link {
    display: block;
    width: 100%;
    min-height: 0;
    margin: -0.08rem -0.3rem 0;
    padding: 0.08rem 0.3rem;
    line-height: 1.35;
}

/* Kompass Designsystem 2026 */

:root {
    --kompass-navy: #182d76;
    --kompass-navy-dark: #101f58;
    --kompass-blue: #30479a;
    --kompass-cyan: #4fc3f0;
    --kompass-canvas: #f7f8fa;
    --kompass-surface: #ffffff;
    --kompass-surface-soft: #fafaf8;
    --kompass-border: #dde2e5;
    --kompass-border-strong: #cdd4d9;
    --kompass-text: #20272d;
    --kompass-muted: #68737c;
    --kompass-radius: 0.75rem;
}

html,
body {
    min-height: 100%;
    color: var(--kompass-text);
    background: var(--kompass-canvas);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Helvetica Neue",
        "Segoe UI",
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #17222b;
    font-weight: 680;
    letter-spacing: -0.018em;
}

h1 {
    margin-bottom: 0.55rem;
    font-size: clamp(1.65rem, 2.3vw, 2.15rem);
    line-height: 1.18;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.16rem;
}

p.text-muted,
.text-muted {
    color: var(--kompass-muted) !important;
}

a,
.btn-link {
    color: var(--kompass-blue);
}

a:hover,
.btn-link:hover {
    color: var(--kompass-navy);
}

.card {
    background: var(--kompass-surface);
    border: 1px solid var(--kompass-border);
    border-radius: var(--kompass-radius);
    box-shadow: 0 1px 2px rgba(20, 37, 51, 0.035);
}

.card-header {
    padding: 0.85rem 1rem;
    background: var(--kompass-surface-soft);
    border-bottom: 1px solid var(--kompass-border);
    border-radius:
        var(--kompass-radius)
        var(--kompass-radius)
        0 0 !important;
}

.card-body {
    padding: 1rem;
}

.bg-light {
    background-color: var(--kompass-surface-soft) !important;
}

.border {
    border-color: var(--kompass-border) !important;
}

.rounded {
    border-radius: var(--kompass-radius) !important;
}

.btn {
    min-height: 2.45rem;
    padding: 0.48rem 0.85rem;
    font-weight: 600;
    border-radius: 0.6rem;
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        color 120ms ease,
        box-shadow 120ms ease,
        transform 120ms ease;
}

.btn-sm {
    min-height: 2rem;
    padding: 0.28rem 0.62rem;
    font-size: 0.82rem;
    border-radius: 0.5rem;
}

.btn-primary {
    color: #fff;
    background: var(--kompass-navy);
    border-color: var(--kompass-navy);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
    background: #0f3152;
    border-color: #0f3152;
}

.btn-outline-primary {
    color: var(--kompass-navy);
    border-color: #9cafbe;
}

.btn-outline-primary:hover {
    color: #fff;
    background: var(--kompass-navy);
    border-color: var(--kompass-navy);
}

.btn-outline-secondary,
.btn-secondary {
    color: #46525b;
    background: #fff;
    border-color: var(--kompass-border-strong);
}

.btn-outline-secondary:hover,
.btn-secondary:hover {
    color: #20272d;
    background: #f0f2f2;
    border-color: #b9c2c8;
}

.form-label {
    margin-bottom: 0.38rem;
    color: #39444d;
    font-size: 0.875rem;
    font-weight: 620;
}

.form-control,
.form-select {
    min-height: 2.55rem;
    color: var(--kompass-text);
    background-color: #fff;
    border-color: var(--kompass-border-strong);
    border-radius: 0.58rem;
}

.form-control::placeholder {
    color: #929ba2;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #6e9fbe;
    box-shadow: 0 0 0 0.2rem rgba(23, 111, 168, 0.14);
}

.form-check-input:checked {
    background-color: var(--kompass-navy);
    border-color: var(--kompass-navy);
}

.form-text {
    color: var(--kompass-muted);
}

.table-responsive {
    background: var(--kompass-surface);
    border: 1px solid var(--kompass-border);
    border-radius: var(--kompass-radius);
}

.table {
    margin-bottom: 0;
    color: var(--kompass-text);
    --bs-table-striped-bg: #f8f9f8;
    --bs-table-hover-bg: #f1f5f6;
}

.table > :not(caption) > * > * {
    padding: 0.78rem 0.85rem;
    border-bottom-color: var(--kompass-border);
}

.table thead th {
    color: #3b4650;
    background: #fafaf8;
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom-width: 1px;
}

.table tbody tr:last-child > * {
    border-bottom: 0;
}

.table-sort-button {
    gap: 0.35rem;
    font-size: inherit;
    letter-spacing: inherit;
}

.sort-marker {
    color: #61788a;
}

.alert {
    border-radius: var(--kompass-radius);
    border-width: 1px;
}

.badge {
    padding: 0.4em 0.62em;
    font-weight: 650;
    border-radius: 0.45rem;
}

.validation-message {
    margin-top: 0.3rem;
    color: #b42318;
    font-size: 0.84rem;
}

.invalid {
    outline: none;
    border-color: #d06b62 !important;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
    border-color: #74a78b;
}

.blazor-error-boundary::after {
    content: "Ein unerwarteter Fehler ist aufgetreten.";
}

a.customer-account-link {
    color: #2c343a !important;
    border-radius: 0.4rem;
}

a.customer-account-link:hover {
    color: var(--kompass-navy) !important;
    background: rgba(23, 59, 99, 0.055);
}

@media (max-width: 767.98px) {
    .table > :not(caption) > * > * {
        padding: 0.68rem 0.7rem;
    }

    .card-body {
        padding: 0.9rem;
    }
}



/* Einheitliche Bereichsreiter */

.section-tabs {
    display: flex;
    gap: 0.3rem;
    margin: 1.2rem 0 1.5rem;
    padding: 0.3rem;
    max-width: 100%;
    overflow-x: auto;
    background: #edf0f5;
    border: 1px solid #dbe0e8;
    border-radius: 0.72rem;
    scrollbar-width: thin;
}

.section-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 2.45rem;
    padding: 0.52rem 0.82rem;
    color: #525e69;
    font-size: 0.9rem;
    font-weight: 620;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: transparent;
    transition:
        color 120ms ease,
        background-color 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease;
}

.section-tab:hover {
    color: #182d76;
    background: rgba(255, 255, 255, 0.72);
}

.section-tab:focus-visible {
    color: #182d76;
    outline: 3px solid rgba(48, 71, 154, 0.18);
    outline-offset: 1px;
}

.section-tab.active {
    color: #182d76;
    font-weight: 680;
    background: #fff;
    border-color: rgba(24, 45, 118, 0.13);
    box-shadow:
        0 2px 8px
        rgba(24, 45, 118, 0.09);
}

@media (max-width: 640.98px) {
    .section-tabs {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }

    .section-tab {
        min-height: 2.35rem;
        padding: 0.48rem 0.72rem;
        font-size: 0.86rem;
    }
}


/* Tabellen bleiben im eigenen Scrollbereich */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}


/* Einheitliche Tabellenzeilen */
.table {
    margin-bottom: 0;
}

.table > thead > tr {
    height: 3.15rem;
}

.table > tbody > tr {
    height: 3.65rem;
}

.table > :not(caption) > * > * {
    padding: 0.7rem 0.75rem;
    vertical-align: middle;
    line-height: 1.35;
}

.table thead th {
    vertical-align: middle;
    white-space: nowrap;
}

.table td .btn {
    white-space: nowrap;
}

.table td .badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    white-space: nowrap;
}

/* Aktionsschaltflächen bleiben gleichmäßig ausgerichtet */
.table td:last-child .btn {
    min-height: 2.35rem;
}

.table td:last-child .d-flex,
.table td:last-child .btn-group {
    align-items: center;
}


/* Stabile Tabellenzellen und Kundennamen */
.table > tbody > tr > td {
    height: 3.75rem;
    min-height: 3.75rem;
    vertical-align: middle;
}

/* Kundenzellen behalten ihre Höhe auch ohne Zusatzzeile */
.table td:has(.customer-account-link),
.table td:has(.customer-name) {
    min-width: 11rem;
}

.table .customer-account-link,
.table .customer-name,
.table .customer-number {
    white-space: nowrap;
}

/* Einzeilige Kundenlinks werden nicht unnötig zusammengedrückt */
.table a.customer-account-link {
    display: flex;
    align-items: center;
    min-height: 2.5rem;
}

/* Sekundärangaben wie Kunden- oder Belegnummer */
.table .customer-number,
.table .document-number,
.table .text-muted.small,
.table small.text-muted {
    line-height: 1.2;
}

/* Leere Tabellenzellen behalten trotzdem ihre Grundfläche */
.table td:empty::after {
    content: "\00a0";
}
