/* ==========================================
   MODERN DASHBOARD STYLES (HUB)
   Premium, Intelligent, Live Interface
   ========================================== */

:root {
    --dash-primary: #6366f1;
    --dash-primary-rgb: 99, 102, 241;
    --dash-success: #10b981;
    --dash-warning: #f59e0b;
    --dash-error: #ef4444;
    --dash-info: #3b82f6;
    --dash-bg: #f8fafc;
    --dash-card: rgba(255, 255, 255, 0.9);
    --dash-border: rgba(226, 232, 240, 0.8);
    --dash-text-p: #0f172a;
    --dash-text-s: #64748b;
    --dash-radius: 20px;
    --dash-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
}

.modern-dash-container {
    padding: 24px;
    background: var(--dash-bg);
    min-height: calc(100vh - 64px);
    font-family: 'Outfit', sans-serif;
}

/* 3-Column Layout Hub */
.dash-hub-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1400px) {
    .dash-hub-grid {
        grid-template-columns: 1fr 300px;
        gap: 20px;
    }
}

@media (max-width: 1100px) {
    .dash-hub-grid {
        grid-template-columns: 1fr;
    }
}

/* Glassmorphism Card */
.glass-card {
    background: var(--dash-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    box-shadow: var(--dash-shadow);
    padding: 24px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

/* Stat Cards Premium */
.stat-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card-premium {
    position: relative;
    overflow: hidden;
    padding: 28px;
    z-index: 1;
}

.stat-card-premium::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--accent-rgb), transparent 70%);
    opacity: 0.1;
    z-index: -1;
    border-radius: 50%;
}

.stat-card-premium .icon-box {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    background: var(--accent-light);
    color: var(--accent);
}

.stat-card-premium .val {
    font-size: 32px;
    font-weight: 800;
    color: var(--dash-text-p);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card-premium .lbl {
    font-size: 14px;
    font-weight: 600;
    color: var(--dash-text-s);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card-premium .trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 15px;
}

.trend.up {
    color: var(--dash-success);
}

.trend.down {
    color: var(--dash-error);
}

/* Chart Container */
.chart-card {
    margin-bottom: 30px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.chart-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dash-text-p);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Smart Insight Bar */
.insight-bar {
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 16px;
    padding: 16px 24px;
    color: #fff;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.3);
}

.insight-bar i {
    font-size: 20px;
}

.insight-bar p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

/* Activity Sidebar Integrated */
.activity-sidebar-modern {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.activity-list-dash {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

/* Custom Scrollbar for side log */
.activity-list-dash::-webkit-scrollbar {
    width: 4px;
}

.activity-list-dash::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.dash-log-item {
    position: relative;
    padding-left: 28px;
    margin-bottom: 24px;
}

.dash-log-item::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 20px;
    bottom: -24px;
    width: 2px;
    background: #f1f5f9;
}

.dash-log-item:last-child::before {
    display: none;
}

.dash-log-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--log-accent, #cbd5e1);
    border: 2px solid #fff;
    box-shadow: 0 0 0 4px var(--log-accent-bg, #f8fafc);
    z-index: 1;
}

.dash-log-content {
    background: #fff;
    border: 1px solid #f1f5f9;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 13px;
    transition: all 0.2s;
}

.dash-log-content:hover {
    border-color: #e2e8f0;
    background: #fcfdfe;
}

.dash-log-meta {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

/* Quick Action Grid Modern */
.action-grid-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-btn-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #f1f5f9;
    color: var(--dash-text-p);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.action-btn-modern:hover {
    background: var(--dash-bg);
    border-color: var(--dash-primary);
    color: var(--dash-primary);
    transform: scale(1.02);
}

.action-btn-modern i {
    font-size: 20px;
    opacity: 0.8;
}

/* Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.5s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}