/* ==========================================
   Hub Responsive — Media Queries Consolidados
   Extraido de hub-global.css (Etapa D)
   Tokens: var(--hub-*) como fonte da verdade
   ========================================== */

@media (min-width: 861px) {
    .hub-app[data-view="simulador"] .hub-sidebar .hub-sidebar-panel--motor {
        padding: 0;
        border: 0;
        background: transparent;
    }
}
@media (max-width: 1280px) {
    :root {
        --hub-sidebar-width: 252px;
        --hub-chart-height: 256px;
    }

    .hub-main {
        padding: var(--hub-space-m);
    }

    .hub-kpi-bar,
    .hub-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hub-summary-panel {
        grid-template-columns: 1fr;
    }

    .hub-analysis-filters {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hub-analysis-matrix-toggle {
        grid-column: 1 / -1;
    }
}
@media (max-width: 760px) {
    [data-confirm-modal] .hub-modal__panel,
    .hub-confirm-modal__panel {
        width: calc(100vw - 32px);
        max-width: 420px;
        max-height: calc(100vh - 48px);
    }

    [data-confirm-modal] .hub-modal__footer,
    .hub-confirm-modal__actions {
        grid-template-columns: 1fr;
        display: grid;
    }

    [data-confirm-modal] .hub-modal__footer .hub-button,
    .hub-confirm-modal__actions .hub-button {
        min-height: 44px;
    }

    .hub-analysis-filters {
        grid-template-columns: 1fr;
    }

    .hub-analysis-matrix-controls {
        grid-template-columns: 1fr;
    }

    .hub-matrix-modal__panel {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        margin: var(--hub-space-3);
        padding: var(--hub-space-s);
    }

    .hub-matrix-modal__head {
        align-items: start;
        padding-right: 0;
    }

    .hub-glossary-modal__panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .hub-strategy-apps-modal__panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .hub-strategy-apps-modal__head,
    .hub-strategy-apps-modal__body {
        padding: var(--hub-space-s);
    }

    .hub-glossary-modal__head,
    .hub-glossary-modal__body {
        padding: var(--hub-space-s);
    }

    .hub-glossary-modal__body {
        grid-template-columns: 1fr;
    }

    .hub-drawer {
        justify-items: stretch;
    }

    .hub-drawer__panel {
        width: 100vw;
        height: 100dvh;
        margin: 0;
        border-radius: 0;
    }

    .hub-drawer__head,
    .hub-drawer__body {
        padding: var(--hub-space-s);
    }

    .hub-drawer__footer {
        display: grid;
        grid-template-columns: 1fr;
        padding: var(--hub-space-s);
    }

    .hub-drawer__footer .hub-button {
        min-height: 44px;
    }

    .hub-unit-drawer__hero,
    .hub-unit-drawer__metrics,
    .hub-unit-drawer__section dl div {
        grid-template-columns: 1fr;
    }

    .hub-unit-drawer__hero img,
    .hub-unit-drawer__hero > div,
    .hub-unit-photo-zone {
        width: 100%;
    }

    .hub-unit-drawer__metrics--summary,
    .hub-unit-history-grid {
        grid-template-columns: 1fr;
    }

    .hub-unit-chart-wrap {
        height: 280px;
        min-height: 280px;
        max-height: 280px;
    }
}
@media (max-width: 860px) {
    body:has(.hub-app) {
        overflow: hidden;
    }

    .hub-app {
        flex-direction: column;
        overflow-y: hidden;
        overflow-x: hidden;
        height: 100dvh !important;
        -webkit-overflow-scrolling: touch;
    }

    .hub-rail {
        flex: 0 0 0;
        width: 0;
        min-width: 0;
        height: 0;
        min-height: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .hub-rail__brand {
        display: none;
    }

    .hub-rail .hub-system-menu {
        position: fixed;
        right: 12px;
        bottom: calc(82px + env(safe-area-inset-bottom));
        z-index: 100080;
        margin: 0;
    }

    .hub-rail .hub-system-menu__panel {
        right: 0;
        bottom: calc(100% + var(--hub-space-xs));
        left: auto;
    }

    .hub-context-toggle {
        display: none;
    }

    .hub-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 100050;
        flex: 0 0 auto;
        width: 100%;
        max-height: 58px;
        padding: 0;
        overflow: hidden;
        border-right: none;
        border-bottom: 1px solid var(--hub-border);
        border-radius: 0;
        background:
            linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.96)),
            var(--hub-surface);
        box-shadow: var(--hub-shadow-md);
    }

    .hub-app.is-mobile-controls-open .hub-sidebar {
        max-height: calc(100dvh - 84px);
        overflow-y: auto;
        padding-bottom: var(--hub-space-s);
    }

    .hub-brand {
        min-height: 58px;
        margin: 0;
        padding: var(--hub-space-3) 116px var(--hub-space-3) var(--hub-space-s) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.045) !important;
    }

    .hub-brand__row {
        gap: var(--hub-space-2);
    }

    .hub-brand__logo {
        height: 20px;
    }

    .hub-brand__domain {
        font-size: var(--hub-text-body-compact);
    }

    .hub-brand__version,
    .v6-kicker,
    .v6-title {
        display: none !important;
    }

    .hub-sidebar-divider {
        display: none;
    }

    .hub-sidebar .hub-sidebar-panel,
    .hub-sidebar__footer {
        display: none !important;
    }

    .hub-app.is-mobile-controls-open[data-view="analysis"] .hub-sidebar .hub-sidebar-panel--analysis,
    .hub-app.is-mobile-controls-open[data-view="unidades"] .hub-sidebar .hub-sidebar-panel--unidades,
    .hub-app.is-mobile-controls-open[data-view="reservas"] .hub-sidebar .hub-sidebar-panel--reservas,
    .hub-app.is-mobile-controls-open[data-view="simulador"] .hub-sidebar .hub-sidebar-panel--motor,
    .hub-app.is-mobile-controls-open .hub-sidebar__footer {
        display: grid !important;
        margin: var(--hub-space-s);
    }

    .hub-mobile-controls-toggle {
        position: fixed;
        top: 10px;
        right: 12px;
        z-index: 100080;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 84px;
        min-height: 38px;
        padding: 0 var(--hub-space-3);
        border: 1px solid rgba(203, 123, 55, 0.45);
        border-radius: 999px;
        background: rgba(24, 24, 24, 0.94);
        color: var(--hub-primary-hover);
        font-size: var(--hub-text-label);
        font-weight: var(--hub-weight-bold)
        letter-spacing: var(--hub-tracking-base);
        text-transform: var(--hub-case-eyebrow);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    }

    .hub-app.is-mobile-controls-open .hub-mobile-controls-toggle {
        background: var(--hub-primary);
        color: var(--hub-text-inverse);
        border-color: var(--hub-primary);
    }

    .hub-main {
        height: 100dvh;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding: calc(58px + var(--hub-space-s)) var(--hub-space-s) calc(88px + env(safe-area-inset-bottom)) var(--hub-space-s);
        -webkit-overflow-scrolling: touch;
    }

    .hub-tabs,
    .hub-rail .hub-tabs {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 100060;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: calc(68px + env(safe-area-inset-bottom));
        margin: 0;
        padding: var(--hub-space-2) var(--hub-space-2) calc(var(--hub-space-2) + env(safe-area-inset-bottom));
        border-top: 1px solid var(--hub-border);
        border-bottom: none;
        background:
            linear-gradient(180deg, rgba(24, 24, 24, 0.96), rgba(10, 10, 10, 0.98)),
            var(--hub-surface);
        box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.55);
    }

    .hub-tab,
    .hub-rail .hub-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--hub-space-1);
        min-width: 0;
        min-height: 52px;
        padding: var(--hub-space-1) 2px;
        border-radius: var(--hub-radius);
        color: var(--hub-text-muted);
        background: transparent !important; /* overrides any desktop hover */
    }

    .hub-tab.is-active,
    .hub-rail .hub-tab.is-active {
        color: var(--hub-primary);
    }

    .hub-tab::before,
    .hub-rail .hub-tab::before {
        display: none !important;
    }

    .hub-rail__icon {
        display: flex !important;
        width: 22px;
        height: 22px;
        align-items: center;
        justify-content: center;
    }

    .hub-rail__icon svg {
        width: 17px;
        height: 17px;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.2;
        stroke-linecap: round;
        stroke-linejoin: round;
        transform: translateY(6.5px);
    }



    .hub-rail__label {
        font-size: var(--hub-text-overline);
        line-height: 1;
        font-weight: var(--hub-weight-medium);
        letter-spacing: var(--hub-tracking-tight);
        text-transform: none;
    }

    .hub-notification-badge {
        top: 3px;
        right: 4px;
    }

    .hub-subtabs {
        margin-right: 0;
        margin-left: 0;
    }

    .hub-system-menu {
        right: 12px;
        bottom: calc(82px + env(safe-area-inset-bottom));
    }

    .hub-system-menu summary {
        width: 42px;
        min-width: 42px;
        height: 42px;
    }

    .hub-view-heading .hub-page-cta {
        width: 100%;
        min-width: 0;
    }

    .hub-view-heading__actions {
        display: grid;
        justify-content: stretch;
        gap: var(--hub-space-xs);
    }

    .hub-view-heading__actions [data-audit-count] {
        text-align: left;
    }

    .hub-analysis-heading {
        align-items: stretch;
    }

    .hub-home-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hub-home-hero__actions,
    .hub-home-actions {
        display: grid;
        justify-content: stretch;
    }

    .hub-home-metrics {
        grid-template-columns: 1fr;
    }

    .hub-view[data-view="unidades"],
    .hub-view[data-view="reservas"] {
        gap: var(--hub-space-s);
        grid-template-rows: auto auto;
    }

    .hub-view[data-view="unidades"] .hub-panel--audit,
    .hub-view[data-view="reservas"] .hub-panel--audit,
    .hub-view[data-view="unidades"] .hub-table-panel,
    .hub-view[data-view="reservas"] .hub-table-panel {
        border-radius: var(--hub-radius);
    }

    .hub-view[data-view="unidades"] .hub-panel--audit,
    .hub-view[data-view="reservas"] .hub-panel--audit,
    .hub-view[data-view="unidades"] .hub-table-panel,
    .hub-view[data-view="reservas"] .hub-table-panel {
        max-height: none;
        border-top: 1px solid var(--hub-border);
    }

    .hub-view {
        gap: var(--hub-space-s);
    }

    .hub-metrics-grid,
    .hub-kpi-bar,
    .hub-summary-panel,
    .hub-chart-grid,
    .hub-form-grid,
    .hub-strategy-grid,
    .hub-rx-grid,
    .hub-unit-cards {
        grid-template-columns: 1fr;
    }

    .hub-metric-card,
    .hub-metric,
    .hub-panel--audit,
    .hub-table-panel {
        padding: var(--hub-space-s);
    }

    .hub-button,
    .hub-form button,
    .hub-segmented button,
    .hub-unit-card,
    .hub-table button,
    .hub-drawer__close {
        min-height: 44px;
    }

    .hub-controls-panel.is-mobile-collapsed {
        max-height: 58px;
        overflow: hidden;
    }

    .hub-controls-panel.is-mobile-collapsed > :not(.hub-panel__head) {
        display: none;
    }

    .hub-controls-panel .hub-panel__head {
        cursor: pointer;
    }

    .hub-controls-panel.is-mobile-collapsed .hub-panel__head span::after {
        content: " - toque para abrir";
    }

    .hub-chart-wrap {
        height: var(--hub-chart-height);
        min-height: var(--hub-chart-height);
    }

    .hub-table-wrap,
    .hub-panel--audit,
    .hub-table-panel,
    .hub-table-wrap {
        max-height: calc(100dvh - 190px);
        overflow: auto;
    }

    .hub-table th {
        position: sticky;
        top: 0;
        z-index: 3;
        background: var(--hub-surface);
    }

    .hub-accordion__head,
    .hub-unit-drawer__accordion summary {
        min-height: 52px;
        padding: var(--hub-space-4) var(--hub-space-4);
    }

    .hub-unit-drawer__actions {
        grid-template-columns: 1fr;
    }

    .hub-unit-drawer__reservas,
    .hub-unit-drawer__strategies {
        overflow-x: auto;
    }
}
@media (max-width: 760px) {
    .hub-view.view-simulador .hub-kpi-bar {
        top: calc(58px + var(--hub-space-xs));
        padding: var(--hub-space-s);
    }

    .hub-kpi-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--hub-space-xs);
    }

    .hub-kpi-bar .hub-strategy-save-actions,
    .hub-kpi-bar .hub-parameter-toggle {
        grid-column: 1 / -1;
    }

    .hub-kpi-bar .hub-save-strategy-cta,
    .hub-kpi-bar #hub-save-as-strategy,
    .hub-kpi-bar .hub-parameter-toggle {
        min-height: 44px;
        height: 44px;
    }

    .hub-parameter-panel {
        position: fixed;
        top: auto;
        right: 0;
        bottom: calc(76px + env(safe-area-inset-bottom));
        left: 0;
        z-index: 100070;
        width: 100vw;
        max-height: 0;
        border-right: none;
        border-bottom: none;
        border-left: none;
        border-radius: var(--hub-radius) var(--hub-radius) 0 0;
        transform: translateY(100%);
    }

    .hub-parameter-panel.is-open {
        max-height: min(72dvh, 680px);
        margin-bottom: 0;
        padding: var(--hub-space-s);
        transform: translateY(0);
    }

    .hub-parameter-panel__head,
    .hub-strategy-inline {
        grid-template-columns: 1fr;
        display: grid;
    }

    .hub-parameter-grid {
        grid-template-columns: 1fr;
    }

    .hub-kpi-bar .hub-metric {
        min-height: 72px;
        padding: var(--hub-space-xs);
    }

    .hub-kpi-bar .hub-metric span {
        font-size: var(--hub-text-overline);
    }

    .hub-kpi-bar .hub-metric strong {
        font-size: var(--hub-text-heading-sm);
    }

    .hub-app[data-view="estrategia"] .hub-main,
    .hub-app[data-view="simulador"] .hub-main {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }
}
@media (max-width: 1100px) {
    .hub-view[data-view="analysis"] .hub-kpi-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hub-home-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hub-view.view-simulador .hub-kpi-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hub-strategy-save-actions {
        grid-column: 1 / -1;
    }
}
@media (max-width: 760px) {
    .hub-home-metrics,
    .hub-kpi-bar {
        grid-template-columns: 1fr;
    }

    .hub-drawer--unit .hub-drawer__panel {
        width: 100vw;
        max-height: 100dvh;
        min-height: 100dvh;
        height: 100dvh;
        margin: 0;
        border-radius: 0;
    }
}
@media (max-width: 1280px) {
    .hub-home-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .hub-sidebar .hub-grid-2-cols .hub-form-grid {
        grid-template-columns: 1fr;
    }

    .hub-drawer__form .hub-control-section .hub-form-grid {
        grid-template-columns: 1fr;
    }

    /* Ocultar filtros no topo (jÃ¡ que existe o botÃ£o FILTROS que abre a gaveta) */
    .hub-analysis-filters,
    .hub-strategy-library__filters,
    .hub-view-heading__actions .hub-field,
    .hub-view-heading__actions [data-audit-count] {
        display: none !important;
    }

    .hub-view-heading__actions,
    .hub-home-hero__actions {
        display: flex;
        flex-wrap: wrap;
        gap: var(--hub-space-s);
        width: 100%;
    }
    .hub-view-heading__actions > *,
    .hub-analysis-filters > *,
    .hub-home-hero__actions > *,
    .hub-strategy-library__filters > * {
        flex: 1 1 calc(50% - var(--hub-space-s));
        min-width: 120px;
    }

    .hub-home-metrics,
    .hub-kpi-bar {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: var(--hub-space-xs);
        width: 100%;
    }
    .hub-home-metrics::-webkit-scrollbar,
    .hub-kpi-bar::-webkit-scrollbar {
        display: none;
    }
    .hub-home-metrics > .hub-metric-card,
    .hub-kpi-bar > .hub-metric-card,
    .hub-home-metrics > .hub-metric,
    .hub-kpi-bar > .hub-metric {
        flex: 0 0 75vw;
        scroll-snap-align: center;
    }
}
@media (min-width: 861px) {
    .hub-sidebar .hub-sidebar-panel,
    .hub-drawer__form .hub-control-section {
        border-color: var(--hub-border);
        border-radius: var(--hub-radius);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 68%),
            var(--hub-surface-soft);
        box-shadow: none;
    }

    .hub-panel--audit,
    .hub-table-panel {
        border-color: var(--hub-border);
        border-radius: var(--hub-radius);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 68%),
            var(--hub-surface-raised);
        box-shadow: none;
    }

    .hub-metric-card,
    .hub-metric,
    .hub-unit-drawer__metrics article,
    .hub-unit-drawer__section {
        border-color: var(--hub-border);
        border-radius: var(--hub-radius);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 68%),
            var(--hub-surface-raised);
        box-shadow: none;
    }

    .hub-unit-chart-wrap {
        height: var(--hub-chart-height);
        min-height: var(--hub-chart-height);
    }

    .hub-view-heading__actions,
    .hub-analysis-filters,
    .hub-home-hero__actions,
    .hub-strategy-library__filters {
        min-height: 54px;
        align-items: end;
        gap: var(--hub-space-xs);
    }

    .hub-field input,
    .hub-field select,
    .hub-sidebar .hub-field input,
    .hub-sidebar .hub-field select,
    .hub-sidebar .hub-field textarea {
        min-height: var(--hub-control-height);
    }

    .hub-button,
    .hub-view-heading__actions .hub-button,
    .hub-analysis-filters .hub-button,
    .hub-home-hero__actions .hub-button,
    .hub-strategy-library__filters .hub-button,
    .hub-button,
    .hub-view-heading__actions .hub-button,
    .hub-analysis-filters .hub-button,
    .hub-home-hero__actions .hub-button,
    .hub-strategy-library__filters .hub-button {
        min-height: var(--hub-button-height);
        border-radius: var(--hub-radius);
        font-size: var(--hub-text-label);
        line-height: 1;
        font-weight: var(--hub-weight-bold)
    }

    .hub-home-date {
        min-height: auto;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--hub-text-muted);
        font-size: var(--hub-text-body);
    }

    .hub-view[data-view="unidades"],
    .hub-view[data-view="reservas"] {
        gap: var(--hub-space-s);
    }

    .hub-view[data-view="unidades"] .hub-panel--audit,
    .hub-view[data-view="reservas"] .hub-panel--audit,
    .hub-view[data-view="unidades"] .hub-table-panel,
    .hub-view[data-view="reservas"] .hub-table-panel {
        max-height: calc(100vh - (var(--hub-view-section-gap) * 2) - var(--hub-shell-header-height) - var(--hub-view-section-gap) - 2px);
        border-radius: var(--hub-radius);
    }

    .hub-table th,
    .hub-table--dense th {
        padding: 9.5px var(--hub-space-3);
        font-size: var(--hub-text-overline);
        line-height: var(--hub-leading-snug);
    }

    .hub-table td,
    .hub-table--dense td {
        padding: 9.5px var(--hub-space-3);
        font-size: var(--hub-text-body-compact);
        line-height: var(--hub-leading-snug);
    }

    .hub-table th,
    .hub-table--dense th,
    .hub-table th,
    .hub-table--dense th {
        background: var(--hub-surface-soft);
    }

    .hub-table td strong,
    .hub-table__primary-cell,
    .hub-table td strong {
        color: var(--hub-text);
        font-size: var(--hub-text-body-compact);
        font-weight: var(--hub-weight-bold);
    }

    .hub-table--sticky-first-col th:first-child,
    .hub-table--sticky-first-col td:first-child,
    .hub-panel--audit .hub-table th:first-child,
    .hub-panel--audit .hub-table td:first-child,
    .hub-panel--audit .hub-table th:first-child,
    .hub-panel--audit .hub-table td:first-child,
    .hub-table-panel .hub-table th:first-child,
    .hub-table-panel .hub-table td:first-child,
    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) .hub-matrix__unit {
        position: sticky;
        left: 0;
    }

    .hub-table--sticky-first-col th:first-child,
    .hub-panel--audit .hub-table th:first-child,
    .hub-table-panel .hub-table th:first-child,
    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) th.hub-matrix__unit {
        z-index: 4;
    }

    .hub-table--sticky-first-col td:first-child,
    .hub-panel--audit .hub-table td:first-child,
    .hub-table-panel .hub-table td:first-child,
    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) td.hub-matrix__unit {
        z-index: 3;
        background: var(--hub-surface-soft);
    }

    /* Intersecção de sticky top + sticky left para cabeçalho da primeira coluna */
    .hub-table--sticky-first-col th:first-child,
    .hub-panel--audit .hub-table th:first-child,
    .hub-table-panel .hub-table th:first-child,
    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) th.hub-matrix__unit {
        top: 0;
        z-index: 15;
        background: var(--hub-surface-soft) !important;
    }

    .hub-table tbody tr:hover td:first-child,
    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) tr:hover td.hub-matrix__unit {
        background: linear-gradient(var(--hub-surface-hover), var(--hub-surface-hover)), var(--hub-surface-soft) !important;
    }

    .hub-table-wrap:has(:is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active)) {
        border-color: var(--hub-border);
        border-radius: var(--hub-radius);
        background: var(--hub-surface);
    }

    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) {
        width: max-content;
        min-width: 100%;
        border-collapse: collapse;
        border-spacing: 0;
        font-size: var(--hub-text-body-compact);
        line-height: var(--hub-leading-snug);
    }

    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) th,
    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) td {
        height: 38px;
        padding: var(--hub-space-2) var(--hub-space-3);
        border-bottom: 1px solid var(--hub-border);
        color: var(--hub-text-muted);
        font-size: var(--hub-text-body-compact);
        line-height: var(--hub-leading-snug);
        font-weight: var(--hub-weight-medium);
        white-space: nowrap;
    }

    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) th {
        color: var(--hub-text-muted);
        font-size: var(--hub-text-overline);
        font-weight: var(--hub-weight-semibold);
        letter-spacing: var(--hub-tracking-wide);
        text-transform: var(--hub-case-eyebrow);
        background: var(--hub-surface-soft);
    }

    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) .hub-matrix__unit {
        width: var(--hub-matrix-unit-col-width);
        min-width: var(--hub-matrix-unit-col-width);
        max-width: var(--hub-matrix-unit-col-width);
        overflow: hidden;
        text-align: left;
        text-overflow: ellipsis;
    }

    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) td.hub-matrix__unit {
        color: var(--hub-text);
        font-weight: var(--hub-weight-bold)
    }

    :is(#hub-matrix-checkin, #hub-matrix-booking, #hub-matrix-active) :is(th, td):not(.hub-matrix__unit) {
        width: var(--hub-matrix-value-col-width);
        min-width: var(--hub-matrix-value-col-width);
        max-width: var(--hub-matrix-value-col-width);
        text-align: right;
    }

    .hub-matrix-cell {
        display: table-cell;
        min-height: 0;
        margin: 0;
        padding: var(--hub-space-2) var(--hub-space-3);
        border-radius: var(--hub-radius-sm);
        font-size: var(--hub-text-body-compact);
        line-height: var(--hub-leading-snug);
        font-weight: var(--hub-weight-medium);
        text-align: right;
        vertical-align: middle;
    }

    .hub-drawer--unit .hub-drawer__panel {
        width: min(1120px, calc(100vw - 64px));
        height: calc(100vh - 48px);
        min-height: calc(100vh - 48px);
        max-height: calc(100vh - 48px);
        border-radius: var(--hub-radius);
    }

    .hub-unit-drawer__hero h2 {
        font-size: var(--hub-text-title);
        line-height: var(--hub-leading-tight);
        font-weight: var(--hub-weight-semibold);
    }

    .hub-unit-drawer__metrics strong {
        color: var(--hub-text);
        font-size: var(--hub-text-heading);
        font-weight: var(--hub-weight-bold)
    }
}
@media (max-width: 860px) {
    /* List Views Nativas (Substitutas de Tabelas e Cards no Mobile) */
    .hub-mobile-list {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .hub-mobile-list-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--hub-space-4);
        background: transparent;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: var(--hub-text);
        cursor: pointer;
        transition: background var(--hub-transition-slow);
    }

    .hub-mobile-list-item:active {
        background: rgba(255, 255, 255, 0.03);
    }

    .hub-mobile-list-item.is-pending-review {
        background: rgba(203, 123, 55, 0.08);
        box-shadow: inset 3px 0 0 var(--hub-primary);
    }

    .hub-mobile-list-item:last-child {
        border-bottom: none;
    }

    .hub-mobile-list-item__main {
        display: flex;
        flex-direction: column;
        gap: var(--hub-space-1);
        flex: 1;
        min-width: 0;
    }

    .hub-mobile-list-item__title {
        font-size: var(--hub-text-heading-sm);
        font-weight: var(--hub-weight-semibold);
        color: var(--hub-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hub-mobile-list-item__subtitle {
        font-size: var(--hub-text-body);
        color: var(--hub-text-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hub-mobile-list-item__value {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: var(--hub-space-1);
        margin-left: var(--hub-space-3);
    }

    .hub-mobile-list-item__primary-value {
        font-size: var(--hub-text-heading-sm);
        font-weight: var(--hub-weight-bold)
        color: var(--hub-text);
    }

    .hub-mobile-list-item__chevron {
        color: var(--hub-text-muted);
        opacity: 0.5;
        margin-left: var(--hub-space-2);
        font-size: var(--hub-text-heading);
        line-height: 1;
    }

    /* CorreÃ§Ãµes da Sprint UX Mobile 05 */

    /* 1. Ocultar CabeÃ§alho de Tabela Fantasma */
    .hub-panel--audit .hub-table thead,
    .hub-table-panel .hub-table thead {
        display: none !important;
    }

    /* 2. Libertar Tabelas para nÃ£o espremerem a List View */
    .hub-panel--audit .hub-table,
    .hub-panel--audit .hub-table tbody,
    .hub-table-panel .hub-table,
    .hub-table-panel .hub-table tbody,
    .hub-mobile-list-item-wrapper,
    .hub-mobile-list-item-wrapper > td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
    }

    /* 3. Ajustar Grid de KPIs no Drawer para 2 colunas (sobrescrevendo o repeat(4) mal posicionado) */
    .hub-unit-drawer__metrics--summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--hub-space-s);
    }

    /* 4. Ajustar BotÃµes de AÃ§Ã£o do Drawer (2 colunas em vez de imprensados) */
    .hub-unit-drawer__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--hub-space-2);
    }

    .hub-unit-drawer__actions button {
        width: 100%;
        min-height: 44px;
        font-size: var(--hub-text-label);
    }

    /* 5. Ocultar KPI bar do Simulador no Mobile */
    .hub-view.view-simulador .hub-kpi-bar {
        display: none !important;
    }
}
@media (min-width: 900px) {
    .hub-home-dashboard__row--top {
        grid-template-columns: 2fr 1fr;
    }
}

/* =====================================================
   BARREIRA MOBILE — Hub exclusivo para desktop
   ===================================================== */
.hub-mobile-gate {
    display: none;
}

@media (max-width: 860px) {
    .hub-mobile-gate {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        inset: 0;
        z-index: var(--hub-z-tooltip);
        background: var(--hub-surface);
        padding: var(--hub-space-l);
    }

    .hub-mobile-gate__card {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--hub-space-s);
        max-width: 280px;
        text-align: center;
        color: var(--hub-text-muted);
    }

    .hub-mobile-gate__card h1 {
        margin: 0;
        font-size: var(--hub-text-heading-sm);
        font-weight: var(--hub-weight-semibold);
        color: var(--hub-text);
        line-height: var(--hub-leading-snug);
    }

    .hub-mobile-gate__card p {
        margin: 0;
        font-size: var(--hub-text-label);
        line-height: var(--hub-leading-loose);
    }
}
