/* ==========================================================================
   POS — Punto de venta (mostrador)
   Fondo punteado, catálogo en tarjetas y ticket oscuro con recibo de papel.
   Acento de la app POS: #20c997 (apps-catalog). Prefijo de clases: .pos-
   ========================================================================== */

.pos, .pos-sheet {
    --pos-ink: #172233;
    --pos-muted: #5b6778;
    --pos-line: #dbe1e8;
    --pos-navy: #0f2238;
    --pos-navy-2: #152d4a;
    --pos-navy-line: #27466b;
    --pos-on-navy: #e6edf5;
    --pos-on-navy-muted: #9fb3c8;
    --pos-accent: #20c997;
    --pos-paper: #fbfaf7;
    --pos-texture-dark: repeating-linear-gradient(0deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 5px);
    color: var(--pos-ink);
    font-variant-numeric: tabular-nums;
}
.pos {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 64px);
    color: var(--pos-ink);
    background-color: #e9edf2;
    background-image: radial-gradient(#cfd6df 1px, transparent 1px);
    background-size: 16px 16px;
}
.pos button, .pos-sheet button { font-family: inherit; }
.pos .num { font-variant-numeric: tabular-nums; }

/* ── Encabezado ─────────────────────────────────────────────────────────── */
.pos-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 12px 20px; background: rgba(255,255,255,0.9); border-bottom: 1px solid var(--pos-line);
}
.pos-head__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-right: auto; }
.pos-head__title h1 { margin: 0; font-size: 1.25rem; font-weight: 700; color: #0e1f33; }
.pos-head__title span { font-size: 0.78rem; color: var(--pos-muted); }
.pos-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 0 12px; border: 1px solid #c8cdd5; border-radius: 6px;
    background: #fff; color: var(--pos-ink); font-size: 0.85rem; cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.pos-btn:hover { background: #f3f6fa; }
.pos-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.pos-btn--navy { background: #1e3a5f; border-color: #1e3a5f; color: #fff; }
.pos-btn--navy:hover { background: #152d4a; }
.pos-btn--accent { background: var(--pos-accent); border-color: var(--pos-accent); color: #0e1f33; font-weight: 700; }
.pos-btn--accent:hover { background: #1bb386; }
.pos-btn--danger { color: #b91c1c; }
.pos-badge {
    min-width: 20px; padding: 1px 6px; border-radius: 4px; background: #1e3a5f; color: #fff;
    font-size: 0.72rem; font-weight: 600; text-align: center;
}
.pos-status {
    display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px;
    border: 1px solid #b7e4d3; border-radius: 4px; background: #ecfdf5; color: #065f46; font-size: 0.78rem;
}
.pos-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }

/* ── Cuerpo: catálogo + ticket ──────────────────────────────────────────── */
.pos-body { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 16px; padding: 16px 20px; align-items: stretch; }
.pos-catalog { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

.pos-search-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-search {
    flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px;
    border: 1px solid #c8cdd5; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.pos-search:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.18); }
.pos-search i { color: var(--pos-muted); }
.pos-search input { flex: 1 1 auto; width: 0; min-width: 0; border: 0; outline: none; background: transparent; font-size: 0.95rem; color: var(--pos-ink); }
.pos-kbd { padding: 1px 6px; border: 1px solid #c8cdd5; border-bottom-width: 2px; border-radius: 4px; font-size: 0.7rem; color: var(--pos-muted); font-family: inherit; }

.pos-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-chip {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
    border: 1px solid #c8cdd5; border-radius: 6px; background: #fff; color: var(--pos-ink); font-size: 0.85rem; cursor: pointer;
}
.pos-chip span { font-size: 0.7rem; padding: 1px 6px; border-radius: 4px; background: #eef1f4; color: #475569; }
.pos-chip[aria-pressed="true"] { background: #0e1f33; border-color: #0e1f33; color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(14,31,51,0.2); }
.pos-chip[aria-pressed="true"] span { background: var(--pos-accent); color: #0e1f33; }

.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; align-content: start; }
.pos-tile {
    position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left;
    border: 1px solid var(--pos-line); border-radius: 8px; background: #fff; cursor: pointer;
    box-shadow: 0 2px 8px rgba(14,31,51,0.06); transition: border-color .12s, box-shadow .12s;
}
.pos-tile:hover { border-color: #2563eb; box-shadow: 0 4px 16px rgba(14,31,51,0.12); }
.pos-tile:disabled { cursor: not-allowed; }
.pos-tile__thumb {
    display: flex; align-items: center; justify-content: center; height: 80px; font-size: 30px;
    background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.55) 0 6px, transparent 6px 12px);
}
.pos-tile:disabled .pos-tile__thumb { opacity: 0.5; }
.pos-tile__stock {
    position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 4px;
    font-size: 0.7rem; font-weight: 600; background: rgba(255,255,255,0.92); color: #334155;
}
.pos-tile__stock--low { background: #fbbf24; color: #422006; }
.pos-tile__stock--out { background: #b91c1c; color: #fff; }
.pos-tile__info { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.pos-tile__name { font-size: 0.82rem; font-weight: 500; line-height: 1.3; min-height: 2.6em; color: var(--pos-ink); }
.pos-tile__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pos-tile__price { font-size: 0.95rem; font-weight: 700; color: #0e1f33; }
.pos-tile__add { width: 28px; height: 28px; border-radius: 4px; background: #eef4ff; color: #1d4ed8; display: flex; align-items: center; justify-content: center; }

.pos-empty { padding: 40px 24px; border: 1px dashed #b4bcc8; border-radius: 8px; background: #fff; text-align: center; color: var(--pos-muted); font-size: 0.88rem; }
.pos-empty i { display: block; font-size: 36px; color: #cbd5e1; margin-bottom: 8px; }
.pos-skel { height: 150px; border-radius: 8px; background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; }

.pos-keys {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: auto; padding: 8px 12px;
    border: 1px solid var(--pos-line); border-radius: 6px; background: rgba(255,255,255,0.9); font-size: 0.75rem; color: var(--pos-muted);
}
.pos-keys kbd { padding: 1px 5px; border: 1px solid #c8cdd5; border-bottom-width: 2px; border-radius: 4px; font-family: inherit; font-weight: 600; color: var(--pos-ink); }

/* ── Ticket oscuro ──────────────────────────────────────────────────────── */
.pos-ticket {
    flex: 1 1 380px; max-width: 440px; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
    border-radius: 10px; background-color: var(--pos-navy); background-image: var(--pos-texture-dark);
    color: var(--pos-on-navy); box-shadow: 0 10px 30px rgba(14,31,51,0.28);
}
.pos-ticket__top { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 12px; }
.pos-ticket__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pos-ticket__row strong { font-size: 1rem; color: #fff; }
.pos-ticket__row small { font-size: 0.75rem; color: var(--pos-on-navy-muted); }

.pos-customer { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--pos-navy-line); border-radius: 6px; background: var(--pos-navy-2); }
.pos-customer__avatar { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--pos-accent); color: #0e1f33; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.pos-customer__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pos-customer__text strong { font-size: 0.88rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-customer__text span { font-size: 0.75rem; color: var(--pos-on-navy-muted); }
.pos-dk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 10px;
    border: 1px solid #3b5a80; border-radius: 4px; background: transparent; color: var(--pos-on-navy); font-size: 0.8rem; cursor: pointer;
}
.pos-dk-btn:hover { background: #1f3b5c; }
.pos-dk-btn[aria-pressed="true"] { border-color: var(--pos-accent); background: rgba(32,201,151,0.16); color: #a7f3d0; font-weight: 600; }
.pos-dk-btn--danger { color: #fca5a5; }
.pos-customer__search { display: flex; flex-direction: column; gap: 6px; }
.pos-customer__search input {
    width: 100%; box-sizing: border-box; min-height: 40px; padding: 8px 12px; border: 1px solid #3b5a80; border-radius: 4px;
    background: #0b1a2c; color: var(--pos-on-navy); font-size: 0.88rem; font-family: inherit;
}
.pos-customer__results { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; border-radius: 4px; background: #0b1a2c; }
.pos-customer__results button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--pos-navy-line); background: transparent; color: var(--pos-on-navy); text-align: left; cursor: pointer; font-size: 0.85rem; }
.pos-customer__results button:hover, .pos-customer__results button.is-active { background: #1f3b5c; }
.pos-customer__results small { color: var(--pos-on-navy-muted); font-size: 0.72rem; }

.pos-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 6px; background: #0b1a2c; }
.pos-seg button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 44px; border: 0; border-radius: 4px; background: transparent; color: #c9d6e6; font-size: 0.8rem; cursor: pointer; }
.pos-seg button strong { font-weight: 700; }
.pos-seg button small { font-size: 0.68rem; }
.pos-seg button[aria-pressed="true"] { background: #fff; color: #0e1f33; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }

.pos-paper {
    flex: 1 1 auto; display: flex; flex-direction: column; margin: 0 12px; border-radius: 6px 6px 0 0;
    background: var(--pos-paper); background-image: repeating-linear-gradient(0deg, rgba(14,31,51,0.025) 0 1px, transparent 1px 26px); color: var(--pos-ink);
}
.pos-paper__lines { flex: 1 1 auto; min-height: 200px; max-height: 46vh; overflow-y: auto; padding: 4px 12px; }
.pos-paper__empty { padding: 48px 12px; text-align: center; color: var(--pos-muted); font-size: 0.85rem; }
.pos-line { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #d4d9e0; }
.pos-line__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pos-line__text strong { font-size: 0.85rem; font-weight: 500; }
.pos-line__text span { font-size: 0.72rem; color: var(--pos-muted); }
.pos-qty { display: flex; align-items: center; border: 1px solid #c8cdd5; border-radius: 4px; background: #fff; }
.pos-qty button { width: 32px; height: 36px; border: 0; background: transparent; cursor: pointer; font-size: 1rem; color: var(--pos-ink); }
.pos-qty span { min-width: 24px; text-align: center; font-size: 0.85rem; font-weight: 700; }
.pos-line__total { width: 84px; text-align: right; font-size: 0.85rem; font-weight: 700; }
.pos-line__del { width: 32px; height: 36px; border: 0; border-radius: 4px; background: transparent; color: #b91c1c; cursor: pointer; }
.pos-totals { margin: 0; padding: 10px 12px 12px; display: grid; grid-template-columns: 1fr auto; row-gap: 4px; font-size: 0.85rem; border-top: 1px solid #e2e6ea; }
.pos-totals dt { color: var(--pos-muted); }
.pos-totals dd { margin: 0; text-align: right; }
.pos-tear { height: 10px; margin: 0 12px; background-image: radial-gradient(circle at 6px 0, transparent 6px, var(--pos-paper) 6.5px); background-size: 12px 10px; background-repeat: repeat-x; }

.pos-ticket__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 12px 16px 0; }
.pos-ticket__actions .pos-dk-btn { min-height: 44px; }
.pos-ticket__total { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 16px 8px; }
.pos-ticket__total span { font-size: 0.78rem; color: var(--pos-on-navy-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.pos-ticket__total strong { font-size: 1.9rem; font-weight: 700; color: #fff; }
.pos-cobrar {
    display: flex; align-items: center; justify-content: space-between; width: calc(100% - 32px); margin: 0 16px 16px;
    min-height: 58px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--pos-accent); color: #0e1f33;
    font-size: 1.05rem; font-weight: 700; cursor: pointer; box-shadow: 0 6px 16px rgba(32,201,151,0.28);
}
.pos-cobrar:disabled { background: #27466b; color: #c9d6e6; box-shadow: none; cursor: not-allowed; }
.pos-cobrar kbd { padding: 2px 8px; border-radius: 4px; background: rgba(14,31,51,0.14); font-size: 0.72rem; font-family: inherit; }

/* Barra fija en tablet/teléfono */
.pos-mbar { display: none; position: sticky; bottom: 0; z-index: 20; align-items: center; gap: 8px; padding: 10px 12px; background-color: var(--pos-navy); box-shadow: 0 -4px 16px rgba(14,31,51,0.22); }
.pos-mbar a { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 0 14px; border: 1px solid #3b5a80; border-radius: 6px; color: #fff; text-decoration: none; font-size: 0.85rem; }
.pos-mbar a small { font-size: 0.7rem; color: var(--pos-on-navy-muted); }
.pos-mbar .pos-cobrar { flex: 1 1 auto; width: auto; margin: 0; min-height: 52px; }

/* ── Apertura de caja ───────────────────────────────────────────────────── */
.pos-open { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.pos-open__card {
    width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 16px; padding: 24px;
    border-radius: 10px; background-color: var(--pos-navy); background-image: var(--pos-texture-dark); color: var(--pos-on-navy);
    box-shadow: 0 10px 30px rgba(14,31,51,0.28);
}
.pos-open__card h2 { margin: 0; font-size: 1.25rem; color: #fff; }
.pos-open__card p { margin: 0; font-size: 0.85rem; color: var(--pos-on-navy-muted); line-height: 1.5; }
.pos-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; font-weight: 600; }
.pos-field input, .pos-field textarea, .pos-field select {
    min-height: 44px; padding: 8px 12px; border-radius: 6px; font-size: 1rem; font-family: inherit; box-sizing: border-box; width: 100%;
}
.pos-open__card .pos-field input, .pos-open__card .pos-field select { border: 1px solid #3b5a80; background: #0b1a2c; color: #fff; }

/* ── Hoja de cobro / cierre (overlay) ───────────────────────────────────── */
.pos-sheet { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: stretch; justify-content: center; background: rgba(14,31,51,0.55); animation: posFade .15s ease; }
@keyframes posFade { from { opacity: 0; } to { opacity: 1; } }
.pos-sheet__panel {
    display: flex; flex-direction: column; width: 100%; max-width: 1200px; margin: 24px; overflow: hidden; border-radius: 10px;
    background-color: #e9edf2; background-image: radial-gradient(#cfd6df 1px, transparent 1px); background-size: 16px 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.pos-sheet__panel--sm { max-width: 520px; margin: auto 16px; height: auto; }
.pos-sheet__head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: rgba(255,255,255,0.92); border-bottom: 1px solid var(--pos-line); }
.pos-sheet__head h2 { margin: 0; font-size: 1.1rem; font-weight: 700; color: #0e1f33; }
.pos-sheet__head span { font-size: 0.78rem; color: var(--pos-muted); }
.pos-sheet__close { margin-left: auto; }
.pos-sheet__body { flex: 1 1 auto; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 16px; padding: 16px 20px; align-items: flex-start; }
.pos-sheet__body--col { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.pos-col-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pos-col-side {
    flex: 1 1 360px; max-width: 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px;
    border-radius: 10px; background-color: var(--pos-navy); background-image: var(--pos-texture-dark); color: var(--pos-on-navy);
    box-shadow: 0 10px 30px rgba(14,31,51,0.28);
}
.pos-card { padding: 16px; border: 1px solid var(--pos-line); border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(14,31,51,0.06); }
.pos-card__title { margin: 0 0 10px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #64748b; }

.pos-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.pos-kpi { padding: 12px 16px; border: 1px solid var(--pos-line); border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(14,31,51,0.06); }
.pos-kpi small { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--pos-muted); }
.pos-kpi strong { display: block; font-size: 1.5rem; font-weight: 700; }
.pos-kpi span { font-size: 0.75rem; color: var(--pos-muted); }
.pos-kpi--dark { border-color: transparent; background-color: var(--pos-navy); background-image: var(--pos-texture-dark); color: #fff; }
.pos-kpi--dark small, .pos-kpi--dark span { color: var(--pos-on-navy-muted); }
.pos-kpi--warn { border-color: #f0c36d; background: #fff8e6; color: #78350f; }
.pos-kpi--ok { border-color: #7fd8b5; background: #ecfdf5; color: #064e3b; }
.pos-kpi--warn small, .pos-kpi--ok small { color: inherit; }

.pos-methods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pos-method {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 80px; padding: 6px 4px;
    border: 1px solid #d4dae2; border-radius: 8px; background: #fff; color: var(--pos-ink); cursor: pointer; font-size: 0.82rem; font-weight: 600;
}
.pos-method i { font-size: 22px; }
.pos-method small { font-size: 0.7rem; font-weight: 400; opacity: 0.8; }
.pos-method[aria-pressed="true"] { border: 2px solid #2563eb; background: #eef4ff; color: #1d4ed8; box-shadow: 0 4px 12px rgba(37,99,235,0.18); }
.pos-method:disabled { opacity: 0.45; cursor: not-allowed; }

.pos-amount { padding: 12px 16px; border-radius: 6px; background: #f3f6fa; box-shadow: inset 0 2px 4px rgba(14,31,51,0.08); font-size: 2rem; font-weight: 700; text-align: right; color: #0e1f33; }
.pos-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pos-quick button { min-height: 44px; border: 1px solid #bfd3f5; border-radius: 6px; background: #eef4ff; color: #1d4ed8; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.pos-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pos-pad button { min-height: 56px; border: 1px solid #d4dae2; border-bottom-width: 3px; border-radius: 6px; background: #fff; color: var(--pos-ink); font-size: 1.35rem; font-weight: 600; cursor: pointer; }
.pos-pad button:hover, .pos-quick button:hover { background: #f3f6fa; }
.pos-ref { min-height: 44px; padding: 8px 12px; border: 1px solid #c8cdd5; border-radius: 6px; font-size: 0.9rem; font-family: inherit; }

.pos-pay { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e2e6ea; border-radius: 6px; background: #f8f9fb; }
.pos-pay i { font-size: 18px; color: #1d4ed8; }
.pos-pay__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pos-pay__text strong { font-size: 0.85rem; font-weight: 500; }
.pos-pay__text span { font-size: 0.72rem; color: var(--pos-muted); }

.pos-receipt { padding: 16px; border-radius: 4px 4px 0 0; background: var(--pos-paper); color: var(--pos-ink); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.78rem; display: flex; flex-direction: column; gap: 6px; }
.pos-receipt__center { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.pos-receipt__grid { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.pos-receipt hr { border: 0; border-top: 1px dashed #b4bcc8; margin: 2px 0; width: 100%; }
.pos-receipt + .pos-tear { margin: 0; transform: rotate(180deg); }

.pos-alert { padding: 10px 14px; border-radius: 6px; font-size: 0.85rem; line-height: 1.45; }
.pos-alert--ok { border: 1px solid var(--pos-accent); background: rgba(32,201,151,0.12); color: #d1fae5; }
.pos-alert--warn { border: 1px solid #fde68a; background: #fffbeb; color: #92400e; }
.pos-alert--err { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.pos-alert--dk-err { border: 1px solid #f87171; background: rgba(248,113,113,0.14); color: #fecaca; }

/* Conteo de cierre */
.pos-denoms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pos-denom { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e2e6ea; border-radius: 6px; background: #f8f9fb; }
.pos-denom__chip { flex: 0 0 52px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 3px; border: 1px solid rgba(14,31,51,0.18); background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.6) 0 2px, transparent 2px 6px); font-size: 0.72rem; font-weight: 700; color: #0e1f33; }
.pos-denom__chip--coin { flex-basis: 34px; width: 34px; height: 34px; margin: 0 9px; border-radius: 50%; border-color: #b8a06a; background: #efe3c2; background-image: none; box-shadow: inset 0 0 0 3px #f7efd9; color: #5a4612; font-size: 0.68rem; }
.pos-denom__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: 0.8rem; }
.pos-denom__text span { font-size: 0.72rem; color: var(--pos-muted); }
.pos-denom input { width: 56px; min-height: 36px; text-align: center; border: 0; border-left: 1px solid #c8cdd5; border-right: 1px solid #c8cdd5; font-size: 0.9rem; font-weight: 700; font-family: inherit; -moz-appearance: textfield; }
.pos-denom input::-webkit-outer-spin-button, .pos-denom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pos-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.pos-table th { padding: 8px 12px; text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; background: #f8f9fb; }
.pos-table td { padding: 8px 12px; border-top: 1px solid #f1f5f9; }
.pos-table .r { text-align: right; }
.pos-pill { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 0.72rem; font-weight: 600; }
.pos-pill--ok { background: #f0fdf4; color: #15803d; border: 1px solid rgba(21,128,61,0.3); }
.pos-pill--warn { background: #fef3c7; color: #92400e; border: 1px solid rgba(146,64,14,0.3); }
.pos-pill--err { background: #fef2f2; color: #dc2626; border: 1px solid rgba(220,38,38,0.3); }

.pos-mov { display: flex; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--pos-navy-line); font-size: 0.82rem; }
.pos-mov:last-child { border-bottom: 0; }
.pos-col-side textarea { min-height: 72px; padding: 8px 12px; border: 1px solid #3b5a80; border-radius: 6px; background: #0b1a2c; color: var(--pos-on-navy); font-family: inherit; font-size: 0.88rem; resize: vertical; }
.pos-col-side .pos-field { color: var(--pos-on-navy-muted); font-weight: 500; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .pos-ticket { flex-basis: 340px; }
    .pos-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 959px) {
    .pos-ticket { max-width: none; flex-basis: 100%; }
    .pos-keys { display: none; }
    .pos-mbar { display: flex; }
    .pos-head__title span { display: none; }
    .pos-col-side { max-width: none; flex-basis: 100%; }
    .pos-sheet__panel { margin: 0; border-radius: 0; }
    .pos-sheet__panel--sm { margin: auto 12px; border-radius: 10px; }
}
@media (max-width: 640px) {
    .pos-head, .pos-body, .pos-sheet__body { padding-left: 12px; padding-right: 12px; }
    .pos-body { gap: 12px; padding-top: 12px; }
    .pos-hl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .pos-search { flex-basis: 100%; }
    .pos-search .pos-kbd { display: none; }
    .pos-search-row .pos-btn { flex: 1 1 0; }
    .pos-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -12px; padding-right: 12px; padding-bottom: 2px; }
    .pos-chip { flex: 0 0 auto; }
    .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .pos-tile__thumb { height: 64px; }
    .pos-line__total { width: auto; min-width: 72px; }
    .pos-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pos-denoms { grid-template-columns: minmax(0, 1fr); }
    .pos-kpi strong { font-size: 1.25rem; }
    .pos-amount { font-size: 1.6rem; }
}
