/* ===== Gráficos ===== */
.chart { width: 100%; } .chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .bar { fill: var(--chart-1); transition: opacity .15s; } .chart .bar:hover { opacity: .75; }
.chart .bar.c2 { fill: var(--chart-2); }
.chart .area { fill: color-mix(in srgb, var(--chart-1) 18%, transparent); } .chart .line { fill: none; stroke: var(--chart-1); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--surface); stroke: var(--chart-1); stroke-width: 2; }
.chart .val { fill: var(--ink); font-weight: 650; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut { width: 170px; flex-shrink: 0; } .donut .center-txt { font-size: 15px; font-weight: 750; fill: var(--ink); } .donut .center-sub { font-size: 10.5px; fill: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; min-width: 150px; }
.legend div { display: flex; align-items: center; gap: 8px; } .legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; } .legend b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: 11px; }
.hbar .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 4px; } .hbar .top span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 9px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); } .hbar .fill { height: 100%; border-radius: 99px; background: var(--primary); }

/* ===== Punto de venta ===== */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.pos-side { position: sticky; top: 84px; }
.scan-card { border: 2px solid var(--primary); background: var(--surface); position: relative; }
.scan-card .scan-input { font-size: 20px; min-height: 56px; padding-left: 52px; border-radius: 12px; font-weight: 600; }
.scan-card .input-icon svg.i { left: 16px; color: var(--primary); }
.suggest { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.suggest button { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.suggest button:hover, .suggest button:focus-visible { background: var(--primary-soft); border-color: var(--primary); }
.cart { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cart-item { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); animation: pop .15s ease; }
.cart-item .t { font-weight: 650; } .cart-item .m { color: var(--muted); font-size: 13px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.qty button { width: 38px; height: 38px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 18px; display: grid; place-items: center; } .qty button:hover { background: var(--primary-soft); }
.qty input { width: 48px; text-align: center; border: 0; border-radius: 0; min-height: 38px; padding: 0; font-weight: 650; box-shadow: none !important; }
.cart-empty { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 40px 16px; text-align: center; color: var(--muted); }
.total-box { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.total-box .amt { font-size: 38px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pay-opt { position: relative; } .pay-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.pay-opt span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 8px; border: 1.5px solid var(--border-strong); border-radius: 11px; font-weight: 650; font-size: 14px; background: var(--surface); }
.pay-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.pay-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.change-box { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; background: var(--ok-soft); color: var(--ok); border-radius: 10px; font-weight: 650; }
.pos-bar { display: none; }
@media (max-width: 960px) {
  .pos { grid-template-columns: 1fr; } .pos-side { position: static; }
  .pos-bar { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 29; background: var(--ink); color: var(--bg); border-radius: 16px; padding: 10px 12px 10px 18px; align-items: center; justify-content: space-between; box-shadow: var(--shadow-lg); }
  .pos-bar .amt { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .pos-bar .btn { min-height: 44px; }
  .scan-card .scan-input { font-size: 18px; }
}
@media (max-width: 640px) { .cart-item { grid-template-columns: 1fr auto; } .cart-item .sub { grid-column: 1 / -1; justify-content: space-between; } .total-box .amt { font-size: 32px; } }

/* ===== Vistas previas de boleta y etiqueta ===== */
.preview-paper { background: #fff; color: #000; border-radius: 6px; box-shadow: 0 2px 14px rgba(0,0,0,.18); margin: 0 auto; width: fit-content; max-width: 100%; overflow: auto; }
.ticket { font-family: "Courier New", ui-monospace, monospace; font-size: 12px; line-height: 1.35; color: #000; background: #fff; padding: 10px 4mm; }
.ticket .c { text-align: center; } .ticket .brand-t { font-size: 20px; font-weight: 800; letter-spacing: 1px; } .ticket .tl { font-style: italic; }
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.ticket table { width: 100%; border-collapse: collapse; } .ticket td, .ticket th { padding: 1px 0; font-size: 12px; vertical-align: top; text-align: left; } .ticket .r { text-align: right; }
.ticket .tot { font-size: 15px; font-weight: 800; } .ticket .void { border: 2px solid #000; padding: 3px; margin: 4px 0; font-weight: 800; }
.label-sheet { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.plabel { background: #fff; color: #000; border: 1px dashed #aaa; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 1mm 1.5mm; overflow: hidden; font-family: Arial, Helvetica, sans-serif; text-align: center; }
.plabel .l-brand { font-size: 5.5pt; font-weight: 700; letter-spacing: .6px; line-height: 1; }
.plabel .l-name { font-size: 7pt; font-weight: 700; line-height: 1.05; max-width: 100%; max-height: 2.2em; overflow: hidden; }
.plabel .l-meta { font-size: 6.5pt; line-height: 1; }
.plabel .l-bar { width: 100%; display: flex; justify-content: center; } .plabel .l-bar svg { display: block; }
.plabel .l-code { font-size: 6pt; letter-spacing: .5px; line-height: 1; font-family: "Courier New", monospace; }
.plabel .l-price { font-size: 10pt; font-weight: 800; line-height: 1; }
.setup-steps { display: flex; gap: 8px; margin-bottom: 18px; } .setup-steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--border); } .setup-steps i.on { background: var(--primary); }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; text-align: center; background: var(--surface-2); cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
.sel-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--primary-soft); color: var(--primary-ink); border-radius: var(--radius-sm); margin-bottom: 12px; font-weight: 600; flex-wrap: wrap; }

/* ===== Formulario de tallas (producto) ===== */
.vrow { display: grid; grid-template-columns: 90px minmax(0, 1fr) 100px 90px 96px; gap: 10px; align-items: end; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.vrow .vact { display: flex; align-items: center; justify-content: flex-end; min-height: 40px; }
@media (max-width: 640px) { .vrow { grid-template-columns: 1fr 1fr; } .vrow .field:nth-child(2) { grid-column: 1 / -1; order: 3; } .vrow .vact { grid-column: 1 / -1; order: 4; justify-content: flex-start; } }
.copies { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; }
.copies input { width: 84px; text-align: center; }
.preview-zoom { zoom: 1.8; display: flex; justify-content: center; padding: 8px 0; }
.import-errors { max-height: 180px; overflow-y: auto; font-size: 13px; }
.import-errors li { margin-bottom: 3px; }
