.hub-brand {
    min-height: 132px;
    display: grid;
    align-content: start;
    gap: 0;
    padding: var(--hub-space-6) var(--hub-space-6) var(--hub-space-5) !important; /* FSE — neutraliza padding do tema */
    margin: calc(var(--hub-space-s) * -1) calc(var(--hub-space-s) * -1) 0;
    border-bottom: 1px solid var(--hub-white-alpha-5) !important; /* FSE — neutraliza borda do tema */
    color: var(--hub-text);
    font-family: var(--hub-font);
    text-align: left !important; /* FSE — neutraliza text-align do tema */
}

.hub-brand__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hub-brand__row {
    display: flex;
    align-items: center;
    gap: var(--hub-space-3);
    margin-bottom: var(--hub-space-4);
}

.hub-brand__logo {
    width: auto;
    height: 22px;
    object-fit: contain;
    display: block;
    transition: transform var(--hub-transition-base), filter var(--hub-transition-base);
}

.hub-brand__link:hover .hub-brand__logo {
    filter: drop-shadow(0 0 10px rgba(var(--hub-primary-rgb), 0.34));
    transform: translateY(-1px);
}

.hub-brand__domain {
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body);
    line-height: 1;
    font-weight: var(--hub-weight-light);
    letter-spacing: var(--hub-tracking-snug);
    opacity: 0.9;
}

/* Badge de versão na rail de navegação */
.hub-rail__version {
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-bold);
    color: var(--hub-rail-text-ghost);
    letter-spacing: var(--hub-tracking-base);
    font-family: var(--hub-font);
    margin-top: 3px;
    margin-bottom: 0;
    z-index: var(--hub-z-raised);
    text-align: center;
    width: 100%;
}

.hub-brand__version {
    margin-left: auto;
    padding: 3px var(--hub-space-2);
    border: 1px solid var(--hub-border-translucent);
    border-radius: 999px;
    background: var(--hub-surface-elevated-hover);
    color: var(--hub-text-muted);
    font-size: var(--hub-text-overline);
    line-height: 1;
    font-weight: var(--hub-weight-bold);
    letter-spacing: var(--hub-tracking-snug);
}

.hub-brand__link:hover .hub-brand__domain {
    color: var(--hub-text);
}

.v6-kicker {
    display: block;
    margin-bottom: var(--hub-space-2);
    color: var(--hub-primary);
    font-size: var(--hub-text-overline);
    line-height: 1.2;
    font-weight: var(--hub-weight-bold);
    letter-spacing: var(--hub-tracking-ultra);
    text-transform: var(--hub-case-eyebrow);
    opacity: 0.8;
}

.v6-title {
    margin: var(--hub-space-1) 0 0 0;
    color: var(--hub-text);
    font-size: var(--hub-text-title);
    line-height: 1.05;
    font-weight: var(--hub-weight-light);
    letter-spacing: var(--hub-tracking-tight);
}

.v6-title b {
    font-weight: var(--hub-weight-semibold);
}

.hub-subtabs {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
}

.hub-app[data-view="estrategia"] .hub-context-tabs--sim,
.hub-app[data-view="simulador"] .hub-context-tabs--sim {
    display: grid;
}


.hub-analysis-filters {
    display: flex;
    gap: var(--hub-space-xs);
    align-items: flex-end;
}

.hub-analysis-matrix-toggle {
    white-space: nowrap;
}


.hub-sidebar .hub-sidebar-panel {
    display: none;
}


.hub-sidebar .hub-form-grid,
.hub-sidebar .hub-form-grid--compact {
    grid-template-columns: 1fr;
}

.hub-sidebar .hub-grid-2-cols .hub-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-app[data-view="analysis"] .hub-sidebar .hub-sidebar-panel--analysis,
.hub-app[data-view="unidades"] .hub-sidebar .hub-sidebar-panel--unidades,
.hub-app[data-view="reservas"] .hub-sidebar .hub-sidebar-panel--reservas {
    display: grid;
}

.hub-app[data-view="simulador"] .hub-sidebar .hub-sidebar-panel--motor {
    display: grid;
}

.hub-tab,
.hub-subtab {
    position: relative;
    min-height: 42px;
    padding: 0 var(--hub-space-xs);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-white-alpha-2);
    color: var(--hub-text-muted);
    font: inherit;
    font-size: var(--hub-text-label);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: var(--hub-tracking-tight);
    text-align: center;
    text-transform: var(--hub-case-eyebrow);
    cursor: pointer;
    transition: background var(--hub-transition-slow), border-color var(--hub-transition-slow), color var(--hub-transition-slow), transform var(--hub-transition-slow);
}

.hub-tab span,
.hub-subtab span {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-tab:hover,
.hub-tab.is-active,
.hub-subtab:hover,
.hub-subtab.is-active {
    background: rgba(var(--hub-primary-rgb), 0.1);
    border-color: rgba(var(--hub-primary-rgb), 0.5);
    color: var(--hub-primary-hover);
    box-shadow: none;
}

.hub-rail .hub-tab.is-active {
    border-color: transparent;
    background: rgba(var(--hub-primary-rgb), 0.12);
    color: var(--hub-primary-hover);
}

.hub-tab--inline {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    min-height: auto;
    padding: var(--hub-space-1) var(--hub-space-3);
    font-size: var(--hub-text-label);
    font-weight: var(--hub-weight-medium);
    text-transform: none;
    letter-spacing: var(--hub-tracking-normal);
    color: var(--hub-text-muted);
    cursor: pointer;
    transition: color var(--hub-transition-slow), border-color var(--hub-transition-slow);
}

.hub-tab--inline:hover {
    background: transparent;
    border-color: transparent;
    color: var(--hub-text);
}

.hub-tab--inline.is-active {
    background: transparent;
    border-bottom-color: var(--hub-primary);
    color: var(--hub-primary);
}

.hub-rail .hub-tab.is-active::before {
    background: var(--hub-primary);
}

.hub-rail .hub-tab:hover,
.hub-rail .hub-tab.is-active,
.hub-system-menu--rail .hub-tab:hover,
.hub-system-menu--rail .hub-tab.is-active,
.hub-rail-system-tab:hover,
.hub-rail-system-tab.is-active {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.hub-app[data-view="home"] .hub-tab.is-active {
    background: rgba(var(--hub-primary-rgb), 0.1);
    border-color: rgba(var(--hub-primary-rgb), 0.5);
    color: var(--hub-primary-hover);
    box-shadow: none;
}

.hub-app[data-view="analysis"] .hub-tab.is-active {
    background: rgba(var(--hub-success-rgb), 0.1);
    border-color: rgba(var(--hub-success-rgb), 0.5);
    color: var(--hub-success);
    box-shadow: none;
}

.hub-app[data-view="unidades"] .hub-tab.is-active {
    background: rgba(var(--hub-warning-rgb), 0.12);
    border-color: rgba(var(--hub-warning-rgb), 0.56);
    color: var(--hub-warning);
    box-shadow: none;
}

.hub-app[data-view="reservas"] .hub-tab.is-active {
    background: rgba(var(--hub-info-rgb), 0.1);
    border-color: rgba(var(--hub-info-rgb), 0.5);
    color: var(--hub-info);
    box-shadow: none;
}



/* --- Unit Drawer: Abas de Navegação --- */
.hub-unit-tabs {
    padding: var(--hub-space-xs) var(--hub-space-s);
    border-bottom: 1px solid var(--hub-border);
    background: var(--hub-surface);
    flex-shrink: 0;
}
.hub-unit-tabs .hub-seg {
    width: 100%;
}
.hub-unit-tabs .hub-seg .hub-seg__tab {
    flex: 1;
}

/* --- Segment Control — toggle de visualização e modo --- */
.hub-seg {
    display: inline-flex;
    align-items: center;
    background: var(--hub-surface-soft);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    padding: 3px;
    gap: 2px;
    flex-shrink: 0;
}
.hub-seg__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--hub-space-1);
    padding: 4px 12px;
    min-height: 28px;
    border: none;
    border-radius: calc(var(--hub-radius) - 2px);
    background: transparent;
    color: var(--hub-text-muted);
    font: inherit;
    font-size: var(--hub-text-label);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: var(--hub-tracking-snug);
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--hub-transition-base), color var(--hub-transition-base);
}
.hub-seg__tab:hover:not(.is-active) {
    color: var(--hub-text);
    background: var(--hub-white-alpha-3);
}
.hub-seg__tab.is-active {
    background: var(--hub-surface-raised);
    color: var(--hub-text);
}
.hub-seg__tab--icon {
    padding: 4px 8px;
}
.hub-seg__tab--unread {
    color: var(--hub-primary) !important;
    border: 1px solid rgba(var(--hub-primary-rgb), 0.35) !important;
}
.hub-seg__tab--unread.is-active {
    background: var(--hub-primary) !important;
    color: var(--hub-text-on-primary) !important;
    border-color: var(--hub-primary) !important;
}

.hub-sidebar__footer {
    margin-top: 0;
    display: grid;
    gap: var(--hub-space-xs);
}

.hub-system-menu {
    position: fixed;
    right: var(--hub-space-m);
    bottom: var(--hub-space-m);
    z-index: var(--hub-z-overlay);
}

.hub-system-menu summary {
    display: grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--hub-highlight-context-border);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(var(--hub-primary-rgb), 0.16), var(--hub-white-alpha-2)),
        var(--hub-bg);
    color: var(--hub-primary-hover);
    font-size: var(--hub-text-heading);
    font-weight: var(--hub-weight-bold);
    letter-spacing: var(--hub-tracking-tight);
    text-transform: none;
    cursor: pointer;
    list-style: none;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.52);
}

.hub-system-menu summary::-webkit-details-marker {
    display: none;
}

.hub-system-menu__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + var(--hub-space-xs));
    display: grid;
    min-width: 190px;
    gap: var(--hub-space-xs);
    padding: var(--hub-space-xs);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-overlay-panel-strong);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.68);
}

.hub-system-menu:not([open]) .hub-system-menu__panel {
    display: none;
}

.hub-mobile-controls-toggle {
    display: none;
}

.hub-actions-panel {
    display: none;
}

.hub-status {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 var(--hub-space-s);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-white-alpha-2);
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body-compact);
}

.hub-status[data-tone="error"] {
    border-color: rgba(var(--hub-danger-rgb), 0.7);
    color: var(--hub-text-on-danger);
}

.hub-status[data-tone="success"] {
    border-color: rgba(var(--hub-success-rgb), 0.7);
    color: var(--hub-text-on-success);
}

.hub-notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border: 1px solid var(--hub-border-strong);
    border-radius: 999px;
    background: var(--hub-danger);
    color: var(--hub-text);
    font-size: var(--hub-text-micro);
    line-height: 1;
    font-weight: var(--hub-weight-bold);
    box-shadow: 0 0 0 4px rgba(var(--hub-danger-rgb), 0.12);
}

.hub-notification-badge[hidden],
.hub-reservation-alert[hidden] {
    display: none !important; /* FSE — [hidden] tem baixa especificidade; tema pode sobrepor */
}

.hub-reservation-alert {
    display: grid;
    gap: 3px;
    padding: var(--hub-space-xs) var(--hub-space-s);
    border: 1px solid rgba(var(--hub-danger-rgb), 0.48);
    border-left: 3px solid var(--hub-danger);
    border-radius: var(--hub-radius);
    background: rgba(var(--hub-danger-rgb), 0.12);
    color: var(--hub-text-on-danger);
    cursor: pointer;
}

.hub-reservation-alert strong {
    color: var(--hub-text);
    font-size: var(--hub-text-overline);
    line-height: 1.2;
    font-weight: var(--hub-weight-bold);
    letter-spacing: var(--hub-tracking-widest);
    text-transform: var(--hub-case-eyebrow);
}

.hub-reservation-alert span {
    color: var(--hub-text-on-danger);
    font-size: var(--hub-text-label);
    line-height: 1.35;
}

.hub-home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: var(--hub-space-m);
    align-items: start;
}

.hub-home-actions {
    display: grid;
}

.hub-home-events {
    display: grid;
    gap: var(--hub-space-2);
    min-height: 44px;
}

.hub-home-event {
    display: grid;
    gap: var(--hub-space-1);
    width: 100%;
    padding: var(--hub-space-3) var(--hub-space-3);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-white-alpha-2);
    color: var(--hub-text);
    text-align: left;
    cursor: pointer;
}

.hub-home-event:hover {
    border-color: rgba(222, 183, 118, 0.38);
    background: rgba(222, 183, 118, 0.08);
}

.hub-home-event__type {
    width: max-content;
    padding: 3px var(--hub-space-2);
    border-radius: 999px;
    background: rgba(222, 183, 118, 0.12);
    color: var(--hub-warning);
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-bold);
    line-height: 1;
    text-transform: var(--hub-case-eyebrow);
    letter-spacing: var(--hub-tracking-snug);
}

.hub-home-event strong {
    overflow: hidden;
    color: var(--hub-text);
    font-size: var(--hub-text-body);
    font-weight: var(--hub-weight-bold);
    line-height: var(--hub-leading-snug);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-home-event small,
.hub-home-empty {
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body-compact);
    line-height: 1.35;
}

.hub-home-empty {
    margin: 0;
}

.hub-home-list {
    display: grid;
    gap: var(--hub-space-xs);
    margin: 0;
}

.hub-home-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hub-space-s);
    padding: var(--hub-space-3) 0;
    border-bottom: 1px solid var(--hub-border);
}

.hub-home-list div:last-child {
    border-bottom: 0;
}

.hub-home-list dt {
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body-compact);
}

.hub-home-list dd {
    margin: 0;
    color: var(--hub-text);
    font-size: var(--hub-text-heading);
    font-weight: var(--hub-weight-semibold);
}


.hub-sim-panel {
    display: none;
    gap: var(--hub-space-m);
    position: relative;
}

.hub-sim-panel.is-active {
    display: grid;
}

.hub-metrics-grid,
.hub-summary-panel,
.hub-chart-grid {
    display: grid;
    gap: var(--hub-space-m);
}

/* KPI strip — wrapper canônico (Análise, Mercado, Simulador) */
.hub-kpi-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hub-space-s);
    padding: var(--hub-space-3) var(--hub-space-s);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 64%),
        var(--hub-surface);
    margin-bottom: 0;
    animation: hub-fade-in 0.35s ease-out both;
}

.hub-view[data-view="analysis"] .hub-kpi-bar {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.hub-view[data-view="market"] .hub-kpi-bar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hub-view[data-view="analysis"] {
    height: calc(100vh - (var(--hub-view-section-gap) * 2));
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
}

.hub-kpi-bar .hub-metric {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1px;
    min-height: 0;
    padding: 0;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: hub-fade-in 0.3s ease-out both;
}

.hub-kpi-bar .hub-metric:nth-child(1) { animation-delay: 0.03s; }
.hub-kpi-bar .hub-metric:nth-child(2) { animation-delay: 0.06s; }
.hub-kpi-bar .hub-metric:nth-child(3) { animation-delay: 0.09s; }
.hub-kpi-bar .hub-metric:nth-child(4) { animation-delay: 0.12s; }
.hub-kpi-bar .hub-metric:nth-child(5) { animation-delay: 0.15s; }
.hub-kpi-bar .hub-metric:nth-child(6) { animation-delay: 0.18s; }
.hub-kpi-bar .hub-metric:nth-child(7) { animation-delay: 0.21s; }

.hub-kpi-bar .hub-metric span {
    font-size: var(--hub-text-overline);
    color: var(--hub-text-muted);
    font-weight: var(--hub-weight-medium);
    text-transform: var(--hub-case-eyebrow);
    letter-spacing: var(--hub-tracking-snug);
    line-height: 1.2;
}

.hub-kpi-bar .hub-metric strong {
    font-size: var(--hub-text-heading);
    line-height: 1.08;
}

.hub-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hub-summary-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.hub-summary-panel--single {
    grid-template-columns: minmax(0, 1fr);
}

.hub-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-chart-grid > .hub-panel:nth-child(1) { animation-delay: 0.05s; }
.hub-chart-grid > .hub-panel:nth-child(2) { animation-delay: 0.1s; }
.hub-chart-grid > .hub-panel:nth-child(3) { animation-delay: 0.15s; }
.hub-chart-grid > .hub-panel:nth-child(4) { animation-delay: 0.2s; }

.hub-view[data-view="analysis"] .hub-chart-grid {
    height: 100%;
    min-height: 0;
    align-content: stretch;
}

.hub-view[data-view="analysis"] .hub-chart-grid > .hub-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.hub-view[data-view="analysis"] .hub-chart-wrap {
    flex: 1 1 auto;
    height: auto;
    min-height: var(--hub-chart-height);
}

.hub-chart-grid--primary {
    align-items: stretch;
}

.hub-panel--wide {
    grid-column: 1 / -1;
}

.hub-analysis-matrix-panel[hidden] {
    display: none !important; /* FSE — [hidden] tem baixa especificidade; tema pode sobrepor */
}

.hub-analysis-matrix-panel {
    grid-column: 1 / -1;
}

.hub-analysis-matrix-panel .hub-panel__head {
    align-items: end;
    gap: var(--hub-space-s);
}

.hub-analysis-matrix-controls {
    display: grid;
    grid-template-columns: minmax(220px, 280px) auto;
    gap: var(--hub-space-xs);
    align-items: end;
}

.hub-analysis-matrix-controls label {
    grid-column: 1 / -1;
    color: var(--hub-text-muted);
    font-size: var(--hub-text-label);
    font-weight: var(--hub-weight-medium);
}

.hub-analysis-matrix-controls select {
    min-height: var(--hub-control-height);
}

.hub-analysis-matrix-controls .hub-button {
    white-space: nowrap;
}

.hub-chart-wrap {
    height: var(--hub-chart-height);
    min-height: var(--hub-chart-height);
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    padding: var(--hub-space-s);
}

.hub-chart-wrap--large {
    height: 340px;
    min-height: 340px;
}

.hub-accordion-stack {
    display: grid;
    gap: var(--hub-space-s);
}

.hub-accordion {
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background:
        linear-gradient(180deg, var(--hub-white-alpha-2), transparent),
        var(--hub-surface-soft);
    overflow: hidden;
}

.hub-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hub-space-s);
    min-height: 52px;
    padding: 0 var(--hub-space-m);
    color: var(--hub-text);
    cursor: pointer;
    list-style: none;
}

.hub-accordion summary::-webkit-details-marker {
    display: none;
}

.hub-accordion summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--hub-border);
    border-radius: 999px;
    color: var(--hub-primary);
    font-size: var(--hub-text-heading-sm);
    line-height: 1;
}

.hub-accordion[open] summary {
    border-bottom: 1px solid var(--hub-border);
}

.hub-accordion[open] summary::after {
    content: "-";
}

.hub-accordion--rx {
    border-color: rgba(var(--hub-info-rgb), 0.38);
    background:
        linear-gradient(180deg, rgba(var(--hub-info-rgb), 0.1), transparent 46%),
        var(--hub-surface-raised);
}

.hub-accordion--rx summary::after {
    color: var(--hub-text-on-info);
}

.hub-rx-inline-form {
    padding: var(--hub-space-m) var(--hub-space-m) 0;
}

.hub-accordion summary span {
    color: var(--hub-text);
    font-size: var(--hub-text-body);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: var(--hub-tracking-widest);
    text-transform: var(--hub-case-eyebrow);
}

.hub-accordion summary small {
    margin-left: auto;
    color: var(--hub-text-muted);
    font-size: var(--hub-text-label);
    font-weight: var(--hub-weight-medium);
    text-align: right;
}

.hub-accordion > .hub-summary-panel,
.hub-accordion > .hub-chart-grid,
.hub-accordion > .hub-panel {
    padding: var(--hub-space-m);
}

.hub-accordion > .hub-summary-panel {
    margin: 0;
}

.hub-summary-side {
    display: grid;
    gap: var(--hub-space-m);
    min-height: 100%;
}

.hub-summary-side--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
}

.hub-summary-panel > .hub-metric-card,
.hub-summary-panel > .hub-metric,
.hub-summary-panel > .hub-summary-side {
    min-height: 264px;
}


.hub-empty-state {
    grid-column: 1 / -1;
    display: grid;
    align-items: center;
    justify-items: start;
    gap: var(--hub-space-s);
    min-height: 180px;
    padding: var(--hub-space-m);
    border: 1px dashed var(--hub-border-strong);
    border-radius: var(--hub-radius);
    background:
        linear-gradient(135deg, rgba(var(--hub-primary-rgb), 0.08), rgba(var(--hub-info-rgb), 0.035)),
        rgba(255, 255, 255, 0.018);
    color: var(--hub-text);
}

.hub-empty-state[hidden] {
    display: none !important; /* FSE — [hidden] tem baixa especificidade; tema pode sobrepor */
}

.hub-empty-state__eyebrow {
    display: block;
    margin-bottom: var(--hub-space-2);
    color: var(--hub-primary-hover);
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-bold);
    letter-spacing: var(--hub-tracking-ultra);
    text-transform: var(--hub-case-eyebrow);
}

.hub-empty-state h3 {
    margin: 0;
    color: var(--hub-text);
    font-size: var(--hub-text-heading);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: var(--hub-tracking-tight);
}

.hub-empty-state p {
    max-width: 620px;
    margin: var(--hub-space-2) 0 0;
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body);
    line-height: 1.55;
}

.hub-empty-state .hub-button {
    min-width: 150px;
}

.hub-empty-state__secondary {
    border-color: var(--hub-white-alpha-12);
    color: var(--hub-text-muted);
}

.hub-empty-state--compact {
    min-height: 0;
    padding: var(--hub-space-s);
    gap: var(--hub-space-xs);
}

.hub-empty-state--compact h3 {
    font-size: var(--hub-text-heading-sm);
}

.hub-empty-state--compact p {
    font-size: var(--hub-text-body-compact);
}

.hub-empty-state--filter {
    background:
        linear-gradient(135deg, rgba(var(--hub-info-rgb), 0.08), rgba(255, 255, 255, 0.018)),
        rgba(255, 255, 255, 0.014);
}

.hub-empty-state--onboarding {
    border-color: rgba(var(--hub-primary-rgb), 0.28);
}

.hub-table .hub-empty-state {
    margin: var(--hub-space-s) 0;
    text-align: left;
}

.hub-table-empty-cell {
    padding: var(--hub-cell-padding-y) var(--hub-cell-padding-x);
}

.hub-inline-error {
    color: var(--hub-danger);
    font-size: var(--hub-text-body);
    font-weight: var(--hub-weight-semibold);
    display: none;
}

/* --- Painel informativo em formulários (Nova Unidade, Marketing) --- */
.hub-info-panel {
    margin-bottom: var(--hub-space-s);
    padding: var(--hub-space-s);
    border: 1px solid var(--hub-border-strong);
    border-radius: var(--hub-radius);
    background: var(--hub-surface);
}
.hub-info-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hub-info-panel__head h4 {
    margin: 0;
    font-size: var(--hub-text-heading-sm);
    font-weight: var(--hub-weight-semibold, 600);
    color: var(--hub-text);
}
.hub-info-panel p {
    margin: var(--hub-space-2) 0 0;
    font-size: var(--hub-text-body, 13px);
    font-weight: var(--hub-weight-light, 300);
    color: var(--hub-text-muted);
}

.hub-inline-error[hidden] {
    display: none !important; /* FSE — [hidden] tem baixa especificidade; tema pode sobrepor */
}

.hub-parameter-panel {
    position: sticky;
    top: calc(var(--hub-shell-header-height) + var(--hub-space-xs));
    z-index: 130;
    max-height: 0;
    margin: 0;
    padding: 0 var(--hub-space-m);
    border: 1px solid transparent;
    border-radius: var(--hub-radius);
    background:
        linear-gradient(180deg, rgba(var(--hub-primary-rgb), 0.07), transparent),
        var(--hub-surface-raised);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.72);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: max-height var(--hub-transition-slow), opacity var(--hub-transition-slow), transform var(--hub-transition-slow), padding var(--hub-transition-slow), border-color var(--hub-transition-slow);
}

.hub-parameter-panel.is-open {
    max-height: clamp(280px, 34vh, 380px);
    margin-bottom: var(--hub-space-m);
    padding: var(--hub-space-m);
    border-color: var(--hub-border);
    opacity: 1;
    overflow-y: auto;
    pointer-events: auto;
    transform: translateY(0);
}

.hub-parameter-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--hub-space-s);
    padding-bottom: var(--hub-space-s);
    border-bottom: 1px solid var(--hub-border);
}

.hub-parameter-panel__head h2,
.hub-parameter-panel__head p {
    margin: 0;
}

.hub-parameter-panel__head h2 {
    color: var(--hub-text);
    font-size: var(--hub-text-heading-sm);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: var(--hub-tracking-widest);
    text-transform: var(--hub-case-eyebrow);
}

.hub-parameter-panel__head p {
    margin-top: var(--hub-space-1);
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body-compact);
}

.hub-parameter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(132px, 1fr));
    gap: var(--hub-space-xs);
}

.hub-rule-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hub-space-xs);
}

.hub-rule-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 var(--hub-space-3);
    border: 1px solid var(--hub-highlight-context-border);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(var(--hub-primary-rgb), 0.24), rgba(var(--hub-primary-rgb), 0.1));
    color: var(--hub-primary);
    font-size: var(--hub-text-label);
    font-weight: var(--hub-weight-bold);
}

.hub-rule-chips span:nth-child(2n) {
    border-color: rgba(var(--hub-info-rgb), 0.45);
    background: linear-gradient(180deg, rgba(var(--hub-info-rgb), 0.26), rgba(var(--hub-info-rgb), 0.1));
    color: var(--hub-text-on-info);
}

.hub-rule-chips span:nth-child(3n) {
    border-color: rgba(var(--hub-danger-rgb), 0.45);
    background: linear-gradient(180deg, rgba(var(--hub-danger-rgb), 0.24), rgba(var(--hub-danger-rgb), 0.1));
    color: var(--hub-text-on-danger);
}

.hub-strategy-inline {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--hub-space-s);
    align-items: start;
}

.hub-panel__head {
    margin-bottom: var(--hub-space-s);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--hub-space-s);
}

.hub-panel__head h2,
.hub-summary-title,
.hub-control-section h3,
.hub-rx-card__head strong {
    margin: 0;
    color: var(--hub-text);
    font-size: var(--hub-text-overline);
    line-height: 1.2;
    font-weight: var(--hub-weight-semibold);
    letter-spacing: var(--hub-tracking-ultra);
    text-transform: var(--hub-case-eyebrow);
}

.hub-panel__head span {
    color: var(--hub-text-muted);
    font-size: var(--hub-text-label);
    text-align: right;
}

.hub-panel__head .hub-semantic-tag {
    font-size: var(--hub-text-label);
}

.hub-summary-title {
    padding-bottom: var(--hub-space-xs);
    margin-bottom: var(--hub-space-s);
    border-bottom: 1px solid var(--hub-border);
}

.hub-control-section {
    display: grid;
    gap: var(--hub-space-xs);
    padding-top: var(--hub-space-3);
    border-top: 1px solid var(--hub-border);
}

.hub-hidden-select {
    display: none !important; /* utilitário de ocultação — !important garante funcionamento em qualquer contexto */
}

.hub-hidden {
    display: none !important; /* utilitário de ocultação — !important garante funcionamento em qualquer contexto */
}

.hub-chip-select-wrapper {
    position: relative;
    width: 100%;
}

.hub-chip-container {
    width: 100%;
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--hub-space-2);
    padding: var(--hub-space-2) var(--hub-space-3);
    border: 1px solid var(--hub-border-strong);
    border-radius: var(--hub-radius);
    background: var(--hub-input-bg);
    cursor: text;
    transition: border-color var(--hub-transition-base), box-shadow var(--hub-transition-base);
}

.hub-chip-container:focus-within {
    border-color: var(--hub-primary);
    box-shadow: var(--hub-shadow-focus);
}

.hub-chip-search {
    flex: 1 1 130px;
    width: auto !important;        /* FSE — neutraliza width: 100% injetado pelo tema em inputs */
    min-width: 100px;
    min-height: 26px !important;   /* FSE — neutraliza min-height do tema */
    padding: 0 !important;         /* FSE — neutraliza padding do tema em inputs */
    border: 0 !important;          /* FSE — neutraliza border do tema em inputs */
    background: transparent !important; /* FSE — neutraliza background do tema em inputs */
    box-shadow: none !important;   /* FSE — neutraliza box-shadow do tema em inputs */
    color: var(--hub-text);
    outline: none;
}

.hub-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--hub-space-2);
    min-height: 24px;
    padding: 0 var(--hub-space-2);
    border: 1px solid rgba(var(--hub-primary-rgb), 0.24);
    border-radius: 999px;
    background: rgba(var(--hub-primary-rgb), 0.14);
    color: var(--hub-primary-hover);
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-bold);
    letter-spacing: var(--hub-tracking-wide);
    text-transform: var(--hub-case-eyebrow);
}

.hub-chip button {
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--hub-border-translucent);
    color: var(--hub-text);
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.hub-chip button:hover {
    background: rgba(var(--hub-danger-rgb), 0.28);
    color: var(--hub-text);
}

.hub-chip-dropdown {
    position: absolute;
    z-index: var(--hub-z-overlay);
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    padding: var(--hub-space-2);
    border: 1px solid var(--hub-border-strong);
    border-radius: var(--hub-radius);
    background:
        linear-gradient(180deg, var(--hub-border-subtle), transparent 60%),
        var(--hub-input-bg);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.64);
}

.hub-chip-option {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--hub-space-3);
    border: 0;
    border-radius: var(--hub-radius);
    background: transparent;
    color: var(--hub-text-muted);
    cursor: pointer;
    font: inherit;
    font-size: var(--hub-text-body-compact);
    text-align: left;
}

.hub-chip-option:hover,
.hub-chip-option.is-selected {
    background: rgba(var(--hub-primary-rgb), 0.14);
    color: var(--hub-text);
}

.hub-chip-option.is-selected::after {
    content: "Selecionado";
    color: var(--hub-primary-hover);
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-bold);
    letter-spacing: var(--hub-tracking-widest);
    text-transform: var(--hub-case-eyebrow);
}

.hub-range-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hub-range-field label span {
    color: var(--hub-primary);
    font-weight: var(--hub-weight-semibold);
}

/* ==========================================================================
   PADRÃO DE HOVER DE TABELAS OPERACIONAIS (Hub Design System)
   Aplica cursor pointer e tonalidade âmbar suave para todas as linhas clicáveis.
   ========================================================================== */
.hub-view[data-view="reservas"] .hub-table tbody tr.is-pending-review td,
.hub-view[data-view="reservas"] .hub-table tbody tr.is-pending-review td {
    background: rgba(var(--hub-primary-rgb), 0.08);
    border-bottom-color: rgba(var(--hub-primary-rgb), 0.22);
}

.hub-view[data-view="reservas"] .hub-table tbody tr.is-pending-review td:first-child {
    background: linear-gradient(rgba(var(--hub-primary-rgb), 0.08), rgba(var(--hub-primary-rgb), 0.08)), var(--hub-surface-soft);
    box-shadow: inset 3px 0 0 var(--hub-primary);
}

.hub-view[data-view="reservas"] .hub-table tbody tr.is-pending-review:hover td {
    background: rgba(var(--hub-primary-rgb), 0.12);
}

.hub-view[data-view="reservas"] .hub-table tbody tr.is-pending-review:hover td:first-child {
    background: linear-gradient(rgba(var(--hub-primary-rgb), 0.12), rgba(var(--hub-primary-rgb), 0.12)), var(--hub-surface-soft);
}




.hub-glossary-modal__panel {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(920px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-modal-bg);
    box-shadow: var(--hub-modal-shadow);
    animation: hubDrawerIn var(--hub-transition-slow)-out;
}


.hub-glossary-modal__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: var(--hub-space-s);
    padding: var(--hub-modal-head-padding);
    border-bottom: 1px solid var(--hub-border);
}

.hub-glossary-modal__head span,
.hub-glossary-modal__section h3 {
    color: var(--hub-primary);
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-semibold);
    letter-spacing: var(--hub-tracking-ultra);
    text-transform: var(--hub-case-eyebrow);
}

.hub-glossary-modal__head h2 {
    margin: var(--hub-space-2) 0;
    color: var(--hub-text);
    font-size: var(--hub-text-title);
    line-height: var(--hub-leading-tight);
    font-weight: var(--hub-weight-medium);
}

.hub-glossary-modal__head p {
    margin: 0;
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body);
    line-height: var(--hub-leading-normal);
    font-weight: var(--hub-weight-light);
}

.hub-glossary-modal__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--hub-space-s);
    padding: var(--hub-space-m);
    overflow: auto;
}

.hub-glossary-modal__section {
    min-width: 0;
    padding: var(--hub-space-s);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-white-alpha-2);
}

.hub-glossary-modal__section h3 {
    margin: 0 0 var(--hub-space-xs);
}

.hub-glossary-modal__section dl {
    display: grid;
    gap: var(--hub-space-3);
    margin: 0;
}

.hub-glossary-modal__section dt {
    color: var(--hub-text);
    font-size: var(--hub-text-body);
    line-height: var(--hub-leading-snug);
    font-weight: var(--hub-weight-medium);
}

.hub-glossary-modal__section dd {
    margin: var(--hub-space-1) 0 0;
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body-compact);
    line-height: var(--hub-leading-normal);
    font-weight: var(--hub-weight-light);
}

[data-confirm-modal] .hub-modal__panel,
.hub-confirm-modal__panel {
    position: relative;
    width: min(var(--hub-modal-width-sm), calc(100vw - 48px));
    max-height: calc(100vh - 96px);
    height: auto;
    margin: 0;
    padding: 0;
    overflow: auto;
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-modal-bg);
    box-shadow: var(--hub-modal-shadow);
    animation: hubDrawerIn var(--hub-transition-slow);
}

.hub-matrix-modal__panel {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: var(--hub-space-m);
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    margin: var(--hub-space-s);
    padding: var(--hub-space-m);
    overflow: hidden;
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-modal-bg);
    box-shadow: var(--hub-modal-shadow);
}

.hub-matrix-modal__head {
    position: relative;
}

.hub-analysis-matrix-modal__filters {
    width: min(100%, 1180px);
    grid-template-columns: 150px minmax(220px, 1.2fr) 160px 170px 220px;
}

.hub-matrix-modal .hub-table-wrap {
    min-height: 0;
    height: 100%;
    max-height: none !important; /* override intencional — anula max-height da regra genérica .hub-table-wrap */
    overflow: auto;
}

.hub-matrix-modal__panel .hub-modal__body {
    min-height: 0;
    height: 100%;
    padding: 0;
}

[data-confirm-modal] .hub-modal__head h3,
.hub-confirm-modal__panel h3 {
    margin: 0 0 var(--hub-space-xs);
    color: var(--hub-text);
    font-size: var(--hub-text-heading);
    line-height: var(--hub-leading-snug);
    font-weight: var(--hub-weight-semibold);
}

[data-confirm-modal] .hub-modal__body {
    padding: var(--hub-modal-body-padding);
}

[data-confirm-modal] .hub-modal__body p,
.hub-confirm-modal__panel p {
    margin: 0;
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body);
    line-height: var(--hub-leading-normal);
    font-weight: var(--hub-weight-light);
}

[data-confirm-modal] .hub-modal__footer,
.hub-confirm-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--hub-space-xs);
    border-top: 1px solid var(--hub-border);
}

@keyframes hubDrawerIn {
    from {
        opacity: 0;
        transform: translateX(18px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}






/* =========================================================
   SPRINT 2: HOME OPERACIONAL MÃ NIMA
   ========================================================= */

.hub-home-shortcuts {
    display: flex;
    gap: var(--hub-space-2);
    flex-wrap: wrap;
    margin-bottom: 0;
}

.hub-home-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--hub-view-section-gap, var(--hub-space-s));
}

.hub-home-dashboard__row {
    display: grid;
    gap: var(--hub-view-section-gap, var(--hub-space-s));
    grid-template-columns: 1fr;
}


/* --- SPRINT 6: VISÃO ATIVA --- */
[hidden] {
    display: none !important; /* FSE — garante que [hidden] funcione mesmo com display genérico do tema */
}

.hub-tabs {
    display: flex;
    gap: var(--hub-space-2);
    border-bottom: 1px solid var(--hub-border);
    padding-bottom: 0;
    margin-top: var(--hub-space-2);
}



.hub-strategy-active-view {
    display: flex;
    flex-direction: column;
    gap: var(--hub-space-8);
    padding-top: var(--hub-space-4);
}

.hub-active-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--hub-space-4);
}

/* --- Toast de Feedback (hub-feedback) --- */
.hub-feedback {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: var(--hub-space-xs) var(--hub-space-s);
    border-radius: var(--hub-radius);
    z-index: var(--hub-z-overlay);
    box-shadow: var(--hub-shadow-sm);
    font-family: var(--hub-font);
    font-size: var(--hub-text-body);
    color: var(--hub-text-inverse);
    animation: hubFeedbackIn 3s ease-in-out forwards;
}
.hub-feedback-success { background: var(--hub-success); }
.hub-feedback-error   { background: var(--hub-danger); }

@keyframes hubFeedbackIn {
    0%   { opacity: 0; transform: translateY(20px); }
    10%  { opacity: 1; transform: translateY(0); }
    90%  { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* --- Status Dots de Sincronização (hub-sync-dot) --- */
.hub-sync-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: var(--hub-space-2);
    flex-shrink: 0;
}
.hub-sync-dot--inactive  { background: var(--hub-danger); }
.hub-sync-dot--pending   { background: var(--hub-text-muted); }
.hub-sync-dot--out-of-sync { background: var(--hub-warning); }
.hub-sync-dot--synced    { background: var(--hub-success); }

/* --- Help Overlay (?) --- */
.hub-help-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--hub-z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
}
.hub-help-overlay[hidden] { display: none; }

.hub-help-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: var(--hub-overlay-bg);
}

.hub-help-overlay__panel {
    position: relative;
    width: min(520px, calc(100vw - 48px));
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    background: var(--hub-surface);
    box-shadow: var(--hub-shadow-md);
    animation: hubModalIn var(--hub-transition-slow)-out;
}

.hub-help-overlay__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--hub-modal-head-padding);
    border-bottom: 1px solid var(--hub-border);
}

.hub-help-overlay__head h2 {
    margin: 0;
    font-size: var(--hub-text-heading-sm);
    font-weight: var(--hub-weight-semibold);
    color: var(--hub-text);
}

.hub-help-overlay__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--hub-radius-sm);
    background: transparent;
    color: var(--hub-text-muted);
    font-size: var(--hub-text-heading);
    cursor: pointer;
    line-height: 1;
}
.hub-help-overlay__close:hover { background: var(--hub-surface-hover); color: var(--hub-text); }
.hub-help-overlay__close:focus-visible { outline: none; box-shadow: var(--hub-shadow-focus); }

.hub-help-overlay__body {
    padding: var(--hub-space-s) var(--hub-space-m);
    display: flex;
    flex-direction: column;
    gap: var(--hub-space-s);
}

.hub-help-section__title {
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-semibold);
    color: var(--hub-text-muted);
    text-transform: var(--hub-case-eyebrow);
    letter-spacing: var(--hub-tracking-wide);
    margin: 0 0 var(--hub-space-2);
}

.hub-help-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-help-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--hub-space-2) 0;
    border-bottom: 1px solid var(--hub-border-subtle);
    gap: var(--hub-space-s);
}
.hub-help-row:last-child { border-bottom: none; }

.hub-help-row__desc {
    font-size: var(--hub-text-body);
    color: var(--hub-text-muted);
}

.hub-help-keys {
    display: flex;
    align-items: center;
    gap: var(--hub-space-1);
    flex-shrink: 0;
}

.hub-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 var(--hub-space-2);
    border: 1px solid var(--hub-border-strong);
    border-bottom-width: 2px;
    border-radius: var(--hub-radius-sm);
    background: var(--hub-surface-raised);
    color: var(--hub-text);
    font-family: var(--hub-font);
    font-size: var(--hub-text-label);
    font-weight: var(--hub-weight-medium);
    line-height: 1;
}

/* ── Bell / Notification panel ── */
.hub-bell-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Sino no topo da rail */
.hub-bell-wrapper--top {
    padding: var(--hub-space-xs) 0 var(--hub-space-1);
}

.hub-rail-bell-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 32px;
    min-height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--hub-text-muted);
    opacity: 0.45;
    transition: color var(--hub-transition-fast), opacity var(--hub-transition-fast);
}
.hub-rail-bell-button:hover {
    opacity: 0.75;
}

/* Com notificação ativa — destaque total */
.hub-rail-bell-button.has-unread {
    color: var(--hub-primary);
    opacity: 1;
}
.hub-rail-bell-button.has-unread .hub-rail-bell-button__icon {
    background: rgba(203, 123, 55, 0.14);
    border-radius: 9px;
}
.hub-rail-bell-button.has-unread:hover {
    opacity: 0.85;
}

.hub-rail-bell-button__icon {
    position: relative;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: var(--hub-radius);
    background: transparent;
    transition: background var(--hub-transition-fast);
}
.hub-rail-bell-button:hover .hub-rail-bell-button__icon {
    background: rgba(255, 255, 255, 0.07);
}
.hub-rail-bell-button svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hub-rail-bell-button .hub-notification-badge {
    position: absolute;
    top: 2px;
    right: 4px;
}

.hub-notifications-panel {
    position: fixed;
    top: 8px;
    left: 60px;
    width: 340px;
    max-height: 480px;
    background: var(--hub-surface-raised);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: var(--hub-z-overlay);
    transition: var(--hub-transition-premium);
}

.hub-notifications-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--hub-space-s) var(--hub-space-m);
    border-bottom: 1px solid var(--hub-border);
    flex-shrink: 0;
}
.hub-notifications-panel__title {
    font-size: var(--hub-text-label);
    font-weight: var(--hub-weight-semibold);
    color: var(--hub-text);
}

.hub-notifications-list {
    list-style: none;
    margin: 0;
    padding: var(--hub-space-2) 0;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--hub-white-alpha-15) transparent;
}
.hub-notifications-list::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.hub-notifications-list::-webkit-scrollbar-track {
    background: transparent;
}
.hub-notifications-list::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: var(--hub-white-alpha-15);
}
.hub-notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--hub-white-alpha-24);
}

.hub-notifications-empty {
    padding: var(--hub-space-m);
    text-align: center;
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body-compact);
}

.hub-notifications-item {
    display: flex;
    align-items: flex-start;
    gap: var(--hub-space-s);
    padding: var(--hub-space-s) var(--hub-space-m);
    cursor: pointer;
    transition: background var(--hub-transition-fast);
}
.hub-notifications-item:hover {
    background: var(--hub-surface-hover);
}
.hub-notifications-item--unread {
    background: rgba(var(--hub-primary-rgb), 0.035);
    box-shadow: inset 3px 0 0 0 var(--hub-primary);
}
.hub-notifications-item--unread:hover {
    background: rgba(var(--hub-primary-rgb), 0.06);
}

.hub-notifications-item__icon {
    width: 24px;
    height: 24px;
    border-radius: var(--hub-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hub-surface-soft);
    color: var(--hub-text-muted);
    border: 1px solid var(--hub-border);
    flex-shrink: 0;
}
.hub-notifications-item__icon svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hub-notifications-item__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}
.hub-notifications-item__title {
    font-size: var(--hub-text-body-compact);
    font-weight: var(--hub-weight-medium);
    color: var(--hub-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: var(--hub-leading-snug);
}
.hub-notifications-item__desc {
    font-size: var(--hub-text-label);
    color: var(--hub-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: var(--hub-leading-snug);
}
.hub-notifications-item__footer {
    display: flex;
    align-items: center;
    gap: var(--hub-space-2);
}
.hub-notifications-item__time {
    font-size: var(--hub-text-micro);
    color: var(--hub-text-muted);
}

.hub-notifications-show-all {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--hub-primary);
    font-family: inherit;
    font-size: var(--hub-text-label);
    font-weight: var(--hub-weight-bold);
    text-transform: var(--hub-case-eyebrow);
    letter-spacing: var(--hub-tracking-snug);
    transition: color var(--hub-transition-fast);
}
.hub-notifications-show-all:hover {
    color: var(--hub-text);
    text-decoration: none;
}

/* Tokens de tipo */
.hub-notif-token {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 var(--hub-space-2);
    border-radius: var(--hub-radius-sm);
    font-size: 10px;
    font-weight: var(--hub-weight-semibold);
    letter-spacing: .02em;
    white-space: nowrap;
    flex-shrink: 0;
}
.hub-notif-token--new_reservation          { background: rgba( 59,130,246,.15); color: #60a5fa; }
.hub-notif-token--reservation_cancelled    { background: rgba(239, 68, 68,.15); color: #f87171; }
.hub-notif-token--reservation_altered      { background: rgba(245,158, 11,.15); color: #fbbf24; }
.hub-notif-token--limpeza_refused          { background: rgba(239, 68, 68,.15); color: #f87171; }
.hub-notif-token--limpeza_confirmada       { background: rgba( 16,185,129,.15); color: #34d399; }
.hub-notif-token--dupla_escala             { background: rgba(245,158, 11,.15); color: #fbbf24; }
.hub-notif-token--ical_conflict            { background: rgba(139, 92,246,.15); color: #a78bfa; }
.hub-notif-token--ical_new                 { background: rgba( 16,185,129,.15); color: #34d399; }
.hub-notif-token--email_inbound            { background: rgba( 99,102,241,.15); color: #818cf8; }
.hub-notif-token--checkout_sem_limpeza     { background: rgba(245,158, 11,.15); color: #fbbf24; }
.hub-notif-token--estrategia_expirando     { background: rgba(245,158, 11,.15); color: #fbbf24; }
.hub-notif-token--limpeza_pendente_vencida { background: rgba(239, 68, 68,.15); color: #f87171; }
.hub-notif-token--reserva_sem_unidade      { background: rgba(156,163,175,.15); color: #9ca3af; }
.hub-notif-token--default                  { background: rgba(156,163,175,.15); color: #9ca3af; }

/* ── View Notificações ────────────────────────────────────────── */
.hub-view[data-view="notificacoes"] {
    max-height: 100%;
    grid-template-rows: auto auto minmax(0, 1fr);
}
.hub-notif-view-toolbar {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}
.hub-notif-view-toolbar .hub-seg {
    display: flex;
    width: 100%;
}
.hub-notif-view-toolbar .hub-seg__tab {
    flex: 1;
}
.hub-notif-chip-divider {
    width: 1px;
    height: 16px;
    background: var(--hub-border);
    margin: 0 var(--hub-space-xs);
    align-self: center;
    flex-shrink: 0;
}
.hub-notif-view-day-row td {
    background: transparent !important;
    border: none !important;
    padding-top: var(--hub-space-m) !important;
    padding-bottom: var(--hub-space-xs) !important;
    pointer-events: none;
}
.hub-notif-view-day-label {
    font-size: var(--hub-text-overline);
    font-weight: var(--hub-weight-semibold);
    color: var(--hub-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--hub-tracking-widest);
    padding-left: var(--hub-space-xs);
}
.hub-notif-view-row {
    cursor: pointer;
}
.hub-notif-view-row.is-unread td {
    background: rgba(var(--hub-primary-rgb), 0.035) !important;
}
.hub-notif-view-row.is-unread:hover td {
    background: rgba(var(--hub-primary-rgb), 0.06) !important;
}
.hub-notif-view-row.is-unread td:first-child {
    box-shadow: inset 3px 0 0 0 var(--hub-primary);
}
.hub-notif-view-row__icon-cell {
    text-align: center;
    vertical-align: middle !important;
    width: 48px;
    padding-left: var(--hub-space-s) !important;
}
.hub-notif-view-row__icon {
    width: 28px;
    height: 28px;
    border-radius: var(--hub-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hub-surface-soft);
    color: var(--hub-text-muted);
    border: 1px solid var(--hub-border);
}
.hub-notif-view-row__icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hub-notif-view-row__body-cell {
    vertical-align: middle !important;
}
.hub-notif-view-row__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hub-notif-view-row__title {
    font-size: var(--hub-text-body-compact);
    font-weight: var(--hub-weight-medium);
    color: var(--hub-text);
    line-height: var(--hub-leading-snug);
}
.hub-notif-view-row__desc {
    font-size: var(--hub-text-label);
    color: var(--hub-text-muted);
    line-height: var(--hub-leading-snug);
}
.hub-notif-view-row__time-cell {
    text-align: right;
    vertical-align: middle !important;
    width: 120px;
    padding-right: var(--hub-space-s) !important;
}
.hub-notif-view-row__time-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--hub-space-xs);
}
.hub-notif-view-row__time {
    font-size: var(--hub-text-overline);
    color: var(--hub-text-muted);
}
.hub-notif-view-row__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hub-primary);
    display: inline-block;
    flex-shrink: 0;
}
.hub-notif-view-empty,
.hub-notif-view-loading {
    padding: var(--hub-space-l) !important;
    text-align: center;
    color: var(--hub-text-muted);
    font-size: var(--hub-text-body-compact);
}
.hub-view[data-view="notificacoes"] .hub-table-footer {
    justify-content: center;
    gap: var(--hub-space-s);
}
.hub-notifications-footer {
    list-style: none;
    border-top: 1px solid var(--hub-border);
    margin-top: 4px;
    padding-top: 6px;
    text-align: center;
}

/* ── User avatar / menu ── */
/* .hub-user-* removido — identidade e alterar senha movidos para Configurações (aba Geral) */

.hub-field-feedback--success { color: var(--hub-success); }
.hub-field-feedback--error   { color: var(--hub-danger); }

/* --- Active states micro-scale --- */
.hub-seg__tab:active,
.hub-settings-tab:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}


