/* =========================================
   Dashboard Specific Styles
   ========================================= */

.dashboard-home {
    padding-bottom: 40px;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

@media screen and (max-width: 1400px) {
    .stats-grid { gap: 15px; margin-bottom: 20px; }
    .stat-card { padding: 16px !important; }
    .stat-icon { width: 48px !important; height: 48px !important; font-size: 20px !important; margin-right: 15px !important; }
    .stat-number { font-size: 20px !important; }
}

@media screen and (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    /* Slight radius for modern look */
    padding: 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    /* Enhanced shadow */
    border-bottom: 3px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card.blue {
    border-bottom-color: var(--stat-blue);
    color: var(--stat-blue);
}

.stat-card.green {
    border-bottom-color: var(--stat-green);
    color: var(--stat-green);
}

.stat-card.orange {
    border-bottom-color: var(--stat-orange);
    color: var(--stat-orange);
}

.stat-card.red {
    border-bottom-color: var(--stat-red);
    color: var(--stat-red);
}

.stat-card.purple {
    border-bottom-color: var(--stat-purple);
    color: var(--stat-purple);
}

.stat-card.teal {
    border-bottom-color: var(--stat-teal);
    color: var(--stat-teal);
}

.stat-card.indigo {
    border-bottom-color: var(--stat-indigo);
    color: var(--stat-indigo);
}

.stat-card.pink {
    border-bottom-color: var(--stat-pink);
    color: var(--stat-pink);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 20px;
    background: rgba(0, 0, 0, 0.04);
    transition: transform 0.3s;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-card.blue .stat-icon {
    color: var(--stat-blue);
    background: color-mix(in srgb, var(--stat-blue) 10%, transparent);
}

.stat-card.green .stat-icon {
    color: var(--stat-green);
    background: color-mix(in srgb, var(--stat-green) 10%, transparent);
}

.stat-card.orange .stat-icon {
    color: var(--stat-orange);
    background: color-mix(in srgb, var(--stat-orange) 10%, transparent);
}

.stat-card.red .stat-icon {
    color: var(--stat-red);
    background: color-mix(in srgb, var(--stat-red) 10%, transparent);
}

.stat-card.purple .stat-icon {
    color: var(--stat-purple);
    background: color-mix(in srgb, var(--stat-purple) 10%, transparent);
}

.stat-card.teal .stat-icon {
    color: var(--stat-teal);
    background: color-mix(in srgb, var(--stat-teal) 10%, transparent);
}

.stat-card.indigo .stat-icon {
    color: var(--stat-indigo);
    background: color-mix(in srgb, var(--stat-indigo) 10%, transparent);
}

.stat-card.pink .stat-icon {
    color: var(--stat-pink);
    background: color-mix(in srgb, var(--stat-pink) 10%, transparent);
}

.stat-info h3 {
    margin: 0;
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-number {
    margin: 3px 0 0;
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

@media screen and (max-width: 1400px) {
    .stat-number { font-size: 22px; }
    .stat-info h3 { font-size: 11.5px; }
    .stat-desc { font-size: 11px; }
}

.stat-desc {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    display: inline-block;
}

/* --- Recent Activity / Tables --- */
.dashboard-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #444;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media screen and (max-width: 1400px) {
    .dashboard-section-title { font-size: 14px; margin-bottom: 10px; }
}

.recent-activity-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.recent-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    border-bottom: 2px solid #eee;
}

.recent-table td {
    vertical-align: middle;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.pending {
    background: #fff3e0;
    color: #ef6c00;
}

.status-badge.rejected {
    background: #ffebee;
    color: #c62828;
}

/* --- Quick Actions --- */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #555;
    transition: all 0.2s;
    font-weight: 500;
}

.quick-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f0fdfc;
}

.quick-action-btn i {
    margin-right: 12px;
    font-size: 18px;
}

/* --- Custom Modals --- */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal {
    background: #fff;
    width: 400px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-modal-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.custom-modal-body {
    padding: 20px;
}

.custom-modal-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

.custom-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}