/* Pedidos: apresentação local sobre Bootstrap/Kendo, sem alterar seus contratos. */
.order-page {
    padding: 24px 0;
    color: var(--mkp-foreground);
    font-family: var(--mkp-font);
    min-width: 0;
}
.order-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.order-page-heading h1 { font-size: 24px; line-height: 32px; letter-spacing: -.6px; font-weight: 600; margin: 0 0 4px; }
.order-page-heading p { margin: 0; color: var(--mkp-muted-foreground); font-size: 14px; }
.order-heading-context { display: flex; align-items: center; gap: 8px; color: var(--mkp-muted-foreground); font-size: 13px; white-space: nowrap; }
.order-page :is(a, button, input, select, textarea, [tabindex]):focus-visible,
.order-modal :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--mkp-foreground); outline-offset: 3px;
}
.order-index { display: block; padding-top: 20px; }
.order-index .order-page-heading { margin-bottom: 16px; }
.order-index .order-page-heading h1 { margin-bottom: 2px; }
.order-index .order-page-heading p { line-height: 20px; }
.order-index .order-results { min-width: 0; }
.order-results-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.order-results-toolbar > :is(p, span, small), .order-tabs-caption { color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; margin: 0; }
.order-index #order-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 3px; border: 0; border-radius: var(--mkp-radius-lg); background: var(--mkp-muted); }
.order-index #order-tabs .nav-link { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 12px; border: 0; border-radius: var(--mkp-radius-sm); color: var(--mkp-muted-foreground); font-size: 13px; line-height: 20px; font-weight: 500; }
.order-index #order-tabs .nav-link.active { background: var(--mkp-surface); color: var(--mkp-foreground); box-shadow: var(--mkp-shadow); }
.order-index #order-tabs .badge { min-width: 24px; padding: 2px 5px; border-radius: 4px; background: var(--mkp-selection); color: var(--mkp-foreground); font-size: 11px; line-height: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Busca e facetas ocupam uma única faixa; filtros salvos são visões discretas. */
.order-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.order-index .order-search-bar { display: flex; align-items: center; flex: 0 1 360px; height: 36px; min-width: 280px; padding: 0; margin: 0; overflow: hidden; border: 1px solid var(--mkp-border); border-radius: var(--mkp-radius); background: var(--mkp-surface); box-shadow: var(--mkp-shadow); }
.order-index .order-search-bar:focus-within { border-color: var(--mkp-ring-color); box-shadow: var(--mkp-ring); }
.order-index .order-search-bar #order-search-scope { width: 116px; flex: 0 0 116px; height: 26px; min-height: 26px; padding: 2px 24px 2px 10px; margin: 0; border: 0; border-right: 1px solid var(--mkp-border); border-radius: 0; background-color: transparent; background-position: right 7px center; background-size: 12px; color: var(--mkp-foreground); font-size: 12px; box-shadow: none; }
.order-index .order-search-bar #searchField { flex: 1 1 auto; width: 0; min-width: 0; height: 34px; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 0; background: transparent; font-size: 13px; line-height: 20px; box-shadow: none; }
.order-index .order-search-bar #search { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; min-height: 30px; height: 30px; padding: 0; margin-right: 2px; border: 0; border-radius: var(--mkp-radius-sm); background: transparent; color: var(--mkp-muted-foreground); box-shadow: none; }
.order-index .order-search-bar #search:hover { color: var(--mkp-foreground); background: var(--mkp-muted); }
.order-index .order-search-bar :is(input, select, button):focus-visible { outline-offset: -3px; }
.order-facets { align-items: center; flex: 1 1 auto; flex-wrap: wrap; gap: 8px; min-width: 0; }
.order-index :is(.order-facet.btn, :is(#shippingMethods, #storefronts) .multiselect, .order-advanced-toggle, .order-clear-filters, .order-mobile-filters) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 5px 10px; border: 1px solid var(--mkp-border); border-radius: var(--mkp-radius); background: var(--mkp-surface); color: var(--mkp-foreground); font-size: 13px; line-height: 20px; font-weight: 500; box-shadow: none; white-space: nowrap; }
.order-index :is(.order-facet.btn, :is(#shippingMethods, #storefronts) .multiselect) { border-style: dashed; }
.order-index :is(.order-facet.btn, :is(#shippingMethods, #storefronts) .multiselect) > .fa { color: var(--mkp-muted-foreground); font-size: 14px; }
.order-index :is(.order-facet.btn, :is(#shippingMethods, #storefronts) .multiselect, .order-advanced-toggle, .order-clear-filters):hover,
.order-index :is(.order-facet.btn, :is(#shippingMethods, #storefronts) .multiselect)[aria-expanded="true"] { color: var(--mkp-foreground); background: var(--mkp-muted); border-color: var(--mkp-ring-color); }
.order-index .order-facet .badge { margin-left: 2px; padding: 2px 5px; border-radius: 4px; background: var(--mkp-muted); color: var(--mkp-foreground); font-size: 11px; }
.order-index .order-facet-count { min-width: 18px; padding: 0 4px; border-radius: 4px; background: var(--mkp-muted); color: var(--mkp-muted-foreground); font-size: 11px; line-height: 18px; font-variant-numeric: tabular-nums; }
.order-index .order-facet.dropdown-toggle::after { display: none; }
.order-index .order-advanced-toggle { margin-left: auto; }
.order-index #order-clear-filters.btn { border-color: transparent; background: transparent; color: var(--mkp-muted-foreground); }
.order-index #order-clear-filters.btn:hover { background: var(--mkp-muted); color: var(--mkp-foreground); }
.order-index :is(#shippingMethods, #storefronts) { min-width: 0; margin: 0; }
.order-index :is(#shippingMethods, #storefronts) > .btn-group { width: auto !important; }
.order-index :is(#shippingMethods, #storefronts) .multiselect { width: auto; max-width: 250px; text-align: left; }
.order-index :is(#shippingMethods, #storefronts) .multiselect::before { content: '\f055'; font-family: FontAwesome; font-size: 14px; font-weight: 400; color: var(--mkp-muted-foreground); }
.order-index :is(#shippingMethods, #storefronts) .multiselect-selected-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-index :is(#shippingMethods, #storefronts) .multiselect::after { display: none; }
.order-index .order-facet-menu { min-width: 260px; max-width: calc(100vw - 32px); padding: 6px; border-color: var(--mkp-border); border-radius: var(--mkp-radius); background: var(--mkp-surface); box-shadow: 0 4px 12px rgb(0 0 0 / 10%); }
.order-index .order-facet-caption { padding: 6px 8px 10px; margin: 0 0 4px; border-bottom: 1px solid var(--mkp-border); color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; }
.order-index #order-status-menu { width: 280px; max-height: min(590px, 70vh); overflow-y: auto; overscroll-behavior: contain; }
.order-index .order-status-group { margin: 0; min-width: 0; }
.order-index .order-status-group + .order-status-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--mkp-border); }
.order-index .order-status-group legend { float: none; width: auto; margin: 0; padding: 7px 8px 5px; color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; font-weight: 500; }
.order-index .order-facet-option { display: flex; align-items: center; gap: 8px; min-height: 34px; margin: 0; padding: 6px 8px; border-radius: var(--mkp-radius-sm); color: var(--mkp-foreground); font-size: 13px; line-height: 20px; cursor: pointer; }
.order-index .order-facet-option:hover, .order-index .order-facet-option:focus-within { background: var(--mkp-muted); }
.order-index .order-facet-option .form-check-input { flex: 0 0 15px; width: 15px; height: 15px; margin: 0; }
.order-index .order-facet-option .form-check-label { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 12px; margin: 0; min-width: 0; font-size: 13px; line-height: 20px; font-weight: 400; cursor: pointer; }
.order-index .order-option-count { margin-left: auto; color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; }
.order-index #order-fulfillment-menu .list-group { gap: 2px; }
.order-index #order-fulfillment-menu .list-group-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 0; border-radius: var(--mkp-radius-sm); background: transparent; color: var(--mkp-foreground); font-size: 13px; line-height: 20px; }
.order-index #order-fulfillment-menu .list-group-item:hover, .order-index #order-fulfillment-menu .list-group-item.active { background: var(--mkp-muted); color: var(--mkp-foreground); }
.order-index #order-fulfillment-menu .badge { margin-left: auto; padding: 1px 4px; background: transparent !important; color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; font-weight: 400; font-variant-numeric: tabular-nums; }
.order-index .multiselect-container { min-width: 270px; max-width: min(360px, calc(100vw - 32px)); padding: 6px; font-size: 13px; }
.order-index .multiselect-option .form-check-label { white-space: normal; overflow-wrap: anywhere; }
.order-index .order-saved-views { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 12px; min-height: 30px; }
.order-index .order-saved-views > :is(h2, span, small) { margin: 0 4px 0 0; color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; font-weight: 400; }
.order-index .order-saved-filters { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.order-index .order-saved-filter { position: relative; display: inline-flex; align-items: center; max-width: 100%; border: 1px solid var(--mkp-border); background: var(--mkp-surface); border-radius: var(--mkp-radius-sm); }
.order-index .order-saved-filter:has(.active) { border-color: var(--mkp-muted-foreground); background: var(--mkp-muted); }
.order-index .order-saved-filter:hover { background: var(--mkp-muted); }
.order-index .order-saved-filter > .list-group-item { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 6px 4px 10px; border: 0; border-radius: var(--mkp-radius-sm); background: transparent; color: var(--mkp-foreground); font-size: 13px; line-height: 20px; font-weight: 400; }
.order-index .order-saved-filter > .list-group-item.active { color: var(--mkp-foreground); font-weight: 500; }
.order-index .order-saved-filter > .list-group-item > span:not(.order-filter-dot) { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-index .order-filter-dot { display: inline-block; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--order-filter-color, var(--mkp-muted-foreground)); box-shadow: 0 0 0 1px rgb(0 0 0 / 10%); }
.order-index .order-saved-filter .order-filter-dot { order: -1; }
.order-index .order-filter-delete { position: static; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; width: 28px; min-width: 28px; height: 28px; padding: 0; margin-right: 1px; border: 0; border-radius: var(--mkp-radius-sm); background: transparent; color: var(--mkp-muted-foreground); opacity: 0; }
.order-index .order-saved-filter:hover .order-filter-delete, .order-index .order-saved-filter:focus-within .order-filter-delete { opacity: 1; }
.order-index .order-filter-delete:hover { background: var(--mkp-surface); color: var(--mkp-danger); }
.order-index .order-save-view { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; font-size: 13px; line-height: 20px; font-weight: 500; }
.order-index .order-filter-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 26px; margin-bottom: 10px; }
.order-index .order-filter-summary .order-clear-filters { min-height: 28px; padding: 3px 6px; font-size: 12px; }
.order-index .order-active-filters { margin: 0; color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; }
.order-index .order-active-filters:empty { display: none; }

/* Os controles avançados mantêm seus plugins e ids dentro da sheet Bootstrap. */
.order-advanced-sheet { --bs-offcanvas-width: 384px; color: var(--mkp-foreground); font-family: var(--mkp-font); }
.order-advanced-sheet .offcanvas-header { align-items: flex-start; padding: 24px 20px 16px; border-bottom: 1px solid var(--mkp-border); }
.order-advanced-sheet .offcanvas-title { margin: 0 0 6px; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.3px; }
.order-advanced-sheet .offcanvas-header p { margin: 0; color: var(--mkp-muted-foreground); font-size: 13px; line-height: 20px; }
.order-advanced-sheet .offcanvas-body { padding: 20px; }
.order-advanced-sheet .form-label { margin-bottom: 7px; font-size: 13px; font-weight: 500; }
.order-advanced-sheet .multiselect-container { width: 100%; max-height: 280px; overflow: auto; }
.order-advanced-sheet .multiselect { display: flex; justify-content: space-between; align-items: center; min-height: 36px; text-align: left; font-size: 13px; }
.order-advanced-sheet .multiselect-selected-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-advanced-sheet .form-control { min-height: 36px; font-size: 13px; }
.order-advanced-sheet .order-filter-actions { padding-top: 16px; margin-top: 24px; border-top: 1px solid var(--mkp-border); }

/* A grade existente usa a largura completa; duas linhas com altura uniforme. */
.order-index #order-list { border: 1px solid var(--mkp-border); border-radius: var(--mkp-radius) var(--mkp-radius) 0 0; background: var(--mkp-surface); }
.order-index .k-grid { border: 0; border-radius: 0; }
.order-index .k-grid > .k-grid-table { min-width: 0; width: 100% !important; table-layout: fixed; }
.order-index .k-grid > .k-grid-table > :is(thead, tbody) > tr > :is(th, td) { padding: 8px 6px; border-inline: 0; font-size: 14px; line-height: 20px; vertical-align: middle; }
.order-index .k-grid > .k-grid-table > thead > tr > th { box-sizing: border-box; height: 40px; padding-block: 0; background: var(--mkp-muted); color: var(--mkp-muted-foreground); font-size: 13px; line-height: 20px; font-weight: 500; }
.order-index .k-grid th .k-cell-inner { margin: 0; }
.order-index .k-grid th .k-link { padding-block: 0; min-height: 40px; }
.order-index .k-grid .k-column-title { white-space: nowrap; }
.order-index .k-grid th[data-field="TotalOrder"] .k-cell-inner { justify-content: flex-end; }
.order-index .k-grid th[data-field="TotalOrder"] .k-link { justify-content: flex-end; }
.order-index .k-grid tbody tr { height: 60px; background: var(--mkp-surface); }
.order-index .k-grid > .k-grid-table > tbody > tr > td { padding-block: 6px; }
.order-index .k-grid tbody tr[data-uid] { cursor: pointer; }
.order-index .k-grid tbody tr:hover > td, .order-index .k-grid tbody tr:focus-within > td { background: var(--mkp-muted); }
.order-index .k-grid tbody tr:last-child > td { border-bottom: 0; }
.order-index .k-grid td[data-order-field="Code"], .order-index .k-grid td.order-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-index .k-grid td[data-order-field="Code"] a { font-weight: 500; }
.order-index :is(.order-person-cell, .order-shipping-cell, .order-id-link) { display: block; min-width: 0; }
.order-index .order-cell-primary { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: 400; }
.order-index .order-person-cell .order-cell-primary { font-weight: 500; white-space: normal; overflow-wrap: break-word; overflow: visible; text-overflow: clip; }
.order-index .order-cell-secondary { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; font-weight: 400; }
.order-index .order-id-link .order-cell-primary { overflow: visible; text-overflow: clip; font-size: 13px; font-weight: 500; }
.order-index .order-id-link > div { white-space: nowrap; font-size: 13px; line-height: 20px; font-weight: 500 !important; }
.order-index .order-id-link small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; font-weight: 400; }
.order-index .order-shipping-cell .order-cell-primary { font-size: 13px; }
.order-index .order-date { display: flex; flex-direction: column; white-space: nowrap; font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; }
.order-index .order-date small { color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; }
.order-index .order-date + div { line-height: 18px; }
.order-index .order-id-link > small { display: block; line-height: 18px; }
.order-page .order-status-pill { --order-status-dot: #71717a; display: inline-flex; align-items: center; gap: 6px; height: 22px; min-height: 22px; width: max-content; max-width: none; padding: 2px 7px; border: 1px solid var(--mkp-border); border-radius: 6px; background: var(--mkp-surface); color: var(--mkp-foreground); font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; overflow: visible; vertical-align: middle; }
.order-page .order-status-dot { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--order-status-dot); }
.order-page .order-status-pending { --order-status-dot: #d97706; background: #fffbeb; color: #92400e; border-color: #fde8b2; }
.order-page .order-status-success { --order-status-dot: #16a34a; background: #f0fdf4; color: #166534; border-color: #ccebd5; }
.order-page .order-status-neutral { --order-status-dot: #71717a; background: var(--mkp-muted); color: var(--mkp-muted-foreground); }
.order-page .order-status-processing, .order-page .order-status-info { --order-status-dot: #2563eb; background: #eff6ff; color: #1e40af; border-color: #d5e5fd; }
.order-page .order-status-danger { --order-status-dot: #dc2626; background: #fef2f2; color: #991b1b; border-color: #f6d1d1; }
.order-index .k-grid td .btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-height: 32px; padding: 0; border: 1px solid transparent; border-radius: var(--mkp-radius-sm); background: transparent; color: var(--mkp-muted-foreground); box-shadow: none; }
.order-index .k-grid td .btn:hover { border-color: var(--mkp-border); background: var(--mkp-surface); color: var(--mkp-foreground); }
.order-index .k-grid td:last-child { padding-inline: 8px; text-align: center; }

/* Paginação fora da área rolável; o widget Kendo continua dono dos eventos. */
.order-index .order-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 12px; border: 1px solid var(--mkp-border); border-top: 0; border-radius: 0 0 var(--mkp-radius) var(--mkp-radius); background: var(--mkp-surface); }
.order-result-count { color: var(--mkp-muted-foreground); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; }
.order-index .order-pagination :is(.k-pager, .k-pager-wrap) { display: flex; align-items: center; justify-content: flex-end; flex: 0 1 auto; flex-wrap: wrap; gap: 8px; min-width: 0; min-height: 32px; padding: 0; margin: 0; border: 0; background: transparent; color: var(--mkp-foreground); box-shadow: none; }
.order-index .order-pagination :is(.k-pager-numbers, .k-pager-info, .k-pager-input, .k-pager-refresh), .order-index .order-pagination .k-pager-numbers-wrap > select { display: none !important; }
.order-index .order-pagination .k-pager-numbers-wrap { display: flex; align-items: center; gap: 8px; }
.order-index .order-pagination .k-pager-sizes { display: inline-flex !important; align-items: center; flex-wrap: nowrap; order: -2; gap: 8px; margin: 0 16px 0 0; padding: 0; color: var(--mkp-foreground); font-size: 12px; line-height: 20px; white-space: nowrap; }
.order-index .order-pagination .k-pager-sizes > .k-dropdownlist { display: inline-flex !important; flex: 0 0 68px; width: 68px; min-height: 32px; height: 32px; margin: 0; border-color: var(--mkp-border); font-size: 12px; }
.order-index .order-pagination .k-pager-sizes > .order-page-size-label { display: inline !important; }
.order-index .order-pagination .k-pager-sizes > span:not(.order-page-size-label):not(.k-picker) { display: none; }
.order-index .order-pagination .k-pager-sizes > .k-dropdownlist .k-input-inner { padding: 4px 8px; }
.order-index .order-page-position { order: -1; min-width: 102px; margin-right: 12px; text-align: center; font-size: 12px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-index .order-pagination :is(.k-pager-nav, .k-pager-first, .k-pager-last) { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; min-height: 32px; padding: 0; margin: 0; border: 1px solid var(--mkp-border); border-radius: var(--mkp-radius); background: var(--mkp-surface); color: var(--mkp-foreground); box-shadow: var(--mkp-shadow); }
.order-index .order-pagination .k-pager-nav.k-button { min-width: 32px; border: 1px solid var(--mkp-border); background: var(--mkp-surface); }
/* Kendo flat buttons set transparent borders with !important. */
.order-index .order-pagination .k-pager-nav.k-button-flat { border-color: var(--mkp-border) !important; background-color: var(--mkp-surface) !important; }
.order-index .order-pagination .k-pager-nav.k-button-flat:not(.k-disabled):hover { background-color: var(--mkp-muted) !important; }
.order-index .order-pagination .k-pager-nav.k-disabled { opacity: .4; }
.order-index .order-pagination .k-pager-nav .k-icon { width: 14px; height: 14px; font-size: 14px; }
.order-index .k-grid .k-no-data { min-height: 96px; }
.order-empty { margin-bottom: 16px; padding: 28px 20px; text-align: center; background: var(--mkp-surface); border: 1px dashed var(--mkp-border); border-radius: var(--mkp-radius); }
.order-empty > .fa, .order-empty > strong { display: block; margin-bottom: 8px; }
.order-empty > p { margin: 0 auto; max-width: 480px; color: var(--mkp-muted-foreground); }
.order-index .order-empty { margin-bottom: 12px; padding: 40px 24px; border-style: solid; }
.order-index .order-empty > .fa { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 12px; border: 1px solid var(--mkp-border); border-radius: var(--mkp-radius); color: var(--mkp-muted-foreground); font-size: 17px; }
.order-index .order-empty > strong { color: var(--mkp-foreground); font-size: 14px; font-weight: 500; }
.order-index .order-empty > p { font-size: 13px; line-height: 20px; }
.order-index .order-empty > .btn { margin-top: 16px; font-size: 13px; }
.order-table-hint { display: none; margin: 0 0 10px; font-size: 12px; color: var(--mkp-muted-foreground); }
.order-skeleton { padding: 8px 16px; }
.order-skeleton span { display: block; height: 24px; margin: 20px 0; background: var(--mkp-muted); border-radius: var(--mkp-radius-sm); }

@media (min-width: 576px) {
    .order-index .order-facets { display: flex !important; }
    .order-index .order-mobile-filters { display: none; }
}
@media (max-width: 1199.98px) {
    .order-index .order-search-bar { flex-basis: 330px; }
    .order-index .order-advanced-toggle { margin-left: 0; }
    .order-table-hint { display: block; }
    .order-index .order-pagination :is(.k-pager-first, .k-pager-last) { display: none; }
}
@media (max-width: 991.98px) {
    .order-page { padding: 20px 0; }
    .order-heading-context { display: none; }
    .order-index .order-page-heading { margin-bottom: 16px; }
    .order-index .order-pagination { gap: 12px; }
    .order-index .order-pagination :is(.k-pager, .k-pager-wrap) { margin-left: auto; }
    .order-index .order-pagination .k-pager-sizes { margin-right: 4px; }
    .order-index .order-page-position { margin-right: 0; }
}
@media (max-width: 575.98px) {
    .order-index .order-page-heading { margin-bottom: 16px; }
    .order-index .order-page-heading h1 { font-size: 23px; line-height: 30px; }
    .order-index .order-page-heading p { max-width: 320px; font-size: 13px; }
    .order-index .order-results-toolbar { gap: 8px; margin-bottom: 12px; }
    .order-index #order-tabs { max-width: 100%; }
    .order-index #order-tabs .nav-link { min-height: 32px; padding-inline: 9px; font-size: 12px; }
    .order-index .order-results-toolbar > :is(p, span, small) { width: 100%; }
    .order-index .order-toolbar { gap: 8px; }
    .order-index .order-search-bar { flex: 1 1 100%; min-width: 0; height: 40px; }
    .order-index .order-search-bar #searchField { height: 38px; min-height: 38px; font-size: 14px; }
    .order-index .order-search-bar #search { height: 36px; width: 36px; flex-basis: 36px; }
    .order-index .order-mobile-filters { min-height: 36px; }
    .order-index .order-mobile-filters .fa-angle-down { margin-left: 4px; }
    .order-index .order-facets { flex: 1 1 100%; width: 100%; }
    .order-index .order-facets.show { display: flex; }
    .order-index .order-facets.collapsing { display: flex; }
    .order-index .order-facets > .dropdown { position: static; }
    .order-index .order-facet-menu { width: calc(100vw - 48px); }
    .order-index .order-saved-views { flex-wrap: nowrap; gap: 4px; max-width: 100%; padding-bottom: 3px; overflow-x: auto; scrollbar-width: thin; }
    .order-index .order-saved-views > * { flex-shrink: 0; }
    .order-index .order-saved-filter > .list-group-item > span:not(.order-filter-dot) { max-width: 210px; }
    .order-index .order-pagination { padding-top: 12px; }
    .order-index .order-result-count { flex-basis: 100%; }
    .order-index .order-pagination :is(.k-pager, .k-pager-wrap) { width: 100%; margin: 0; gap: 6px; }
    .order-index .order-pagination .k-pager-sizes { margin-right: auto; gap: 4px; font-size: 11px; }
    .order-index .order-pagination .k-pager-sizes > .k-dropdownlist { flex-basis: 64px; width: 64px; }
    .order-index .order-page-position { min-width: 80px; font-size: 11px; }
    .order-index .order-pagination :is(.k-pager-nav, .k-pager-first, .k-pager-last) { width: 30px; flex-basis: 30px; }
    .order-index .order-pagination :is(.k-pager-first, .k-pager-last) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .order-page *, .order-modal * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
/* Consistency for the existing Edit, Fulfillment and Customer flows. */
.order-secondary .order-secondary-title {
    margin: 0 0 .375rem;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.25;
}

.order-secondary .card {
    border-color: var(--mkp-border);
    background: var(--mkp-surface);
    box-shadow: none;
}

.order-secondary .card-header,
.order-secondary .card-footer {
    padding: 1rem;
    border-color: var(--mkp-border);
    background: var(--mkp-surface);
}

.order-secondary .card-body { padding: 1rem; }
.order-secondary .card-body .row > [class*="col-"] { min-width: 0; overflow-wrap: anywhere; }
.order-secondary .order-secondary-thumb { width: 40px; }
.order-secondary .order-edit-products { min-width: 550px; }
.order-secondary .order-edit-products th { font-size: .8125rem; font-weight: 500; }
.order-secondary .order-edit-products td { padding-block: .75rem; }
.order-secondary .order-edit-products td:nth-child(n+3) { white-space: nowrap; }
.order-secondary .order-fulfillment-description { min-width: 140px; }
.order-secondary .input-counter .counter { width: 2.5rem; background: transparent; color: inherit; }
.order-secondary .input-counter .btn { min-width: 2rem; }
.order-secondary .order-customer-grid { overflow-x: auto; }
.order-secondary .order-customer-grid > .k-grid { min-width: 850px; }
.order-secondary .order-customer-grid .progress { height: .75rem; }

@media (max-width: 575.98px) {
    .order-secondary .order-secondary-title { font-size: 1.25rem; }
    .order-secondary .order-fulfillment-quantity { margin-left: auto; }
    .order-secondary .input-counter .btn { min-height: 36px; min-width: 36px; }
}

/* Pedidos: detalhe e parciais. Incorporar em pages/order.css. */
.order-detail { padding: 24px 0; }
.order-detail .order-breadcrumb { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; color: var(--mkp-muted-foreground); font-size: 13px; }
.order-detail .order-breadcrumb a { display: inline-flex; align-items: center; gap: 8px; }
.order-detail .order-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 20px; border: 1px solid var(--mkp-border); border-radius: var(--mkp-radius-lg); background: var(--mkp-surface); box-shadow: var(--mkp-shadow); min-width: 0; scroll-margin-top: 80px; }
.order-detail .order-section > .card-header { border: 0; background: transparent; padding: 20px 20px 12px; min-width: 0; }
.order-detail .order-section > .card-header h1, .order-detail .order-section > .card-header h2, .order-detail .order-section > .card-header h3 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -.2px; }
.order-detail .order-section > .card-header small { color: var(--mkp-muted-foreground); font-size: 13px; }
.order-detail .order-section > .card-body { grid-column: 1 / -1; padding: 8px 20px 20px; min-width: 0; overflow-wrap: anywhere; }
.order-detail .order-section-actions { padding: 16px 20px 8px 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.order-detail .order-section-actions > .badge { margin: 0 !important; }
.order-detail .order-section-actions > .btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; font-size: 13px; font-weight: 500; }
.order-detail .order-section-actions > .btn-light { border-color: var(--mkp-border); background: var(--mkp-surface); }
.order-detail .order-section-actions > .btn-light:hover { background: var(--mkp-muted); }
.order-detail .order-identity > .card-header h1 { font-size: 24px; line-height: 32px; letter-spacing: -.6px; }
.order-detail .order-identity > .card-body { padding-top: 12px; }
.order-detail .order-identity .row { --bs-gutter-x: 24px; }
.order-detail .order-identity .row > div { margin-bottom: 0 !important; }
.order-detail .order-identity small { color: var(--mkp-muted-foreground); }
.order-detail .order-identity .row > div > div:first-of-type { font-weight: 500; }
.order-detail .order-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--mkp-border); border-radius: var(--mkp-radius-lg); background: var(--mkp-surface); box-shadow: var(--mkp-shadow); margin-bottom: 24px; overflow: hidden; }
.order-detail .order-overview-item { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; min-width: 0; text-decoration: none; color: var(--mkp-foreground); }
.order-detail .order-overview-item + .order-overview-item { border-left: 1px solid var(--mkp-border); }
.order-detail a.order-overview-item:hover { background: var(--mkp-muted); }
.order-detail .order-overview-item > span { font-size: 12px; line-height: 18px; color: var(--mkp-muted-foreground); }
.order-detail .order-overview-item .order-overview-label { font-size: 13px; line-height: 20px; }
.order-detail a.order-overview-item > span:last-child { color: var(--mkp-link); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.order-detail .order-overview-label .fa { margin-right: 4px; }
.order-detail .order-overview-item strong { font-size: 16px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.order-detail .order-overview-item .order-overview-value { font-size: 24px; line-height: 28px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.order-detail .order-icon-button { width: 32px; height: 32px; padding: 4px; display: inline-flex; align-items: center; justify-content: center; }
.order-detail .order-action-icon { font-size: 20px; line-height: 1; }
.order-detail .order-products { margin-bottom: 12px; }
.order-detail .order-products td { vertical-align: middle; padding: 12px 8px !important; }
.order-detail .order-products td:nth-child(2) { overflow-wrap: anywhere; }
.order-detail .order-products td:nth-child(2) > small { color: var(--mkp-muted-foreground); font-size: 12px; font-weight: 400 !important; }
.order-detail .order-products small { font-size: 13px; }
.order-detail .order-products .order-product-name { color: var(--mkp-foreground); font-size: 14px; font-weight: 500; }
.order-detail .order-product-thumbnail { width: 64px; }
.order-detail .order-product-image { width: 52px; height: 64px; object-fit: contain; padding: 0; border-radius: var(--mkp-radius-sm); }
.order-detail .order-item-image { width: 40px; height: 48px; object-fit: contain; }
.order-detail .order-totals { max-width: 360px; margin: 0 0 0 auto; font-variant-numeric: tabular-nums; }
.order-detail .order-totals td { padding: 8px; }
.order-detail .order-totals tr:last-child { font-weight: 600; font-size: 16px; }
.order-detail .order-transaction { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; padding: 4px 0 20px; }
.order-detail .order-transaction + .order-transaction { border-top: 1px solid var(--mkp-border); padding-top: 20px; }
.order-detail .order-transaction:last-child { padding-bottom: 0; }
.order-detail .order-transaction > .alert { grid-column: 1 / -1; }
.order-detail .order-transaction > .alert:last-child { margin: 0; padding: 10px 12px; font-size: 13px; }
.order-detail .order-transaction-method > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 500; }
.order-detail .order-transaction-method .badge { font-size: 13px; line-height: 18px; }
.order-detail .order-transaction .badge { margin-left: 4px; }
.order-detail .order-transaction > div { min-width: 0; }
.order-detail .order-transaction p { margin-bottom: 4px !important; }
.order-detail .order-transaction [data-bs-toggle="tooltip"] { cursor: help; }
.order-detail .order-section .order-empty { padding: 8px 0; }
.order-detail .order-empty, .order-page .order-empty, #packageTracking .order-empty { color: var(--mkp-muted-foreground); line-height: 1.5; }
.order-detail .order-empty > .fa, #packageTracking .order-empty > .fa { margin-bottom: 10px; font-size: 20px; }
.order-detail .order-empty p, #packageTracking .order-empty p { color: var(--mkp-foreground); font-weight: 500; margin-bottom: 4px; }
.order-detail .order-empty span, #packageTracking .order-empty span { display: block; font-size: 13px; }
.order-detail .order-timeline, #packageTracking .order-timeline { padding-left: 0; }
.order-detail .order-timeline-entry, #packageTracking .order-timeline-entry { position: relative; padding: 0 0 24px 20px; border-left: 1px solid var(--mkp-border); margin-left: 5px; font-size: 14px; line-height: 22px; }
.order-detail .order-timeline-entry::before, #packageTracking .order-timeline-entry::before { content: ""; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--mkp-muted-foreground); outline: 4px solid var(--mkp-surface); }
.order-detail .order-timeline-entry:last-child, #packageTracking .order-timeline-entry:last-child { padding-bottom: 0; border-left-color: transparent; }
.order-detail .order-timeline-date, #packageTracking .order-timeline-date { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; margin-bottom: 5px; }
.order-detail .order-timeline-date time { font-weight: 500; color: var(--mkp-foreground); }
.order-detail .order-timeline-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; color: var(--mkp-muted-foreground); font-size: 12px; line-height: 18px; }
.order-detail .order-note-description { overflow-wrap: anywhere; }
.order-detail .order-loading { display: flex; align-items: center; gap: 10px; padding: 24px 0; color: var(--mkp-muted-foreground); }
.order-detail .modal .form-check { padding-top: 4px; }
#orderNoteModal #orderNoteForm .form-check { display: flex; align-items: center; gap: 8px; padding-left: 0; min-height: 32px; }
#orderNoteModal #orderNoteForm .form-check-input { float: none; margin: 0; flex-shrink: 0; }
.order-detail :is(a,button,input,select,textarea):focus-visible, .order-product-search :is(a,button,input):focus-visible { outline: 2px solid var(--mkp-muted-foreground); outline-offset: 3px; }
.order-choice-list .list-group-item { padding: 16px; line-height: 22px; overflow-wrap: anywhere; }
.order-product-detail #gal1 { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.order-product-detail #gal1 img { width: 60px; height: 70px; object-fit: contain; }
.order-product-detail .modal-title { font-size: 20px; line-height: 28px; }
.order-product-detail #price { font-size: 24px; }
@media (max-width: 1199.98px) {
    .order-detail .order-overview-item { padding: 16px; }
    .order-detail .order-identity .row > div { margin-bottom: 12px !important; }
}
@media (max-width: 767.98px) {
    .order-detail { padding: 16px 0; }
    .order-detail .order-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-detail .order-overview-item:nth-child(3) { border-left: 0; }
    .order-detail .order-overview-item:nth-child(n+3) { border-top: 1px solid var(--mkp-border); }
    .order-detail .order-section > .card-header { padding: 16px 16px 10px; }
    .order-detail .order-section > .card-body { padding: 8px 16px 16px; }
    .order-detail .order-section-actions { padding: 12px 16px 8px 8px; }
    .order-detail .order-transaction { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .order-detail .order-products td { padding: 10px 4px !important; }
    .order-detail .order-product-image { width: 40px; height: 52px; }
    .order-detail .order-product-thumbnail { width: 44px; }
}
@media (max-width: 575.98px) {
    .order-detail .order-section { grid-template-columns: minmax(0, 1fr); }
    .order-detail .order-section-actions { justify-content: flex-start; padding: 0 16px 12px; }
    .order-detail .order-identity { grid-template-columns: minmax(0, 1fr) auto; }
    .order-detail .order-identity .order-section-actions { padding: 12px 12px 0 0; align-self: start; }
    .order-detail .order-identity .order-section-actions .nav { flex-wrap: nowrap; }
    .order-detail .order-identity > .card-header h1 { font-size: 21px; }
    .order-detail .order-identity .row > div { flex-basis: 100%; }
    .order-detail .order-products tr { display: grid; grid-template-columns: 44px minmax(0, 1fr); }
    .order-detail .order-products td { border-bottom: 0; }
    .order-detail .order-products td:last-child { grid-column: 2; padding-top: 0 !important; text-align: left !important; }
    .order-detail .order-products td:last-child .d-flex { flex-direction: row !important; justify-content: flex-start; }
    .order-detail .order-products td:last-child .d-flex > div { padding-left: 0 !important; padding-right: 8px; }
    .order-detail .order-products td:last-child .text-nowrap { white-space: normal !important; }
    .order-detail .order-overview-item strong { font-size: 14px; line-height: 21px; }
    .order-detail .order-overview-item .order-overview-value { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    .order-detail .spinner-border { animation: none; }
    .order-detail .collapsing { transition: none; }
}

/* Dimensões permanecem estáveis quando a origem da miniatura está indisponível. */
.order-detail .order-product-media { display: inline-flex; width: 52px; height: 64px; flex: 0 0 52px; vertical-align: middle; }
.order-detail .order-product-media > img { width: 100% !important; height: 100% !important; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; }
.order-detail .order-product-media > [hidden] { display: none !important; }
.order-detail .order-product-unavailable { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 100%; border-radius: var(--mkp-radius-sm); background: var(--mkp-muted); color: var(--mkp-muted-foreground); font-size: 10px; line-height: 12px; text-align: center; }
.order-detail .order-product-unavailable .fa { font-size: 18px; }
.order-detail .order-product-media-small { width: 40px; height: 48px; flex-basis: 40px; }
@media (max-width: 767.98px) {
    .order-detail .order-product-media { width: 40px; height: 52px; flex-basis: 40px; }
    .order-detail .order-product-unavailable { font-size: 9px; line-height: 11px; }
}


/* R3: identificação legível e badges completos mesmo em grades compactas. */
.order-index .k-grid td[data-order-field="Code"],
.order-index .k-grid td[data-order-field="Code"] a,
.order-index .k-grid td[data-order-field="Code"] a > div { overflow: visible; text-overflow: clip; white-space: nowrap; }
.order-index .k-grid td[data-order-field="Code"] a > div { font-size: 13px; }
.order-index .k-grid td .order-status-pill { font-size: 12px; gap: 4px; padding-inline: 5px; }
.order-index .order-date-relative { white-space: nowrap; font-size: 12px; }
.order-index .order-toolbar > .order-clear-filters { margin-left: auto; }
.order-index .order-saved-filter { height: 32px; }
.order-index .order-saved-filter > .list-group-item { white-space: nowrap; }
.order-index .order-filter-delete:focus-visible { opacity: 1; }
.order-index .order-filter-dot { min-width: 6px; }
.order-index .k-grid td.order-number { font-size: 14px; }
.order-index .k-grid td:last-child { padding-inline: 4px; }
@media (min-width: 576px) and (max-width: 1199.98px) {
    .order-index .order-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .order-index .order-search-bar { grid-column: 1 / -1; width: 360px; max-width: 100%; }
    .order-index .order-facets { grid-column: 1; }
    .order-index .order-clear-filters { grid-column: 2; align-self: start; }
}
@media (max-width: 575.98px) {
    .order-index .k-grid td[data-order-field="Name"] .order-cell-primary,
    .order-index .k-grid td[data-order-field="CustomerName"] .order-cell-primary,
    .order-index .k-grid td[data-order-field="DistributorName"] .order-cell-primary { white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 18px; }
    .order-index .order-pagination { padding: 12px 8px; }
}

/* R5: legibilidade, vazio integrado e ritmo do detalhe. */
.order-index .order-search-bar { flex-basis: 280px; min-width: 250px; }
.order-index .order-results-toolbar { justify-content: space-between; }
.order-index .order-saved-views { gap: 8px; margin-bottom: 16px; }
.order-index .order-list-empty > .k-grid { display: none; }
.order-index #order-list > .order-empty { border: 0; border-radius: 0; margin: 0; padding: 40px 24px; }
.order-index .order-result-count { font-size: 13px; }
.order-index .order-pagination .order-page-position { font-size: 12px; }
.order-index .order-pagination .k-pager-sizes { font-size: 12px; }
.order-detail .order-identity { border: 0; border-radius: 0; background: transparent; box-shadow: none; margin-bottom: 24px; }
.order-detail .order-identity > .card-header { padding: 0 0 16px; }
.order-detail .order-identity > .order-section-actions { padding: 0 0 16px 16px; align-items: flex-start; }
.order-detail .order-identity > .card-body { padding: 16px 0 0; border-top: 1px solid var(--mkp-border); }
.order-detail .order-identity .row { row-gap: 16px; }
.order-detail .order-identity .row > div { margin-bottom: 0 !important; }
.order-detail .order-identity small { font-size: 13px; line-height: 20px; }
.order-detail .order-overview { margin-bottom: 24px; box-shadow: none; }
.order-detail .order-overview-item { gap: 8px; padding: 20px; }
.order-detail .order-overview-item .order-overview-value { font-size: 28px; line-height: 32px; }
.order-detail .order-overview-item .order-overview-status { display: flex; align-items: center; min-height: 32px; }
.order-detail .order-overview-item > strong:not(.order-overview-value) { min-height: 32px; display: flex; align-items: center; }
.order-detail a.order-overview-item > span:last-child { color: var(--mkp-muted-foreground); font-size: 13px; text-decoration: none; }
.order-detail a.order-overview-item:hover > span:last-child { color: var(--mkp-link); }
.order-detail .order-overview-item .order-shipping-code { margin-top: -6px; font-size: 12px; }
.order-detail .order-section { box-shadow: none; margin-bottom: 24px; grid-template-columns: auto minmax(0, 1fr); }
.order-detail .order-section > .card-header { padding: 20px 0 16px 20px; }
.order-detail .order-section-actions { padding: 16px 20px 16px 8px; gap: 8px; }
.order-detail .order-section > .card-body { padding-top: 4px; }
.order-detail .order-identity { grid-template-columns: minmax(0, 1fr) auto; }
.order-detail .order-identity > .card-header { padding: 0 0 16px; }
.order-detail .order-identity > .card-body { padding-top: 16px; }
.order-detail .order-section .order-empty { border: 0; margin: 0; text-align: left; padding: 8px 0; }
.order-detail .order-section .order-empty > .fa { display: none; }
.order-detail .order-timeline-entry { padding-bottom: 28px; }
.order-detail .order-timeline-date { display: block; margin-bottom: 8px; font-size: 12px; line-height: 19px; }
.order-detail .order-timeline-date time { display: block; font-weight: 400; }
.order-detail .order-timeline-date > span { display: block; }
.order-detail .order-timeline-meta { margin-top: 8px; line-height: 19px; }
.order-detail .order-products td { padding-block: 14px !important; }
@media (min-width: 1200px) {
    .order-detail-columns { --bs-gutter-x: 24px; }
    .order-detail-main { width: 64%; }
    .order-detail-aside { width: 36%; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .order-index .order-toolbar { gap: 8px; }
    .order-index .order-search-bar { flex: 1 1 250px; }
    .order-index .order-facets { flex: 0 1 auto; gap: 6px; }
    .order-index :is(.order-facet.btn, :is(#shippingMethods, #storefronts) .multiselect, .order-advanced-toggle) { padding-inline: 8px; gap: 5px; }
    .order-index .order-clear-filters { padding-inline: 4px; }
    .order-detail .order-overview-item { padding: 18px 16px; }
    .order-detail .order-section-actions > .btn { font-size: 12px; padding-inline: 8px; }
}
@media (max-width: 575.98px) {
    .order-index .order-search-bar { flex-basis: 100%; min-width: 0; }
    .order-index .order-saved-views { flex-wrap: nowrap; }
    .order-index .order-save-view { font-size: 12px; padding-inline: 4px; }
    .order-index .k-grid td[data-order-field="Name"] .order-cell-primary,
    .order-index .k-grid td[data-order-field="CustomerName"] .order-cell-primary,
    .order-index .k-grid td[data-order-field="DistributorName"] .order-cell-primary { font-size: 13px; line-height: 19px; }
    .order-detail .order-section { grid-template-columns: minmax(0, 1fr); }
    .order-detail .order-section > .card-header { padding: 16px 16px 12px; }
    .order-detail .order-section-actions { justify-content: flex-start; padding: 0 16px 16px; }
    .order-detail .order-identity { grid-template-columns: minmax(0, 1fr) auto; }
    .order-detail .order-identity > .card-header { padding: 0 0 16px; }
    .order-detail .order-identity > .order-section-actions { padding: 0 0 0 8px; }
    .order-detail .order-identity > .card-body { padding: 16px 0 0; }
    .order-detail .order-overview-item { padding: 16px 12px; }
    .order-detail .order-overview-item .order-overview-value { font-size: 24px; }
}

/* R6: alvos independentes nas visões e leitura integral da identificação. */
.order-index .order-saved-filter > .list-group-item { min-width: 0; }
.order-index .order-filter-delete { pointer-events: none; }
.order-index .order-saved-filter:hover .order-filter-delete,
.order-index .order-saved-filter:focus-within .order-filter-delete { pointer-events: auto; }
.order-index .order-id-link small.order-erp-code { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.order-index .k-grid > .k-grid-table > thead > tr > th { color: var(--mkp-foreground); background: var(--mkp-surface); }
.order-index .k-grid tbody tr { height: 56px; }
.order-index .order-status-pill { background: var(--mkp-surface); border-color: var(--mkp-border); }
.order-index .order-status-neutral { color: var(--mkp-muted-foreground); }
.order-index .order-person-cell .order-cell-primary { font-weight: 500; }
.order-index .order-saved-views > h2 { color: var(--mkp-foreground); }

/* Produtos primeiro; informações complementares legíveis e espaçamento compacto. */
.order-detail .order-overview { margin-bottom: 20px; }
.order-detail .order-overview-item { padding: 18px 20px; gap: 6px; }
.order-detail .order-overview-item > span,
.order-detail .order-overview-item .order-overview-label { font-size: 14px; line-height: 20px; }
.order-detail .order-section { margin-bottom: 20px; }
.order-detail .order-section:not(.order-identity) > .card-header h2 { font-size: 16px; line-height: 24px; }
.order-detail .order-section:not(.order-identity) > .card-header { padding-top: 16px; padding-bottom: 12px; }
.order-detail .order-section:not(.order-identity) > .order-section-actions { padding-block: 12px; }
.order-detail .order-products td { padding-block: 10px !important; }
.order-detail .order-totals td { padding-block: 6px; }
.order-detail .order-delivery-section .card-body > .row { row-gap: 12px; }
.order-detail .order-delivery-section .card-body > .row > div { margin-bottom: 12px !important; }
.order-detail .order-delivery-section small,
.order-detail .order-transaction .small,
.order-detail .order-timeline-meta { font-size: 13px; line-height: 20px; color: var(--mkp-muted-foreground); }
.order-detail .order-timeline-date { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 13px; line-height: 20px; margin-bottom: 6px; }
.order-detail .order-timeline-date time { font-weight: 500; }
.order-detail .order-timeline-entry { padding-bottom: 24px; }
.order-secondary .order-fulfillment-product { display: block; font-size: 14px; line-height: 22px; font-weight: 500; }
@media (max-width: 767.98px) {
    .order-detail .order-overview-item { padding: 16px 12px; }
}

/* Leitura operacional: navegação, consulta e visões têm hierarquias distintas. */
.order-index .order-results-toolbar { border-bottom: 1px solid var(--mkp-border); margin-bottom: 16px; }
.order-index #order-tabs { gap: 20px; padding: 0; border-radius: 0; background: transparent; }
.order-index #order-tabs .nav-link { min-height: 40px; padding: 6px 0 10px; border-radius: 0; border-bottom: 2px solid transparent; font-size: 14px; }
.order-index #order-tabs .nav-link.active { border-bottom-color: var(--mkp-foreground); background: transparent; box-shadow: none; }
.order-index #order-tabs .badge { font-size: 12px; font-weight: 400; }
.order-index .order-search-bar { flex: 0 1 290px; }
.order-index .order-search-bar #searchField { font-size: 14px; }
.order-index .order-search-bar #order-search-scope { font-size: 13px; }
.order-index .order-saved-views { gap: 8px; margin-bottom: 16px; }
.order-index .order-saved-views > .order-views-label { font-size: 13px; }
.order-index .order-page-heading .order-save-view { flex-shrink: 0; padding: 6px 12px; }
.order-index .order-saved-filter > .list-group-item { text-decoration: none; }
.order-index .order-saved-filter:has(.active) { border-color: var(--mkp-foreground); background: var(--mkp-muted); }
.order-index .k-grid > .k-grid-table > :is(thead, tbody) > tr > :is(th, td) { padding-inline: 6px; }
.order-index .k-grid th .k-link { padding-inline: 0; }
.order-index .k-grid td[data-order-field="Code"] a > div { font-size: 14px; }
.order-index .order-cell-secondary { font-size: 13px; line-height: 20px; }
.order-index .order-id-link small { font-size: 12px; }
.order-index .order-date { font-size: 14px; }
.order-index .order-person-cell .order-cell-primary { line-height: 21px; }
.order-index .order-status-neutral { color: var(--mkp-foreground); }
.order-index .k-grid td .order-status-pill { font-size: 13px; gap: 3px; padding-inline: 4px; }
.order-index .k-grid > .k-grid-table > tbody > tr > td:is([data-order-field="FulfillmentStatus"], [data-order-field="OrderStatus"], [data-order-field="PaymentStatus"]) { padding-inline: 4px; }
.order-index .order-result-count,
.order-index .order-pagination .order-page-position,
.order-index .order-pagination .k-pager-sizes { font-size: 13px; }

/* O cadastro acompanha os produtos na lateral; o topo resume a operação. */
.order-detail .order-breadcrumb { margin-bottom: 12px; font-size: 14px; }
.order-detail .order-contact-link { margin-left: auto; font-size: 13px; }
.order-detail #order-customer-heading { scroll-margin-top: 80px; }
.order-detail .order-identity { margin-bottom: 16px; }
.order-detail .order-identity > .card-header { padding-bottom: 0; }
.order-detail .order-identity > .order-section-actions { padding-bottom: 0; }
.order-detail .order-identity > .card-header h1 { font-size: 28px; line-height: 36px; }
.order-detail .order-identity small { font-size: 14px; line-height: 22px; }
.order-detail .order-overview { margin-bottom: 20px; }
.order-detail .order-overview-item { padding: 16px 20px; gap: 6px; }
.order-detail .order-overview-item .order-shipping-code { margin: 0; font-size: 13px; font-weight: 400; color: var(--mkp-muted-foreground); white-space: nowrap; }
.order-detail .order-overview-item > strong:not(.order-overview-value) { display: block; line-height: 32px; }
.order-detail .order-overview-item > span:last-child { font-size: 13px; line-height: 20px; }
.order-detail .order-status-pill { min-height: 24px; height: 24px; font-size: 13px; }
.order-detail .order-customer-context .row { row-gap: 16px; }
.order-detail .order-customer-context .row > div { margin: 0 !important; }
.order-detail .order-customer-context small { color: var(--mkp-muted-foreground); font-size: 13px; line-height: 20px; }
.order-detail .order-customer-context .row > div > div:first-of-type { font-weight: 500; }
.order-detail .order-products td:nth-child(2) > small { font-size: 13px; }
.order-detail .order-products td:nth-child(2) { overflow-wrap: normal; }
.order-detail .order-products .order-product-name { line-height: 22px; }
.order-detail .order-section > .card-body { padding-bottom: 20px; }
.order-detail .order-timeline-entry { padding-bottom: 20px; }

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .order-index .order-search-bar { flex: 1 1 240px; min-width: 240px; }
    .order-index .order-facets { flex: 0 1 auto; }
    .order-detail .order-overview-item { padding-inline: 14px; }
}
@media (max-width: 1199.98px) {
    .order-detail .order-customer-context .row > div { flex: 1 1 200px; }
}
@media (max-width: 767.98px) {
    .order-detail .order-overview-item { padding: 14px 12px; }
    .order-detail .order-customer-context .row > div { flex-basis: 100%; }
}
@media (max-width: 575.98px) {
    .order-index .order-page-heading { flex-wrap: wrap; gap: 12px; }
    .order-index .order-page-heading > div { flex: 1 1 200px; }
    .order-index .order-page-heading .order-save-view { margin-left: 0; }
    .order-index #order-tabs { gap: 16px; }
    .order-index #order-tabs .nav-link { font-size: 13px; }
    .order-index .order-search-bar { flex-basis: 100%; }
    .order-index .order-pagination .order-page-position,
    .order-index .order-pagination .k-pager-sizes { font-size: 12px; }
    .order-detail .order-products td:nth-child(2) { overflow-wrap: anywhere; }
    .order-detail .order-overview-item .order-shipping-code { display: block; line-height: 20px; }
    .order-detail .order-identity > .card-header h1 { font-size: 24px; line-height: 32px; }

    /* A mesma linha conserva todos os valores e a ação, sem rolagem lateral. */
    .order-edit .order-edit-products { min-width: 0; width: 100%; }
    .order-edit .order-edit-products thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .order-edit .order-edit-products tbody { display: block; }
    .order-edit .order-edit-products tbody tr { display: grid; grid-template-columns: 44px minmax(0, 1fr) 40px; gap: 4px 8px; padding: 12px 0; border-bottom: 1px solid var(--mkp-border); }
    .order-edit .order-edit-products td { width: auto !important; padding: 0; border: 0; min-width: 0; }
    .order-edit .order-edit-products td:first-child { grid-column: 1; grid-row: 1 / 4; }
    .order-edit .order-edit-products td:nth-child(2) { grid-column: 2; grid-row: 1; font-weight: 500; line-height: 21px; }
    .order-edit .order-edit-products td:nth-child(2) small { font-size: 12px; font-weight: 400; color: var(--mkp-muted-foreground); }
    .order-edit .order-edit-products td[data-label] { grid-column: 2 / -1; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 22px; }
    .order-edit .order-edit-products td[data-label]::before { content: attr(data-label); color: var(--mkp-muted-foreground); font-weight: 400; }
    .order-edit .order-edit-products td:last-child { grid-column: 3; grid-row: 1; }
    .order-edit .order-edit-products .confirm-delete { min-width: 36px; min-height: 36px; }
    .order-edit .order-edit-products .order-edit-total td:empty { display: none; }
    .order-edit .order-edit-products .order-edit-total td[data-label] { grid-column: 1 / -1; }
}

/* R8: leitura regular da grade, controles agrupados e operação no resumo. */
.order-index .order-saved-filter > .list-group-item { padding-right: 24px; }
.order-index .order-saved-filter:not(:has(.order-filter-delete)) > .list-group-item { padding-right: 10px; }
.order-index .order-filter-delete { position: absolute; right: 2px; top: 3px; width: 24px; min-width: 24px; height: 24px; margin: 0; }
.order-index .k-grid tbody tr { height: 60px; }
.order-index .order-person-cell .order-cell-primary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 22px; }
.order-index .k-grid > .k-grid-table > :is(thead, tbody) > tr > :is(th, td):first-child { padding-left: 12px; }
.order-index .k-grid td .order-status-pill { height: 24px; min-height: 24px; padding: 3px 6px; gap: 5px; font-size: 12px; line-height: 16px; border-color: transparent; }
.order-index .order-status-neutral { background: var(--mkp-muted); color: var(--mkp-muted-foreground); }
.order-index .order-status-processing,
.order-index .order-status-info { background: #f3f6fb; color: #334b6d; }
.order-index .order-status-success { background: #f1f8f3; color: #24633b; }
.order-index .order-status-pending { background: #fff8eb; color: #85551a; }
.order-index .order-status-danger { background: #fdf2f2; color: #953838; }
.order-index .order-pagination { padding: 14px 12px; }
.order-detail .order-overview-item { padding: 20px; gap: 8px; }
.order-detail .order-overview-label { font-weight: 500; }
.order-detail .order-overview-fulfillment > a.order-overview-label { color: var(--mkp-foreground); text-decoration: none; }
.order-detail .order-overview-fulfillment > a.order-overview-label:hover { color: var(--mkp-link); }
.order-detail .order-overview-fulfillment .order-create-fulfillment { align-self: flex-start; margin-top: 4px; font-size: 13px; min-height: 32px; white-space: nowrap; }
.order-detail .order-overview-item .order-overview-value { font-size: 30px; line-height: 36px; }
.order-detail .order-overview-item > span:last-child,
.order-detail a.order-overview-item > span:last-child { font-size: 14px; line-height: 21px; }
.order-detail .order-section:not(.order-identity) > .card-header { padding: 20px 0 16px 24px; }
.order-detail .order-section:not(.order-identity) > .order-section-actions { padding: 16px 24px 16px 12px; }
.order-detail .order-section:not(.order-identity) > .card-body { padding: 0 24px 20px; }
.order-detail .order-product-media { width: 48px; height: 52px; flex-basis: 48px; }
.order-detail .order-products td { padding-block: 9px !important; }
.order-detail .order-products .order-product-name { font-size: 14px; line-height: 22px; font-weight: 500; }
.order-detail .order-products td:nth-child(2) > small { font-size: 13px; color: var(--mkp-muted-foreground); }
.order-detail .order-products td:last-child small { font-size: 13px; }
.order-detail .order-customer-context small,
.order-detail .order-timeline-meta,
.order-detail .order-delivery-section small { font-size: 14px; line-height: 21px; }
.order-detail .order-customer-context .row { row-gap: 20px; }
.order-edit .order-edit-products-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.order-edit .order-edit-products-heading > .btn { flex-shrink: 0; }
.order-edit .order-edit-summary { border: 0; border-top: 1px solid var(--mkp-border); border-radius: 0; box-shadow: none; margin-top: 8px; }
.order-edit .order-edit-summary > .card-header { background: transparent; border: 0; padding: 16px 0 8px; }
.order-edit .order-edit-summary > .card-body { padding: 0; }
.order-edit .order-edit-summary > .card-body > .row { --bs-gutter-x: 0; }
.order-edit .order-edit-summary .row > .col-12 { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; }
.order-edit .order-edit-summary .row > .col-12 > p { margin-bottom: 0 !important; font-size: 14px; }
.order-edit .order-edit-summary .row > .col-12:last-child { border-top: 1px solid var(--mkp-border); margin-top: 4px; font-size: 18px; }
@media (min-width: 576px) and (max-width: 1199.98px) {
    .order-index .order-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    .order-index .order-search-bar { grid-column: 1; width: 100%; max-width: 440px; min-width: 0; }
    .order-index .order-facets { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; }
    .order-index .order-clear-filters { grid-column: 2; grid-row: 1; align-self: center; }
    .order-index .order-advanced-toggle { margin-left: auto; }
    .order-index .order-saved-views { gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding-block: 3px; margin-bottom: 12px; }
    .order-index .order-saved-filter { flex-shrink: 0; }
    .order-index .order-saved-filter > .list-group-item { font-size: 12px; }
}
@media (min-width: 1200px) {
    .order-edit .order-edit-products { min-width: 0; width: 100%; table-layout: fixed; }
    .order-edit .order-edit-products th:first-child { width: auto; }
    .order-edit .order-edit-products td:first-child { width: 46px !important; }
    .order-edit .order-edit-products th:nth-child(2),
    .order-edit .order-edit-products th:nth-child(4) { width: 84px !important; }
    .order-edit .order-edit-products th:last-child { width: 40px !important; }
    .order-edit .order-edit-products td:nth-child(2) { overflow-wrap: anywhere; }
}
@media (min-width: 750px) and (max-width: 899.98px) {
    .order-index .k-grid td[data-order-field="Code"] a > div { font-size: 13px; }
}
@media (min-width: 768px) and (max-width: 1100px) {
    .order-detail .order-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-detail .order-overview-item:nth-child(3) { border-left: 0; }
    .order-detail .order-overview-item:nth-child(n+3) { border-top: 1px solid var(--mkp-border); }
}
@media (max-width: 575.98px) {
    .order-index .k-grid tbody tr { height: 72px; }
    .order-index .order-person-cell .order-cell-primary { white-space: normal; overflow: visible; }
    .order-detail .order-overview-item { padding: 16px 12px; }
    .order-detail .order-overview-item .order-overview-value { font-size: 24px; line-height: 32px; }
    .order-detail .order-overview-fulfillment .order-create-fulfillment { font-size: 12px; padding-inline: 7px; }
    .order-detail .order-section:not(.order-identity) > .card-header { padding: 16px 16px 12px; }
    .order-detail .order-section:not(.order-identity) > .order-section-actions { padding: 0 16px 12px; }
    .order-detail .order-section:not(.order-identity) > .card-body { padding: 0 16px 16px; }
    .order-detail .order-product-media { width: 40px; height: 48px; flex-basis: 40px; }
    .order-edit .order-edit-products-heading { flex-wrap: wrap; gap: 12px; }
    .order-edit .order-edit-products { display: block; }
    .order-edit .order-edit-products colgroup { display: none; }
    .order-edit .order-edit-products tbody { width: 100%; }
}

/* R9: identificação integral e proporções adequadas ao trabalho operacional. */
.order-index .order-person-cell .order-cell-primary {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 20px;
}
.order-index .k-grid tbody tr { height: 64px; }
.order-index .k-grid td .order-status-pill { padding-inline: 5px; gap: 4px; }
.order-index .order-person-cell .order-cell-secondary { margin-top: 2px; }
.order-index .order-date .order-cell-secondary { white-space: nowrap; }

/* Contato vem antes dos produtos no DOM e ocupa a lateral no desktop. */
.order-detail .order-detail-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-inline: 0;
}
.order-detail .order-detail-columns > * { width: auto; padding-inline: 0; min-width: 0; }
.order-detail .order-detail-columns > .order-customer-context { padding: 0; }
@media (min-width: 1200px) {
    .order-detail .order-detail-columns {
        grid-template-columns: minmax(0, 1.78fr) minmax(320px, 1fr);
        grid-template-rows: min-content 1fr;
        column-gap: 24px;
        align-items: start;
    }
    .order-detail .order-detail-main { grid-column: 1; grid-row: 1 / 3; }
    .order-detail .order-customer-context { grid-column: 2; grid-row: 1; }
    .order-detail .order-detail-aside { grid-column: 2; grid-row: 2; }
}

/* Editar: seções planas; a tabela usa a maior parte da largura disponível. */
.order-edit .order-edit-content > div:first-child { margin-bottom: 24px; }
.order-edit .order-edit-columns { --bs-gutter-x: 32px; }
.order-edit .order-edit-main {
    padding: 20px;
    background: var(--mkp-surface);
    border: 1px solid var(--mkp-border);
    border-radius: var(--mkp-radius-lg);
}
.order-edit .order-edit-aside .card { background: transparent; border: 0; border-radius: 0; margin-bottom: 24px !important; }
.order-edit .order-edit-aside .card-header { border: 0; background: transparent; padding: 0 0 16px; }
.order-edit .order-edit-aside .card-body { padding: 0; }
.order-edit .order-edit-aside .card-footer { padding: 12px 0 0; border: 0; background: transparent; }
.order-edit .order-edit-aside h5 { font-size: 14px; font-weight: 500; line-height: 22px; margin: 0; }
.order-edit .order-edit-aside .card-header h2 { display: flex; align-items: center; gap: 8px; }
.order-edit .order-edit-aside .card-header h2 .fa { color: var(--mkp-muted-foreground); }
.order-edit .order-edit-summary .card-header h2 { display: flex; align-items: center; gap: 8px; }
.order-edit .order-edit-products td:nth-child(2) { overflow-wrap: normal; font-size: 14px; line-height: 22px; }
.order-edit .order-edit-products td:nth-child(2) small { color: var(--mkp-muted-foreground); font-size: 13px; }
.order-edit .order-edit-products thead { background: transparent; }
@media (min-width: 1200px) {
    .order-edit .order-edit-main { width: 72%; }
    .order-edit .order-edit-aside { width: 28%; }
}
@media (max-width: 1199.98px) {
    .order-edit .order-edit-columns { margin-inline: 0; }
    .order-edit .order-edit-aside { padding-inline: 0; }
    .order-edit .order-edit-aside > .row { --bs-gutter-x: 24px; }
    .order-edit .order-edit-aside > .row > .col-12 { width: 50%; }
}

/* Atendimento: contador junto dos itens; conclusão no fim da conferência. */
.order-fulfillment > form { max-width: 880px; }
.order-fulfillment .order-fulfillment-item { padding-block: 12px !important; }
.order-fulfillment .order-fulfillment-description > small { color: var(--mkp-muted-foreground); font-size: 13px; font-weight: 400 !important; }
.order-fulfillment .order-fulfillment-actions { display: flex; justify-content: flex-end; gap: 12px; }
@media (max-width: 575.98px) {
    .order-edit .order-edit-main { padding: 16px; }
    .order-edit .order-edit-aside > .row > .col-12 { width: 100%; }
    .order-edit .order-edit-products td:nth-child(2) { overflow-wrap: anywhere; }
    .order-fulfillment .order-fulfillment-actions { flex-direction: column-reverse; }
    .order-fulfillment .order-fulfillment-actions .btn { width: 100%; min-height: 40px; }
}

/* R10: densidade de consulta, sem limitar a altura de nomes completos. */
.order-index { padding-top: 0; }
.order-index .order-page-heading { margin-bottom: 8px; }
.order-index .order-results-toolbar { margin-bottom: 8px; }
.order-index #order-tabs .nav-link { min-height: 32px; padding-block: 4px 6px; }
.order-index .order-toolbar { margin-bottom: 12px; }
.order-index .order-saved-views { margin-bottom: 12px; }
.order-index .k-grid tbody tr { height: 52px; }
.order-index .k-grid > .k-grid-table > tbody > tr > td { padding-block: 5px; }
.order-index .order-person-cell .order-cell-secondary { margin-top: 0; }
.order-index .order-person-cell .order-cell-primary { line-height: 20px; }
.order-index .order-cell-secondary { line-height: 18px; }
.order-index .order-pagination { padding-block: 8px; }
@media (min-width: 1200px) {
    .order-index .order-page-heading > div { display: block; }
    .order-index .order-page-heading h1 { margin-bottom: 4px; }
    .order-index .order-page-heading { margin-bottom: 20px; }
    .order-index .order-saved-views { margin-bottom: 12px; }
}
@media (max-width: 1199.98px) {
    .order-index .order-saved-views { flex-wrap: wrap; overflow: visible; gap: 6px; padding-block: 0; }
}
@media (max-width: 575.98px) {
    .order-index .order-page-heading { gap: 8px; }
    .order-index .order-saved-views > .order-views-label { flex-basis: 100%; }
    .order-index .k-grid tbody tr { height: 60px; }
}

/* Estados vazios continuam explícitos, sem ocupar um cartão de conteúdo. */
.order-detail .order-section:has(> .card-body > .order-empty) > .card-header { padding-top: 12px; padding-bottom: 6px; }
.order-detail .order-section:has(> .card-body > .order-empty) > .order-section-actions { padding-block: 10px 6px; }
.order-detail .order-section:has(> .card-body > .order-empty) > .card-body { padding-bottom: 12px; }
.order-detail .order-section .order-empty { padding-block: 0; }
.order-detail .order-section .order-empty p { margin: 0; font-size: 14px; line-height: 20px; font-weight: 400; }
@media (max-width: 1199.98px) {
    .order-detail .order-section { margin-bottom: 12px; }
    .order-detail .order-overview { margin-bottom: 12px; }
    .order-detail .order-overview-item { padding: 12px 16px; gap: 4px; }
    .order-detail .order-section:not(.order-identity) > .card-header { padding: 12px 0 10px 16px; }
    .order-detail .order-section:not(.order-identity) > .order-section-actions { padding: 10px 16px 10px 8px; }
    .order-detail .order-section:not(.order-identity) > .card-body { padding: 0 16px 12px; }
    .order-detail .order-customer-context .row { row-gap: 10px; }
    .order-detail .order-section:has(> .card-body > .order-empty) { grid-template-columns: minmax(0, 1fr) auto; }
    .order-detail .order-section:has(> .card-body > .order-empty) > .card-header { padding-bottom: 6px; }
    .order-detail .order-section:has(> .card-body > .order-empty) > .order-section-actions { padding-bottom: 6px; }
}

/* Metadados agrupados; o mesmo modal de frete fica acessível junto ao título. */
.order-edit { padding-top: 8px; }
.order-edit .order-edit-content > .order-edit-heading { position: relative; margin-bottom: 12px; }
.order-edit .order-edit-heading > p { margin-bottom: 8px !important; }
.order-edit .order-edit-metadata { --bs-gutter-x: 20px; row-gap: 8px; }
.order-edit .order-edit-metadata > div { display: flex; align-items: center; gap: 8px; }
.order-edit .order-edit-metadata .form-label { margin: 0; color: var(--mkp-muted-foreground); font-size: 13px; }
.order-edit .order-edit-metadata .form-control-plaintext { width: auto; padding: 0; font-size: 13px; }
.order-edit .order-edit-shipping-shortcut { margin-top: 12px; }
.order-edit .order-edit-products td { padding-block: 8px; }
@media (min-width: 576px) and (max-width: 1199.98px) {
    .order-edit .order-edit-shipping-shortcut { position: absolute; top: 0; right: 0; margin: 0; }
}
@media (max-width: 575.98px) {
    .order-edit .order-edit-heading .order-secondary-title { margin-bottom: 4px; }
    .order-edit .order-edit-metadata { --bs-gutter-x: 12px; }
    .order-edit .order-edit-metadata > div { flex-wrap: wrap; gap: 4px 8px; }
    .order-edit .order-edit-products td { padding-block: 0; }
}

/* Atendimento móvel: imagem, descrição e quantidade formam um único item. */
.order-fulfillment { padding-top: 8px; }
.order-fulfillment .order-fulfillment-item { padding-block: 8px !important; }
.order-fulfillment .order-fulfillment-item > div { padding-block: 0 !important; }
@media (max-width: 575.98px) {
    .order-fulfillment .order-fulfillment-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px 10px; margin-inline: 0; }
    .order-fulfillment .order-fulfillment-item > div { width: auto !important; margin: 0; padding-inline: 0; }
    .order-fulfillment .order-fulfillment-item > div:first-child { grid-column: 1; grid-row: 1 / 3; align-self: start; }
    .order-fulfillment .order-fulfillment-description { grid-column: 2; min-width: 0; }
    .order-fulfillment .order-fulfillment-quantity { grid-column: 2; justify-self: start; }
    .order-fulfillment .order-fulfillment-product { line-height: 20px; }
    .order-fulfillment .order-fulfillment-actions { gap: 8px; }
}

/* Column priority belongs to MinScreenWidth in the three MVC grids.
   Kendo removes hidden columns from colgroup; positional CSS would hide a
   different visible column there and misalign its header, values and width. */

/* Readable supporting text, with the existing compact row rhythm. */
.order-index .order-count-help { width: 32px; height: 32px; padding: 0; color: var(--mkp-muted-foreground); }
.order-index .order-results-toolbar { gap: 8px; }
.order-index .order-cell-secondary,
.order-index .order-date small,
.order-index .order-result-count,
.order-index .order-pagination .k-pager-sizes,
.order-detail .order-section > .card-header small,
.order-detail .order-overview-item > span,
.order-detail .order-products small { font-size: 13px; line-height: 20px; }
.order-index .k-grid tbody tr { height: 56px; }

/* Identificadores relacionados ficam juntos; o nome do produto abre a leitura. */
.order-detail .order-product-identifiers { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 4px; color: var(--mkp-muted-foreground); }
.order-detail .order-products .order-product-name { font-size: 14px; line-height: 22px; font-weight: 500; }
.order-detail .order-products td { vertical-align: middle; }
.order-detail .order-product-identifiers small { font-size: 13px; line-height: 20px; }
.order-detail .order-product-media { height: 56px; }
.order-detail .order-customer-context .card-body small { font-size: 13px; line-height: 20px; }
.order-detail .order-customer-context .card-body .row > div { line-height: 22px; }
.order-edit .order-edit-shipping-shortcut { margin-top: 12px; }
@media (min-width: 1200px) {
    .order-edit .order-edit-shipping-shortcut { position: absolute; top: 0; right: 0; margin: 0; }
}
@media (max-width: 575.98px) {
    .order-detail .order-product-identifiers { gap: 0 8px; }
    .order-detail .order-product-media { height: 48px; }
}

/* O rótulo abreviado preserva o menu e a área de ordenação em notebooks. */



/* Consulta responsiva: cada pedido preserva seus dez campos e cinco ações.
   Cabeçalhos continuam operáveis para ordenar, filtrar e escolher colunas. */







.order-detail :is(#order-payment, #order-shipping, #order-history) { scroll-margin-top: 80px; }
.order-detail .order-product-identifiers small,
.order-detail .order-customer-context .card-body small { font-size: 14px; }
@media (min-width: 576px) {
    .order-edit .order-edit-products td:last-child { padding-inline: 4px; }
}
@media (min-width: 576px) {
    .order-fulfillment .order-fulfillment-item { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 16px; }
    .order-fulfillment .order-fulfillment-item > div { width: auto; padding-inline: 0; }
    .order-fulfillment .order-fulfillment-quantity { margin-left: 0; }
}

/* Contexto da consulta: tipos e visões juntos, busca e facetas na faixa seguinte. */
.order-index .order-results-toolbar { gap: 8px 16px; padding-bottom: 8px; margin-bottom: 12px; }
.order-index .order-results-toolbar > .order-saved-views { flex: 1 1 auto; margin: 0; gap: 4px; }
.order-index .order-results-toolbar > #order-tabs { flex: 0 0 auto; }
.order-index .order-results-toolbar > .order-count-help { margin-left: auto; }
.order-index .order-results-toolbar .order-saved-filter { border-color: transparent; background: transparent; }
.order-index .order-results-toolbar .order-saved-filter > .list-group-item { padding-left: 6px; padding-right: 24px; color: var(--mkp-muted-foreground); }
.order-index .order-results-toolbar .order-saved-filter:hover,
.order-index .order-results-toolbar .order-saved-filter:has(.active) { background: var(--mkp-surface); border-color: var(--mkp-border); }
.order-index .order-results-toolbar .order-saved-filter > .list-group-item.active { color: var(--mkp-foreground); }
.order-index .order-toolbar { margin-bottom: 12px; gap: 10px; }
.order-index .order-person-cell .order-cell-secondary { margin-top: 3px; }
.order-index .order-cell-secondary { color: var(--mkp-muted-foreground); font-size: 13px; line-height: 20px; }
@media (min-width: 1360px) {
    .order-index .order-results-toolbar { flex-wrap: nowrap; }
    .order-index .order-results-toolbar > .order-saved-views { min-width: 0; }
    .order-index .order-results-toolbar > .order-count-help { flex: 0 0 32px; }
}
@media (max-width: 1359.98px) {
    .order-index .order-results-toolbar > .order-saved-views { order: 2; flex-basis: 100%; }
}
@media (min-width: 768px) {
    .order-index .k-grid.mkp-grid-bounded-direct { max-height: var(--order-results-height, calc(100dvh - 350px)); }
}

/* Rótulos legíveis e contato compacto sem suprimir dados no celular. */
.order-detail .order-overview-label { font-size: 14px; }
.order-detail .order-products td:last-child small { color: var(--mkp-muted-foreground); }
@media (max-width: 575.98px) {
    .order-detail .order-customer-context .card-body .row > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); column-gap: 12px; }
    .order-detail .order-customer-context .card-body .row > div > :first-child { grid-column: 1; grid-row: 1 / 4; padding-bottom: 0 !important; }
    .order-detail .order-customer-context .card-body .row > div > :not(:first-child) { grid-column: 2; overflow-wrap: anywhere; }
    .order-detail .order-customer-context .card-body .row { row-gap: 16px; }
}







.order-detail #order-history > .order-section-actions > .btn { white-space: nowrap; }
.order-detail .order-timeline-date { font-size: 13px; line-height: 20px; }

/* Contato e entrega pertencem ao mesmo contexto de edição. */
.order-edit .order-edit-aside > .row { margin-inline: 0; padding: 20px; background: var(--mkp-surface); border: 1px solid var(--mkp-border); border-radius: var(--mkp-radius-lg); }
.order-edit .order-edit-aside > .row > .col-12 { padding-inline: 0; }
.order-edit .order-edit-aside .card { margin-bottom: 0 !important; }
.order-edit .order-edit-aside > .row > .col-12 + .col-12:not(:empty) { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--mkp-border); }
.order-edit .order-edit-aside .card-header { padding-bottom: 12px; }
@media (min-width: 576px) and (max-width: 1199.98px) {
    .order-edit .order-edit-aside > .row { gap: 24px; }
    .order-edit .order-edit-aside > .row > .col-12 { width: calc(50% - 12px); }
    .order-edit .order-edit-aside > .row > .col-12 + .col-12:not(:empty) { margin-top: 0; padding-top: 0; border-top: 0; }
}
@media (max-width: 575.98px) {
    .order-edit .order-edit-aside > .row { padding: 16px; }

}

/* Tablet: consultas e decisão usam rótulos na mesma linha das ações. */



/* A ação principal fica no cabeçalho, sem alongar os quatro resumos. */
.order-detail .order-identity .order-create-fulfillment { min-height: 32px; white-space: nowrap; }
@media (max-width: 767.98px) {
    .order-detail .order-identity { grid-template-columns: minmax(0, 1fr); }
    .order-detail .order-identity > .order-section-actions { padding: 12px 0 0; justify-content: flex-start; }
    .order-detail .order-identity .order-section-actions .nav { flex-wrap: wrap; }
}




/* Valores dos produtos na mesma linha no celular, com os rótulos preservados. */
@media (max-width: 575.98px) {
    .order-detail .order-products .order-product-amount {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 4px 12px;
    }
    .order-detail .order-products .order-product-amount > .fw-semibold { margin-left: auto; }
    .order-detail .order-overview-item { gap: 4px; }
    .order-detail .order-overview-item .order-overview-status { min-height: 24px; }
    .order-edit .order-edit-products .order-edit-product { grid-template-columns: 44px minmax(0, 1fr) 78px minmax(0, 1fr) 40px; gap: 8px; }
    .order-edit .order-edit-products .order-edit-product td:first-child { grid-row: 1; }
    .order-edit .order-edit-products .order-edit-product td:nth-child(2) { grid-column: 2 / 5; }
    .order-edit .order-edit-products .order-edit-product td[data-label] { grid-column: auto; grid-row: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; }
    .order-edit .order-edit-products .order-edit-product td:nth-child(3) { grid-column: 1 / 3; }
    .order-edit .order-edit-products .order-edit-product td:nth-child(4) { grid-column: 3; }
    .order-edit .order-edit-products .order-edit-product td:nth-child(5) { grid-column: 4 / -1; }
    .order-edit .order-edit-products .order-edit-product td:last-child { grid-column: 5; }
    .order-edit .order-edit-products .order-edit-product td[data-label]::before { font-size: 13px; }




}

/* Período da lista de pedidos */
.order-index .order-period { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.order-index .order-period :is(.form-select, .form-control) { width: auto; min-height: 34px; padding-block: 5px; font-size: 13px; }
.order-index .order-period-range { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.order-index .order-period-range[hidden], .order-index .order-period-year[hidden] { display: none; }
.order-index .order-period-error { color: var(--mkp-danger, #b42318); font-size: 12px; }
.order-index .order-period-error:empty { display: none; }

/* Ações em lote */
.order-index .k-grid > .k-grid-table > :is(thead, tbody) > tr > :is(th, td).order-select-cell, .order-index .k-grid :is(th, td).order-select-cell { width: 44px; padding-inline: 0; text-align: center; }
.order-index .order-select-hit { display: flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; margin: 0; cursor: pointer; }
.order-index .k-grid tbody tr.order-row-selected > td { background: var(--mkp-muted); }
.order-index .order-batch-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding: 8px 12px; border: 1px solid var(--mkp-border); border-radius: var(--mkp-radius); background: var(--mkp-surface); }
.order-index .order-batch-bar[hidden] { display: none !important; }
.order-index .order-batch-count { font-weight: 600; margin-right: 4px; }
.order-index .order-batch-hint { color: var(--mkp-muted-foreground); font-size: 12px; margin-left: auto; }
.order-index .order-batch-last { display: block; margin: 0 0 8px auto; padding: 0; font-size: 13px; }
.order-batch-warnings { padding-left: 18px; color: var(--mkp-warning-foreground, #8a5a00); }
.order-batch-warnings:empty { display: none; }
.order-batch-report { margin-top: 12px; }
.order-batch-section { margin-bottom: 8px; }
.order-batch-section > summary { cursor: pointer; font-weight: 600; }
.order-batch-table td:last-child { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .order-index .order-batch-hint { margin-left: 0; flex-basis: 100%; }
}
