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

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    background: rgba(12, 12, 29, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

html.theme-light .sidebar {
    background: rgba(255, 255, 255, 0.95);
}


.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    animation: glow 3s ease-in-out infinite;
}

.sidebar-brand h2 {
    font-size: 18px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand small {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section-title {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    margin-bottom: 2px;
}

.sidebar-link i {
    width: 22px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-light);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.sidebar-link .link-badge {
    margin-right: auto;
    margin-left: 0;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-family: var(--font-en);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-glass);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-user-info small {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Main Content ===== */
.admin-main {
    margin-right: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

/* ===== Top Navbar ===== */
.top-navbar {
    height: var(--navbar-height);
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}

html.theme-light .top-navbar {
    background: rgba(255, 255, 255, 0.9);
}


.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.navbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.navbar-icon-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--primary-light);
    border-color: var(--border-glass-hover);
}

.navbar-icon-btn .notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.admin-content {
    padding: 32px;
    position: relative;
    z-index: 1;
}

/* ===== Chart Container ===== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ===== Activity Item ===== */
.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-info h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-info small {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-en);
}

/* ===== Responsive Admin ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-right: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 16px;
    }

    .top-navbar {
        padding: 0 16px;
    }
}

/* ===== Public Navbar ===== */
.public-navbar {
    height: var(--navbar-height);
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

html.theme-light .public-navbar {
    background: rgba(255, 255, 255, 0.9);
}


.public-navbar .nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.public-navbar .nav-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.public-navbar .nav-logo h2 {
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.public-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.public-navbar .nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: 4px 0;
}

.public-navbar .nav-links a:hover,
.public-navbar .nav-links a.active {
    color: var(--text-primary);
}

.public-navbar .nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.public-navbar .nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

@media (max-width: 768px) {
    .public-navbar {
        padding: 0 16px;
    }

    .public-navbar .nav-links {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        right: 0;
        left: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-glass);
        flex-direction: column;
        padding: 16px;
        gap: 8px;
    }

    .public-navbar .nav-links.open {
        display: flex;
    }

    .public-navbar .nav-links a {
        padding: 12px;
        border-radius: var(--radius-sm);
    }

    .public-navbar .nav-links a:hover {
        background: var(--bg-glass);
    }

    .nav-toggle {
        display: flex;
    }
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--navbar-height) + 40px) 40px 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 50px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f1f5f9 0%, #818cf8 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
}

.hero-stat-item h3 {
    font-size: 36px;
    font-weight: 800;
    font-family: var(--font-en);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-item p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ===== Footer ===== */
.site-footer {
    background: rgba(10, 10, 26, 0.9);
    border-top: 1px solid var(--border-glass);
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

html.theme-light .site-footer {
    background: rgba(255, 255, 255, 0.9);
}


.site-footer a {
    color: var(--primary-light);
}

/* ===== User Sidebar ===== */
.user-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--navbar-height);
}

.user-sidebar {
    width: 260px;
    position: fixed;
    right: 0;
    top: var(--navbar-height);
    bottom: 0;
    background: rgba(12, 12, 29, 0.8);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-glass);
    padding: 24px 12px;
    overflow-y: auto;
}

html.theme-light .user-sidebar {
    background: rgba(255, 255, 255, 0.9);
}

.user-main {
    margin-right: 260px;
    flex: 1;
    padding: 32px;
}

@media (max-width: 768px) {
    .user-sidebar {
        display: none;
    }

    .user-main {
        margin-right: 0;
        padding: 16px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
    }
}