/* =====================================================================
   Lo de cada pantalla: buscador, etiqueta de precio, venta, recargas, ganancias,
   comprobantes, Ajustes, cotizaciones y Pagos Claro.
   ===================================================================== */

/* ---------- buscador principal ---------- */
.bigsearch { position: relative; }
.bigsearch svg { position: absolute; left: 18px; top: 50%; width: 26px; height: 26px; margin-top: -13px; color: var(--ink-3); pointer-events: none; }
.bigsearch input {
  width: 100%; height: 64px; padding: 0 120px 0 58px;
  border: 2px solid var(--ink); border-radius: 12px;
  background: var(--panel); color: var(--ink); font-size: 23px;
}
.bigsearch input::placeholder { color: var(--ink-3); }
.bigsearch input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.bigsearch input:focus { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 30%, transparent); border-color: var(--focus); }
.bigsearch .clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.hint { color: var(--ink-3); font-size: 14px; margin: 8px 2px 0; }
.kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font-size: 13px; background: var(--panel); color: var(--ink-2); }

/* ---------- ficha con etiqueta de precio ---------- */
.ficha { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 22px 24px; margin-top: 18px; }
.ficha-title { font-size: 27px; font-weight: 700; line-height: 1.2; margin: 0 0 10px; }
.ficha-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ficha-costs { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-2); font-size: 15px; margin-bottom: 12px; }
.ficha-costs b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ficha-note { font-size: 15px; color: var(--ink-2); background: var(--panel-2); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; max-width: 70ch; }
.ficha-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  position: relative; margin-left: 26px; min-width: 270px;
  background: var(--tag); color: var(--tag-ink);
  border-radius: 3px 16px 16px 3px; padding: 18px 28px 18px 22px;
  box-shadow: 0 2px 0 var(--tag-edge), 0 14px 30px rgba(120, 80, 0, .18);
}
.tag::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -25px; width: 26px;
  background: var(--tag); clip-path: polygon(100% 0, 100% 100%, 0 calc(100% - 26px), 0 26px);
}
.tag::after {
  content: ""; position: absolute; left: -12px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border-radius: 50%; background: var(--panel); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}
.tag-label { font-size: 15px; font-weight: 700; opacity: .8; }
.tag-price { font-family: var(--num); font-weight: 700; font-size: clamp(64px, 8vw, 100px); line-height: .92; letter-spacing: -1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag-price .cur { font-size: .42em; vertical-align: .95em; margin-right: 4px; letter-spacing: 0; }
.tag-price .dec { font-size: .52em; vertical-align: .62em; letter-spacing: 0; }
.tag-none { font-family: var(--num); font-weight: 700; font-size: 42px; line-height: 1.1; padding: 8px 0; }
.tag-extra { font-weight: 700; font-size: 15px; margin-top: 2px; }
.tag-alts { margin: 12px 0 0; padding: 10px 0 0; border-top: 2px dashed rgba(29, 42, 71, .3); display: grid; gap: 4px; }
.tag-alts div { display: flex; justify-content: space-between; gap: 18px; font-size: 16px; }
.tag-alts dt { font-weight: 400; }
.tag-alts dd { white-space: nowrap; margin: 0; font-family: var(--num); font-weight: 700; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tag.pop { animation: pop .28s ease-out; }
@keyframes pop { from { transform: scale(.94) rotate(-1.5deg); } to { transform: none; } }

/* ---------- caja / venta ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.pos-side { position: sticky; top: 16px; }
.totals { display: grid; gap: 10px; }
.totals .line { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.totals .line .input { width: 150px; }
.total-big { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.total-big span { font-weight: 700; font-size: 18px; }
.total-big b { font-family: var(--num); font-size: 50px; line-height: 1; font-variant-numeric: tabular-nums; }
.cambio b { font-family: var(--num); font-size: 30px; font-variant-numeric: tabular-nums; }
.cambio.neg b { color: var(--bad); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.qty button { width: 34px; height: 38px; border: 0; background: var(--panel-2); cursor: pointer; font-size: 19px; font-weight: 700; color: var(--ink-2); }
.qty input { width: 58px; height: 38px; border: 0; text-align: center; background: transparent; font-size: 16px; font-variant-numeric: tabular-nums; }
.qty input:focus { outline: none; background: var(--brand-soft); }
.cell-input { width: 104px; min-height: 38px; text-align: right; }
.cell-select { min-height: 38px; width: auto; max-width: 150px; }
.warnline { color: var(--warn); font-size: 13px; font-weight: 700; }

/* lista desplegable de resultados */
.ac { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  max-height: 380px; overflow-y: auto; padding: 4px;
}
.ac-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 7px; cursor: pointer; }
.ac-item:hover, .ac-item.act { background: var(--brand-soft); }
.ac-item .d { font-weight: 700; }
.ac-item .m { font-size: 13px; color: var(--ink-3); }
.ac-item .p { font-family: var(--num); font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; }
.ac-more { padding: 8px 12px; font-size: 14px; color: var(--ink-3); }

.amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.amounts button { min-width: 74px; min-height: 52px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-family: var(--num); font-weight: 700; font-size: 26px; cursor: pointer; color: var(--ink); }
.amounts button[aria-pressed="true"] { background: var(--tag); border-color: var(--tag-edge); color: var(--tag-ink); }

.gan-tbl .input { min-height: 36px; width: 84px; padding: 0 8px; text-align: right; font-size: 15px; }
.gan-tbl td { padding: 5px 8px; }
.gan-tbl .today td { background: var(--brand-soft); }
.auto { color: var(--ink-2); font-variant-numeric: tabular-nums; }

.calc { display: flex; flex-wrap: wrap; gap: 8px; }
.calc button { border: 1px dashed var(--line); background: var(--panel-2); border-radius: 8px; padding: 6px 10px; cursor: pointer; text-align: left; color: var(--ink); }
.calc button b { display: block; font-family: var(--num); font-size: 20px; line-height: 1.1; }
.calc button span { font-size: 13px; color: var(--ink-2); }

.receipt { font-size: 15px; max-width: 360px; margin: 0 auto; border: 1px dashed var(--line); border-radius: 8px; padding: 16px 18px; background: var(--panel); }
.receipt h3 { text-align: center; margin: 0; font-family: var(--num); font-size: 26px; }
.receipt .c { text-align: center; color: var(--ink-2); font-size: 14px; }
.receipt table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.receipt td { padding: 3px 0; vertical-align: top; }
.receipt .r { text-align: right; white-space: nowrap; }
.receipt .tot td { border-top: 1px dashed var(--line); font-weight: 700; }
.receipt .big td { font-size: 19px; }

/* ---------- pestañas de Ajustes ---------- */
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs button { flex: none; display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: transparent; color: var(--ink-3); font-weight: 700; font-size: 16px; cursor: pointer; white-space: nowrap; }
.ptabs button:hover { color: var(--ink); }
.ptabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; padding: 0 6px; margin-left: 7px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12.5px; }
.aj-save { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; }
.aj-save [data-dirty] { color: var(--warn); font-weight: 700; }
.aj-narrow { max-width: 680px; }
.aj-loc { padding-top: 14px; border-top: 1px solid var(--line-2); }

/* ---------- cotizaciones ---------- */
.chip svg { width: 16px; height: 16px; }
.chip-x { display: inline-flex; border: 0; background: transparent; color: inherit; padding: 0; margin: 0 -4px 0 2px; cursor: pointer; border-radius: 50%; }
.chip-x svg { width: 16px; height: 16px; }
.cell-desc { min-width: 180px; min-height: 38px; }
.cot-actions { align-items: center; gap: 8px; margin-bottom: 12px; }
/* La vista previa se ve como la hoja impresa, en blanco, también con colores oscuros. */
.paper { background: #fff; color: #1a1a1a; border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.cot-sheet { font-size: 14.5px; line-height: 1.4; color: #1a1a1a; }
.cot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 12px; border-bottom: 2px solid #1a1a1a; }
.cot-biz { font-family: var(--num); font-size: 27px; font-weight: 700; line-height: 1.05; margin-bottom: 2px; }
.cot-num { text-align: right; white-space: nowrap; }
.cot-word { font-family: var(--num); font-size: 23px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; line-height: 1.1; }
.cot-cli { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 10px 0; border-bottom: 1px solid #c9c9c9; }
.cot-cli span { color: #555; }
.cot-tbl { width: 100%; border-collapse: collapse; margin-top: 10px; }
.cot-tbl th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: #444; border-bottom: 1.5px solid #1a1a1a; padding: 6px; }
.cot-tbl td { padding: 6px; border-bottom: 1px solid #ddd; vertical-align: top; }
.cot-tbl .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cot-tbl tfoot td { border-bottom: 0; padding-top: 4px; padding-bottom: 4px; }
.cot-total td { font-weight: 700; font-size: 17px; border-top: 1.5px solid #1a1a1a; }
.cot-unit { color: #666; font-size: 12.5px; }
.cot-words { margin: 8px 0 0; font-style: italic; }
.cot-note { margin: 10px 0 0; }
.cot-foot { margin: 16px 0 0; font-size: 12.5px; color: #555; }

/* ---------- pagos Claro ---------- */
.words-prev { min-height: 1.4em; margin-top: -6px; font-style: italic; color: var(--ink-2); }
.receipt .rec-title { font-weight: 700; color: var(--ink); }
.receipt .rec-no { text-align: center; font-family: var(--num); font-size: 24px; margin-top: 4px; }
.receipt .words { font-style: italic; margin: 0 0 8px; }
.receipt .pie { margin-top: 10px; font-weight: 700; text-decoration: underline; font-size: 13px; }
.claro-rec table td:first-child { width: 1%; padding-right: 10px; white-space: nowrap; color: var(--ink-2); }
.show-sm-block { display: none; }

.ffrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 92px 40px; gap: 10px; align-items: center; }
.ffhead { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: -6px; }
.ffhead span:nth-child(-n+3) { text-align: right; padding-right: 12px; }
.fflist { display: flex; flex-direction: column; gap: 8px; }
.ffgan { text-align: right; padding-right: 12px; color: var(--ok); font-weight: 700; font-variant-numeric: tabular-nums; }
.aj-save.dirty { position: sticky; bottom: 16px; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow); }

#cl-hint:empty, .words-prev:empty { display: none; }
.cl-tbl td:last-child { width: 1%; padding-left: 0; }
