/* ============================================================
   Hub Navigation — Sidebar + Topbar (uses --lp-* CSS variables)
   ============================================================ */

@import url('https://cdn.ploxo.com.br/ploxo-logo.css');

/* ── Sidebar ── */
.hub-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #111113;
    border-right: 1px solid #27272a;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
[data-theme="light"] .hub-sidebar {
    background: #fafbfc;
    border-right-color: #e8eaed;
}

/* Header / Brand */
.hub-sidebar-header {
    padding: 24px 20px 20px;
}
.hub-sidebar-brand {
    color: #f4f4f5;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}
.hub-sidebar-brand:hover { color: #fff; }
/* .hub-logo-mark removido — usar .plx-logo (cdn.ploxo.com.br/ploxo-logo.css) */
[data-theme="light"] .hub-sidebar-brand { color: #1a1a1a; }
[data-theme="light"] .hub-sidebar-brand:hover { color: #000; }

/* Nav list */
.hub-sidebar-nav {
    list-style: none;
    padding: 8px 10px;
    margin: 0;
    flex: 1;
}
.hub-sidebar-item {
    margin: 2px 0;
}
.hub-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #a1a1aa;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: 8px;
}
.hub-sidebar-link:hover {
    background: #27272a;
    color: #f4f4f5;
}
.hub-sidebar-link.active {
    background: #27272a;
    color: #fff;
    font-weight: 500;
}
.hub-sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}
.hub-sidebar-link.active i {
    opacity: 1;
    color: var(--lp-accent, #3b82f6);
}

[data-theme="light"] .hub-sidebar-link { color: #6b7280; }
[data-theme="light"] .hub-sidebar-link:hover { background: #f0f1f3; color: #1a1a1a; }
[data-theme="light"] .hub-sidebar-link.active { background: #f3f4f6; color: #1a1a1a; }
[data-theme="light"] .hub-sidebar-link.active i { color: #1a1a1a; }

/* Section divider */
.hub-sidebar-section {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #52525b;
    padding: 20px 14px 6px;
}
[data-theme="light"] .hub-sidebar-section { color: #9ca3af; }

/* Footer */
.hub-sidebar-footer {
    border-top: 1px solid #27272a;
    padding: 8px 10px;
}
[data-theme="light"] .hub-sidebar-footer { border-top-color: #e8eaed; }

.hub-theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #a1a1aa;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.hub-theme-toggle:hover { background: #27272a; color: #f4f4f5; }
.hub-theme-toggle i { width: 18px; text-align: center; font-size: 0.9rem; opacity: 0.7; }
[data-theme="light"] .hub-theme-toggle { color: #6b7280; }
[data-theme="light"] .hub-theme-toggle:hover { background: #f0f1f3; color: #1a1a1a; }

/* ── Topbar ── */
.hub-topbar {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    height: 52px;
    background: rgba(9,9,11,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #27272a;
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 999;
    transition: left 0.25s ease;
}
[data-theme="light"] .hub-topbar {
    background: rgba(255,255,255,0.85);
    border-bottom-color: #e8eaed;
}

.hub-topbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--lp-text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 8px;
    margin-right: 12px;
    border-radius: 6px;
}
.hub-topbar-toggle:hover { background: rgba(255,255,255,0.05); }
[data-theme="light"] .hub-topbar-toggle:hover { background: #f3f4f6; }

.hub-topbar-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--lp-text-secondary);
}

/* ── Main Content ── */
.hub-main {
    margin-left: 240px;
    margin-top: 52px;
    padding: 32px;
    min-height: calc(100vh - 52px);
    transition: margin-left 0.25s ease;
}

/* ── Sidebar Overlay (mobile) ── */
.hub-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.hub-sidebar-overlay.active { display: block; }

/* ── Submenu ── */
.hub-sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}
.hub-sidebar-submenu.open {
    max-height: 300px;
}
.hub-sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 42px;
    color: #71717a;
    text-decoration: none;
    font-size: 0.82rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.hub-sidebar-sublink:hover {
    background: #27272a;
    color: #f4f4f5;
}
.hub-sidebar-sublink.active {
    color: #e4e4e7;
    font-weight: 500;
}
.hub-sidebar-sublink i {
    width: 14px;
    text-align: center;
    font-size: 0.78rem;
    opacity: 0.7;
}
.hub-sidebar-sublink.active i {
    opacity: 1;
    color: var(--lp-accent, #3b82f6);
}
.hub-submenu-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.25s ease;
    opacity: 0.5;
}
.hub-sidebar-link.submenu-open .hub-submenu-arrow {
    transform: rotate(180deg);
}
[data-theme="light"] .hub-sidebar-sublink { color: #9ca3af; }
[data-theme="light"] .hub-sidebar-sublink:hover { background: #f0f1f3; color: #1a1a1a; }
[data-theme="light"] .hub-sidebar-sublink.active { color: #374151; }

/* ── Mobile ── */
@media (max-width: 992px) {
    .hub-sidebar {
        transform: translateX(-240px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    }
    .hub-sidebar.mobile-open {
        transform: translateX(0);
    }
    .hub-topbar {
        left: 0;
    }
    .hub-topbar-toggle {
        display: block;
    }
    .hub-main {
        margin-left: 0;
    }
}
