:root {
    /* Theme Variables */
    --primary: #0061ff;
    --primary-light: #4e92ff;
    --secondary: #60efff;
    --bg: #0a0e1a;
    --bg-darker: #05070d;
    --text: #f8f9fa;
    --text-muted: #8b949e;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --success: #00e676;
    --warning: #ffb74d;
    --danger: #ff5252;
    --input-bg: rgba(0,0,0,0.3);
    --gray: #8b949e;
    --light: #f8f9fa;
}

.light-mode {
    --bg: #f4f7fa;
    --bg-darker: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --glass: rgba(0,0,0,0.02);
    --border: #e2e8f0;
    --input-bg: #ffffff;
    --dark: #f4f7fa;
    --darker: #ffffff;
    --light: #0f172a;
}

.theme-toggle-btn {
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 1rem;
    transition: 0.3s;
    font-weight: 600;
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    background: var(--glass);
}

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

body {
    background-color: var(--bg-darker);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Ensure all common text elements follow the theme */
h1, h2, h3, h4, h5, h6, p, label, span, div, li, a, td, th, i {
    color: inherit;
}

body {
    color: var(--text);
}

.logo {
    color: var(--text);
    font-weight: 900;
}

.btn-primary, .btn-primary *, .bg-primary, .bg-primary *, [style*="background: var(--primary)"], [style*="background: var(--primary)"] * {
    color: white !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darker); }
::-webkit-scrollbar-thumb { background: var(--card-bg); border-radius: 10px; }

/* Dashboard Layout Reset */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

.app-wrapper {
    width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: 280px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 100;
    overflow-y: auto;
    box-sizing: border-box;
    transition: background 0.3s ease;
}

.content-area {
    margin-left: 280px;
    padding: 2.5rem 3rem 5rem;
    display: block;
    position: relative;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

/* Cards & Stats */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    transition: 0.3s;
}

.glass-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 97, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Sidebar Links */
.nav-group { margin-bottom: 2rem; }
.nav-label { font-size: 0.7rem; color: var(--gray); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem; display: block; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.2rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 15px;
    margin-bottom: 0.5rem;
    transition: 0.3s;
}
.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 97, 255, 0.2);
}

/* Table Styling */
.table-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 1.2rem 1.5rem; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; border-bottom: 1px solid var(--border); }
td { padding: 1.5rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--text); }

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-success { background: rgba(0, 230, 118, 0.1); color: var(--success); }
.badge-warning { background: rgba(255, 183, 77, 0.1); color: var(--warning); }

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 10px 20px rgba(0, 97, 255, 0.3); }

/* Inputs */
.form-input {
    width: 100%;
    padding: 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--text);
    margin-top: 0.5rem;
    font-size: 0.95rem;
    transition: 0.3s;
}
.form-input option {
    background: var(--bg);
    color: var(--text);
}
.form-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px rgba(0, 97, 255, 0.1); }
/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        left: 0;
        transition: transform 0.3s ease;
        width: 280px;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .content-area {
        margin-left: 0;
        padding: 1.5rem 1rem 5rem;
    }
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .grid-stats {
        grid-template-columns: 1fr;
    }
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 1rem;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    .menu-toggle {
        display: block;
        background: var(--glass);
        border: 1px solid var(--border);
        color: var(--text);
        padding: 10px;
        border-radius: 8px;
        cursor: pointer;
    }
    .dashboard-main-grid, .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Landing Page Mobile Fixes */
    nav {
        flex-direction: column;
        padding: 1rem;
        height: auto;
    }
    .nav-links {
        display: none; /* Hide for now, or stack them */
    }
    .nav-auth {
        margin-top: 1rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .hero {
        padding: 6rem 1rem 3rem;
        text-align: center;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    .services-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* Base Styles for Landing Page (Missing in CSS) */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(10px);
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.3s;
}
.nav-links a:hover { color: var(--primary); }

.hero {
    padding: 10rem 5% 5rem;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(0, 97, 255, 0.1), transparent);
}
.hero h1 { font-size: 3.5rem; margin-bottom: 1.5rem; }
.hero p { max-width: 700px; margin: 0 auto 2.5rem; color: var(--text-muted); font-size: 1.1rem; }

.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
}
.stat-card h3 { font-size: 2.5rem; color: var(--primary); }

.services-section { padding: 5rem 5%; }
.section-title { text-align: center; margin-bottom: 4rem; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.service-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: 0.3s;
}
.service-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: 1.5rem; display: block; }

.service-stats-row i { margin-right: 5px; }

/* Category Navigation */
.category-nav {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px 0 20px;
    margin-bottom: 2.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.category-nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}
.category-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}
.category-pill i {
    font-size: 1.1rem;
}
.category-pill:hover {
    border-color: var(--primary);
    background: rgba(0, 97, 255, 0.05);
    transform: translateY(-2px);
}
.category-pill.active {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 97, 255, 0.3);
}

.dashboard-main-grid {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-darker);
}
.auth-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 450px;
    backdrop-filter: blur(10px);
}
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

    .menu-toggle {
        display: none;
    }
}

/* Home Page Sections */
.about-section {
    padding: 8rem 0;
    background: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(0, 97, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.contact-section {
    padding: 8rem 0;
    background: var(--bg-darker);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-info-item i {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at top left, rgba(0, 97, 255, 0.1), transparent), var(--bg-darker);
}

.auth-card {
    background: var(--card-bg);
    padding: 3.5rem 3rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

footer {
    padding: 4rem 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
}

/* Image Backgrounds & Styling */
.hero-bg {
    background: linear-gradient(rgba(10, 14, 26, 0.85), rgba(10, 14, 26, 0.95)), url('../img/hero_bg.png') center/cover no-repeat !important;
}

.about-img-wrapper {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
}

.about-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-img-wrapper:hover img {
    transform: scale(1.05);
}

.contact-img-wrapper {
    position: relative;
    border-radius: 30px;
    height: 100%;
    min-height: 400px;
    background: url('../img/contact_desk.png') center/cover no-repeat;
}

.auth-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 1000px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 30px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.auth-split-img {
    background: url('../img/auth_bg.png') center/cover no-repeat;
    min-height: 400px;
    position: relative;
}

.auth-split-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.1), var(--card-bg));
}

@media (max-width: 768px) {
    .auth-split-grid {
        grid-template-columns: 1fr;
    }
    .auth-split-img {
        display: none;
    }
    .sidebar {
        left: -280px;
    }
    .sidebar.active {
        left: 0;
    }
    .content-area {
        margin-left: 0 !important;
        padding: 1.5rem 1rem 5rem !important;
    }

    /* Category Nav Mobile Grid Fix */
    .category-nav {
        padding: 10px 0 20px !important;
        margin-bottom: 1.5rem;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        overflow-x: visible !important;
    }
    .category-pill {
        padding: 12px 15px !important;
        font-size: 0.85rem;
        display: flex !important;
        justify-content: center;
        text-align: center;
        width: 100%;
        flex-shrink: 1 !important;
    }

    /* Top Nav Mobile Fix */
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .top-nav > div:last-child {
        width: 100%;
        justify-content: space-between;
        display: flex;
        align-items: center;
    }

    /* Grid Stats Mobile Fix */
    .grid-stats {
        grid-template-columns: 1fr;
    }

    /* Footer Social Links Mobile Fix */
    .footer-social-links {
        gap: 1.5rem !important;
    }

    .sidebar-toggle {
        display: block !important;
    }
}

/* Navigation Menu Toggle (Logic needed in header.php) */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    .nav-auth {
        display: none;
    }
    .mobile-nav-toggle {
        display: block !important;
    }
}

