#strompreis-error.alert {
    background: var(--error-container);
    color: var(--on-error-container);
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
}

.strompreis-dialog {
    width: min(1080px, 94vw);
}

.strompreis-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.strompreis-header h4 {
    margin: 3px 0 0;
}

.strompreis-icon-button,
.strompreis-remove {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-container-low);
    color: var(--text-secondary);
    cursor: pointer;
}

.strompreis-icon-button:hover,
.strompreis-remove:hover {
    border-color: var(--outline);
    color: var(--on-surface);
}

.strompreis-icon-button .material-symbols-outlined,
.strompreis-remove .material-symbols-outlined {
    font-size: 20px;
}

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

.strompreis-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 72px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-container-low);
}

.strompreis-summary-item > .material-symbols-outlined {
    color: var(--primary);
    font-size: 22px;
}

.strompreis-summary-item div {
    min-width: 0;
}

.strompreis-summary-item small,
.strompreis-summary-item strong {
    display: block;
}

.strompreis-summary-item small {
    margin-bottom: 3px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.strompreis-summary-item strong,
.strompreis-summary-item div > span {
    color: var(--on-surface);
    font-size: 13px;
    font-weight: 700;
}

.strompreis-consumption input {
    display: inline-block;
    width: 92px;
    height: 32px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 700;
}

.strompreis-portals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
}

.strompreis-portals .nav-button,
.strompreis-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    background: var(--surface-container-low);
    color: var(--on-surface);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.strompreis-portals .nav-button {
    width: auto;
}

.strompreis-portals .nav-button:hover,
.strompreis-add-button:hover {
    border-color: var(--outline);
    background: var(--surface-container);
}

.strompreis-portals .material-symbols-outlined,
.strompreis-add-button .material-symbols-outlined {
    font-size: 18px;
}

.strompreis-offer-form,
.strompreis-results {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.strompreis-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.strompreis-section-title .material-symbols-outlined {
    color: var(--primary);
    font-size: 20px;
}

.strompreis-section-title h5 {
    margin: 0;
    color: var(--on-surface);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
}

.strompreis-help {
    position: relative;
    display: inline-flex;
}

.strompreis-help-button {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: help;
}

.strompreis-help-button:hover,
.strompreis-help-button:focus-visible {
    background: var(--surface-container-high);
    color: var(--primary);
    outline: none;
}

.strompreis-help-button .material-symbols-outlined {
    font-size: 19px;
}

.strompreis-help-tooltip {
    position: absolute;
    z-index: 10;
    top: calc(100% + 7px);
    left: 0;
    width: min(340px, calc(100vw - 48px));
    padding: 11px 13px;
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    background: var(--on-surface);
    box-shadow: var(--shadow-md);
    color: var(--surface-card);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.55;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px);
    transition: opacity .15s ease, transform .15s ease;
}

.strompreis-help:hover .strompreis-help-tooltip,
.strompreis-help:focus-within .strompreis-help-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

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

.strompreis-form-grid > label:nth-child(-n+2) {
    grid-column: span 2;
}

.strompreis-form-grid label > span:first-child {
    display: inline-block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.strompreis-form-grid input::placeholder {
    color: var(--text-secondary);
    font-style: italic;
    opacity: .52;
}

#strompreis-offer-form .settings-input-unit input {
    padding-right: 72px;
}

#strompreis-offer-form .settings-input-unit span {
    position: absolute;
    top: 50%;
    right: 12px;
    margin: 0;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    pointer-events: none;
}

.strompreis-add-button {
    align-self: end;
    border-color: var(--primary);
    background: var(--primary);
    color: var(--on-primary);
}

.strompreis-add-button:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--on-primary);
    filter: brightness(1.08);
}

.strompreis-empty {
    padding: 24px;
    border: 1px dashed var(--outline-variant);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

.strompreis-table {
    min-width: 900px;
}

.strompreis-table td:first-child strong,
.strompreis-table td:first-child small,
.strompreis-table td.money small {
    display: block;
}

.strompreis-table td:first-child small,
.strompreis-table td.money small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 500;
}

.strompreis-table tr.strompreis-best td:first-child {
    box-shadow: inset 3px 0 var(--primary);
}

.strompreis-savings.pos {
    color: var(--pos);
    font-weight: 700;
}

.strompreis-savings.neg {
    color: var(--neg);
    font-weight: 700;
}

.strompreis-remove {
    width: 32px;
    height: 32px;
}

#strompreis-error {
    margin-top: 14px;
}

@media (max-width: 900px) {
    .strompreis-summary {
        grid-template-columns: 1fr;
    }

    .strompreis-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .strompreis-form-grid > label:nth-child(-n+2) {
        grid-column: auto;
    }
}

@media (max-width: 680px) {
    .strompreis-dialog {
        width: 96vw;
        padding: 18px 14px;
    }

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

    .strompreis-portals .nav-button,
    .strompreis-add-button {
        width: 100%;
    }
}

.eauto-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.eauto-page-header h3 {
    margin: 3px 0 0;
    font-size: 30px;
    letter-spacing: 0;
}

.eauto-eyebrow,
.eauto-panel-heading > div > span {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.eauto-header-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.eauto-header-actions .nav-button {
    width: auto;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border);
    background: var(--surface-card);
    color: var(--on-surface);
    letter-spacing: 0;
    text-transform: none;
}

.eauto-header-actions .nav-button:hover,
.eauto-header-actions .nav-button:focus-visible {
    border-color: var(--primary);
    background: var(--surface-container-low);
    color: var(--primary);
}

.eauto-year-filter {
    display: grid;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eauto-year-filter #eauto-year-select {
    min-width: 112px;
    height: 44px;
    margin: 0;
}

.eauto-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}

.eauto-kpi {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-right: 1px solid var(--border);
}

.eauto-kpi:last-child {
    border-right: 0;
}

.eauto-kpi > .material-symbols-outlined {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-container-low);
    color: var(--primary);
}

.eauto-kpi-pv > .material-symbols-outlined,
.eauto-kpi-saving > .material-symbols-outlined {
    color: var(--success);
}

.eauto-kpi > div {
    min-width: 0;
    display: grid;
}

.eauto-kpi > div > span,
.eauto-kpi small {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eauto-kpi strong {
    margin: 2px 0;
    overflow: hidden;
    color: var(--on-surface);
    font-family: var(--font-display);
    font-size: 21px;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eauto-analysis-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(270px, .7fr);
    gap: 16px;
    margin-bottom: 16px;
}

.eauto-chart-panel,
.eauto-vehicle-panel,
.eauto-table-panel {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}

.eauto-chart-panel,
.eauto-vehicle-panel {
    padding: 20px;
}

.eauto-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.eauto-panel-heading h4 {
    margin: 2px 0 0;
    font-size: 17px;
    letter-spacing: 0;
}

.eauto-panel-heading > small {
    color: var(--text-secondary);
    font-size: 10px;
}

.eauto-chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 10px;
}

.eauto-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.eauto-chart-legend span::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--chart-eauto-paid);
}

.eauto-chart-legend .eauto-legend-free::before {
    background: var(--chart-pos);
}

.eauto-chart-legend .eauto-legend-cost::before {
    height: 2px;
    border-radius: 0;
    background: var(--chart-eauto-cost);
}

.eauto-monthly-chart {
    height: 260px;
}

.eauto-vehicle-metrics {
    display: grid;
}

.eauto-vehicle-metrics > div {
    display: grid;
    gap: 3px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.eauto-vehicle-metrics > div:last-of-type {
    border-bottom: 0;
}

.eauto-vehicle-metrics span {
    color: var(--text-secondary);
    font-size: 10px;
}

.eauto-vehicle-metrics strong {
    color: var(--on-surface);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.eauto-table-panel {
    overflow: hidden;
}

.eauto-table-panel > .eauto-panel-heading {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.eauto-table-wrap {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    border: 0;
    border-radius: 0;
}

.eauto-data-table {
    min-width: 780px;
}

.eauto-data-table .eauto-month-row {
    cursor: pointer;
}

.eauto-data-table .eauto-month-row:hover,
.eauto-data-table .eauto-month-row:focus-visible {
    background: var(--row-hover);
    outline: 0;
}

.eauto-data-table td:first-child strong,
.eauto-data-table td:first-child small,
.eauto-data-table td.num small {
    display: block;
}

.eauto-data-table td:first-child small,
.eauto-data-table td.num small {
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 9px;
}

.eauto-table-action {
    width: 46px;
    text-align: center;
}

.eauto-table-action .material-symbols-outlined {
    color: var(--text-secondary);
    font-size: 19px;
}

@media (max-width: 1120px) {
    .eauto-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .eauto-kpi:nth-child(2) {
        border-right: 0;
    }

    .eauto-kpi:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }

    .eauto-analysis-grid {
        grid-template-columns: 1fr;
    }

    .eauto-vehicle-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }

    .eauto-vehicle-metrics > div,
    .eauto-vehicle-metrics > div:last-of-type {
        padding: 8px 0;
        border-right: 1px solid var(--border);
        border-bottom: 0;
    }

    .eauto-vehicle-metrics > div:last-of-type {
        border-right: 0;
    }
}

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

    .eauto-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .eauto-year-filter {
        grid-column: 1 / -1;
    }

    .eauto-year-filter #eauto-year-select,
    .eauto-header-actions .nav-button {
        width: 100%;
    }

    .eauto-kpis,
    .eauto-vehicle-metrics {
        grid-template-columns: 1fr;
    }

    .eauto-kpi,
    .eauto-kpi:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .eauto-kpi:last-child {
        border-bottom: 0;
    }

    .eauto-vehicle-metrics > div,
    .eauto-vehicle-metrics > div:last-of-type {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .eauto-vehicle-metrics > div:last-of-type {
        border-bottom: 0;
    }

    .eauto-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .eauto-chart-legend {
        justify-content: flex-start;
    }

    .eauto-monthly-chart {
        height: 230px;
    }
}

.wasser-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.wasser-page-header h3 {
    margin: 3px 0 0;
    font-size: 30px;
    letter-spacing: 0;
}

.wasser-eyebrow,
.wasser-panel-heading > div > span {
    color: var(--chart-wasser);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.wasser-header-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.wasser-header-actions .nav-button {
    display: inline-flex;
    width: auto;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid var(--border);
    background: var(--surface-card);
    color: var(--on-surface);
    letter-spacing: 0;
    text-transform: none;
}

.wasser-header-actions .nav-button:hover,
.wasser-header-actions .nav-button:focus-visible {
    border-color: var(--chart-wasser);
    background: var(--surface-container-low);
    color: var(--chart-wasser);
}

.wasser-header-actions .material-symbols-outlined {
    font-size: 19px;
}

#strom .wasser-eyebrow {
    color: var(--chart-strom);
}

#strom .wasser-header-actions .nav-button:hover,
#strom .wasser-header-actions .nav-button:focus-visible {
    border-color: var(--chart-strom);
    color: var(--chart-strom);
}

#strom .wasser-header-actions #btn-new-strom:hover,
#strom .wasser-header-actions #btn-new-strom:focus-visible {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 88%, var(--on-primary));
    color: var(--on-primary);
    filter: none;
}

.wasser-period-filter {
    display: grid;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.wasser-period-filter #wasser-period-select {
    min-width: 172px;
    height: 44px;
    margin: 0;
}

.wasser-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}

.wasser-kpi {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-right: 1px solid var(--border);
}

.wasser-kpi:last-child {
    border-right: 0;
}

.wasser-kpi > .material-symbols-outlined {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--chart-wasser) 11%, var(--surface-card));
    color: var(--chart-wasser);
}

.wasser-kpi > div {
    display: grid;
    min-width: 0;
}

.wasser-kpi > div > span,
.wasser-kpi small {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wasser-kpi strong {
    margin: 2px 0;
    overflow: hidden;
    color: var(--on-surface);
    font-family: var(--font-display);
    font-size: 21px;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wasser-kpi strong.pos {
    color: var(--pos);
}

.wasser-kpi strong.neg {
    color: var(--neg);
}

.wasser-analysis-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, .72fr);
    gap: 16px;
    margin-bottom: 16px;
}

.wasser-chart-panel,
.wasser-cost-panel,
.wasser-table-panel {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}

.wasser-chart-panel,
.wasser-cost-panel {
    padding: 20px;
}

.wasser-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.wasser-panel-heading h4 {
    margin: 2px 0 0;
    font-size: 17px;
    letter-spacing: 0;
}

.wasser-panel-heading > small {
    color: var(--text-secondary);
    font-size: 10px;
}

.wasser-chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 10px;
}

.wasser-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wasser-chart-legend span::before {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--chart-wasser);
    content: '';
}

.wasser-chart-legend .wasser-legend-previous::before {
    border: 1px solid var(--chart-wasser);
    background: var(--chart-wasser-previous);
}

.wasser-chart-legend .wasser-legend-cost::before {
    height: 2px;
    border-radius: 0;
    background: var(--chart-wasser-cost);
}

.wasser-monthly-chart {
    height: 280px;
}

.wasser-cost-total {
    display: grid;
    gap: 3px;
    padding: 14px 0 18px;
    border-bottom: 1px solid var(--border);
}

.wasser-cost-total span,
.wasser-cost-list span,
.wasser-year-comparison span,
.wasser-year-comparison small {
    color: var(--text-secondary);
    font-size: 10px;
}

.wasser-cost-total strong {
    font-family: var(--font-display);
    font-size: 25px;
    font-variant-numeric: tabular-nums;
}

.wasser-cost-list {
    display: grid;
    padding: 10px 0;
}

.wasser-cost-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.wasser-cost-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wasser-cost-list strong,
.wasser-year-comparison strong {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.wasser-cost-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chart-wasser);
}

.wasser-cost-dot-base {
    background: var(--chart-wasser-cost);
}

.wasser-cost-dot-wastewater {
    background: var(--tertiary);
}

.wasser-year-comparison {
    display: grid;
    gap: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.wasser-table-panel {
    overflow: hidden;
}

.wasser-table-panel > .wasser-panel-heading {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.wasser-table-wrap {
    max-height: 430px;
    overflow: auto;
    border: 0;
    border-radius: 0;
}

.wasser-data-table {
    min-width: 1160px;
}

.wasser-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.wasser-forecast-row {
    background: color-mix(in srgb, var(--chart-wasser-forecast) 9%, var(--row-base));
}

.wasser-forecast-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.5;
}

.wasser-forecast-note .material-symbols-outlined {
    color: var(--chart-wasser-forecast);
    font-size: 18px;
}

#gas .wasser-eyebrow,
#gas .wasser-panel-heading > div > span,
#gas .wasser-header-actions .nav-button:not(#btn-new-gas):hover,
#gas .wasser-header-actions .nav-button:not(#btn-new-gas):focus-visible {
    color: var(--chart-gas);
}

#gas .wasser-header-actions .nav-button:not(#btn-new-gas):hover,
#gas .wasser-header-actions .nav-button:not(#btn-new-gas):focus-visible {
    border-color: var(--chart-gas);
}

#gas .wasser-kpi > .material-symbols-outlined {
    background: color-mix(in srgb, var(--chart-gas) 11%, var(--surface-card));
    color: var(--chart-gas);
}

#gas .wasser-chart-legend span::before,
.gas-cost-dot-energy {
    background: var(--chart-gas);
}

#gas .wasser-chart-legend .gas-legend-previous::before {
    border: 1px solid var(--chart-gas);
    background: var(--chart-gas-fill);
}

#gas .wasser-chart-legend .gas-legend-cost::before,
.gas-cost-dot-advance {
    background: var(--chart-gas-cost);
}

.gas-cost-dot-base {
    background: var(--tertiary);
}

@media (max-width: 1120px) {
    .wasser-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wasser-kpi:nth-child(2) {
        border-right: 0;
    }

    .wasser-kpi:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }

    .wasser-analysis-grid {
        grid-template-columns: 1fr;
    }
}

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

    .wasser-header-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .wasser-period-filter {
        grid-column: 1 / -1;
    }

    .wasser-period-filter #wasser-period-select,
    .wasser-header-actions .nav-button {
        width: 100%;
    }

    .wasser-header-actions .nav-button {
        justify-content: center;
        white-space: nowrap;
    }

    .wasser-kpis {
        grid-template-columns: 1fr;
    }

    .wasser-kpi,
    .wasser-kpi:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .wasser-kpi:last-child {
        border-bottom: 0;
    }

    .wasser-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .wasser-chart-legend {
        justify-content: flex-start;
    }

    .wasser-monthly-chart {
        height: 245px;
    }
}

.finance-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.finance-page-header h3 {
    margin: 3px 0 0;
    font-size: 30px;
    letter-spacing: 0;
}

.finance-eyebrow,
.finance-panel-heading > div > span {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

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

.finance-header-actions .nav-button {
    display: inline-flex;
    width: auto;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid var(--border);
    background: var(--surface-card);
    color: var(--on-surface);
    letter-spacing: 0;
    text-transform: none;
}

.finance-header-actions .nav-button:hover,
.finance-header-actions .nav-button:focus-visible {
    border-color: var(--primary);
    background: var(--surface-container-low);
    color: var(--primary);
}

.finance-header-actions .material-symbols-outlined {
    font-size: 19px;
}

.finance-history-toggle {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-card);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.finance-history-toggle input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--primary);
}

.finance-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}

.finance-kpi {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-right: 1px solid var(--border);
}

.finance-kpi:last-child {
    border-right: 0;
}

.finance-kpi > .material-symbols-outlined {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary) 11%, var(--surface-card));
    color: var(--primary);
}

.finance-kpi > div {
    display: grid;
    min-width: 0;
}

.finance-kpi > div > span,
.finance-kpi small {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-kpi strong {
    margin: 2px 0;
    overflow: hidden;
    color: var(--on-surface);
    font-family: var(--font-display);
    font-size: 21px;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-overview-panel,
.finance-table-panel {
    min-width: 0;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}

.finance-overview-panel {
    padding: 20px;
}

.finance-table-panel {
    overflow: hidden;
}

.finance-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.finance-panel-heading h4 {
    margin: 2px 0 0;
    font-size: 17px;
    letter-spacing: 0;
}

.finance-panel-heading > small {
    color: var(--text-secondary);
    font-size: 10px;
}

.finance-table-panel > .finance-panel-heading {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.finance-current-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.finance-current-card {
    display: grid;
    min-width: 0;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-container-low);
}

.finance-current-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.finance-current-card-header strong {
    color: var(--on-surface);
    font-size: 14px;
}

.finance-current-card-header span,
.finance-current-values span,
.finance-price-trend {
    color: var(--text-secondary);
    font-size: 10px;
}

.finance-current-card-header span {
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-current-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.finance-current-values > div {
    display: grid;
    gap: 3px;
}

.finance-current-values strong {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.finance-price-trend.pos {
    color: var(--pos);
}

.finance-price-trend.neg {
    color: var(--neg);
}

.finance-table-wrap {
    max-height: 450px;
    overflow: auto;
    border: 0;
    border-radius: 0;
}

.finance-data-table {
    min-width: 760px;
}

.finance-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.finance-status {
    display: inline-flex;
    min-width: 72px;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--surface-container-high);
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 800;
}

.finance-status[data-status="active"] {
    background: var(--success-container);
    color: var(--on-success-container);
}

.finance-status[data-status="future"] {
    background: var(--warning-container);
    color: var(--on-warning-container);
}

.finance-status[data-status="past"] {
    opacity: .72;
}

.installment-overview {
    display: grid;
    grid-template-columns: minmax(190px, .55fr) minmax(280px, 1.45fr);
    align-items: center;
    gap: 28px;
}

.installment-chart {
    height: 220px;
}

.installment-list {
    display: grid;
    gap: 15px;
}

.installment-item {
    display: grid;
    gap: 7px;
}

.installment-item > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
}

.installment-item strong {
    font-variant-numeric: tabular-nums;
}

.installment-item progress {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background: var(--surface-container-high);
    accent-color: var(--primary);
}

.installment-item progress::-webkit-progress-bar {
    background: var(--surface-container-high);
}

.installment-item progress::-webkit-progress-value {
    border-radius: 4px;
    background: var(--primary);
}

.installment-item progress::-moz-progress-bar {
    border-radius: 4px;
    background: var(--primary);
}

.finance-empty {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
}

@media (max-width: 1120px) {
    .finance-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-kpi:nth-child(2) {
        border-right: 0;
    }

    .finance-kpi:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 760px) {
    .finance-page-header,
    .finance-header-actions,
    .finance-panel-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .finance-history-toggle,
    .finance-header-actions .nav-button {
        width: 100%;
    }

    .finance-kpis,
    .finance-current-grid,
    .installment-overview {
        grid-template-columns: 1fr;
    }

    .finance-kpi,
    .finance-kpi:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .finance-kpi:last-child {
        border-bottom: 0;
    }

    .installment-chart {
        height: 190px;
    }
}
