/*
 * HUB STYLES
 * Stiluri pentru Rebut Hub - pagina centralizata pentru management rebut
 */

/* ==================== HUB LAYOUT ==================== */

/* Override body padding for HUB page */
body:has(.hub-layout) {
    padding: 0;
    background: linear-gradient(135deg, #e1b922 0%, #d12627 100%);
}

/* Main Layout Container */
.hub-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.hub-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #fff9e6 0%, #fff5d6 100%);
    border-right: 2px solid #e1b922;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(225, 185, 34, 0.3);
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Profile pill + support button on one row, vertically centered. */
.sidebar-header .header-widgets {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header .logo-wrapper {
    margin-bottom: 15px;
    transition: margin 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header .logo-wrapper h1 {
    font-size: 22px;
    overflow: hidden;
    white-space: nowrap;
    max-height: 30px;
    opacity: 1;
    transition: opacity 0.2s ease, max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header .logo-wrapper .logo-full {
    height: 100px;
    opacity: 1;
    max-height: 100px;
    transition: opacity 0.25s ease 0.1s, max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header .logo-wrapper .logo-icon {
    max-width: 40px;
    height: auto;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
    min-width: unset;
    border-radius: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Collapse Toggle Button */
.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(225, 185, 34, 0.3);
    cursor: pointer;
    color: #bbb;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-top: auto;
    flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
    background: rgba(225, 185, 34, 0.15);
    color: #d12627;
}

.sidebar-collapse-btn:hover .collapse-icon {
    animation: nudge-left 0.4s ease;
}

.hub-sidebar.collapsed .sidebar-collapse-btn:hover .collapse-icon {
    animation: nudge-right 0.4s ease;
}

.collapse-icon {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes nudge-left {
    0%, 100% { translate: 0; }
    50%      { translate: -3px; }
}

@keyframes nudge-right {
    0%, 100% { translate: 0; }
    50%      { translate: 3px; }
}

/* ==================== SIDEBAR COLLAPSED STATE ==================== */

.hub-sidebar.collapsed {
    width: 60px;
}

.hub-sidebar.collapsed .sidebar-header {
    padding: 12px 10px;
}

.hub-sidebar.collapsed .sidebar-header .logo-wrapper h1 {
    opacity: 0;
    max-height: 0;
    pointer-events: none;
}

.hub-sidebar.collapsed .user-welcome {
    opacity: 0;
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s ease, margin 0.3s ease;
}

.hub-sidebar.collapsed .sidebar-header .logo-wrapper .logo-full {
    opacity: 0;
    max-height: 0;
    pointer-events: none;
}

.hub-sidebar.collapsed .sidebar-header .logo-wrapper .logo-icon {
    opacity: 1;
    max-height: 60px;
    max-width: 100%;
}

.hub-sidebar.collapsed .sidebar-header .logo-wrapper {
    margin-bottom: 0;
    display: flex;
    justify-content: center;
}

.hub-sidebar.collapsed .hub-navigation {
    padding: 8px;
    gap: 6px;
}

.hub-sidebar.collapsed .hub-nav-btn {
    justify-content: center;
    padding: 10px 8px;
    position: relative;
}

.hub-sidebar.collapsed .hub-nav-btn-name {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-sidebar.collapsed .hub-nav-btn-desc {
    display: none;
}

.hub-sidebar.collapsed .hub-nav-btn-icon {
    margin-right: 0;
    font-size: 20px;
    transition: margin 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
}

.hub-sidebar.collapsed .hub-nav-btn:hover {
    transform: none;
}

/* Tooltip on hover when collapsed */
.hub-sidebar.collapsed .hub-nav-btn:hover::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1100;
    pointer-events: none;
    animation: tooltip-fade-in 0.2s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hub-sidebar.collapsed .hub-nav-btn:hover::before {
    content: '';
    position: absolute;
    left: calc(100% + 2px);
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #333;
    z-index: 1100;
    animation: tooltip-fade-in 0.2s ease forwards;
}

@keyframes tooltip-fade-in {
    from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.hub-sidebar.collapsed .collapse-icon {
    transform: rotate(180deg);
}

/* Main content adjusts when sidebar is collapsed */
.hub-layout.sidebar-collapsed .hub-main {
    margin-left: 60px;
}

/* Main Content Area */
.hub-main {
    flex: 1;
    margin-left: 280px;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1100;
    width: 45px;
    height: 45px;
    padding: 10px;
    background: #fff;
    border: 2px solid #e1b922;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: #fff9e6;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 3px;
    background: #d12627;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation - Active State */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ==================== RESPONSIVE SIDEBAR ==================== */

@media (max-width: 992px) {
    .hamburger-btn {
        display: flex;
    }

    .hub-sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
        border-right: none;
        border-left: 2px solid #e1b922;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    .hub-sidebar.active {
        transform: translateX(0);
    }

    .hub-main {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-collapse-btn {
        display: none;
    }

    /* Reset collapsed state on mobile */
    .hub-sidebar.collapsed {
        width: 280px;
    }

    .hub-layout.sidebar-collapsed .hub-main {
        margin-left: 0;
    }
}

/* ==================== END HUB LAYOUT ==================== */

/* User Welcome */
.user-welcome {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    max-height: 80px;
    opacity: 1;
    overflow: hidden;
    transition: opacity 0.25s ease 0.1s, max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.35s ease, margin 0.35s ease;
}

.user-welcome strong {
    color: #d12627;
}

/* Navigation Bar */
.hub-navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                gap 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-nav-loading {
    color: #666;
    font-style: italic;
    padding: 20px;
}

.hub-nav-empty {
    color: #666;
    padding: 20px;
    text-align: center;
    line-height: 1.8;
}

.hub-nav-empty a {
    color: #d12627;
    font-weight: 600;
    text-decoration: none;
}

.hub-nav-empty a:hover {
    text-decoration: underline;
}

/* Navigation Buttons */
.hub-nav-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #e1b922;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease, padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hub-nav-btn:hover {
    background: #e1b922;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(225, 185, 34, 0.3);
}

.hub-nav-btn:hover .hub-nav-btn-name {
    color: #222;
}

.hub-nav-btn.active {
    background: #d12627;
    border-color: #d12627;
}

.hub-nav-btn.active .hub-nav-btn-icon,
.hub-nav-btn.active .hub-nav-btn-name {
    color: #fff;
}

.hub-nav-btn-icon {
    font-size: 22px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: margin 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-nav-btn-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    width: auto;
    transition: opacity 0.25s ease 0.1s, width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-nav-btn-desc {
    display: none;
}

.hub-nav-btn.active .hub-nav-btn-desc {
    color: rgba(255, 255, 255, 0.8);
}

.hub-nav-btn:hover .hub-nav-btn-desc {
    color: #444;
}

/* Content Area — scrolls vertically now that views render inline (no iframe).
 * The 40px padding gives every view a consistent orange margin between the
 * sidebar and its inner card (matches the Permisiuni Hub look). */
.hub-content {
    flex: 1;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

/* Inside the hub, the standalone PVC `.container.*` cap (max 2000px,
 * centered) leaves dead space on wide screens. Stretch to fill .hub-content
 * but keep the yellow border / rounded card look — only the width cap
 * and centering are dropped. Cards inside use a CSS-grid layout that
 * wraps naturally when there isn't room for three across. */
.hub-content .container.extra-wide,
.hub-content .container.wide,
.hub-content .container {
    max-width: none;
    width: 100%;
    margin: 0;
}

.hub-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #999;
    font-size: 16px;
    background: #f9f9f9;
    padding: 20px;
}

.hub-placeholder p {
    text-align: center;
    max-width: 400px;
}

/* Content Loading */
.hub-content-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #666;
    background: #f9f9f9;
}

.hub-content-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #e1b922;
    border-radius: 50%;
    border-top-color: #d12627;
    animation: hub-spinner 0.8s linear infinite;
}

@keyframes hub-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Module Content Wrapper */
.hub-module-wrapper {
    padding: 20px;
}

/* Module Specific Overrides */
.hub-module-wrapper .logo-wrapper {
    display: none; /* Hide duplicate logo in embedded modules */
}

/* Iframe for module content */
.hub-iframe {
    width: 100%;
    height: 100%;
    flex: 1;
    border: none;
    border-radius: 0;
    display: block;
}

/* Embedded Dashboard Widget Tables
 * Pre-SPA the dashboard ran in an iframe so PVC's global `th` rule didn't
 * reach it. Now it cascades in: bg comes from .widget-table th (#f8f8f8)
 * but text color stays from the bare `th` (#fff) → white-on-light-grey.
 * Re-scope the dark grey explicitly inside .hub-content. */
.hub-content .widget-table th {
    background-color: #f8f8f8;
    color: #333;
}

/* Add Widget button — dashboard's default red hover clashes with the hub's
 * red gradient background. Keep border/text black; bold the label on hover. */
.hub-content .dashboard-add-widget-btn {
    border-color: #000;
    color: #000;
}

.hub-content .dashboard-add-widget-btn:hover {
    border-color: #000;
    color: #000;
    font-weight: 700;
}

/* Access Error in Hub */
.hub-no-access {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    padding: 20px;
}

.hub-no-access h3 {
    color: #d12627;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar-header .logo-wrapper h1 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hub-nav-btn {
        padding: 10px 12px;
    }

    .hub-nav-btn-icon {
        font-size: 20px;
    }

    .hub-nav-btn-name {
        font-size: 13px;
    }

    .hub-sidebar {
        width: 260px;
    }
}

/* ==================== HUB ADMIN PANEL ==================== */

/* Admin Badge */
.admin-badge {
    display: inline-block;
    background: #d12627;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 0;
    margin-top: 5px;
    vertical-align: middle;
}

/* Admin Button Style */
.hub-nav-btn-admin {
    border-color: #d12627;
    background: linear-gradient(135deg, #fff 0%, #ffe8e8 100%);
}

.hub-nav-btn-admin:hover {
    background: #d12627;
}

.hub-nav-btn-admin:hover .hub-nav-btn-name,
.hub-nav-btn-admin:hover .hub-nav-btn-desc {
    color: #fff;
}

/* Admin Panel Container */
.hub-admin-panel {
    padding: 30px;
    margin: 20px;
    background: #fff;
    border: 3px solid #e1b922;
    border-radius: 20px;
    flex: 1;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hub-admin-panel h2 {
    color: #333;
    margin-bottom: 8px;
    font-size: 22px;
}

.hub-admin-desc {
    color: #666;
    margin-bottom: 24px;
}

/* Admin Sections */
.hub-admin-section {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.hub-admin-section h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1b922;
}

/* Add User Form */
.hub-admin-add-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hub-admin-add-form .form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Scope Checkboxes */
.scope-label {
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.scope-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s;
}

.scope-checkbox:hover {
    border-color: #e1b922;
    background: #fff9e6;
}

.scope-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.scope-checkbox span {
    font-size: 13px;
    color: #333;
}

.scope-checkbox-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 8px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s;
}

.scope-checkbox-small:hover {
    border-color: #e1b922;
}

.scope-checkbox-small input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* Hub Users Search */
.hub-users-search {
    margin-bottom: 16px;
}

.hub-users-search input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1b922;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.hub-users-search input:focus {
    outline: none;
    border-color: #d12627;
    box-shadow: 0 0 0 3px rgba(209, 38, 39, 0.1);
}

.hub-users-search input::placeholder {
    color: #999;
}

/* Hub Users List */
.hub-users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.hub-user-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.2s;
}

.hub-user-item:hover {
    border-color: #e1b922;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hub-user-info {
    flex: 0 0 200px;
}

.hub-user-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.hub-user-email {
    color: #666;
    font-size: 12px;
    margin-top: 2px;
}

.hub-user-scopes {
    flex: 1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hub-user-actions {
    display: flex;
    gap: 8px;
}

.hub-user-actions .btn-icon {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.hub-user-actions .btn-save {
    background: #28a745;
    color: #fff;
}

.hub-user-actions .btn-save:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.hub-user-actions .btn-delete {
    background: #d12627;
    color: #fff;
}

.hub-user-actions .btn-delete:hover {
    background: #e1b922;
    color: #222;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 185, 34, 0.3);
}

/* Empty State */
.hub-users-list .empty-state {
    text-align: center;
    color: #999;
    padding: 30px;
    font-style: italic;
}

/* Responsive Admin Panel */
@media (max-width: 768px) {
    .hub-user-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hub-user-info {
        flex: none;
    }

    .hub-user-scopes {
        justify-content: flex-start;
    }

    .hub-user-actions {
        justify-content: flex-end;
    }

    .hub-admin-add-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .hub-admin-add-form .form-row .scope-label {
        margin-bottom: 8px;
        width: 100%;
    }

    .hub-admin-add-form .scope-checkbox {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        gap: 0;
        padding: 10px 12px;
    }

    .hub-admin-add-form .scope-checkbox input[type="checkbox"] {
        order: -1;
        flex-shrink: 0;
        margin-right: 10px;
        margin-left: 0;
    }

    .hub-admin-add-form .scope-checkbox span {
        order: 1;
        flex: 1;
        text-align: left;
    }
}

/* Hub Admin User Dropdown - Extended Height */
.hub-admin-panel .route-suggestions {
    max-height: 300px;
}

.hub-admin-panel .route-suggestion-item {
    padding: 12px 15px;
    font-size: 14px;
}

.hub-admin-panel .route-suggestion-item:hover {
    background-color: #fff9e6;
}

/* ==================== Collapsible nav groups (Rebut / Protocol) ==================== */
.hub-nav-group {
    display: flex;
    flex-direction: column;
}

.hub-nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 4px 4px 8px 2px;
    margin-top: 6px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(225, 185, 34, 0.3);
    cursor: pointer;
}

/* Match the "Rebut Hub" heading in the sidebar header */
.hub-nav-group-title {
    font-size: 22px;
    font-weight: 700;
    color: #d12627;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-nav-group-chevron {
    font-size: 14px;
    color: #d12627;
    flex-shrink: 0;
    transform: rotate(-90deg); /* collapsed: chevron points right */
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.hub-nav-group.expanded .hub-nav-group-chevron {
    transform: rotate(0); /* expanded: chevron points down */
}

.hub-nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
}

.hub-nav-group.expanded .hub-nav-group-items {
    max-height: 1200px;
    opacity: 1;
    margin-top: 8px;
}

/* Collapsed sidebar: hide the group chrome, keep the icon buttons visible */
.hub-sidebar.collapsed .hub-nav-group-title,
.hub-sidebar.collapsed .hub-nav-group-chevron {
    opacity: 0;
    width: 0;
}

.hub-sidebar.collapsed .hub-nav-group-header {
    border-bottom: none;
    padding: 0;
    margin: 0;
}

.hub-sidebar.collapsed .hub-nav-group-items {
    max-height: 1200px;
    opacity: 1;
    margin-top: 8px;
}

/* ==================== DASHBOARD VIEW (Rebut / Protocol switcher) ==================== */
.dash-view-root {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.dash-tabs {
    display: flex;
    gap: 12px;
    padding: 16px 20px 12px 20px;
    background: #fff;
    border-bottom: 1px solid rgba(225, 185, 34, 0.4);
    flex-shrink: 0;
}

.dash-tab {
    background: #fff5d6;
    color: #6b5d00;
    border: 2px solid #e1b922;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.dash-tab:hover {
    background: #ffe9a3;
}

.dash-tab:active {
    transform: translateY(1px);
}

.dash-tab.active {
    background: #d12627;
    color: #fff;
    border-color: #d12627;
}

.dash-tab.active:hover {
    background: #b81f20;
}

.dash-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

/* ==================== HUB ADMIN — scope group buttons ==================== */
.scope-group-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.scope-group-btn {
    background: #fff5d6;
    color: #6b5d00;
    border: 2px solid #e1b922;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.scope-group-btn:hover {
    background: #ffe9a3;
}

.scope-group-btn .scope-group-count {
    font-weight: 500;
    opacity: 0.85;
    margin-left: 4px;
}

/* Scope modal — checkbox stack */
#hub-scope-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#hub-scope-modal .scope-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    cursor: pointer;
}

#hub-scope-modal .scope-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
