/* assets/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary: #0f172a;
    --accent: #f43f5e;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-main: #f8fafc;
    --sidebar-width: 280px;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-main);
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.05) 0px, transparent 50%);
    color: var(--secondary);
    overflow-x: hidden;
}

/* Sidebar Styling - Premium Dark Gradient */
#sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed #sidebar {
    width: 80px;
}

body.sidebar-collapsed .main-content {
    margin-left: 80px;
}

body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .section-title,
body.sidebar-collapsed .brand-subtitle,
body.sidebar-collapsed .brand-full {
    display: none !important;
}

body.sidebar-collapsed .brand-mini {
    display: block !important;
    font-size: 2rem;
}

body.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 0.9rem 0;
    margin: 0.3rem 0.5rem;
}

body.sidebar-collapsed .nav-link i {
    margin-right: 0;
    font-size: 1.4rem;
}

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
    body.sidebar-collapsed #sidebar {
        transform: translateX(0); /* On mobile, toggling opens it to full width usually, or maybe we just leave it hidden if not collapsed. Wait, the logic for mobile is reversed */
        width: var(--sidebar-width);
    }
    body.sidebar-collapsed .nav-text,
    body.sidebar-collapsed .section-title,
    body.sidebar-collapsed .brand-subtitle,
    body.sidebar-collapsed .brand-full {
        display: block !important;
    }
    body.sidebar-collapsed .brand-mini {
        display: none !important;
    }
    body.sidebar-collapsed .nav-link {
        justify-content: flex-start;
        padding: 0.9rem 1.5rem;
        margin: 0.3rem 1.2rem;
    }
    body.sidebar-collapsed .nav-link i {
        margin-right: 12px;
        font-size: 1.2rem;
    }
}

.sidebar-header {
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.sidebar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.sidebar-brand span {
    color: #818cf8;
}

.nav-link {
    color: rgba(255, 255, 255, 0.5);
    padding: 0.9rem 1.5rem;
    margin: 0.3rem 1.2rem;
    border-radius: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.nav-link i {
    width: 28px;
    margin-right: 12px;
    font-size: 1.2rem;
    opacity: 0.8;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.nav-link.active {
    color: #fff;
    background: var(--primary-gradient);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
}

/* Premium Top Navbar */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.2rem 2rem;
    margin: 1rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

/* Vibrant Dashboard Cards */
.card {
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    background: #fff;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
}

.stat-card {
    position: relative;
    z-index: 1;
    padding: 2rem !important; /* Increased padding for better breathing room */
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 150px;
    height: 150px;
    background: var(--primary-gradient);
    opacity: 0.05;
    border-radius: 50%;
    z-index: -1;
}

.stat-icon {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 12px 20px -5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Glass & Gradient Effects */
.bg-gradient-primary { background: var(--primary-gradient); color: #fff; }
.bg-gradient-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; }
.bg-gradient-danger { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); color: #fff; }
.bg-gradient-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; }

/* Table Styling - Clean & Modern */
.table-responsive {
    border-radius: 24px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 1.5rem 1.5rem; /* Increased header padding */
    border: none;
}

.table tbody td {
    padding: 1.5rem 1.5rem; /* Increased cell padding */
    vertical-align: middle;
    border-top: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
}

.card-header {
    padding: 1.5rem 2rem !important;
}

.card-body {
    padding: 2rem !important;
}

/* Premium Buttons */
.btn {
    border-radius: 14px;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Animated Auth Pages */
.auth-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    filter: blur(150px);
    opacity: 0.15;
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 35px;
    padding: 3.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Soft Badges */
.badge {
    padding: 0.6em 1.2em;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.bg-primary-soft { background: #eef2ff; color: #4f46e5; }
.bg-success-soft { background: #ecfdf5; color: #059669; }
.bg-danger-soft { background: #fef2f2; color: #dc2626; }
.bg-warning-soft { background: #fffbeb; color: #d97706; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 20px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.p-4 {
    animation: fadeIn 0.5s ease-out;
}
