/* ===================== PAGE CONTENT ===================== */
.page-content {
    padding: 24px 28px;
    flex: 1;
    min-width: 0;
}

/* ===================== CARDS ===================== */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary-500);
    font-size: 15px;
}

.card-body {
    padding: 20px;
}

/* ===================== NEW DASHBOARD LAYOUT ===================== */

/* Stat cards row */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dash-stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}

.dash-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dash-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent, #6366f1);
    border-radius: 4px 0 0 4px;
}

.dsc-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.dsc-body {
    flex: 1;
    min-width: 0;
}

.dsc-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.dsc-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dsc-value small {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-400);
}

.dsc-trend {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dsc-trend.trend-up {
    color: #16a34a;
}

.dsc-trend.trend-down {
    color: #ef4444;
}

.dsc-sub {
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 500;
    margin-top: 4px;
}

/* Financial summary bar */
.dash-finance-bar {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.dfb-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dfb-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.dfb-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
}

.dfb-label {
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 500;
}

.dfb-divider {
    width: 1px;
    height: 36px;
    background: var(--gray-200);
}

/* Chart row */
.dash-chart-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.dash-chart-main,
.dash-chart-side {
    overflow: hidden;
}

/* Status row */
.dash-status-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Status item with progress bar */
.dash-status-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-50);
}

.dash-status-item:last-child {
    border-bottom: none;
}

.dsi-left {
    min-width: 100px;
}

.dsi-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
}

.dsi-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.dsi-bar-fill.badge-warning {
    background: #f59e0b;
}

.dsi-bar-fill.badge-info {
    background: #3b82f6;
}

.dsi-bar-fill.badge-success {
    background: #10b981;
}

.dsi-bar-fill.badge-error {
    background: #ef4444;
}

.dsi-bar-fill.badge-muted {
    background: #94a3b8;
}

.dsi-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 60px;
}

.dsi-count {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}

.dsi-pct {
    font-size: 10px;
    color: var(--gray-400);
    font-weight: 500;
}

/* ===================== STAT CARDS (LEGACY) ===================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-header {
    margin-bottom: 12px;
}

.stat-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stat-icon-wrap i {
    font-size: 16px;
}

.stat-icon-wrap.blue {
    background: var(--blue-50);
    color: var(--blue-600);
}

.stat-icon-wrap.green {
    background: var(--emerald-50);
    color: var(--emerald-600);
}

.stat-icon-wrap.violet {
    background: var(--violet-50);
    color: var(--violet-500);
}

.stat-icon-wrap.orange {
    background: var(--amber-50);
    color: var(--amber-600);
}

.stat-icon-wrap.rose {
    background: var(--rose-50);
    color: var(--rose-600);
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
    margin-top: 4px;
}

