:root {
    --lux-bg: #0f172a;
    --lux-card: rgba(30, 41, 59, 0.7);
    --lux-gold: #fbbf24;
    --lux-cyan: #38bdf8;
    --lux-text: #f8fafc;
    --lux-muted: #94a3b8;
    --primary: #6366f1;
    --success: #10b981;
    --danger: #f43f5e;
    --admin-purple: #a855f7;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { 
    font-family: 'Cairo', sans-serif; 
    background-color: var(--lux-bg); 
    color: var(--lux-text);
    margin: 0; 
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* --- Smart Sidebar Drawer --- */
.sidebar-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: #0f172a;
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -15px 0 40px rgba(0,0,0,0.6);
    padding: 35px 25px 100px 25px; /* Added extra bottom padding */
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.05);
    overflow-y: auto; /* Enable vertical scrolling */
}

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

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    z-index: 1999;
    display: none;
}
.drawer-overlay.active { display: block; }

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-group-label {
    color: var(--lux-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 25px 0 12px 10px;
    font-weight: 800;
}

.sidebar-link {
    color: #94a3b8;
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-link i { font-size: 1.3rem; width: 30px; text-align: center; color: var(--lux-cyan); opacity: 0.8; }
.sidebar-link:hover { background: rgba(56, 189, 248, 0.1); color: white; transform: translateX(-8px); }
.sidebar-link:hover i { color: var(--lux-gold); opacity: 1; }
.sidebar-link.active { background: linear-gradient(135deg, var(--primary), #4338ca); color: white; box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3); }
.sidebar-link.active i { color: white; }

/* --- Smart Header --- */
header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(15px);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.brand-logo {
    text-decoration: none;
    color: var(--lux-gold);
    font-weight: 900;
    font-size: 1.7rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-menu-toggle {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
}
.btn-menu-toggle:hover { background: var(--lux-cyan); transform: rotate(90deg); }

.nav-nav { display: flex; gap: 18px; align-items: center; }

.nav-item {
    padding: 14px 28px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.nav-item-home { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.nav-item-search { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3); }
.nav-item-login { background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3); }
.nav-item-logout { background: linear-gradient(135deg, #f43f5e, #e11d48); }

.nav-item:hover { transform: translateY(-4px) scale(1.02); filter: brightness(1.15); }

/* --- Deluxe Form Styling --- */
.lux-form-group { margin-bottom: 25px; }
.lux-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 900;
    color: var(--lux-gold);
    font-size: 1.1rem;
    text-transform: uppercase;
}
.lux-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 18px 25px;
    color: white;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lux-input::placeholder { color: var(--lux-muted); opacity: 0.6; }
.lux-input:focus {
    outline: none;
    border-color: var(--lux-cyan);
    background: rgba(15, 23, 42, 1);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
    transform: scale(1.01);
}
.lux-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2338bdf8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 15px center; background-size: 20px; }

.lux-btn {
    background: linear-gradient(135deg, var(--lux-cyan), #0284c7);
    color: white;
    padding: 12px 25px;
    border-radius: 15px;
    border: none;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.lux-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4); }

/* --- Content Area --- */
.main-content {
    flex: 1;
    padding: 40px 5%;
    width: 100%;
    max-width: 2200px;
    margin: 0 auto;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--lux-bg); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--lux-cyan); }

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

/* --- Components --- */
.card {
    background: var(--lux-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.3);
}

.badge-lux {
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-action {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: white;
    transition: all 0.3s;
}
.btn-action:hover { transform: scale(1.1); }

/* --- Responsive Smart Design (Phones, Tablets, TVs) --- */
@media (max-width: 1024px) {
    .nav-item span { display: none; }
    .nav-item { width: 55px; height: 55px; padding: 0; justify-content: center; border-radius: 50%; }
    .main-content { padding: 30px 4%; }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    .brand-logo { font-size: 1.4rem; }
    header { padding: 10px 4%; }
    .nav-item { width: 45px; height: 45px; font-size: 1rem; }
    .btn-menu-toggle { width: 45px; height: 45px; font-size: 1.2rem; }
    .card { padding: 20px; border-radius: 20px; }
    .sidebar-drawer { width: 280px; padding: 25px 15px; }
}

@media (max-width: 480px) {
    .brand-logo span { display: none; } /* Show only icon on very small phones */
    .nav-nav { gap: 10px; }
    .main-content { padding: 15px 3%; }
    .badge-lux { padding: 5px 12px; font-size: 0.8rem; }
    .card h3 { font-size: 1.2rem; }
}

@media (min-width: 1920px) {
    /* Smart TV / 4K Displays */
    body { font-size: 18px; }
    .main-content { padding: 60px 5%; max-width: 2500px; }
    .card { padding: 40px; border-radius: 40px; }
    .brand-logo { font-size: 2.2rem; }
    .nav-item { padding: 18px 35px; font-size: 1.3rem; }
    header { padding: 20px 5%; }
}
