﻿.dashboard-shell {
    padding: 24px;
    background: #f4f7fb;
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

    .dashboard-header h1 {
        font-size: 30px;
        font-weight: 800;
        margin-bottom: 6px;
        color: #0f172a;
    }

    .dashboard-header p {
        color: #64748b;
        margin: 0;
        max-width: 720px;
    }

.dashboard-filter {
    display: flex;
    align-items: end;
    gap: 12px;
    background: #ffffff;
    padding: 14px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    flex-wrap: wrap;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .filter-field label {
        font-size: 12px;
        font-weight: 700;
        color: #64748b;
    }

.dashboard-filter input,
.dashboard-filter select,
.dashboard-filter button {
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 10px 12px;
    min-height: 43px;
    font-size: 14px;
}

.dashboard-filter input,
.dashboard-filter select {
    background: #ffffff;
    color: #0f172a;
}

.dashboard-filter select {
    min-width: 240px;
}

.dashboard-filter button {
    background: #0f766e;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    padding-left: 20px;
    padding-right: 20px;
    transition: background 0.2s ease;
}

    .dashboard-filter button:hover {
        background: #115e59;
    }

.dashboard-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 6px solid #dc2626;
    border-radius: 16px;
    color: #991b1b;
    font-weight: 700;
    margin-bottom: 20px;
    padding: 16px 18px;
}

.dashboard-error-details {
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.valuation-grid {
    margin-bottom: 24px;
}

.kpi-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.section-heading {
    margin: 8px 0 14px;
}

    .section-heading h2 {
        color: #0f172a;
        font-size: 22px;
        font-weight: 800;
        margin: 0 0 4px;
    }

    .section-heading p {
        color: #64748b;
        margin: 0;
    }

.kpi-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border-left: 5px solid #cbd5e1;
    transition: transform 0.2s ease;
}

    .kpi-card:hover {
        transform: translateY(-2px);
    }

    .kpi-card.primary {
        border-left-color: #2563eb;
    }

    .kpi-card.success {
        border-left-color: #16a34a;
    }

    .kpi-card.warning {
        border-left-color: #f59e0b;
    }

    .kpi-card.danger {
        border-left-color: #dc2626;
    }

    .kpi-card span {
        display: block;
        color: #64748b;
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .kpi-card strong {
        font-size: 24px;
        color: #0f172a;
        line-height: 1.2;
        word-break: break-word;
    }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

    .dashboard-grid.single {
        grid-template-columns: 1fr;
    }

.panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    overflow-x: auto;
}

    .panel h3 {
        font-size: 18px;
        font-weight: 800;
        margin-bottom: 16px;
        color: #0f172a;
    }

.panel-subtitle {
    color: #64748b;
    font-size: 13px;
    margin-top: -8px;
    margin-bottom: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table th {
        text-align: left;
        color: #64748b;
        font-size: 13px;
        padding: 10px;
        border-bottom: 1px solid #e2e8f0;
        white-space: nowrap;
    }

    .data-table td {
        padding: 12px 10px;
        border-bottom: 1px solid #edf2f7;
        font-size: 14px;
        color: #1e293b;
        vertical-align: top;
    }

    .data-table tbody tr:hover {
        background: #f8fafc;
    }

.total-row {
    font-weight: 800;
    background: #f8fafc;
}

.alerts-panel {
    border-left: 6px solid #f59e0b;
}

.alert-item {
    background: #fff7ed;
    color: #9a3412;
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 10px;
    font-weight: 700;
}

.success-item {
    background: #ecfdf5;
    color: #047857;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
}

.empty-state {
    background: #f8fafc;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    padding: 18px;
    border-radius: 14px;
    font-weight: 600;
}

canvas {
    max-width: 100%;
    width: 100% !important;
}

@media (max-width: 1200px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kpi-grid.cols-2,
    .kpi-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-shell {
        padding: 14px;
    }

    .dashboard-header h1 {
        font-size: 24px;
    }

    .dashboard-filter {
        flex-direction: column;
        align-items: stretch;
    }

        .dashboard-filter select {
            min-width: 100%;
        }

    .kpi-grid,
    .kpi-grid.cols-2,
    .kpi-grid.cols-3 {
        grid-template-columns: 1fr;
    }

    .kpi-card strong {
        font-size: 21px;
    }

    .panel {
        padding: 16px;
        border-radius: 18px;
    }

    .data-table {
        min-width: 600px;
    }
}
