﻿/*#if (SampleContent)*/
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

a, .btn-link {
    color: var(--evoi-accent);
}

.btn-primary {
    color: #fff;
    background-color: var(--evoi-accent);
    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;
}

/*#endif*/
h1:focus {
    outline: none;
}

/* Mobile: remove top padding since fixed header handles spacing */
@media (max-width: 640.98px) {
    .content {
        padding-top: 0;
    }

    .page-container {
        padding: 0;
        margin: 0;
    }

    .grid-container {
        padding: 0;
        margin: 0;
    }

    /* Hide pager on mobile — all data fits on one scrollable view */
    .e-pager {
        display: none !important;
    }

    /* Let grid columns auto-stretch to fill the width */
    .e-grid .e-table {
        table-layout: auto !important;
    }
}

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

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

.validation-message {
    color: var(--evoi-danger);
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px var(--evoi-shadow-strong);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.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."
    }

.status-bar-safe-area {
    display: none;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: var(--evoi-surface-sunken);
        width: 100%;
        z-index: 1;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
    }
}


/* Für die Symbole in der Aktionsspalte */
.e-icons {
    cursor: pointer;
    padding: 5px;
}

.e-edit:hover {
    color: var(--evoi-accent);
}

.e-delete:hover {
    color: var(--evoi-danger);
}

.e-details:hover {
    color: var(--evoi-success);
}

/* Für die "Neues Projekt"-Schaltfläche */
.e-add-icon::before {
    content: "\e823";
}

/* Modal detail page overlay */
.detail-page-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--evoi-backdrop);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Nested overlay (e.g. InvoiceItemDetail inside InvoiceCreate) */
.detail-page-container.detail-overlay-nested {
    z-index: 1100;
}

.detail-modal {
    background-color: var(--evoi-surface);
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--evoi-shadow-strong);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.detail-header {
    flex-shrink: 0;
    padding: 1.5rem;
    border-bottom: 1px solid var(--evoi-border);
    background-color: var(--evoi-surface);
    border-radius: 8px 8px 0 0;
}

.detail-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--evoi-text);
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.detail-footer {
    flex-shrink: 0;
    padding: 1.5rem;
    border-top: 1px solid var(--evoi-border);
    background-color: var(--evoi-surface);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 -2px 10px var(--evoi-shadow);
}

.detail-footer .form-actions,
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin: 0;
}

.detail-footer .btn,
.form-actions .btn {
    min-width: 100px;
}

/* Shared page layout */
.page-container {
    padding: 0.5rem;
}

/* Grid pages: constrain height so the grid fills remaining space without page scroll */
.page-container:has(.grid-container) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.grid-container {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.grid-container .e-grid {
    height: 100% !important;
}

/* Shared list item styles */
.list-item {
    padding: 5px 0;
}

.list-item .name {
    font-weight: 500;
}

.list-item .info {
    font-size: 0.8rem;
    color: var(--evoi-text-muted);
}

/* Invoice status badge styles */
.badge-draft {
    background-color: #ffc107;
    color: var(--evoi-text);
}

.badge-finalized {
    background-color: #28a745;
    color: white;
}

.badge-paid {
    background-color: #17a2b8;
    color: white;
}

.badge-cancelled {
    background-color: var(--evoi-danger);
    color: white;
}

@media (max-width: 768px) {
    .page-container {
        padding: 0.25rem;
        padding-bottom: calc(0.25rem + env(safe-area-inset-bottom));
    }

    .page-container:has(.grid-container) {
        height: calc(100dvh - 3.5rem);
    }

    .page-container h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .grid-container {
        margin-top: 0.5rem;
    }

    .grid-container .e-grid .e-gridheader {
        padding-top: 0;
    }

    .grid-container .e-grid .e-headercell {
        padding: 8px 5px;
    }

    .grid-container .e-grid .e-rowcell {
        padding: 8px 5px;
    }
}

/* iOS: header is 3rem (not 3.5rem) and subtract safe-area-bottom */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .page-container:has(.grid-container) {
            height: calc(100dvh - 3rem - env(safe-area-inset-bottom));
        }
    }
}

/* On iPad / wider phones, let standard modals use more width */
@media (min-width: 641px) and (max-width: 1024px) {
    .detail-modal { max-width: 90%; }
}

/* Wide modal variant for Settings and InvoiceCreate */
.detail-modal-wide { max-width: 900px; }

/* Seiten-Details (eigene Route) fuellen den Inhaltsbereich statt als Insel darauf zu
   liegen — die Navigation bleibt sichtbar, so wie auf der Vertragsseite. Echte Dialoge
   ueber einer Seite tragen .detail-overlay-nested und bleiben zentrierte Overlays. */
.detail-page-container:not(.detail-overlay-nested) {
    position: static;
    background-color: transparent;
    padding: 0;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}

.detail-page-container:not(.detail-overlay-nested) .detail-modal,
.detail-page-container:not(.detail-overlay-nested) .detail-modal-wide {
    max-width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

/* Header actions (hidden on desktop, shown on mobile) */
.detail-header-actions { display: none; }

/* Mobile-only invoice actions (Preview + Finalize) */
.mobile-invoice-actions { display: none; }

/* Mobile full-screen modal */
@media (max-width: 640px) {
    .detail-page-container {
        padding: 0;
        background-color: var(--evoi-surface);
        align-items: stretch;
    }

    /* Auf dem Telefon legt sich auch das Seiten-Detail wieder ueber die App-Leiste —
       sonst stuenden zwei Kopfzeilen uebereinander (App-Titel + Detail-Kopf). */
    .detail-page-container:not(.detail-overlay-nested) {
        position: fixed;
        inset: 0;
        z-index: 1000;
        height: auto;
    }

    .detail-modal {
        border-radius: 0;
        max-height: 100%;
        max-width: 100%;
        box-shadow: none;
    }

    .detail-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-radius: 0;
        padding: 0.75rem 1rem;
        padding-top: calc(0.75rem + env(safe-area-inset-top));
    }

    .detail-header h3 {
        flex: 1;
        text-align: center;
        font-size: 1.1rem;
        margin: 0;
    }

    .detail-header-actions {
        display: flex;
    }

    .detail-header-actions .toolbar-btn {
        background: none;
        border: none;
        font-size: 1.4rem;
        padding: 0.5rem;
        color: var(--evoi-accent);
        white-space: nowrap;
        line-height: 1;
    }

    .detail-header-actions .toolbar-primary {
        font-weight: 700;
    }

    .detail-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .detail-content .card {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }

    .detail-content .card-body {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .detail-footer {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .mobile-invoice-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }
}

/* ===================== Crash Fallback ===================== */
.crash-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--evoi-text-muted);
}

.crash-fallback .fa-triangle-exclamation {
    font-size: 3rem;
    color: var(--evoi-danger);
    margin-bottom: 1rem;
}

.crash-fallback p {
    margin: 0.25rem 0;
    font-size: 1.1rem;
}

.crash-hint {
    font-size: 0.9rem !important;
    color: var(--evoi-text-muted);
    margin-bottom: 1.5rem !important;
}

/* ===================== Developer Page ===================== */
.nav-link-dev {
    opacity: 0.6;
    font-style: italic;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 0.5rem;
    padding-top: 0.75rem !important;
}

.dev-tool-section {
    background: var(--evoi-warning-bg);
    border: 1px solid var(--evoi-warning-border);
    border-radius: 8px;
    padding: 1.25rem;
}

.dev-tool-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dev-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.dev-report-card {
    background: var(--evoi-surface);
    border: 1px solid var(--evoi-warning-border);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.5rem;
}

.dev-report-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.2rem;
}

.dev-report-type {
    font-family: monospace;
    font-size: 0.8rem;
}

/* ── Auth pages ─────────────────────────────────────────────────────────────── */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #1a1a2e;
    padding: 1rem;
}

.auth-card {
    background: var(--evoi-surface);
    border-radius: 14px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--evoi-accent);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.auth-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--evoi-text);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: var(--evoi-text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.auth-error {
    background: var(--evoi-danger-bg);
    border: 1px solid var(--evoi-danger-border);
    color: var(--evoi-danger-text);
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.auth-success {
    background: var(--evoi-success-bg);
    border: 1px solid var(--evoi-success-border);
    color: var(--evoi-success-text);
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-form .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--evoi-text);
    margin-bottom: 0.3rem;
}

.auth-form .form-control {
    border-radius: 8px;
    border: 1.5px solid var(--evoi-border-strong);
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form .form-control:focus {
    border-color: var(--evoi-accent);
    box-shadow: 0 0 0 3px rgba(27, 110, 194, 0.15);
    outline: none;
}

.auth-form .form-control:disabled {
    background: var(--evoi-surface-sunken);
    opacity: 0.7;
}

.auth-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.auth-btn-cancel {
    width: 100%;
    margin-top: 0.25rem;
    color: var(--evoi-text-muted);
    font-size: 0.9rem;
}

.auth-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--evoi-surface-hover);
}

.auth-footer-text {
    color: var(--evoi-text-muted);
    font-size: 0.875rem;
}

.auth-footer .btn-link {
    color: var(--evoi-accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0;
}

.auth-footer .btn-link:hover {
    text-decoration: underline;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* col-12 spans both grid columns; col-6 stays in one */
.form-row > .col-12 {
    grid-column: 1 / -1;
}

.form-group {
    width: 100%;
    min-width: 0;
}

.auth-otp-input {
    text-align: center;
    font-size: 1.75rem;
    letter-spacing: 0.6rem;
    font-weight: 700;
}

.auth-resend-btn {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    color: var(--evoi-text-muted);
    font-size: 0.875rem;
    text-align: center;
}

.auth-footer-secondary {
    color: var(--evoi-text-muted);
    font-size: 0.8rem;
}

/* Nav sign-out area */
/* ── Auth modal ──────────────────────────────────────────────────────────── */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.auth-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
}

.auth-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: var(--evoi-surface-hover);
    border-radius: 50%;
    color: var(--evoi-text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: 0;
}

.auth-modal-close:hover {
    background: var(--evoi-surface-hover);
    color: var(--evoi-text);
}

/* ── Auth wall (full-screen sign-in required) ────────────────────────────── */

.auth-wall-overlay {
    position: fixed;
    inset: 0;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.auth-wall-dialog {
    width: 100%;
    max-width: 420px;
}

.auth-wall-escape {
    margin-top: 1.25rem;
    text-align: center;
}

.auth-wall-escape-link {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
}

.auth-wall-escape-link:hover {
    color: #fff;
}

.auth-wall-escape-hint {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* Rechtliches auf der Anmelde-Wand + Dialog (Impressum/Datenschutz) */
.auth-wall-legal {
    margin-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.auth-wall-legal .btn-link {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-decoration: underline;
    vertical-align: baseline;
}

.auth-wall-legal .btn-link:hover {
    color: #fff;
}

.auth-modal-dialog.legal-dialog {
    max-width: 720px;
}

.legal-dialog-body {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.legal-text h5 {
    margin-top: 1.25rem;
}

.legal-text h6 {
    margin-top: 1rem;
}

.nav-legal-links {
    padding: 0.5rem 1rem 0;
}

.nav-legal-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.nav-legal-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ── Nav account section ─────────────────────────────────────────────────── */

.nav-account-section {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
}

.nav-user-email {
    display: block;
    padding: 0.25rem 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link-muted {
    opacity: 0.7;
    font-size: 0.875rem;
}

/* ── Workspace Switcher ───────────────────────────────────────────── */
.workspace-switcher {
    background-color: var(--evoi-shadow-strong);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.workspace-name-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    overflow: hidden;
}

.workspace-icon {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.6);
}

.workspace-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-dropdown-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workspace-select {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

.workspace-select:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

.workspace-select option {
    background-color: #1a1a2e;
    color: white;
}

/* ── Suspended Access Overlay ────────────────────────────────────── */
.suspended-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 10, 30, 0.97);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.suspended-dialog {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
    color: white;
    box-shadow: 0 20px 60px var(--evoi-backdrop);
}

.suspended-icon {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.suspended-dialog h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--evoi-surface-sunken);
}

.suspended-dialog p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.5rem;
}

.suspended-email,
.suspended-workspace {
    font-size: 0.9rem;
}

/* ── Workspace Settings Page ─────────────────────────────────────── */
.workspace-section .card-header {
    background-color: rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid var(--evoi-shadow);
}

.workspace-no-auth {
    margin: 1rem 0;
}

/* ═══════════════ Invoice Designer (Rechnungsdesign) ═══════════════ */
.designer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--evoi-border);
}
.designer-toolbar-left, .designer-toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.designer-template-select { max-width: 220px; display: inline-block; }
.designer-dirty-badge {
    background: var(--evoi-warning-bg);
    color: var(--evoi-warning-text);
    border: 1px solid var(--evoi-warning-border);
    border-radius: 4px;
    font-size: 0.78rem;
    padding: 0.2rem 0.5rem;
}
.designer-layout {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}
.designer-panel {
    flex: 0 0 420px;
    max-width: 420px;
    overflow-y: auto;
    min-height: 0;
    padding-right: 0.25rem;
}
.designer-preview {
    flex: 1;
    min-width: 0;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--evoi-border);
    border-radius: 6px;
    overflow: hidden;
}
.designer-preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--evoi-surface-sunken);
    border-bottom: 1px solid var(--evoi-border);
    font-weight: 600;
    font-size: 0.85rem;
}
.designer-preview > .designer-preview-body, .designer-preview > div:last-child { flex: 1; min-height: 0; }
.designer-section {
    border: 1px solid var(--evoi-border);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: var(--evoi-surface);
}
.designer-section > summary {
    cursor: pointer;
    padding: 0.55rem 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    user-select: none;
}
.designer-section[open] > summary { border-bottom: 1px solid var(--evoi-border); }
.designer-section-body { padding: 0.75rem; }
.designer-subsection summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.5rem 0;
}
.designer-check { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.45rem; font-size: 0.88rem; }
.designer-check-inline { display: inline-flex; align-items: center; gap: 0.25rem; margin: 0 0.25rem; font-size: 0.88rem; }
.designer-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
}
.designer-row label { margin: 0; white-space: nowrap; }
.designer-row .form-select { max-width: 140px; }
.designer-field { margin-bottom: 0.7rem; }
.designer-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
    font-size: 0.88rem;
}
.designer-field-head label { margin: 0; font-weight: 500; }
.merge-field-picker { max-width: 150px; font-size: 0.78rem; }
.designer-inforow {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}
.designer-inforow .form-control { flex: 1; }
.designer-labels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
}
.designer-hint { font-size: 0.82rem; }

/* Mobile: stack panel above preview */
@media (max-width: 900px) {
    .designer-layout { flex-direction: column; }
    .designer-panel { flex: none; max-width: none; overflow-y: visible; }
    .designer-preview { min-height: 420px; }
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
}


/* ── App-Sperre (Spec 2026-08-13, Vorhaben B) ────────────────────────── */
.app-lock-overlay {
    position: fixed;
    inset: 0;
    background: var(--surface-color, var(--evoi-surface-sunken));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* ueber allem, auch ueber der Anmeldewand */
}

.app-lock-card { text-align: center; }

.app-lock-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--bs-secondary-color, #6c757d);
    display: block;
}

/* ── Marke ────────────────────────────────────────────────────────────────────
   Outfit, selbst ausgeliefert statt von Google geladen: Die App arbeitet
   offline, und ein Schriftserver von aussen hat bei Kundendaten nichts als
   Mitwisser verloren. Eine Datei fuer alle Schnitte — Outfit ist eine variable
   Schrift, daher `font-weight: 100 900` statt einer Zeile je Gewicht.
   Die Wortmarke als Bild liegt unter img/evoi-wortmarke-*.svg: dort sind die
   Buchstaben in Kurven umgewandelt, brauchen also keine Schrift. Das ist der
   Weg fuer PDF, Druck und alles, was nicht im Browser laeuft.
   Achtung: Diese Regeln setzen die Schrift nur bereit — die Oberflaeche laeuft
   weiter auf Helvetica (siehe oben). Ein Wechsel der ganzen UI waere eine
   eigene Entscheidung. */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/Outfit-Variable-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/Outfit-Variable-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.evoi-wortmarke {
    font-family: 'Outfit', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--evoi-text);
}

/* ── Pruefmeldungen bei der Rechnung ──────────────────────────────────────────
   Vorher standen alle Fehler als eine Liste in einem <pre>-Block — Kundendaten,
   Firmendaten und Rechnung durcheinander, in Schreibmaschinenschrift. Jetzt eine
   Gruppe je Bereich, deren Ueberschrift auf die passende Bearbeitungsseite fuehrt. */
.validation-group-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    width: 100%;
    text-align: left;
}

/* Der Verweis sieht aus wie eine Ueberschrift, verhaelt sich aber wie ein Knopf:
   als <button> ausgezeichnet, damit Tastatur und Screenreader ihn finden. */
.validation-group-link {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.validation-group-link:hover .validation-group-arrow,
.validation-group-link:focus-visible .validation-group-arrow {
    transform: translateX(0.15rem);
}

.validation-group-arrow {
    margin-left: auto;
    opacity: 0.7;
    transition: transform 0.15s ease;
}

.validation-group-items {
    margin: 0.4rem 0 0;
    padding-left: 1.6rem;
}

.validation-group-items li {
    line-height: 1.5;
}
