/* Operational surfaces share the appearance of the approved Caja dashboard. */
@media screen {
  body.cheve-brand {
    --cheve-chrome: linear-gradient(110deg, #20262a, #101417 78%);
    --cheve-surface: linear-gradient(125deg, #2e2841, #252133);
    --cheve-control: #242c30;
    --cheve-modal-backdrop: #090b10bd;
    --cheve-radius: 12px;
  }

  body.cheve-brand .cheve-page-header,
  body.cheve-brand.almacenes-page > .app-header,
  body.cheve-brand.cheve-mesero header {
    background: var(--cheve-chrome);
    color: var(--ink);
    border-bottom: 1px solid var(--cheve-line);
  }
  body.cheve-brand .cheve-page-header h1 {
    font-family: Manrope, Inter, system-ui, sans-serif;
    color: var(--ink);
  }
  body.cheve-brand .cheve-footer {
    background: #12171a;
    color: var(--muted);
    border-top: 1px solid #45484e;
  }
  body.cheve-brand .cheve-section-surface,
  body.cheve-brand .cheve-section .cheve-metric,
  body.cheve-brand .cheve-mesa-card,
  body.cheve-brand .cheve-hotel-metric,
  body.cheve-brand.cheve-inventario .cheve-stock-metrics > *,
  body.cheve-brand.cheve-fiscal .cheve-fiscal-metrics > *,
  body.cheve-brand.almacenes-page .metrics > *,
  body.cheve-brand .tg :is(.tg-card, .tg-stat, .tg-history-filters, button.tg-record-action) {
    background: var(--cheve-surface);
    color: var(--ink);
    border: 1px solid var(--cheve-line);
    border-radius: var(--cheve-radius);
  }
  body.cheve-brand .tg :is(input, select, textarea) { background: var(--cheve-field); }
  body.cheve-brand .tg :is(.tg-label, label, th) { color: var(--muted); }
  body.cheve-brand :is(.tg .tg-history-filters, .tg .tg-product-row) > *,
  body.cheve-brand :is(.cheve-section, .cheve-section-actions, .cheve-filter-grid, .cheve-filter-grid > *),
  body.cheve-brand :is(.cheve-hotel, .cheve-hotel-body, .cheve-hotel .overflow-x-auto) { min-width: 0; }
  body.cheve-brand .cheve-section-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  body.cheve-brand .cheve-section-actions > :is(a, button) { min-height: 40px; }

  /* Dark controls, gold primary or selected controls, separate semantic status colors. */
  body.cheve-brand :is(.cheve-action, .cheve-section-actions > :is(a,button),
    .cheve-page-header [data-hab-tab], .cheve-modal-close, .cheve-overlay [data-reserva-tab],
    .consumos-dialog button, .consumos-dialog a, .print-monitor-dialog button) {
    background: var(--cheve-control);
    color: var(--ink);
    border: 1px solid var(--cheve-line);
    border-radius: 8px;
  }
  body.cheve-brand :is(.cheve-primary, .cheve-section-actions > .cheve-primary,
    .cheve-page-header [data-hab-tab][aria-pressed=true], .cheve-catalog [aria-pressed=true],
    .cheve-section [data-mod-action="reservas-filtro"][aria-pressed=true],
    .cheve-overlay [data-mover-rapido-modo][aria-pressed=true], .consumos-dialog .consumos-primary,
    .tg button.tg-primary, .ca button.ca-primary, .consulta-card .consulta-primary) {
    background: var(--cheve-gold);
    color: #1b160d;
    border-color: #d5ae6c;
  }
  body.cheve-brand :is(.cheve-primary, .consumos-dialog .consumos-primary) .material-symbols-outlined {
    color: inherit;
  }
  body.cheve-brand :is(.cheve-page-header, .cheve-section) [aria-current="page"] { color: #edcf95; }
  body.cheve-brand :is(.cheve-section, .cheve-hotel) :is(h1,h2,h3) { overflow-wrap: anywhere; }
  body.cheve-brand .cheve-metric > p:last-child { font-variant-numeric: tabular-nums; }
  body.cheve-brand .cheve-advance-kpis {
    grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr));
    gap: 8px;
  }
  body.cheve-brand .cheve-advance-kpis > * { min-width: 0; }

  /* Presentational overlays. Native dialogs retain the browser's focus and Escape behavior. */
  body.cheve-brand .cheve-overlay {
    --cheve-modal-gap: clamp(10px, 2.2vw, 24px);
    padding: var(--cheve-modal-gap);
    background: var(--cheve-modal-backdrop);
    backdrop-filter: blur(3px);
    align-items: safe center;
    overflow: auto;
    overscroll-behavior: contain;
  }
  body.cheve-brand .cheve-overlay > :is(div, section, article, form):first-child {
    min-width: 0;
    max-height: calc(100dvh - 2 * var(--cheve-modal-gap));
    max-width: min(var(--cheve-modal-width, 1200px), 100%);
    overflow: auto;
    background: var(--cheve-panel);
    color: var(--ink);
    border: 1px solid var(--cheve-line);
    border-radius: 14px;
    box-shadow: 0 24px 70px #05050ba8;
    overscroll-behavior: contain;
  }
  body.cheve-brand .cheve-overlay > .max-w-xs:first-child { --cheve-modal-width: 320px; }
  body.cheve-brand .cheve-overlay > .max-w-sm:first-child { --cheve-modal-width: 384px; }
  body.cheve-brand .cheve-overlay > .max-w-md:first-child { --cheve-modal-width: 448px; }
  body.cheve-brand .cheve-overlay > .max-w-lg:first-child { --cheve-modal-width: 512px; }
  body.cheve-brand .cheve-overlay > .max-w-xl:first-child { --cheve-modal-width: 576px; }
  body.cheve-brand .cheve-overlay > .max-w-2xl:first-child { --cheve-modal-width: 672px; }
  body.cheve-brand .cheve-overlay > .max-w-3xl:first-child { --cheve-modal-width: 768px; }
  body.cheve-brand .cheve-overlay > .max-w-4xl:first-child { --cheve-modal-width: 896px; }
  body.cheve-brand .cheve-overlay > :first-child > div:first-child:has(> h2, > div > h2):not(.cheve-modal-body),
  body.cheve-brand .cheve-modal-head,
  body.cheve-brand dialog :is(.dialog-heading,.tg-dialog-head) {
    background: var(--cheve-chrome);
    color: var(--ink);
    border-color: var(--cheve-line);
  }
  body.cheve-brand .cheve-modal-head {
    flex: 0 0 auto;
    gap: 12px;
    padding: clamp(12px, 2vw, 20px) clamp(16px, 2.3vw, 24px);
  }
  body.cheve-brand .cheve-modal-head h2 { color: var(--ink); overflow-wrap: anywhere; }
  body.cheve-brand .cheve-modal-head p:not(.text-primary) { color: var(--muted); }
  body.cheve-brand .cheve-modal-close { min-width: 38px; min-height: 38px; flex-shrink: 0; }
  body.cheve-brand .cheve-modal-body {
    min-height: 0;
    min-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }
  body.cheve-brand .cheve-modal-footer {
    flex: 0 0 auto;
    background: #201d2e;
    border-top: 1px solid var(--cheve-line);
    padding: 12px clamp(16px, 2.3vw, 24px);
  }
  body.cheve-brand .cheve-overlay .cheve-modal-subpanel {
    background: #242b30;
    border-color: var(--cheve-line);
    min-width: 0;
  }
  body.cheve-brand dialog:not(.cheve-area-dialog) {
    max-inline-size: calc(100vw - 24px);
    max-block-size: calc(100dvh - 24px);
    color: var(--ink);
    border: 1px solid var(--cheve-line);
    border-radius: 14px;
    overscroll-behavior: contain;
  }
  body.cheve-brand dialog::backdrop { background: var(--cheve-modal-backdrop); }
  body.cheve-brand :is(.consumos-dialog, .print-monitor-dialog, .delivery-modal) header {
    background: var(--cheve-chrome);
    border-color: var(--cheve-line);
  }

  body.cheve-brand .cheve-hotel {
    background: radial-gradient(ellipse at 78% 5%, #33264e40, transparent 55%), #101318;
    width: 100%;
    max-width: none;
  }
  body.cheve-brand .cheve-hotel > .cheve-page-header,
  body.cheve-brand .cheve-hotel-body { width: 100%; }
  body.cheve-brand .cheve-hotel-body > div { max-width: none; }
  body.cheve-brand .cheve-hotel [data-hab-tab] { white-space: nowrap; }
  body.cheve-brand .cheve-hotel-metric :is(h3, strong, p, span:not(.material-symbols-outlined)) { color: inherit; }
  body.cheve-brand .cheve-hotel-metric small { color: var(--muted); }

  body.cheve-brand.cheve-pedido #appHeader { height: auto; min-height: 52px; }
  body.cheve-brand.cheve-pedido #appHeader > div { padding-block: 5px; }
  body.cheve-brand.cheve-pedido #appHeader .cheve-pedido-chip {
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f1d69b;
    background: #c5a46b17;
    border: 1px solid #c5a46b73;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 10px;
  }
  body.cheve-brand.cheve-pedido .cheve-catalog > :is(div, section) { min-width: 0; }
  body.cheve-brand.cheve-pedido .cheve-catalog {
    background: linear-gradient(145deg, #171821, #111419);
  }
  body.cheve-brand.cheve-pedido .cheve-catalog-rail { background: var(--cheve-panel); }
  body.cheve-brand.cheve-pedido .cheve-pedido-detail {
    background: #20272c;
    border-color: var(--cheve-line);
  }
  body.cheve-brand.cheve-pedido .cheve-pedido-detail > footer { background: #1a2025; border-color: var(--cheve-line); }
  body.cheve-brand.cheve-pedido .cheve-pedido-product {
    background: var(--cheve-surface);
    border: 1px solid var(--cheve-line);
    border-radius: 10px;
    color: var(--ink);
  }
  body.cheve-brand.cheve-pedido .cheve-pedido-product .cheve-price { color: var(--primary); }
  body.cheve-brand.cheve-pedido #appFooter { min-height: 40px; }
  body.cheve-brand.cheve-estacion main { max-width: 860px; margin-block: clamp(12px, 4vh, 36px); }
  body.cheve-brand.cheve-estacion a { color: #f1d69b; }

  body.cheve-brand.almacenes-page .metric-icon { background: #c5a46b1c; color: #e5c28a; }
  body.cheve-brand.almacenes-page #areaConteos { background: var(--cheve-gold); color: #1b160d; border-color: #d5ae6c; }
  body.cheve-brand.almacenes-page :is(.aside-title, .area-content .title-row, .chips) { border-color: var(--cheve-line); }
  body.cheve-brand :is(.cheve-inventario, .cheve-fiscal) .overflow-x-auto { overscroll-behavior-inline: contain; }

  @media (max-width: 1023px) {
    body.cheve-brand .cheve-overlay > :first-child > .cheve-modal-body { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 767px) {
    body.cheve-brand .cheve-modal-footer { flex-wrap: wrap; }
    body.cheve-brand #modalNuevaReserva .cheve-modal-footer {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    }
    body.cheve-brand #modalNuevaReserva .cheve-modal-footer > button {
      padding: 9px 8px;
      font-size: .82rem;
      gap: 5px;
      min-height: 44px;
    }
    body.cheve-brand #modalNuevaReserva .cheve-modal-footer .material-symbols-outlined { font-size: 17px; }
    body.cheve-brand .cheve-section-actions { justify-content: flex-start; }
    body.cheve-brand.cheve-pedido #appHeader > div { gap: 6px; padding-inline: 10px; }
    body.cheve-brand.cheve-pedido #appHeader .cheve-pedido-chip { max-width: 125px; }
    body.cheve-brand .cheve-hotel .cheve-page-header { max-height: 46dvh; overflow: auto; }
    body.cheve-brand .cheve-hotel .cheve-page-header :is(.cheve-hotel-heading, .cheve-hotel-tabs) { padding-inline: 12px; }
    body.cheve-brand .cheve-hotel-body { padding: 12px; }
    body.cheve-brand .tg :is(.tg-history-filters, .tg-product-row) { grid-template-columns: repeat(2, minmax(0,1fr)); }
  }

  body.cheve-brand.cheve-pedido #productosGrid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  body.cheve-brand.cheve-pedido #productosGrid > p { grid-column: 1 / -1; }
  body.cheve-brand.cheve-pedido #appFooter #nombreLocalHeader:not(.hidden) { display: inline-block; padding: 3px 8px; font-size: 10px; border: 1px solid #c5a46b73; }
  body.cheve-brand.cheve-pedido .cheve-pedido-actions > :is(#btnRefreshTop,#btnLogout) { background: var(--cheve-panel); border: 1px solid var(--cheve-line); }
  body.cheve-brand .cheve-hotel-heading > :first-child > :first-child { background: #3c332d; color: #f2d49a; border: 1px solid #9a794e; }
  body.cheve-brand .cheve-hotel .cheve-section-actions { justify-content: flex-end; }
  body.cheve-brand .cheve-advance-kpis > div > p:nth-child(2) { font-size: 17px; white-space: nowrap; color: var(--ink); }
  body.cheve-brand #resAdelantoResumenModal .cheve-advance-kpis > div { padding: 9px 12px; }
  body.cheve-brand #resAdelantoResumenModal .cheve-advance-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.cheve-brand #resAdelantoResumenModal .cheve-advance-kpis > div:last-child { grid-column: 1 / -1; }
  body.cheve-brand .tg button.tg-active {
    border-color: #c6a260;
    color: #f1d69b;
    background: #3d3330;
  }
  body.cheve-brand .tg button.tg-primary:hover:not(:disabled),
  body.cheve-brand .ca button.ca-primary:hover:not(:disabled) {
    background: var(--cheve-gold);
    color: #1b160d;
  }
  body.cheve-brand :is(.cheve-fiscal, .cheve-inventario) .cheve-page-header button { background: var(--cheve-control); }
  body.cheve-brand .cheve-estacion .ca {
    --ca-border: var(--cheve-line);
    color: var(--ink);
  }
  body.cheve-brand .cheve-estacion :is(.ca-notice, .ca-badge) { background: #223832; color: #addec7; }
  body.cheve-brand .cheve-estacion .ca-notice.ca-error { background: #4a2729; color: #ffb2ad; }

  @media (max-width: 1439px) {
    body.cheve-brand.cheve-pedido #productosGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }
  @media (max-width: 1140px) {
    body.cheve-brand.cheve-pedido #productosGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.cheve-brand.cheve-pedido .cheve-catalog-rail { width: 128px; }
  }
  @media (max-width: 900px) {
    body.cheve-brand.cheve-pedido .cheve-catalog-rail { display: none; }
    body.cheve-brand.cheve-pedido .cheve-pedido-detail { width: 244px; }
  }
  @media (max-width: 680px) {
    body.cheve-brand.cheve-pedido .cheve-catalog { display: block; overflow-y: auto; min-height: 0; }
    body.cheve-brand.cheve-pedido .cheve-catalog-main { min-height: 0; }
    body.cheve-brand.cheve-pedido .cheve-catalog-main > div:last-child { max-height: 40dvh; min-height: 120px; overflow-y: auto; }
    body.cheve-brand.cheve-pedido .cheve-pedido-detail { width: 100%; border-left: 0; border-top: 1px solid var(--cheve-line); }
    body.cheve-brand.cheve-pedido .cheve-pedido-detail #listaItems { min-height: 96px; max-height: 34dvh; }
    body.cheve-brand.cheve-pedido #productosGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.cheve-brand #modalMoverMesasRapido .cheve-modal-subpanel > div:last-child { min-height: 96px; }
    body.cheve-brand .cheve-hotel .cheve-section-actions { margin-left: 0; justify-content: flex-start; }
  }

  body.cheve-brand.cheve-pedido .cheve-catalog-main { background: #17171f; }
  body.cheve-brand.cheve-pedido .cheve-pedido-detail > div:first-child {
    background: var(--cheve-chrome);
    border-color: var(--cheve-line);
  }
  body.cheve-brand.cheve-pedido .cheve-pedido-detail .text-secondary { color: var(--muted); }
  body.cheve-brand .cheve-mesero-overlay > [id$="backdrop"] { background: var(--cheve-modal-backdrop); }
  body.cheve-brand .cheve-mesero-sheet {
    background: var(--cheve-panel);
    color: var(--ink);
    border: 1px solid var(--cheve-line);
    overflow: auto;
    overscroll-behavior: contain;
  }
  body.cheve-brand .cheve-mesero-sheet :is(.text-secondary, .text-outline) { color: var(--muted); }
  body.cheve-brand .cheve-mesero-sheet button:has(> .material-symbols-outlined:only-child) {
    min-width: 36px;
    min-height: 36px;
  }
  body.cheve-brand .cheve-overlay .cheve-modal-close .material-symbols-outlined { color: inherit; }

  @media (max-width: 767px) {
    body.cheve-brand.cheve-caja #appHeader > div { gap: 5px 10px; }
    body.cheve-brand.cheve-caja #appHeader > div > div { max-width: 100%; flex-wrap: wrap; }
    body.cheve-brand.cheve-caja #appHeader > div > div:first-child { flex: 1 1 100%; }
    body.cheve-brand.cheve-caja #appHeader nav {
      display: flex;
      max-width: 100%;
      overflow-x: auto;
      white-space: nowrap;
    }
    body.cheve-brand.cheve-caja #appHeader nav a { min-height: 30px; }
    body.cheve-brand :is(#appHeader, .cheve-page-header) .material-symbols-outlined {
      display: inline-block;
      inline-size: 1em;
      flex: none;
      overflow: hidden;
    }
  }

  /* Operational panels use the same layers as the Caja summary. */
  body.cheve-brand {
    --cheve-operational-field: #211e30;
    --cheve-operational-inset: #201d2d;
    --cheve-operational-raised: #342d49;
  }

  body.cheve-brand :is(.cheve-operational-surface, .cheve-inventario .tabPanel.bg-white,
    .cheve-inventario .tabPanel > .bg-white, .cheve-fiscal main section.bg-white,
    .cheve-hotel-body section.bg-white) {
    background: var(--cheve-surface);
    border: 1px solid var(--cheve-line);
    border-radius: var(--cheve-radius);
    min-width: 0;
  }

  body.cheve-brand :is(.cheve-operational-dialog, .cheve-themed-overlay > :first-child,
    dialog:has(.ca-dialog-head, .dialog-heading, .tg-dialog-head)) {
    background: var(--cheve-surface);
    color: var(--ink);
  }

  body.cheve-brand .cheve-overlay > .cheve-operational-dialog {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.cheve-brand .cheve-overlay > .cheve-operational-dialog > .cheve-modal-body {
    flex: 1 1 auto;
  }

  body.cheve-brand :is(.cheve-themed-overlay > :first-child > div:first-child, .cheve-hotel .cheve-modal-head),
  body.cheve-brand dialog .ca-dialog-head {
    border-color: var(--cheve-line);
  }

  body.cheve-brand .cheve-themed-overlay > :first-child > div:first-child:has(h2,h3),
  body.cheve-brand dialog .ca-dialog-head {
    background: var(--cheve-chrome);
  }

  body.cheve-brand .cheve-themed-overlay > :first-child > div:first-child:has(h2,h3) {
    flex-wrap: wrap;
    gap: 10px;
  }

  body.cheve-brand :is(.cheve-settings, .cheve-operational-dialog, .cheve-themed-overlay, .cheve-inventario, .cheve-fiscal)
  :is(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color]), select, textarea) {
    background-color: var(--cheve-operational-field);
    border-color: var(--cheve-line);
    border-radius: 8px;
    max-width: 100%;
  }

  body.cheve-brand :is(.cheve-settings, .cheve-operational-dialog, .cheve-themed-overlay, .cheve-inventario, .cheve-fiscal, dialog)
  input:is([type=checkbox], [type=radio]) {
    accent-color: var(--primary);
  }

  body.cheve-brand :is(.cheve-settings, .cheve-operational-dialog, .cheve-themed-overlay, .cheve-inventario, .cheve-fiscal, dialog)
  input:is([type=checkbox], [type=radio]):checked {
    background-color: var(--primary);
    border-color: var(--primary);
  }

  body.cheve-brand :is(.cheve-settings, .cheve-operational-dialog, .cheve-themed-overlay, .cheve-inventario, .cheve-fiscal)
  button:not(.cheve-primary) {
    border-radius: 8px;
  }

  body.cheve-brand .cheve-settings [data-mod-action="ajustes-tab"] {
    border: 1px solid var(--cheve-line);
    border-radius: 8px;
  }

  body.cheve-brand .cheve-settings :is(.cheve-settings-table-tile, [data-mod-action="ajustes-print-modal"]) {
    border: 1px solid var(--cheve-line);
    border-radius: 10px;
    background: var(--cheve-operational-inset);
  }

  body.cheve-brand .cheve-settings .cheve-settings-table-tile button[data-mod-action="ajustes-mesa-modal"] {
    color: var(--ink);
    background: transparent;
    overflow-wrap: anywhere;
  }

  body.cheve-brand :is(.cheve-operational-surface, .cheve-inventario .tabPanel, .cheve-themed-overlay) thead {
    background: var(--cheve-operational-inset);
  }

  body.cheve-brand :is(.cheve-operational-surface, .cheve-inventario .tabPanel, .cheve-themed-overlay) :is(th,td) {
    border-color: var(--cheve-line);
  }

  body.cheve-brand .cheve-empty-state { color: var(--muted); }
  body.cheve-brand .cheve-closeout-method {
    background: var(--cheve-operational-raised);
    border: 1px solid var(--cheve-line);
    border-radius: 10px;
    min-width: 0;
    font-variant-numeric: tabular-nums;
  }

  body.cheve-brand .cheve-inventario .tabButton {
    border: 1px solid var(--cheve-line);
    background: var(--cheve-control);
    color: var(--ink);
  }

  body.cheve-brand .cheve-inventario .tabButton.tab-active {
    background: var(--cheve-gold);
    color: #1b160d;
    border-color: #d5ae6c;
  }

  body.cheve-brand .cheve-inventario .tabButton.tab-active .material-symbols-outlined { color: inherit; }
  body.cheve-brand .cheve-inventario .cheve-overlay > .cheve-inventory-dialog { width: 100%; height: auto; }
  body.cheve-brand .cheve-inventario .cheve-overlay > .max-w-5xl:first-child { --cheve-modal-width: 1024px; }
  body.cheve-brand .cheve-inventario .cheve-overlay > .max-w-6xl:first-child { --cheve-modal-width: 1152px; }
  body.cheve-brand .cheve-inventario .cheve-inventory-dialog > form { min-height: 0; max-height: inherit; }

  body.cheve-brand :is(.cheve-hotel, .cheve-themed-overlay) :is(
    h2, h3, h4, strong, b, [class~="text-[#2F1A10]"], [class~="text-[#4B3021]"]:not(button,a)) { color: var(--ink); }
  body.cheve-brand :is(.cheve-hotel, .cheve-themed-overlay) [class~="text-[#7B5A42]"]:not(button,a,.material-symbols-outlined) {
    color: var(--muted);
  }

  body.cheve-brand :is(.cheve-hotel, .cheve-themed-overlay) :is(button,a)[class~="bg-[#4B3021]"]:not([data-hab-tab]) {
    background: var(--cheve-gold);
    border: 1px solid #d5ae6c;
    color: #1b160d;
  }

  body.cheve-brand :is(.cheve-hotel, .cheve-themed-overlay) :is(button,a)[class~="bg-[#4B3021]"]:not([data-hab-tab])
  .material-symbols-outlined { color: inherit; }

  body.cheve-brand :is(.cheve-hotel, .cheve-themed-overlay) :is(button,a)[class~="text-[#4B3021]"]:not([class~="bg-[#4B3021]"]) {
    background: var(--cheve-control);
    border-color: var(--cheve-line);
    color: var(--ink);
  }

  body.cheve-brand #documentDeliverySettingsModal .cheverest-delivery-settings-card {
    background: var(--cheve-surface);
    border-color: var(--cheve-line);
    border-radius: 14px;
  }

  body.cheve-brand #documentDeliverySettingsModal #documentDeliverySettingsPanel {
    background: var(--cheve-operational-inset);
    border-color: var(--cheve-line);
  }

  body.cheve-brand #documentDeliverySettingsModal .cheve-delivery-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    background: var(--cheve-chrome);
    border: 1px solid var(--cheve-line);
    border-radius: 10px;
    padding: 12px 16px;
  }

  /* Fixed header and footer let the payment scroll independently of the final action. */
  body.cheve-brand .cheve-overlay > .cheve-checkout {
    background: var(--cheve-operational-inset);
    width: min(1200px, 100%);
  }

  body.cheve-brand .cheve-checkout-body {
    display: grid;
    grid-template-columns: minmax(164px, .76fr) minmax(0, 1.65fr) minmax(280px, 1.14fr);
    grid-template-areas: "actions order summary";
    align-items: start;
    gap: clamp(10px, 1.5vw, 18px);
    padding: clamp(10px, 1.5vw, 18px);
  }

  body.cheve-brand .cheve-checkout-notice { grid-column: 1 / -1; }
  body.cheve-brand .cheve-checkout-summary { grid-area: summary; padding: clamp(12px, 1.4vw, 20px); }
  body.cheve-brand .cheve-checkout-actions { grid-area: actions; padding: 12px; }
  body.cheve-brand .cheve-checkout-actions h3 { margin-bottom: 10px; font-size: .9rem; }
  body.cheve-brand .cheve-checkout-order { grid-area: order; overflow: hidden; }
  body.cheve-brand .cheve-checkout-tools { display: grid; gap: 6px; }

  body.cheve-brand .cheve-checkout-actions [data-cobro-action],
  body.cheve-brand .cheve-checkout-summary :is([data-cobro-metodo], [data-cobro-comp]) {
    background: var(--cheve-control);
    color: var(--ink);
    border: 1px solid var(--cheve-line);
    border-radius: 8px;
    min-height: 40px;
    line-height: 1.2;
  }

  body.cheve-brand .cheve-checkout-actions [data-cobro-action] {
    justify-content: flex-start;
    text-align: left;
    padding: 8px 10px;
  }

  body.cheve-brand .cheve-checkout-actions [data-cobro-action="empresa"] { margin-bottom: 8px; }
  body.cheve-brand .cheve-checkout-actions [data-cobro-action="anular"] {
    background: #46292c;
    color: #ffb2ad;
    border-color: #784449;
  }

  body.cheve-brand .cheve-checkout-summary :is([data-cobro-metodo], [data-cobro-comp])[aria-pressed=true] {
    background: var(--cheve-gold);
    border-color: #d5ae6c;
    color: #1b160d;
    box-shadow: none;
  }

  body.cheve-brand .cheve-checkout :is([data-cobro-action], [data-cobro-metodo], [data-cobro-comp]):hover:not(:disabled) {
    border-color: #d5ae6c;
  }

  body.cheve-brand .cheve-checkout :is([data-cobro-action], [data-cobro-metodo], [data-cobro-comp]) .material-symbols-outlined {
    color: inherit;
    flex-shrink: 0;
  }

  body.cheve-brand .cheve-checkout-line {
    display: grid;
    grid-template-columns: minmax(28px, .45fr) minmax(0, 2.6fr) minmax(58px, 1fr) minmax(64px, 1.1fr);
    gap: 8px;
    padding: 12px clamp(10px, 1.35vw, 18px);
    align-items: center;
  }

  body.cheve-brand .cheve-checkout-columns {
    background: var(--cheve-operational-raised);
    color: var(--muted);
    font-size: .69rem;
    text-transform: uppercase;
    font-weight: 800;
  }

  body.cheve-brand .cheve-checkout-line > * { min-width: 0; overflow-wrap: anywhere; }
  body.cheve-brand .cheve-checkout-item { font-size: .88rem; font-variant-numeric: tabular-nums; }
  body.cheve-brand .cheve-checkout-order-total {
    background: var(--cheve-operational-inset);
    border-top: 1px solid var(--cheve-line);
    padding: 12px 16px;
  }

  body.cheve-brand .cheve-checkout-footer {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(240px, 1fr);
    align-items: center;
    gap: 8px 16px;
  }

  body.cheve-brand .cheve-checkout-amounts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 16px;
    font-variant-numeric: tabular-nums;
  }

  body.cheve-brand .cheve-checkout-breakdown,
  body.cheve-brand .cheve-checkout-total {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--muted);
    font-size: .78rem;
  }

  body.cheve-brand .cheve-checkout-breakdown b { color: var(--ink); }
  body.cheve-brand .cheve-checkout-total b { color: #f1d69b; font-size: clamp(1.25rem, 2.4vw, 1.9rem); white-space: nowrap; }
  body.cheve-brand .cheve-checkout-footer > button { min-height: 44px; padding: 8px 12px; }
  body.cheve-brand #cobroMesaError { grid-column: 1 / -1; }

  @media (max-width: 1099px) {
    body.cheve-brand .cheve-checkout .cheve-checkout-body {
      grid-template-columns: minmax(0, 1.15fr) minmax(260px, 1fr);
      grid-template-areas: "order summary" "actions actions";
    }
    body.cheve-brand .cheve-checkout-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }

  @media (max-width: 730px) {
    body.cheve-brand .cheve-checkout .cheve-checkout-body {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas: "summary" "order" "actions";
    }
    body.cheve-brand .cheve-checkout-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.cheve-brand .cheve-checkout-footer { grid-template-columns: minmax(0, 1fr); }
    body.cheve-brand .cheve-checkout-amounts { justify-content: space-between; }
    body.cheve-brand .cheve-checkout-summary :is([data-cobro-metodo],[data-cobro-comp]) { min-height: 44px; }
    body.cheve-brand .cheve-checkout-summary [data-cobro-metodo] { padding-block: 6px; }
    body.cheve-brand .cheve-checkout-summary > .mb-5 { margin-bottom: 10px; }
    body.cheve-brand .cheve-settings-content { padding: 12px; }
  }

}
