/* CLIC SERVICIOS - estilos
   Barra lateral oscura + lienzo cálido + naranja de marca. Títulos en Poppins, interfaz en Inter. */
:root {
  --side: #222834; --side-2: #2C3341; --side-ink: #C9CED8; --side-muted: #8D94A3;
  --ink: #1F2430; --ink-2: #344054; --muted: #667085; --line: #E5E3DF; --line-2: #EFEDEA;
  --surface: #FFFFFF; --canvas: #F5F4F1; --well: #ECEAE6;
  --orange: #FF6B00; --orange-ink: #C24E00; --orange-soft: #FFF1E6; --orange-line: #FFD3B0; --orange-deep: #8A3700;
  --red: #D92D20; --red-soft: #FDECEA; --green: #12805C; --green-soft: #E6F5EE;
  --amber: #B54708; --amber-soft: #FEF3E2; --blue: #2563EB; --blue-soft: #E8EFFD; --blue-ink: #1E3A8A;
  --f-display: "Poppins", "Inter", system-ui, sans-serif;
  --f-ui: "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 10px; --r-sm: 7px;
  --shadow: 0 12px 30px rgba(20, 24, 32, .14);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 14px/1.45 var(--f-ui); -webkit-font-smoothing: antialiased; }
a { color: var(--orange-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; letter-spacing: -.005em; text-wrap: balance; }
.oculto, [hidden] { display: none !important; }
.mono { font-family: var(--f-mono); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid rgba(255, 107, 0, .45); outline-offset: 2px; }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100%; }
.side { background: var(--side); color: var(--side-ink); padding: 16px 12px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: #fff; text-decoration: none; font: 700 15px/1.05 var(--f-display); }
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font: 500 10.5px/1.3 var(--f-ui); color: var(--side-muted); letter-spacing: .04em; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-sm); color: var(--side-ink); text-decoration: none; font: 500 13.5px/1 var(--f-ui); }
.nav:hover { background: var(--side-2); color: #fff; }
.nav i { width: 7px; height: 7px; border-radius: 2px; background: #4A5162; flex: none; }
.nav.act { background: #323A49; color: #fff; }
.nav.act i { background: var(--orange); }
.nav .n { margin-left: auto; font: 600 11px/1 var(--f-ui); background: #3B4456; color: #E8EAF0; padding: 4px 7px; border-radius: 999px; }
.side .sep { flex: 1; }
.side .who { border-top: 1px solid #343B4A; margin-top: 8px; padding: 12px 8px 2px; font-size: 12.5px; color: var(--side-muted); }
.side .who b { display: block; color: #fff; font-weight: 600; font-size: 13px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top h1 { font-size: 18px; font-weight: 600; }
.top .acc { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top .menu-btn { display: none; }
.content { padding: 22px 24px 40px; max-width: 1400px; width: 100%; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font: 600 12px/1 var(--f-ui); flex: none; text-transform: uppercase; }

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.card h2 { font-size: 15.5px; font-weight: 600; margin-bottom: 12px; }
.card + .card { margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; background: var(--orange); color: #fff; font: 600 14px/1 var(--f-ui); cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .12s, transform .08s; }
.btn:hover { filter: brightness(.95); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.dark { background: var(--ink); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: #D6D3CE; }
.btn.ghost:hover { background: #FAF9F7; filter: none; }
.btn.danger { background: var(--surface); color: var(--red); border-color: #F3B8B2; }
.btn.green { background: var(--green); }
.btn.sm { height: 31px; padding: 0 12px; font-size: 12.5px; }
.btn.block { width: 100%; }
.icon-btn { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; position: relative; color: var(--ink-2); }
.icon-btn svg { width: 19px; height: 19px; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font: 700 10.5px/18px var(--f-ui); text-align: center; }
.link { background: none; border: 0; padding: 0; color: var(--orange-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font: 600 12px/1.2 var(--f-ui); color: #4A5160; }
.inp { height: 38px; border: 1px solid #D6D3CE; border-radius: var(--r-sm); padding: 0 11px; background: #fff; width: 100%; min-width: 0; }
textarea.inp { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
select.inp { padding-right: 6px; }
.inp:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 0, .16); }
.field.err .inp { border-color: var(--red); }
.field .msg { font-size: 12px; color: var(--red); }
.hint { font-size: 12.5px; color: var(--muted); }
.row { display: grid; gap: 14px; margin-bottom: 14px; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: repeat(3, 1fr); }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { height: 34px; padding: 0 12px; border: 1px solid #D6D3CE; border-radius: var(--r-sm); background: #fff; color: #3F4655; font: 500 13px/1 var(--f-ui); cursor: pointer; }
.seg button[aria-pressed="true"] { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-ink); font-weight: 600; }

.chk { display: inline-flex; align-items: center; gap: 10px; font: 600 14px/1 var(--f-ui); padding: 10px 12px; border: 1px dashed #CFCAC3; border-radius: 8px; cursor: pointer; user-select: none; background: #fff; }
.chk input { appearance: none; width: 19px; height: 19px; margin: 0; border: 2px solid #B9B4AD; border-radius: 5px; display: grid; place-items: center; cursor: pointer; background: #fff; }
.chk input:checked { background: var(--red); border-color: var(--red); }
.chk input:checked::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.chk:has(input:checked) { border-color: var(--red); border-style: solid; background: var(--red-soft); color: var(--red); }

.pill { display: inline-flex; align-items: center; gap: 5px; font: 700 10.5px/1 var(--f-ui); letter-spacing: .04em; text-transform: uppercase; padding: 5px 7px; border-radius: 5px; background: #EEF0F3; color: #475467; white-space: nowrap; }
.pill.r { background: var(--red-soft); color: var(--red); }
.pill.o { background: var(--orange-soft); color: var(--orange-ink); }
.pill.g { background: var(--green-soft); color: var(--green); }
.pill.a { background: var(--amber-soft); color: var(--amber); }
.pill.b { background: var(--blue-soft); color: var(--blue); }

.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font: 600 11px/1 var(--f-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: #FAF9F7; padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.clic { cursor: pointer; }
.tbl tbody tr.clic:hover td { background: #FCFBF9; }
.vacio { padding: 28px 16px; text-align: center; color: var(--muted); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .inp { max-width: 360px; }
.buscar { position: relative; flex: 1; max-width: 420px; }
.buscar svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--muted); }
.buscar .inp { padding-left: 34px; max-width: none; }

/* ---------- Avisos / mensajes ---------- */
.toasts { position: fixed; right: 18px; top: 72px; display: flex; flex-direction: column; gap: 10px; z-index: 100; width: min(360px, calc(100vw - 36px)); }
.toast { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; display: flex; gap: 11px; font-size: 13px; animation: entra .35s cubic-bezier(.2, .8, .2, 1); }
.toast .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); margin-top: 4px; flex: none; }
.toast.err .dot, .toast.urg .dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.toast b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.toast.urg { cursor: pointer; border-color: #F3B8B2; }
.toast.aviso { cursor: pointer; border-color: #FFD2B0; }
.toast.aviso .dot { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
@keyframes entra { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.panel-avisos { color: var(--ink); text-align: left; position: absolute; right: 0; top: 46px; width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); z-index: 40; }
.panel-avisos h3 { font: 600 14px/1 var(--f-display); padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.aviso { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; text-decoration: none; color: inherit; font-size: 13px; }
.aviso:hover { background: #FCFBF9; }
.aviso .d { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-top: 6px; flex: none; }
.aviso.leido .d { background: #D0CCC6; }
.aviso b { display: block; font-size: 13px; }
.aviso small { color: var(--muted); }
.anclaje { position: relative; }
.alerta { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 9px; font-size: 13.5px; }
.alerta.info { background: var(--blue-soft); color: var(--blue-ink); }
.alerta.warn { background: var(--amber-soft); color: var(--amber); }
.alerta.ok { background: var(--green-soft, #E6F5EE); color: var(--green-ink, #0B5A40); }
.alerta.err { background: var(--red-soft); color: var(--red); }

dialog.modal { border: 0; border-radius: 14px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); color: var(--ink); }
dialog.modal::backdrop { background: rgba(20, 24, 32, .45); }
.modal-in { padding: 22px 24px; }
.modal-in h3 { font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.modal-acc { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.ok-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; margin-bottom: 12px; }
.ok-icon::after { content: ""; width: 9px; height: 17px; border: solid var(--green); border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-2px, -2px); }
.ticket-big { font: 700 28px/1 var(--f-mono); color: var(--orange-ink); margin: 8px 0 12px; }
.linkbox { display: flex; gap: 8px; align-items: center; background: #F4F3F0; border-radius: 8px; padding: 8px 8px 8px 11px; font: 500 12.5px/1.3 var(--f-mono); color: var(--ink-2); word-break: break-all; }
.linkbox span { flex: 1; min-width: 0; }
.clave-temp { font: 700 22px/1 var(--f-mono); letter-spacing: .06em; background: #F4F3F0; border-radius: 8px; padding: 14px; text-align: center; margin: 10px 0; user-select: all; }

/* ---------- Carga rápida ---------- */
.grid-nuevo { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: 20px; align-items: start; }
.encontrado { border-radius: var(--r); background: var(--blue-soft); color: var(--blue-ink); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.encontrado .cab { display: flex; gap: 10px; align-items: center; }
.encontrado .av { background: var(--blue); }
.encontrado b { font-size: 14px; }
.encontrado .acc { display: flex; gap: 8px; flex-wrap: wrap; }
.dir-op { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dir-op button { border: 1px solid #D6D3CE; background: #fff; border-radius: 999px; padding: 6px 11px; font-size: 12.5px; cursor: pointer; }
.dir-op button[aria-pressed="true"] { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-ink); font-weight: 600; }
.cliente-fijo { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 11px; border: 1px solid #C9D7F8; background: var(--blue-soft); border-radius: var(--r-sm); color: var(--blue-ink); font-weight: 600; }
.cliente-fijo .link { margin-left: auto; font-size: 12.5px; }
.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.reveal > div { overflow: hidden; }
.reveal.open { grid-template-rows: 1fr; }
.lista-hoy .it { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; text-decoration: none; color: inherit; }
.lista-hoy .it:last-child { border-bottom: 0; }
.lista-hoy .it span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk { font: 600 12px/1 var(--f-mono); color: var(--muted); white-space: nowrap; }

/* ---------- Colas ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--well); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.col h3 { font: 600 13.5px/1 var(--f-ui); display: flex; align-items: center; gap: 8px; color: var(--ink-2); padding: 2px 2px 4px; }
.col h3 .n { margin-left: auto; font: 600 11.5px/1 var(--f-ui); background: #fff; padding: 4px 8px; border-radius: 999px; color: #475467; }
.tc { background: var(--surface); border: 1px solid #E1DED9; border-radius: 9px; padding: 11px 12px; display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: inherit; font-size: 13px; transition: box-shadow .15s, transform .15s; }
.tc:hover { box-shadow: 0 6px 16px rgba(20, 24, 32, .08); transform: translateY(-1px); }
.tc .nm { font-weight: 600; font-size: 13.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tc .ds { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc .mt { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tc .mot { color: var(--red); font-size: 12px; }
.tc.urg { border: 1.5px solid var(--red); background: #FFF8F7; }
.col .vacio { padding: 18px 8px; font-size: 12.5px; }

/* ---------- Detalle de pedido ---------- */
.grid-det { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.det-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.det-cab .codigo { font: 700 22px/1 var(--f-mono); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.descripcion { font-size: 15px; line-height: 1.55; white-space: pre-wrap; margin: 0 0 16px; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.timeline { display: flex; flex-direction: column; }
.ev { display: flex; gap: 12px; position: relative; padding-bottom: 16px; font-size: 13px; }
.ev::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.ev:last-child::before { display: none; }
.ev i { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #C9C4BD; flex: none; margin-top: 2px; z-index: 1; }
.ev.estado i { border-color: var(--orange); }
.ev.nota i { border-color: var(--blue); }
.ev small { color: var(--muted); display: block; margin-top: 2px; }
.ev .txt { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Login ---------- */
.pantalla-login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1000px 520px at 70% 10%, #2A303D 0%, #1A1E26 60%); }
.login { width: min(400px, 100%); background: var(--surface); border-radius: 16px; padding: 28px; box-shadow: 0 30px 70px rgba(0, 0, 0, .4); }
.login .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login .logo img { width: 46px; }
.login h1 { font-size: 22px; font-weight: 700; }
.login h1 span { color: var(--orange); }
.login .hint { margin-top: 2px; }
.login .field { margin-bottom: 14px; }

/* ---------- Técnico (celular) ---------- */
.movil { max-width: 560px; margin: 0 auto; min-height: 100%; background: var(--canvas); }
.mhead { background: var(--orange); color: #fff; padding: 14px 16px 16px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; }
.mhead .t { font: 600 18px/1.2 var(--f-display); }
.mhead .s { font: 500 12.5px/1.2 var(--f-ui); opacity: .92; margin-top: 2px; }
.mhead .acc { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.mhead .icon-btn { background: rgba(255, 255, 255, .18); border-color: transparent; color: #fff; }
.mhead a.volver { color: #fff; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.mtabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 68px; z-index: 19; }
.mtabs a, .mtabs span { flex: 1; text-align: center; font: 600 13px/1 var(--f-ui); padding: 13px 0; color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; }
.mtabs .sel { color: var(--orange-ink); border-color: var(--orange); }
.mtabs .prox { opacity: .55; }
.mlist { padding: 10px 12px 30px; display: flex; flex-direction: column; gap: 10px; }
.pc { background: #fff; border: 1px solid #E4E1DC; border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; font-size: 13.5px; }
.pc.urg { border: 1.5px solid var(--red); background: #FFF8F7; }
.pc .nm { font-weight: 600; font-size: 15px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pc .mt { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; flex-wrap: wrap; }
.pc .mot { color: var(--red); font-size: 12.5px; }
.msec { font: 600 11.5px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 4px 0; }
.mcontent { padding: 12px; }
.mcontent .card { border-radius: 14px; }

/* ---------- Ticket público ---------- */
.ticket { max-width: 520px; margin: 0 auto; min-height: 100%; background: #fff; }
.ticket header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); font: 700 14px/1.1 var(--f-display); }
.ticket header img { width: 30px; }
.ticket .tb { padding: 20px 18px 40px; }
.ticket h1 { font: 700 26px/1.1 var(--f-mono); margin: 4px 0 6px; }
.pasos { margin-top: 20px; display: flex; flex-direction: column; }
.paso { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.paso::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: #E4E1DC; }
.paso:last-child::before { display: none; }
.paso i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #D6D3CE; background: #fff; flex: none; display: grid; place-items: center; z-index: 1; }
.paso.hecho i { background: var(--green); border-color: var(--green); }
.paso.hecho i::after { content: ""; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.paso.actual i { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 5px var(--orange-soft); }
.paso.cancel i { background: var(--red); border-color: var(--red); }
.paso b { display: block; font-size: 14px; }
.paso small { color: var(--muted); }
.paso.pend b { color: #98A0AE; font-weight: 500; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .grid-det { grid-template-columns: 1fr; }
  .grid-nuevo { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 60; transform: translateX(-100%); transition: transform .25s; }
  .shell.menu-abierto .side { transform: none; box-shadow: 20px 0 40px rgba(0, 0, 0, .3); }
  .top .menu-btn { display: grid; }
  .top { padding: 0 16px; }
  .content { padding: 16px 16px 40px; }
  .board { grid-template-columns: 1fr; }
  .row.c2, .row.c3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Ajustes de formularios ---------- */
.acciones-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.reveal .field { padding-top: 12px; }
.col-der { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col-der .card + .card { margin-top: 0; }
.dir-op + .inp { margin-top: 8px; }

.alerta.mb { margin-bottom: 14px; }

/* ---------- Fotos de usuario ---------- */
.av.con-foto { background: var(--well); overflow: hidden; }
.av img, .carnet img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.blanco { background: rgba(255, 255, 255, .22); color: #fff; width: 38px; height: 38px; }
.foto-edit { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.carnet { width: 84px; height: 112px; border-radius: 8px; background: var(--well); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; font: 600 22px/1 var(--f-display); color: var(--muted); }
.foto-edit .acciones-form { margin-top: 8px; }
.foto-edit .hint { margin: 2px 0 0; }
.celda-usuario { display: flex; align-items: center; gap: 10px; }
label.btn { cursor: pointer; }

/* ---------- Recortador de foto ---------- */
.recorte { position: relative; width: 240px; height: 320px; margin: 14px auto 10px; border-radius: 10px; overflow: hidden; background: var(--well); touch-action: none; user-select: none; }
.recorte canvas { width: 240px; height: 320px; display: block; cursor: grab; touch-action: none; }
.recorte canvas:active { cursor: grabbing; }
.recorte .guia { position: absolute; left: 50%; top: 42%; width: 150px; height: 196px; transform: translate(-50%, -50%); border: 2px dashed rgba(255, 255, 255, .95); border-radius: 50%; box-shadow: 0 0 0 999px rgba(20, 24, 32, .35); pointer-events: none; }
.zoom { display: flex; align-items: center; gap: 10px; max-width: 260px; margin: 0 auto; color: var(--muted); font: 600 16px/1 var(--f-ui); }
.zoom input { flex: 1; accent-color: var(--orange); }

/* ---------- Agenda ---------- */
.stepper { display: flex; align-items: center; gap: 10px; height: 38px; }
.stepper b { min-width: 86px; text-align: center; font-size: 15px; }
.stepper .icon-btn { font: 600 18px/1 var(--f-ui); }
.seg button:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.seg + .inp { margin-top: 8px; }
.av.grande { width: 52px; height: 52px; font-size: 16px; }
.visita { border-color: var(--orange-line); background: #FFFCF9; }
.visita-cab { display: flex; gap: 14px; align-items: center; margin-bottom: 4px; }
.visita-cab b { font-size: 15px; display: block; }
.visita-cab .hint { margin: 3px 0 7px; }
.dia { margin-bottom: 18px; }
.dia h3 { font: 600 15px/1.2 var(--f-display); margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.dia h3 .hoy { font: 700 10.5px/1 var(--f-ui); letter-spacing: .05em; text-transform: uppercase; background: var(--orange); color: #fff; padding: 4px 7px; border-radius: 5px; }
.turno-bloque { display: grid; grid-template-columns: 92px 1fr; gap: 10px; margin-bottom: 8px; }
.turno-bloque > span { font: 600 12px/1.3 var(--f-ui); color: var(--muted); padding-top: 12px; }
.turno-bloque .lista { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.visita-it { background: var(--surface); border: 1px solid #E1DED9; border-radius: 9px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; text-decoration: none; color: inherit; font-size: 13px; }
.visita-it:hover { box-shadow: 0 6px 16px rgba(20, 24, 32, .08); }
.visita-it.urg { border: 1.5px solid var(--red); }
.visita-it .nm { font-weight: 600; font-size: 13.5px; }
.visita-it .der { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.visita-it .ds { grid-column: 1 / -1; color: var(--ink-2); }
.visita-it .mt { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nav-dias { display: flex; align-items: center; gap: 8px; }
.nav-dias b { min-width: 170px; text-align: center; }
.pc .act { display: flex; gap: 8px; margin-top: 4px; }
.pc .act .btn { flex: 1; }
@media (max-width: 900px) { .turno-bloque { grid-template-columns: 1fr; gap: 4px; } .turno-bloque > span { padding-top: 0; } }

/* ---------- Ticket: visita y técnico ---------- */
.visita-cli { margin: 16px 0 6px; border-color: var(--orange-line); background: #FFFCF9; }
.visita-cli h2 { font-size: 17px; margin: 4px 0 4px; }
.tec-card { display: flex; gap: 14px; align-items: center; margin: 14px 0 6px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.tec-card .carnet { width: 72px; height: 96px; }
.tec-card small { display: block; font: 600 11px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.tec-card b { display: block; font: 600 17px/1.2 var(--f-display); margin-bottom: 2px; }
.tec-card .hint { display: block; }
.resp { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.resp .btn { flex: 1 1 140px; }
#resp-msg .field { margin-top: 12px; }
#resp-msg .alerta { margin-top: 12px; }

/* ---------- Estados y planilla ---------- */
.operar { border-color: var(--orange-line); }
.botones-estado { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.sbtn { width: 100%; height: 50px; font-size: 15.5px; border-radius: 12px; }
.btn.grande { height: 54px; font-size: 16px; border-radius: 12px; margin-top: 8px; }
.item-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.stepper.chico { gap: 6px; height: auto; }
.stepper.chico .icon-btn { width: 34px; height: 38px; }
.stepper .cant { width: 58px; text-align: center; padding: 0 6px; }
.item-row .quitar { width: 34px; height: 38px; color: var(--muted); }
.cam-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.cam { height: 130px; border: 2px dashed #CFCAC3; border-radius: 12px; display: grid; place-items: center; text-align: center; padding: 10px; font: 600 12.5px/1.3 var(--f-ui); color: var(--muted); cursor: pointer; background: #FCFBFA center / cover no-repeat; position: relative; overflow: hidden; }
.cam.lista { border-style: solid; border-color: var(--green); }
.cam.lista span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(18, 128, 92, .88); color: #fff; padding: 6px; font-size: 11.5px; }
.cam-otras { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cam-otras .otra { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; }
.cam-otras img { width: 100%; height: 100%; object-fit: cover; }
.cam-otras .icon-btn { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; }
.firma-pad { position: relative; height: 190px; border: 1.5px dashed #CFCAC3; border-radius: 12px; background: #fff; touch-action: none; }
.firma-pad canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.firma-pad .linea { position: absolute; left: 16px; right: 16px; bottom: 34px; border-top: 1px solid #D6D3CE; padding-top: 4px; font: 500 11px/1 var(--f-ui); color: #98A0AE; pointer-events: none; }
.chk.opc { display: flex; width: 100%; margin-bottom: 8px; font-size: 13.5px; }
.chk.opc input:checked { background: var(--orange); border-color: var(--orange); }
.chk.opc:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-ink); }
.chk.opc:has(input:disabled) { opacity: .5; }
.fotos-pl { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.fotos-pl a { width: 120px; text-decoration: none; color: var(--muted); font-size: 11.5px; text-align: center; }
.fotos-pl img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 4px; border: 1px solid var(--line); }
.firma-ver { margin-top: 12px; }
.firma-ver img { max-width: 280px; width: 100%; border: 1px solid var(--line); border-radius: 8px; display: block; }
.firma-ver span { font-size: 12px; color: var(--muted); }
.planilla-ver .tbl { margin-top: 6px; }
.tabs button { font: 600 12.5px/1 var(--f-ui); padding: 9px 12px; border-radius: 7px; color: #475467; background: #ECEAE6; border: 0; cursor: pointer; }
.tabs button.sel { background: var(--ink); color: #fff; }

/* ---------- Montos ---------- */
.pesos { position: relative; }
.pesos span { position: absolute; left: 12px; top: 10px; color: var(--muted); font-weight: 600; }
.pesos .inp { padding-left: 26px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.totales { background: #FAF9F7; border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 12px; margin: 10px 0 4px; }
.totales > div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.totales > div + div { border-top: 1px solid var(--line-2); }
.totales .total { font-size: 15.5px; }
.totales .total b { color: var(--green); }
.firma-pad + .acciones-form + .field + .field { margin-top: 10px; }

/* Cliente ausente, pago y dirección */
.cam.ancho { width: 100%; height: 170px; }
.ausente-card { border-color: #F3B8B2; }
.ausente-card h2 { color: var(--red); }
.pago-ver { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; padding: 10px 12px; background: var(--well); border-radius: 8px; }
.chk.pagado { margin-top: 12px; font-weight: 600; }
#monto-card .chk.opc { margin-top: 10px; }
#pago-w { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.dir-corr > div { margin-top: 4px; }
.dir-cli { margin-top: 16px; }
.dir-cli .mapa { width: 100%; height: 190px; border: 0; border-radius: 10px; background: var(--well); display: block; margin: 10px 0; }
.dir-cli .dir-txt { font-weight: 600; font-size: 15px; }
.ausente-cli { border-color: #F3B8B2; }
.pago-cli { border-color: #A6E3BD; background: #F3FBF6; }
.pago-cli .monto { font: 700 24px/1.2 var(--f-display); margin: 4px 0; }
.alerta.blk { display: block; }
.alerta.blk .acciones-form { margin-top: 10px; }
#dir-msg { margin-top: 12px; }
.barra-push { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; background: var(--orange-soft); border: 1px solid var(--orange-line); color: var(--orange-ink); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px; font-weight: 500; }
.barra-push > div { display: flex; gap: 8px; }
.mcontent-wrap > .barra-push { margin: 12px 12px 0; }
.mb-ticket { margin: 12px 0; }
.dia > .lista { display: flex; flex-direction: column; gap: 8px; }
/* En el celular el panel de avisos ocupa el ancho de la pantalla (antes se salía por la izquierda) */
@media (max-width: 600px) {
  .panel-avisos { position: fixed; left: 10px; right: 10px; top: 72px; width: auto; max-height: calc(100vh - 90px); }
}
.alerta-grande { text-align: center; }
.alerta-grande .ico { width: 72px; height: 72px; margin: 4px auto 14px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font: 700 42px/1 var(--f-display); box-shadow: 0 0 0 10px var(--red-soft); animation: latido 1s ease-in-out infinite; }
.alerta-grande h3 { color: var(--red); font-size: 20px; line-height: 1.25; }
.alerta-grande p { font-size: 15px; margin: 10px 0 4px; }
.alerta-grande .modal-acc { justify-content: center; }
.btn.rojo { background: var(--red); }
@keyframes latido { 50% { transform: scale(1.08); } }
.contacto { display: flex; gap: 8px; flex-wrap: wrap; }
.prod-w { position: relative; flex: 1; min-width: 0; }
.prod-w .linea-precio { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; min-height: 14px; }
.sugs { position: absolute; left: 0; right: 0; top: auto; margin-top: 4px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 300px; overflow: auto; }
.sugs button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 10px 12px; font: 13px/1.3 var(--f-ui); color: var(--ink); cursor: pointer; }
.sugs button:hover { background: var(--orange-soft); }
.sugs button span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.sugs .vacio { padding: 12px; font-size: 12.5px; }
#tot-prod { margin-top: 12px; }
.item-row { align-items: start; }
.totales .opcion span small { display: block; font: 400 11.5px/1.3 var(--f-ui); color: var(--muted); }
.totales .opcion { opacity: .75; }
.totales .opcion.elegida { opacity: 1; background: var(--orange-soft); border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.totales .opcion.elegida b { color: var(--orange-ink); }
.mt { margin-top: 16px; }
/* Fila de producto: buscador a todo el ancho, cantidad debajo */
.item-row { grid-template-columns: 1fr auto; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.item-row .prod-w { grid-column: 1 / -1; }
.item-row .stepper.chico { justify-self: start; }
.a-definir { color: var(--amber); }
.a-definir-card { border-color: #F5C98B; }
#encontrado:not(:empty) { margin: -4px 0 14px; }
/* Tiempo del servicio: valor tocable y ruleta */
.tiempo-val { min-width: 110px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: 700 15px/1 var(--f-ui); color: var(--ink); cursor: pointer; }
.tiempo-val:hover { border-color: var(--orange); }
.ruletas { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 6px; }
.ruletas .sel-linea { position: absolute; left: 0; right: 0; top: 88px; height: 44px; border-radius: 10px; background: var(--orange-soft); border: 1px solid var(--orange-line); pointer-events: none; }
.rueda { position: relative; height: 220px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); outline: none; }
.rueda::-webkit-scrollbar { display: none; }
.rueda > div { height: 44px; display: grid; place-items: center; scroll-snap-align: start; font: 600 20px/1 var(--f-ui); color: var(--ink); }

/* ---------- Comprobante de servicio (link del cliente y PDF) ---------- */
.comp { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; background: #fff; }
.comp-head { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; border-bottom: 3px solid var(--orange); }
.comp-emp { display: flex; gap: 10px; align-items: center; }
.comp-emp img { width: 40px; height: 46px; object-fit: contain; flex: none; }
.comp-emp div, .comp-num, .comp-datos > div, .comp-gar, .comp-pie { display: flex; flex-direction: column; gap: 1px; }
.comp-emp b { font: 700 15px/1.2 var(--f-display); }
.comp-emp span, .comp-num span, .comp-datos span, .comp-gar span, .comp-pie span { color: var(--muted); font-size: 12px; }
.comp-num > b { font: 700 15px/1.2 var(--f-display); letter-spacing: .04em; color: var(--orange-ink); }
.comp-num .mono { font: 700 16px/1.2 var(--f-mono); color: var(--ink); }
.comp-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.comp-datos > div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.comp-datos small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.comp h3 { font: 700 14px/1.2 var(--f-display); margin: 6px 0 0; }
.comp-det { margin: 0; white-space: pre-line; }
.comp-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.comp-tbl th { text-align: left; background: var(--well); padding: 6px 8px; border-bottom: 1px solid #CFCAC3; font-weight: 600; }
.comp-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.comp-tbl .num { text-align: right; }
.comp-tbl .mono { font: 11px var(--f-mono); }
.comp-cobro { border: 1.5px solid var(--orange); border-radius: 10px; overflow: hidden; margin-top: 4px; }
.comp-cab { padding: 8px 12px; background: var(--orange-soft); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); }
.comp-l { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.comp-l.tot b:last-child { font: 700 19px/1.2 var(--f-display); }
.comp-l.nota span { color: var(--muted); font-size: 12px; }
.comp-estado { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; }
.comp-estado.ok { background: #E6F5EE; color: #0B5A40; }
.comp-estado.pend { background: #FFF4E5; color: #8A3700; }
.comp-estado span { font-weight: 700; }
.comp-aviso { padding: 10px 12px; border-radius: 10px; background: #E8EFFD; color: #1E3A8A; font-size: 13px; }
.comp-aviso.esp { background: #E6F5EE; color: #0B5A40; font-size: 15px; margin: 12px 0; }
.comp-gar { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.comp-total { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #E6F5EE; color: #0B5A40; font-weight: 600; }
.comp-tareas { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.comp-tareas li { display: flex; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.comp-tareas li:last-child { border-bottom: 0; }
.comp-tareas li span { width: 16px; font-weight: 700; color: #0B5A40; }
.comp-tareas li.no { color: var(--muted); }
.comp-tareas li.no span { color: var(--muted); }
.comp-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.comp-fotos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--well); }
.comp-pie { border-top: 1px solid var(--line); padding-top: 10px; }
@media (min-width: 560px) { .comp-head { flex-direction: row; justify-content: space-between; align-items: flex-start; } .comp-num { text-align: right; } }
@media print {
  @page { size: A4; margin: 14mm 16mm; }
  body { background: #fff !important; }
  .no-print, .ticket .tb > :not(.comp) { display: none !important; }
  .ticket { max-width: none; }
  .ticket .tb { padding: 0; }
  .comp { border: 0; padding: 0; margin: 0; font-size: 12px; }
  .comp-head { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .comp-num { text-align: right; }
  .comp-emp img { width: 60px; height: 70px; }
  .comp-emp b { font-size: 18px; }
  .comp-num b { font-size: 20px; }
  .comp-cobro, .comp-estado, .comp-aviso, .comp-cab { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .comp-cobro, .comp-gar, .comp-fotos { break-inside: avoid; }
}
.manual-w { margin-top: 6px; }

/* ---------- Presupuestos ---------- */
.pp-precios { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; align-items: start; margin-top: 6px; }
.pp-lista, .pp-contado { border-radius: 10px; overflow: hidden; font-size: 13.5px; }
.pp-lista { border: 1.5px solid var(--orange); }
.pp-contado { border: 1px solid #A6E3BD; background: #F3FBF6; }
.pp-cab { padding: 8px 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pp-lista .pp-cab { background: var(--orange-soft); color: var(--orange-deep); }
.pp-contado .pp-cab { background: #E6F5EE; color: #0B5A40; }
.pp-l { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pp-contado .pp-l { border-color: #D5EEDF; }
.pp-l small { color: var(--muted); font-size: .85em; }
.pp-l.tot { border-bottom: 0; align-items: center; }
.pp-l.tot b:last-child { font: 700 19px/1.2 var(--f-display); }
.pp-contado .pp-l.tot b:last-child { color: #0B5A40; }
.pp-nota { padding: 4px 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.pp-nota b { font-size: 12.5px; color: var(--orange-deep); }
.pp-nota span, .pp-ahorro + .pp-fa, .pp-fa { font-size: 12px; color: var(--muted); }
.pp-ahorro { padding: 0 12px 8px; font-size: 12.5px; font-weight: 600; color: #0B5A40; }
.pp-fa { margin: 0 12px 12px; padding: 8px 10px; border-radius: 6px; background: #fff; border: 1px solid #D5EEDF; color: var(--ink) !important; }
.pp-entrega { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #E8EFFD; color: #1E3A8A; font-size: 13px; }
.pp-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pp-fotos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--well); display: block; }
.pp-fotos .otra { position: relative; }
.pp-fotos .otra .icon-btn { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; background: #fff; }
.board.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.para-hoy { background: var(--orange-soft); border: 1px solid var(--orange-line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; }
.para-hoy h3 { font: 600 13.5px/1 var(--f-ui); margin: 0 0 8px; color: var(--orange-ink); }
.ph-lista { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ph-lista a { color: var(--ink); text-decoration: none; }
.ph-lista a:hover { text-decoration: underline; }
.resumen-tec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.resumen-tec b { display: block; font: 700 17px/1.2 var(--f-display); }
.resumen-tec span { font-size: 11.5px; color: var(--muted); }
.resp-p { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 8px; align-items: stretch; }
.resp-p .link { align-self: center; color: var(--muted); }
.btn.grande { height: 52px; font-size: 16px; }
.col-form { max-width: 860px; }
.mtabs a { white-space: nowrap; }
@media (max-width: 1300px) { .board.c5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .board.c5 { grid-template-columns: 1fr; } }
@media print {
  .pp-lista, .pp-contado, .pp-cab, .pp-entrega, .pp-fa { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp-precios { grid-template-columns: 1fr 1fr; break-inside: avoid; }
}
.pp-lista > .pp-l.tot:first-child { padding-top: 14px; }
/* Menú del técnico en el celular: botones grandes 2 × 2 */
.mbotones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 12px 2px; }
.mbotones a { height: 58px; border-radius: 14px; background: #fff; border: 1px solid #E4E1DC; color: var(--ink); display: flex; align-items: center; gap: 10px; padding: 0 14px; font: 600 15px/1 var(--f-ui); text-decoration: none; }
.mbotones a svg { width: 22px; height: 22px; flex: none; }
.mbotones a .n { margin-left: auto; background: var(--orange-soft); color: var(--orange-ink); font-size: 12px; border-radius: 999px; padding: 4px 9px; }
.mbotones a.sel { background: var(--orange); border-color: var(--orange); color: #fff; }
.mbotones a.sel .n { background: rgba(255, 255, 255, .25); color: #fff; }
.mbotones a:active { transform: scale(.98); }
/* Calificación */
.calif { margin-top: 14px; text-align: center; }
.calif .estrellas { display: flex; justify-content: center; gap: 4px; margin: 6px 0 4px; }
.calif .est { background: none; border: 0; font-size: 40px; line-height: 1; color: #D6D3CE; cursor: pointer; padding: 2px; transition: transform .1s; }
.calif .est.on { color: #F5A100; }
.calif .est:not([disabled]):active { transform: scale(1.15); }
.calif .est[disabled] { cursor: default; }
.calif .calif-mas { text-align: left; }
.est-txt { color: #F5A100; letter-spacing: 1px; white-space: nowrap; }
.est-txt .off { color: #D6D3CE; }
.calif-tabla td { vertical-align: top; }
.mi-calif { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #FFF8E6; border: 1px solid #F5DFA6; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.mi-calif.chica { margin: 10px 12px 0; padding: 9px 12px; display: block; }
.wa-ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--green); padding: 0 6px; }

/* Conversación por WhatsApp */
.wa-lista { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding: 10px; background: #EFEAE2; border-radius: 10px; margin-bottom: 12px; }
.wa-msj { max-width: 85%; padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.4; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.wa-msj.in { align-self: flex-start; background: #fff; }
.wa-msj.out { align-self: flex-end; background: #D9FDD3; }
.wa-msj.auto { background: #EAF6E6; color: var(--ink-2); font-size: 13px; }
.wa-msj > div { white-space: pre-wrap; }
.wa-msj small { display: block; margin-top: 4px; font-size: 11.5px; color: #667781; white-space: normal; }
.wa-img { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; margin-bottom: 4px; }
.wa-audio { display: block; width: 240px; max-width: 100%; margin-bottom: 4px; }

/* Más datos del cliente (desplegable en la carga rápida) */
.mas-datos { margin: 2px 0 14px; }
.mas-datos > summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; padding: 6px 0; list-style-position: inside; }
.mas-datos[open] > summary { margin-bottom: 8px; }

/* Lista simple (pedido a Clic) */
.lista-simple { margin: 6px 0 12px; padding-left: 18px; font-size: 14px; line-height: 1.6; max-height: 220px; overflow-y: auto; }
.logo-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-edit img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line, #E5E3DF); border-radius: 8px; background: #fff; padding: 4px; }

/* Paleta de colores (revendedores) */
.paleta { display: flex; flex-wrap: wrap; gap: 8px; }
.paleta button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px 7px 8px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font: 600 13px/1 var(--f-ui); color: var(--ink-2); cursor: pointer; }
.paleta button i { width: 18px; height: 18px; border-radius: 50%; display: block; }
.paleta button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--line); }
.brand.marca-rev img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }

.paleta i.t-naranja { background: #FF6B00; }
.paleta i.t-azul { background: #2563EB; }
.paleta i.t-celeste { background: #0284C7; }
.paleta i.t-verde { background: #15803D; }
.paleta i.t-turquesa { background: #0D9488; }
.paleta i.t-violeta { background: #7C3AED; }
.paleta i.t-rosa { background: #DB2777; }
.paleta i.t-rojo { background: #DC2626; }
.paleta i.t-grafito { background: #374151; }
.paleta-h { margin: 0 0 6px; }
.pp-precios.uno { grid-template-columns: 1fr; }
@media print { .pp-precios.uno { grid-template-columns: 1fr; } }

/* Archivados (lista en modal) */
.lista-arch { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.lista-arch a { display: block; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 13.5px; }
.lista-arch a:hover { background: var(--canvas); }

/* Abonos */
.tareas-ab { margin: 6px 0 0; padding-left: 18px; }
.tareas-ab li { margin: 2px 0; }
.tareas-chk { display: grid; gap: 8px; }
.tareas-chk .chk { width: 100%; line-height: 1.3; }
.ab-fechas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ab-tareas-ed textarea { min-height: 110px; }

/* Buscador único de clientes */
.resultados-cli { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.res-cli { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); padding: 9px 11px; cursor: pointer; font: inherit; }
.res-cli:hover, .res-cli:focus-visible { border-color: var(--orange); background: var(--orange-soft); }
.res-cli b { font-size: 14px; }
.res-cli span { font-size: 12.5px; color: var(--muted); }
.res-cli small { font-size: 12px; color: var(--muted); font-style: italic; }
.resultados-cli > .btn { align-self: flex-start; }
.tel-lista { display: flex; flex-direction: column; gap: 6px; }
.tel-lista .it { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.tel-lista .it b { font-variant-numeric: tabular-nums; }
.tel-lista .acc { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.modal h4.sub { margin: 4px 0 2px; font: 700 13px/1.2 var(--f-display); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.pago-op { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.pago-op .chk { width: 100%; }
.chk input[type=radio] { border-radius: 50%; }
.card.visita.por-confirmar { border-left: 4px solid var(--orange, #e67e22); }
/* Stock comprometido */
.prod-w .stock-linea { display: block; font-size: 11.5px; margin-top: 2px; }
.stk { color: var(--muted); font-size: 11.5px; }
.stk.o { color: #B45309; font-weight: 600; }
.stk.r { color: #B91C1C; font-weight: 600; }
.compra-items td .stk { display: block; }
.compra-acc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.fact-tit { font-size: 15px; margin: 18px 0 6px; }
.preps { display: flex; flex-direction: column; gap: 6px; }
.prep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line, #e5e5e5); border-radius: 10px; }
.aviso-previo { margin: 8px 0; } .aviso-previo .resp { margin-top: 6px; }
.alerta.aviso-previo { display: block; } .alerta.aviso-previo .resp { display: flex; flex-wrap: wrap; gap: 6px; }
.cod-copiar { font: inherit; font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; background: none; border: 1px dashed transparent; border-radius: 6px; padding: 2px 4px; cursor: pointer; color: inherit; }
.cod-copiar:hover { border-color: var(--line, #ccc); background: #faf7f2; }
/* Ganancia del revendedor */
.prod-w .gan-linea { display: block; font-size: 11.5px; color: #166534; margin-top: 2px; }
.gan-linea .neg, .ganancia .neg { color: #B91C1C; }
.ganancia { margin-top: 12px; border: 1px solid #BBF7D0; background: #F0FDF4; border-radius: 12px; padding: 10px 12px; }
.gan-tit { font-weight: 700; margin-bottom: 6px; color: #166534; }
.gan-fila { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.gan-fila span:first-child { flex: 1; }
.gan-fila.tot { border-top: 1px dashed #BBF7D0; font-weight: 600; }
.gan-pill { background: #DCFCE7; color: #166534; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.gan-mes { font-size: 16px; text-transform: capitalize; min-width: 150px; text-align: center; }
.gan-tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.gan-t { display: flex; flex-direction: column; gap: 2px; }
.gan-t b { font-size: 20px; }
.gan-t.ok b { color: #166534; } .gan-t.mal b { color: #B91C1C; }
.gan-barras { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 18px; }
.gan-b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.gan-b i { width: 100%; max-width: 46px; background: #BBF7D0; border-radius: 6px 6px 0 0; min-height: 2px; }
.gan-b.sel i { background: #22C55E; }
.gan-b .v { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.gan-b small { color: var(--muted); }

/* ---------- Escáner de códigos ---------- */
dialog.modal.esc-modal { width: min(520px, calc(100vw - 20px)); }
.esc-video { position: relative; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; margin-top: 10px; }
.esc-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.esc-linea { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #ff3b30; box-shadow: 0 0 8px #ff3b30; }
.esc-estado { min-height: 20px; margin-top: 8px; font-size: 13.5px; }
.esc-estado .pos { color: var(--green); font-weight: 600; }
.esc-estado .neg, .vacio.neg { color: var(--red); }
.esc-manual { margin-top: 6px; }
.esc-busca { position: relative; margin-top: 10px; }
.esc-sugs { max-height: 280px; overflow: auto; margin-top: 6px; }
.esc-sugs button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 10px 6px; font: 13px/1.3 var(--f-ui); color: var(--ink); cursor: pointer; }
.esc-sugs button:hover { background: var(--orange-soft); }
.esc-sugs button span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.items-acc { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Consultar precio ---------- */
.cp { display: grid; gap: 14px; }
.cp-busca .cp-q { height: 48px; font-size: 16px; }
.cp-botones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cp-carrito { border-color: var(--orange-line); background: var(--orange-soft); }
.cp-cab { display: flex; gap: 16px; align-items: flex-start; }
.cp-cab h2 { font-size: 19px; margin-bottom: 4px; }
.cp-img { width: 140px; height: 140px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); flex: none; }
.cp-img.vacia { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; background: var(--well); }
.cp-stock { margin-top: 8px; }
.cp-stock .stk { font-size: 13px; }
.cp-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.cp-dos h4.sub { margin-bottom: 8px; font: 700 12px/1.2 var(--f-display); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cp-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.cp-tabla td { padding: 7px 4px; border-bottom: 1px solid var(--line-2); }
.cp-tabla td.r { text-align: right; }
.cp-desc { margin-top: 14px; }
.cp-desc p { white-space: normal; color: var(--ink-2); }
@media (max-width: 760px) { .cp-dos { grid-template-columns: 1fr; } .cp-img { width: 96px; height: 96px; } }

/* ---------- Precio para el cliente (página del producto, consulta, tablet) ---------- */
.pv-precios { display: grid; gap: 10px; }
.pv-lista, .pv-contado { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.pv-contado { border-color: var(--orange-line); background: var(--orange-soft); }
.pv-p { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pv-p span { font-weight: 600; }
.pv-p b { font: 700 24px/1.1 var(--f-display); }
.pv-contado .pv-p b { color: var(--orange-ink); }
.pv-ley { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.pv-neto { font-size: 11px; color: var(--muted); margin-top: 4px; }
.pv-sin { color: var(--muted); }
.pv { padding: 8px 4px 20px; }
.pv-img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #fff; border-radius: 12px; margin-bottom: 14px; }
.pv-nom { font: 700 21px/1.25 var(--f-display); margin-bottom: 4px; letter-spacing: 0; text-transform: none; }
.pv-cod { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.pv-botones { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.pv-desc { font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; }
.pv-nota { font-size: 11.5px; color: var(--muted); margin-top: 16px; }
.mbotones a[data-m="precios"] { grid-column: 1 / -1; }

/* ---------- Inicio del local en el celular ---------- */
.nav.solo-movil { display: none; }
@media (max-width: 760px) { .nav.solo-movil { display: flex; } }
.h-busca { display: flex; gap: 8px; margin: 12px; background: #fff; border: 1px solid #E4E1DC; border-radius: 14px; padding: 10px; }
.h-busca .inp { height: 46px; font-size: 16px; }
.h-busca .sugs { top: auto; }
.h-cam { width: 50px; flex: none; border: 0; border-radius: 10px; background: var(--orange); color: #fff; font-size: 20px; cursor: pointer; }
.h-hoy { margin: 0 12px 2px; background: var(--orange-soft); border: 1px solid var(--orange-line); border-radius: 14px; padding: 10px 14px; }
.h-hoy .h-tit { display: block; color: var(--orange-ink); font: 700 14px/1.2 var(--f-display); margin-bottom: 2px; }
.h-hoy a { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--orange-line); color: var(--ink); text-decoration: none; font-size: 14.5px; }
.h-hoy a:first-of-type { border-top: 0; }
.h-hoy a b { color: var(--orange-ink); }
.h-nada { color: var(--muted); font-size: 13.5px; padding: 4px 0; }
.h-bot a.pri { background: var(--orange); border-color: var(--orange); color: #fff; }
.h-mas { display: grid; margin-top: 8px; }
.h-mas-g { margin: 14px 0 2px; font: 700 11px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.h-mas-g:first-child { margin-top: 4px; }
.h-mas a, .h-mas button { display: flex; justify-content: space-between; padding: 13px 4px; border: 0; border-bottom: 1px solid var(--line-2); background: none; color: var(--ink); text-decoration: none; font: 500 15px/1.2 var(--f-ui); text-align: left; cursor: pointer; }
.h-mas span { color: var(--muted); }
.h-mas button { color: var(--red); }
/* Botonera del celular: dos columnas que nunca se salen de la pantalla (aunque el texto del celular sea grande) */
.mbotones { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mbotones a { min-width: 0; padding: 0 12px; gap: 8px; }
.mbotones a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbotones a .n { flex: none; }
.h-busca, .h-hoy { min-width: 0; }
.h-busca .prod-w { min-width: 0; }
/* Inicio del local: botones en mosaico (ícono arriba y texto abajo) para que entren con letra grande */
.h-bot a { position: relative; flex-direction: column; justify-content: center; height: auto; min-height: 72px; padding: 10px 6px; gap: 4px; text-align: center; }
.h-bot a span { white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
.h-bot a.venta { grid-column: 1 / -1; flex-direction: row; min-height: 58px; gap: 10px; font-size: 16px; }
.h-bot a .n { position: absolute; top: 6px; right: 8px; margin: 0; }

/* ---------- Tablet de consulta de precios (kiosco) ---------- */
body.kiosco { background: var(--canvas); min-height: 100vh; }
.k-cab { display: flex; align-items: center; gap: 14px; padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.k-cab img { height: 44px; }
.k-cab div { flex: 1; }
.k-cab b { display: block; font: 700 17px/1.2 var(--f-display); }
.k-cab span { color: var(--muted); font-size: 14px; }
.k-llamar { border: 0; background: var(--green); color: #fff; font: 700 16px/1 var(--f-ui); padding: 14px 18px; border-radius: 12px; cursor: pointer; }
.k-main { max-width: 1100px; margin: 0 auto; padding: 26px 22px 40px; }
.k-tit { font: 700 34px/1.15 var(--f-display); text-align: center; }
.k-sub { text-align: center; color: var(--muted); font-size: 16px; margin: 6px 0 18px; }
.k-busca { display: flex; gap: 10px; max-width: 760px; margin: 0 auto; }
.k-busca .inp { height: 60px; font-size: 20px; border-radius: 14px; }
.k-cam { height: 60px; font-size: 17px; border-radius: 14px; padding: 0 20px; }
.k-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 22px; }
.k-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font: 14px/1.3 var(--f-ui); color: var(--ink); }
.k-item img, .k-sinfoto { width: 100%; height: 130px; object-fit: contain; border-radius: 10px; background: #fff; }
.k-sinfoto { display: flex; align-items: center; justify-content: center; background: var(--well); color: var(--muted); font-size: 13px; }
.k-sinfoto.grande { height: 320px; }
.k-item span { color: var(--orange-ink); font: 700 17px/1.2 var(--f-display); }
.k-vacio { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 16px; padding: 30px; }
.k-ficha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.k-img { background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: 14px; }
.k-img img { width: 100%; max-height: 420px; object-fit: contain; display: block; }
.k-datos h1 { font: 700 26px/1.2 var(--f-display); }
.k-cod { color: var(--muted); margin: 4px 0 16px; }
.k-datos .pv-p b { font-size: 32px; }
.k-datos .pv-ley { font-size: 15px; }
.k-botones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.k-grande { height: 54px; font-size: 16px; padding: 0 20px; border-radius: 12px; }
.k-nota { color: var(--muted); font-size: 12.5px; margin-top: 14px; }
.k-aviso { max-width: 560px; margin: 60px auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 34px 26px; }
.k-aviso h1 { font: 700 30px/1.2 var(--f-display); margin-bottom: 10px; }
.k-aviso p { font-size: 18px; color: var(--ink-2); margin-bottom: 20px; }
.k-msg { max-width: 520px; margin: 80px auto; text-align: center; padding: 20px; }
.k-msg img { height: 56px; margin-bottom: 16px; }
.k-msg h1 { font: 700 26px/1.2 var(--f-display); margin-bottom: 8px; }
@media (max-width: 760px) {
  .k-ficha { grid-template-columns: 1fr; }
  .k-tit { font-size: 26px; }
  .k-llamar { font-size: 14px; padding: 11px 12px; }
  .k-cab b { font-size: 15px; }
}
.tab-link { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.tab-link > div:last-child { flex: 1; min-width: 240px; }
.tab-qr { width: 170px; height: 170px; flex: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.tab-qr svg { width: 100%; height: 100%; display: block; }

/* ---------- Alerta «Un cliente te espera» (tablet del local) ---------- */
.alerta-llamado { position: fixed; inset: 0; z-index: 9999; background: rgba(20, 24, 32, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.alerta-llamado .al-in { background: #fff; border-radius: 18px; border-top: 10px solid var(--green); width: min(440px, 100%); padding: 22px 22px 18px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); animation: al-latido 1s ease-in-out infinite alternate; }
@keyframes al-latido { from { transform: scale(1); } to { transform: scale(1.02); } }
.al-ic { font-size: 54px; line-height: 1; }
.al-in h2 { font: 700 23px/1.2 var(--f-display); margin: 8px 0 2px; }
.al-donde { font: 700 18px/1.3 var(--f-ui); color: var(--green); margin-bottom: 10px; }
.al-prod { background: var(--green-soft); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; margin-bottom: 14px; }
.al-prod span { display: block; color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.al-voy { width: 100%; border: 0; border-radius: 14px; background: var(--green); color: #fff; font: 700 20px/1 var(--f-ui); padding: 17px; cursor: pointer; }
.al-acc { display: flex; gap: 10px; margin-top: 10px; }
.al-acc a, .al-acc button { flex: 1; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 600 15px/1 var(--f-ui); padding: 13px; text-decoration: none; cursor: pointer; }
.al-t { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.al-esc { background: var(--red-soft); color: var(--red); font-weight: 700; border-radius: 8px; padding: 6px; margin-bottom: 8px; font-size: 13px; }
@media (max-width: 760px) {
  .alerta-llamado { background: var(--green); padding: 0; }
  .alerta-llamado .al-in { width: 100%; height: 100%; border-radius: 0; border: 0; background: var(--green); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 28px 22px; box-shadow: none; animation: none; }
  .al-in h2 { font-size: 28px; color: #fff; }
  .al-donde { color: #fff; font-size: 20px; opacity: .95; }
  .al-prod { background: rgba(255, 255, 255, .16); color: #fff; }
  .al-prod span { color: rgba(255, 255, 255, .85); }
  .al-voy { background: #fff; color: var(--green); }
  .al-acc a, .al-acc button { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
  .al-t { color: rgba(255, 255, 255, .85); }
}
.barra-sonido { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 900; border: 1px solid var(--orange-line); background: var(--orange-soft); color: var(--orange-ink); font: 600 12.5px/1.2 var(--f-ui); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); cursor: pointer; max-width: calc(100vw - 24px); }
.sub-h { font: 700 15px/1.3 var(--f-display); margin: 6px 0 4px; }
.tab-item { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.tab-nom { display: flex; gap: 8px; }
.tab-nom .inp { flex: 1; min-width: 0; }
.hor { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 12px; }
.tab-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tab-kpis div { background: var(--well); border-radius: 10px; padding: 10px 12px; }
.tab-kpis b { display: block; font: 700 20px/1.2 var(--f-display); }
.tab-kpis span { color: var(--muted); font-size: 12.5px; }
.esc-video video.espejo { transform: scaleX(-1); }

/* ---------- Consulta de precios (opción B): centrada; al buscar, el buscador sube ---------- */
.kz { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--canvas); border-top: 6px solid var(--orange); }
.kz-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px 12px; text-align: center; }
.kz-logo { height: 120px; }
.kz-marca { font: 700 16px/1.2 var(--f-display); color: var(--muted); margin-top: 6px; }
.kz-tit { font: 700 34px/1.1 var(--f-display); margin: 26px 0 6px; }
.kz-sub { color: var(--muted); font-size: 15px; margin: 0 0 16px; max-width: 420px; }
.kz-busca { display: flex; gap: 8px; width: 100%; max-width: 620px; align-items: center; }
.kz-busca .inp { flex: 1; min-width: 0; height: 56px; font-size: 18px; border: 2px solid var(--orange-line); border-radius: 14px; }
.kz-busca .inp:focus { border-color: var(--orange); }
.kz-cam { width: 62px; height: 56px; flex: none; border: 0; border-radius: 14px; background: var(--orange); color: #fff; font-size: 24px; cursor: pointer; }
.kz-logo-chico { display: none; height: 40px; cursor: pointer; }
.kz-mini { color: #98A2B3; font-size: 12.5px; margin: 10px 0 0; }
.kz-cont { display: none; }
.kz-pie { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--canvas) 30%); }
.kz-pie > div { flex: 1; max-width: 620px; margin: 0 auto; }
.kz-accion { display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; border: 0; border-radius: 14px; color: #fff; font: 700 17px/1 var(--f-ui); text-decoration: none; cursor: pointer; }
.kz-accion.wa, .kz-accion.llamar { background: var(--green); }
.kz-full { width: 54px; height: 54px; flex: none; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 22px; cursor: pointer; color: var(--muted); }
/* Al buscar: el encabezado se achica y queda arriba */
.kz.arriba .kz-hero { flex: none; flex-direction: row; justify-content: center; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.kz.arriba .kz-logo, .kz.arriba .kz-marca, .kz.arriba .kz-tit, .kz.arriba .kz-sub, .kz.arriba .kz-mini { display: none; }
.kz.arriba .kz-logo-chico { display: block; }
.kz.arriba .kz-busca .inp, .kz.arriba .kz-cam { height: 46px; }
.kz.arriba .kz-cam { width: 52px; font-size: 20px; }
.kz.arriba .kz-cont { display: block; flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 4px 12px 8px; }
.kz-cnt { color: var(--muted); font-size: 12.5px; padding: 6px 2px; }
.kz-lista { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) and (orientation: landscape) { .kz-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .kz-lista { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kz-item { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; text-align: left; cursor: pointer; font: 14px/1.25 var(--f-ui); color: var(--ink); }
.kz-item > img, .kz-item > .kz-sinfoto { width: 72px; height: 72px; flex: none; object-fit: contain; border-radius: 8px; background: #fff; }
.kz-it-t { min-width: 0; }
.kz-it-t b { display: block; font-size: 13.5px; }
.kz-p { display: block; color: var(--orange-ink); font: 700 17px/1.2 var(--f-display); margin-top: 3px; }
.kz-it-t small { display: block; color: var(--green); font-weight: 600; font-size: 12px; }
.kz-sinfoto { display: flex; align-items: center; justify-content: center; background: var(--well); border-radius: 8px; }
.kz-sinfoto img { width: 48%; filter: grayscale(1); opacity: .3; }
.kz-mas { display: block; margin: 12px auto; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 20px; font: 600 15px var(--f-ui); cursor: pointer; }
.kz-vacio { text-align: center; color: var(--muted); font-size: 15px; padding: 30px 10px; }
.kz-ficha { display: grid; grid-template-columns: 1fr; gap: 14px; padding-top: 8px; }
@media (min-width: 700px) and (orientation: landscape) { .kz-ficha { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; } }
.kz-img { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.kz-img > img { display: block; width: 100%; max-height: 380px; object-fit: contain; }
.kz-img > .kz-sinfoto { height: 220px; }
.kz-datos h2 { font: 700 20px/1.25 var(--f-display); }
.kz-cod { color: var(--muted); font-size: 12.5px; margin: 3px 0 12px; }
.kz-bot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.kz-nota { color: var(--muted); font-size: 11.5px; margin-top: 10px; }
.kz-aviso { max-width: 520px; margin: 40px auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px 22px; }
.kz-aviso h2 { font: 700 27px/1.2 var(--f-display); margin-bottom: 8px; }
.kz-aviso p { font-size: 17px; color: var(--ink-2); margin-bottom: 18px; }
.kz-grande { height: 52px; font-size: 16px; padding: 0 22px; border-radius: 12px; }
@media (max-height: 640px) { .kz-logo { height: 80px; } .kz-tit { margin-top: 14px; font-size: 28px; } }

/* ---------- Datos y contraseñas del cliente ---------- */
dialog.modal.dc-modal { width: min(680px, calc(100vw - 20px)); }
.dc-cli { margin-bottom: 10px; }
.dc-barra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.dc-barra .inp { flex: 1; min-width: 180px; }
.dc-lista { display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.dc-ent { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; }
.dc-ent.anulado { opacity: .55; }
.dc-ent.anulado .dc-txt { text-decoration: line-through; }
.dc-meta { font-size: 12.5px; color: var(--muted); }
.dc-meta b { color: var(--ink); }
.dc-txt { white-space: pre-wrap; word-break: break-word; font: 13px/1.45 var(--f-mono); margin: 6px 0 4px; background: var(--well); border-radius: 8px; padding: 8px 10px; }
.dc-txt mark { background: #FFE08A; border-radius: 3px; }
.dc-oculto { color: var(--muted); letter-spacing: .1em; margin-top: 4px; }
.dc-acc { display: flex; gap: 14px; }
.dc-nueva { margin-top: 12px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.dc-nueva summary { cursor: pointer; font-weight: 600; color: var(--orange-ink); }
.dc-atajos { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.chip-atajo { border: 1px solid var(--orange-line); background: var(--orange-soft); color: var(--orange-ink); border-radius: 999px; padding: 6px 11px; font: 600 12.5px/1 var(--f-ui); cursor: pointer; }
#dc-texto { font: 13.5px/1.45 var(--f-mono); }
.n-datos { background: var(--orange-soft); color: var(--orange-ink); border-radius: 999px; padding: 1px 7px; font-size: 11.5px; margin-left: 4px; }
.dc-vistas { display: grid; gap: 6px; max-height: 50vh; overflow: auto; font-size: 13.5px; }
.ls-prod { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.ls-nom { font: 700 18px/1.25 var(--f-display); margin-bottom: 2px; }
.ep-prods { display: grid; gap: 6px; margin: 6px 0 12px; }
.ep-prods div { background: var(--well); border-radius: 8px; padding: 7px 10px; font-size: 13.5px; }
.ep-prods span { display: block; color: var(--muted); font-size: 12.5px; }
.ep-busca { position: relative; }
.ep-sugs button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line-2); background: none; padding: 9px 4px; font: 13.5px/1.3 var(--f-ui); cursor: pointer; color: var(--ink); }
.ep-sugs button:hover { background: var(--orange-soft); }
.ep-sugs span { display: block; color: var(--muted); font-size: 12px; }
.wa-chat { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow: auto; background: #EFEAE2; border-radius: 10px; padding: 10px; }
.wa-msg { max-width: 85%; border-radius: 10px; padding: 7px 10px; font-size: 13.5px; background: #fff; align-self: flex-start; }
.wa-msg.out { background: #D9FDD3; align-self: flex-end; }
.wa-msg small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.kz-milista { flex: none; height: 46px; border: 1px solid var(--orange-line); background: var(--orange-soft); color: var(--orange-ink); border-radius: 12px; padding: 0 12px; font: 700 14px/1 var(--f-ui); cursor: pointer; white-space: nowrap; }
.kz:not(.arriba) .kz-milista { height: 56px; }
.kz-bot-wa .btn { flex: 1; min-width: 200px; }
.kz-lista-cli, .kz-form { text-align: left; }
.kz-lista-cli h2, .kz-form h2 { text-align: center; }
.kz-ml { display: grid; gap: 8px; margin: 12px 0 16px; }
.kz-ml > div { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.kz-ml span { flex: 1; min-width: 0; font-size: 14px; }
.kz-ml small { display: block; color: var(--muted); font-size: 12.5px; }
.kz-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--well); font-size: 20px; cursor: pointer; }
.kz-form .inp { height: 52px; font-size: 18px; }
.kz-err { color: var(--red); font-weight: 600; font-size: 14px; }

/* ---------- Presupuestos del técnico: pestañas por estado ---------- */
.tabs-pres { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.tabs-pres::-webkit-scrollbar { display: none; }
.tab-pres { flex: none; border: 1px solid #E4E1DC; background: #fff; border-radius: 999px; padding: 9px 13px; font: 600 14px/1 var(--f-ui); color: var(--ink); cursor: pointer; white-space: nowrap; }
.tab-pres i { font-style: normal; background: rgba(0, 0, 0, .07); border-radius: 999px; padding: 2px 7px; margin-left: 6px; font-size: 12px; }
.tab-pres.sel { background: var(--orange); border-color: var(--orange); color: #fff; }
.tab-pres.sel i { background: rgba(255, 255, 255, .3); }
.pc.est-a { border-left: 4px solid #F79009; }
.pc.est-b { border-left: 4px solid var(--blue); }
.pc.est-g { border-left: 4px solid var(--green); }
.pc.est-r { border-left: 4px solid var(--red); }
.pc-alerta { font-size: 12.5px; font-weight: 600; color: var(--amber); }
.pc-alerta.r { color: var(--red); }
.cl-q { height: 48px; font-size: 16px; margin: 6px 0; }
.cl-lista { display: grid; gap: 8px; }
.cl-it { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; cursor: pointer; font: 14px/1.3 var(--f-ui); color: var(--ink); width: 100%; }
.cl-it:hover { border-color: var(--orange-line); }
.cl-it small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cl-n { flex: none; text-align: right; font-weight: 700; color: var(--orange-ink); }
.cl-n.cero { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.mbotones a[data-m="precios"] { grid-column: auto; }
.dc-adjuntar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.dc-adjuntar .btn { cursor: pointer; }
.dc-adj { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dc-chip { position: relative; display: flex; flex-direction: column; align-items: center; width: 92px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; font-size: 11px; }
.dc-chip img { width: 82px; height: 62px; object-fit: cover; border-radius: 5px; }
.dc-chip small { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-chip button { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; }
.dc-fotos { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.dc-fotos img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.dc-pdf { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.dc-nfotos { letter-spacing: 0; font-size: 12.5px; margin-left: 8px; }
.dc-mas-foto { cursor: pointer; }
.tr-tabla .inp { min-width: 220px; height: 36px; font-size: 13px; }
.tr-tabla tr.tr-elegir td { background: #FFFBF4; }
.tr-pasos { padding-left: 18px; margin: 6px 0 12px; display: grid; gap: 6px; }
.rg-res { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rg-u { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 11px; text-align: left; cursor: pointer; font: 13px/1.3 var(--f-ui); color: var(--ink); }
.rg-u span { display: block; color: var(--muted); font-size: 12px; }
.rg-u.sel { border-color: var(--orange); background: var(--orange-soft); }
.wa-consulta .wa-msj { max-width: none; margin: 6px 0 10px; }
.wa-conv .acciones-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* Anexos PDF del presupuesto */
.comp-anexos { display: grid; gap: 8px; margin-bottom: 8px; }
.comp-anexos a, .ax-fila { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; background: #fff; }
.comp-anexos a:hover { border-color: var(--brand, #FF6B00); }
.ax-ico { flex: none; width: 40px; height: 40px; border-radius: 8px; background: #FDECEC; color: #C62828; font: 700 11px/40px system-ui, sans-serif; text-align: center; }
.comp-anexos a > span:nth-child(2), .ax-fila .ax-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.comp-anexos small, .ax-fila small { color: var(--ink-2, #4A5160); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-ir { flex: none; font-weight: 700; color: var(--brand-deep, #8A3700); font-size: 14px; }
.ax-lista { display: grid; gap: 8px; margin: 8px 0; }
.ax-fila .ax-acc { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.ax-nueva { color: #8A3700; font-size: 12.5px; }
.ax-bib-res { max-height: 50vh; overflow: auto; display: grid; gap: 6px; margin-top: 8px; }
.ax-bib-res button { text-align: left; display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; }
.ax-bib-res button[disabled] { opacity: .5; cursor: default; }
@media print { .comp-anexos a { break-inside: avoid; } }
.comp-anexos, .ax-lista { grid-template-columns: minmax(0, 1fr); }
.comp-anexos a, .ax-fila { min-width: 0; box-sizing: border-box; width: 100%; }
@media (max-width: 560px) { .ax-fila { flex-wrap: wrap; } .ax-fila .ax-acc { width: 100%; justify-content: flex-start; } }
.warn-txt { color: #B45309; }
/* Servicios en el presupuesto */
.chip-serv { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px; background: #E8F0FE; color: #1D4ED8; vertical-align: 1px; font-family: inherit; }
.sugs .sug-crear { background: #FFF1E6; }
.sugs .sug-crear b { color: #8A3700; }
.prod[readonly] { background: var(--well, #F5F4F1); }
.sugs button .chip-serv { display: inline-block; margin: 0 0 0 6px; color: #1D4ED8; font-size: 11px; }
/* Mi lista (consulta de precios) */
.ml-barra { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; background: var(--orange-soft, #FFF1E6); border: 1px solid #FFD8B5; border-radius: 12px; padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; text-align: left; margin-top: 10px; }
.ml-barra small { color: var(--muted); }
.ml-modal .modal-in { max-width: 520px; }
.ml-lista { display: grid; margin: 6px 0 8px; }
.ml-it { display: flex; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.ml-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ml-n small { color: var(--muted); font-size: 12.5px; }
.ml-q { width: 64px; text-align: center; }
.ml-tot { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.ml-tot b { font-size: 16px; }
.ok-txt { color: #067647; }
.peligro-txt { color: #B42318; }
.ml-acc { display: grid; gap: 8px; margin-top: 12px; }
.ml-acc .btn { justify-content: center; }
.ml-pedido { display: grid; gap: 4px; margin: 6px 0 10px; font-size: 14px; }
/* Consultar precio del revendedor */
.rc-precio { background: #ECFDF3; border: 1px solid #ABEFC6; border-radius: 12px; padding: 12px 14px; }
.rc-precio .r { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rc-precio b { font-size: 26px; color: #067647; }
.rc-precio small { color: var(--muted); font-size: 12.5px; }
.rc-yo { background: #1F2430; color: #fff; border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.rc-yo .lbl { font: 700 11px var(--f-ui); letter-spacing: .05em; text-transform: uppercase; color: #C9CCD3; margin: 0 0 6px; }
.rc-yo .r { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.rc-yo .g { color: #6CE9A6; font-weight: 700; }
.rc-sub { font: 700 11px var(--f-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.rc-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rc-botones .btn { justify-content: center; }
.rc-sugs .p { float: right; font-weight: 700; color: #067647; margin-left: 8px; }
@media (max-width: 640px) { .toolbar a.btn.green[href="/mis-precios"] { order: -1; width: 100%; justify-content: center; padding: 14px; font-size: 16px; } }
.h-tec a.ancho { grid-column: 1 / -1; flex-direction: row; min-height: 52px; }
/* Liquidación de técnicos */
.liq-saldo { display: flex; flex-direction: column; gap: 2px; background: linear-gradient(135deg, var(--orange, #FF6B00), #FF8A3D); color: #fff; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.liq-saldo b { font: 700 30px/1.1 var(--f-display, inherit); }
.liq-saldo span { font-size: 14px; opacity: .95; }
.liq-tabla td.num, .liq-tabla th.num { text-align: right; white-space: nowrap; }
.liq-tot { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.liq-tot b { font-size: 17px; }
.liq-gar { background: #FFFAEB; border: 1px solid #FEDF89; border-radius: 10px; padding: 10px 12px; margin: 8px 0; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.lq-modal .modal-in { max-width: 820px; width: 100%; }
dialog.modal.lq-modal { width: min(820px, calc(100vw - 20px)); } dialog.modal.ml-modal { width: min(520px, calc(100vw - 20px)); }
.pc-motivo { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; } .canc-info { font-size: 12px; margin-top: 4px; max-width: 260px; }
@media (min-width: 1100px) { .board.board-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Presupuestos: panel (números, tareas y lista) */
.pp-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.pp-top #pp-q { flex: 1 1 260px; max-width: 360px; }
.pp-top select.inp { width: auto; max-width: 180px; }
.pp-chk { display: flex; align-items: center; gap: 6px; font-size: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; cursor: pointer; }
.pp-sp { flex: 1; }
.pp-kpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pp-kpi > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); }
.pp-kpi span:first-child { display: block; }
.pp-kpi b { display: block; font-size: 20px; color: var(--ink); margin: 2px 0; }
.pp-kpi .up { color: #067647; font-weight: 600; } .pp-kpi .dn { color: #B42318; font-weight: 600; }
.pp-bar { height: 6px; background: #EFEDEA; border-radius: 4px; overflow: hidden; margin-top: 6px; } .pp-bar i { display: block; height: 100%; background: #12B76A; }
.pp-cajas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pp-caja { background: #fff; border: 1px solid var(--line); border-top: 4px solid #F79009; border-radius: 12px; padding: 10px 12px; min-width: 0; }
.pp-caja.r { border-top-color: #D92D20; } .pp-caja.b { border-top-color: #2E90FA; } .pp-caja.g { border-top-color: #12B76A; }
.pp-caja.a { border-top-color: #F79009; }
.pp-caja h5 { margin: 0 0 2px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.pp-caja h5 b { background: #FEE4E2; color: #B42318; border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.pp-caja .sub { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pp-it { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 0; border-top: 1px solid #F2F1EE; }
.pp-it .n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; }
.pp-it small { color: var(--muted); }
.ab { border: 1px solid #E4E1DC; background: #fff; border-radius: 7px; font-size: 12px; padding: 3px 8px; font-weight: 600; white-space: nowrap; color: var(--ink); text-decoration: none; }
.ab.wa { background: #DCFAE6; border-color: #ABEFC6; color: #067647; }
.pp-ok { font-size: 13px; color: #067647; padding: 8px 0; } .pp-mas { font-size: 12px; color: var(--muted); padding-top: 4px; }
.pp-tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.pp-tabs button { border: 1px solid #E4E1DC; background: #fff; border-radius: 999px; padding: 7px 12px; font: 600 13px var(--f-ui); cursor: pointer; color: var(--ink); }
.pp-tabs button.sel { background: #1F2430; color: #fff; border-color: #1F2430; }
.pp-tabs i { font-style: normal; opacity: .7; margin-left: 5px; }
.pp-tbl th.ord { cursor: pointer; user-select: none; white-space: nowrap; }
.pp-tbl tbody tr { cursor: pointer; } .pp-tbl tbody tr:hover { background: #FFF8F2; }
.pp-que { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-prox { font-size: 13px; } .pp-prox.rojo { color: #B42318; font-weight: 600; }
.pp-acc { display: flex; gap: 4px; justify-content: flex-end; opacity: .35; } .pp-tbl tr:hover .pp-acc { opacity: 1; }
@media (max-width: 1100px) { .pp-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pp-cajas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pp-kpi, .pp-cajas { grid-template-columns: 1fr; } .pp-que { display: none; } }
/* Menú agrupado */
.side { overflow-y: auto; }
.nav-g { font: 600 10.5px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); padding: 14px 10px 5px; }
.nav { padding-top: 8px; padding-bottom: 8px; }
/* Inicio en la computadora */
.ini-kpi > a { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.ini-kpi > a:hover { border-color: #FFB27A; }
.ini-kpi span:first-child { display: block; } .ini-kpi b { display: block; font-size: 20px; color: var(--ink); margin: 2px 0; }
.sem { font-weight: 700; } .sem.g { color: #067647; } .sem.a { color: #B54708; } .sem.r { color: #B42318; }
.ini-areas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ini-areas a { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 13px; color: var(--ink); text-decoration: none; }
.ini-areas a:hover { border-color: #FFB27A; }
.pp-it .rojo { color: #B42318; }
a.pp-mas { display: block; text-decoration: none; }
button.ab { cursor: pointer; font-family: var(--f-ui); }
/* Sonido de los avisos apagado: marca en la campanita */
#btn-avisos { position: relative; }
.campana-muda { position: absolute; left: -6px; bottom: -6px; font-size: 11px; line-height: 1; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 3px; pointer-events: none; }
/* Colas: semáforo de antigüedad, resumen y botón Agendar */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); text-decoration: none; }
a.chip:hover { border-color: #FFB27A; }
.tc { border-left-width: 5px; cursor: pointer; }
.tc.sem-g { border-left-color: #12B76A; } .tc.sem-a { border-left-color: #F79009; } .tc.sem-r { border-left-color: #D92D20; }
.tc.urg { border-left-width: 5px; }
.dias { font-weight: 700; } .dias.g { color: #067647; } .dias.a { color: #B54708; } .dias.r { color: #B42318; }
.tc-acc { margin-left: auto; }
.ab.or { background: var(--orange, #FF6B00); border-color: var(--orange, #FF6B00); color: #fff; }
/* Agenda: semana por técnico */
.ag-sem { display: grid; grid-template-columns: 180px repeat(6, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ag-sem > div { border-right: 1px solid #EFEDEA; border-bottom: 1px solid #EFEDEA; padding: 7px; min-height: 84px; font-size: 12px; min-width: 0; }
.ag-sem .ag-h { min-height: auto; background: #FAFAF8; font-weight: 700; text-align: center; }
.ag-sem .ag-h.hoy { background: #FFEAD5; color: #B93815; }
.ag-tec { display: flex; flex-direction: column; gap: 3px; } .ag-tec b { font-size: 13px; }
.ag-carga { height: 6px; background: #EFEDEA; border-radius: 4px; overflow: hidden; margin-top: 3px; } .ag-carga i { display: block; height: 100%; }
.ag-carga i.g { background: #12B76A; } .ag-carga i.a { background: #F79009; } .ag-carga i.r { background: #D92D20; }
.ag-v { border-radius: 7px; padding: 5px 7px; margin-bottom: 5px; line-height: 1.3; border-left: 4px solid #12B76A; background: #ECFDF3; cursor: pointer; overflow: hidden; }
.ag-v b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-v small { color: var(--muted); display: block; }
.ag-v.pend { background: #FFFAEB; border: 1.5px dashed #FDB022; border-left: 4px solid #FDB022; }
.ag-v.urg b { color: #B42318; }
.ag-v[draggable] { cursor: grab; } .ag-v.mov { opacity: .45; }
.ag-libre { display: block; color: #98A2B3; font-size: 11.5px; text-align: center; padding-top: 22px; }
.ag-cel.sobre { background: #FFF4EC; outline: 2px dashed #F5A25D; outline-offset: -4px; }
.ag-cel.pasado { background: #FBFBFA; }
.ag-ley { margin-left: auto; }
@media (max-width: 1100px) { .ag-sem { grid-template-columns: 130px repeat(6, minmax(110px, 1fr)); overflow-x: auto; } }
/* Tickets: filtros */
.tk-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.tk-filtros select.inp { width: auto; max-width: 200px; padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
.tk-filtros .on { border-color: #FF6B00; background: #FFF4EC; color: #B93815; font-weight: 600; }
.tk-que { max-width: 320px; }
.pp-prox.ama { color: #B54708; font-weight: 600; }
.pp-tbl th.ord i { font-style: normal; opacity: .6; }
#barra select.inp { width: auto; max-width: 260px; }
#fac-kpi .dn { color: #B42318; font-weight: 600; } #fac-kpi .up { color: #067647; font-weight: 600; } .toolbar select.inp { width: auto; max-width: 220px; }
.cli-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cli-kpi .dn { color: #B42318; }
.ab-cajas { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pp-kpi b.dn { color: #B42318; } @media (max-width: 800px) { .ab-cajas { grid-template-columns: 1fr; } }
/* Configuración: menú por tema y una sección por vez */
.cfg { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.cfg-menu { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; position: sticky; top: 12px; display: flex; flex-direction: column; }
.cfg-menu small { font: 600 10.5px var(--f-ui); color: #98A2B3; text-transform: uppercase; letter-spacing: .06em; padding: 10px 10px 4px; }
.cfg-menu a { padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink); text-decoration: none; }
.cfg-menu a:hover { background: #F7F6F3; } .cfg-menu a.sel { background: #FFF4EC; color: #B93815; font-weight: 700; }
#cfg-cards > .card { display: none !important; } #cfg-cards > .card.cfg-ver { display: block !important; }
@media (max-width: 800px) { .cfg { grid-template-columns: 1fr; } .cfg-menu { position: static; } }

/* Mano de obra por ítems de servicio */
.mo-row { display: grid; grid-template-columns: 1fr 130px auto; gap: 6px 8px; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line, #E4E1DC); }
.mo-row .mo-nota { grid-column: 1 / 3; }
.mo-row .quitar { width: 34px; height: 38px; color: var(--muted); background: none; border: 0; cursor: pointer; }
.mo-ver { width: 100%; font-size: 13px; border-collapse: collapse; margin: 6px 0; }
.mo-ver td { padding: 4px 0; border-bottom: 1px solid var(--line, #EFEDEA); }
.mo-ver .cod { font-family: ui-monospace, monospace; font-weight: 700; }
.bonif-l { color: #067647; }
.bonif-l small { display: block; font-weight: 400; }
.mo-ayu-w { grid-column: 1 / -1; display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; }

/* ---------- Taller ---------- */
.tl-board { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.tl-board .tc { font-size: 12px; padding: 9px 10px; } .tl-board .tc .nm { font-size: 12.5px; }
.tl-tc.sem-g { border-left: 4px solid #12B76A; } .tl-tc.sem-a { border-left: 4px solid #F79009; } .tl-tc.sem-r { border-left: 4px solid #D92D20; }
.tl-tc .tk { font-family: var(--f-mono); font-weight: 700; }
.txt-rojo { color: var(--red); }
.esp-txt { white-space: pre-wrap; max-height: 160px; overflow: auto; font-size: 12.5px; }
.ord-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ord-top h1 { font-size: 19px; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ord-top .sp { flex: 1; }
.col2-ficha { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.col2-ficha > div { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
form.col2-ficha { display: block; max-width: 900px; }
.flujo { display: flex; gap: 4px; flex-wrap: wrap; }
.flujo span { font-size: 11.5px; padding: 4px 8px; border-radius: 7px; background: var(--well); color: #475467; font-weight: 600; }
.flujo span.ok { background: #DCFAE6; color: #067647; } .flujo span.ac { background: var(--brand, #FF6B00); color: #fff; }
.acc-orden { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tag-int { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #1F2430; color: #fff; vertical-align: middle; margin-left: 4px; }
.tl { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 12px; }
.tl > div { position: relative; padding: 5px 0; font-size: 12.8px; }
.tl > div::before { content: ''; position: absolute; left: -18px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: #12B76A; }
.tl > div.o::before { background: #FF6B00; } .tl > div.b::before { background: #2E90FA; }
.tl small { color: var(--muted); }
.dato-g { display: grid; grid-template-columns: 130px 1fr; gap: 5px 10px; font-size: 13px; }
.dato-g > b { color: var(--muted); font-weight: 600; }
.wa-burbuja { background: #E7F8EE; border: 1px solid #B7E4C7; border-radius: 10px; padding: 8px 10px; font-size: 12.5px; margin-top: 6px; white-space: pre-wrap; }
.wa-burbuja small { display: block; color: var(--muted); }
.chks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cli-fijo { margin-top: 6px; }
.ref-grande { font-size: 22px; }
#etq-print { display: none; }
@media print {
  body.imprimiendo-etq > *:not(#etq-print) { display: none !important; }
  body.imprimiendo-etq #etq-print { display: block; font-family: Arial, sans-serif; padding: 2mm; }
  #etq-print .n { font-size: 22pt; font-weight: 700; } #etq-print .l { font-size: 10pt; } #etq-print .s { font-size: 8pt; }
}
@media (max-width: 900px) { .col2-ficha { grid-template-columns: 1fr; } .tl-board { grid-template-columns: 1fr; } .dato-g { grid-template-columns: 105px 1fr; } }
.movil .toolbar, .movil #tl-kpi, .movil #tl-sinv, .movil .tl-board, .movil #tl-lista { margin-left: 14px; margin-right: 14px; }
.movil .toolbar { flex-wrap: wrap; gap: 8px; }
.movil .toolbar .buscar { flex: 1 1 100%; }
.movil #tl-kpi { grid-template-columns: 1fr 1fr; gap: 8px; }
.movil #tl-kpi > div:nth-child(n+4) { display: none; }
.movil #tl-kpi b { font-size: 17px; }
.movil #orden { padding: 0 14px 20px; }

/* Taller v.40: alertas, plazos, ficha, entrega, seguimiento */
.tl-alertas { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.tl-alertas:empty { display: none; }
.dias-g { color: var(--green); font-weight: 600; } .dias-a { color: var(--amber); font-weight: 600; } .dias-r { color: var(--red); font-weight: 600; }
.tl-tag { font-size: 11px; padding: 2px 6px; border-radius: 5px; background: var(--blue-soft); color: var(--blue); }
.o-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.o-head .cod { font: 700 22px/1 var(--f-mono); }
.o-head h2 { font-size: 18px; margin-top: 4px; }
.o-head .acc { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.o-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.o-plazo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--amber-soft); color: var(--amber); border-radius: 9px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.o-plazo b { color: var(--ink); } .o-plazo .btn { margin-left: auto; }
.o-plazo.pausa { background: var(--blue-soft); color: var(--blue-ink); }
.o-plazo.rojo { background: var(--red-soft); color: var(--red); }
.o-bar { height: 6px; border-radius: 9px; background: #F3D9B8; flex: 0 0 120px; overflow: hidden; } .o-bar i { display: block; height: 100%; background: var(--amber); }
.o-bar .p0 { width: 5%; } .o-bar .p1 { width: 15%; } .o-bar .p2 { width: 25%; } .o-bar .p3 { width: 35%; } .o-bar .p4 { width: 45%; } .o-bar .p5 { width: 55%; } .o-bar .p6 { width: 65%; } .o-bar .p7 { width: 75%; } .o-bar .p8 { width: 85%; } .o-bar .p9 { width: 95%; } .o-bar .p10 { width: 100%; }
.o-g2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.o-g2 > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card h2 .acc { margin-left: auto; display: flex; gap: 6px; }
.card h2.con-acc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.o-kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13px; margin: 0; }
.o-kv dt { color: var(--muted); } .o-kv dd { margin: 0; overflow-wrap: anywhere; }
.o-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.o-tbl td, .o-tbl th { padding: 7px 8px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.o-tbl th { font: 600 11px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.o-tbl .r { text-align: right; white-space: nowrap; }
.o-tbl tr.tot td { font-weight: 700; font-size: 14px; border-top: 2px solid var(--ink); border-bottom: 0; }
.o-tbl tr.int td { color: var(--muted); font-size: 12px; }
.o-tbl tr.no td { color: var(--muted); text-decoration: line-through; }
.o-fotos { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.o-fotos img, .o-fotos video { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--well); }
.o-fotos a.firma img { outline: 2px solid var(--green); }
.lin-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px auto 34px; gap: 8px; align-items: center; margin-bottom: 6px; }
.mo2-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 120px 34px; gap: 8px; align-items: center; margin-bottom: 6px; }
.it2-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 120px 34px; gap: 8px; align-items: center; margin-bottom: 6px; }
.lin-row .quitar, .mo2-row .quitar, .it2-row .quitar { width: 34px; height: 38px; color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 16px; }
.ing-res { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.ing-res .res-cli { cursor: pointer; }
.cli-sel { background: var(--well); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.o-pasos { display: flex; flex-direction: column; }
.o-paso { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 14px; }
.o-paso i { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 12px/1 var(--f-ui); font-style: normal; background: #E5E3DF; color: #888; }
.o-paso.ok i { background: var(--green); color: #fff; } .o-paso.act i { background: var(--orange); color: #fff; }
.o-paso small { display: block; color: var(--muted); font-size: 12px; }
.o-cli-btns { display: flex; gap: 8px; margin-top: 10px; } .o-cli-btns .btn { flex: 1; justify-content: center; }
.o-sello { display: inline-block; border: 2px solid var(--green); color: var(--green); font-weight: 700; border-radius: 6px; padding: 3px 10px; letter-spacing: .06em; }
.o-sello.debe { border-color: var(--amber); color: var(--amber); }
@media (max-width: 900px) { .o-g2 { grid-template-columns: 1fr; } .o-kv { grid-template-columns: 115px 1fr; } .lin-row, .mo2-row, .it2-row { grid-template-columns: 1fr 1fr; } }
.movil #tl-alertas { margin-left: 14px; margin-right: 14px; }
.modal:has(.modal-ancho) { width: min(860px, 94vw); max-width: 94vw; }
.lin-row .row.c2 { gap: 6px; margin: 0; grid-template-columns: 70px 1fr; }
.lin-row .row.c2.lin-mh { grid-template-columns: 1fr 1fr; }
.res-cobro { margin-top: 12px; }
.res-cobro td { padding: 3px 0; }
.res-cobro .ok { color: var(--green, #1a7f4b); font-weight: 600; }

/* Técnico en la PC: el menú lateral reemplaza a los botones grandes del inicio */
.shell .h-tec { display: none; }

.mb { margin-bottom: 12px; }

/* Checklist de mantenimiento (cierre de visitas de abono) */
.ck-prog { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 6px 0 2px; }
.ck-prog i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .2s; }
.ck-grupo { font: 700 11px var(--f-ui); letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin: 14px 0 2px; }
.ck-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.ck-item:last-child { border-bottom: 0; }
.ck-item p { margin: 0; font-size: 14px; color: var(--ink); }
.tri { display: flex; gap: 6px; }
.tri button { flex: 1; height: 36px; border: 1px solid #D6D3CE; border-radius: var(--r-sm); background: #fff; font: 600 13px var(--f-ui); color: var(--ink-2); cursor: pointer; }
.tri button[data-e="ok"][aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.tri button[data-e="falla"][aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.tri button[data-e="na"][aria-pressed="true"] { border-color: #98A2B3; background: #F2F4F7; color: #475467; }
.ck-falla { display: flex; flex-direction: column; gap: 6px; }
.ck-sub { display: flex; gap: 6px; }
.mini-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border: 1px dashed var(--orange-line); border-radius: var(--r-sm); background: var(--orange-soft); color: var(--orange-ink); font: 600 12.5px var(--f-ui); cursor: pointer; }
.ck-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-th { width: 64px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--well); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.ck-th img { width: 100%; height: 100%; object-fit: cover; }
.ck-fallas { margin: 0 0 8px; padding-left: 18px; color: var(--red); font-size: 13.5px; }
.ck-equipo summary { cursor: pointer; list-style: none; }
/* Informe de mantenimiento (link del cliente) */
.inf-ck { list-style: none; margin: 0; padding: 0; }
.inf-ck li { padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.inf-ck li.ok { color: var(--green); } .inf-ck li.falla { color: var(--red); } .inf-ck li.na { color: var(--muted); }
.inf-ck small { display: block; color: var(--ink-2); }
.inf-med { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.inf-med img, .inf-med video { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--well); }

/* Atención de abono: materiales, listas para elegir */
.field.rel { position: relative; }
.seg.wrap { flex-wrap: wrap; }
.rm-items { list-style: none; padding: 0; margin: 6px 0; }
.rm-items li { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.rm-items li .n { flex: 1; min-width: 0; }
.rm-items .inp.cant { width: 64px; flex: none; }
.rm-items .inp.pc { width: 120px; flex: none; }
.lista-elegir { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.btn.elegir { justify-content: flex-start; text-align: left; height: auto; padding: 8px 12px; }
.btn.ancho { width: 100%; }
.acciones-form.col { flex-direction: column; align-items: stretch; }

/* Foto chiquita del producto en los buscadores */
.sugs button.con-foto { display: flow-root; }
.sugs .mini-foto { float: left; margin-right: 10px; }
.mini-foto { width: 40px; height: 40px; flex: none; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line-2); transition: transform .15s ease; }
.mini-foto.vacia { display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 16px; opacity: .45; background: var(--surface-2, #F4F3F0); }
img.mini-foto:hover { transform: scale(3); transform-origin: left center; position: relative; z-index: 40; box-shadow: var(--shadow); }
.res-cli.con-foto { flex-direction: row; align-items: center; gap: 10px; }
.res-cli.con-foto .t { display: flex; flex-direction: column; gap: 2px; color: inherit; font-size: inherit; }
/* Fotos/videos «antes del trabajo» */
.antes-th { position: relative; width: 84px; height: 64px; }
.antes-th a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; text-decoration: none; }
.antes-x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.comp-video { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; padding: 10px 14px; border: 1px solid var(--line, #e5e1db); border-radius: 10px; text-decoration: none; }
/* Stock por depósito en los buscadores y la consulta */
.deps-l { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.deps-l i { font-style: normal; font-size: 11.5px; line-height: 1.5; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--canvas); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.deps-l i b { color: var(--orange-ink); font-weight: 700; }
.res-cli.con-foto .t .deps-l { margin-top: 2px; }
/* Depósitos y stock */
.fila-sp { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dep-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dep-top .tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button .n { display: inline-block; margin-left: 4px; min-width: 18px; padding: 2px 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; }
tr.apagado td { opacity: .55; }
.dep-lista { display: flex; flex-direction: column; }
.dep-it { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line-2); }
.dep-it .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dep-it .q { font: 700 17px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.trf-lineas { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.trf-l { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.trf-l .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trf-l .cant { width: 76px; text-align: center; }
.trf-l.mal { border-color: var(--red); background: var(--red-soft); }
.llevado li { padding: 4px 0; }
.st-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.st-filtros .inp { flex: 1 1 180px; min-width: 0; }
.st-tbl td.cero { color: var(--muted); }
.st-tbl th.num { white-space: nowrap; }
.st-tbl td:nth-child(2) { min-width: 240px; }
.trf-busca { display: flex; gap: 8px; align-items: flex-start; }
.trf-busca .prod-w { flex: 1; min-width: 0; }
.sugs button .deps-l { display: flex; flex-wrap: wrap; white-space: normal; overflow: visible; }
.esc-ult { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.esc-ult .n { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; }
.trf-l .stepper .cant { width: 56px; }
/* Resumen R-26: de qué depósito facturar */
.res-dep { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin: 6px 0 12px; border-radius: 10px; background: var(--orange-soft, #FFF1E6); border: 2px solid var(--orange); }
.res-dep span { font-size: 11px; letter-spacing: .08em; font-weight: 700; color: var(--orange-ink); }
.res-dep b { font: 700 19px/1.25 var(--f-display); color: var(--ink); }
.res-dep.neutro { background: var(--canvas); border-color: var(--line); }
.res-dep.neutro span { color: var(--muted); }
.res-tbl select.inp { min-width: 170px; }
.res-falta { display: block; color: var(--red); font-size: 12px; font-weight: 600; margin-top: 3px; }
.btn.peligro { color: var(--red); border-color: var(--red); }
/* Caja de instalación */
.grp-caja { margin: 14px 0 6px; padding: 6px 10px; border-radius: 8px; background: var(--orange-soft, #FFF1E6); color: var(--orange-ink); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.grp-caja.falta { background: var(--red-soft); color: var(--red); }
.chk-caja { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.chk-caja input { width: 20px; height: 20px; flex: none; }
.chk-caja .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chk-caja .q { font: 700 17px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.chk-caja.ok .t b { text-decoration: line-through; color: var(--muted); }
.chk-caja.falta { cursor: default; }
.res-sobra { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.txt-rojo { color: var(--red); }

/* RMA y fraccionar (1d) */
.rma-h { font-size: 15px; margin: 18px 0 8px; display: flex; gap: 8px; align-items: center; }
.rma-lista { display: flex; flex-direction: column; }
.rma-it { display: flex; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.rma-it .t { flex: 1; min-width: 0; }
.rma-it .t .hint { display: block; margin-top: 2px; }
.rma-it .d { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rma-it.atrasado { background: var(--red-soft); }
.rma-opc { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.rma-dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 10px 0; }
.rma-dl dt { color: var(--muted); font-size: 13px; }
.rma-dl dd { margin: 0; }
.rma-foto { max-width: 100%; max-height: 260px; border-radius: 10px; margin: 6px 0 10px; display: block; }
.ep-elegido .ep-l { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ep-elegido .ep-l .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.frc-sug { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -4px 0 12px; }
.frc-res { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.frc-res .neg { color: var(--red); }
.frc-res .pos { color: var(--green); }
@media (max-width: 700px) { .rma-it { flex-wrap: wrap; } .rma-it .d { width: 100%; justify-content: flex-start; } .dep-top .fila-sp { width: 100%; } }

/* Control de stock (1e) */
.ctl-lista { display: flex; flex-direction: column; }
.ctl-it { display: flex; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.ctl-it .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ctl-it .t .pill { align-self: flex-start; }
.ctl-it .d { display: flex; gap: 8px; align-items: center; }
.ctl-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.ctl-cab > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ctl-preg { font-size: 18px; margin: 6px 0 4px; }
.ctl-num { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 14px 0 6px; }
.ctl-num .inp { width: 140px; text-align: center; font-size: 28px; font-weight: 700; padding: 10px; }
.ctl-num .btn { width: 56px; height: 56px; font-size: 26px; padding: 0; }
.ctl-bloque { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.ctl-bloque.err { border-color: var(--red); background: var(--red-soft); }
.txt-verde { color: var(--green); }
.aj-acc { display: flex; gap: 6px; flex-wrap: wrap; }
.dep-it .d { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
@media (max-width: 700px) { .ctl-it { flex-wrap: wrap; } .ctl-it .d { width: 100%; justify-content: space-between; } }

/* Informe técnico */
.inf-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.inf-foto { border: 2px solid var(--line); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.inf-foto.si { border-color: var(--green); }
.inf-foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.seg-opc { display: flex; gap: 8px; flex-wrap: wrap; }
.sticky-guardar { position: sticky; bottom: 0; background: var(--bg, #F5F4F1); padding: 10px 0; z-index: 2; }
.membrete-prev { display: flex; flex-direction: column; gap: 2px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 6px 0 14px; font-size: 13px; color: var(--muted); }
.membrete-prev b { color: var(--ink, #1F2430); font-size: 15px; }
.wa-motivo { display: block; margin-top: 4px; color: var(--red); font-weight: 600; }

/* Membrete en dos columnas (como la factura): arriba la empresa; abajo el documento y, a su lado, los datos fiscales */
.comp-sub { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #C24E00; }
.comp-head.dos .comp-emp img { width: 56px; height: 64px; }
.comp-head.dos .comp-num { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.comp-doc { display: flex; flex-direction: column; gap: 1px; }
.comp-doc > b { font: 700 15px/1.2 var(--f-display); letter-spacing: .04em; color: var(--orange-ink); }
.comp-doc strong { color: var(--ink); }
.comp-fis { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 12px; }
.comp-fis span { font-size: 11px !important; color: var(--ink) !important; line-height: 1.5; }
.comp-fis i { font-style: normal; color: var(--muted); }
.comp-fis strong { font-weight: 700; }

/* Préstamos con colegas */
.pr-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.pr-tabs button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; color: inherit; }
.pr-tabs button.sel { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-ink); font-weight: 600; }
.pr-tabs .n { background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
.pr-llego { display: block; margin-top: 4px; color: var(--amber); font-weight: 600; font-size: 13px; }
.pr-items { display: flex; flex-direction: column; margin: 4px 0 12px; }
.pr-it { display: flex; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.pr-it .t { flex: 1; min-width: 0; }
.pr-it .t .hint { display: block; }
.pr-cant { width: 72px; text-align: right; }

/* Así se factura (etapa 2) */
.fact-plan { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--surface-2, transparent); }
.fact-plan .lbl { display: block; font-weight: 600; margin-bottom: 6px; }
.fact-plan .fp-it { padding: 6px 0; border-top: 1px dashed var(--line); }
.fact-plan .fp-it:first-of-type { border-top: 0; }
.fact-plan .fp-it .hint { display: block; }
.fact-plan .fp-c { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.fact-plan .fp-c select { max-width: 260px; }
.cu-barra { height: 6px; border-radius: 99px; background: var(--line); margin-top: 4px; overflow: hidden; max-width: 160px; }
.cu-barra i { display: block; height: 100%; background: var(--green); }
.cu-barra.alta i { background: var(--red); }
tr.inactivo { opacity: .55; }
/* Facturación etapa 2b */
.fac-cu { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fac-cu > div { display: flex; flex-direction: column; gap: 2px; }
.fac-cu .cu-barra { max-width: none; }
.fac-comps { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.fac-comp { border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 13px; }
.fac-comp.ok { opacity: .7; }
.fac-comp-e { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.neg-txt { color: var(--red); }
/* Liquidaciones v.102: resumen, solapas, tarjetas, casillas por semana y recibos */
.lq-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.lq-resumen > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.lq-resumen > div:first-child { background: linear-gradient(135deg, var(--orange, #FF6B00), #FF8A3D); color: #fff; border: 0; }
.lq-resumen span { font-size: 13px; opacity: .9; } .lq-resumen b { font: 700 24px/1.15 var(--f-display, inherit); } .lq-resumen small { font-size: 12px; opacity: .85; }
.lq-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.lq-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: 600 14px/1 var(--f-ui, inherit); cursor: pointer; color: var(--ink); }
.lq-tabs button.on { background: var(--ink, #222); color: #fff; border-color: var(--ink, #222); }
.lq-card { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lq-card:last-child { border-bottom: 0; }
.lq-c1 { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 320px; align-items: flex-start; }
.lq-c1 b { font-size: 16px; }
.lq-c2 { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lq-c2 > b { font: 700 22px/1.1 var(--f-display, inherit); }
.lq-acc { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.lq-selbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 4px 0 8px; font-size: 14px; }
.lq-selbar label, .lq-modo label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.lq-semf td { background: var(--well, #F6F5F2); }
.lq-modo { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0 4px; font-size: 14px; }
.lq-anul td { opacity: .5; text-decoration: line-through; }
#rec-print { display: none; }
@media print {
  body.imprimiendo-rec > *:not(#rec-print) { display: none !important; }
  body.imprimiendo-rec #rec-print { display: block; font-family: Arial, sans-serif; font-size: 12pt; color: #000; }
  #rec-print h2 { font-size: 18pt; margin: 0 0 12pt; }
  #rec-print table { width: 100%; border-collapse: collapse; font-size: 10pt; } #rec-print td, #rec-print th { border-bottom: 1px solid #ccc; padding: 3pt 4pt; text-align: left; }
  #rec-print .num { text-align: right; } #rec-print .liq-tot { display: flex; justify-content: space-between; padding: 3pt 0; }
}
.rec-firma { display: flex; gap: 40pt; margin-top: 60pt; }
.rec-firma > div { flex: 1; display: flex; flex-direction: column; gap: 4pt; font-size: 11pt; }
.rec-firma span { border-top: 1px solid #000; display: block; }
/* Cambiar contacto */
.cto-tels { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.cto-op { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.cto-op:has(input:checked) { border-color: var(--orange, #FF6B00); background: #FFF6EF; }
/* Modelos de presupuesto: el detalle de productos baja de línea */
.mod-op { margin-bottom: 8px; }
.mod-op .elegir { width: 100%; text-align: left; }
.mod-op .elegir span, .mod-op .elegir small { white-space: normal; overflow-wrap: anywhere; }
/* Presupuesto del cliente en el celular: cada renglón en dos líneas (descripción y, debajo, código · cantidad × precio; subtotal a la derecha) */
.comp-tbl .c-meta { display: none; }
@media screen and (max-width: 640px) {
  .comp-tbl thead, .comp-tbl .c-cod, .comp-tbl .c-cant, .comp-tbl .c-pu { display: none; }
  .comp-tbl td { vertical-align: top; padding: 8px 4px; }
  .comp-tbl .c-desc { overflow-wrap: anywhere; }
  .comp-tbl .c-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
  .comp-tbl .c-meta span { white-space: nowrap; }
  .comp-tbl .c-sub { white-space: nowrap; font-weight: 600; padding-left: 10px; }
}
/* Precios del inventario: resumen de la vista previa */
.pi-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
.pi-kpis div { background: var(--well); border-radius: var(--r-sm); padding: 8px 10px; }
.pi-kpis span { display: block; font-size: 12px; color: var(--muted); }
.pi-kpis b { font-size: 20px; }
@media (max-width: 560px) { .pi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Menú Productos */
.inv-busca { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.inv-busca .inp { flex: 1; min-width: 220px; }
.inv-filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.inv-filtros select { width: auto; max-width: 220px; }
.inv-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip-f { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 12px; font: 600 12.5px/1 var(--f-ui); cursor: pointer; }
.chip-f.sel { border-color: var(--orange-line); background: var(--orange-soft); color: var(--orange-ink); }
.inv-mini { width: 40px; height: 40px; object-fit: contain; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.inv-foto { width: 96px; height: 96px; object-fit: contain; border-radius: var(--r); background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; flex: none; }
.inv-foto.g { width: 160px; height: 160px; }
.inv-cab { display: flex; gap: 14px; align-items: center; margin: 10px 0 12px; }
.inv-cab h2 { margin: 0 0 2px; }
.inv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.inv-kpis div { background: var(--well); border-radius: var(--r-sm); padding: 8px 10px; display: flex; flex-direction: column; }
.inv-kpis span { font-size: 12px; color: var(--muted); }
.inv-kpis b { font-size: 18px; }
.inv-fotobox { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.inv-web { display: flex; gap: 10px; align-items: center; text-align: left; }
.field .ro { padding: 8px 0; color: var(--ink); }
.field .ro.pre { white-space: pre-line; }
.lista-simple { margin: 6px 0; padding-left: 18px; }
@media (max-width: 640px) { .inv-foto.g { width: 120px; height: 120px; } }
/* Ficha de producto: costo y rentabilidad por lista */
.row.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .row.c4 { grid-template-columns: 1fr 1fr; } }
.pct-in { position: relative; }
.pct-in span { position: absolute; right: 10px; top: 9px; color: var(--muted); font-weight: 600; }
.pct-in .inp { padding-right: 26px; text-align: right; font-variant-numeric: tabular-nums; }
.inv-ren td { vertical-align: middle; }
.inv-ren .inp.sm { min-width: 90px; }
.inv-ren tr.propio td { background: var(--blue-soft); }
.inv-ren tr.propio .pm-or { color: var(--blue-ink); font-weight: 600; }
/* Ficha: aviso de cambios sin guardar y listas desplegables de rubro/subrubro/marca */
.inv-guardar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 6px 0 12px; }
.inv-guardar-b { display: flex; gap: 8px; }
.sel-cat .mt-xs { margin-top: 6px; }
/* Tesorería */
.tes-cajas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tes-caja { display: flex; flex-direction: column; gap: 4px; }
.card.tes-caja + .card.tes-caja { margin-top: 0; }
.tes-caja-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.tes-saldo { font: 700 24px/1.2 var(--f-ui); font-variant-numeric: tabular-nums; margin-top: 6px; }
.tes-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.tes-acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tes-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.tes-fila:first-child { border-top: 0; }
.tes-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
.tes-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.tes-cont td { padding: 4px 6px; }
.tes-cont .inp { width: 90px; text-align: center; padding: 6px 8px; }
.tes-cont td.num { text-align: right; min-width: 90px; }
.tes-cont tfoot td { border-top: 1px solid var(--line); padding-top: 8px; }
.tes-cab { margin-bottom: 12px; align-items: flex-start; }
.tes-tit { font-size: 18px; font-weight: 600; margin: 6px 0 2px; }
.tes-arq .card + .card { margin-top: 0; }
.tes-arq { margin-bottom: 16px; }
.tes-comp { min-width: 0; }
.tes-motivo { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.tes-anulado td { color: var(--muted); text-decoration: line-through; }
.tes-anulado td .hint { text-decoration: none; }
.tes-ren + .tes-ren { margin-top: 14px; padding-top: 10px; border-top: 2px solid var(--line); }
.tes-warn { border-color: var(--amber); }
.cartel-dolar { align-items: center; justify-content: space-between; }
@media (max-width: 640px) { .tes-g2 { grid-template-columns: minmax(0, 1fr); } }
.tes-barra { margin: 0 0 12px; }
dialog.modal.tes-ancho { width: min(920px, 96vw); max-width: 96vw; }
.tes-prev { max-height: 240px; overflow: auto; font-size: 12px; }
.tes-prev td { padding: 4px 6px; white-space: nowrap; }
.tes-g3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.tes-sub { font-size: 13.5px; font-weight: 600; margin: 4px 0 0; }
.tes-imps { padding: 8px 12px; }
.tes-imp { gap: 8px; padding: 4px 0; border-top: 1px solid var(--line, #eee); font-size: 13px; }
.tes-imp:first-of-type { border-top: 0; }
.tes-imp.tes-anulado span:first-child { color: var(--muted); text-decoration: line-through; }
.tes-cups { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.tes-cup { cursor: pointer; }
.tes-cup input { margin-right: 6px; }
@media (max-width: 640px) { .tes-g3 { grid-template-columns: 1fr 1fr; } }
.tes-banco .tes-ctas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tes-cta { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.tes-kpis { margin: 0 0 14px; }
.tes-cel-acc { white-space: nowrap; font-size: 13px; }
.tes-per { font-size: 14px; padding: 0 6px; }
.tes-res { margin-top: 12px; align-items: end; }
/* Compras */
.com-cab { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 10px 14px; align-items: start; }
.com-cab .com-prov { grid-column: span 2; position: relative; }
.com-sugs { display: flex; flex-direction: column; }
.com-sugs > button { text-align: left; background: #fff; border: 1px solid var(--line); border-top: 0; padding: 8px 10px; cursor: pointer; font: 500 13.5px var(--f-ui); }
.com-sugs > button:first-child { border-top: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.com-sugs > button:hover { background: #FAF9F7; }
.com-busca { margin: 10px 0; }
.com-lin .inp { padding: 6px 8px; }
.com-lin .com-n { width: 70px; text-align: right; }
.com-lin .com-c { width: 120px; text-align: right; }
.com-lin .com-iva { width: 92px; }
.com-lin td { vertical-align: top; }
.com-dep { margin-top: 12px; }
.com-pie { align-items: start; }
.com-perc { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.com-bot { margin-top: 8px; }
.tes-click { cursor: pointer; }
.tes-click:hover td { background: #FAF9F7; }
@media (max-width: 760px) { .com-cab { grid-template-columns: 1fr 1fr; } .com-cab .com-prov { grid-column: span 2; } .com-perc { grid-template-columns: 1fr 1fr; } }

/* ---------- Ventas de mostrador ---------- */
.ven-cab { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 10px 14px; align-items: start; }
.ven-cli { position: relative; }
.ven-cli #cl-nom { margin-top: 6px; }
.ven-formas { margin: 0 0 10px; }
.ven-pie { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.ven-cobro { display: grid; grid-template-columns: 100px 120px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ven-cobro .ven-imp { text-align: right; }
.ven-extra { display: flex; flex-wrap: wrap; gap: 6px; }
.ven-extra .inp { flex: 1 1 120px; min-width: 0; }
.ven-rec { grid-column: 2 / -1; }
.ven-comps { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ven-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.ven-filtros .inp { width: auto; }
.ven-mes { width: auto; }
.ven-series { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; max-height: 50vh; overflow: auto; }
.ven-totdet { max-width: 360px; margin-left: auto; }
.ven-lin .ven-iva { margin-top: 6px; width: auto; }
@media (max-width: 1000px) { .ven-pie { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .ven-cab { grid-template-columns: 1fr 1fr; } .ven-cli { grid-column: span 2; } .ven-cobro { grid-template-columns: 1fr 1fr; } .ven-extra, .ven-rec { grid-column: span 2; } }

/* ---------- Código de seguridad ---------- */
.login-codigo { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.seg-qr { width: 200px; max-width: 70vw; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px; }
.seg-qr svg { display: block; width: 100%; height: auto; }
.seg-codigos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; margin: 10px 0; max-width: 320px; }
.seg-secreto { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.login-volver { margin: 4px 0 16px; }
.seg-sep { margin-top: 22px; }
.ar-pasos { padding-left: 20px; margin: 6px 0 14px; display: grid; gap: 10px; }
.ar-pasos li { line-height: 1.5; }
.ar-pasos .btn, .ar-pasos input[type=file] { margin-top: 4px; }

.nc-modos { display: grid; gap: 8px; margin: 10px 0 14px; }
.nc-modo { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.nc-modo:has(input:checked) { border-color: var(--orange-line); background: var(--orange-soft); }
.nc-modo input { margin-top: 3px; }
.nc-modo small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.nc-tot { margin: 8px 0 12px; font-size: 15px; }
.err-form { color: var(--red); font-weight: 600; font-size: 14px; }
/* Venta de mostrador · una columna con barra de cierre abajo */
.ven-b { display: grid; gap: 14px; }
.ven-b > .card { margin: 0; }
.ven-fila1 { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); gap: 10px 14px; align-items: start; }
.ven-cli { position: relative; }
.ven-flota { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; }
.ven-links { display: flex; gap: 16px; align-items: center; justify-content: flex-end; margin-top: 4px; }
.ven-links .hint { margin-right: auto; }
.ven-busca { position: relative; }
.ven-sugs { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 40, .12); max-height: 430px; overflow: auto; }
.ven-sugs:empty { display: none; }
.ven-sug { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 8px 12px; cursor: pointer; font: inherit; color: inherit; }
.ven-sug:last-child { border-bottom: 0; }
.ven-sug.marcada, .ven-sug:hover { background: var(--orange-soft); }
.ven-sug img, .ven-sin-img { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: var(--well); }
.ven-sug-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ven-sug-t b { font-weight: 600; }
.ven-sug-p { font-weight: 700; white-space: nowrap; }
.ven-deps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.ven-dep { font-size: 12px; padding: 1px 7px; border-radius: 6px; background: var(--well); color: var(--ink-2); }
.ven-dep.aca { background: #E7F5EE; color: var(--green); }
.ven-dep.sin { background: var(--red-soft); color: var(--red); }
.ven-nada { padding: 10px 12px; margin: 0; }
.ven-aviso { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--orange-soft); border: 1px solid var(--orange-line); color: var(--orange-deep); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.ven-aviso.r { background: var(--red-soft); border-color: #F5C2BD; color: var(--red); }
.ven-aviso label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.ven-dep-sel { width: auto; min-width: 160px; padding: 4px 8px; height: auto; }
.ven-cierre-g { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.7fr) 220px; gap: 22px; align-items: start; }
.ven-lbl { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; }
.ven-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ven-chip { position: relative; cursor: pointer; }
.ven-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ven-chip span { display: inline-block; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; font-size: 13.5px; background: var(--surface); }
.ven-chip input:checked + span { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-ink); }
.ven-chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.ven-tot-box { border-left: 1px solid var(--line); padding-left: 20px; }
.ven-total { font-size: 30px; font-weight: 700; margin: 0 0 10px; letter-spacing: -.01em; }
.ven-ok { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.ven-cierre .ven-cobro { grid-template-columns: 90px 110px minmax(0, 1fr) auto; }
@media (min-height: 820px) and (min-width: 1001px) { .ven-cierre { position: sticky; bottom: 10px; z-index: 5; box-shadow: 0 -6px 24px rgba(16, 24, 40, .08); } }
@media (max-width: 1000px) { .ven-cierre-g { grid-template-columns: minmax(0, 1fr); } .ven-tot-box { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; } .ven-fila1 { grid-template-columns: 1fr 1fr; } .ven-cli { grid-column: span 2; } }
/* Facturar una parte (ARCA) */
.fz-lin td { vertical-align: middle; }
.fz-lin .inp { width: 100%; }
.fz-cod { font: 600 12px var(--f-mono, monospace); color: var(--muted); white-space: nowrap; }
.fz-iva-c { width: 110px; }
.fz-lin td.num { width: 140px; }
.ven-cf { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.ven-cf[hidden] { display: none; }
/* Informes para el contador */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.ct-grid .card { margin: 0; }
.ct-l { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.ct-grid .tes-acc { margin-top: 12px; flex-wrap: wrap; }
/* Página pública de la factura (/f/…) */
.fac-pub { margin: 16px; }
.fac-pub h1 { font: 700 22px/1.2 var(--f-display); margin: 4px 0 12px; }
.fac-pub-tot { font-size: 20px; }
.fac-pub-acc { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.ef-fila { display: flex; gap: 8px; align-items: center; }
.ef-fila .inp { flex: 1; min-width: 0; }
/* Estado de cuenta (link del cliente y ficha) */
.cta-lista { display: flex; flex-direction: column; }
.cta-it { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linea, #e6e2dc); }
.cta-it b { white-space: nowrap; }
.cta-res { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin: 6px 0 4px; }
.cta-res .cta-saldo { font: 700 18px/1.2 var(--f-display); }
.cta-tramos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.cta-tramos div { border: 1px solid var(--linea, #e6e2dc); border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.cta-tramos b { display: block; font-size: 14px; }
.cta-tramos .alto { border-color: #e7b4b4; background: #fdf1f1; }
/* «Facturar» principal cuando el titular factura por ARCA */
.fac-btn-arca { padding: 8px 18px; font-weight: 700; }
.cta-tramos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cta-aut { margin: 10px 0 4px; padding: 10px 12px; border: 1px dashed var(--line, #d8dde3); border-radius: 10px; display: grid; gap: 6px; font-size: 13px; }
.cta-aut .inp { max-width: 460px; }
.aut-cc { margin: 10px 0; }
.alt-lista { display: grid; gap: 6px; margin: 8px 0; }
.alt-lista .chk { align-items: flex-start; }
.aut-cc .inp { width: 100%; margin-top: 6px; }
.cta-conf { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 10px 0 4px; font-size: 13px; }
.cta-conf label { display: inline-flex; gap: 8px; align-items: center; }
.cta-conf .inp.sm { width: auto; padding: 5px 8px; font-size: 13px; }
.cta-gest { display: flex; flex-direction: column; gap: 8px; }
.cta-gest > div { border-left: 3px solid var(--line, #e6e2dc); padding: 2px 0 2px 10px; }
.recl-motivo { font-size: 12px; font-weight: 600; }
@media (max-width: 640px) { .cta-tramos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tbl td.nowrap { white-space: nowrap; }
.txt-gris, .txt-gris .link { color: var(--muted, #7a7f8a); }
/* Reemplazos de estilos que estaban escritos en el HTML (la política de seguridad los bloquea) */
.m0 { margin: 0 !important; }
.pb0 { padding-bottom: 0 !important; }
.mt-neg { margin-top: -4px; }
.rv-lista { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rv-ok { list-style: none; padding-left: 0; }
.rv-lista li .btn.sm { margin-left: 6px; padding: 2px 10px; }
.un-op { align-items: flex-start; }
.ven-num { background: var(--accent, #ff6a00); color: #fff; font-weight: 700; margin-right: 6px; }
/* Datos de la tarjeta y vuelto en el cobro */
.ven-tarj { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; width: 100%; margin-top: 6px; }
.ven-tarj .ven-desp { grid-column: span 3; font-size: 13px; }
.ven-tarj [data-cu] { grid-column: span 3; align-self: center; text-align: right; }
.ven-vuelto { align-self: center; font-size: 14px; white-space: nowrap; }
@media (max-width: 900px) { .ven-tarj { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ven-cobro .ven-tarj, .ven-cobro .ven-vu { grid-column: 1 / -1; }
.ven-tarj { grid-template-columns: 1.4fr 0.8fr 0.9fr 0.9fr 1.1fr 1.4fr; margin-top: 0; }
.ven-tarj .ven-desp { grid-column: 1 / span 3; border: 0; padding: 0; }
.ven-tarj [data-cu] { grid-column: 4 / span 3; }
.ven-vu { display: flex; gap: 10px; align-items: center; }
.ven-vu label { font-size: 13px; color: var(--muted); }
.ven-vu .inp { max-width: 180px; }
.ven-vuelto b { font-size: 16px; }
.ven-alias { flex-wrap: wrap; font-size: 14px; }
.btn-modo { margin-right: 8px; white-space: nowrap; }
/* Alta rápida de cliente en la venta */
.cl-alta { min-width: min(620px, 92vw); position: relative; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.10); }
.cl-alta-t { margin: 0 0 8px; font-size: 14px; }
.ca-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ca-acc { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
@media (max-width: 700px) { .ca-grid { grid-template-columns: 1fr; } }
.jor-det { margin: 6px 0 10px; font-size: 13px; }
.cj-agr { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.cj-agr .inp { flex: 1; }
#cj-it .inp { max-width: 140px; margin-left: auto; }
#cj-it .cj-nom { max-width: none; }
#f-cj .ef-fila .field { flex: 1; } #f-cj .ef-fila .inp { padding: 9px 12px; height: auto; }
/* Datos de la tarjeta en las ventanas de cobro (servicios, taller, comprobantes): dos filas de tres */
.tj-bloque .ven-tarj { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 4px; }
.tj-bloque .ven-tarj .ven-desp { grid-column: 1 / -1; }
.tj-bloque + .tj-bloque { margin-top: 10px; }
/* Recibo de cobranza: qué paga (imputación) y total */
.rc-imps { max-height: 280px; overflow: auto; }
.rc-imp { width: 120px; text-align: right; }
.rc-tot { font-size: 1.25rem; font-weight: 700; padding: 6px 0; }
.cc-busca .com-sugs:empty { display: none; }
/* Arqueo a ciegas: sin subtotales ni total mientras se cuenta */
.tes-ciego .tes-cont [data-sub], .tes-ciego .tes-cont tfoot { display: none; }
/* Galería de fotos y videos (ticket y taller) */
.gal-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.gal-item { margin: 0; position: relative; border: 1px solid var(--line, #e5e5e5); border-radius: 10px; overflow: hidden; background: #fff; }
.gal-item.vis { border-color: #2e7d32; box-shadow: 0 0 0 2px rgba(46,125,50,.25); }
.gal-item img, .gal-item video { display: block; width: 100%; height: 120px; object-fit: cover; background: #111; }
.gal-item figcaption { padding: 6px 8px; display: grid; gap: 3px; font-size: .82rem; }
.gal-acc { display: flex; gap: 10px; }
.gal-tag { position: absolute; top: 6px; left: 6px; background: #e53935; color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.gal-play { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 1.6rem; text-shadow: 0 1px 4px #000; pointer-events: none; }
.gal-botones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Editor para marcar una foto */
dialog.marcar { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: #111; color: #fff; }
dialog.marcar::backdrop { background: #000; }
.mk-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; background: #222; }
.mk-grupo { display: flex; gap: 4px; align-items: center; }
.mk-grupo button[data-h], .mk-grupo button[data-deshacer] { background: #333; color: #fff; border: 1px solid #444; border-radius: 8px; padding: 6px 8px; font-size: .95rem; display: flex; gap: 4px; align-items: center; cursor: pointer; }
.mk-grupo button span { font-size: .8rem; }
.mk-grupo button[data-h][aria-pressed="true"] { background: #ff6a00; border-color: #ff6a00; }
.mk-color { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #444; background: var(--c); cursor: pointer; }
.mk-color[aria-pressed="true"] { border-color: #fff; }
.mk-fin { margin-left: auto; }
.mk-lienzo { height: calc(100vh - 110px); display: flex; align-items: center; justify-content: center; padding: 6px; }
.mk-lienzo canvas { max-width: 100%; max-height: 100%; touch-action: none; cursor: crosshair; }
.mk-ayuda { margin: 0; padding: 4px 10px; font-size: .8rem; color: #bbb; text-align: center; }
@media (max-width: 600px) { .mk-grupo button span { display: none; } }
/* Comprobantes emitidos */
.ce-bar .field { margin: 0; }
.ce-bar .field label { font-size: 11.5px; }
.ce-bar .buscar { align-self: flex-end; flex: 1; min-width: 220px; }
.ce-bar .buscar .inp { max-width: none; }
.ce-bar #ce-x { align-self: flex-end; }
.ce-rapidas { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.ce-acc { white-space: nowrap; }
/* Efectivo por comprobante */
.ef-tbl .ef-cab { cursor: pointer; }
.ef-tbl .ef-cab:hover td { background: var(--surface-2, #F6F7F9); }
.ef-tbl .ef-sub td:first-child { padding-left: 34px; color: var(--muted); }
.ef-tbl .ef-lado td { font: 700 11px/1 var(--f-ui); letter-spacing: .06em; color: var(--muted); background: #F3F4F6; }
.ef-tbl .ef-tot td { font-weight: 700; font-size: 15px; }
.ef-tbl .ef-det > td { padding: 6px 10px 12px 30px; }
.ef-fl { display: inline-block; width: 12px; color: var(--muted); }
.ef-rap { margin: 0; align-self: flex-end; }
.tes-cats { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; }
.ab-inf { white-space: nowrap; }
/* Productos que no se pueden vender */
.chip-f.warn { border-color: var(--amber, #B54708); color: var(--amber, #B54708); text-decoration: none; }
a.chip-f { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
tr.nv-ok td { opacity: .6; }
.nv-dep { white-space: nowrap; }
/* Mis avisos */
.mav .mav-c { text-align: center; width: 110px; }
.mav input[type=radio] { width: 18px; height: 18px; accent-color: var(--orange); }
/* Hora estimada en la agenda */
.ag-hora { display: inline-block; font: 700 12px/1 var(--f-ui); background: #1F2937; color: #fff; border-radius: 5px; padding: 3px 6px; margin-right: 4px; vertical-align: 1px; }
.ag-hora.sin { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
/* Control de agenda */
.ca-tbl tr.ca-det td { background: #FAFAFB; }
.ca-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ca-tbl th, .ca-tbl td { padding-left: 8px; padding-right: 8px; } .ca-tbl td.num { white-space: nowrap; }

/* Recuadro de deuda en la venta: en bloque (texto, deudas más viejas y botones uno debajo del otro) */
.alerta.ven-deuda { display: block; }
.alerta.ven-deuda ul { margin: .4rem 0 .3rem 1.1rem; padding: 0; }
.alerta.ven-deuda .acciones-form { margin-top: .4rem; }

/* Celular: columnas que se ocultan para que entre lo importante (en la PC se ven todas) */
@media (max-width: 600px) {
  .tbl th.nm, .tbl td.nm { display: none; }
  .tbl td.num { white-space: nowrap; }
  .ven-links { flex-wrap: wrap; gap: 8px 16px; }
  .ven-links .link { white-space: nowrap; }
}
.pill-btn { cursor: pointer; border: 1px dashed var(--muted); }
.pill-btn:hover { border-color: var(--orange); }

.filtros-rc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rc-formas { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 12px; font-size: 13px; }
.lf-lista { max-height: 260px; overflow: auto; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 10px; }
.txt-verde { color: var(--green, #1a7f37); }
.ic-tbl { max-height: 55vh; overflow: auto; }
/* Rentabilidad */
.rt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.rt-kpi { display: grid; gap: 4px; }
.rt-kpi b { font: 700 26px/1.1 var(--f-titulo, Poppins, sans-serif); }
.rt-tbl .rt-sec td { background: var(--bg-2, #f6f4f1); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.rt-tbl .rt-tot td { font-weight: 600; border-top: 1px solid var(--line); }
.rt-tbl .rt-gran td { background: var(--bg-2, #f6f4f1); }
.rt-fila { cursor: pointer; }
.rt-fila:hover td { background: var(--bg-2, #f6f4f1); }
.rt-barra { width: 22%; min-width: 80px; }
.rt-b { display: block; height: 10px; border-radius: 5px; background: var(--line-2, #eee); overflow: hidden; }
.rt-b i { display: block; width: 0; height: 100%; border-radius: 5px; background: var(--orange, #FF6B00); }
.rt-det { max-height: 60vh; overflow: auto; }
.rt-notas { margin: 8px 0 0 18px; }
/* Tesorería: resumen del período entre cierre y cierre */
.tes-per { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.tes-per > div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.tes-per b { font-size: 15px; }
/* Proveedores: lo que dice ARCA */
.pv-arca { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 4px 0 12px; background: var(--bg-2, #faf8f5); }
.pv-arca p { margin: 0 0 6px; }
.pv-prog { margin: 8px 0 12px; }
/* Facturar un trabajo en un paso */
.fd-tot { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 12px; }
.fd-tot b { font-size: 26px; }
[data-campo] > .msg { display: block; width: 100%; font-size: 12px; color: var(--red); margin-top: 4px; }
.ven-chips.err .ven-chip span { border-color: var(--red); }
.ven-chip.off { opacity: .45; }
.ven-chip.off input, .ven-chip.off span { cursor: not-allowed; }
.fd-res { border: 1px solid var(--line, #e5e5e5); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.fd-res p { margin: 2px 0; }
.nc-facs { display: flex; flex-direction: column; gap: 6px; }
.nc-fac { align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.nc-extf { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; margin-top: 6px; }
.nc-res { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.nc-pr { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.nc-pr:hover { border-color: var(--brand, #f60); }
.nc-l { display: grid; grid-template-columns: 1fr 70px auto 110px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.nc-fac:has(input:checked) { border-color: var(--orange-line); background: var(--orange-soft); }
.nc-fac:has(input:checked) b, .nc-fac:has(input:checked) span { color: var(--ink); }
.nc-facs > .btn { align-self: flex-start; margin-bottom: 8px; }
.fd-stock { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.fd-sp { display: grid; grid-template-columns: 1fr 220px; gap: 4px 10px; align-items: center; }
.fd-sp .fd-sw { grid-column: 1 / -1; font-size: 12px; }
.fd-sp .fd-sw:empty { display: none; }

/* La lista de resultados siempre debajo del renglón donde se escribe (nunca encima) */
.field > .sugs { top: calc(100% + 4px); margin-top: 0; }
/* Ventanas con buscador de productos: más grandes (en el celular, pantalla completa) y la lista de resultados dentro de
   la ventana, debajo del buscador: empuja lo que sigue en vez de taparlo, y se ven varios productos a la vez */
dialog.modal:has(.prod-w) { width: min(780px, calc(100vw - 24px)); max-height: 94vh; }
dialog.modal .prod-w > .sugs { position: static; margin-top: 6px; max-height: min(52vh, 460px); box-shadow: none; }
@media (max-width: 640px) {
  dialog.modal:has(.prod-w) { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  dialog.modal .prod-w > .sugs { max-height: 48vh; }
}
/* Renglones de resultados más compactos; el elegido con el teclado, marcado */
.sugs button { padding: 7px 10px; }
.sugs .mini-foto { width: 34px; height: 34px; }
.sugs button > b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sugs button .deps-l { margin-top: 3px; }
.sugs button.act { background: var(--orange-soft); box-shadow: inset 3px 0 0 var(--orange); }
.deps-l i.yo { border-color: var(--orange); background: var(--orange-soft); font-weight: 600; }
.deps-l i.cero { opacity: .6; }
.deps-l i.yo.cero { opacity: 1; color: var(--red); border-color: var(--red); background: #FFF1F1; }
dialog.modal [data-res] > .res-cli, dialog.modal [data-pres] > .res-cli { padding: 6px 10px; }
dialog.modal [data-res] .mini-foto, dialog.modal [data-pres] .mini-foto { width: 34px; height: 34px; }
[data-res] > .res-cli.act, [data-pres] > .res-cli.act { background: var(--orange-soft); box-shadow: inset 3px 0 0 var(--orange); }

/* Clientes parecidos / cambiar cliente */
.parecidos { display: grid; gap: 8px; margin: 10px 0 4px; max-height: 50vh; overflow: auto; }
.parecido { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.parecido.sel { border-color: var(--orange, #FF6B00); background: #FFF6EF; }
.ab-fac { min-width: 170px; font-size: 13px; line-height: 1.45; }

/* Configuración → Facturación: quién factura la C en cada área */
.cu-fa { border: 1px solid var(--line, #E7E2DB); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.cu-fa-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.cu-fa-cab .pp-sp { flex: 1; }
.cu-fa-cab label.hint { display: inline-flex; align-items: center; gap: 6px; }
.cu-otra { border-style: dotted; opacity: .85; }
.cu-otros { flex-basis: 100%; }
.cu-otros summary { cursor: pointer; padding: 4px 0; }

/* Facturación: pasar lo viejo a facturado en XPyme */
.xpy-lista { max-height: 55vh; overflow: auto; margin: 8px 0; }
.fac-xpy-l { margin-bottom: 6px; }
#fac-xpy .alerta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Venta de mostrador compacta (compu): cliente fijo arriba, solo la lista de productos hace scroll, cierre fijo abajo */
.ven-prod-cab { display: flex; gap: 6px; align-items: center; }
.ven-prod-cab .ven-busca { flex: 1; margin: 0; }
@media (min-width: 1001px) {
  .ven-b { display: flex; flex-direction: column; gap: 6px; }
  .ven-b > .card { padding: 8px 12px; border-radius: 10px; }
  .ven-b .inp { height: 34px; padding-top: 4px; padding-bottom: 4px; font-size: 14px; }
  .ven-b .field { margin: 0; }
  .ven-cab2 { flex: none; }
  .ven-cab2 .field > label { display: none; }
  .ven-fila1 { grid-template-columns: minmax(0, 3.4fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: center; }
  .ven-cli { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .75fr); gap: 6px; }
  .ven-cli .ven-cf { display: contents; }
  .ven-cli .ven-cf[hidden] { display: none; }
  .ven-cli .ven-cf .inp { margin: 0; }
  .ven-cli:has(.ven-cf[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .ven-links { margin-top: 4px; gap: 14px; font-size: 13px; justify-content: flex-start; }
  .ven-links .hint { margin-right: 0; }
  .ven-links #b-nota { margin-left: auto; }
  .ven-links .ven-num { font-size: 11px; padding: 1px 7px; }
  #nota-w { margin-top: 6px; }
  .ven-prod { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .ven-prod #lineas { flex: 1 1 auto; min-height: 0; overflow: auto; margin-top: 6px; }
  .ven-prod #lineas .tbl-wrap { overflow: visible; }
  .ven-prod #lineas thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
  .ven-cierre { flex: none; position: static !important; box-shadow: 0 -4px 16px rgba(16, 24, 40, .06); max-height: 46vh; overflow: auto; }
  .ven-cierre-g { grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
  .ven-cierre .ven-lbl { display: none; }
  .ven-cierre-g > div:first-child { max-width: 300px; }
  .ven-cierre #c-ops .hint { font-size: 12px; margin: 4px 0 0; }
  .ven-cierre .ven-chips { margin: 0; gap: 4px; flex-wrap: nowrap; }
  .ven-cierre .ven-chip span { padding: 6px 9px; font-size: 13px; }
  .ven-cierre #c-ops:not(:empty) { margin-top: 6px; max-width: 420px; font-size: 13px; }
  .ven-cierre .ven-cobro { padding: 4px 0; }
  .ven-tot-box { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding-left: 14px; width: 210px; }
  .ven-tot-box .ven-total { font-size: 24px; margin: 0; white-space: nowrap; }
  .ven-ok { width: 100%; padding: 9px 14px; font-size: 14px; white-space: nowrap; }
  .ven-cli #cl-nom { margin-top: 0; }
  .ven-prod .ven-sugs { max-height: min(430px, 48vh); }
  .ven-prod .ven-lin td:first-child > [data-k="descripcion"] { display: inline-block; width: calc(100% - 118px); vertical-align: middle; }
  .ven-prod .ven-lin .ven-iva { display: inline-block; width: 110px; margin: 0 0 0 6px; vertical-align: middle; }
  .ven-prod .ven-lin th, .ven-prod .ven-lin td { padding-top: 5px; padding-bottom: 5px; }
  .ven-prod .ven-lin .inp { height: 32px; }
  .ven-prod .ven-lin td.num .inp, .ven-prod .ven-lin [data-k="cantidad"] { max-width: 90px; }
  .ven-prod .ven-lin [data-k="precio"] { max-width: 130px; }
  .ven-prod .ven-aviso { padding: 3px 8px; margin-top: 3px; }
  .ven-cierre .ven-formas { margin: 0 0 4px; gap: 4px; }
  .ven-cierre .ven-formas .btn { padding: 4px 8px; font-size: 12.5px; min-height: 0; }
  .ven-cierre .ven-cobro { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0; }
  .ven-cierre .ven-cobro > b { width: 78px; font-size: 13px; }
  .ven-cierre .ven-cobro .ven-imp { width: 110px; }
  .ven-cierre .ven-cobro .ven-extra { flex: 1 1 140px; }
  .ven-cierre .ven-cobro .ven-vu { order: 4; grid-column: auto; gap: 6px; }
  .ven-cierre .ven-cobro .ven-vu label { display: none; }
  .ven-cierre .ven-cobro .ven-vu .inp { width: 130px; }
  .ven-cierre .ven-cobro [data-cx] { order: 5; }
  .ven-cierre .ven-cobro .ven-tarj, .ven-cierre .ven-cobro .ven-alias, .ven-cierre .ven-cobro .ven-rec { order: 6; flex-basis: 100%; }
  .ven-cierre .ven-tcob, .ven-cierre .ven-cok { display: none; }
  .ven-cierre #c-tot .alerta { padding: 4px 8px; margin: 4px 0 0; font-size: 13px; }
  .ven-cierre #c-tot .tes-fila { padding: 2px 0; font-size: 13px; }
  .ven-tot-box .hint { margin: 0; font-size: 12px; }
  .ven-cierre .ven-cobro .ven-extra { flex: 0 1 160px; }
}

.ven-lin tr.ven-nueva td { background: var(--orange-soft); transition: background .6s; }

/* Presupuesto simple compacto (compu): mismo formato que la venta de mostrador */
.items-top { display: flex; gap: 6px; align-items: center; }
.items-top .items-busca { flex: 1; }
.item-row.item-nuevo { background: var(--orange-soft); transition: background .6s; }
.ps-comp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 10px; }
.ps-main { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.ps-main > .card, .ps-form > .card { margin: 0; padding: 8px 12px; border-radius: 10px; }
.ps-lat { overflow: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.ps-lat > .card, .ps-lat > div > .card { margin: 0; padding: 10px 12px; }
.ps-lat .card h2 { font-size: 15px; margin-bottom: 6px; }
.ps-cab { flex: none; }
.ps-l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; }
.ps-l1 .codigo { font-size: 17px; }
.ps-l1 .ps-sp { flex: 1; }
.ps-l1 #lista-simple { width: auto; min-width: 210px; height: 32px; padding-top: 2px; padding-bottom: 2px; font-size: 13.5px; }
.ps-cab .ps-acc .acciones { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; padding: 0; border: 0; }
.ps-cab .ps-acc .btn { padding: 4px 9px; font-size: 12.5px; min-height: 0; }
.ps-cab .alerta { padding: 4px 10px; margin: 6px 0 0; font-size: 13px; }
.ps-form { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 0; }
.ps-prod { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ps-prod #prods { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.ps-prod .items { flex: 1 1 auto; min-height: 0; overflow: auto; margin-top: 6px; padding-right: 4px; }
.ps-prod .items-top .inp { height: 34px; }
.ps-prod .items-top .sugs { max-height: min(400px, 46vh); }
.ps-prod .item-row { grid-template-columns: minmax(0, 1fr) auto auto; margin-bottom: 0; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.ps-prod .item-row .prod-w { grid-column: auto; }
.ps-prod .item-row .inp { height: 32px; }
.ps-prod .item-row .stepper.chico .icon-btn, .ps-prod .item-row .quitar { width: 30px; height: 32px; }
.ps-prod .prod-w .linea-precio { min-height: 0; margin-top: 1px; }
.ps-prod .manual-w { margin-top: 4px; max-width: 220px; }
.ps-prod [data-campo="items"] { margin: 0; }
.ps-cierre { flex: none; box-shadow: 0 -4px 16px rgba(16, 24, 40, .06); }
.ps-cierre-g { display: grid; grid-template-columns: minmax(0, 1fr) 230px 210px; gap: 12px; align-items: center; }
.ps-opc .inp { height: 34px; }
.ps-chks { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.ps-chks .chk { padding: 4px 8px; font-size: 12.5px; border: 0; background: none; }
.ps-cierre #vista-precios .pp-precios { margin: 0; }
.ps-cierre #vista-precios .pp-cab { padding: 3px 10px; font-size: 11px; }
.ps-cierre #vista-precios .pp-l { padding: 4px 10px; }
.ps-cierre #vista-precios .pp-l.tot b:last-child { font-size: 20px; }
.ps-cierre #vista-precios .alerta { padding: 3px 8px; margin: 0 0 4px; font-size: 12px; }
.ps-btns { display: flex; flex-direction: column; gap: 6px; }
.ps-btns .btn { width: 100%; padding: 8px 10px; font-size: 13.5px; justify-content: center; }
.ps-cab .acciones > .btn, .ps-cab .acciones > a.btn { padding: 3px 8px !important; font-size: 12px !important; height: auto !important; min-height: 28px; }
.ps-l1 .link { font-size: 12.5px; }

/* Ingreso de equipos al taller compacto (compu): mismo criterio que la venta de mostrador */
@media (min-width: 1001px) {
  #f-in .o-g2 { gap: 10px; }
  #f-in .card { padding: 10px 14px; margin-bottom: 8px; border-radius: 10px; }
  #f-in .card h2 { font-size: 15px; margin: 0 0 6px; }
  #f-in .field { margin-bottom: 6px; }
  #f-in .field > label, #f-in .field > .lbl { font-size: 12px; margin-bottom: 3px; }
  #f-in .inp { height: 34px; padding-top: 4px; padding-bottom: 4px; font-size: 14px; }
  #f-in textarea.inp { height: auto; min-height: 34px; }
  #f-in .row { gap: 8px; }
  #f-in .mt { margin-top: 6px; }
  #f-in [data-campo="equipo_tipo"] .hint, #f-in [data-campo="marca"] .hint { display: none; }
  #f-in .chks { gap: 4px 6px; }
  #f-in .chks .chk, #f-in .field > .chk { padding: 5px 9px; font-size: 13px; gap: 7px; }
  #f-in .chk input { width: 16px; height: 16px; }
  #f-in .seg button { padding: 5px 11px; font-size: 13px; }
  #f-in .cli-sel { padding: 6px 10px; font-size: 12.5px; }
  #f-in .in-cli .field { margin-bottom: 0; }
  #f-in .acciones-form { margin-top: 6px; gap: 6px; }
  #f-in .acciones-form .btn { padding: 8px 14px; }
  #f-in .hint { font-size: 12px; }
  #f-in #in-serie + .chk { margin-top: 4px; padding: 3px 8px; border: 0; background: none; }
}
@media (min-width: 1001px) {
  #f-in .o-g2 > div { display: flex; flex-direction: column; gap: 8px; }
  #f-in .o-g2 > div > .card { margin: 0; }
  #f-in #in-falla { min-height: 50px; }
}
.ps-buscli { position: relative; flex: 1 1 280px; max-width: 420px; }
.ps-buscli .inp { height: 32px; font-size: 13.5px; }
.ps-buscli .sugs { min-width: 360px; }

@media (min-width: 1001px) {
  .ven-cierre .ven-cobro .ven-extra { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 320px; }
  .ven-cierre .ven-cobro .ven-extra .inp { width: auto; flex: 1 1 130px; height: 32px; }
  .ven-cierre .ven-tarj { display: flex; flex-wrap: wrap; gap: 4px; }
  .ven-cierre .ven-tarj .inp { height: 32px; flex: 1 1 90px; width: auto; }
}
.ctl-volver { margin: -4px 0 6px; font-size: 13px; }

/* Cuenta corriente del cliente: lista compacta con el detalle al costado */
.cc-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cc-tit h2 { margin: 2px 0 0; font-size: 19px; }
.cc-tot { display: flex; gap: 16px; font-size: 13px; color: var(--muted); align-items: baseline; }
.cc-tot b { color: var(--ink); margin-left: 4px; }
.cc-deuda b { font-size: 18px; }
.cc-acc { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.cc-lista, .cc-det { padding: 10px 12px; }
.cc-lista .fila-sp { margin-bottom: 6px; }
.cc-lista .seg button { height: 28px; padding: 0 10px; }
.cc-lista .seg button.sel { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-ink); font-weight: 600; }
.cc-scroll { max-height: calc(100vh - 250px); overflow: auto; }
.cc-tbl th, .cc-tbl td { padding: 3px 6px; font-size: 12px; line-height: 1.35; }
.cc-tbl th { font-size: 11px; }
#cc-tb .hint { font-size: 11px; }
.cc-tbl thead th { position: sticky; top: 0; background: var(--surface-2, #F7F6F4); z-index: 1; }
.cc-fila { cursor: pointer; }
.cc-fila:hover td { background: #FFF7EF; }
.cc-fila.sel td { background: var(--orange-soft); }
.cc-det { position: sticky; top: 66px; max-height: calc(100vh - 80px); overflow: auto; }
.cc-det h3 { margin: 0; font-size: 15px; }
.cc-det .tes-sub { margin: 8px 0 2px; }
.cc-det .tes-fila { padding: 3px 0; font-size: 12px; }
.cc-det > .hint, .cc-det p { font-size: 12px; }
.cc-res { display: flex; gap: 14px; justify-content: flex-end; margin: 6px 0; font-size: 12px; }
.cc-btns { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.cc-pie { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin-top: 10px; }
.cc-pie > span { flex: 1; }
@media (max-width: 1000px) { .cc-grid { grid-template-columns: 1fr; } .cc-scroll, .cc-det { max-height: none; position: static; } }
.cc-grid > .card { margin: 0; }
.cc-tbl td.num, .cc-tbl th.num { white-space: nowrap; }
#cc-tb td:first-child { white-space: nowrap; }
.cc-det .cc-tbl { width: 100%; table-layout: auto; }
#cc-tb td:nth-child(2) { white-space: nowrap; }

/* Reportes de stock (compacto) */
.sr-top { margin-bottom: 8px; }
.sr .seg button.sel { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-ink); font-weight: 600; }
.sr-fil { padding: 8px 10px; margin-bottom: 8px; }
.sr-fila { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
.sr-f { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.sr-f .inp, .sr-mbtn { height: 28px; font-size: 12px; padding: 0 6px; min-width: 0; }
.sr-f select.inp { max-width: 150px; } .sr-f input[type=date] { width: 120px; } .sr-mbtn { height: 28px; font-size: 12px; padding: 0 6px; width: 130px; }
.sr-q { flex: 1 1 180px; } .sr-q .inp { width: 100%; }
.sr-chks { display: flex; gap: 10px; align-items: center; margin-left: 4px; }
.sr .chk.sr-chk { font-size: 12px; padding: 0; border: 0; background: none; min-height: 0; gap: 4px; }
.sr .chk.sr-chk input { width: 15px; height: 15px; }
.sr-multi { position: relative; }
.sr-mbtn { text-align: left; cursor: pointer; background: #fff; max-width: 200px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sr-pop { position: absolute; z-index: 30; top: 34px; left: 0; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px; }
.sr-opts { max-height: 260px; overflow: auto; margin: 6px 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.sr-pop-acc { display: flex; justify-content: space-between; align-items: center; }
.sr-res { padding: 6px 8px; }
.sr-scroll { max-height: calc(100vh - 330px); overflow: auto; }
.sr-tbl th, .sr-tbl td { padding: 3px 6px; font-size: 12px; line-height: 1.35; }
.sr-tbl thead th { position: sticky; top: 0; background: #FAF9F7; z-index: 1; font-size: 11px; }
.sr-tbl td.num, .sr-tbl td:first-child { white-space: nowrap; }
.sr-pie { display: flex; gap: 6px; align-items: center; padding-top: 6px; font-size: 12px; }
.sr-sp { flex: 1; }
@media print { .side, .top, .dep-top, .sr-top, .sr-fil, .sr-pie button { display: none !important; } .sr-scroll { max-height: none; overflow: visible; } }
.sr-tbl td { white-space: nowrap; } .sr-tbl td.sr-w { white-space: normal; }
.sr-opts .chk { padding: 3px 4px; border: 0; font-weight: 500; font-size: 12px; gap: 6px; }

/* Carga de compras compacta (como la venta de mostrador): proveedor fijo arriba, solo los renglones hacen scroll, cierre fijo abajo */
.com-fila1 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; align-items: end; }
.com-fila1 .com-prov { grid-column: 1 / -1; position: relative; }
.com-prov > label .link { font-size: inherit; }
.com-busca { position: relative; }
.com-sugs.ven-flota { max-height: min(420px, 48vh); overflow: auto; box-shadow: 0 10px 30px rgba(16, 24, 40, .12); border-radius: 8px; }
.com-sugs:empty { display: none; }
.com-prod-cab { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.com-prod-cab .com-busca { flex: 1 1 260px; margin: 0; }
.com-prod-cab #l-modo { width: auto; min-width: 0; }
.com-cierre-g { display: grid; gap: 12px; }
.com-sec { margin-top: 6px; }
.com-sec summary { cursor: pointer; padding: 2px 0; }
.com-tot-box { display: flex; flex-direction: column; gap: 6px; }
.com-ok { width: 100%; }
.com-bot { display: flex; gap: 16px; justify-content: center; margin: 0; }
.com-lin tr.com-marca td { background: var(--orange-soft); transition: background .3s; }
@media (min-width: 1001px) {
  .com-b { display: flex; flex-direction: column; gap: 6px; }
  .com-b > .card { padding: 8px 12px; border-radius: 10px; margin: 0; }
  .com-b .inp { height: 34px; padding-top: 4px; padding-bottom: 4px; font-size: 14px; }
  .com-b .field { margin: 0; }
  .com-b .field > label { font-size: 11.5px; margin-bottom: 2px; }
  .com-cab2 { flex: none; }
  .com-fila1 { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, .9fr); gap: 6px; }
  .com-fila1 .com-prov { grid-column: auto; }
  #p-info { margin: 3px 0 0; font-size: 12px; }
  #p-info:empty { display: none; }
  .com-prod { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .com-prod #lineas { flex: 1 1 auto; min-height: 0; overflow: auto; margin-top: 6px; }
  .com-prod #lineas .tbl-wrap { overflow: visible; }
  .com-prod #lineas thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
  .com-prod .com-lin th, .com-prod .com-lin td { padding-top: 5px; padding-bottom: 5px; }
  .com-prod .com-lin .inp { height: 32px; }
  .com-prod .com-lin .hint { font-size: 11.5px; }
  .com-cierre { flex: none; box-shadow: 0 -4px 16px rgba(16, 24, 40, .06); max-height: 44vh; overflow: auto; }
  .com-cierre-g { grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr) 440px; gap: 14px; align-items: start; }
  .com-c1 .field > label { display: none; }
  .com-prov .fila-sp { flex-wrap: nowrap; gap: 6px; }
  .com-c2 .com-perc { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 115px auto; gap: 4px; margin-bottom: 4px; }
  .com-tot-box { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 12px; align-items: start; }
  .com-tot-acc { display: flex; flex-direction: column; gap: 6px; }
  .com-tot-acc .hint { display: none; }
  .com-c1 { display: flex; flex-direction: column; gap: 6px; }
  .com-c2 { font-size: 13px; }
  .com-c2 .com-sec:first-child { margin-top: 0; }
  .com-c2 .chk.opc { padding: 4px 8px; font-size: 12.5px; }
  .com-otros { display: grid; grid-template-columns: auto 140px; gap: 8px; align-items: center; margin-top: 4px !important; }
  .com-otros > label { margin: 0 !important; }
  .com-tot-box { border-left: 1px solid var(--line); padding-left: 14px; }
  .com-tot-box #totales .tes-fila { padding: 2px 0; font-size: 13px; }
  .com-tot-box .hint { font-size: 11.5px; margin: 0; }
  .com-tot-box .alerta { padding: 4px 8px; margin: 0; font-size: 12.5px; }
  .com-ok { padding: 9px 14px; font-size: 14px; }
}
.ven-dejar { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.ven-cierre .ven-cobro .ven-vu label.ven-dejar { display: inline-flex; color: var(--text); }
.side-ver { margin: 6px 12px 10px; font-size: 11px; color: rgba(255,255,255,.4); }

/* Impresión de una compra (hoja A4, documento interno) */
#cp-print { display: none; }
@media print {
  body.imprimiendo-cp > *:not(#cp-print) { display: none !important; }
  body.imprimiendo-cp #cp-print { display: block; font-family: Arial, sans-serif; font-size: 10pt; color: #000; }
  @page { size: A4; margin: 12mm; }
}
.cp-hoja { max-width: 190mm; }
.cp-cab { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 8px; }
.cp-cab > div:first-child { display: flex; flex-direction: column; font-size: 9pt; }
.cp-cab > div:first-child b { font-size: 13pt; }
.cp-tit { text-align: right; display: flex; flex-direction: column; white-space: nowrap; }
.cp-tit b { font-size: 13pt; }
.cp-datos { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.cp-datos td { border: 1px solid #999; padding: 4px 6px; vertical-align: top; width: 33%; }
.cp-datos i, .cp-izq i { display: block; font-style: normal; font-size: 8pt; color: #555; text-transform: uppercase; }
.cp-datos b, .cp-datos span { display: block; }
.cp-lin { width: 100%; border-collapse: collapse; font-size: 9pt; }
.cp-lin th { text-align: left; border-bottom: 1px solid #000; padding: 3px 4px; font-size: 8pt; text-transform: uppercase; }
.cp-lin td { border-bottom: 1px solid #ddd; padding: 3px 4px; vertical-align: top; }
.cp-lin .num, .cp-tot .num { text-align: right; white-space: nowrap; }
.cp-pie { display: grid; grid-template-columns: 1fr 70mm; gap: 12px; margin-top: 10px; }
.cp-izq p { margin: 0 0 5px; }
.cp-izq h4 { margin: 8px 0 2px; font-size: 9pt; text-transform: uppercase; }
.cp-tot { width: 100%; border-collapse: collapse; }
.cp-tot td { padding: 2px 4px; }
.cp-tot .cp-fuerte td { border-top: 1px solid #000; font-weight: bold; font-size: 11pt; }
.cp-saldo { margin-top: 6px !important; }
.cp-leyenda { margin-top: 14px; font-size: 8pt; color: #555; text-align: center; }
.esp-lista { margin: 4px 0 10px 18px; font-size: 13px; }
.esp-ctrl { padding: 6px 10px; border-radius: 8px; margin: 0 0 8px; font-size: 13.5px; }
.esp-ctrl.ok { background: #e8f6ee; }
.esp-ctrl.warn { background: #fff4e5; }
/* Venta: deuda del cliente en una sola línea (el detalle se despliega); solo lo vencido va en rojo */
.ven-deuda { margin: 3px 0 0; font-size: 13px; }
.alerta.ven-deuda { display: block; padding: 2px 10px; border-radius: 8px; }
.ven-deuda-b .btn.sm { padding: 1px 10px; font-size: 12px; line-height: 18px; min-height: 0; }
.ven-deuda > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; padding: 1px 0; }
.ven-deuda > summary::-webkit-details-marker { display: none; }
.ven-deuda-b { display: inline-flex; align-items: center; gap: 14px; }
.ven-venc { color: var(--red, #c62828); font-weight: 700; }
.ven-deuda ul { margin: .2rem 0 .1rem 1.1rem; padding: 0; }
.ven-cli > .fila-sp { flex-wrap: nowrap; gap: 6px; }
.ven-cli > .fila-sp #cl-x { white-space: nowrap; flex: none; }
#cl-info > p.hint { margin: 3px 0 0; }
.ven-b .alerta.ven-deuda .ven-deuda-b .btn { height: 22px; min-height: 0; padding: 0 10px; font-size: 12px; line-height: 22px; }
.lista-fact { display: grid; gap: 6px; margin: 10px 0; }
.fila-fact { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--borde, #e5e7eb); border-radius: 8px; }
.fl-ap { display: flex; gap: 6px; align-items: center; } .fl-ap .inp[name=flete_aparte] { flex: 1; min-width: 0; } .fl-ap select { width: auto; flex: none; }
.pp-opc .pp-o { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink, #1f2937); }
.pp-opc .pp-o span { color: inherit; font-size: 12.5px; }
.pp-opc .pp-o b { font-size: 12.5px; color: inherit; }
.planes-pp { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0; }
.ps-opc .planes-pp { gap: 2px 6px; align-items: center; margin: 2px 0 0; }
.ps-opc .planes-pp .chk { padding: 1px 6px; min-height: 0; font-size: 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 6px; gap: 4px; background: transparent; }
.ps-opc .planes-pp .chk input { width: 14px; height: 14px; }
.ps-opc .planes-pp .hint { font-size: 12px; }
.pp-opc .pp-o span { white-space: nowrap; }
.pp-opc .pp-o { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
.ps-cierre .pp-opc .pp-o span:last-child { font-size: 11.5px; color: var(--muted); }
.lq-cobra { font-size: 14px; color: var(--muted); } .lq-cobra b { font-size: 22px; color: var(--green, #15803d); margin-left: 4px; }
.lq-cobra-box { border: 2px solid var(--green, #15803d); border-radius: 10px; padding: 8px 12px; margin: 8px 0; background: #F0FAF3; }
.lq-cobra-box > div { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.lq-cobra-box .lq-cobra-n { border-top: 1px solid #CDEBD6; margin-top: 4px; padding-top: 6px; align-items: baseline; }
.lq-cobra-box .lq-cobra-n b { font-size: 24px; color: var(--green, #15803d); } .lq-cobra-box .lq-cobra-n b:first-child { font-size: 16px; }
