/* ==========================================================
   dashboard.css — DivineSpine Dashboard
========================================================== */

/* ── Greeting header ─────────────────────────────────────── */
.dash-header {
    margin-bottom:8px;
}

.dash-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e2d40;
    margin: 0 0 6px;
}

.dash-sub {
    font-size: 13.5px;
    color: #718096;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dash-sub i {
    color: #a0aec0;
    font-size: 12px;
}

.dash-role-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    background: #1e2d40;
    color: #fff;
    padding: 2px 10px;
    border-radius: 99px;
    letter-spacing: 0.3px;
}

/* ── Stat cards ──────────────────────────────────────────── */
.dash-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.dash-stat-card {
    background: #fff;
    border: 0.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: box-shadow 200ms, transform 200ms;
}

.dash-stat-card:hover {
    box-shadow: 0 4px 16px rgba(30, 45, 64, 0.08);
    transform: translateY(-1px);
}

.dash-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.dash-stat-body {
    flex: 1;
    min-width: 0;
}

.dash-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #1e2d40;
    line-height: 1;
    margin-bottom: 4px;
}

.dash-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.dash-stat-sub {
    font-size: 11.5px;
    color: #a0aec0;
}

/* ── Sections ────────────────────────────────────────────── */
.dash-section {
    margin-bottom: 28px;
}

.dash-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e2d40;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

/* ── Quick actions ───────────────────────────────────────── */
.dash-quick-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dash-quick-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 0.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e2d40;
    text-decoration: none;
    transition: background 180ms, border-color 180ms, color 180ms, transform 180ms;
}

.dash-quick-card i {
    font-size: 15px;
    color: #5AB432;
}

.dash-quick-card:hover {
    background: #1e2d40;
    border-color: #1e2d40;
    color: #fff;
    transform: translateY(-1px);
}

.dash-quick-card:hover i {
    color: #5AB432;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-kpi-card {
    display: flex;
    flex-direction: column;
    min-height: 170px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.dashboard-kpi-card:hover {
    transform: translateY(-2px);
    border-color: #d1d5db;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    text-decoration: none;
    color: inherit;
}

.kpi-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kpi-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f3f4f6;
    color: #374151;
    font-size: 17px;
}

.kpi-value {
    margin-top: 18px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: #111827;
}

.kpi-label {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.kpi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    font-size: 12px;
    color: #9ca3af;
}

.kpi-footer i {
    font-size: 11px;
}

/* Card requiring attention */
.kpi-card-alert {
    border-color: #f1d5d5;
}

.kpi-card-alert .kpi-icon {
    background: #fff4f4;
    color: #c24141;
}

.kpi-card-alert .kpi-value {
    color: #b42318;
}

.kpi-status {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    background: #fff4f4;
    color: #b42318;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px;
    }

    .dash-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .dash-stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .dash-stat-card {
        flex-direction: column;
        gap: 10px;
        padding: 14px;
    }

    .dash-stat-value {
        font-size: 22px;
    }

    .dash-title {
        font-size: 18px;
    }
}