/* Dashboard Layout */
#dashboard-view {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: var(--background);
}

.sidebar {
    width: 270px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 20;
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.brand-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.brand-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    background: var(--surface-card);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    width: fit-content;
    border: 1px solid var(--border);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-icon {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.nav-item:hover {
    background-color: var(--surface-hover);
    color: var(--text-main);
    transform: translateX(3px);
}

.nav-item:hover .nav-icon {
    transform: scale(1.15);
}

.nav-item.active {
    background: var(--primary-gradient);
    color: #0F172A;
    box-shadow: 0 4px 15px rgba(255, 96, 100, 0.3);
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.sidebar-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.user-chip .avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--secondary-gradient);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-main);
}

.user-role {
    font-size: 0.725rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

#page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #34D399;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #34D399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

#mobile-menu-btn {
    display: none;
}

.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    #mobile-menu-btn {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 0; bottom: 0; left: 0;
        z-index: 100;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .app-content {
        padding: 1rem;
    }
}

