:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #a855f7;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.05) 0%, rgba(241, 245, 249, 1) 100%);
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--dark);
    line-height: 1.5;
    min-height: 100vh;
}

/* Font Weights */
.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Navbar Modernization */
.navbar-modern {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.footer-modern {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    padding: 2rem 0;
}

.navbar-modern .navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
    text-decoration: none !important;
}

.nav-link-modern {
    font-weight: 600;
    color: #64748b !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    white-space: nowrap;
}

@media (min-width: 992px) and (max-width: 1200px) {
    .nav-link-modern {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.85rem;
        gap: 0.35rem;
    }
}

.nav-link-modern:hover,
.nav-link-modern.active {
    color: var(--primary) !important;
    background: rgba(99, 102, 241, 0.1);
}

/* Premium Buttons */
.btn-premium {
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn-premium-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.btn-premium-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
    color: white;
}

/* Form Styling */
.form-control-modern {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.form-control-modern::placeholder {
    font-size: 0.8rem;
    opacity: 0.6;
}

.form-control-modern:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stat Cards */
.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

/* Tables */
.table-modern {
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.table-modern tr {
    background: white;
    box-shadow: var(--shadow-sm);
    border-radius: 1rem;
}

.table-modern td,
.table-modern th {
    padding: 1rem;
    border: none !important;
}

.table-modern tr td:first-child {
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.table-modern tr td:last-child {
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

/* Login Page Special */
.login-bg {
    background: radial-gradient(circle at top right, #e0e7ff 0%, #f1f5f9 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-glass {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
}

/* Modal Styling */
.modal-content.glass-card {
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Navbar Profile Circle Fix */
.navbar-modern .btn-light.rounded-circle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

/* Pagination Modern */
.pagination-modern {
    gap: 0.5rem;
}

.pagination-modern .page-item .page-link {
    border: none;
    border-radius: 0.75rem !important;
    padding: 0.6rem 1rem;
    color: #64748b;
    background: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.pagination-modern .page-item .page-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.pagination-modern .page-item.active .page-link {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.pagination-modern .page-item .page-link:focus {
    box-shadow: none;
}

/* ==========================================
   Dark Mode Styling
   ========================================== */
body.dark-theme {
    --light: #0f172a;
    --dark: #f8fafc;
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.15) 0%, #090d16 100%);
    color: #cbd5e1;
}

body.dark-theme .glass-card {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .navbar-modern {
    background: rgba(15, 23, 42, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .footer-modern {
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .text-dark,
body.dark-theme th,
body.dark-theme td,
body.dark-theme .navbar-modern .navbar-brand {
    color: #f8fafc !important;
}

body.dark-theme .navbar-modern .navbar-brand {
    background: linear-gradient(135deg, #a5b4fc, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-theme .bg-light,
body.dark-theme .btn-light {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .btn-light:hover {
    background-color: #334155 !important;
}

body.dark-theme .form-control-modern {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-theme .form-control-modern:focus {
    background: #0f172a;
    border-color: var(--primary);
}

body.dark-theme .table-modern tr {
    background: #1e293b;
}

body.dark-theme .pagination-modern .page-item .page-link {
    background: rgba(30, 41, 59, 0.5);
    color: #94a3b8;
}

body.dark-theme .pagination-modern .page-item .page-link:hover,
body.dark-theme .pagination-modern .page-item.active .page-link {
    background: var(--primary);
    color: white;
}

body.dark-theme .modal-content {
    background: #0f172a;
    color: #cbd5e1;
}

body.dark-theme hr {
    border-color: #334155;
    opacity: 0.3;
}

body.dark-theme .stat-card {
    background: rgba(30, 41, 59, 0.7);
}

body.dark-theme .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}