/* Caja (T14, propuesta aprobada el 21/10/2026): lo que entra, lo que sale y lo que vence.
   Todo queda acotado a #cashView y usa la paleta azul de Datos › Pagos, con Burotec Sans y 12 px como mínimo.
   La barra superior canónica no se toca. Los diálogos de pago son los de Datos (#payablesDialogs, en data-identity.css). */
#cashView{ --cash-ink: #18233f; --cash-text: #29334d; --cash-muted: #5b6580; --cash-line: #dfe5f1; --cash-soft: #f4f6fb; --cash-blue: #2563eb; --cash-blue-ink: #1d4ed8; --cash-blue-deep: #132f6b; --cash-blue-soft: #eaf1ff; --cash-green-ink: #0b6b4a; --cash-green-soft: #e8f8f1; --cash-rose: #be123c; --cash-rose-soft: #fff1f4;
  min-height: calc(100vh - 126px); padding: 24px clamp(16px, 3vw, 40px) 48px; color: var(--cash-text); background: #f3f5fa; font-family: var(--font-family); font-size: 14px; }
#cashView .app-icon{ width: 18px; height: 18px; flex: none; }
#cashView .cash-screen{ display: grid; gap: 16px; width: min(100%, 1280px); margin: 0 auto; }
#cashView [hidden]{ display: none !important; }

/* Modo ejemplo de los tutoriales (`js/tutorials/cash-demo.js`): una franja fija avisa que los datos son inventados. */
#cashView .cash-demo-ribbon{ position: sticky; top: 76px; z-index: 12; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px 10px 14px; border: 1px solid #c9d6f5; border-left: 6px solid var(--cash-blue); border-radius: 16px; color: var(--cash-ink); background: #fff; box-shadow: 0 12px 26px rgba(37,99,235,.16); }
#cashView .cash-demo-ribbon__tag{ display: inline-flex; flex: none; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; color: #fff; background: var(--cash-blue-ink); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
#cashView .cash-demo-ribbon__tag .app-icon{ width: 15px; height: 15px; }
#cashView .cash-demo-ribbon__text{ flex: 1 1 260px; min-width: 0; margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; }
#cashView .cash-demo-ribbon__exit{ display: inline-flex; flex: none; min-height: 40px; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid #c9d6f5; border-radius: 12px; color: var(--cash-blue-ink); background: #eef4ff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
#cashView .cash-demo-ribbon__exit:hover{ background: #dbe7ff; }
#cashView .cash-demo-ribbon__exit:focus-visible{ outline: 3px solid var(--cash-blue); outline-offset: 2px; }
#cashView .cash-demo-ribbon__exit .app-icon{ width: 15px; height: 15px; }
@media (max-width: 640px){ #cashView .cash-demo-ribbon{ position: static; } #cashView .cash-demo-ribbon__text{ flex-basis: 100%; font-size: 13px; } }
/* Los recorridos suben la cabecera de estas tarjetas hasta debajo de la barra y de la franja del ejemplo. */
#cashView .cash-moves > header, #cashView .cash-due > header{ scroll-margin-top: 200px; }

/* Franja de Caja: misma construcción que las cabeceras de Datos › Pagos. */
#cashView .cash-hero{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px 18px; align-items: center; padding: 22px 24px; border-radius: 22px; color: #fff; background: linear-gradient(115deg, var(--cash-blue-deep), var(--cash-blue)); box-shadow: 0 14px 32px rgba(37, 99, 235, .22); }
#cashView .cash-hero__icon{ display: grid; width: 50px; height: 50px; place-items: center; border: 1px solid rgba(255,255,255,.26); border-radius: 15px; background: rgba(255,255,255,.16); }
#cashView .cash-hero__icon .app-icon{ width: 25px; height: 25px; }
#cashView .cash-hero__text{ min-width: 0; }
#cashView .cash-hero__kicker{ display: block; color: rgba(255,255,255,.84); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
#cashView .cash-hero__kicker #cashDateLabelCompact{ display: none; }
#cashView .cash-hero h2{ margin: 3px 0 0; color: #fff; font-size: 24px; font-weight: 850; letter-spacing: -.02em; line-height: 1.15; }
#cashView .cash-hero p{ margin: 5px 0 0; color: rgba(255,255,255,.9); font-size: 14px; line-height: 1.45; }
#cashView .cash-hero__tools{ display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
#cashView .cash-hero__tools > button:not(.tutorial-access-button){ display: inline-flex; min-height: 44px; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid rgba(255,255,255,.4); border-radius: 12px; color: #fff; background: rgba(255,255,255,.14); font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer; transition: transform .18s ease, background .18s ease; }
#cashView .cash-hero__tools > button:not(.tutorial-access-button):hover{ background: rgba(255,255,255,.22); transform: translateY(-1px); }
#cashView .cash-hero__tools > button:not(.tutorial-access-button):focus-visible{ outline: 3px solid #fff; outline-offset: 2px; }
#cashView .cash-hero__tools > button:disabled{ opacity: .6; cursor: progress; }
#cashView .cash-hero__tools .app-icon{ width: 16px; height: 16px; }
#cashView .cash-hero .tutorial-access-button{ border-color: #c9d6f5; color: var(--cash-blue-ink); background: #fff; }
#cashView .cash-hero .tutorial-access-button:hover, #cashView .cash-hero .tutorial-access-button:focus-visible{ border-color: var(--cash-blue-ink); color: var(--cash-blue-ink); background: #eef4ff; box-shadow: 0 8px 18px rgba(7, 17, 40, .2); }
#cashView .cash-hero .tutorial-access-button:focus-visible{ outline: 3px solid #fff; outline-offset: 2px; }
#cashView .cash-hero .tutorial-access-button:active{ color: var(--cash-blue-ink); background: #dbe7ff; }
#cashView .cash-currency{ display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border: 1px solid rgba(255,255,255,.4); border-radius: 12px; background: rgba(255,255,255,.14); }
#cashView .cash-currency > span{ color: rgba(255,255,255,.88); font-size: 12px; font-weight: 800; }
#cashView .cash-currency select{ min-height: 34px; border: 0; border-radius: 9px; color: var(--cash-ink); background: #fff; font: 800 13px/1 var(--font-family); }
#cashView .cash-currency .smart-select{ min-width: 128px; }
#cashView .cash-currency .smart-select-trigger{ min-height: 34px; border-color: transparent; font-size: 13px; }
#cashView .cash-status{ margin: 24px 0; color: var(--cash-muted); font-size: 15px; text-align: center; }

/* Pestañas «Hoy» y «Para pagar», y el acceso al historial en Datos. */
#cashView .cash-workspace{ display: grid; gap: 16px; }
#cashView .cash-tabs{ display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--cash-line); border-radius: 16px; background: #fff; }
#cashView .cash-tabs > button{ display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 8px 16px; border: 0; border-radius: 11px; color: var(--cash-muted); background: transparent; font-size: 14px; font-weight: 800; white-space: nowrap; cursor: pointer; }
#cashView .cash-tabs > button[aria-selected="true"]{ color: var(--cash-blue-ink); background: var(--cash-blue-soft); }
#cashView .cash-tabs > button:focus-visible{ outline: 3px solid rgba(37,99,235,.35); outline-offset: 2px; }
#cashView .cash-tabs i{ min-width: 24px; padding: 2px 7px; border-radius: 999px; color: var(--cash-rose); background: var(--cash-rose-soft); font-size: 12px; font-style: normal; font-weight: 850; text-align: center; }
#cashView .cash-tabs .cash-history{ margin-left: auto; border: 1px solid #c9d6f5; color: var(--cash-blue-ink); background: #f5f8ff; }
#cashView .cash-tabs .cash-history:hover{ border-color: var(--cash-blue); }

/* Tres tarjetas, como en Datos › Pagos. */
#cashView .cash-deck{ display: grid; grid-template-columns: 1.25fr 1fr .85fr; gap: 14px; }
#cashView .cash-action{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 96px; padding: 16px 20px; border: 1px solid var(--cash-line); border-radius: 20px; color: var(--cash-ink); background: #fff; text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
#cashView .cash-action:hover{ transform: translateY(-2px); box-shadow: 0 14px 28px rgba(19,47,107,.12); }
#cashView .cash-action:focus-visible{ outline: 3px solid rgba(37,99,235,.35); outline-offset: 3px; }
#cashView .cash-action__icon{ display: grid; width: 50px; height: 50px; place-items: center; border-radius: 16px; color: var(--cash-blue-ink); background: var(--cash-blue-soft); }
#cashView .cash-action__icon .app-icon{ width: 25px; height: 25px; }
#cashView .cash-action__copy{ min-width: 0; }
#cashView .cash-action__copy b{ display: block; font-size: 17px; font-weight: 850; }
#cashView .cash-action__copy > span{ display: block; margin-top: 3px; color: var(--cash-muted); font-size: 13px; line-height: 1.4; }
#cashView .cash-action > .app-icon{ color: #9aa6c0; }
#cashView .cash-action.is-main{ border-color: transparent; color: #fff; background: linear-gradient(120deg, var(--cash-blue-ink), #3b82f6); box-shadow: 0 14px 30px rgba(37,99,235,.28); }
#cashView .cash-action.is-main .cash-action__copy > span, #cashView .cash-action.is-main > .app-icon{ color: rgba(255,255,255,.92); }
#cashView .cash-action.is-main .cash-action__icon{ color: #fff; background: rgba(255,255,255,.18); }
#cashView .cash-action.is-quiet{ background: var(--cash-soft); }
#cashView .cash-action.is-quiet .cash-action__icon{ background: #fff; }
#cashView .cash-counts{ display: flex !important; flex-wrap: wrap; gap: 6px; margin-top: 7px !important; }
#cashView .cash-counts i{ padding: 3px 9px; border: 1px solid var(--cash-line); border-radius: 999px; color: #4a5470; background: #fff; font-size: 12px; font-style: normal; font-weight: 800; }

/* «Hoy»: la línea de tiempo y, al costado, el cajón y cómo se cobró. */
#cashView .cash-grid{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; }
#cashView .cash-side{ display: grid; gap: 16px; }
#cashView .cash-card{ overflow: hidden; border: 1px solid var(--cash-line); border-radius: 20px; background: #fff; }
#cashView .cash-card > header{ display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #e8ecf4; }
#cashView .cash-card > header > div{ flex: 1; min-width: 0; }
#cashView .cash-card h3{ display: flex; align-items: center; gap: 8px; margin: 0; color: var(--cash-ink); font-size: 17px; font-weight: 850; }
#cashView .cash-card header p{ margin: 2px 0 0; color: var(--cash-muted); font-size: 13px; line-height: 1.4; }
#cashView .cash-pill{ flex: none; padding: 5px 11px; border-radius: 999px; color: var(--cash-blue-ink); background: var(--cash-blue-soft); font-size: 13px; font-weight: 850; white-space: nowrap; }
#cashView .cash-empty{ margin: 0; padding: 18px; color: var(--cash-muted); font-size: 14px; line-height: 1.5; }
#cashView .cash-filter{ display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-bottom: 1px solid #eef1f6; }
#cashView .cash-filter button{ display: inline-flex; min-height: 36px; align-items: center; padding: 5px 13px; border: 1.5px solid #e2e7f0; border-radius: 999px; color: #34405e; background: #fff; font-size: 13px; font-weight: 750; cursor: pointer; }
#cashView .cash-filter button[aria-pressed="true"]{ border-color: var(--cash-blue); color: var(--cash-blue-deep); background: #eff5ff; }
#cashView .cash-filter button:focus-visible{ outline: 3px solid rgba(37,99,235,.35); outline-offset: 2px; }
#cashView .cash-move{ display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid #eef1f6; }
#cashView .cash-move:last-child{ border-bottom: 0; }
/* Con algún gasto anulable, todas las filas reservan la columna del botón: los importes quedan alineados. */
#cashView .cash-move-list.has-void .cash-move{ grid-template-columns: 54px minmax(0, 1fr) auto 34px; }
#cashView .cash-move time{ color: var(--cash-muted); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
#cashView .cash-move b{ display: block; color: var(--cash-ink); font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
#cashView .cash-move small{ display: block; margin-top: 3px; color: var(--cash-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#cashView .cash-move strong{ color: var(--cash-ink); font-size: 15px; font-weight: 850; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
#cashView .cash-move.is-in strong{ color: var(--cash-green-ink); }
#cashView .cash-move.is-pending strong{ color: var(--cash-muted); }
#cashView .cash-move.is-void b, #cashView .cash-move.is-void strong{ color: #8a93a8; text-decoration: line-through; }
#cashView .cash-tag{ display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 7px; color: var(--cash-blue-ink); background: var(--cash-blue-soft); font-size: 12px; font-weight: 800; }
#cashView .cash-tag.is-cash{ color: var(--cash-green-ink); background: var(--cash-green-soft); }
#cashView .cash-move__void{ display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid var(--cash-line); border-radius: 10px; color: var(--cash-muted); background: #fff; cursor: pointer; }
#cashView .cash-move__void:hover, #cashView .cash-move__void:focus-visible{ border-color: var(--cash-rose); color: var(--cash-rose); outline: 0; }
#cashView .cash-move__void .app-icon{ width: 15px; height: 15px; }

/* Cajón de efectivo. */
#cashView .cash-drawer__state{ flex: none; padding: 4px 10px; border-radius: 999px; color: var(--cash-muted); background: var(--cash-soft); font-size: 12px; font-weight: 850; }
#cashView .cash-drawer[data-state="open"] .cash-drawer__state{ color: var(--cash-green-ink); background: var(--cash-green-soft); }
#cashView .cash-drawer[data-state="closed"] .cash-drawer__state{ color: var(--cash-blue-ink); background: var(--cash-blue-soft); }
#cashView .cash-drawer__body{ display: grid; gap: 12px; padding: 16px 18px 18px; }
#cashView .cash-eq{ display: grid; gap: 8px; }
#cashView .cash-eq > div{ display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--cash-text); background: var(--cash-soft); font-size: 14px; }
#cashView .cash-eq strong{ white-space: nowrap; font-variant-numeric: tabular-nums; }
#cashView .cash-eq .is-total{ color: var(--cash-green-ink); background: var(--cash-green-soft); font-size: 15px; font-weight: 850; }
#cashView .cash-drawer__close, #cashView .cash-suggestion, #cashView .cash-opening__other button{ display: inline-flex; width: 100%; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border: 0; border-radius: 13px; color: #fff; background: var(--cash-blue); font-size: 14px; font-weight: 850; cursor: pointer; }
#cashView .cash-suggestion{ display: block; text-align: center; line-height: 1.35; }
#cashView .cash-drawer__close:hover, #cashView .cash-suggestion:hover, #cashView .cash-opening__other button:hover{ background: var(--cash-blue-ink); }
#cashView .cash-drawer__close:focus-visible, #cashView .cash-suggestion:focus-visible, #cashView .cash-opening__other button:focus-visible{ outline: 3px solid rgba(37,99,235,.35); outline-offset: 2px; }
#cashView .cash-drawer button:disabled{ opacity: .6; cursor: not-allowed; }
#cashView .cash-opening__note{ margin: 0; padding: 12px; border: 1.5px dashed #cfd6e6; border-radius: 14px; color: var(--cash-muted); font-size: 13px; line-height: 1.5; }
#cashView .cash-opening__other summary{ min-height: 36px; padding: 8px 0; color: var(--cash-blue-ink); font-size: 13px; font-weight: 850; cursor: pointer; }
#cashView .cash-opening__other p{ margin: 0 0 8px; color: var(--cash-muted); font-size: 13px; line-height: 1.45; }
#cashView .cash-opening__other label{ display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; margin-bottom: 10px; }
#cashView .cash-opening__other label > span{ grid-column: 1 / -1; color: #34405e; font-size: 13px; font-weight: 800; }
#cashView .cash-opening__other label > b{ grid-column: 2; grid-row: 2; color: var(--cash-muted); font-size: 13px; }
#cashView .cash-opening__other input{ grid-column: 1; grid-row: 2; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #ccd5e6; border-radius: 12px; color: var(--cash-ink); font: 800 15px/1.2 var(--font-family); }
#cashView .cash-form-error:empty{ display: none; }
#cashView .cash-form-error{ margin: 0; color: var(--cash-rose); font-size: 13px; font-weight: 700; line-height: 1.4; }
#cashView .cash-closed{ display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border-radius: 14px; color: var(--cash-blue-deep); background: #eef4ff; }
#cashView .cash-closed strong{ display: block; font-size: 14px; }
#cashView .cash-closed p{ margin: 2px 0 0; color: var(--cash-text); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }

/* Cómo se cobró hoy: el detalle por medio y estado del cierre de siempre. */
#cashView .cash-totals{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 14px 18px 4px; }
#cashView .cash-totals > div{ padding: 10px 12px; border-radius: 12px; background: var(--cash-soft); }
#cashView .cash-totals dt{ color: var(--cash-muted); font-size: 12px; font-weight: 800; }
#cashView .cash-totals dd{ margin: 3px 0 0; color: var(--cash-ink); font-size: 15px; font-weight: 850; white-space: nowrap; font-variant-numeric: tabular-nums; }
#cashView .cash-totals .is-total{ background: var(--cash-blue-soft); }
#cashView .cash-totals .is-total dd{ color: var(--cash-blue-deep); }
#cashView .cash-method-list{ display: grid; gap: 2px; padding: 8px 18px 16px; }
#cashView .cash-method-list article{ display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef1f6; }
#cashView .cash-method-list article:last-child{ border-bottom: 0; }
#cashView .cash-method-list p{ display: grid; margin: 0; min-width: 0; }
#cashView .cash-method-list strong{ color: var(--cash-ink); font-size: 14px; }
#cashView .cash-method-list span{ color: var(--cash-muted); font-size: 12px; }
#cashView .cash-method-list b{ color: var(--cash-ink); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#cashView .cash-method-list .is-pending b{ color: var(--cash-muted); }
#cashView .cash-method-list .cash-empty{ padding: 4px 0 0; font-size: 13px; }

/* «Para pagar». */
#cashView .cash-due-row{ display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid #eef1f6; }
#cashView .cash-due-row:last-child{ border-bottom: 0; }
#cashView .cash-day{ display: grid; width: 52px; height: 54px; place-items: center; align-content: center; border-radius: 12px; color: var(--cash-blue-ink); background: #eef3ff; text-align: center; }
#cashView .cash-day strong{ font-size: 18px; line-height: 1; }
#cashView .cash-day span{ font-size: 12px; font-weight: 700; }
#cashView .cash-due-row.is-overdue .cash-day{ color: var(--cash-rose); background: var(--cash-rose-soft); }
#cashView .cash-due-row b{ display: block; color: var(--cash-ink); font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
#cashView .cash-due-row small{ display: block; margin-top: 2px; color: var(--cash-muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
#cashView .cash-due-row.is-overdue small{ color: var(--cash-rose); }
#cashView .cash-due-row__side{ display: grid; justify-items: end; gap: 6px; }
#cashView .cash-due-row__side strong{ color: var(--cash-ink); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#cashView .cash-due-row__side button{ min-height: 36px; padding: 5px 14px; border: 1px solid #c9d6f5; border-radius: 10px; color: var(--cash-blue-ink); background: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
#cashView .cash-due-row__side button:hover, #cashView .cash-due-row__side button:focus-visible{ border-color: var(--cash-blue); background: #f5f8ff; outline: 0; }

/* Diálogos propios de Caja: contar y cerrar el día, y anular un gasto anterior. */
#cashView .cash-dialog{ width: min(620px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 22px; color: var(--cash-text); box-shadow: 0 30px 90px rgba(23, 36, 59, .33); font-family: var(--font-family); }
#cashView .cash-dialog::backdrop{ background: rgba(24, 34, 57, .62); backdrop-filter: blur(3px); }
#cashView .cash-dialog form > header{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--cash-line); }
#cashView .cash-dialog form > header > span{ display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--cash-blue-ink); background: var(--cash-blue-soft); }
#cashView .cash-dialog form > header p{ margin: 0; color: var(--cash-blue-ink); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
#cashView .cash-dialog form > header h2{ margin: 2px 0 0; color: var(--cash-ink); font-size: 21px; }
#cashView .cash-dialog form > header > button{ display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid var(--cash-line); border-radius: 11px; color: var(--cash-muted); background: #fff; cursor: pointer; }
#cashView .cash-dialog-body{ display: grid; gap: 14px; padding: 20px 22px; }
#cashView .cash-dialog-body > p{ margin: 0; color: var(--cash-muted); font-size: 14px; line-height: 1.5; }
#cashView .cash-dialog label > span{ display: block; margin-bottom: 6px; color: #34405e; font-size: 13px; font-weight: 800; }
#cashView .cash-dialog label b{ color: var(--cash-rose); }
#cashView .cash-dialog textarea, #cashView .cash-dialog input{ width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #ccd5e6; border-radius: 12px; color: var(--cash-ink); font: 15px/1.4 var(--font-family); }
#cashView .cash-close-equation{ display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
#cashView .cash-close-equation > div, #cashView .cash-close-equation > label{ padding: 14px; border-radius: 14px; background: var(--cash-soft); }
#cashView .cash-close-equation small{ display: block; color: var(--cash-muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
#cashView .cash-close-equation strong{ display: block; margin: 4px 0; color: var(--cash-ink); font-size: 22px; white-space: nowrap; }
#cashView .cash-close-equation div > span{ color: var(--cash-muted); font-size: 12px; line-height: 1.4; }
#cashView .cash-close-equation > i{ color: var(--cash-muted); font-size: 13px; font-style: normal; font-weight: 800; }
#cashView .cash-close-equation label > b{ color: var(--cash-muted); font-size: 12px; }
#cashView #cashDifferencePreview{ display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; color: var(--cash-green-ink); background: var(--cash-green-soft); }
#cashView #cashDifferencePreview.has-difference{ color: var(--cash-rose); background: var(--cash-rose-soft); }
#cashView #cashDifferencePreview small{ font-size: 12px; font-weight: 800; letter-spacing: .06em; }
#cashView #cashDifferencePreview strong{ font-size: 20px; }
#cashView #cashDifferencePreview span{ font-size: 13px; }
#cashView .cash-dialog form > footer{ display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 16px 22px 20px; border-top: 1px solid var(--cash-line); }
#cashView .cash-dialog form > footer button{ display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--cash-line); border-radius: 12px; color: var(--cash-ink); background: #fff; font-size: 14px; font-weight: 800; cursor: pointer; }
#cashView .cash-dialog form > footer button[type="submit"]{ border-color: var(--cash-blue); color: #fff; background: var(--cash-blue); }
#cashView .cash-void-dialog form > footer button[type="submit"]{ border-color: var(--cash-rose); background: var(--cash-rose); }
#cashView .cash-dialog .cash-form-error{ margin: 0; }

@media (max-width: 1100px){
  #cashView .cash-deck{ grid-template-columns: 1fr 1fr; }
  #cashView .cash-action.is-quiet{ grid-column: 1 / -1; min-height: 0; }
}
@media (max-width: 900px){
  #cashView .cash-hero{ grid-template-columns: auto minmax(0, 1fr); }
  #cashView .cash-hero__tools{ grid-column: 1 / -1; justify-content: flex-start; }
  #cashView .cash-grid{ grid-template-columns: minmax(0, 1fr); }
  #cashView .cash-side{ grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 680px){
  #cashView{ padding: 14px 12px 32px; }
  #cashView .cash-screen, #cashView .cash-workspace{ gap: 12px; }
  #cashView .cash-hero{ position: relative; padding: 18px; border-radius: 18px; }
  #cashView .cash-hero .tutorial-access-button{ position: absolute; top: 16px; right: 16px; }
  #cashView .cash-hero__text{ padding-right: 54px; }
  #cashView .cash-hero h2{ font-size: 20px; }
  #cashView .cash-hero__kicker #cashDateLabelFull{ display: none; }
  #cashView .cash-hero__kicker #cashDateLabelCompact{ display: inline; }
  #cashView .cash-hero__tools > button:not(.tutorial-access-button){ flex: 1 1 auto; justify-content: center; }
  #cashView .cash-currency{ flex: 1 1 100%; justify-content: space-between; }
  #cashView .cash-tabs > button{ flex: 1 1 auto; justify-content: center; }
  #cashView .cash-tabs .cash-history{ flex-basis: 100%; margin-left: 0; white-space: normal; text-align: left; }
  #cashView .cash-deck{ grid-template-columns: 1fr; }
  #cashView .cash-action{ min-height: 0; padding: 14px 16px; }
  #cashView .cash-side{ grid-template-columns: minmax(0, 1fr); }
  #cashView .cash-move, #cashView .cash-move-list.has-void .cash-move{ grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  #cashView .cash-move time{ grid-column: 1 / -1; }
  #cashView .cash-move__void{ grid-column: 2; justify-self: end; }
  #cashView .cash-due-row{ grid-template-columns: 48px minmax(0, 1fr); padding: 12px 14px; }
  #cashView .cash-due-row__side{ grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: stretch; }
  #cashView .cash-due-row__side strong{ text-align: left; }
  #cashView .cash-totals{ grid-template-columns: 1fr 1fr; }
  #cashView .cash-close-equation{ grid-template-columns: minmax(0, 1fr); }
  #cashView .cash-close-equation > i{ text-align: center; }
  #cashView .cash-dialog form > header, #cashView .cash-dialog-body, #cashView .cash-dialog form > footer{ padding-left: 16px; padding-right: 16px; }
  #cashView .cash-dialog form > footer button{ flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 360px){
  #cashView .cash-totals{ grid-template-columns: minmax(0, 1fr); }
  #cashView .cash-action{ grid-template-columns: auto minmax(0, 1fr); }
  #cashView .cash-action > .app-icon{ display: none; }
}
@media (prefers-reduced-motion: reduce){
  #cashView *, #cashView *::before, #cashView *::after{ transition: none !important; animation: none !important; }
}

/* «Imprimir el día»: los movimientos, el cajón y cómo se cobró, sin botones ni la barra superior. */
@media print {
  @page { margin: 14mm; }
  body.cash-printing *{ visibility: hidden !important; }
  body.cash-printing #cashView, body.cash-printing #cashView *{ visibility: visible !important; }
  body.cash-printing #cashView{ position: absolute; inset: 0; display: block !important; width: 100%; min-height: 0; padding: 0; background: #fff; }
  body.cash-printing .legacy-topbar, body.cash-printing .legacy-footer{ display: none !important; }
  body.cash-printing #cashView .cash-hero{ color: #18233f; background: #fff; box-shadow: none; border: 1px solid #dfe5f1; }
  body.cash-printing #cashView .cash-hero h2, body.cash-printing #cashView .cash-hero p, body.cash-printing #cashView .cash-hero__kicker{ color: #18233f; }
  body.cash-printing #cashView .cash-hero__tools, body.cash-printing #cashView .cash-tabs, body.cash-printing #cashView .cash-deck,
  body.cash-printing #cashView .cash-filter, body.cash-printing #cashView .cash-status, body.cash-printing #cashView .cash-move__void,
  body.cash-printing #cashView .cash-drawer__close, body.cash-printing #cashView .cash-opening, body.cash-printing #cashView .cash-due,
  body.cash-printing #cashView .cash-dialog{ display: none !important; }
  body.cash-printing #cashView .cash-grid{ grid-template-columns: minmax(0, 1fr) 300px; }
  body.cash-printing #cashView .cash-card{ break-inside: avoid; box-shadow: none; }
}
