/* Hybrid navigation placement: topbar first, primary nav directly below. */
.ui-header--hybrid {
    gap: 0;
    overflow: visible;
    border-radius: 0;
    background: var(--ui-bg) !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Hybrid workspace layout.
   The background behind the left secondary menu and the right content column
   must match the light chrome around the topbar and primary menu. Cards keep
   their own white surface through app.css/ux-extra.css. */
body.admin-ui main.ui-content--hybrid,
body.app-ui main.ui-content--hybrid,
body.admin-ui .hybrid-workspace,
body.app-ui .hybrid-workspace,
body.admin-ui .hybrid-sidebar,
body.app-ui .hybrid-sidebar,
body.admin-ui .hybrid-content,
body.app-ui .hybrid-content {
    background: var(--ui-bg) !important;
    background-color: var(--ui-bg) !important;
    background-image: none !important;
}

body.admin-ui .hybrid-sidebar__panel,
body.app-ui .hybrid-sidebar__panel {
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius) !important;
    padding: 0.85rem !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    box-shadow: none !important;
}

body.admin-ui .hybrid-sidebar__header,
body.app-ui .hybrid-sidebar__header {
    padding: 0.25rem 0.25rem 0.55rem !important;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--ui-border);
}

body.admin-ui .hybrid-content,
body.app-ui .hybrid-content {
    border: 0;
    border-radius: var(--ui-radius);
    padding: 1.15rem;
    box-shadow: none;
}

body.admin-ui .hybrid-content .page-header,
body.app-ui .hybrid-content .page-header {
    padding: 0;
}

.ui-topbar--hybrid {
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    background: #0f172a;
    color: #e5e7eb;
    box-shadow: none !important;
}

.ui-topbar--hybrid .ui-brand,
.ui-topbar--hybrid .ui-brand:hover {
    color: #ffffff;
}

.ui-topbar--hybrid .ui-brand__mark {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.ui-topbar--hybrid .ui-brand__subline,
.ui-topbar--hybrid .dropdown__meta {
    color: #94a3b8;
}

.ui-topbar--hybrid .locale-switcher .button,
.ui-topbar--hybrid .notification-indicator__trigger,
.ui-topbar--hybrid .dropdown__trigger {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.06);
    color: #e5e7eb;
}

.ui-topbar--hybrid .locale-switcher .button:hover,
.ui-topbar--hybrid .locale-switcher .button.is-active,
.ui-topbar--hybrid .notification-indicator__trigger:hover,
.ui-topbar--hybrid .dropdown__trigger:hover {
    border-color: rgba(191, 219, 254, 0.45);
    background: rgba(59, 130, 246, 0.18) !important;
    color: #ffffff;
}

.ui-topbar--hybrid .dropdown__label {
    color: #ffffff;
}

.ui-topbar--hybrid .account-avatar {
    background: rgba(59, 130, 246, 0.22);
    color: #ffffff;
}

.ui-topbar--hybrid .mobile-nav-toggle {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.06);
    color: #e5e7eb;
}

body.admin-ui .ui-topbar--hybrid,
body.app-ui .ui-topbar--hybrid {
    border-bottom-color: rgba(51, 65, 85, 0.92);
    background: linear-gradient(135deg, #020617 0%, #0f172a 46%, #111827 100%) !important;
    color: #e2e8f0;
    box-shadow: none !important;
}

body.admin-ui .ui-topbar--hybrid .ui-brand,
body.app-ui .ui-topbar--hybrid .ui-brand,
body.admin-ui .ui-topbar--hybrid .ui-brand:hover,
body.app-ui .ui-topbar--hybrid .ui-brand:hover,
body.admin-ui .ui-topbar--hybrid .dropdown__label,
body.app-ui .ui-topbar--hybrid .dropdown__label {
    color: #f8fafc;
}

body.admin-ui .ui-topbar--hybrid .ui-brand__mark,
body.app-ui .ui-topbar--hybrid .ui-brand__mark {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(37, 99, 235, 0.48)) !important;
    color: #eff6ff;
}

body.admin-ui .ui-topbar--hybrid .ui-brand__subline,
body.app-ui .ui-topbar--hybrid .ui-brand__subline,
body.admin-ui .ui-topbar--hybrid .dropdown__meta,
body.app-ui .ui-topbar--hybrid .dropdown__meta {
    color: #94a3b8;
}

body.admin-ui .ui-topbar--hybrid .locale-switcher .button,
body.app-ui .ui-topbar--hybrid .locale-switcher .button,
body.admin-ui .ui-topbar--hybrid .notification-indicator__trigger,
body.app-ui .ui-topbar--hybrid .notification-indicator__trigger,
body.admin-ui .ui-topbar--hybrid .dropdown__trigger,
body.app-ui .ui-topbar--hybrid .dropdown__trigger,
body.admin-ui .ui-topbar--hybrid .mobile-nav-toggle,
body.app-ui .ui-topbar--hybrid .mobile-nav-toggle {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.58) !important;
    color: #e2e8f0;
}

body.admin-ui .ui-topbar--hybrid .locale-switcher .button:hover,
body.app-ui .ui-topbar--hybrid .locale-switcher .button:hover,
body.admin-ui .ui-topbar--hybrid .locale-switcher .button.is-active,
body.app-ui .ui-topbar--hybrid .locale-switcher .button.is-active,
body.admin-ui .ui-topbar--hybrid .notification-indicator__trigger:hover,
body.app-ui .ui-topbar--hybrid .notification-indicator__trigger:hover,
body.admin-ui .ui-topbar--hybrid .dropdown__trigger:hover,
body.app-ui .ui-topbar--hybrid .dropdown__trigger:hover,
body.admin-ui .ui-topbar--hybrid .mobile-nav-toggle:hover,
body.app-ui .ui-topbar--hybrid .mobile-nav-toggle:hover {
    border-color: rgba(125, 211, 252, 0.42);
    background: rgba(37, 99, 235, 0.22) !important;
    color: #ffffff;
}

body.admin-ui .ui-topbar--hybrid .account-avatar,
body.app-ui .ui-topbar--hybrid .account-avatar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.72), rgba(14, 165, 233, 0.62));
    color: #eff6ff;
}

.ui-primary-nav--hybrid {
    width: 100%;
    min-width: 0;
    margin-top: -1px;
    border-top: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.ui-topbar__actions--hybrid {
    justify-content: flex-end;
    min-width: max-content;
}

@media (max-width: 1180px) {
    .ui-topbar--hybrid {
        grid-template-columns: auto auto;
        align-items: center;
    }

    .ui-primary-nav--hybrid {
        order: initial;
        width: 100%;
    }

    .ui-topbar__actions--hybrid {
        justify-content: flex-end;
        overflow-x: visible;
    }
}

@media (max-width: 720px) {
    .ui-topbar--hybrid {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .ui-topbar__actions--hybrid {
        justify-content: flex-start;
        overflow-x: auto;
    }
}
