:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --bg-body: #050507;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-sidebar: rgba(10, 10, 12, 0.9);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(99, 102, 241, 0.2);
    --radius-lg: 18px;
    --radius-md: 12px;
}

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

body {
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR - GLASSMORPHISM */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    margin-bottom: 3rem;
    padding-left: 0.75rem;
}

.sidebar-logo i {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.sidebar-logo span {
    letter-spacing: -0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.15rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.925rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item i { 
    font-size: 1.15rem;
    opacity: 0.7;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    transform: translateX(4px);
}

.nav-item:hover i { opacity: 1; color: var(--primary); }

.nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
    color: #fff;
    border-left: 3px solid var(--primary);
    border-radius: 4px var(--radius-md) var(--radius-md) 4px;
}

.nav-item.active i {
    color: var(--primary);
    opacity: 1;
}

/* CONTENT AREA */
.main-content {
    flex: 1;
    padding: 2.5rem 3.5rem;
    max-width: 1400px;
}

.section-header {
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.section-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

/* CARDS */
.card, .table-card, .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out both;
}

.card:hover, .stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.card { padding: 2rem; }

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

.stat-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
}

/* FORMS */
.form-group { margin-bottom: 1.75rem; }

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

.form-input {
    width: 100%;
    padding: 0.9rem 1.15rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.85rem 1.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    filter: brightness(1.1);
}

.btn-auth {
    width: 100%;
    justify-content: center;
}

/* AUTH PAGES */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #030712;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.15;
    top: -100px;
    left: -100px;
}

.auth-container .card {
    width: 100%;
    max-width: 420px;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.8px;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.alert {
    padding: 0.875rem 1.15rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.05);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.15);
}

.alert-success {
    background: rgba(16, 185, 129, 0.05);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.15);
}

@media (max-width: 480px) {
    .auth-container { padding: 1rem; }
    .auth-container .card { padding: 2.5rem 1.5rem; border-radius: 20px; }
    .card-title { font-size: 1.5rem; }
}

/* TABLES */
.table-card { overflow: hidden; }

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

.table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

.table tr:last-child td { border-bottom: none; }

.table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* MOBILE RESPONSIVE ENHANCEMENTS */
.mobile-header {
    display: none;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1001;
    justify-content: space-between;
    align-items: center;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
}

.mobile-logo i { color: var(--primary); }

.menu-toggle {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .sidebar { width: 85px; padding: 2rem 0.75rem; }
    .sidebar-logo span, .nav-item span { display: none; }
    .nav-item { justify-content: center; padding: 1.1rem; }
    .main-content { padding: 2.5rem; }
    .sidebar-logo { padding-left: 0; justify-content: center; margin-bottom: 2.5rem; }
}

@media (max-width: 768px) {
    .mobile-header { display: flex; }
    .wrapper { flex-direction: column; }
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 280px;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        background: #0a0a0c;
    }
    .sidebar.active {
        left: 0;
        box-shadow: 20px 0 50px rgba(0,0,0,0.8);
    }
    .sidebar-logo span, .nav-item span { display: block; }
    .nav-item { justify-content: flex-start; padding: 0.875rem 1.15rem; }
    .main-content { padding: 1.5rem; }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(4px);
        z-index: 1500;
    }
    .sidebar-overlay.active { display: block; }

    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .section-header { margin-bottom: 2rem; }
    .section-header h1 { font-size: 1.5rem; }
    
    .table-card { overflow-x: auto; }
    .table th, .table td { padding: 1rem 0.75rem; font-size: 0.85rem; }
}
