.dh-hub { width: 100%; display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.dh-hub *, .dh-hub *::before, .dh-hub *::after { box-sizing: border-box; }

.dh-hub__mobile-toggle { display: none; }
.dh-hub__backdrop { display: none; }
.dh-hub__sidebar-close { display: none; }

.dh-hub__sidebar {
    position: sticky;
    top: 16px;
    background: var(--color-bg-primary, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    overflow: hidden;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
}

.dh-hub__sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dh-hub__sidebar-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #346af1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dh-hub__search {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}
.dh-hub__search-input {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.78rem;
    color: #1f2937;
    background: #fff;
}
.dh-hub__search-input:focus {
    outline: none;
    border-color: #346af1;
    box-shadow: 0 0 0 3px rgba(52, 106, 241, 0.12);
}

.dh-hub__list {
    list-style: none;
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    flex: 1;
}
.dh-hub__item {
    margin: 0;
    padding: 0;
}
.dh-hub__item[hidden] { display: none; }
.dh-hub .dh-hub__item-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1.4;
    justify-content: flex-start;
}
.dh-hub .dh-hub__item-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.dh-hub .dh-hub__item.is-active .dh-hub__item-btn,
.dh-hub .dh-hub__item.is-active .dh-hub__item-btn:hover,
.dh-hub .dh-hub__item.is-active .dh-hub__item-btn:focus {
    background: #346af1;
    color: #fff;
    font-weight: 700;
}
.dh-hub__empty {
    padding: 16px;
    color: #94a3b8;
    font-size: 0.78rem;
    text-align: center;
    font-style: italic;
}
.dh-hub__empty[hidden] { display: none; }

/* Categorias (accordion) */
.dh-hub__group {
    margin: 0 0 3px;
    padding: 0;
    list-style: none;
}
.dh-hub__group:last-of-type { margin-bottom: 0; }
.dh-hub__group[hidden] { display: none; }

.dh-hub .dh-hub__group-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border: 0;
    background: #f1f5f9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    transition: background 0.15s ease;
}
.dh-hub .dh-hub__group-btn:hover,
.dh-hub .dh-hub__group-btn:focus {
    background: #e2e8f0;
    color: #334155;
}

.dh-hub__group-chevron {
    display: inline-flex;
    flex-shrink: 0;
    color: #64748b;
    transition: transform 0.18s ease;
}
.dh-hub__group:not(.is-open) .dh-hub__group-chevron {
    transform: rotate(-90deg);
}

.dh-hub__group-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dh-hub__group-count {
    flex-shrink: 0;
    font-size: 0.64rem;
    font-weight: 700;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 1px 7px;
    letter-spacing: 0;
}

.dh-hub__group-items {
    list-style: none;
    margin: 3px 0 6px;
    padding: 0;
}
.dh-hub__group-items[hidden] { display: none; }
.dh-hub__group-items .dh-hub__item.is-active .dh-hub__item-btn {
    border-left-color: #346af1;
}

.dh-hub__content {
    background: var(--color-bg-primary, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    padding: 18px;
    min-width: 0;
}
.dh-hub__pane[hidden] { display: none; }
.dh-hub__pane.is-active { display: block; }

@media (max-width: 900px) {
    .dh-hub { grid-template-columns: 1fr; gap: 0; }

    .dh-hub__mobile-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 12px 14px;
        background: var(--color-bg-primary, #fff);
        border: 1px solid var(--color-border, #e2e8f0);
        border-radius: 10px;
        font-family: inherit;
        font-size: 0.82rem;
        font-weight: 700;
        color: #346af1;
        cursor: pointer;
        margin-bottom: 12px;
        text-align: left;
    }
    .dh-hub__mobile-icon { font-size: 1rem; }
    .dh-hub__mobile-label { font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.7rem; color: #64748b; }
    .dh-hub__mobile-current { flex: 1; color: #0f172a; font-weight: 700; }

    .dh-hub__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 100050;
    }
    .dh-hub__backdrop[hidden] { display: none; }

    body.dh-hub-lock { overflow: hidden; }

    .dh-hub__sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 86%;
        max-width: 320px;
        max-height: 100vh;
        z-index: 100100;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        border-radius: 0 14px 14px 0;
    }
    .dh-hub__sidebar.is-open {
        transform: translateX(0);
    }
    .dh-hub__sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: 0;
        background: transparent;
        font-size: 1.5rem;
        line-height: 1;
        color: #64748b;
        cursor: pointer;
        border-radius: 6px;
    }
    .dh-hub__sidebar-close:hover { color: #0f172a; background: #f1f5f9; }
}

@media (max-width: 480px) {
    .dh-hub__content { padding: 12px; border-radius: 10px; }
}
