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

:root {
    --bg-dark: #0f172a;
    --bg-surface: #1e293b;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #3b82f6;
    --accent: #ec4899;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-background: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* Glassmorphism */
.glass {
    background: var(--glass-background);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 40px var(--primary-glow);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-family: inherit;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
}

/* Logo */
.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

/* Sidebar Layout (Admin) */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.main-content {
    flex: 1;
    padding: 3rem;
    margin-top: 80px;
    /* Offset for top navbar */
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.05), transparent 40%),
        radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.05), transparent 40%);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
}

.nav-link i {
    font-size: 1.2rem;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, white 0%, var(--text-secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* -----------------------------
   Navigation Drawer Styles
   ----------------------------- */

/* Top Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 2rem;
    z-index: 2000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 2rem;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Drawer */
.nav-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(25px);
    z-index: 2001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-left: 1px solid var(--glass-border);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
}

.nav-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.drawer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.drawer-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 1.5rem 0 0.5rem 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.drawer-link i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary);
}

.drawer-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding-left: 1.25rem;
}

.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}


/* Responsive Grid Utility */
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem !important;
    }

    .main-content {
        padding: 1.5rem 1rem !important;
    }

    .glass-card {
        padding: 1rem;
    }

    .profile-card {
        margin-bottom: 1rem;
    }

    /* Stack grids on mobile */
    .field-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    /* Hide desktop nav links */
    .nav-links-desktop {
        display: none !important;
    }

    /* Show hamburger */
    .menu-toggle {
        display: flex !important;
    }

    /* Navbar adjustments */
    .navbar {
        padding: 0.8rem 1rem;
    }

    /* Adjust Admin Table for mobile - horizontal scroll */
    .admin-table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 800px; /* Force scroll if too wide */
    }

    /* Adjust font sizes */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}