/* static/css/main.css */

/* --- 1. GLOBALS & COOL FACTOR --- */
:root { --sidebar-width: 260px; --primary-dark: #0f172a; --accent-blue: #3b82f6; }

body { 
    /* NEW: Animated subtle gradient background so the glassmorphism is visible! */
    background: linear-gradient(-45deg, #f8fafc, #e2e8f0, #dbeafe, #f1f5f9);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite, fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif; 
    color: #334155; 
}

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background-color: #f1f5f9; }

/* Custom Sleek Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; border: 2px solid transparent; background-clip: padding-box; }

/* Smooth Fade-in & Moving Background */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- 2. LAYOUT & GLASSMORPHISM SIDEBAR --- */
.sidebar { 
    width: var(--sidebar-width); height: 100vh; position: fixed; 
    /* Changed from 0.65 to 0.98. It stays rich and dark, but keeps a tiny hint of modern translucency */
    background: rgba(15, 23, 42, 0.98) !important; 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    color: #f8fafc; padding: 25px 20px; overflow-y: auto; z-index: 1000; 
    display: flex; flex-direction: column; 
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important; 
    box-shadow: 4px 0 24px rgba(0,0,0,0.05);
}
.sidebar h4 { color: #f8fafc; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 15px; font-weight: 700; letter-spacing: -0.5px; }
.feature-link { color: #94a3b8; text-decoration: none; display: block; padding: 10px 12px; border-radius: 8px; margin-bottom: 4px; transition: all 0.2s; font-size: 0.95rem; font-weight: 500; }
.feature-link:hover, .feature-link.active { background: rgba(255, 255, 255, 0.15); color: #ffffff; transform: translateX(5px); }

.main-content { margin-left: var(--sidebar-width); padding: 50px; }
.header-section { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
/* --- 3. FLOATING GLOW CARDS --- */
.chart-card { background: white; border-radius: 12px; padding: 24px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); border: 1px solid #e2e8f0; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.feature-card { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); text-decoration: none; color: #0f172a; display: block; border-left: 4px solid #6366f1; }
.quick-action-card { border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; color: white; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }

/* The Hover Animation */
.chart-card:hover, .feature-card:hover, .quick-action-card:hover { 
    transform: translateY(-5px) scale(1.01); 
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.15), 0 10px 10px -5px rgba(99, 102, 241, 0.05); 
    border-color: rgba(99, 102, 241, 0.3); 
    color: #4f46e5; 
}

.update-card { background: white; border-radius: 12px; padding: 20px; margin-bottom: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; border-left: 4px solid #ef4444; }
.table-card { background: white; border-radius: 12px; padding: 30px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); border: 1px solid #e2e8f0; }
.login-card { border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02); overflow: hidden; max-width: 950px; width: 100%; margin: auto; }

/* Gradients */
.bg-gradient-primary { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.bg-gradient-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }

/* --- 4. PREMIUM BUTTONS --- */
.btn-primary { background-color: #6366f1; border-color: #6366f1; color: white; box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.25); transition: all 0.2s ease-in-out; border-radius: 8px; }
.btn-primary:hover { background-color: #4f46e5; border-color: #4f46e5; transform: translateY(-2px); box-shadow: 0 8px 10px -1px rgba(99, 102, 241, 0.35); }
.btn-success { background-color: #10b981; border-color: #10b981; color: white; box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.25); transition: all 0.2s ease-in-out; border-radius: 8px; }
.btn-success:hover { background-color: #059669; border-color: #059669; transform: translateY(-2px); box-shadow: 0 8px 10px -1px rgba(16, 185, 129, 0.35); }
.btn-danger { background-color: #ef4444; border-color: #ef4444; color: white; box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.25); transition: all 0.2s ease-in-out; border-radius: 8px;}
.btn-danger:hover { background-color: #dc2626; border-color: #dc2626; transform: translateY(-2px); box-shadow: 0 8px 10px -1px rgba(239, 68, 68, 0.35); }
.btn-light { background-color: #ffffff; border-color: #e2e8f0; color: #475569; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); transition: all 0.2s ease-in-out; border-radius: 8px;}
.btn-light:hover { background-color: #f8fafc; border-color: #cbd5e1; color: #0f172a; transform: translateY(-1px); }
.btn-outline-primary { color: #3b82f6; border-color: #cbd5e1; transition: all 0.2s; border-radius: 8px;}
.btn-outline-primary:hover { background-color: #f8fafc; color: #2563eb; border-color: #3b82f6; }
.btn-check:checked + .btn-outline-primary { background-color: #3b82f6; border-color: #3b82f6; color: white; box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.25); }
.github-btn { background-color: #ffffff; color: #334155; border: 1px solid #e2e8f0; padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.github-btn:hover { background-color: #f1f5f9; color: #0f172a; }

/* --- 5. FORMS & TABLES --- */
.form-select, .form-control { border-radius: 8px; border-color: #cbd5e1; font-size: 0.95rem; }
.form-select:focus, .form-control:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.input-group-text { border-color: #e2e8f0; border-radius: 8px; background: #f8fafc; }
.table { margin-bottom: 0; }
.table > thead { background-color: #f8fafc; }
.table > thead > tr > th { border-bottom: 2px solid #e2e8f0; color: #475569; font-weight: 600; padding: 16px 12px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; border-top: none; }
.table > tbody > tr > td { padding: 16px 12px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; color: #334155; }
.table-hover tbody tr:hover { background-color: #f8fafc; }
.group-header td { background-color: #f1f5f9 !important; border-top: 2px solid #e2e8f0; border-bottom: 2px solid #e2e8f0; }

/* --- 6. ACCORDIONS & MISC --- */
.accordion-header-custom { cursor: pointer; user-select: none; transition: all 0.2s ease-in-out; border-radius: 8px; border: 1px solid transparent; }
.accordion-header-custom:hover { background-color: #f1f5f9; border-color: #e2e8f0; }
.chevron-icon { transition: transform 0.3s ease; }
.accordion-header-custom[aria-expanded="true"] .chevron-icon { transform: rotate(180deg); }
.login-side { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: white; padding: 60px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.form-side { padding: 60px; background: white; }
.logo-img { width: 120px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.1); }