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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .beto-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(--space-s);
    }

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

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

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

    .beto-unit-drawer__hero img,
    .beto-unit-drawer__hero > div {
        width: 100%;
    }

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

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

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

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

    .beto-rail__brand {
        display: none;
    }

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

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

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

    .beto-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: 0 12px 32px rgba(0, 0, 0, 0.42);
    }

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

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

    .beto-brand__row {
        gap: 8px;
    }

    .beto-brand__logo {
        height: 20px;
    }

    .beto-brand__domain {
        font-size: var(--hub-text-table);
    }

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

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

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

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

    .beto-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 12px;
        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: 0.6px;
        text-transform: uppercase;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    }

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

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

    .beto-tabs,
    .beto-rail .beto-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: 8px 8px calc(8px + 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);
        backdrop-filter: blur(14px);
    }

    .beto-tab,
    .beto-rail .beto-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        min-height: 52px;
        padding: 4px 2px;
        border-radius: 8px;
        color: #888;
        background: transparent !important; /* overrides any desktop hover */
    }

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

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

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

    .beto-rail__icon svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }

    .beto-rail__label {
        font-size: var(--hub-text-eyebrow);
        line-height: 1;
        font-weight: var(--hub-weight-medium);
        letter-spacing: 0;
        text-transform: none;
    }

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

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

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

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

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

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

    .beto-view-heading__actions [data-audit-count] {
        text-align: left;
    }

    .beto-analysis-heading {
        align-items: stretch;
    }

    .beto-home-hero,
    .beto-home-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .beto-accordion__head,
    .beto-unit-drawer__accordion summary {
        min-height: 52px;
        padding: 14px 16px;
    }

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

    .beto-unit-drawer__reservas,
    .beto-unit-drawer__strategies {
        overflow-x: auto;
    }
}
@media (max-width: 760px) {
    .beto-sticky-summary {
        position: sticky;
        top: calc(58px + var(--space-xs));
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        z-index: 90;
        border: 1px solid var(--hub-border);
        border-radius: var(--hub-radius);
        padding: var(--space-s);
    }

    .beto-sticky-summary.beto-sticky-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-xs);
    }

    .beto-sticky-summary.beto-sticky-metrics .beto-strategy-save-actions,
    .beto-sticky-summary.beto-sticky-metrics .beto-parameter-toggle {
        grid-column: 1 / -1;
    }

    .beto-sticky-summary.beto-sticky-metrics .beto-save-strategy-cta,
    .beto-sticky-summary.beto-sticky-metrics #beto-save-as-strategy,
    .beto-sticky-summary.beto-sticky-metrics .beto-parameter-toggle {
        min-height: 44px;
        height: 44px;
    }

    .beto-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%);
    }

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

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

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

    .beto-sticky-summary.beto-sticky-metrics .beto-metric-card,
    .beto-sticky-summary.beto-sticky-metrics .hub-metric {
        min-height: 72px;
        padding: var(--space-xs);
    }

    .beto-sticky-summary.beto-sticky-metrics .beto-metric-card span,
    .beto-sticky-summary.beto-sticky-metrics .hub-metric span {
        font-size: var(--hub-text-eyebrow);
    }

    .beto-sticky-summary.beto-sticky-metrics .beto-metric-card strong,
    .beto-sticky-summary.beto-sticky-metrics .hub-metric strong {
        font-size: var(--hub-text-card-title);
    }

    .beto-app[data-view="estrategia"] .beto-main,
    .beto-app[data-view="simulador"] .beto-main {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }
}
@media (max-width: 1100px) {
    .beto-view[data-view="analysis"] .beto-hero-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .beto-home-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .beto-sticky-summary.beto-sticky-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .beto-strategy-save-actions {
        grid-column: 1 / -1;
    }
}
@media (max-width: 760px) {
    .beto-home-metrics,
    .beto-hero-metrics,
    .beto-sticky-summary.beto-sticky-metrics {
        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) {
    .beto-home-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .beto-sidebar .beto-grid-2-cols .beto-form-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .beto-home-metrics,
    .beto-hero-metrics,
    .beto-sticky-summary.beto-sticky-metrics {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: var(--space-xs);
        width: 100%;
    }
    .beto-home-metrics::-webkit-scrollbar,
    .beto-hero-metrics::-webkit-scrollbar,
    .beto-sticky-summary.beto-sticky-metrics::-webkit-scrollbar {
        display: none;
    }
    .beto-home-metrics > .beto-metric-card,
    .beto-hero-metrics > .beto-metric-card,
    .beto-sticky-summary.beto-sticky-metrics > .beto-metric-card,
    .beto-home-metrics > .hub-metric,
    .beto-hero-metrics > .hub-metric,
    .beto-sticky-summary.beto-sticky-metrics > .hub-metric {
        flex: 0 0 75vw;
        scroll-snap-align: center;
    }
}
@media (min-width: 861px) {
    .beto-metric-card,
    .beto-metric-card,
    .beto-metric-card,
    .beto-metric-card,
    .hub-metric,
    .hub-metric,
    .hub-metric,
    .hub-metric,
    .beto-panel--audit,
    .hub-table-panel,
    .beto-sidebar .beto-sidebar-panel,
    .beto-drawer__form .beto-control-section,
    .beto-unit-drawer__metrics article,
    .beto-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-soft);
        box-shadow: none;
    }

    .beto-unit-chart-wrap {
        height: var(--beto-chart-height);
        min-height: var(--beto-chart-height);
    }

    .beto-view-heading__actions,
    .beto-analysis-filters,
    .beto-home-hero__actions,
    .beto-strategy-library__filters {
        min-height: 54px;
        align-items: end;
        gap: var(--space-xs);
    }

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

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

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

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

    .beto-view[data-view="unidades"] .beto-panel--audit,
    .beto-view[data-view="reservas"] .beto-panel--audit,
    .beto-view[data-view="unidades"] .hub-table-panel,
    .beto-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);
    }

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

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

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

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

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

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

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

    .beto-table tbody tr:hover td:first-child,
    .hub-table tbody tr:hover td:first-child,
    :is(#beto-matrix-checkin, #beto-matrix-booking, #beto-matrix-active) tr:hover td.beto-matrix__unit {
        background: #1b1b1b;
    }

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

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

    :is(#beto-matrix-checkin, #beto-matrix-booking, #beto-matrix-active) th,
    :is(#beto-matrix-checkin, #beto-matrix-booking, #beto-matrix-active) td {
        height: 38px;
        padding: 8px 10px;
        border-bottom: 1px solid var(--hub-border);
        color: var(--beto-gray);
        font-size: var(--hub-text-table);
        line-height: var(--hub-leading-snug);
        font-weight: var(--hub-weight-medium);
        white-space: nowrap;
    }

    :is(#beto-matrix-checkin, #beto-matrix-booking, #beto-matrix-active) th {
        color: var(--hub-text-muted);
        font-size: var(--hub-text-label);
        font-weight: var(--hub-weight-bold);
        letter-spacing: 0.06em;
        text-transform: uppercase;
        background: var(--hub-surface-soft);
    }

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

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

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

    .beto-matrix-cell {
        display: table-cell;
        min-height: 0;
        margin: 0;
        padding: 8px 10px;
        border-radius: 4px;
        font-size: var(--hub-text-table);
        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);
    }

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

    .beto-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) */
    .beto-mobile-list {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

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

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

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

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

    .beto-mobile-list-item__main {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
        min-width: 0;
    }

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

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

    .beto-mobile-list-item__value {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        margin-left: 12px;
    }

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

    .beto-mobile-list-item__chevron {
        color: var(--beto-gray);
        opacity: 0.5;
        margin-left: 8px;
        font-size: var(--hub-text-heading);
        line-height: 1;
    }

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

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

    /* 2. Libertar Tabelas para nÃ£o espremerem a List View */
    .beto-panel--audit .beto-table,
    .beto-panel--audit .beto-table tbody,
    .hub-table-panel .beto-table,
    .hub-table-panel .beto-table tbody,
    .beto-mobile-list-item-wrapper,
    .beto-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) */
    .beto-unit-drawer__metrics--summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-s);
    }

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

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

    /* 5. Ocultar KPIs Flutuantes (Sticky Metrics) no Mobile */
    .beto-sticky-summary.beto-sticky-metrics {
        display: none !important;
    }
}
@media (min-width: 900px) {
    .beto-home-dashboard__row--top {
        grid-template-columns: 2fr 1fr;
    }
}
@media (min-width: 768px) {
    .beto-home-month__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
