@media (max-width: 1199px) {
    .cvc-hub-score #cvc-hub-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: .5rem;
    }

    .cvc-hub-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .75rem;
    }

    .cvc-hub-filters > * { min-width: 0; }
    .cvc-hub-sales table { min-width: 730px; }

    .cvc-sale-form-heading { flex-wrap: wrap; gap: .75rem; }
    .cvc-sale-form-heading > div:last-child { flex-wrap: wrap; }
    .cvc-sale-form-heading button:not(.hidden) { min-height: 44px; }
    .cvc-sale-form-heading #tituloLancamento { font-size: clamp(1.15rem, 3vw, 1.5rem); }
}

@media (max-width: 767px) {
    .cvc-hub-score { margin-block: 0 .75rem; padding: .875rem; }
    .cvc-hub-score h3 { gap: .25rem; margin-bottom: .5rem; font-size: .75rem; }
    .cvc-hub-score #cvc-hub-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cvc-hub-score #cvc-hub-metrics > div { padding: .5rem; overflow-wrap: anywhere; }
    .cvc-hub-score-toggle.hidden {
        display: inline-flex;
        align-items: center;
        gap: .375rem;
        min-height: 44px;
        padding-inline: .375rem;
        color: #fff;
        text-transform: none;
    }
    .cvc-hub-score-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
    .cvc-hub-score:has(.cvc-hub-score-toggle[aria-expanded="false"]) #cvc-hub-metrics > div:nth-child(n + 3) {
        display: none;
    }

    div:has(> .cvc-hub-filters) { padding: .75rem; margin-bottom: .75rem; }
    .cvc-hub-filters { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
    .cvc-hub-search { grid-column: 1; }
    .cvc-hub-filter-extra, .cvc-hub-departures { grid-column: 1 / -1; }
    .cvc-hub-filter-toggle.hidden {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .375rem;
        min-height: 44px;
        padding: .5rem .75rem;
        border: 1px solid #cbd5e1;
        border-radius: .5rem;
        font-size: .875rem;
        font-weight: 700;
        color: #0037a3;
    }
    .cvc-hub-filter-toggle[aria-expanded="true"] { background: #eaf0ff; border-color: #a7bded; }
    .cvc-hub-filter-toggle[aria-expanded="false"] ~ .cvc-hub-filter-extra { display: none; }
    .cvc-hub-filters :is(input:not([type="checkbox"]), select) { min-height: 44px; font-size: 1rem; }
    .cvc-hub-filters #filtroDataEmbarqueRange { font-size: .875rem; }
    .cvc-hub-filters #cvc-hub-filter-actions button { min-height: 44px; }
    .cvc-hub-departures label:has(input) { min-height: 44px; font-size: .8125rem; }

    .cvc-hub-sales { overflow: visible; border: 0; background: transparent; box-shadow: none; margin-bottom: 1rem; }
    .cvc-hub-sales > div { overflow: visible; min-height: 0; }
    .cvc-hub-sales table, .cvc-hub-sales tbody { display: block; min-width: 0; }
    .cvc-hub-sales thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .cvc-hub-sales .cvc-hub-sale {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
        grid-template-areas:
            "customer customer status status"
            "destination destination destination details"
            "departure return sale-date sale-date"
            "value actions actions actions";
        align-items: center;
        gap: .5rem .375rem;
        margin-bottom: .625rem;
        padding: .75rem;
        border: 1px solid #dbe4f0;
        border-radius: .75rem;
        background: #fff;
    }
    .cvc-hub-sale > td { min-width: 0; padding: 0; text-align: left; }
    .cvc-hub-sale-details { grid-area: details; }
    .cvc-hub-sale-status { grid-area: status; justify-self: end; }
    .cvc-hub-sale-date { grid-area: sale-date; justify-self: end; font-size: .75rem; }
    .cvc-hub-sale-customer { grid-area: customer; overflow-wrap: anywhere; }
    .cvc-hub-sale .cvc-hub-sale-destination { grid-area: destination; max-width: none; white-space: normal; overflow-wrap: anywhere; }
    .cvc-hub-sale-departure { grid-area: departure; }
    .cvc-hub-sale-return { grid-area: return; }
    .cvc-hub-sale-value { grid-area: value; }
    .cvc-hub-sale .cvc-hub-sale-actions { grid-area: actions; width: auto; justify-self: end; }
    .cvc-hub-sale-customer span { max-width: 100%; margin-inline: 0; white-space: normal; }
    .cvc-hub-sale-departure span:not(.cvc-hub-card-label.hidden),
    .cvc-hub-sale-return span:not(.cvc-hub-card-label.hidden) { padding: .125rem .25rem; font-size: .7rem; }
    .cvc-hub-card-label.hidden { display: block; font-size: .7rem; line-height: 1.2; color: #475569; margin-bottom: .2rem; }
    .cvc-hub-sale :is(button, select) { min-height: 44px; }
    .cvc-hub-sale button { min-width: 44px; }
    .cvc-hub-sale-status { max-width: 100%; }
    .cvc-hub-sale-status .custom-dropdown-container { max-width: 100%; }
    .cvc-hub-sale-status .custom-dropdown-container > button { padding-inline: .5rem 1.5rem; }
    .cvc-hub-sale-status .custom-dropdown-container > button i { right: .5rem; }
    .cvc-hub-sale-actions > div { gap: .25rem; }
    .cvc-hub-sale .cvc-hub-open-sale { width: auto; gap: .25rem; padding-inline: .5rem; }
    .cvc-hub-open-sale .cvc-hub-card-label { margin: 0; color: inherit; font-weight: 800; }
    .cvc-hub-sales tbody > tr:not(.cvc-hub-sale, .hidden) {
        display: block;
        margin-bottom: .625rem;
        border: 1px solid #dbe4f0;
        border-radius: .75rem;
        background: #fff;
    }
    .cvc-hub-sales tbody > tr:not(.cvc-hub-sale) > td { display: block; }

    :is(#modulo-vendas, #modulo-vendas-beta) > div:has(> .cvc-sale-form-heading) { padding: .75rem; }
    .cvc-sale-form-heading { margin-bottom: .75rem; align-items: flex-start; }
    .cvc-sale-form-heading > div:last-child { justify-content: flex-start; }
    .cvc-sale-form-heading > :last-child:has(> button):not(:has(> button:not(.hidden))) { display: none; }
    .cvc-sale-form-section, #vendaForm > .bg-slate-50, #vendaFormMulti .bg-slate-50.p-5,
    #vendaForm .bg-slate-50.p-5, #recibos-container .item-card { padding: .75rem; }
    #vendaFormMulti :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea),
    #vendaForm :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea),
    #texto-robo { min-width: 0; min-height: 44px; max-width: 100%; font-size: 1rem; }
    #vendaFormMulti button:not(.hidden), #vendaForm button:not(.hidden), .cvc-sale-robot-source button { min-height: 44px; }
    #vendaFormMulti :is(.anexo-row, #lembretes-form-container > div),
    #vendaForm :is(.anexo-row, #lembretes-form-container > div) { flex-wrap: wrap; }
    .cvc-sale-steps.hidden {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .375rem;
    }
    .cvc-sale-steps button, .cvc-sale-continue {
        border: 1px solid #c4d2e8;
        border-radius: .5rem;
        padding: .375rem;
        font-size: .875rem;
        font-weight: 700;
        color: #0037a3;
        background: #f0f5ff;
    }
    .cvc-sale-continue.hidden { display: block; width: 100%; min-height: 44px; margin-top: .75rem; }
    .cvc-sale-review-heading.hidden { display: block; font-size: .875rem; font-weight: 800; }
    #vendaFormMulti h3[id^="cvc-sale-"] { scroll-margin-top: 5rem; }

    .item-card .item-card-top { gap: .5rem; padding-inline-end: 1.5rem; }
    .item-card .item-tipo-wrap { flex-wrap: wrap; gap: .375rem .625rem; }
    .item-card .item-tipo-wrap > span { flex-basis: 100%; }
    .item-card .item-tipo-wrap label { min-height: 36px; }
    .item-card .item-doc-wrap { flex: 1 1 100%; display: grid; border: 0; padding: 0; margin: 0; gap: .25rem; }
    .item-card .item-doc-wrap input, .item-card .navio-container input { width: 100%; }
    .item-card .item-produtos-wrap { gap: .25rem .5rem; padding: .5rem; }
    .item-card .item-produtos-wrap label { min-height: 36px; overflow-wrap: anywhere; }
    .item-card .item-produtos-wrap label input { flex: 0 0 auto; }
    .item-card .navio-container:not(.hidden) { flex-wrap: wrap; }
    .item-card .item-values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .item-card .item-total-wrap { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
    .item-card .item-total-wrap .card-total-display { font-size: 1.25rem; }
    .cvc-sale-robot-source { margin-bottom: 1rem; }
    .cvc-sale-robot-source h3 { font-size: 1rem; }
    .cvc-sale-robot-source .w-10 { flex-shrink: 0; }
}

@media (max-width: 360px) {
    .cvc-hub-sales .cvc-hub-sale {
        grid-template-areas:
            "customer customer status status"
            "destination destination destination details"
            "departure return sale-date sale-date"
            "value value value value"
            "actions actions actions actions";
    }
}
