#app {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    overflow: hidden;
}

/* ═══════════ SIDEBAR ═══════════ */
#sidebar {
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--border-soft);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), var(--sky));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.logo-text {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.operator-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--accent-soft);
    color: var(--accent-hover);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px 8px;
}

.sidebar-section-title {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.online-count {
    color: var(--green);
    font-weight: 600;
}

.bot-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.bot-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

    .bot-item:hover {
        background: var(--bg-hover);
    }

    .bot-item.selected {
        background: var(--bg-active);
        color: var(--sky);
        font-weight: 600;
    }

.bot-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}

    .bot-dot.offline {
        background: var(--text-muted);
    }

.bot-lock-badge {
    margin-left: auto;
    padding: 2px 6px;
    background: var(--orange-bg);
    color: var(--orange);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-soft);
    background: var(--bg-card);
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.stat-mini {
    text-align: center;
}

.stat-mini-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.stat-mini-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══════════ MAIN ═══════════ */
#main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.nav-tabs {
    display: flex;
    gap: 4px;
    height: 100%;
    align-items: stretch;
}

.nav-tab {
    padding: 0 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    border-radius: 0;
    position: relative;
    transition: color 0.15s;
}

    .nav-tab:hover {
        color: var(--text-primary);
    }

    .nav-tab.active {
        color: var(--accent);
    }

        .nav-tab.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 12px;
            right: 12px;
            height: 2px;
            background: var(--accent);
            border-radius: 2px 2px 0 0;
        }

.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-bot-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-hover);
}

    .selected-bot-badge .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--accent);
    }

#pages {
    flex: 1;
/*    overflow: hidden;*/
    position: relative;
}

.page {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
/*    overflow: hidden;*/
    padding: 20px 24px;
}

    .page.active {
        display: flex;
    }

.page-header {
    margin-bottom: 24px;
}

    .page-header h1 {
        font-size: 24px;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 4px;
    }

.page-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
}
