/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: transform 0.3s ease;
    z-index: 50;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-left: 10px;
    color: var(--text-main);
}
.brand i { font-size: 1.5rem; color: var(--accent); }
.brand span { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.5px; }
.brand small { display: block; font-size: 0.7rem; color: var(--text-muted); font-weight: 400; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px;}

/* Account Switcher */
.account-switcher { margin-bottom: 25px; }
.account-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
    padding-left: 10px;
}
.account-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.acc-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.acc-btn:hover { background: rgba(255,255,255,0.08); color: white; }
.acc-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* Navigation */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    overflow-y: auto;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.nav-item.active {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    border-left: 3px solid var(--accent);
}
.nav-item i { width: 20px; text-align: center; }

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-body);
}

.top-bar {
    height: 60px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 40;
}

.page-title { font-size: 1.1rem; font-weight: 600; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

/* --- Pages --- */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
    max-width: 1200px;
    margin: 0 auto;
}
.page.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}