/* ==================== NAVIGATION SYSTEM ==================== */

/* Sidebar Navigation (Desktop) */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--card-bg-solid);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 30px 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

/* Dark mode specific styling for sidebar */
body.dark-mode .sidebar {
    background: linear-gradient(180deg, rgba(30, 30, 60, 0.98) 0%, rgba(20, 20, 40, 0.99) 100%);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
    padding: 0 25px 25px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    margin: 4px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.nav-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.nav-icon {
    font-size: 1.3rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.nav-label {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item-admin {
    margin-top: auto;
    opacity: 0.6;
}

.nav-item-admin:hover {
    opacity: 1;
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 8px 0;
    z-index: 100;
    box-shadow: var(--shadow);
    justify-content: space-around;
}

/* Dark mode specific styling for bottom nav */
body.dark-mode .bottom-nav {
    background: linear-gradient(180deg, rgba(30, 30, 60, 0.98) 0%, rgba(20, 20, 40, 0.99) 100%);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 12px;
    margin: 0 4px;
}

.bottom-nav-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.bottom-nav-item.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.15);
}

.bottom-nav-item .nav-icon {
    font-size: 1.4rem;
    margin-right: 0;
    margin-bottom: 2px;
}

.bottom-nav-item .nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

/* App Container (with sidebar offset) */
.app-container {
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* View System */
.view {
    display: none;
    animation: viewFadeIn 0.4s ease;
}

.view.active {
    display: block;
}

@keyframes viewFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.view-header {
    text-align: center;
    padding: 40px 20px 30px;
}

.view-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-color);
}

.view-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.dashboard-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 10px rgba(99, 102, 241, 0.3));
}

.dashboard-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
}

.dashboard-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.card-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    .app-container {
        margin-left: 0;
        padding-bottom: 80px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .view-header h1 {
        font-size: 2rem;
    }
}

/* Theme Toggle Button */
.theme-toggle-container {
    position: absolute;
    bottom: 20px;
    left: 15px;
    right: 15px;
}

.theme-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-light);
}

.theme-icon {
    font-size: 1.2rem;
}

.theme-label {
    font-weight: 500;
}

/* Mobile theme toggle */
@media (max-width: 768px) {
    .theme-toggle-container {
        display: none;
    }
}