/* LARGA VIDA — Point of sale. Palette from largavida.coffee: carbón rail, leche canvas, terracota for key actions, salvia for "ok". */
:root {
  --ink: #1a1612;          /* carbón */
  --ink-2: #2b211c;
  --stone: #f3eee3;        /* sidebar / avena */
  --paper: #ffffff;
  --sand: #e3dbcc;
  --sand-2: #eee9dc;       /* avena */
  --gold: #d9774f;         /* terracota clara: accents on dark */
  --terracota: #9a4e2f;
  --bronze: #9a4e2f;
  --bronze-ink: #9a4e2f;
  --muted: #5e5046;
  --line: #e3dbcc;
  --line-dark: #3a3228;
  --ok: #56684f;           /* salvia */
  --warn: #b7862b;
  --danger: #a8173a;
  --f-mark: "DM Serif Display", Georgia, serif;
  --f-display: "DM Serif Display", Georgia, serif;
  --f-body: Montserrat, system-ui, sans-serif;
  --r: 999px;
  --r-lg: 10px;
  --shadow: 0 1px 2px rgba(26,22,18,.05), 0 12px 32px -12px rgba(26,22,18,.2);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink-2); font-family: var(--f-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r); font-size: 13px; font-weight: 600; letter-spacing: .02em; cursor: pointer; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-gold { background: var(--terracota); color: #fff; }
.btn-gold:hover:not(:disabled) { background: #843f24; }
.btn-ink { background: var(--ink); color: var(--stone); }
.btn-ink:hover:not(:disabled) { background: var(--terracota); }
.btn-line { border-color: var(--chip, #cfc6b6); background: var(--paper); }
.btn-line:hover:not(:disabled) { border-color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 12.5px; }
.btn-block { width: 100%; }

body.pos { background: var(--stone); font-size: 14.5px; line-height: 1.5; }
.pos h1, .pos h2, .pos h3 { margin: 0; font-family: var(--f-display); font-weight: 400; letter-spacing: 0; line-height: 1.15; }
:where(.pos button) { font: inherit; color: inherit; }
.pos input, .pos select, .pos textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; min-height: 42px; width: 100%; }
.pos input:focus, .pos select:focus, .pos textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold); }
.pos label { display: grid; align-content: start; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pos label.check { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); font-weight: 500; }
.pos label.check input { width: 18px; min-height: 18px; accent-color: var(--bronze); }
.num { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Shell */
.x-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.x-side { background: var(--ink); color: rgba(246,244,240,.72); padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; }
.x-brand { color: var(--stone); padding: 0 8px; display: grid; gap: 2px; }
.x-brand b { font-family: var(--f-mark); font-size: 24px; font-weight: 400; line-height: 1.1; }
.x-brand small { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.x-nav { display: grid; gap: 2px; }
.x-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-lg); font-weight: 500; font-size: 14px; text-decoration: none; color: inherit; }
.x-nav a svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.x-nav a:hover { background: rgba(255,255,255,.05); color: var(--stone); }
.x-nav a[aria-current="page"] { background: rgba(217,119,79,.16); color: var(--stone); }
.x-nav .badge { margin-left: auto; background: var(--danger); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 7px; }
.x-foot { margin-top: auto; display: grid; gap: 10px; font-size: 13px; }
.x-me { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line-dark); border-radius: var(--r-lg); }
.x-me strong { color: var(--stone); display: block; font-size: 13.5px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.x-foot button { background: none; border: 0; color: inherit; cursor: pointer; text-align: left; padding: 0 4px; }
.x-foot button:hover { color: var(--gold); }
.x-main { min-width: 0; padding: 24px max(20px, 2.4vw) 48px; }
.x-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.x-top h1 { font-size: clamp(26px, 2.6vw, 34px); }
.x-top p { margin: 2px 0 0; color: var(--muted); }
.x-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Generic blocks */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: 20px; }
.card-b { padding: 16px 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 4px; }
.kpi small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi strong { font-size: 28px; line-height: 1.1; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.cols > * { min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: grid; gap: 14px; }
.table-wrap { overflow-x: auto; }
table.x-table { width: 100%; border-collapse: collapse; }
.x-table th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--stone); white-space: nowrap; }
.x-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.x-table tr:last-child td { border-bottom: 0; }
.x-table .r { text-align: right; }
.x-table tr.void td { color: var(--muted); text-decoration: line-through; }
.x-table tr.click { cursor: pointer; }
.x-table tr.click:hover td { background: #fbf8f2; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 3px 9px; border-radius: 99px; white-space: nowrap; text-transform: uppercase; background: #ecebe8; color: var(--muted); }
.pill.ok { background: #e6f0e8; color: var(--ok); }
.pill.low { background: #f7ecd6; color: #8a5f12; }
.pill.out, .pill.void { background: #f4e2df; color: var(--danger); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.ib { background: none; border: 1px solid var(--line); border-radius: var(--r-lg); width: 34px; height: 34px; display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.ib:hover { border-color: var(--ink); }
.ib svg { width: 16px; height: 16px; }
.ib.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8a3830; }
.bar { height: 8px; background: var(--sand-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--paper); }
.seg button { border: 0; background: none; padding: 8px 14px; cursor: pointer; font-size: 13px; font-weight: 500; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--stone); }

/* Sale screen */
.sale { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.sale-search { display: flex; gap: 8px; margin-bottom: 12px; }
.sale-search input { flex: 1; min-height: 48px; font-size: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid #cfc6b6; background: var(--paper); border-radius: 99px; padding: 6px 14px; cursor: pointer; font-size: 13px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--stone); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; cursor: pointer; display: grid; gap: 4px; min-height: 104px; align-content: space-between; position: relative; }
.tile:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.tile:active { transform: scale(.98); }
.tile b { font-weight: 600; font-size: 14px; line-height: 1.3; }
.tile .t-cat { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-ink); font-weight: 600; }
.tile .t-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.tile .t-price { font-weight: 600; font-size: 15px; }
.tile .t-stock { font-size: 11.5px; color: var(--muted); }
.tile .t-stock.low { color: #8a5f12; }
.tile[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; border-color: var(--line); }

.cart { position: sticky; top: 20px; display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.cart-h { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.cart-h .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cart-h h2 { font-size: 22px; }
.cust-btn { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--stone); padding: 8px 12px; cursor: pointer; text-align: left; font-size: 13.5px; }
.cust-btn svg { width: 16px; height: 16px; color: var(--bronze); flex: none; }
.cust-btn span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lines { overflow-y: auto; flex: 1; min-height: 120px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.line .l-name { font-weight: 600; font-size: 14px; }
.line .l-unit { font-size: 12px; color: var(--muted); }
.line .l-total { text-align: right; font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: var(--stone); cursor: pointer; font-size: 16px; line-height: 1; }
.qty button:hover { background: var(--sand-2); }
.qty input { width: 46px; min-height: 30px; height: 30px; border: 0; border-radius: 0; text-align: center; padding: 0 4px; }
.line .l-ctrl { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.line .l-ctrl .ib { width: 30px; height: 30px; }
.totals { padding: 12px 16px; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 14px; }
.totals .t { display: flex; justify-content: space-between; gap: 8px; }
.totals .t.grand { font-size: 22px; font-weight: 600; padding-top: 6px; margin-top: 4px; border-top: 1px solid var(--line); }
.totals .t a { color: var(--bronze-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cart-f { padding: 0 16px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.cart-f .btn-gold { min-height: 54px; font-size: 12.5px; padding: 0 12px; white-space: normal; line-height: 1.3; }
.shift-warn { background: #f7ecd6; color: #6d4b0e; border-radius: var(--r-lg); padding: 10px 12px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }

.mbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--ink); color: var(--stone); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); align-items: center; justify-content: space-between; gap: 12px; }
.mbar strong { font-size: 18px; font-weight: 500; display: block; }
.mbar small { color: rgba(246,244,240,.6); font-size: 12px; }

/* Order type, line options, modifier picker */
.order-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.order-row .seg button { padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
.order-row input { min-height: 38px; padding: 6px 10px; font-size: 13.5px; }
.line .l-opts { font-size: 12px; color: var(--terracota); line-height: 1.35; }
.mod-group { display: grid; gap: 8px; }
.mod-group h3 { font-family: var(--f-body); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mod-group h3 small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1px solid #cfc6b6; background: var(--paper); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 14px; font-weight: 500; display: inline-flex; gap: 6px; align-items: baseline; }
.opt small { font-size: 11.5px; color: var(--terracota); font-weight: 600; }
.opt:hover { border-color: var(--ink); }
.opt[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--stone); }
.opt[aria-pressed="true"] small { color: var(--gold); }
.mods-pick { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; }
.mods-pick legend { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.mods-pick small { font-size: 12px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(22,24,20,.55); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .12s ease-out; }
.modal { background: var(--paper); border-radius: var(--r-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 24px 64px -16px rgba(0,0,0,.45); }
.modal.wide { width: min(760px, 100%); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 1; }
.modal-h h2 { font-size: 24px; }
.modal-b { padding: 18px 20px; display: grid; gap: 14px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }

/* Payment */
.pay-due { text-align: center; padding: 6px 0 2px; }
.pay-due small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.pay-due strong { display: block; font-size: 40px; font-weight: 500; line-height: 1.15; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.method { border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-lg); padding: 12px 8px; cursor: pointer; display: grid; justify-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.method svg { width: 22px; height: 22px; color: var(--bronze); }
.method[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--stone); }
.method[aria-pressed="true"] svg { color: var(--gold); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { border: 1px solid var(--line); background: var(--stone); border-radius: var(--r-lg); padding: 8px 12px; cursor: pointer; font-weight: 500; font-size: 13px; }
.quick button:hover { border-color: var(--gold); }
.pay-list { display: grid; gap: 6px; }
.pay-list .p { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--stone); border-radius: var(--r-lg); padding: 8px 12px; }
.pay-sum { display: grid; gap: 4px; font-size: 15px; }
.pay-sum .t { display: flex; justify-content: space-between; }
.pay-sum .change { font-size: 22px; font-weight: 600; color: var(--ok); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ink); }
.login-box { width: min(420px, 100%); display: grid; gap: 22px; color: var(--stone); }
.login-box .x-brand { text-align: center; justify-items: center; }
.login-box .x-brand b { font-size: 40px; }
.users { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.user-tile { border: 1px solid var(--line-dark); background: rgba(255,255,255,.03); color: var(--stone); border-radius: var(--r-lg); padding: 12px 14px; cursor: pointer; display: grid; justify-items: center; gap: 6px; min-width: 104px; font-size: 13px; }
.user-tile[aria-pressed="true"] { border-color: var(--gold); background: rgba(217,119,79,.16); }
.user-tile small { color: var(--gold); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.pin-dots { display: flex; justify-content: center; gap: 12px; height: 16px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--gold); }
.pin-dots i.on { background: var(--gold); }
.pin-dots.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(300px, 100%); margin: 0 auto; }
.pad button { height: 60px; border-radius: var(--r-lg); border: 1px solid var(--line-dark); background: rgba(255,255,255,.04); color: var(--stone); font-size: 22px; cursor: pointer; }
.pad button:hover { background: rgba(255,255,255,.09); }
.pad button.fn { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.login-msg { text-align: center; font-size: 13px; color: rgba(246,244,240,.6); min-height: 20px; margin: 0; }
.login-msg.err { color: #e7a79f; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--stone); padding: 12px 18px; border-radius: var(--r-lg); box-shadow: var(--shadow); z-index: 60; font-size: 14px; animation: fade .15s; max-width: calc(100vw - 32px); }

/* Receipt (print only) */
#receipt { display: none; }
@media print {
  @page { size: 80mm auto; margin: 4mm; }
  body.pos { background: #fff; }
  body.pos > *:not(#receipt) { display: none !important; }
  #receipt { display: block; font-family: "Courier New", monospace; font-size: 11.5px; line-height: 1.35; color: #000; width: 72mm; }
  #receipt .c { text-align: center; }
  #receipt h3 { font-family: inherit; font-size: 15px; margin: 0 0 2px; letter-spacing: .1em; }
  #receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
  #receipt table { width: 100%; border-collapse: collapse; }
  #receipt td { padding: 1px 0; vertical-align: top; }
  #receipt td.r { text-align: right; white-space: nowrap; }
  #receipt .big td { font-size: 14px; font-weight: 700; }
}

/* Responsive */
@media (max-width: 1100px) {
  .sale { grid-template-columns: minmax(0, 1fr) 340px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .x-shell { grid-template-columns: minmax(0, 1fr); }
  .x-side { min-width: 0; position: sticky; top: 0; height: auto; z-index: 20; flex-direction: row; align-items: center; padding: 8px 12px; gap: 10px; overflow-x: auto; }
  .x-side .x-brand { display: none; }
  .x-nav { display: flex; gap: 2px; }
  .x-nav a { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .x-nav a span.lbl { display: none; }
  .x-nav a[aria-current="page"] span.lbl { display: inline; }
  .x-foot { margin: 0 0 0 auto; display: flex; align-items: center; }
  .x-me { display: none; }
  .x-main { padding: 16px 16px 40px; }
  .sale { grid-template-columns: 1fr; }
  .cart { position: static; max-height: none; scroll-margin-top: 64px; }
  .mbar { display: flex; }
  .toast { bottom: 96px; }
  .x-main:has(.mbar:not(.hidden)) { padding-bottom: 96px; }
  .cols, .grid3 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .grid2 { grid-template-columns: 1fr; }
  .kpi strong { font-size: 22px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Price breakdown in the product editor */
.price-split { display: flex; flex-wrap: wrap; gap: 6px 18px; background: var(--sand-2); border-radius: var(--r-lg); padding: 10px 14px; font-size: 13px; color: var(--muted); margin-top: -4px; }
.price-split b { color: var(--ink-2); font-weight: 600; margin-left: 4px; }

/* Cuadre: cash and card close side by side */
.cuadre { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cq { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 12px; align-content: start; }
.cq h3 { font-family: var(--f-body); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.cq h3 svg { width: 18px; height: 18px; color: var(--terracota); }
.pay-sum .t.strong { font-weight: 600; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.pay-sum .t.diff { font-weight: 600; font-size: 16px; }
.pay-sum .t.diff.ok { color: var(--ok); }
.pay-sum .t.diff.bad { color: var(--danger); }
@media (max-width: 620px) { .cuadre { grid-template-columns: 1fr; } }

/* e-CF: receipt type at checkout, status boxes, settings */
.ecf-pick { display: grid; justify-items: center; gap: 6px; }
.ecf-pick small { font-size: 12.5px; }
.ecf-warn { background: #f7ecd6; color: #6d4b0e; border-radius: var(--r-lg); padding: 10px 12px; font-size: 13px; }
.ecf-line { margin-top: 6px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.ecf-line b { color: var(--ink-2); }
.ecf-box { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.ecf-box > div:first-child { display: grid; }
.ecf-box small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.ecf-box .muted { grid-column: 1 / -1; font-size: 13px; }
.ecf-json { background: var(--ink); color: #e3dacd; border-radius: var(--r-lg); padding: 12px; font-size: 11.5px; max-height: 320px; overflow: auto; margin: 0; white-space: pre; }
.doc-hint { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; color: var(--ok); min-height: 16px; }
.doc-hint.bad { color: var(--danger); }
.x-table.seq td { padding: 6px 8px; }
.x-table.seq td:nth-child(2) { display: flex; align-items: center; gap: 6px; }
.x-table.seq input { min-height: 36px; padding: 6px 8px; }
.x-table.seq .seq-n { max-width: 140px; }
@media print { #receipt .qr { width: 32mm; margin: 4px auto; } #receipt .qr svg { width: 100%; height: auto; } }

/* Server connection */
.sync-st { font-size: 12px; padding: 6px 10px; border-radius: 99px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.sync-st.ok { color: #9db293; }
.sync-st.off { color: #e7a79f; }
.login-box.connect { gap: 16px; }
.login-box.connect label { color: rgba(246,244,240,.7); }
.login-box.connect label.check { color: var(--stone); font-size: 13px; }
.login-box.connect .login-msg { text-align: left; }
.login-box.connect .login-msg.err { text-align: center; }
@media (max-width: 860px) { .sync-st { padding: 4px 8px; } }
.ecf-box .ecf-err { grid-column: 1 / -1; font-size: 12.5px; color: var(--danger); }
