@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

:root {
    --goe-blue: #0788d1;
    --goe-blue-dark: #006fb8;
    --goe-blue-soft: #e8f4fb;
    --goe-text: #122235;
    --goe-muted: #68798a;
    --goe-border: #dce5ec;
    --goe-panel: rgba(255, 255, 255, 0.96);
    --goe-panel-strong: #edf3f7;
    --goe-sidebar: rgba(247, 249, 251, 0.96);
    --goe-table-shade: #f5f8fa;
    --goe-shadow-small: 0 4px 14px rgba(13, 46, 72, 0.06);
    --goe-shadow-medium: 0 18px 46px rgba(13, 46, 72, 0.09);
    --goe-shadow-large: 0 28px 80px rgba(13, 46, 72, 0.14);
}

/* Grundlayout */

html {
    min-height: 100%;
    background: #f3f6f9;
}

html,
body {
    min-height: 100%;
    margin: 0;
    font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
    color: var(--goe-text);
    background: radial-gradient( circle at 52% -8%, rgba(75, 159, 222, 0.16), transparent 34rem ), linear-gradient( 180deg, #f7f9fb 0%, #f1f5f8 100% );
}

body {
    font-size: 16px;
    line-height: 1.5;
}

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

a {
    transition: color 150ms ease;
}

    a:hover {
        color: var(--goe-blue);
    }

button,
input,
select,
textarea {
    font: inherit;
}

/* Typografie */

h1,
h2,
h3 {
    color: var(--goe-text);
    letter-spacing: -0.025em;
}

h1 {
    margin-bottom: 0.4rem;
    font-size: clamp(1.9rem, 2.4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.08;
}

    h1:focus {
        outline: none;
    }

h2,
h3 {
    font-weight: 700;
}

main h2 {
    font-size: 1.3rem;
    line-height: 1.25;
}

.content {
    padding-top: 2.1rem;
    padding-bottom: 3rem;
}

/* Seitenkopf */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.6rem;
}

    .page-header h1 {
        margin: 0 0 0.3rem;
    }

    .page-header p {
        margin: 0;
        color: var(--goe-muted);
        font-size: 0.96rem;
        line-height: 1.45;
    }

.app-version {
    padding: 0.5rem 0.85rem;
    border: 1px solid rgba(15, 48, 72, 0.06);
    border-radius: 999px;
    color: var(--goe-muted);
    background: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    box-shadow: var(--goe-shadow-small);
}

/* Buttons */

.btn-primary,
.file-upload-button,
.print-button {
    min-height: 48px;
    padding: 0.75rem 1.15rem;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient( 135deg, var(--goe-blue), var(--goe-blue-dark) );
    font-size: 0.94rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(0, 112, 184, 0.20);
    transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

    .btn-primary:hover,
    .file-upload-button:hover,
    .print-button:hover {
        color: #ffffff;
        background: linear-gradient( 135deg, var(--goe-blue), var(--goe-blue-dark) );
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(0, 112, 184, 0.25);
    }

    .btn-primary:active,
    .file-upload-button:active,
    .print-button:active {
        transform: translateY(0);
    }

    .btn-primary:disabled,
    .file-upload-button:disabled,
    .print-button:disabled,
    button:disabled {
        color: #8b98a5;
        background: #e5ecf2;
        box-shadow: none;
        opacity: 1;
        cursor: not-allowed;
        transform: none;
    }

/* Formulare */

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--goe-border);
    border-radius: 13px;
    color: var(--goe-text);
    background: #ffffff;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
    select:focus,
    textarea:focus {
        border-color: var(--goe-blue);
        box-shadow: 0 0 0 4px rgba(7, 136, 209, 0.12);
    }

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

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

.validation-message {
    color: #b42318;
}

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

/* Hauptkarten */

.goe-panel,
.billing-document,
.dashboard-section {
    border: 1px solid rgba(18, 52, 78, 0.065);
    border-radius: 26px;
    background: var(--goe-panel);
    box-shadow: var(--goe-shadow-medium);
    backdrop-filter: blur(14px);
}

.goe-panel {
    padding: 1.6rem;
}

/* Kennzahlen */

.metric-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.metric-card {
    padding: 1.2rem 1.3rem;
    border: 1px solid rgba(18, 52, 78, 0.075);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: none;
}

    .metric-card span {
        display: block;
        margin-bottom: 0.35rem;
        color: var(--goe-muted);
        font-weight: 700;
    }

    .metric-card strong {
        display: block;
        font-size: 1.45rem;
        font-weight: 700;
    }

/* Tabellen */

.data-table,
.billing-master-data,
.billing-table,
.billing-summary-table {
    width: 100%;
    border: 1px solid var(--goe-border);
    border-radius: 17px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #ffffff;
    font-size: 0.92rem;
    box-shadow: none;
}

.data-table {
    margin: 0;
}

.billing-master-data,
.billing-table,
.billing-summary-table {
    margin-bottom: 1.15rem;
}

    .data-table thead,
    .data-table thead tr,
    .data-table thead th,
    .billing-table thead,
    .billing-table thead tr,
    .billing-table thead th {
        background: var(--goe-table-shade);
    }

    .data-table th,
    .data-table td,
    .billing-master-data th,
    .billing-master-data td,
    .billing-table th,
    .billing-table td,
    .billing-summary-table th,
    .billing-summary-table td {
        padding: 0.9rem 1rem;
        border-bottom: 1px solid var(--goe-border);
        vertical-align: middle;
    }

    .data-table th,
    .billing-master-data th,
    .billing-table th,
    .billing-summary-table th {
        color: var(--goe-muted);
        font-size: 0.88rem;
        font-weight: 700;
    }

    .data-table tbody tr,
    .billing-table tbody tr {
        transition: background-color 140ms ease;
    }

        .data-table tbody tr:hover,
        .billing-table tbody tr:hover {
            background: #f7fbfe;
        }

        .data-table tr:last-child th,
        .data-table tr:last-child td,
        .billing-master-data tr:last-child th,
        .billing-master-data tr:last-child td,
        .billing-table tbody tr:last-child td,
        .billing-summary-table tr:last-child th,
        .billing-summary-table tr:last-child td {
            border-bottom: 0;
        }

.empty-table-cell {
    padding: 2rem 1rem !important;
    color: var(--goe-muted);
    background: #ffffff;
    font-weight: 700;
    text-align: center;
}

/* Import */

.import-upload-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(18, 52, 78, 0.075);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: none;
}

    .import-upload-card span {
        display: block;
        margin-bottom: 0.25rem;
        color: var(--goe-muted);
        font-weight: 700;
    }

    .import-upload-card strong {
        display: block;
        font-size: 1.1rem;
        font-weight: 700;
    }

    .import-upload-card p {
        margin: 0.3rem 0 0;
        color: var(--goe-muted);
    }

.import-upload-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-upload-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    overflow: hidden;
    cursor: pointer;
}

    .file-upload-button input[type="file"] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }

/* Dashboard */

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.25rem;
    padding: 1.7rem;
    border: 1px solid rgba(18, 52, 78, 0.065);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(13, 46, 72, 0.065);
}

.dashboard-kicker,
.dashboard-card-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--goe-muted);
    font-weight: 700;
}

.dashboard-hero h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
}

.dashboard-hero p {
    margin: 0.4rem 0 0;
    color: var(--goe-muted);
    font-size: 0.94rem;
}

.dashboard-period {
    min-width: 240px;
    padding: 1.15rem 1.4rem;
    border: 1px solid rgba(18, 52, 78, 0.065);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: none;
}

    .dashboard-period span,
    .dashboard-period small {
        display: block;
        color: var(--goe-muted);
        font-weight: 600;
    }

    .dashboard-period strong {
        display: block;
        margin: 0.2rem 0;
        font-size: 1.45rem;
        font-weight: 700;
    }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dashboard-card {
    padding: 1.3rem;
    border: 1px solid rgba(18, 52, 78, 0.065);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(13, 46, 72, 0.055);
}

    .dashboard-card strong {
        display: block;
        margin-bottom: 0.2rem;
        font-size: 1.45rem;
        font-weight: 700;
    }

    .dashboard-card p {
        margin: 0;
        color: var(--goe-muted);
        font-size: 0.91rem;
    }

.dashboard-section {
    margin-bottom: 1.25rem;
    padding: 1.45rem;
}

.dashboard-section-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.dashboard-section-header p {
    margin: 0.25rem 0 1.1rem;
    color: var(--goe-muted);
    font-size: 0.92rem;
}

.status-list {
    overflow: hidden;
    border: 1px solid var(--goe-border);
    border-radius: 17px;
    background: #ffffff;
    box-shadow: none;
}

.status-row {
    display: grid;
    grid-template-columns: 28% 72%;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--goe-border);
}

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

    .status-row span {
        color: var(--goe-muted);
        font-size: 0.9rem;
        font-weight: 700;
    }

    .status-row strong {
        font-size: 0.9rem;
        font-weight: 500;
    }

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-action {
    display: block;
    padding: 1.2rem;
    border: 1px solid rgba(18, 52, 78, 0.065);
    border-radius: 19px;
    color: var(--goe-text);
    background: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(13, 46, 72, 0.045);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

    .dashboard-action:hover {
        border-color: rgba(7, 136, 209, 0.18);
        color: var(--goe-text);
        transform: translateY(-1px);
        box-shadow: 0 10px 26px rgba(13, 46, 72, 0.07);
    }

    .dashboard-action span {
        display: block;
        margin-bottom: 0.3rem;
        font-size: 0.94rem;
        font-weight: 700;
    }

    .dashboard-action small {
        color: var(--goe-muted);
        font-size: 0.83rem;
        font-weight: 600;
    }

/* Abrechnung */

.billing-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.billing-period-selector {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) minmax(240px, 1.2fr) minmax(150px, 0.6fr) minmax(170px, 0.7fr);
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.45rem;
    border: 1px solid rgba(18, 52, 78, 0.055);
    border-radius: 22px;
    background: rgba(236, 243, 248, 0.92);
    box-shadow: none;
}

    .billing-period-selector label {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 0.65rem;
        min-width: 0;
        margin: 0;
        padding: 0.35rem 0.55rem;
        color: var(--goe-muted);
        font-size: 0.9rem;
        font-weight: 700;
    }

    .billing-period-selector select {
        appearance: none;
        width: 100%;
        min-width: 0;
        padding: 0.65rem 2.2rem 0.65rem 0.9rem;
        border: 0;
        border-radius: 16px;
        color: var(--goe-text);
        background-color: #ffffff;
        background-image: linear-gradient( 45deg, transparent 50%, var(--goe-muted) 50% ), linear-gradient( 135deg, var(--goe-muted) 50%, transparent 50% );
        background-position: calc(100% - 17px) 50%, calc(100% - 11px) 50%;
        background-size: 6px 6px, 6px 6px;
        background-repeat: no-repeat;
        font-weight: 700;
        outline: 0;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(20, 30, 40, 0.08);
    }

        .billing-period-selector select:focus {
            box-shadow: 0 0 0 3px rgba(0, 118, 189, 0.12);
        }

.document-tabs {
    display: inline-flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding: 0.35rem;
    border: 1px solid rgba(18, 52, 78, 0.055);
    border-radius: 20px;
    background: rgba(236, 243, 248, 0.92);
    box-shadow: none;
}

.document-tab {
    padding: 0.65rem 1.25rem;
    border: 0;
    border-radius: 16px;
    color: var(--goe-muted);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

    .document-tab.active {
        color: var(--goe-text);
        background: #ffffff;
        box-shadow: 0 2px 6px rgba(20, 30, 40, 0.08);
    }

.billing-document {
    padding: 1.7rem;
}

.billing-document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

    .billing-document-header h2 {
        margin: 0 0 0.25rem;
        font-size: 1.45rem;
        font-weight: 700;
    }

    .billing-document-header p {
        margin: 0;
        color: var(--goe-muted);
        font-size: 0.92rem;
    }

.billing-master-data th:nth-child(1),
.billing-master-data th:nth-child(3) {
    width: 15%;
}

.billing-master-data td:nth-child(2),
.billing-master-data td:nth-child(4) {
    width: 35%;
}

.billing-summary-table th {
    width: 34%;
}

.billing-summary-table td {
    width: 66%;
}

.calculation-box {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--goe-border);
    border-radius: 16px;
    color: var(--goe-muted);
    background: #f8fafc;
    font-size: 0.9rem;
    box-shadow: none;
}

.billing-footer {
    padding: 1rem;
    border: 1px solid var(--goe-border);
    border-radius: 17px;
    color: var(--goe-muted);
    background: #ffffff;
    font-size: 0.88rem;
    box-shadow: none;
}

    .billing-footer dl {
        display: grid;
        grid-template-columns: 7.2rem 1fr;
        column-gap: 0.65rem;
        row-gap: 0.35rem;
    }

    .billing-footer dt {
        font-weight: 700;
    }

    .billing-footer dd {
        margin: 0;
    }

.billing-footer-app {
    margin-top: 0.9rem;
}

/* Fehleranzeige */

.blazor-error-boundary {
    padding: 1rem;
    border-radius: 12px;
    color: #ffffff;
    background: #b42318;
}

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

/* Tablet */

@media (max-width: 900px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .metric-row,
    .dashboard-grid,
    .dashboard-actions {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .status-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .billing-period-selector {
        grid-template-columns: 1fr;
    }

        .billing-period-selector label {
            grid-template-columns: 90px 1fr;
        }

    .billing-document {
        padding: 1rem;
    }

    .billing-master-data,
    .billing-table,
    .billing-summary-table {
        display: block;
        overflow-x: auto;
    }
}

/* Mobil */

@media (max-width: 640.98px) {
    main .page-header {
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1.2rem;
    }

        main .page-header h1 {
            font-size: 1.8rem;
        }

        main .page-header p {
            font-size: 0.9rem;
        }

    main h2 {
        font-size: 1.18rem;
    }

    .goe-panel,
    .billing-document,
    .dashboard-section,
    .dashboard-hero {
        border-radius: 20px;
    }

    .goe-panel {
        padding: 1rem;
    }

    .dashboard-hero {
        padding: 1.25rem;
    }

    .dashboard-grid,
    .metric-row,
    .dashboard-actions {
        grid-template-columns: 1fr;
    }

    .dashboard-card,
    .metric-card,
    .dashboard-action {
        border-radius: 16px;
    }

    .import-upload-card {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .import-upload-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .file-upload-button {
        width: 100%;
    }

    .billing-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

        .billing-header-actions .print-button {
            width: 100%;
            min-width: 0;
        }

    .billing-period-selector {
        grid-template-columns: 1fr;
        border-radius: 18px;
    }

        .billing-period-selector label {
            grid-template-columns: 5.5rem minmax(0, 1fr);
        }

    .document-tabs {
        display: flex;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .billing-document {
        padding: 1rem;
    }

    .billing-document-header {
        display: block;
    }

    .data-table,
    .billing-master-data,
    .billing-table,
    .billing-summary-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .status-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .billing-footer dl {
        grid-template-columns: 1fr;
        row-gap: 0.15rem;
    }

    .billing-footer dd {
        margin-bottom: 0.55rem;
    }
}

/* Druck / PDF */

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    html,
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 8.6pt;
    }

    .sidebar,
    .top-row,
    .page-header,
    .billing-period-selector,
    .document-tabs,
    .print-button,
    .dashboard-hero,
    .dashboard-grid,
    .dashboard-section,
    .dashboard-actions {
        display: none !important;
    }

    .page,
    main,
    article,
    .content {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .billing-document {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }

    .billing-document-header {
        display: block !important;
        margin-bottom: 6mm;
    }

        .billing-document-header h2 {
            margin: 0 0 2mm;
            color: #000000 !important;
            font-size: 16pt;
            font-weight: 700;
        }

        .billing-document-header p {
            margin: 0;
            color: #404852 !important;
            font-size: 9.2pt;
        }

    .billing-master-data,
    .billing-table,
    .billing-summary-table {
        display: table !important;
        width: 100% !important;
        margin-bottom: 4mm;
        border: 1px solid #aeb5bd;
        border-radius: 0 !important;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
        page-break-inside: avoid;
        box-shadow: none !important;
    }

        .billing-master-data th,
        .billing-master-data td,
        .billing-table th,
        .billing-table td,
        .billing-summary-table th,
        .billing-summary-table td {
            padding: 2mm 2.4mm !important;
            border-bottom: 1px solid #aeb5bd !important;
            vertical-align: top;
            font-size: 8.6pt;
        }

        .billing-master-data tr:last-child th,
        .billing-master-data tr:last-child td,
        .billing-table tbody tr:last-child td,
        .billing-summary-table tr:last-child th,
        .billing-summary-table tr:last-child td {
            border-bottom: 0 !important;
        }

        .billing-master-data th,
        .billing-summary-table th,
        .billing-table th {
            color: #5f6b77 !important;
            background: #dfe2e5 !important;
            font-weight: 700 !important;
        }

            .billing-master-data th:nth-child(1) {
                width: 15%;
            }

        .billing-master-data td:nth-child(2) {
            width: 35%;
        }

        .billing-master-data th:nth-child(3) {
            width: 12%;
        }

        .billing-master-data td:nth-child(4) {
            width: 38%;
        }

        .billing-summary-table th {
            width: 34%;
        }

        .billing-summary-table td {
            width: 66%;
        }

    .calculation-box {
        margin-bottom: 4mm;
        padding: 2.3mm 2.4mm !important;
        border: 1px solid #aeb5bd;
        border-radius: 0 !important;
        color: #404852 !important;
        background: #ffffff !important;
        font-size: 8.5pt;
        page-break-inside: avoid;
        box-shadow: none !important;
    }

    .billing-footer {
        padding: 2.3mm 2.4mm !important;
        border: 1px solid #aeb5bd;
        border-radius: 0 !important;
        color: #404852 !important;
        background: #ffffff !important;
        font-size: 8pt;
        page-break-inside: avoid;
        box-shadow: none !important;
    }

        .billing-footer dl {
            display: grid;
            grid-template-columns: 7.2rem 1fr;
            column-gap: 0.65rem;
            row-gap: 0.35rem;
        }

        .billing-footer dt {
            font-weight: 700;
        }

        .billing-footer dd {
            margin: 0;
        }

    .billing-footer-app {
        margin-top: 2.6mm;
    }
}


/* ===== v0.9.2 MOBILE RESTORE ===== */
html {
    -webkit-text-size-adjust: 100%;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 640.98px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    button,
    input,
    select,
    textarea {
        font-size: 16px;
    }

    button,
    .btn,
    a[role="button"] {
        touch-action: manipulation;
    }

    input,
    select,
    textarea {
        max-width: 100%;
    }

    textarea {
        resize: vertical;
    }

    dialog,
    [role="dialog"],
    .reconnect-dialog {
        box-sizing: border-box;
        width: calc(100vw - 1.5rem);
        max-width: calc(100vw - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
        margin: auto;
        overflow: auto;
        overscroll-behavior: contain;
    }

    .billing-table-shell,
    .charging-table-shell,
    .import-history-table-shell {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .billing-table,
    .billing-summary-table,
    .charging-table,
    .import-history-table {
        min-width: 720px;
    }
}

@supports (-webkit-touch-callout: none) {
    @media (max-width: 640.98px) {
        input,
        select,
        textarea {
            font-size: 16px !important;
        }

        .content,
        .nav-scrollable {
            padding-bottom: max(env(safe-area-inset-bottom), 0px);
        }
    }
}


/* ===== v0.9.2 DARK MODE ===== */

html[data-theme="dark"] {
    --goe-blue: #38a8ea;
    --goe-blue-dark: #63b9ec;
    --goe-blue-soft: #102f43;
    --goe-text: #e9f0f5;
    --goe-muted: #9fb0bd;
    --goe-border: #2b3f4f;
    --goe-panel: rgba(24, 38, 49, 0.97);
    --goe-panel-strong: #223542;
    --goe-sidebar: rgba(20, 33, 43, 0.98);
    --goe-table-shade: #1c2d38;
    --goe-shadow-small: 0 4px 14px rgba(0, 0, 0, 0.18);
    --goe-shadow-medium: 0 18px 46px rgba(0, 0, 0, 0.24);
    --goe-shadow-large: 0 28px 80px rgba(0, 0, 0, 0.3);
    background: #101820;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    color: var(--goe-text);
    background:
        radial-gradient(
            circle at 52% -8%,
            rgba(18, 105, 157, 0.23),
            transparent 34rem),
        linear-gradient(
            180deg,
            #111c24 0%,
            #0f181f 100%);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] strong {
    color: #edf4f8;
}

html[data-theme="dark"] a,
html[data-theme="dark"] .btn-link {
    color: #69bdec;
}

html[data-theme="dark"] a:hover {
    color: #8fcff3;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    color: #e8f0f5;
    border-color: #334957 !important;
    background: #172630 !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #718796;
}

html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled {
    color: #8798a4 !important;
    background: #1a2832 !important;
}

html[data-theme="dark"] option {
    color: #e8f0f5;
    background: #172630;
}

/* Layout / Navigation */
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .top-row,
html[data-theme="dark"] .nav-scrollable {
    border-color: #293c49 !important;
    background:
        linear-gradient(
            180deg,
            #17252f 0%,
            #121f28 100%) !important;
}

html[data-theme="dark"] .nav-item .nav-link {
    color: #aab9c4 !important;
}

html[data-theme="dark"] .nav-item .nav-link:hover {
    color: #e9f2f7 !important;
    background: #213745 !important;
}

html[data-theme="dark"] .nav-item .nav-link.active {
    color: #7cc7f1 !important;
    background: #17384c !important;
}

html[data-theme="dark"] .user-panel,
html[data-theme="dark"] .app-information {
    border-color: #2a3d49 !important;
}

html[data-theme="dark"] .user-panel-main,
html[data-theme="dark"] .logout-button {
    color: #dce8ef !important;
    background: #192a35 !important;
}

html[data-theme="dark"] .logout-button:hover {
    background: #223845 !important;
}

/* Shared cards / panels */
html[data-theme="dark"] :is(
    .dashboard-date-panel,
    .dashboard-metric-card,
    .dashboard-information-card,
    .dashboard-panel,
    .dashboard-clean-energy,
    .charging-panel,
    .import-panel,
    .import-upload-card,
    .import-overview-panel,
    .billing-document,
    .document-card,
    .settings-card,
    .general-settings-panel,
    .general-settings-plan,
    .system-panel,
    .system-section,
    .device-card,
    .device-detail,
    .device-form-card,
    .admin-user-card,
    .admin-user-detail,
    .admin-user-form-section,
    .admin-user-tariff-section,
    .admin-company-card,
    .admin-company-detail,
    .roles-panel,
    .general-settings-loading) {
    color: #dce8ef !important;
    border-color: #2b404e !important;
    background: #172630 !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] :is(
    .dashboard-header p,
    .dashboard-date,
    .dashboard-time,
    .dashboard-metric-label,
    .dashboard-information-card p,
    .charging-header p,
    .import-page-header p,
    .billing-header p,
    .documents-header p,
    .settings-header p,
    .general-settings-header p,
    .general-settings-section-heading p,
    .general-settings-row-content span,
    .general-settings-plan-content p,
    .system-header p,
    .system-setting-description,
    .device-header p,
    .admin-users-header p,
    .admin-companies-header p,
    .roles-header p) {
    color: #9babb7 !important;
}

html[data-theme="dark"] :is(
    .dashboard-header h1,
    .charging-header h1,
    .import-page-header h1,
    .billing-header h1,
    .documents-header h1,
    .settings-header h1,
    .general-settings-header h1,
    .general-settings-section-heading h2,
    .system-header h1,
    .device-header h1,
    .admin-users-header h1,
    .admin-companies-header h1,
    .roles-header h1) {
    color: #edf4f8 !important;
}

/* Buttons */
html[data-theme="dark"] :is(
    .dashboard-refresh-button,
    .charging-refresh-button,
    .charging-reset-button,
    .maintenance-refresh-button,
    .document-action-button,
    .general-settings-button,
    .device-secondary-button,
    .admin-user-secondary-button,
    .admin-company-secondary-button) {
    color: #cfe0ea !important;
    border-color: #39505e !important;
    background: #1b2d38 !important;
}

html[data-theme="dark"] :is(
    .dashboard-refresh-button,
    .charging-refresh-button,
    .maintenance-refresh-button,
    .document-action-button):hover:not(:disabled) {
    background: #243945 !important;
}

html[data-theme="dark"] :is(
    .dashboard-refresh-button.is-success,
    .charging-refresh-button.is-success,
    .maintenance-refresh-button.is-success) {
    color: #8bd1a6 !important;
    border-color: #315a42 !important;
    background: #183526 !important;
}

/* Tables */
html[data-theme="dark"] :is(
    table,
    .billing-table,
    .billing-summary-table,
    .charging-table,
    .import-history-table) {
    color: #dce8ef !important;
    background: #172630 !important;
}

html[data-theme="dark"] :is(
    table thead,
    .billing-table thead,
    .charging-table thead,
    .import-history-table thead) {
    color: #aebdc7 !important;
    background: #1c2e39 !important;
}

html[data-theme="dark"] :is(
    table th,
    table td,
    .billing-table th,
    .billing-table td,
    .charging-table th,
    .charging-table td,
    .import-history-table th,
    .import-history-table td) {
    border-color: #2a3e4b !important;
}

html[data-theme="dark"] :is(
    table tbody tr:hover,
    .charging-table tbody tr:hover,
    .import-history-table tbody tr:hover) {
    background: #1d313d !important;
}

/* Settings */
html[data-theme="dark"] .general-settings-divider,
html[data-theme="dark"] .system-divider {
    background: #293d49 !important;
}

html[data-theme="dark"] .general-settings-feature-note {
    color: #c8d8e2 !important;
    border-color: #27506a !important;
    background: #152e3e !important;
}

html[data-theme="dark"] .general-settings-feature-note strong {
    color: #d9e8f1 !important;
}

html[data-theme="dark"] .general-settings-feature-note span:not(.general-settings-version-badge) {
    color: #9fb0bc !important;
}

html[data-theme="dark"] .general-settings-plan-icon,
html[data-theme="dark"] .general-settings-feature-icon {
    color: #73c3ef !important;
    background: #17394d !important;
}

html[data-theme="dark"] .general-settings-plan-badge,
html[data-theme="dark"] .general-settings-version-badge,
html[data-theme="dark"] .general-settings-coming-soon {
    color: #a8cfe6 !important;
    border-color: #305268 !important;
    background: #1a3545 !important;
}

html[data-theme="dark"] .general-settings-switch-slider {
    background: #43535d !important;
}

html[data-theme="dark"] .general-settings-switch input:checked +
.general-settings-switch-slider {
    background: #0785d1 !important;
}

html[data-theme="dark"] .system-decimal-spinner {
    border-color: #314651 !important;
    background: #1b2d37 !important;
}

html[data-theme="dark"] .system-decimal-spinner button {
    color: #9eb0bb !important;
}

html[data-theme="dark"] .system-decimal-spinner button:hover {
    color: #e2edf3 !important;
    background: #263b47 !important;
}

/* Dashboard */
html[data-theme="dark"] .dashboard-hero,
html[data-theme="dark"] .dashboard-quick-action,
html[data-theme="dark"] .dashboard-cloud-sync-card {
    border-color: #2b404e !important;
    background: #172630 !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] .dashboard-quick-action:hover,
html[data-theme="dark"] .dashboard-cloud-sync-card:hover {
    background: #1d313d !important;
}

html[data-theme="dark"] .dashboard-metric-value,
html[data-theme="dark"] .dashboard-quick-action strong,
html[data-theme="dark"] .dashboard-clean-energy strong {
    color: #eef5f9 !important;
}

/* Import */
html[data-theme="dark"] .import-source-radio,
html[data-theme="dark"] .import-cloud-card {
    color: #d9e6ee !important;
    border-color: #2d4351 !important;
    background: #172630 !important;
}

html[data-theme="dark"] .import-source-radio:hover,
html[data-theme="dark"] .import-cloud-card:hover {
    background: #1d313d !important;
}

/* Documents */
html[data-theme="dark"] .document-meta,
html[data-theme="dark"] .document-values {
    color: #9fb0bc !important;
}

/* Error / Blazor UI */
html[data-theme="dark"] #blazor-error-ui {
    color: #f4d7d8;
    border-color: #674044;
    background: #3a2226;
}

/* Scrollbars */
html[data-theme="dark"] {
    scrollbar-color: #405866 #14232c;
}

html[data-theme="dark"] ::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #14232c;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    border: 2px solid #14232c;
    border-radius: 999px;
    background: #405866;
}

/* Print/PDF stays light regardless of UI theme */
@media print {
    html[data-theme="dark"],
    html[data-theme="dark"] body,
    html[data-theme="dark"] .billing-document {
        color: #122235 !important;
        background: #ffffff !important;
    }
}


/* ===== v0.9.2 DARK MODE – APP COMPLETE ===== */

:root[data-theme="dark"] {
    --dm-bg: #0d171e;
    --dm-bg-soft: #101b23;
    --dm-sidebar: #142630;
    --dm-panel: #182a35;
    --dm-panel-2: #1c313d;
    --dm-panel-3: #213946;
    --dm-border: #2d4452;
    --dm-border-soft: #263b47;
    --dm-text: #edf4f8;
    --dm-text-soft: #c8d7e0;
    --dm-muted: #9fb0bd;
    --dm-muted-2: #8498a6;
    --dm-blue: #39a9ea;
    --dm-blue-soft: #173c50;
    --dm-green: #79d69a;
    --dm-green-bg: #183829;
    --dm-yellow: #e1bd68;
    --dm-yellow-bg: #3d331c;
    --dm-red: #ef9fa6;
    --dm-red-bg: #42272c;
}

/* Foundation */
:root[data-theme="dark"],
:root[data-theme="dark"] body {
    color: var(--dm-text);
    background: var(--dm-bg) !important;
}

:root[data-theme="dark"] .page {
    color: var(--dm-text);
    background:
        radial-gradient(
            circle at 58% -10%,
            rgba(18, 105, 157, 0.16),
            transparent 36rem),
        linear-gradient(
            180deg,
            #101b23 0%,
            #0d171e 100%) !important;
}

:root[data-theme="dark"] main,
:root[data-theme="dark"] article,
:root[data-theme="dark"] .content,
:root[data-theme="dark"] .content-inner {
    color: var(--dm-text);
    background: transparent !important;
}

:root[data-theme="dark"] :is(
    h1, h2, h3, h4, h5, h6,
    label, legend, strong) {
    color: var(--dm-text) !important;
}

:root[data-theme="dark"] :is(
    p, small,
    .subtitle, .description) {
    color: var(--dm-muted);
}

:root[data-theme="dark"] a {
    color: #67bdec;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
    color: var(--dm-text) !important;
    border-color: #36505f !important;
    background: #142630 !important;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
    color: #718794 !important;
}

:root[data-theme="dark"] input:disabled,
:root[data-theme="dark"] select:disabled,
:root[data-theme="dark"] textarea:disabled {
    color: #8498a6 !important;
    background: #182731 !important;
}

:root[data-theme="dark"] option {
    color: var(--dm-text);
    background: #142630;
}

/* Shared card/panel surfaces */
:root[data-theme="dark"] :is(
    .dashboard-date-panel,
    .dashboard-metric-card,
    .dashboard-information-card,
    .dashboard-panel,
    .dashboard-quick-action,
    .dashboard-cloud-sync-action,
    .charging-summary-card,
    .charging-panel,
    .charging-stat-card,
    .import-cloud-card,
    .import-overview-panel,
    .import-panel,
    .import-source-section,
    .import-source-option,
    .import-upload-card,
    .metric-card,
    .documents-filter,
    .documents-summary-card,
    .documents-user-section,
    .document-card,
    .documents-empty-state,
    .settings-card,
    .general-settings-loading,
    .general-settings-panel,
    .general-settings-plan,
    .system-panel,
    .system-planned-card,
    .device-card,
    .device-detail,
    .device-form-card,
    .device-status-item,
    .device-switch-row,
    .device-user-option,
    .admin-users-toolbar,
    .admin-users-summary,
    .admin-user-card,
    .admin-user-detail,
    .admin-user-form-section,
    .admin-user-tariff-section,
    .admin-user-current-tariff,
    .admin-user-tariff-history-row,
    .admin-companies-toolbar,
    .admin-companies-summary,
    .admin-company-card,
    .admin-company-detail,
    .admin-company-tariff-permission,
    .role-card,
    .permissions-panel,
    .roles-panel,
    .profile-section,
    .profile-activity-item,
    .tariff-card,
    .tariff-details,
    .tariff-base-price-setting,
    .tariff-pdf-upload,
    .profile-file-information,
    .profile-save-area) {
    color: var(--dm-text-soft) !important;
    border-color: var(--dm-border) !important;
    background: var(--dm-panel) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18) !important;
}

/* Text hierarchy */
:root[data-theme="dark"] :is(
    .dashboard-header h1,
    .dashboard-panel-heading h2,
    .dashboard-metric-card > strong,
    .dashboard-notice strong,
    .dashboard-quick-action strong,
    .charging-header h1,
    .charging-section-heading h2,
    .charging-summary-card > strong,
    .charging-stat-heading,
    .import-page-header h1,
    .import-section-title h2,
    .import-section-heading h2,
    .import-cloud-copy > strong,
    .page-header h1,
    .documents-user-header strong,
    .document-title-row strong,
    .settings-header h1,
    .settings-section-heading h2,
    .settings-card-content strong,
    .general-settings-header h1,
    .general-settings-section-heading h2,
    .general-settings-row-content strong,
    .general-settings-plan-content strong,
    .system-header h1,
    .system-section-heading h2,
    .system-row-content strong,
    .device-header h1,
    .device-card-title-row strong,
    .device-detail-heading h2,
    .admin-users-header h1,
    .admin-user-name-row strong,
    .admin-company-name-row strong,
    .admin-companies-header h1,
    .roles-header h1,
    .roles-section-heading h2,
    .role-card-title,
    .section-heading h2,
    .tariff-card-heading strong,
    .tariff-setting-heading strong) {
    color: var(--dm-text) !important;
}

:root[data-theme="dark"] :is(
    .dashboard-header p,
    .dashboard-metric-card > span,
    .dashboard-metric-card > small,
    .dashboard-notice div > span,
    .dashboard-date-time,
    .charging-header p,
    .charging-section-heading p,
    .charging-summary-card > span,
    .charging-summary-card > small,
    .charging-field label,
    .charging-secondary,
    .import-page-header p,
    .import-section-title p,
    .import-cloud-copy > small,
    .documents-user-header span,
    .document-meta,
    .document-paid-meta,
    .settings-header p,
    .settings-section-heading p,
    .settings-card-content span,
    .general-settings-header p,
    .general-settings-section-heading p,
    .general-settings-row-content span,
    .system-header p,
    .system-section-heading p,
    .system-row-content span,
    .device-header p,
    .device-card-meta,
    .device-user-meta,
    .admin-users-header p,
    .admin-user-email,
    .admin-user-meta,
    .admin-companies-header p,
    .admin-company-address,
    .admin-company-meta,
    .roles-header p,
    .roles-section-heading p,
    .section-heading p,
    .profile-file-information,
    .tariff-status,
    .tariff-setting-heading span) {
    color: var(--dm-muted) !important;
}

/* Dashboard */
:root[data-theme="dark"] .dashboard-date-panel,
:root[data-theme="dark"] .dashboard-metric-card,
:root[data-theme="dark"] .dashboard-information-card,
:root[data-theme="dark"] .dashboard-panel {
    background: rgba(24, 42, 53, 0.96) !important;
}

:root[data-theme="dark"] .dashboard-refresh-button {
    color: var(--dm-text-soft) !important;
    border-color: #38505f !important;
    background: #172b36 !important;
}

:root[data-theme="dark"] .dashboard-refresh-button:hover:not(:disabled) {
    background: #203844 !important;
}

:root[data-theme="dark"] .dashboard-notice {
    border-color: var(--dm-border) !important;
    background: #172a35 !important;
}

:root[data-theme="dark"] .dashboard-notice:hover {
    background: #1d3440 !important;
}

:root[data-theme="dark"] .dashboard-all-clear {
    border-color: #315b42 !important;
    background: var(--dm-green-bg) !important;
}

:root[data-theme="dark"] .dashboard-clean-energy {
    color: #dcebe2 !important;
    border-color: #315a42 !important;
    background: linear-gradient(135deg, #153327, #173a2c) !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-visual {
    background: transparent !important;
}

:root[data-theme="dark"] .dashboard-clean-energy :is(
    strong,
    .dashboard-clean-energy-value) {
    color: #e8f6ed !important;
}

:root[data-theme="dark"] .dashboard-clean-energy :is(
    .dashboard-clean-energy-note,
    .dashboard-clean-energy-kicker) {
    color: #9fc8ae !important;
}

:root[data-theme="dark"] .dashboard-tariff-summary,
:root[data-theme="dark"] .dashboard-last-billing,
:root[data-theme="dark"] .dashboard-tariff-price-card,
:root[data-theme="dark"] .dashboard-tariff-name-card {
    border-color: var(--dm-border) !important;
    background: var(--dm-panel-2) !important;
}

/* Action / status icons */
:root[data-theme="dark"] :is(
    .dashboard-refresh-icon,
    .dashboard-cloud-sync-refresh-icon,
    .charging-refresh-icon,
    .maintenance-refresh-icon) {
    filter:
        brightness(0)
        saturate(100%)
        invert(88%)
        sepia(8%)
        saturate(291%)
        hue-rotate(160deg)
        brightness(104%)
        contrast(92%);
}

/* Charging sessions */
:root[data-theme="dark"] :is(
    .charging-refresh-button,
    .charging-reset-button) {
    color: var(--dm-text-soft) !important;
    border-color: #38505f !important;
    background: #172b36 !important;
}

:root[data-theme="dark"] :is(
    .charging-refresh-button,
    .charging-reset-button):hover:not(:disabled) {
    background: #203844 !important;
}

:root[data-theme="dark"] .charging-count-badge {
    color: #7dc9f2 !important;
    background: #173a4e !important;
}

:root[data-theme="dark"] .charging-table-shell {
    border-color: var(--dm-border) !important;
    background: var(--dm-panel) !important;
}

:root[data-theme="dark"] .charging-table {
    color: var(--dm-text-soft) !important;
    background: var(--dm-panel) !important;
}

:root[data-theme="dark"] .charging-table th {
    color: var(--dm-muted) !important;
    border-color: var(--dm-border-soft) !important;
    background: #1d313c !important;
}

:root[data-theme="dark"] .charging-table td {
    color: var(--dm-text-soft) !important;
    border-color: var(--dm-border-soft) !important;
}

:root[data-theme="dark"] .charging-table tbody tr:hover {
    background: #203641 !important;
}

:root[data-theme="dark"] .charging-empty,
:root[data-theme="dark"] .charging-loading,
:root[data-theme="dark"] .charging-stat-empty {
    color: var(--dm-muted) !important;
}

/* Import */
:root[data-theme="dark"] .import-cloud-card:hover:not(:disabled),
:root[data-theme="dark"] .import-source-option:hover {
    background: #203641 !important;
}

:root[data-theme="dark"] .import-source-option.is-selected {
    border-color: #34749b !important;
    background: #183b4e !important;
}

:root[data-theme="dark"] .import-cloud-icon,
:root[data-theme="dark"] .import-status-icon {
    border-color: #315266 !important;
    background: #17394c !important;
}

:root[data-theme="dark"] .import-history-table,
:root[data-theme="dark"] .data-table {
    color: var(--dm-text-soft) !important;
    background: var(--dm-panel) !important;
}

:root[data-theme="dark"] :is(
    .import-history-table th,
    .data-table th) {
    color: var(--dm-muted) !important;
    background: #1d313c !important;
}

:root[data-theme="dark"] :is(
    .import-history-table th,
    .import-history-table td,
    .data-table th,
    .data-table td) {
    border-color: var(--dm-border-soft) !important;
}

/* Documents */
:root[data-theme="dark"] .documents-filter {
    background: #172a35 !important;
}

:root[data-theme="dark"] .document-card {
    background: #182a35 !important;
}

:root[data-theme="dark"] .documents-count {
    color: #a8cfe6 !important;
    background: #1b3a4b !important;
}

:root[data-theme="dark"] .document-values {
    color: var(--dm-text) !important;
}

/* Settings overview/general/system */
:root[data-theme="dark"] .settings-card:hover:not(.settings-card-disabled) {
    border-color: #3d6074 !important;
    background: #203641 !important;
}

:root[data-theme="dark"] .settings-card-icon,
:root[data-theme="dark"] .general-settings-plan-icon,
:root[data-theme="dark"] .general-settings-feature-icon,
:root[data-theme="dark"] .system-info-note-icon,
:root[data-theme="dark"] .system-planned-icon {
    color: #73c3ef !important;
    background: #17394d !important;
}

:root[data-theme="dark"] .general-settings-divider,
:root[data-theme="dark"] .system-divider {
    background: #2c424e !important;
}

:root[data-theme="dark"] .general-settings-feature-note,
:root[data-theme="dark"] .system-info-note {
    color: #c7d9e4 !important;
    border-color: #305268 !important;
    background: #163243 !important;
}

:root[data-theme="dark"] :is(
    .general-settings-coming-soon,
    .general-settings-version-badge,
    .general-settings-plan-badge,
    .system-version-badge) {
    color: #a8cfe6 !important;
    border-color: #315469 !important;
    background: #1a3545 !important;
}

:root[data-theme="dark"] .general-settings-switch-slider,
:root[data-theme="dark"] .system-switch-slider,
:root[data-theme="dark"] .device-switch-slider,
:root[data-theme="dark"] .admin-company-switch-slider {
    background: #4a5b66 !important;
}

:root[data-theme="dark"] :is(
    .general-settings-switch input:checked + .general-settings-switch-slider,
    .system-switch-input:checked + .system-switch-slider,
    .device-switch-input:checked + .device-switch-slider,
    .admin-company-switch-input:checked + .admin-company-switch-slider) {
    background: #0785d1 !important;
}

:root[data-theme="dark"] .system-value,
:root[data-theme="dark"] .system-cloud-status {
    color: var(--dm-text-soft) !important;
    border-color: var(--dm-border) !important;
    background: #152731 !important;
}

:root[data-theme="dark"] .system-decimal-spinner {
    border-color: #35505f !important;
    background: #1b2f3a !important;
}

:root[data-theme="dark"] .system-decimal-spinner button {
    color: #a5b7c3 !important;
}

:root[data-theme="dark"] .system-decimal-spinner button:hover {
    color: #ffffff !important;
    background: #29414d !important;
}

/* Devices/users/companies */
:root[data-theme="dark"] :is(
    .device-input,
    .device-user-search,
    .device-overview-search,
    .admin-users-search,
    .admin-user-input,
    .admin-user-password-input,
    .admin-company-input,
    .admin-companies-search) {
    color: var(--dm-text) !important;
    border-color: #36505f !important;
    background: #142630 !important;
}

:root[data-theme="dark"] :is(
    .device-secondary-button,
    .admin-user-secondary-button,
    .admin-company-secondary-button,
    .admin-user-password-tool-button,
    .admin-user-compact-button) {
    color: var(--dm-text-soft) !important;
    border-color: #38505f !important;
    background: #172b36 !important;
}

:root[data-theme="dark"] :is(
    .device-card,
    .admin-user-card,
    .admin-company-card):hover {
    border-color: #3b6379 !important;
    background: #203641 !important;
}

:root[data-theme="dark"] :is(
    .device-card-icon,
    .admin-user-avatar,
    .admin-company-avatar) {
    border-color: #315266 !important;
    color: #7cc7f1 !important;
    background: #17394c !important;
}

:root[data-theme="dark"] .admin-user-avatar-manager {
    color: #c7a8ff !important;
    border-color: #5b4977 !important;
    background: #2c2440 !important;
}

:root[data-theme="dark"] .admin-user-avatar-admin {
    color: #efb27c !important;
    border-color: #704a2e !important;
    background: #3b2b20 !important;
}

/* Roles */
:root[data-theme="dark"] .permissions-table {
    color: var(--dm-text-soft) !important;
    background: var(--dm-panel) !important;
}

:root[data-theme="dark"] .permissions-table th,
:root[data-theme="dark"] .permissions-group-row {
    color: var(--dm-muted) !important;
    background: #1d313c !important;
}

:root[data-theme="dark"] .permissions-table th,
:root[data-theme="dark"] .permissions-table td {
    border-color: var(--dm-border-soft) !important;
}

/* Profile */
:root[data-theme="dark"] .profile-page,
:root[data-theme="dark"] .goe-panel,
:root[data-theme="dark"] .tariff-section {
    color: var(--dm-text-soft) !important;
}

:root[data-theme="dark"] .form-field label {
    color: var(--dm-muted) !important;
}

:root[data-theme="dark"] .form-field .form-control {
    color: var(--dm-text) !important;
    border-color: #36505f !important;
    background: #142630 !important;
}

:root[data-theme="dark"] .tariff-card-current {
    border-color: #31566b !important;
    background: linear-gradient(135deg, #17384a, #182a35 58%) !important;
}

:root[data-theme="dark"] .tariff-status {
    color: #a9c3d2 !important;
    background: #213743 !important;
}

:root[data-theme="dark"] .tariff-card-current .tariff-status {
    color: #7cc7f1 !important;
    background: #173c50 !important;
}

/* Billing screen UI only – print remains light */
@media screen {
    :root[data-theme="dark"] .billing-document {
        color: var(--dm-text-soft) !important;
        border-color: var(--dm-border) !important;
        background: var(--dm-panel) !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18) !important;
    }

    :root[data-theme="dark"] :is(
        .billing-table-shell,
        .billing-master-data,
        .billing-table,
        .billing-summary-table,
        .calculation-box) {
        color: var(--dm-text-soft) !important;
        border-color: var(--dm-border) !important;
        background: var(--dm-panel) !important;
    }

    :root[data-theme="dark"] :is(
        .billing-master-shell,
        .billing-sessions-shell) {
        background: #1b2f3a !important;
    }

    :root[data-theme="dark"] :is(
        .billing-table th,
        .billing-summary-table th,
        .billing-master-data th) {
        color: var(--dm-muted) !important;
        background: #1d313c !important;
    }

    :root[data-theme="dark"] :is(
        .billing-table td,
        .billing-summary-table td,
        .billing-master-data td) {
        color: var(--dm-text-soft) !important;
        border-color: var(--dm-border-soft) !important;
    }

    :root[data-theme="dark"] .document-tab {
        color: var(--dm-muted) !important;
        border-color: var(--dm-border) !important;
        background: #172a35 !important;
    }

    :root[data-theme="dark"] .document-tab.active {
        color: #7cc7f1 !important;
        background: #183b4e !important;
    }
}

/* Success / warning / error feedback */
:root[data-theme="dark"] :is(
    .general-settings-message-success,
    .system-message-success,
    .documents-message-success,
    .device-message-success,
    .admin-user-message-success,
    .admin-company-message-success,
    .import-cloud-message.is-success,
    .dashboard-refresh-button.is-success,
    .charging-refresh-button.is-success,
    .maintenance-refresh-button.is-success) {
    color: var(--dm-green) !important;
    border-color: #315b42 !important;
    background: var(--dm-green-bg) !important;
}

:root[data-theme="dark"] :is(
    .general-settings-message-error,
    .system-message-error,
    .documents-message-error,
    .device-message-error,
    .admin-user-message-error,
    .admin-company-message-error,
    .charging-message-error,
    .import-cloud-message.is-error) {
    color: var(--dm-red) !important;
    border-color: #71444a !important;
    background: var(--dm-red-bg) !important;
}

/* Login / maintenance on this browser after a dark preference */
:root[data-theme="dark"] .login-page,
:root[data-theme="dark"] .maintenance-page {
    background: #0d171e !important;
}

:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .maintenance-card {
    color: var(--dm-text-soft) !important;
    border-color: var(--dm-border) !important;
    background: #182a35 !important;
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.34) !important;
}

:root[data-theme="dark"] :is(
    .login-title,
    .maintenance-title,
    .maintenance-card h1) {
    color: var(--dm-text) !important;
}

:root[data-theme="dark"] :is(
    .login-subtitle,
    .maintenance-message,
    .maintenance-version) {
    color: var(--dm-muted) !important;
}

/* Reconnect */
:root[data-theme="dark"] .reconnect-card {
    color: var(--dm-text-soft) !important;
    border-color: var(--dm-border) !important;
    background: #182a35 !important;
}

/* Keep brand images and colored product artwork untouched. */
:root[data-theme="dark"] :is(
    .app-icon,
    .login-logo,
    .maintenance-logo,
    .dashboard-clean-energy-image) {
    filter: none !important;
}

/* Scrollbars */
:root[data-theme="dark"] {
    scrollbar-color: #405866 #14232c;
}

:root[data-theme="dark"] ::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

:root[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #14232c;
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
    border: 2px solid #14232c;
    border-radius: 999px;
    background: #405866;
}

/* PDF/print is always light and document-like. */
@media print {
    :root[data-theme="dark"],
    :root[data-theme="dark"] body,
    :root[data-theme="dark"] .billing-document,
    :root[data-theme="dark"] .billing-table-shell,
    :root[data-theme="dark"] .billing-master-data,
    :root[data-theme="dark"] .billing-table,
    :root[data-theme="dark"] .billing-summary-table,
    :root[data-theme="dark"] .calculation-box {
        color: #122235 !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }
}


/* ===== v0.9.2 DARK MODE – FINAL QUALITY PASS ===== */

/* Theme foundation: no light flash/background inside the app shell. */
:root[data-theme="dark"] body,
:root[data-theme="dark"] .page,
:root[data-theme="dark"] main,
:root[data-theme="dark"] article,
:root[data-theme="dark"] .content,
:root[data-theme="dark"] .content-inner {
    background-color: #0d171e !important;
}

/* Dashboard hero: reduce the very bright artwork without destroying it. */
:root[data-theme="dark"] .dashboard-clean-energy {
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            #143226 0%,
            #15382a 100%) !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-image {
    filter:
        brightness(0.76)
        saturate(0.88)
        contrast(0.96) !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-visual {
    position: relative;
    background: #173529 !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-visual::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(13, 23, 30, 0.08) 0%,
            rgba(13, 23, 30, 0.08) 56%,
            rgba(20, 50, 38, 0.62) 100%);
}

/* Charging sessions – table text and statistic container. */
:root[data-theme="dark"] :is(
    .charging-table td,
    .charging-primary-value,
    .charging-number-column,
    .charging-time,
    .charging-source-detail,
    .charging-energy-bar-label,
    .charging-week-value) {
    color: #d5e2e9 !important;
}

:root[data-theme="dark"] :is(
    .charging-secondary,
    .charging-week-label,
    .charging-stat-heading + p) {
    color: #93a8b6 !important;
}

:root[data-theme="dark"] .charging-statistics-section {
    color: #d6e3ea !important;
    border-color: #2d4452 !important;
    background: #182a35 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18) !important;
}

:root[data-theme="dark"] .charging-statistics-toggle {
    color: #d6e3ea !important;
    background: #182a35 !important;
}

:root[data-theme="dark"] .charging-statistics-toggle:hover {
    background: #1d313d !important;
}

:root[data-theme="dark"] .charging-energy-bar-track,
:root[data-theme="dark"] .charging-week-track {
    border-color: #36505e !important;
    background: #243a46 !important;
}

/* Data import – cloud-sync icon and current-month table. */
:root[data-theme="dark"] .import-cloud-icon {
    border-color: #31566c !important;
    background: #17394c !important;
}

:root[data-theme="dark"] .import-cloud-icon img,
:root[data-theme="dark"] .import-cloud-action img {
    filter:
        brightness(0)
        saturate(100%)
        invert(83%)
        sepia(13%)
        saturate(698%)
        hue-rotate(165deg)
        brightness(102%)
        contrast(94%) !important;
}

:root[data-theme="dark"] :is(
    .import-overview-panel,
    .import-table-wrapper,
    .import-history-table-shell,
    .import-history-table,
    .import-metric-row .metric-card) {
    color: #d4e1e8 !important;
    border-color: #2d4452 !important;
    background: #182a35 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16) !important;
}

:root[data-theme="dark"] :is(
    .import-table-wrapper .data-table,
    .import-history-table) {
    background: #182a35 !important;
}

:root[data-theme="dark"] :is(
    .import-table-wrapper .data-table th,
    .import-history-table th) {
    color: #9fb0bd !important;
    border-color: #2b414e !important;
    background: #1d313c !important;
}

:root[data-theme="dark"] :is(
    .import-table-wrapper .data-table td,
    .import-history-table td,
    .import-history-primary) {
    color: #d4e1e8 !important;
    border-color: #2b414e !important;
    background: #182a35 !important;
}

:root[data-theme="dark"] .import-history-secondary {
    color: #92a7b5 !important;
}

/* Billing UI. Screen preview is dark; print/PDF remains light below. */
@media screen {
    :root[data-theme="dark"] :is(
        .billing-document,
        .billing-master-shell,
        .billing-sessions-shell,
        .billing-master-data,
        .billing-table-shell,
        .billing-table,
        .billing-summary-table,
        .calculation-box,
        .billing-footer) {
        color: #d6e3ea !important;
        border-color: #2d4452 !important;
        background: #182a35 !important;
    }

    :root[data-theme="dark"] :is(
        .billing-master-data td,
        .billing-table td,
        .billing-summary-table td,
        .billing-company-value,
        .billing-vehicle-value,
        .billing-license-value,
        .billing-master-value-left,
        .billing-master-value-right) {
        color: #d6e3ea !important;
        border-color: #2b414e !important;
        background: #182a35 !important;
    }

    :root[data-theme="dark"] :is(
        .billing-master-data th,
        .billing-table th,
        .billing-summary-table th,
        .billing-master-label-left,
        .billing-master-label-right,
        .billing-company-label,
        .billing-vehicle-label,
        .billing-license-label) {
        color: #9fb0bd !important;
        border-color: #2b414e !important;
        background: #1d313c !important;
    }

    :root[data-theme="dark"] :is(
        .billing-period-selector,
        .document-tabs) {
        border-color: #2d4452 !important;
        background: #20343f !important;
    }

    :root[data-theme="dark"] .billing-status-info {
        color: #a8d9ef !important;
        border-color: #35637a !important;
        background: #163649 !important;
    }
}

/* Profile – remove the remaining white cards/fields. */
:root[data-theme="dark"] .profile-page .profile-section > .profile-grid,
:root[data-theme="dark"] .profile-page .tariff-new-section,
:root[data-theme="dark"] .profile-page .tariff-archive,
:root[data-theme="dark"] .profile-page .tariff-empty-state,
:root[data-theme="dark"] .profile-page .tariff-setting-grid,
:root[data-theme="dark"] .profile-page .tariff-proof-row,
:root[data-theme="dark"] .profile-page .profile-activity-grid {
    color: #d4e1e8 !important;
    border-color: #2d4452 !important;
    background: #182a35 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16) !important;
}

:root[data-theme="dark"] .profile-page .form-field .form-control {
    color: #edf4f8 !important;
    border-color: #36505f !important;
    background: #142630 !important;
}

:root[data-theme="dark"] .profile-page .form-field .form-control:disabled {
    color: #9aadb9 !important;
    border-color: #304753 !important;
    background: #182731 !important;
}

:root[data-theme="dark"] .profile-page .form-field label {
    color: #9fb0bd !important;
}

:root[data-theme="dark"] :is(
    .tariff-card,
    .tariff-details > div,
    .tariff-base-price-setting,
    .tariff-pdf-upload,
    .profile-activity-item) {
    color: #d4e1e8 !important;
    border-color: #2d4452 !important;
    background: #182a35 !important;
}

/* User management – remaining light summary cards. */
:root[data-theme="dark"] .admin-users-summary > div {
    color: #d6e3ea !important;
    border-color: #2d4452 !important;
    background: #1c313d !important;
}

:root[data-theme="dark"] .admin-users-summary span {
    color: #9fb0bd !important;
}

:root[data-theme="dark"] .admin-users-summary strong {
    color: #edf4f8 !important;
}

/* Device management – remaining light summary / search shell. */
:root[data-theme="dark"] .device-toolbar {
    border-color: #2d4452 !important;
    background: #182a35 !important;
}

:root[data-theme="dark"] .device-overview-summary > div {
    color: #d6e3ea !important;
    border-color: #2d4452 !important;
    background: #1c313d !important;
}

:root[data-theme="dark"] .device-overview-summary span {
    color: #9fb0bd !important;
}

:root[data-theme="dark"] .device-overview-summary strong {
    color: #edf4f8 !important;
}

/* Roles & rights – bottom information card. */
:root[data-theme="dark"] .permissions-note {
    color: #cddbe3 !important;
    border-color: #31566c !important;
    background: #173243 !important;
}

:root[data-theme="dark"] .permissions-note-icon {
    color: #6fc6f2 !important;
    background: #18445b !important;
}

:root[data-theme="dark"] .permissions-note strong {
    color: #e8f2f7 !important;
}

:root[data-theme="dark"] .permissions-note span {
    color: #a3b6c2 !important;
}

/* System page – visually separate page sections without light strips. */
:root[data-theme="dark"] .system-section {
    border-radius: 18px;
    background: transparent !important;
}

:root[data-theme="dark"] .system-section-heading {
    padding-right: 0.15rem;
    padding-left: 0.15rem;
    background: transparent !important;
}

:root[data-theme="dark"] .system-panel {
    border-color: #2d4452 !important;
    background: #182a35 !important;
}

:root[data-theme="dark"] .system-info-note {
    border-color: #31566c !important;
    background: #173243 !important;
}

:root[data-theme="dark"] .system-info-note-icon {
    color: #6fc6f2 !important;
    background: #18445b !important;
}

/* Keep all printed billing documents white and document-like. */
@media print {
    :root[data-theme="dark"] :is(
        .billing-document,
        .billing-master-shell,
        .billing-sessions-shell,
        .billing-master-data,
        .billing-table-shell,
        .billing-table,
        .billing-summary-table,
        .calculation-box,
        .billing-footer,
        .billing-master-data th,
        .billing-master-data td,
        .billing-table th,
        .billing-table td,
        .billing-summary-table th,
        .billing-summary-table td) {
        color: #122235 !important;
        border-color: #d7e0e7 !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }
}

/* ============================================================
   v0.9.2 – polish round 2 (dashboard, icons, billing, profile,
   admin user/company detail dark-mode consistency)
   ============================================================ */

/* Shared dark-mode icon treatment – match the harmonious import card style */
:root[data-theme="dark"] :is(
    .dashboard-metric-icon,
    .dashboard-quick-action-icon,
    .dashboard-cloud-sync-icon,
    .settings-card-icon) {
    border-color: #315266 !important;
    background: #17394c !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

:root[data-theme="dark"] :is(
    .dashboard-metric-icon img,
    .dashboard-quick-action-icon img,
    .dashboard-cloud-sync-icon img,
    .settings-card-image) {
    opacity: 0.92 !important;
}

/* Hero widget – give the text block more breathing room and a subtle inner panel */
:root[data-theme="dark"] .dashboard-clean-energy {
    background: linear-gradient(90deg, #1d352a 0%, #123e28 36%, #104628 100%) !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-visual::after {
    background: linear-gradient(90deg, rgba(7, 18, 14, 0.04) 0%, rgba(7, 18, 14, 0.14) 58%, rgba(7, 18, 14, 0.48) 74%, rgba(10, 28, 20, 0.82) 100%) !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-content {
    padding: 1.3rem 1.55rem 1.3rem 1.25rem !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-content::before {
    content: "";
    position: absolute;
    inset: 0.8rem 0.8rem 0.8rem 0.2rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(8, 24, 18, 0.26), rgba(8, 24, 18, 0.16)) !important;
    border: 1px solid rgba(171, 223, 189, 0.08);
    pointer-events: none;
}

:root[data-theme="dark"] .dashboard-clean-energy-content > * {
    position: relative;
    z-index: 1;
}

:root[data-theme="dark"] .dashboard-clean-energy-values {
    gap: 0.9rem !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-note {
    padding-top: 0.15rem;
}

/* Billing: disabled complete button and darker table consistency */
html[data-theme="dark"] .billing-header-actions .complete-billing-button:disabled,
:root[data-theme="dark"] .billing-header-actions .complete-billing-button:disabled {
    color: #7f96a5 !important;
    border-color: #2f424d !important;
    background: #1d2f39 !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

@media screen {
    :root[data-theme="dark"] :is(
        .billing-company-stack,
        .billing-company-name,
        .billing-company-address,
        .billing-master-shell,
        .billing-sessions-shell) {
        color: var(--dm-text-soft) !important;
        background: transparent !important;
    }

    :root[data-theme="dark"] :is(
        .billing-company-name,
        .billing-company-address,
        .billing-master-data tr,
        .billing-master-data th,
        .billing-master-data td,
        .billing-table th,
        .billing-table td,
        .billing-summary-table th,
        .billing-summary-table td) {
        border-color: var(--dm-border-soft) !important;
    }
}

/* Documents: restore distinct button tones in dark mode */
html[data-theme="dark"] .document-action-button,
:root[data-theme="dark"] .document-action-button {
    color: #e8f4fb !important;
    border: 1px solid #2e6f99 !important;
    background: #0d7fc0 !important;
}

html[data-theme="dark"] .document-action-button:hover:not(:disabled),
:root[data-theme="dark"] .document-action-button:hover:not(:disabled) {
    background: #1191d9 !important;
}

html[data-theme="dark"] .document-action-button.secondary,
:root[data-theme="dark"] .document-action-button.secondary {
    color: #dce9f3 !important;
    border-color: #36505e !important;
    background: #20323d !important;
}

html[data-theme="dark"] .document-action-button.secondary:hover:not(:disabled),
:root[data-theme="dark"] .document-action-button.secondary:hover:not(:disabled) {
    background: #28424f !important;
}

html[data-theme="dark"] .document-action-button.danger,
:root[data-theme="dark"] .document-action-button.danger {
    color: #ffd8dd !important;
    border-color: #784651 !important;
    background: #4a232a !important;
}

html[data-theme="dark"] .document-action-button.danger:hover:not(:disabled),
:root[data-theme="dark"] .document-action-button.danger:hover:not(:disabled) {
    background: #5a2c34 !important;
}

/* Profile page: tighten the section headers and finish tariff card controls */
:root[data-theme="dark"] .profile-section {
    padding: 1.2rem 1.25rem 1.3rem !important;
}

:root[data-theme="dark"] .profile-page .section-heading {
    margin-bottom: 1rem !important;
}

:root[data-theme="dark"] .profile-page :is(
    .profile-grid,
    .profile-activity-grid) {
    margin-top: 0 !important;
}

:root[data-theme="dark"] .profile-page :is(
    .tariff-empty-state,
    .tariff-base-price-setting,
    .tariff-archive,
    .profile-page .tariff-new-section,
    .profile-page .tariff-archive) {
    color: var(--dm-text-soft) !important;
    border-color: var(--dm-border) !important;
    background: #172a35 !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .profile-page .tariff-checkbox {
    color: var(--dm-text-soft) !important;
    border-color: #36505f !important;
    background: #142630 !important;
}

:root[data-theme="dark"] .profile-page .tariff-checkbox span {
    color: var(--dm-muted) !important;
}

:root[data-theme="dark"] .profile-page .tariff-setting-button {
    border-color: #2e6f99 !important;
    background: #0d7fc0 !important;
    color: #eaf6fd !important;
}

:root[data-theme="dark"] .profile-page .tariff-setting-button:hover:not(:disabled) {
    background: #1191d9 !important;
}

/* Settings overview icons should follow the import style */
:root[data-theme="dark"] .settings-card {
    background: rgba(24, 42, 53, 0.96) !important;
}

/* Admin user / company detail pages – remove remaining light tiles */
:root[data-theme="dark"] :is(
    .admin-user-detail-grid div,
    .admin-company-detail-grid div,
    .admin-user-tariff-empty,
    .admin-user-tariff-permission-setting,
    .admin-user-tariff-history,
    .admin-user-tariff-delete-confirmation,
    .admin-user-form-page,
    .admin-company-form-page,
    .admin-company-form-section,
    .admin-company-detail-stat,
    .admin-company-detail-wide) {
    color: var(--dm-text-soft) !important;
    border-color: var(--dm-border) !important;
    background: #172a35 !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] :is(
    .admin-user-detail-grid span,
    .admin-company-detail-grid span,
    .admin-user-tariff-heading p,
    .admin-user-tariff-empty,
    .admin-user-tariff-permission-content span,
    .admin-company-detail-header p) {
    color: var(--dm-muted) !important;
}

:root[data-theme="dark"] :is(
    .admin-user-detail-grid strong,
    .admin-company-detail-grid strong,
    .admin-user-detail-title h2,
    .admin-company-detail-header h2,
    .admin-user-tariff-heading h3) {
    color: var(--dm-text) !important;
}

:root[data-theme="dark"] :is(
    .admin-user-input,
    .admin-company-input,
    .admin-user-checkbox,
    .admin-user-tariff-link-button,
    .admin-user-tariff-delete-button,
    .admin-company-delete-button,
    .admin-user-delete-button:disabled,
    .admin-company-readonly-field) {
    color: var(--dm-text-soft) !important;
    border-color: #36505f !important;
    background: #142630 !important;
}

:root[data-theme="dark"] :is(
    .admin-user-delete-button:disabled,
    .admin-company-delete-button:disabled) {
    color: #8ca1ae !important;
    border-color: #344853 !important;
    background: #1b2d38 !important;
    opacity: 1 !important;
}


/* ============================================================
   v0.9.2 – Dark Mode final polish 3
   ============================================================ */

/* ------------------------------------------------------------
   Einheitliche Icons: identisch zum harmonischen Datenimport-Stil
   ------------------------------------------------------------ */
:root[data-theme="dark"] :is(
    .dashboard-metric-icon,
    .dashboard-quick-action-icon,
    .dashboard-cloud-sync-icon,
    .settings-card-icon) {
    border: 1px solid #31566c !important;
    background: #17394c !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] :is(
    .dashboard-metric-icon img,
    .dashboard-quick-action-icon img,
    .dashboard-cloud-sync-icon img,
    .settings-card-image) {
    opacity: 1 !important;
    filter:
        brightness(0)
        saturate(100%)
        invert(83%)
        sepia(13%)
        saturate(698%)
        hue-rotate(165deg)
        brightness(102%)
        contrast(94%) !important;
}

/* ------------------------------------------------------------
   Dashboard Hero: fließender Übergang statt harter Schnittkante
   ------------------------------------------------------------ */
:root[data-theme="dark"] .dashboard-clean-energy {
    background: #104529 !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-visual {
    background: #173529 !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-image {
    filter:
        brightness(0.74)
        saturate(0.86)
        contrast(0.97) !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-visual::after {
    background: linear-gradient(
        90deg,
        rgba(13, 23, 30, 0.02) 0%,
        rgba(13, 23, 30, 0.08) 54%,
        rgba(15, 58, 36, 0.30) 72%,
        #104529 100%) !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-content {
    position: relative;
    padding: 1.45rem 1.8rem 1.45rem 2rem !important;
    background: linear-gradient(
        100deg,
        #104529 0%,
        #104529 55%,
        #0f4127 100%) !important;
}

/* Frühere innere Karte vollständig entfernen. */
:root[data-theme="dark"] .dashboard-clean-energy-content::before {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: -88px !important;
    width: 90px !important;
    height: auto !important;
    inset: auto auto auto -88px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(
        90deg,
        rgba(16, 69, 41, 0),
        #104529) !important;
    box-shadow: none !important;
    content: "";
    pointer-events: none;
}

:root[data-theme="dark"] .dashboard-clean-energy-content > * {
    position: relative;
    z-index: 1;
}

:root[data-theme="dark"] .dashboard-clean-energy-kicker {
    color: #9bd6ad !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-content h2,
:root[data-theme="dark"] .dashboard-clean-energy-value strong {
    color: #f0f8f3 !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-value span,
:root[data-theme="dark"] .dashboard-clean-energy-note small {
    color: #a3c5af !important;
}

:root[data-theme="dark"] .dashboard-clean-energy-value-icon {
    color: #61c47d !important;
    border-color: #315f43 !important;
    background: #173d29 !important;
    box-shadow: none !important;
}

/* ------------------------------------------------------------
   Abrechnung: deaktivierter Button + konsistente Tabellenlinien
   ------------------------------------------------------------ */
:root[data-theme="dark"] .billing-header-actions .complete-billing-button:disabled,
html[data-theme="dark"] .billing-header-actions .complete-billing-button:disabled {
    color: #718693 !important;
    border: 1px solid #2f424d !important;
    background: #1a2c36 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

@media screen {
    :root[data-theme="dark"] .billing-master-data th,
    :root[data-theme="dark"] .billing-master-data td {
        border-right: 1px solid #2b414e !important;
        border-bottom: 1px solid #2b414e !important;
    }

    :root[data-theme="dark"] .billing-master-data tr > :last-child {
        border-right: 0 !important;
    }

    :root[data-theme="dark"] .billing-master-data tbody > tr:last-child > th,
    :root[data-theme="dark"] .billing-master-data tbody > tr:last-child > td {
        border-bottom: 0 !important;
    }

    :root[data-theme="dark"] .billing-company-name,
    :root[data-theme="dark"] .billing-company-address {
        border: 0 !important;
        background: transparent !important;
    }

    :root[data-theme="dark"] .billing-company-stack {
        background: #182a35 !important;
    }
}

/* ------------------------------------------------------------
   Profil: Abschnitt selbst transparent, nur die eigentlichen Karten dunkel
   ------------------------------------------------------------ */
:root[data-theme="dark"] .profile-page .profile-section {
    margin-bottom: 1.35rem !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .profile-page .section-heading {
    margin-bottom: 1rem !important;
    padding: 0 !important;
    background: transparent !important;
}

:root[data-theme="dark"] .profile-page .profile-section > .profile-grid,
:root[data-theme="dark"] .profile-page .profile-section > .profile-activity-grid,
:root[data-theme="dark"] .profile-page .tariff-new-section,
:root[data-theme="dark"] .profile-page .tariff-archive,
:root[data-theme="dark"] .profile-page .tariff-empty-state,
:root[data-theme="dark"] .profile-page .tariff-base-price-setting {
    color: var(--dm-text-soft) !important;
    border: 1px solid var(--dm-border) !important;
    border-radius: 18px !important;
    background: #182a35 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16) !important;
}

:root[data-theme="dark"] .profile-page .tariff-checkbox {
    color: var(--dm-text-soft) !important;
    border-color: #36505f !important;
    background: #142630 !important;
}

:root[data-theme="dark"] .profile-page .tariff-checkbox span {
    color: #a5b6c1 !important;
}

:root[data-theme="dark"] .profile-page .tariff-setting-button {
    color: #eaf6fd !important;
    border: 1px solid #2f7199 !important;
    background: #0d7fc0 !important;
}

:root[data-theme="dark"] .profile-page .tariff-setting-button:hover:not(:disabled) {
    background: #1191d9 !important;
}

/* ------------------------------------------------------------
   Einstellungen: Icons ebenfalls exakt im Datenimport-Stil
   ------------------------------------------------------------ */
:root[data-theme="dark"] .settings-card-icon {
    border: 1px solid #31566c !important;
    background: #17394c !important;
}

:root[data-theme="dark"] .settings-card-image {
    filter:
        brightness(0)
        saturate(100%)
        invert(83%)
        sepia(13%)
        saturate(698%)
        hue-rotate(165deg)
        brightness(102%)
        contrast(94%) !important;
}

/* ------------------------------------------------------------
   Benutzerverwaltung – Detailseite / deaktivierte Aktionen
   ------------------------------------------------------------ */
:root[data-theme="dark"] .admin-users-create-button:disabled,
:root[data-theme="dark"] .admin-user-primary-button:disabled {
    color: #7f929e !important;
    border: 1px solid #334954 !important;
    background: #1b2d38 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .admin-user-danger-outline-button {
    color: #f0a7ae !important;
    border: 1px solid #71434a !important;
    background: #3b2429 !important;
}

:root[data-theme="dark"] .admin-user-danger-outline-button:hover:not(:disabled) {
    color: #ffc2c8 !important;
    border-color: #87515a !important;
    background: #4b2930 !important;
}

:root[data-theme="dark"] .admin-user-danger-button:disabled,
:root[data-theme="dark"] .admin-user-danger-outline-button:disabled {
    color: #7f929e !important;
    border: 1px solid #334954 !important;
    background: #1b2d38 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .admin-user-detail-grid div,
:root[data-theme="dark"] .admin-user-tariff-empty {
    color: var(--dm-text-soft) !important;
    border-color: var(--dm-border) !important;
    background: #172a35 !important;
}

/* ------------------------------------------------------------
   Unternehmensverwaltung – Detailseite / deaktivierte Aktionen
   ------------------------------------------------------------ */
:root[data-theme="dark"] .admin-companies-create-button:disabled,
:root[data-theme="dark"] .admin-company-primary-button:disabled {
    color: #7f929e !important;
    border: 1px solid #334954 !important;
    background: #1b2d38 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .admin-company-danger-outline-button {
    color: #f0a7ae !important;
    border: 1px solid #71434a !important;
    background: #3b2429 !important;
}

:root[data-theme="dark"] .admin-company-danger-outline-button:hover:not(:disabled) {
    color: #ffc2c8 !important;
    border-color: #87515a !important;
    background: #4b2930 !important;
}

:root[data-theme="dark"] .admin-company-danger-button:disabled,
:root[data-theme="dark"] .admin-company-danger-outline-button:disabled {
    color: #7f929e !important;
    border: 1px solid #334954 !important;
    background: #1b2d38 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .admin-company-detail-grid div {
    color: var(--dm-text-soft) !important;
    border-color: var(--dm-border) !important;
    background: #172a35 !important;
}


/* ============================================================
   v0.9.2 – letzte Dark-Mode-Korrekturen
   Datenimport + Abrechnung
   ============================================================ */

/* Datenimport: deaktivierter Importieren-Button dunkel ausgrauen */
:root[data-theme="dark"] button.file-upload-button:disabled,
html[data-theme="dark"] button.file-upload-button:disabled {
    color: #758a98 !important;
    border-color: #30444f !important;
    background: #1b2d37 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

/*
   Abrechnung:
   Die beiden hellen Linien stammen nicht von border-bottom,
   sondern aus dem v0.8.9 Web-Feinschliff über inset box-shadow.
   Im Dark Mode deshalb exakt dieselben Linien in dunkler Farbe.
*/
@media screen {
    :root[data-theme="dark"] .billing-master-data .billing-company-label,
    :root[data-theme="dark"] .billing-master-data .billing-company-value,
    :root[data-theme="dark"] .billing-master-data .billing-vehicle-label,
    :root[data-theme="dark"] .billing-master-data .billing-vehicle-value,
    html[data-theme="dark"] .billing-master-data .billing-company-label,
    html[data-theme="dark"] .billing-master-data .billing-company-value,
    html[data-theme="dark"] .billing-master-data .billing-vehicle-label,
    html[data-theme="dark"] .billing-master-data .billing-vehicle-value {
        border-bottom: 0 !important;
        box-shadow: inset 0 -1px 0 #2b414e !important;
    }
}


/* ============================================================
   v0.9.2 – Abrechnung: Stammdatenlinien final korrigieren
   ============================================================ */

@media screen {
    /*
       Die beiden gewünschten Trennlinien werden im Dark Mode
       wieder als echte Border gezeichnet:
       1) Unternehmensanschrift -> Ladestandort
       2) Fahrzeug -> Kennzeichen

       Dadurch gibt es keine helle Browser-/Shadow-Linie mehr,
       gleichzeitig bleibt die notwendige Linie unter dem
       Unternehmensblock sichtbar.
    */
    :root[data-theme="dark"] .billing-master-data .billing-company-label,
    :root[data-theme="dark"] .billing-master-data .billing-company-value,
    :root[data-theme="dark"] .billing-master-data .billing-vehicle-label,
    :root[data-theme="dark"] .billing-master-data .billing-vehicle-value,
    html[data-theme="dark"] .billing-master-data .billing-company-label,
    html[data-theme="dark"] .billing-master-data .billing-company-value,
    html[data-theme="dark"] .billing-master-data .billing-vehicle-label,
    html[data-theme="dark"] .billing-master-data .billing-vehicle-value {
        box-shadow: none !important;
        border-bottom: 1px solid #2b414e !important;
    }

    /*
       Innerhalb der gemeinsamen Unternehmenszelle weiterhin
       ausdrücklich keine Linie zwischen Firmenname und Anschrift.
    */
    :root[data-theme="dark"] .billing-company-stack,
    :root[data-theme="dark"] .billing-company-name,
    :root[data-theme="dark"] .billing-company-address,
    html[data-theme="dark"] .billing-company-stack,
    html[data-theme="dark"] .billing-company-name,
    html[data-theme="dark"] .billing-company-address {
        border-top: 0 !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
    }
}


/* ============================================================
   v0.9.3 – MOBILE GLOBAL FOUNDATION
   ============================================================ */
@media (max-width: 640.98px) {
    html, body {
        width: 100%;
        max-width: 100%;
        min-height: 100%;
        overflow-x: clip;
    }

    body {
        font-size: 16px;
    }

    button,
    a,
    input,
    select,
    textarea {
        touch-action: manipulation;
    }

    button,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    .page-header {
        align-items: stretch;
        gap: .8rem;
        margin-bottom: 1.15rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: .92rem;
    }

    .goe-panel,
    .billing-document,
    .settings-card,
    .document-card {
        border-radius: 18px;
    }

    .billing-header-actions,
    .document-actions,
    .admin-user-detail-actions,
    .admin-company-detail-actions,
    .device-detail-actions {
        width: 100%;
    }

    .billing-header-actions > *,
    .document-actions > *,
    .admin-user-detail-actions > *,
    .admin-company-detail-actions > *,
    .device-detail-actions > * {
        min-height: 46px;
    }

    .billing-table-shell,
    .charging-table-shell,
    .import-history-table-shell,
    .permissions-panel {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }
}


/* ============================================================
   0.9.3d – NATIVE-LIKE MOBILE APP DESIGN SYSTEM
   All MobileNavigation styles live globally on purpose.
   NavLink output is rendered by a child component and must not
   depend on Blazor CSS isolation.
   ============================================================ */

.ios-tabbar,
.ios-more-layer {
    display: none;
}

@media (max-width: 640.98px) {
    html {
        scroll-padding-top: calc(5.2rem + env(safe-area-inset-top));
    }

    body {
        overscroll-behavior-y: none;
    }

    /* ---------- iOS-like tab bar ---------- */
    .ios-tabbar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 220;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        box-sizing: border-box;
        height: calc(4.55rem + env(safe-area-inset-bottom));
        padding:
            0.35rem
            max(0.2rem, env(safe-area-inset-right))
            calc(0.3rem + env(safe-area-inset-bottom))
            max(0.2rem, env(safe-area-inset-left));
        border-top: 0.5px solid rgba(34, 63, 83, 0.13);
        background: rgba(248, 251, 253, 0.86);
        box-shadow: 0 -8px 28px rgba(18, 52, 75, 0.055);
        backdrop-filter: saturate(190%) blur(26px);
        -webkit-backdrop-filter: saturate(190%) blur(26px);
        font-family:
            -apple-system,
            BlinkMacSystemFont,
            "SF Pro Text",
            "Roboto",
            sans-serif;
    }

    .ios-tab,
    a.ios-tab,
    button.ios-tab {
        appearance: none;
        display: grid;
        grid-template-rows: 1.55rem auto;
        place-items: center;
        align-content: center;
        gap: 0.12rem;
        min-width: 0;
        min-height: 3.7rem;
        margin: 0;
        padding: 0.22rem 0.04rem;
        border: 0 !important;
        border-radius: 12px;
        color: #85949f !important;
        background: transparent !important;
        box-shadow: none !important;
        font: inherit;
        text-align: center;
        text-decoration: none !important;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .ios-tab:hover,
    .ios-tab:focus,
    .ios-tab:active {
        color: #85949f !important;
        background: transparent !important;
        text-decoration: none !important;
        transform: none !important;
        box-shadow: none !important;
    }

    .ios-tab.active {
        color: #0787d1 !important;
    }

    .ios-tab-icon {
        display: grid;
        place-items: center;
        width: 1.55rem;
        height: 1.55rem;
    }

    .ios-tab-icon img,
    .ios-tab-icon svg {
        display: block;
        width: 1.36rem;
        height: 1.36rem;
        object-fit: contain;
    }

    .ios-tab-icon svg {
        fill: currentColor;
    }

    .ios-tab:not(.active) .ios-tab-icon img {
        filter:
            brightness(0)
            saturate(100%)
            invert(62%)
            sepia(8%)
            saturate(524%)
            hue-rotate(158deg)
            brightness(91%)
            contrast(88%);
    }

    .ios-tab.active .ios-tab-icon img {
        filter:
            brightness(0)
            saturate(100%)
            invert(44%)
            sepia(93%)
            saturate(1869%)
            hue-rotate(171deg)
            brightness(92%)
            contrast(96%);
    }

    .ios-tab-label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        color: inherit !important;
        font-size: 0.61rem;
        font-weight: 540;
        line-height: 1;
        letter-spacing: -0.012em;
        text-align: center;
        text-decoration: none !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ios-tab.active .ios-tab-label {
        font-weight: 650;
    }

    /* ---------- More bottom sheet ---------- */
    .ios-more-layer {
        position: fixed;
        inset: 0;
        z-index: 240;
        display: block;
        visibility: hidden;
        pointer-events: none;
    }

    html.ios-more-open .ios-more-layer {
        visibility: visible;
        pointer-events: auto;
    }

    .ios-more-backdrop {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        border: 0 !important;
        opacity: 0;
        background: rgba(12, 22, 29, 0.30) !important;
        box-shadow: none !important;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        transition: opacity 220ms ease;
    }

    html.ios-more-open .ios-more-backdrop {
        opacity: 1;
    }

    .ios-more-sheet {
        position: absolute;
        right: 0.65rem;
        bottom: calc(0.65rem + env(safe-area-inset-bottom));
        left: 0.65rem;
        box-sizing: border-box;
        max-height: min(72dvh, 610px);
        padding: 0.55rem 0.85rem 0.85rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 0.5px solid rgba(39, 66, 85, 0.10);
        border-radius: 26px;
        color: #17283a;
        background: rgba(249, 251, 253, 0.985);
        box-shadow: 0 24px 80px rgba(10, 31, 45, 0.24);
        transform: translate3d(0, calc(100% + 2rem), 0);
        transition: transform 320ms cubic-bezier(.22, .82, .24, 1);
        -webkit-overflow-scrolling: touch;
    }

    html.ios-more-open .ios-more-sheet {
        transform: translate3d(0, 0, 0);
    }

    .ios-sheet-handle {
        width: 2.3rem;
        height: 0.28rem;
        margin: 0.08rem auto 0.65rem;
        border-radius: 999px;
        background: rgba(98, 115, 126, 0.28);
    }

    .ios-sheet-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        padding: 0 0.15rem 0.8rem;
    }

    .ios-sheet-header h2 {
        margin: 0;
        color: #17283a;
        font-size: 1.4rem;
        font-weight: 730;
        line-height: 1.05;
        letter-spacing: -0.035em;
    }

    .ios-sheet-header p {
        margin: 0.23rem 0 0;
        color: #83929d;
        font-size: 0.72rem;
    }

    .ios-sheet-close {
        appearance: none;
        display: grid;
        place-items: center;
        width: 2rem;
        height: 2rem;
        flex: 0 0 2rem;
        padding: 0;
        border: 0 !important;
        border-radius: 50%;
        color: #72838f;
        background: rgba(102, 120, 132, 0.12) !important;
        box-shadow: none !important;
    }

    .ios-sheet-close svg {
        width: 1rem;
        height: 1rem;
    }

    .ios-sheet-list,
    .ios-sheet-logout-form {
        margin: 0;
    }

    .ios-sheet-list {
        overflow: hidden;
        border: 0.5px solid rgba(38, 65, 84, 0.11);
        border-radius: 17px;
        background: rgba(255, 255, 255, 0.88);
    }

    a.ios-sheet-item {
        display: grid !important;
        grid-template-columns: 2.25rem minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.72rem;
        min-height: 4.05rem;
        padding: 0.48rem 0.72rem;
        color: #17283a !important;
        background: transparent !important;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
    }

    a.ios-sheet-item + a.ios-sheet-item {
        border-top: 0.5px solid rgba(38, 65, 84, 0.10);
    }

    a.ios-sheet-item:active {
        background: rgba(7, 135, 209, 0.055) !important;
    }

    .ios-sheet-item-icon {
        display: grid;
        place-items: center;
        width: 2.15rem;
        height: 2.15rem;
        border: 0.5px solid #cfe6f4;
        border-radius: 10px;
        background: #eaf6fc;
    }

    .ios-sheet-item-icon img {
        width: 1.18rem;
        height: 1.18rem;
        object-fit: contain;
    }

    .ios-sheet-item-copy {
        display: grid;
        gap: 0.1rem;
        min-width: 0;
    }

    .ios-sheet-item-copy strong {
        color: #17283a !important;
        font-size: 0.88rem;
        font-weight: 650;
        line-height: 1.15;
        text-decoration: none !important;
    }

    .ios-sheet-item-copy small {
        overflow: hidden;
        color: #84939e !important;
        font-size: 0.68rem;
        font-weight: 500;
        line-height: 1.2;
        text-decoration: none !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ios-sheet-chevron {
        color: #9ba8b1;
        font-size: 1.5rem;
        line-height: 1;
    }

    .ios-sheet-logout-form {
        margin-top: 0.72rem;
        overflow: hidden;
        border: 0.5px solid rgba(177, 54, 66, 0.12);
        border-radius: 17px;
        background: rgba(255, 255, 255, 0.88);
    }

    button.ios-sheet-logout {
        appearance: none;
        display: grid;
        grid-template-columns: 2.25rem minmax(0, 1fr);
        align-items: center;
        gap: 0.72rem;
        width: 100%;
        min-height: 3.75rem;
        padding: 0.48rem 0.72rem;
        border: 0 !important;
        color: #c63e49 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-align: left;
    }

    .ios-sheet-item-icon-danger {
        border-color: #f0d5d8;
        background: #fff1f2;
    }

    .ios-sheet-item-icon-danger img {
        filter:
            brightness(0)
            saturate(100%)
            invert(36%)
            sepia(51%)
            saturate(1578%)
            hue-rotate(318deg)
            brightness(89%)
            contrast(92%);
    }

    .ios-sheet-logout strong {
        color: #c63e49 !important;
        font-size: 0.88rem;
        font-weight: 650;
    }

    .ios-sheet-version {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.85rem 0.25rem 0;
        color: #8b99a4;
        font-size: 0.66rem;
    }

    .ios-sheet-version span:first-child {
        color: #0787d1;
        font-weight: 650;
    }

    html.ios-more-open body {
        overflow: hidden !important;
    }

    /* ---------- shared native mobile page rhythm ---------- */
    .page-header,
    .dashboard-header,
    .charging-header,
    .import-page-header,
    .documents-header,
    .settings-header,
    .general-settings-header,
    .system-header,
    .device-header,
    .admin-users-header,
    .admin-companies-header,
    .roles-header {
        margin-bottom: 1rem !important;
    }

    .page-header h1,
    .dashboard-header h1,
    .charging-header h1,
    .import-page-header h1,
    .documents-header h1,
    .settings-header h1,
    .general-settings-header h1,
    .system-header h1,
    .device-header h1,
    .admin-users-header h1,
    .admin-companies-header h1,
    .roles-header h1 {
        font-size: clamp(1.65rem, 7.8vw, 2rem) !important;
        line-height: 1.08 !important;
        letter-spacing: -0.04em !important;
    }

    .page-header p,
    .dashboard-header p,
    .charging-header p,
    .import-page-header p,
    .documents-header p,
    .settings-header p,
    .general-settings-header p,
    .system-header p,
    .device-header p,
    .admin-users-header p,
    .admin-companies-header p,
    .roles-header p {
        margin-top: 0.4rem !important;
        font-size: 0.88rem !important;
        line-height: 1.42 !important;
    }

    .goe-panel,
    .dashboard-panel,
    .charging-panel,
    .import-panel,
    .document-card,
    .settings-card,
    .general-settings-panel,
    .system-panel,
    .device-card,
    .admin-user-card,
    .admin-company-card {
        border-radius: 20px !important;
        box-shadow: 0 8px 28px rgba(13, 46, 72, 0.055) !important;
    }

    button,
    .btn,
    a[role="button"] {
        min-height: 44px;
    }

    /* ---------- Dark material ---------- */
    :root[data-theme="dark"] .ios-tabbar {
        border-top-color: rgba(144, 174, 190, 0.14);
        background: rgba(17, 34, 44, 0.87);
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.20);
    }

    :root[data-theme="dark"] .ios-tab,
    :root[data-theme="dark"] a.ios-tab,
    :root[data-theme="dark"] button.ios-tab {
        color: #899da9 !important;
    }

    :root[data-theme="dark"] .ios-tab.active {
        color: #45b4f0 !important;
    }

    :root[data-theme="dark"] .ios-tab:not(.active) .ios-tab-icon img {
        filter:
            brightness(0)
            saturate(100%)
            invert(68%)
            sepia(7%)
            saturate(691%)
            hue-rotate(157deg)
            brightness(91%)
            contrast(88%);
    }

    :root[data-theme="dark"] .ios-tab.active .ios-tab-icon img {
        filter:
            brightness(0)
            saturate(100%)
            invert(66%)
            sepia(66%)
            saturate(1527%)
            hue-rotate(168deg)
            brightness(102%)
            contrast(88%);
    }

    :root[data-theme="dark"] .ios-more-backdrop {
        background: rgba(0, 0, 0, 0.44) !important;
    }

    :root[data-theme="dark"] .ios-more-sheet {
        color: #edf4f8;
        border-color: rgba(145, 176, 192, 0.12);
        background: rgba(21, 39, 49, 0.985);
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
    }

    :root[data-theme="dark"] .ios-sheet-handle {
        background: rgba(207, 221, 229, 0.23);
    }

    :root[data-theme="dark"] .ios-sheet-header h2 {
        color: #edf4f8;
    }

    :root[data-theme="dark"] .ios-sheet-header p {
        color: #91a5b2;
    }

    :root[data-theme="dark"] .ios-sheet-close {
        color: #b8cad4;
        background: rgba(194, 211, 220, 0.12) !important;
    }

    :root[data-theme="dark"] .ios-sheet-list,
    :root[data-theme="dark"] .ios-sheet-logout-form {
        border-color: rgba(148, 178, 194, 0.13);
        background: rgba(29, 50, 62, 0.94);
    }

    :root[data-theme="dark"] a.ios-sheet-item {
        color: #edf4f8 !important;
    }

    :root[data-theme="dark"] a.ios-sheet-item + a.ios-sheet-item {
        border-top-color: rgba(148, 178, 194, 0.12);
    }

    :root[data-theme="dark"] .ios-sheet-item-icon {
        border-color: #31566c;
        background: #17394c;
    }

    :root[data-theme="dark"] .ios-sheet-item-icon img {
        filter:
            brightness(0)
            saturate(100%)
            invert(83%)
            sepia(13%)
            saturate(698%)
            hue-rotate(165deg)
            brightness(102%)
            contrast(94%);
    }

    :root[data-theme="dark"] .ios-sheet-item-copy strong {
        color: #edf4f8 !important;
    }

    :root[data-theme="dark"] .ios-sheet-item-copy small {
        color: #93a8b5 !important;
    }

    :root[data-theme="dark"] .ios-sheet-version {
        color: #8196a3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ios-more-backdrop,
    .ios-more-sheet {
        transition: none !important;
    }
}


/* 0.9.3d – Mobile Qualitätsfix 1 */
@media (max-width: 640.98px) {
  .ios-tabbar{position:fixed!important;inset:auto 0 0 0!important;transform:translateZ(0);isolation:isolate}
  .ios-more-layer{position:fixed!important;inset:0!important;transform:translateZ(0)}
  html.ios-standalone .ios-tabbar{height:calc(4.45rem + max(env(safe-area-inset-bottom),.7rem));padding-bottom:max(calc(.26rem + env(safe-area-inset-bottom)),.78rem)}
  html.ios-standalone .ios-more-sheet{bottom:max(calc(.55rem + env(safe-area-inset-bottom)),1rem)}
  button.ios-sheet-close{width:2rem!important;min-width:2rem!important;height:2rem!important;min-height:2rem!important;aspect-ratio:1/1;padding:0!important;border-radius:999px!important}
  .ios-account-card{display:grid;gap:0;margin-top:.72rem;overflow:hidden;border:.5px solid rgba(38,65,84,.11);border-radius:17px;background:rgba(255,255,255,.88)}
  .ios-account-main{display:grid;grid-template-columns:2.4rem minmax(0,1fr);align-items:center;gap:.75rem;min-height:4rem;padding:.55rem .75rem}
  .ios-account-avatar{display:grid;place-items:center;width:2.25rem;height:2.25rem;border:.5px solid #cfe6f4;border-radius:11px;color:#087ac0;background:#eaf6fc;font-size:.76rem;font-weight:750}
  .ios-account-copy{display:grid;gap:.08rem;min-width:0}.ios-account-copy small{color:#83939e!important;font-size:.67rem;font-weight:520}.ios-account-copy strong{overflow:hidden;color:#17283a!important;font-size:.9rem;font-weight:680;text-overflow:ellipsis;white-space:nowrap}
  .ios-account-logout-form{margin:0;border-top:.5px solid rgba(38,65,84,.10)}
  button.ios-account-logout{appearance:none;display:flex;align-items:center;justify-content:space-between;width:100%;min-height:3rem;padding:.55rem .75rem;border:0!important;color:#667b89!important;background:transparent!important;box-shadow:none!important;font:inherit;font-size:.76rem;font-weight:620;text-align:left}
  .ios-account-logout img{width:1rem;height:1rem;opacity:.62;object-fit:contain}
  :root[data-theme="dark"] .ios-account-card{border-color:rgba(148,178,194,.13);background:rgba(29,50,62,.94)}
  :root[data-theme="dark"] .ios-account-avatar{border-color:#31566c;color:#68c1ef;background:#17394c}
  :root[data-theme="dark"] .ios-account-copy small{color:#91a5b2!important}:root[data-theme="dark"] .ios-account-copy strong{color:#edf4f8!important}
  :root[data-theme="dark"] .ios-account-logout-form{border-top-color:rgba(148,178,194,.12)}:root[data-theme="dark"] button.ios-account-logout{color:#9fb2be!important}
}


/* ============================================================
   0.9.3f – FINAL MOBILE QUALITY PASS
   ============================================================ */
@media (max-width: 640.98px) {
    /* Safari stays as before. Web-App / standalone gets a true safe gap. */
    html.ios-standalone .ios-tabbar {
        right: 0.7rem !important;
        bottom: max(env(safe-area-inset-bottom), 0.9rem) !important;
        left: 0.7rem !important;
        width: auto !important;
        height: 4.15rem !important;
        padding: 0.3rem 0.18rem !important;
        border: 0.5px solid rgba(34, 63, 83, 0.13) !important;
        border-radius: 19px !important;
        box-shadow:
            0 8px 30px rgba(18, 52, 75, 0.10),
            0 1px 0 rgba(255, 255, 255, 0.76) inset !important;
    }

    html.ios-standalone .content {
        padding-bottom:
            calc(7.35rem + max(env(safe-area-inset-bottom), 0.9rem)) !important;
    }

    html.ios-standalone .ios-more-sheet {
        bottom:
            calc(5.4rem + max(env(safe-area-inset-bottom), 0.9rem)) !important;
    }

    /* Button reset: prevents global mobile button min-height from deforming X. */
    button.ios-sheet-close {
        display: grid !important;
        place-items: center !important;
        box-sizing: border-box !important;
        width: 2.15rem !important;
        min-width: 2.15rem !important;
        max-width: 2.15rem !important;
        height: 2.15rem !important;
        min-height: 2.15rem !important;
        max-height: 2.15rem !important;
        aspect-ratio: 1 / 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 50% !important;
        line-height: 1 !important;
        box-shadow: none !important;
    }

    .ios-sheet-close svg {
        width: 1rem !important;
        height: 1rem !important;
    }

    /* Signed-in card */
    .ios-account-card {
        display: block !important;
        margin-top: 0.72rem !important;
        overflow: hidden !important;
        border: 0.5px solid rgba(38, 65, 84, 0.11) !important;
        border-radius: 17px !important;
        background: rgba(255, 255, 255, 0.88) !important;
    }

    .ios-account-main {
        display: grid !important;
        grid-template-columns: 2.35rem minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 0.72rem !important;
        min-height: 3.75rem !important;
        padding: 0.55rem 0.72rem !important;
    }

    .ios-account-avatar {
        display: grid !important;
        place-items: center !important;
        box-sizing: border-box !important;
        width: 2.2rem !important;
        min-width: 2.2rem !important;
        height: 2.2rem !important;
        min-height: 2.2rem !important;
        border: 0.5px solid #cfe6f4 !important;
        border-radius: 10px !important;
        color: #087ac0 !important;
        background: #eaf6fc !important;
        font-size: 0.74rem !important;
        font-weight: 750 !important;
    }

    .ios-account-copy {
        display: grid !important;
        gap: 0.08rem !important;
        min-width: 0 !important;
    }

    .ios-account-copy small {
        color: #83939e !important;
        font-size: 0.66rem !important;
        font-weight: 520 !important;
    }

    .ios-account-copy strong {
        overflow: hidden !important;
        color: #17283a !important;
        font-size: 0.88rem !important;
        font-weight: 680 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .ios-account-logout-form {
        margin: 0 !important;
        border-top: 0.5px solid rgba(38, 65, 84, 0.10) !important;
    }

    button.ios-account-logout {
        appearance: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-height: 2.85rem !important;
        margin: 0 !important;
        padding: 0.5rem 0.72rem !important;
        border: 0 !important;
        border-radius: 0 !important;
        color: #657987 !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 0.75rem !important;
        font-weight: 620 !important;
        line-height: 1 !important;
        text-align: left !important;
    }

    .ios-account-logout img {
        width: 1rem !important;
        min-width: 1rem !important;
        height: 1rem !important;
        opacity: 0.6 !important;
        object-fit: contain !important;
    }

    :root[data-theme="dark"] .ios-account-card {
        border-color: rgba(148, 178, 194, 0.13) !important;
        background: rgba(29, 50, 62, 0.94) !important;
    }

    :root[data-theme="dark"] .ios-account-avatar {
        border-color: #31566c !important;
        color: #68c1ef !important;
        background: #17394c !important;
    }

    :root[data-theme="dark"] .ios-account-copy small {
        color: #91a5b2 !important;
    }

    :root[data-theme="dark"] .ios-account-copy strong {
        color: #edf4f8 !important;
    }

    :root[data-theme="dark"] button.ios-account-logout {
        color: #9fb2be !important;
    }
}


/* ============================================================
   0.9.3g – iOS 26 Navigation Final
   Compact floating Liquid-Glass-style tab bar.
   ============================================================ */
@media (max-width: 640.98px) {
    /*
       Home-screen / standalone mode:
       use a fixed minimum 34px bottom safe zone as fallback even
       when WebKit reports env(safe-area-inset-bottom) as zero.
    */
    html.ios-standalone .ios-tabbar {
        right: 0.85rem !important;
        left: 0.85rem !important;
        bottom:
            calc(max(env(safe-area-inset-bottom), 34px) + 8px) !important;
        width: auto !important;
        height: 3.95rem !important;
        padding: 0.24rem 0.14rem !important;
        border: 0.5px solid rgba(58, 82, 98, 0.14) !important;
        border-radius: 22px !important;
        background: rgba(247, 250, 252, 0.76) !important;
        box-shadow:
            0 10px 34px rgba(17, 45, 64, 0.12),
            inset 0 0.5px 0 rgba(255, 255, 255, 0.92) !important;
        backdrop-filter: saturate(190%) blur(28px) !important;
        -webkit-backdrop-filter: saturate(190%) blur(28px) !important;
    }

    html.ios-standalone .ios-tab {
        min-height: 3.35rem !important;
        grid-template-rows: 1.42rem auto !important;
        gap: 0.08rem !important;
    }

    html.ios-standalone .ios-tab-icon {
        width: 1.42rem !important;
        height: 1.42rem !important;
    }

    html.ios-standalone .ios-tab-icon img,
    html.ios-standalone .ios-tab-icon svg {
        width: 1.27rem !important;
        height: 1.27rem !important;
    }

    html.ios-standalone .ios-tab-label {
        font-size: 0.58rem !important;
    }

    html.ios-standalone .content {
        padding-bottom:
            calc(5.5rem + max(env(safe-area-inset-bottom), 34px)) !important;
    }

    /*
       When More opens, the tab bar leaves the interaction layer.
       The sheet itself sits directly above the Home-indicator safe area.
    */
    html.ios-more-open .ios-tabbar {
        opacity: 0 !important;
        transform: translate3d(0, 1rem, 0) !important;
        pointer-events: none !important;
        transition:
            opacity 160ms ease,
            transform 220ms ease !important;
    }

    html.ios-standalone .ios-more-sheet {
        right: 0.7rem !important;
        left: 0.7rem !important;
        bottom:
            calc(max(env(safe-area-inset-bottom), 34px) + 8px) !important;
        max-height:
            calc(100dvh - max(env(safe-area-inset-bottom), 34px) - 3.2rem) !important;
        border-radius: 27px !important;
    }

    /* Account card follows the light-blue signed-in panel from desktop. */
    .ios-account-card {
        border-color: #c7e4f3 !important;
        background: linear-gradient(
            180deg,
            #eaf6fc 0%,
            #e4f3fb 100%) !important;
    }

    .ios-account-logout-form {
        border-top-color: #c8e3f2 !important;
    }

    button.ios-account-logout {
        color: #5d7484 !important;
    }

    :root[data-theme="dark"] .ios-account-card {
        border-color: #31566c !important;
        background: linear-gradient(
            180deg,
            #17394c 0%,
            #163343 100%) !important;
    }

    :root[data-theme="dark"] .ios-account-logout-form {
        border-top-color: #31566c !important;
    }

    /* X stays mathematically circular regardless of global button rules. */
    button.ios-sheet-close {
        inline-size: 2.15rem !important;
        block-size: 2.15rem !important;
        min-inline-size: 2.15rem !important;
        max-inline-size: 2.15rem !important;
        min-block-size: 2.15rem !important;
        max-block-size: 2.15rem !important;
        flex: 0 0 2.15rem !important;
        aspect-ratio: 1 !important;
        border-radius: 50% !important;
    }
}

/* ============================================================
   0.9.3h – iOS Standalone Navigation: robuste Endlösung
   ============================================================ */
@media (max-width: 640.98px) and (display-mode: standalone) {
    .ios-tabbar,
    html.ios-standalone .ios-tabbar {
        position: fixed !important;
        z-index: 220 !important;
        top: auto !important;
        right: 14px !important;
        bottom: 42px !important;
        left: 14px !important;
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        box-sizing: border-box !important;
        width: auto !important;
        height: 62px !important;
        min-height: 62px !important;
        max-height: 62px !important;
        margin: 0 !important;
        padding: 5px 4px !important;
        border: 0.5px solid rgba(65, 89, 104, 0.15) !important;
        border-radius: 21px !important;
        opacity: 1 !important;
        background: rgba(249, 251, 253, 0.94) !important;
        box-shadow: 0 10px 32px rgba(20, 49, 69, 0.14), inset 0 0.5px 0 rgba(255, 255, 255, 0.96) !important;
        transform: translate3d(0, 0, 0) !important;
        backdrop-filter: saturate(180%) blur(24px) !important;
        -webkit-backdrop-filter: saturate(180%) blur(24px) !important;
    }

    .ios-tabbar .ios-tab,
    html.ios-standalone .ios-tabbar .ios-tab {
        min-width: 0 !important;
        min-height: 50px !important;
        height: 50px !important;
        padding: 3px 2px !important;
        grid-template-rows: 25px 13px !important;
        gap: 2px !important;
    }

    .ios-tabbar .ios-tab-icon,
    html.ios-standalone .ios-tabbar .ios-tab-icon {
        width: 25px !important;
        height: 25px !important;
    }

    .ios-tabbar .ios-tab-icon img,
    .ios-tabbar .ios-tab-icon svg,
    html.ios-standalone .ios-tabbar .ios-tab-icon img,
    html.ios-standalone .ios-tabbar .ios-tab-icon svg {
        width: 22px !important;
        height: 22px !important;
    }

    .ios-tabbar .ios-tab-label,
    html.ios-standalone .ios-tabbar .ios-tab-label {
        font-size: 10px !important;
        line-height: 12px !important;
    }

    .content,
    html.ios-standalone .content {
        padding-bottom: 124px !important;
    }

    .ios-more-sheet,
    html.ios-standalone .ios-more-sheet {
        position: absolute !important;
        top: auto !important;
        right: 12px !important;
        bottom: 38px !important;
        left: 12px !important;
        width: auto !important;
        max-height: calc(100svh - 76px) !important;
        margin: 0 !important;
        padding-bottom: 14px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        border-radius: 27px !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch;
    }

    html.ios-more-open .ios-tabbar,
    html.ios-more-open.ios-standalone .ios-tabbar {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translate3d(0, 18px, 0) !important;
    }

    .ios-sheet-version {
        padding-bottom: 4px !important;
    }

    .ios-tab:not(.active) {
        color: #738590 !important;
    }

    .ios-tab.active {
        color: #0787d1 !important;
    }

    :root[data-theme="dark"] .ios-tabbar,
    :root[data-theme="dark"] html.ios-standalone .ios-tabbar {
        border-color: rgba(146, 174, 190, 0.16) !important;
        background: rgba(20, 39, 50, 0.95) !important;
        box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34), inset 0 0.5px 0 rgba(255, 255, 255, 0.08) !important;
    }

    :root[data-theme="dark"] .ios-tab:not(.active) {
        color: #91a4af !important;
    }

    :root[data-theme="dark"] .ios-tab.active {
        color: #45b4f0 !important;
    }
}

/* ============================================================
   0.9.4 – zentraler Mobile-Safe-Bottom und Navigation-Kontrast
   ============================================================ */
@media (max-width: 640.98px) {
    /*
       Zentraler Scrollpuffer: Jede mobile Seite kann ihren letzten
       Inhalt vollständig oberhalb der schwebenden Navigation anzeigen.
    */
    .content {
        padding-bottom: 9.5rem !important;
    }

    .content-inner {
        padding-bottom: 1.25rem !important;
    }

    /* Die Navigation hebt sich klarer vom Seitenhintergrund ab. */
    .ios-tabbar {
        border-color: rgba(53, 82, 101, 0.20) !important;
        background: rgba(244, 248, 251, 0.96) !important;
        box-shadow:
            0 12px 34px rgba(17, 45, 64, 0.16),
            inset 0 0.5px 0 rgba(255, 255, 255, 0.98) !important;
    }

    :root[data-theme="dark"] .ios-tabbar,
    :root[data-theme="dark"] html.ios-standalone .ios-tabbar {
        border-color: rgba(139, 172, 190, 0.22) !important;
        background: rgba(22, 42, 53, 0.97) !important;
        box-shadow:
            0 12px 34px rgba(0, 0, 0, 0.36),
            inset 0 0.5px 0 rgba(255, 255, 255, 0.08) !important;
    }

    /* Zusätzlicher Abschlussabstand für Seiten mit langen Aktionsbereichen. */
    :is(
        .dashboard-page,
        .billing-page,
        .profile-page,
        .settings-page,
        .general-settings-page,
        .system-page,
        .roles-page,
        .device-page,
        .admin-users-page,
        .admin-companies-page,
        .admin-user-detail,
        .admin-company-detail) {
        margin-bottom: 1.5rem !important;
    }
}


/* ============================================================
   0.9.4 – zentraler Mobile-Abschlussabstand final
   ============================================================ */
@media (max-width: 640.98px) {
    .content {
        padding-bottom: 10.75rem !important;
    }

    .content-inner {
        padding-bottom: 1.5rem !important;
    }

    :is(
        .dashboard-page,
        .billing-page,
        .documents-page,
        .profile-page,
        .settings-page,
        .general-settings-page,
        .system-page,
        .roles-page,
        .device-page,
        .device-detail-page,
        .admin-users-page,
        .admin-user-detail-page,
        .admin-companies-page,
        .admin-company-detail-page) {
        padding-bottom: 1.5rem !important;
    }

    /* Navigation klar vom Seitenhintergrund absetzen */
    .ios-tabbar {
        border-color: rgba(47, 78, 98, 0.22) !important;
        background: rgba(247, 250, 252, 0.985) !important;
        box-shadow:
            0 12px 36px rgba(17, 45, 64, 0.18),
            inset 0 0.5px 0 rgba(255, 255, 255, 1) !important;
    }

    :root[data-theme="dark"] .ios-tabbar {
        border-color: rgba(139, 172, 190, 0.24) !important;
        background: rgba(22, 42, 53, 0.985) !important;
    }
}


/* ============================================================
   0.9.5 – MOBILE GLOBAL RHYTHM / TABBAR FINAL
   ============================================================ */
@media (max-width: 640.98px) {
    /* Ein einziger, zentraler Abschlussabstand für alle Seiten. */
    .content,
    html.ios-standalone .content {
        padding-bottom: 8.6rem !important;
    }

    .content-inner {
        padding-bottom: 0 !important;
    }

    :is(
        .dashboard-page,
        .charging-page,
        .import-page,
        .billing-page,
        .documents-page,
        .profile-page,
        .settings-page,
        .general-settings-page,
        .system-page,
        .roles-page,
        .device-page,
        .device-detail-page,
        .admin-users-page,
        .admin-user-detail-page,
        .admin-companies-page,
        .admin-company-detail-page) {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .ios-tabbar,
    html.ios-standalone .ios-tabbar {
        border: 1px solid rgba(47, 78, 98, 0.22) !important;
        background: rgba(250, 252, 253, 0.985) !important;
        box-shadow:
            0 14px 38px rgba(16, 44, 63, 0.20),
            0 2px 10px rgba(16, 44, 63, 0.08),
            inset 0 0.5px 0 rgba(255, 255, 255, 1) !important;
    }

    .ios-sheet-version {
        display: block !important;
        padding-top: 0.9rem !important;
        text-align: center !important;
    }

    .ios-sheet-version span {
        display: inline !important;
        color: #7e909c !important;
        font-size: 0.68rem !important;
        font-weight: 600 !important;
    }

    :root[data-theme="dark"] .ios-tabbar {
        border-color: rgba(139, 172, 190, 0.27) !important;
        background: rgba(22, 42, 53, 0.99) !important;
        box-shadow:
            0 14px 38px rgba(0, 0, 0, 0.42),
            0 2px 10px rgba(0, 0, 0, 0.22),
            inset 0 0.5px 0 rgba(255, 255, 255, 0.08) !important;
    }

    :root[data-theme="dark"] .ios-sheet-version span {
        color: #8ea2ae !important;
    }
}

/* 0.9.5 – Datum/Uhrzeit-Kachel bleibt auch im Dark Mode transparent. */
@media (min-width: 821px) {
    :root[data-theme="dark"] .dashboard-date-panel {
        background: transparent !important;
        box-shadow: none !important;
    }
}
