/* ========================================
   Dashboard Page
   Skyblue / White Masterdata Stil
   ======================================== */

.dashboard-page {
    position: relative;
    padding-bottom: 48px;
}

/* ---------- Header ---------- */

.dashboard-header {
    align-items: flex-start;
    gap: 16px;
}

.dashboard-title {
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--rr-text-strong, #0f172a);
    margin-bottom: 2px;
}

.dashboard-subtitle {
    max-width: 720px;
    color: var(--rr-text-secondary, #64748b);
    line-height: 1.4;
}

.dashboard-header-chips {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.dashboard-top-chip,
.dashboard-chip {
    width: fit-content;
    font-weight: 700;
    border-radius: var(--rr-radius-pill, 999px);
}

.violet-chip {
    border-color: rgba(0, 0, 0, 0.45) !important;
    color: #555555 !important;
    background: rgba(0, 0, 0, 0.07) !important;
}

/* ---------- Loading ---------- */

.dashboard-loading-state {
    min-height: 220px;
    justify-content: center;
}

/* ---------- Tabs ---------- */

.dashboard-tabs {
    border-radius: var(--rr-radius-lg, 18px);
    margin-bottom: 12px;
}

    .dashboard-tabs .mud-tabs-toolbar-wrapper {
        border-radius: var(--rr-radius-lg, 18px);
        border: 1px solid rgba(0, 0, 0, 0.18);
        background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.86) );
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
        padding: 6px;
        overflow: hidden;
    }

    .dashboard-tabs .mud-tabs-toolbar {
        background: transparent;
        border-radius: var(--rr-radius-lg, 18px);
    }

    .dashboard-tabs .mud-tab {
        min-height: 42px;
        border-radius: 12px;
        font-weight: 700;
        letter-spacing: 0.2px;
        text-transform: none;
        color: var(--rr-text-secondary, #64748b);
        transition: background 0.2s ease, color 0.2s ease;
    }

        .dashboard-tabs .mud-tab.mud-tab-active {
            font-weight: 900;
            color: #374151;
            background: rgba(255, 255, 255, 0.92);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
        }

        .dashboard-tabs .mud-tab:hover {
            color: #374151;
            background: rgba(245, 245, 245, 0.55);
        }

    .dashboard-tabs .mud-tabs-slider {
        display: none;
    }

/* ---------- Stat Cards ---------- */

.dashboard-stat-grid {
    margin-top: 4px !important;
    margin-bottom: 12px !important;
}

.dashboard-banking-grid {
    margin-bottom: 14px !important;
}

.dashboard-stat-card {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: var(--rr-radius-lg, 18px);
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.86) );
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    overflow: hidden;
}

    .dashboard-stat-card:hover {
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
        transform: translateY(-3px);
        border-color: rgba(0, 0, 0, 0.34);
        background: linear-gradient( 135deg, rgba(255, 255, 255, 1), rgba(245, 245, 245, 0.90) );
    }

.dashboard-stat-card-strong {
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 245, 0.94) );
}

.dashboard-stat-small {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
}

.dashboard-stat-value {
    font-weight: 900;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.15;
}

.dashboard-stat-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .dashboard-stat-icon.success {
        background: rgba(0, 0, 0, 0.12);
        color: #555555;
    }

    .dashboard-stat-icon.warning {
        background: rgba(0, 0, 0, 0.14);
        color: #555555;
    }

    .dashboard-stat-icon.danger {
        background: rgba(0, 0, 0, 0.12);
        color: #1A1A1A;
    }

    .dashboard-stat-icon.violet {
        background: rgba(0, 0, 0, 0.12);
        color: #555555;
    }

/* ---------- Cards Grid ---------- */

.dashboard-grid {
    margin-top: 8px !important;
}

.dashboard-card {
    position: relative;
    height: 100%;
    border-radius: var(--rr-radius-lg, 18px);
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.84) );
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    overflow: hidden;
}

    .dashboard-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 16px;
        bottom: 16px;
        width: 5px;
        border-radius: 999px;
        background: linear-gradient(180deg, #111111, #111111);
    }

    .dashboard-card:hover {
        box-shadow: 0 22px 52px rgba(0, 0, 0, 0.20);
        transform: translateY(-4px) scale(1.01);
        border-color: rgba(0, 0, 0, 0.34);
        background: linear-gradient( 135deg, rgba(255, 255, 255, 1), rgba(245, 245, 245, 0.92) );
    }

.dashboard-card-success::before {
    background: linear-gradient(180deg, #555555, #111111);
}

.dashboard-card-warning {
    border-color: rgba(0, 0, 0, 0.30);
}

    .dashboard-card-warning::before {
        background: linear-gradient(180deg, #555555, #1A1A1A);
    }

.dashboard-card-banking::before {
    background: linear-gradient(180deg, #111111, #111111);
}

.dashboard-card-content {
    padding: 18px 18px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-card-title {
    font-weight: 800;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.22;
}

.dashboard-card-subtitle {
    color: var(--rr-text-secondary, #64748b);
    line-height: 1.35;
}

.dashboard-card-icon {
    font-size: 30px;
    flex-shrink: 0;
    opacity: 0.78;
}

    .dashboard-card-icon.success {
        color: #555555;
    }

    .dashboard-card-icon.warning {
        color: #555555;
    }

    .dashboard-card-icon.banking {
        color: #374151;
    }

.clickable {
    cursor: pointer;
    will-change: transform, box-shadow;
}

/* ---------- Detail Layout in Cards ---------- */

.dashboard-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-detail-line {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.14);
    min-width: 0;
}

    .dashboard-detail-line.full {
        grid-column: 1 / -1;
    }

.dashboard-detail-value {
    color: var(--rr-text-strong, #0f172a);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.dashboard-payment-highlight {
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient( 135deg, rgba(0, 0, 0, 0.12), rgba(255, 255, 255, 0.86) );
    border: 1px solid rgba(0, 0, 0, 0.22);
}

.dashboard-amount {
    font-weight: 900;
    color: var(--rr-text-strong, #0f172a);
}

.dashboard-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.86rem;
}

/* ---------- MudBlazor Polish ---------- */

.dashboard-page .mud-button-root,
.dashboard-page .mud-icon-button {
    border-radius: 12px;
    text-transform: none;
    font-weight: 700;
    box-shadow: none;
}

/* Chips behalten Razor-Farben */
.dashboard-page .mud-chip,
.dashboard-page .mud-chip-root {
    border-radius: var(--rr-radius-pill, 999px);
    font-weight: 700;
}

.dashboard-page .mud-chip-content {
    font-weight: 700;
}

.dashboard-page .mud-alert {
    border-radius: var(--rr-radius-md, 14px);
    border-color: rgba(0, 0, 0, 0.18);
}

.dashboard-page .mud-progress-linear {
    border-radius: var(--rr-radius-pill, 999px);
    overflow: hidden;
}

/* ---------- Responsive ---------- */

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

    .dashboard-header-chips {
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .dashboard-page {
        padding-bottom: 32px;
    }

    .dashboard-stat-card {
        padding: 14px !important;
    }

    .dashboard-card-content {
        padding: 16px 16px 16px 22px;
    }

    .dashboard-detail-list {
        grid-template-columns: 1fr;
    }

    .dashboard-detail-line.full {
        grid-column: auto;
    }

    .dashboard-payment-highlight {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .dashboard-tabs .mud-tab {
        font-size: 0.82rem;
        min-height: 40px;
    }
}

/* ===== Weekly overview widgets (monochrome) ===== */
.dashboard-week-heading {
    letter-spacing: 0.12em;
    margin-top: var(--rr-space-xs);
}

.dashboard-week-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--rr-space-md);
    min-height: 118px;
    border: 1px solid var(--rr-border);
    border-radius: var(--rr-radius-lg);
    background: var(--rr-surface);
    transition: box-shadow var(--rr-transition), transform var(--rr-transition);
}

.dashboard-week-card:hover {
    box-shadow: var(--rr-shadow-hover);
    transform: translateY(-2px);
}

.dashboard-week-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-week-value {
    font-weight: 700;
    line-height: 1.1;
}
