/* Register screen layout. Pieces come from Escuadra; this file only places them. */

/* TK-242: help panel (F1) */
.esc-status-bar__help { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--frame-muted); }
.esc-status-bar__help .esc-keycap { border-color: var(--frame-muted); color: var(--frame-muted); }
.esc-help { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; }
.esc-help__title { font-size: var(--t-17); font-weight: 700; margin: 0 0 8px; }
.esc-help__keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; align-items: center; margin: 0 0 16px; }
.esc-help__keys dd { margin: 0; }

.sale { flex: 1 1 auto; min-height: 0; display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; align-items: stretch; }
.sale__left { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sale__scanner { flex: 1 1 auto; min-width: 0; height: 56px; border: 0; outline: 0; background: transparent; font-size: var(--t-20); font-weight: 600; }
/* The scanner's frame shows when it has the focus (the field itself has no outline). */
.sale__scan-frame { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 2px solid var(--control-border); }
.sale__scan-frame:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-tint); }
.sale__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 8px; align-content: start; overflow: auto; }
.sale__cart { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; min-height: 420px; }
.sale__customer { padding: 8px; border-bottom: 1px solid var(--card-border); display: flex; }
.sale__lines { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; overflow: auto; min-height: 120px; }
.sale__line { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 56px; padding: 6px 16px; border-bottom: 1px solid var(--card-border); cursor: pointer; }
.sale__line.selected { background: var(--brand-tint); box-shadow: inset 4px 0 0 var(--brand); }
.sale__line.invalid { box-shadow: inset 4px 0 0 var(--error); }
.sale__line.invalid .esc-num { color: var(--error); }
.sale__list { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.sale__totals { padding: 16px; border-top: 1px solid var(--card-border); display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); border-radius: 0 0 6px 6px; }

.checkout { display: flex; flex-wrap: wrap; gap: 24px; }
.checkout__left { flex: 1 1 300px; display: flex; flex-direction: column; gap: 12px; }
.checkout__right { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.checkout__methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.checkout__methods button { min-height: 56px; justify-content: space-between; }
.checkout__methods button[aria-pressed="true"] { border: 2px solid var(--brand); background: var(--brand-tint); color: var(--brand); }

.receipt { width: 320px; max-width: 100%; margin: 0 auto; padding: 16px; background: var(--paper); color: var(--frame); border: 1px dashed var(--control-border); font-family: "Consolas", "Courier New", monospace; font-size: 13px; line-height: 1.4; }
.receipt hr { border: 0; border-top: 1px dashed var(--control-border); margin: 8px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 8px; }
.receipt .center { text-align: center; }
.receipt__logo { display: block; margin: 0 auto 8px; max-width: 100%; height: auto; }
.receipt__qr svg { display: block; width: 30mm; height: 30mm; margin: 8px auto; }
/* TK-280: Configuración → Negocio → Logo. Both previews on paper white: that is where the logo goes. */
.esc-logo-preview { display: flex; flex-wrap: wrap; gap: 16px; }
.esc-logo-preview figure { flex: 1 1 200px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.esc-logo-preview img { display: block; box-sizing: border-box; max-width: 100%; max-height: 120px; object-fit: contain; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.esc-logo-preview__paper img { margin: 0 auto; image-rendering: pixelated; }
.esc-logo-preview figcaption { font-size: var(--t-13); color: var(--text-2); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.kpi { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi__value { font-size: var(--t-32); font-weight: 700; }

.weigh { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 16px; }
.weigh__value { font-size: var(--t-72); font-weight: 700; line-height: 1; }
.weigh__value span { font-size: var(--t-32); color: var(--text-2); }
/* Back office (TK-184, TK-185): product picker for transfers and purchases, and quantity inputs inside table rows. */
.picker { position: relative; min-width: 0; display: flex; flex-direction: column; }
.picker > .esc-search { flex: none; }
.picker .esc-search input:focus-visible { outline: 0; }
.picker__list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 5; list-style: none; margin: 0; padding: 4px;
  background: var(--surface); border-radius: var(--r-control); box-shadow: var(--elev-pop); max-height: 320px; overflow: auto; }
.picker__list button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; min-height: var(--touch);
  border: 0; background: transparent; border-radius: var(--r-small); text-align: left; color: var(--text); cursor: pointer; }
.picker__list button:hover, .picker__list button:focus-visible { background: var(--brand-50); }
.picker__none { padding: 8px 4px; font-size: var(--t-13); }
.cell-input { width: 120px; min-height: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.totals { display: grid; grid-template-columns: max-content max-content; gap: 6px 24px; justify-content: end; font-variant-numeric: tabular-nums; }
.totals dt { color: var(--text-2); }
.totals dd { margin: 0; text-align: right; font-weight: 600; }
.totals .totals__grand { font-size: var(--t-20); font-weight: 700; }
/* TK-194: a quote prints on letter paper without the register's bars and buttons. TK-195: the catalog's QR. */
.print-sheet { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.catalog-qr svg { width: 240px; height: 240px; display: block; }
@media print {
  .esc-status-bar, .esc-side, .esc-topbar, .esc-tabbar, .esc-page-head, .no-print { display: none !important; }
  body, .esc-card { background: var(--paper) !important; box-shadow: none !important; border: 0 !important; }
}
/* TK-213: the audit log's expandable details. */
.audit-detail > td { background: var(--surface-2); }
.audit-data { margin: 8px 0 0; padding: 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font: var(--t-13)/1.5 ui-monospace, Consolas, monospace; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-small); }
.audit-chevron { display: inline-flex; transition: transform .15s; }
.audit-chevron--open { transform: rotate(90deg); }

/* TK-342: Talia's window in Administración, the panel's popup (src/Cloud/panel/src/panel.css .talia-pop) as a drawer on the right. Back office only. */
.talia-drawer { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; padding: 16px; }
.talia-drawer__backdrop { position: absolute; inset: 0; background: rgba(25, 22, 18, 0.25); }
.talia-drawer__box { position: relative; display: flex; flex-direction: column; width: 420px; max-width: 100%; height: 100%; background: var(--surface);
  border-radius: 20px; box-shadow: var(--elev-pop); overflow: hidden; outline: none; }
.talia-drawer__head { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; border-bottom: 1px solid var(--line); }
.talia-drawer__head > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.talia-drawer__head h2 { margin: 0; font-size: var(--t-17); font-weight: 650; }
.talia-drawer__head span { font-size: var(--t-13); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esc-admin .talia-drawer__close { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
.talia-drawer__chat { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.talia-drawer__chat .esc-bubble { max-width: 100%; margin: 0; }
.talia-drawer__chat .esc-bubble-row { align-items: flex-start; } /* the avatar beside the answer, not beside its "Abrir …" */
.talia-drawer__answer { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 85%; }
.esc-bubble-row--user .talia-drawer__answer { align-items: flex-end; }
.esc-admin .talia-drawer__go { align-self: flex-start; }
.talia-drawer__empty { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.talia-drawer__empty p { margin: 0; font-size: var(--t-17); font-weight: 650; }
.talia-drawer__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.talia-drawer__box > .esc-notice { margin: 0 16px 8px; }
.talia-drawer__composer { position: static; margin: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); padding: 8px; }
.talia-drawer__composer input { font-size: var(--t-17); min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); }
.talia-drawer__composer input:focus-visible { box-shadow: var(--ring); }
.talia-drawer__note { margin: 0; padding: 0 16px 12px; font-size: var(--t-13); color: var(--text-2); }
@media (max-width: 760px) {
  .talia-drawer { padding: 0; }
  .talia-drawer__box { width: 100%; border-radius: 0; }
}
