.dashboard-shell {
    display: grid;
    gap: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.dashboard-topbar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-title h2 {
    margin: 0;
    font-size: 1.2rem;
}

.dashboard-title p {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.dash-control-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
}

.dash-control-group button {
    border: none;
    background: transparent;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
}

.dash-control-group button.active {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.dash-kpi-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dash-kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.95rem;
    min-height: 96px;
}

.dash-kpi-card.is-warning {
    border-color: #f7c48f;
    background: #fffaf4;
}

.dash-kpi-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dash-kpi-value {
    margin-top: 0.35rem;
    font-size: 1.5rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-kpi-meta {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dash-info-grid,
.dash-charts-grid {
    display: grid;
    gap: 1rem;
}

.dash-info-grid {
    grid-template-columns: 1fr 1fr;
}

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

.dash-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.9rem;
}

.dash-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    gap: 0.5rem;
}

.dash-panel-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dash-panel-head span {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.chart-panel {
    min-height: 320px;
}

.chart-wrapper {
    position: relative;
    height: 255px;
}

.dash-table-wrap {
    overflow: auto;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
}

.dash-table th,
.dash-table td {
    text-align: left;
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.dash-table th {
    color: var(--text-secondary);
    font-weight: 600;
}

.dash-table .empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 1rem;
}

.txt-danger {
    color: #dc2626 !important;
    font-weight: 600;
}

.txt-warning {
    color: #b45309 !important;
    font-weight: 600;
}

.txt-success {
    color: #15803d !important;
    font-weight: 600;
}

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

.action-btn {
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 10px;
    padding: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.action-btn:hover {
    border-color: #fca5a5;
    color: var(--primary-color);
    background: #fff7f7;
}

@media (max-width: 1280px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dash-charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dash-kpi-grid,
    .dash-info-grid,
    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .dash-kpi-grid,
    .dash-info-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .chart-wrapper {
        height: 220px;
    }

    .dash-control-group {
        flex-wrap: wrap;
    }
}