/* Sidebar estilo HubFi — paleta azul VPJ */

:root {
    --hub-accent: #0368ff;
    --hub-accent-light: #eff6ff;
    --hub-accent-dark: #0051cc;
    --hub-accent-muted: #dbeafe;
    --hub-sidebar-bg: #ffffff;
    --hub-icon-muted: #64748b;
}

body.app-auth .app-sidebar.hub-sidebar {
    display: flex;
    flex-direction: column;
    padding: 14px 10px 16px;
    background: var(--hub-sidebar-bg);
    border-right: 1px solid rgba(226, 232, 240, 0.95);
}

.hub-sidebar-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 100%;
    gap: 6px;
}

.hub-sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: transparent;
    text-decoration: none;
    margin-bottom: 4px;
    flex-shrink: 0;
    overflow: hidden;
}

.hub-sidebar-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.hub-sidebar-create {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--hub-accent);
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.18s ease, transform 0.18s ease;
    box-shadow: 0 4px 14px rgba(3, 104, 255, 0.28);
    position: relative;
}

.hub-sidebar-create:hover {
    background: var(--hub-accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

.hub-sidebar-create svg {
    display: block;
}

.hub-sidebar-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--hub-icon-muted);
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.18s ease, color 0.18s ease;
    position: relative;
}

.hub-sidebar-search:hover {
    background: #f8fafc;
    color: #334155;
}

.hub-sidebar-search.active {
    background: var(--hub-accent-light);
    color: var(--hub-accent-dark);
}

.hub-sidebar-divider {
    width: 28px;
    height: 1px;
    background: rgba(226, 232, 240, 0.95);
    margin: 6px 0;
    flex-shrink: 0;
}

.hub-sidebar-spacer {
    flex: 1;
    min-height: 8px;
}

.hub-sidebar .floating-sidebar-nav {
    width: 100%;
}

.hub-sidebar .floating-sidebar-nav ul {
    gap: 2px;
}

.hub-sidebar .floating-sidebar-nav li {
    position: relative;
}

.hub-sidebar .floating-sidebar-nav a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--hub-icon-muted);
}

.hub-sidebar .floating-sidebar-nav a:hover {
    background: var(--hub-accent-light);
    color: var(--hub-accent);
}

.hub-sidebar .floating-sidebar-nav li.active::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    background: var(--hub-accent);
    border-radius: 0 4px 4px 0;
    z-index: 2;
}

.hub-sidebar .floating-sidebar-nav li.active a {
    background: var(--hub-accent-light);
    color: var(--hub-accent-dark);
}

.hub-sidebar .floating-sidebar-nav li.active a svg path {
    stroke: var(--hub-accent);
}

.hub-sidebar .floating-sidebar-nav li.active a svg path[fill="currentColor"] {
    fill: var(--hub-accent);
}

.hub-sidebar-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #fff;
    pointer-events: none;
    z-index: 3;
    box-sizing: border-box;
}

.hub-sidebar-badge--dark {
    background: #0f172a;
}

.hub-sidebar-badge--red {
    background: #ef4444;
}

.hub-sidebar-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--hub-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    flex-shrink: 0;
    margin-top: 4px;
    transition: background 0.18s ease;
}

.hub-sidebar-avatar:hover {
    background: var(--hub-accent-dark);
    color: #fff;
}

/* Tooltips nos botões + e busca */
.hub-sidebar-create .sidebar-tooltip,
.hub-sidebar-search .sidebar-tooltip {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: #334155;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 7px 11px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.hub-sidebar-create .sidebar-tooltip::before,
.hub-sidebar-search .sidebar-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #334155;
}

.hub-sidebar-create:hover .sidebar-tooltip,
.hub-sidebar-create:focus-visible .sidebar-tooltip,
.hub-sidebar-search:hover .sidebar-tooltip,
.hub-sidebar-search:focus-visible .sidebar-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 992px) {
    .hub-sidebar-create .sidebar-tooltip,
    .hub-sidebar-search .sidebar-tooltip {
        display: none;
    }
}

@media (min-width: 993px) {
    body.app-auth .app-topbar-end > a:first-of-type .btn-primary {
        display: none;
    }
}
