.overview-page {
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: var(--dxbl-body-bg, #f4f5f7);
    padding: 0.5rem;
    overflow: hidden;
}

.overview-page > .overview-splitter {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.overview-unauthenticated {
    max-width: 640px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--dxbl-body-bg, #fff);
    border: 1px solid var(--dxbl-border-color, #dde1e6);
    border-radius: 8px;
}

.overview-splitter {
    flex: 1;
    min-height: 0;
    width: 100%;
    border: 1px solid var(--dxbl-border-color, #dde1e6);
    border-radius: 8px;
    overflow: hidden;
}

.overview-splitter .dxbl-splitter-pane-content {
    height: 100%;
}

/* Desktop: panelControl1.Dock = Top, Inhalt darunter Fill */
.overview-main-pane .dxbl-splitter-pane-content,
.overview-main-pane .dxbl-splitter-pane-content > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: 100%;
}

.overview-sidebar-pane,
.overview-main-pane {
    background: var(--dxbl-body-bg, #fff);
    overflow: hidden;
}

.overview-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.75rem;
    gap: 0.5rem;
}

.overview-sidebar-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.overview-team-list {
    flex: 1;
    min-height: 0;
}

.overview-back-button {
    align-self: stretch;
    flex-shrink: 0;
}

.overview-top-panel-back {
    align-self: auto;
    margin-right: auto;
}

.overview-main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    height: 100%;
    width: 100%;
    padding: 0;
    gap: 0;
    overflow: hidden;
    box-sizing: border-box;
}

/* FrmTimeStorage.topPanel – Benutzer + Monat global */
.overview-top-panel {
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    padding: 0.45rem 1rem;
    border-bottom: 1px solid var(--dxbl-border-color, #cfd4da);
    background: var(--dxbl-body-bg, #fff);
    flex-shrink: 0;
}

.overview-top-panel-label {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.1rem 0.5rem;
    background: #a9a9a9;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.overview-top-panel-user {
    display: inline-flex;
    align-items: center;
    min-width: 11rem;
    min-height: 1.25rem;
    padding: 0.1rem 0.5rem;
    background: #f5f5f5;
    color: #1a1a1a;
    font-size: 0.9375rem;
    font-weight: 500;
}

.overview-scroll-body {
    grid-row: 2;
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    padding: 0 1rem 0.75rem;
}

.overview-busy-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    font-weight: 600;
    pointer-events: all;
}

.overview-status {
    grid-row: 3;
}

.overview-month-picker {
    min-width: 11rem;
    max-width: 14rem;
    flex: 0 1 auto;
}

/* CtrlUserTimeLine.panelControl1 – Buttons links, Summary rechts */
.overview-tab-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    gap: 0.5rem 0.75rem;
    margin-top: 0.35rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--dxbl-border-color, #cfd4da);
    background: var(--dxbl-body-bg, #fff);
    flex-shrink: 0;
    box-sizing: border-box;
}

.overview-tab-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 0 0 11.75rem;
    min-width: 9rem;
}

.overview-tab-action-btn {
    width: 100%;
    justify-content: flex-start;
}

.overview-tab-summary {
    flex: 0 0 auto;
    width: max-content;
    overflow: visible;
}

.overview-tab-summary .user-time-summary {
    container-type: normal;
    display: block;
    margin: 0;
    width: max-content;
    box-sizing: border-box;
}

.overview-tab-summary .user-time-summary-columns {
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1rem;
    width: max-content;
    box-sizing: border-box;
}

.overview-tab-summary .user-time-summary-block {
    flex-shrink: 0;
    width: auto;
    grid-template-columns: max-content max-content;
}

.overview-tab-summary .user-time-summary-value {
    width: auto;
}

/* CtrlUserTimeSummary – zwei Blöcke nebeneinander wie Desktop */
.user-time-summary {
    --summary-value-col-width: 16rem;
    container-type: inline-size;
    container-name: user-time-summary;
    height: fit-content;
    background: #e0e0e0;
    border: 1px solid #b8b8b8;
    border-radius: 0;
    padding: 0 0.5rem 0.15rem;
    box-sizing: border-box;
}

/* Schmal: Blöcke untereinander, Wertspalte nutzt Restbreite */
.user-time-summary-columns {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: auto;
}

.user-time-summary-block {
    flex: 0 0 auto;
    align-self: stretch;
    display: grid;
    grid-template-columns: max-content var(--summary-value-col-width);
    column-gap: 0.5rem;
    row-gap: 0.05rem;
    align-content: start;
    align-items: start;
    width: auto;
}

@container user-time-summary (min-width: 43rem) {
    .user-time-summary-columns {
        flex-direction: row;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-time-summary-block {
        width: auto;
        grid-template-columns: max-content var(--summary-value-col-width);
    }
}

.user-time-summary-label {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    text-align: right;
    color: #1a1a1a;
    white-space: nowrap;
    padding-right: 0.15rem;
    font-size: 0.8125rem;
    line-height: 1.1;
    min-height: 1.2rem;
}

.user-time-summary-value {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    text-align: right;
    color: #000;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    background: #fff;
    border: 1px solid #a8a8a8;
    padding: 0.05rem 0.35rem;
    min-height: 1.2rem;
    font-size: 0.8125rem;
    line-height: 1.1;
    box-shadow: inset 0 0 0 1px #f5f5f5;
    box-sizing: border-box;
    width: 100%;
}

.user-time-summary-value--balance {
    font-weight: 600;
}

@container user-time-summary (max-width: 22rem) {
    .user-time-summary-block {
        grid-template-columns: 1fr;
        row-gap: 0.15rem;
    }

    .user-time-summary-label {
        justify-content: flex-start;
        text-align: left;
        padding-right: 0;
    }

    .user-time-summary-value {
        justify-content: flex-start;
        text-align: left;
    }
}

.overview-tabs {
    flex-shrink: 0;
    margin-top: 0.35rem;
}

.overview-tab-content {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    margin-top: 0.35rem;
}

.overview-tab-content > .overview-grid,
.overview-tab-content > .zeitbuchungen-list,
.overview-tab-content > .zeitbuchungen-agg-scroll,
.overview-tab-content > .user-work-time-scheduler {
    flex: 1;
    min-height: 320px;
}

.user-work-time-scheduler {
    height: 100%;
    min-height: 480px;
}

.overview-grid {
    height: 100%;
}

/* Zeitbuchungen – kompakte ListView-Optik (Desktop ShowComeAndGo) */
.zeitbuchungen-list {
    --zeitbuchung-row-accent: #c8cdd3;
}

.zeitbuchungen-list .dxbl-grid-table {
    font-size: 0.8125rem;
}

.zeitbuchungen-list .dxbl-grid-header-row {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.zeitbuchungen-list .dxbl-grid-group-row {
    background: #eef1f4;
    border-top: 1px solid #d5dbe1;
    font-weight: 600;
}

.zeitbuchung-day-group {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    padding: 0.1rem 0;
}

.zeitbuchung-day-group-date {
    color: #1a1a1a;
}

.zeitbuchung-day-group-summary {
    color: #5c6670;
    font-size: 0.75rem;
    font-weight: 500;
}

.zeitbuchungen-list .zeitbuchung-row-user > td:first-child {
    box-shadow: inset 3px 0 0 #2e7d32;
}

.zeitbuchungen-list .zeitbuchung-row-generated > td:first-child {
    box-shadow: inset 3px 0 0 #78909c;
}

.zeitbuchungen-list .zeitbuchung-row-all > td:first-child {
    box-shadow: inset 3px 0 0 #37474f;
}

.zeitbuchungen-list .zeitbuchung-row-soll > td:first-child {
    box-shadow: inset 3px 0 0 #607d8b;
}

.zeitbuchungen-list .zeitbuchung-row-holiday > td:first-child {
    box-shadow: inset 3px 0 0 #f9a825;
}

.zeitbuchung-typ-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.zeitbuchung-typ-badge {
    display: inline-block;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    border: 1px solid transparent;
}

.zeitbuchung-typ-user {
    color: #1b5e20;
    background: #e8f5e9;
    border-color: #a5d6a7;
}

.zeitbuchung-typ-generated {
    color: #455a64;
    background: #eceff1;
    border-color: #cfd8dc;
}

.zeitbuchung-typ-all {
    color: #eceff1;
    background: #37474f;
    border-color: #263238;
}

.zeitbuchung-typ-soll {
    color: #37474f;
    background: #cfd8dc;
    border-color: #b0bec5;
}

.zeitbuchung-typ-holiday {
    color: #e65100;
    background: #fff8e1;
    border-color: #ffe082;
}

.zeitbuchung-typ-default {
    color: #455a64;
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.zeitbuchung-changed-mark {
    color: #c62828;
    font-weight: 700;
    line-height: 1;
}

.zeitbuchungen-agg-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--dxbl-border-color, #dde1e6);
    border-radius: 6px;
    background: var(--dxbl-body-bg, #fff);
}

.zeitbuchungen-agg-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.zeitbuchungen-agg-table th,
.zeitbuchungen-agg-table td {
    border: 1px solid var(--dxbl-border-color, #dde1e6);
    padding: 0.35rem 0.5rem;
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
}

.zeitbuchungen-agg-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--dxbl-grid-header-bg, #f4f5f7);
    font-weight: 600;
}

.zeitbuchungen-agg-col-day {
    background: #eceff1;
    font-weight: 600;
    text-align: right;
}

.zeitbuchungen-agg-col-booking {
    background: #e8f5e9;
}

.zeitbuchungen-agg-booking-2 {
    background: #c8e6c9;
}

.zeitbuchungen-agg-booking-3 {
    background: #a5d6a7;
}

.zeitbuchungen-agg-col-duration {
    background: #fafafa;
}

.zeitbuchungen-agg-negative {
    color: #c62828;
}

.zeitbuchungen-agg-col-saldo-kum {
    color: #0277bd;
    font-weight: 600;
}

.overview-status {
    flex-shrink: 0;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

.overview-status.error {
    color: #b42318;
    background: #fef3f2;
}

.overview-status.success {
    color: #027a48;
    background: #ecfdf3;
}

@media (max-width: 900px) {
    .overview-page {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .overview-splitter {
        min-height: calc(100vh - 1rem);
    }

    .overview-tab-header {
        flex-direction: column;
        flex-wrap: wrap;
        align-self: flex-start;
        width: 100%;
        max-width: 100%;
    }

    .overview-tab-actions {
        flex: 0 0 auto;
        width: auto;
    }

    .overview-tab-summary {
        width: auto;
    }

    .overview-tab-summary .user-time-summary {
        min-width: 0;
        width: 100%;
    }

    .overview-tab-summary .user-time-summary-columns {
        flex-direction: column;
        align-items: stretch;
    }

    .overview-tab-summary .user-time-summary-block {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .overview-tab-summary .user-time-summary-label {
        justify-content: flex-start;
        text-align: left;
        padding-right: 0;
    }

    .overview-tab-summary .user-time-summary-value {
        justify-content: flex-start;
        text-align: left;
    }
}

.balance-edit-form .balance-edit-user,
.balance-edit-form .balance-edit-month,
.balance-edit-form .balance-edit-status {
    font-weight: 500;
    padding-top: 0.35rem;
}
