:root {
    --primary: #0D9488;
    --primary-light: #2DD4BF;
    --primary-dark: #0F766E;
    --secondary: #64748B;
    --accent: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;
    --dark: #0F172A;
    --light: #F8FAF9;
    --white: #FFFFFF;
    --sidebar-width: 280px;
    --radius: 16px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow: 0 10px 15px -3px rgba(0,0,0,0.04), 0 4px 6px -2px rgba(0,0,0,0.02);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.06), 0 10px 10px -5px rgba(0,0,0,0.04);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: #f0f4f4;
    background-image: 
        radial-gradient(at 0% 0%, rgba(13, 148, 136, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(45, 212, 191, 0.05) 0px, transparent 50%);
    color: var(--dark);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    font-size: 0.9rem;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    height: 100vh;
    position: fixed;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border-right: 1px solid rgba(0,0,0,0.05);
    box-shadow: 10px 0 30px rgba(0,0,0,0.02);
}

.sidebar-brand {
    margin-bottom: 3.5rem;
    padding: 0 0.5rem;
}

.sidebar-brand img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
    mix-blend-mode: multiply; /* Helps blend white background logos */
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: var(--secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    gap: 1.25rem;
}

.nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    opacity: 0.7;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(13, 148, 136, 0.05);
    color: var(--primary);
    transform: translateX(5px);
}

.nav-link:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.nav-link.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(13, 148, 136, 0.4);
}

.nav-link.active i {
    opacity: 1;
    color: var(--white);
}

/* Submenu Styling */
.submenu {
    list-style: none;
    padding-left: 3rem; /* Indent submenus */
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.submenu li a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.submenu li a:hover {
    color: var(--primary);
    background: rgba(13, 148, 136, 0.05);
    transform: translateX(3px);
}

.submenu li a i {
    width: 20px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    opacity: 0.7;
}

.submenu li a.active-sub {
    color: var(--primary);
    font-weight: 700;
    background: rgba(13, 148, 136, 0.05);
}

.submenu li a.active-sub i {
    opacity: 1;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 1.5rem 2rem;
    max-width: 100%;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.04em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: var(--white);
    border-radius: 9999px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Cards & Components */
.card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::after {
    opacity: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 24px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    font-size: 1.75rem;
    background: rgba(13, 148, 136, 0.1);
    color: var(--primary);
}

.stat-info h3 {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-info p {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: 14px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    gap: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(13, 148, 136, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(13, 148, 136, 0.5);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: 1rem;
    color: #475569;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.table tr td {
    padding: 1rem;
    border-bottom: 1px solid #f8fafc;
    vertical-align: middle;
    color: #475569;
    background: transparent;
}

.table tr:hover td {
    background: #f8fafc;
}

.table tr td:first-child, 
.table tr td:last-child {
    border-radius: 0;
    border-left: none;
    border-right: none;
}

/* Login Page Overhaul */
.login-page {
    background: url('../img/login-bg.png') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(2px);
}

.login-box {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 3.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 32px;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.5);
    text-align: center;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header img {
    max-width: 200px;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.login-form .form-label {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark);
    display: block;
}

.login-form .form-control {
    height: 3.75rem;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 16px;
    padding: 0 1.5rem 0 3.25rem;
    font-size: 1rem;
    transition: all 0.3s;
}

.login-form .input-group {
    position: relative;
}

.login-form .input-group i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    font-size: 1.1rem;
}

.login-btn {
    width: 100%;
    height: 3.75rem;
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Lightbox Enhancements */
.lb-overlay {
    backdrop-filter: blur(15px);
    background: rgba(0,0,0,0.92);
}

.menu-toggle {
    display: none;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.05);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    font-size: 1.25rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.menu-toggle:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.3);
}

.sidebar-brand img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
    mix-blend-mode: multiply;
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); width: 300px; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 2rem; }
    .menu-toggle { display: flex; }
    .header h1 { font-size: 1.75rem; }
    
    body.sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(4px);
        z-index: 999;
    }
}

.lb-nav {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.05);
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); width: 300px; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 2rem; }
    .menu-toggle { display: flex; }
    .header h1 { font-size: 1.75rem; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animations */
.fade-in { animation: fadeIn 0.5s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
