:root {
  --tinta: #4f5b64;
  --azul: #1b6aaa;
  --azul-2: #5090c1;
  --azul-claro: #e4eef7;
  --gris: #4f5b64;
  --tinta-2: #4f5b64;
  --fondo: #f4f6fa;
  --tarjeta: #ffffff;
  --borde: #dde2ec;
  --tenue: #7a858d;
  --primario: #1b6aaa;
  --primario-osc: #155a91;
  --ok: #0f9d58;
  --ok-fondo: #e6f6ee;
  --aviso: #d97706;
  --aviso-fondo: #fff4e0;
  --error: #c62828;
  --error-fondo: #fdecec;
  --teal: #5090c1;
  --radio: 12px;
  --sombra: 0 1px 2px rgba(20, 33, 61, .06), 0 4px 14px rgba(20, 33, 61, .06);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fondo); color: var(--tinta); font-size: 16px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
body.con-modal { overflow: hidden; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; }
h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
a { color: var(--primario); }
.tenue { color: var(--tenue); font-size: .9em; }
.error-texto { color: var(--error); margin: .2em 0; }
[hidden] { display: none !important; }

/* ---------- Controles ---------- */
label { display: block; font-size: .85rem; font-weight: 600; color: var(--tinta-2); margin-bottom: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400; color: var(--tinta);
  padding: 10px 12px; border: 1px solid var(--borde); border-radius: 10px; background: #fff; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primario); outline-offset: -1px; border-color: transparent; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; display: inline-block; margin: 0 6px 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
  padding: 10px 16px; min-height: 44px; border-radius: 10px; border: 1px solid var(--borde); background: #fff; color: var(--tinta);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, transform .06s;
}
.btn:hover { background: #f0f3f9; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primario { background: var(--primario); border-color: var(--primario); color: #fff; }
.btn-primario:hover { background: var(--primario-osc); }
.btn-peligro { background: var(--error); border-color: var(--error); color: #fff; }
.btn-peligro:hover { background: #a61f1f; }
.btn-peligro-borde { color: var(--error); border-color: #f1b4b4; }
.btn-aviso { background: var(--aviso); border-color: var(--aviso); color: #fff; }
.btn-grande { min-height: 56px; font-size: 1.05rem; }
.btn-bloque { width: 100%; }
.btn-chico { min-height: 32px; padding: 4px 10px; font-size: .85rem; }
.btn-enlace { border: 0; background: none; color: var(--primario); padding-left: 0; }
.btn-icono { background: none; border: 0; color: inherit; font-size: 1.5rem; width: 44px; height: 44px; cursor: pointer; border-radius: 10px; }
.btn-icono:hover { background: rgba(255,255,255,.08); }
.lista-botones { display: flex; flex-direction: column; gap: 10px; }
.chip { border: 1px solid var(--borde); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }

.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px; box-shadow: var(--sombra); margin-bottom: 14px; }
.aviso { padding: 10px 14px; border-radius: 10px; font-size: .92rem; margin: 10px 0; }
.aviso-info { background: var(--azul-claro); color: var(--azul); }
.aviso-error { background: var(--error-fondo); color: var(--error); margin: 0; border-radius: 0; }
.seccion { margin: 22px 2px 10px; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tinta-2); }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: var(--tinta-2); vertical-align: middle; white-space: nowrap; }
.b-curso { background: var(--azul-claro); color: var(--azul); }
.b-fin { background: var(--ok-fondo); color: #0b6b3d; }
.b-cons { background: #e6eaed; color: var(--gris); }
.b-pend { background: var(--aviso-fondo); color: #92400e; }
.b-err { background: var(--error-fondo); color: var(--error); }

/* ---------- Toasts y modales ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
.toast { background: var(--gris); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: .95rem; transition: opacity .3s, transform .3s; }
.toast-exito { background: var(--ok); } .toast-error { background: var(--error); } .toast-aviso { background: var(--aviso); }
.toast.fuera { opacity: 0; transform: translateY(8px); }
.modal-fondo { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 500; display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: aparece .15s ease-out; }
.modal { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
@media (min-width: 700px) { .modal-fondo { align-items: center; padding: 20px; } .modal { border-radius: 16px; } .modal-ancho { max-width: 900px; } }
.modal-texto { font-size: 1.02rem; margin: 4px 0 18px; }
.modal-acciones { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
.input-grande { font-size: 1.6rem; text-align: center; min-height: 60px; font-weight: 700; }
.modal-error { border-top: 6px solid var(--error); }
.desc-alerta { text-align: center; margin-bottom: 18px; }
.da-icono { width: 64px; height: 64px; border-radius: 50%; background: var(--error); color: #fff; font-size: 2.2rem; font-weight: 800; display: grid; place-items: center; margin: 0 auto 10px; animation: latido .6s ease-in-out 2; }
.da-codigo { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; background: var(--error-fondo); color: var(--error); padding: 10px; border-radius: 10px; word-break: break-all; margin: 8px 0; }
@keyframes latido { 50% { transform: scale(1.15); } }

/* ---------- Login ---------- */
.pantalla-login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--azul) 0%, var(--azul-2) 100%); }
.login { width: min(92vw, 380px); }
.login-marca { text-align: center; color: #fff; margin-bottom: 20px; }
.login-marca img { border-radius: 16px; }
.login-marca h1 { margin: 10px 0 4px; font-size: 1.6rem; }
.login-marca p { opacity: .75; margin: 0; }
.login-pie { color: #fff; opacity: .8; text-align: center; font-size: .9rem; }

/* ---------- Colector ---------- */
.barra { position: sticky; top: 0; z-index: 50; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(6px + env(safe-area-inset-top)) 8px 6px 14px; min-height: 56px; }
.barra-titulo { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-acciones { display: flex; align-items: center; gap: 4px; }
.chip-red { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); color: #fff; border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.punto { width: 9px; height: 9px; border-radius: 50%; background: #999; }
.p-on { background: #34d399; } .p-off { background: #f87171; } .p-sync { background: #fbbf24; animation: latido 1s infinite; }
.app-colector main { padding: 14px; max-width: 720px; margin: 0 auto; }
.cat-estado { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; background: var(--fondo); border-radius: 10px; }
.cat-falta { background: var(--aviso-fondo); }
.ronda-item { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--sombra); }
.ronda-item:active { background: #f7f9fc; }
.ri-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ri-top h2 { margin: 0; }
.ri-sub { color: var(--tenue); font-size: .86rem; margin-top: 4px; }
.ri-num { margin-top: 6px; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.app-colector main:has(.conteo) { padding: 0; }
.conteo { display: flex; flex-direction: column; min-height: calc(100vh - 56px); }
.conteo-cab { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border-bottom: 1px solid var(--borde); }
.conteo-cab .btn-icono { color: var(--tinta); font-size: 2rem; }
.cc-info { flex: 1; min-width: 0; }
.cc-zona { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-stats { font-size: .85rem; color: var(--tinta-2); }
.lectura { display: flex; gap: 6px; padding: 10px; background: #fff; position: sticky; top: 56px; z-index: 20; border-bottom: 1px solid var(--borde); }
.lectura-input { margin: 0; font-family: var(--mono); font-size: 1.25rem; min-height: 54px; border: 2px solid var(--primario); }
.lectura-input:focus { outline: 3px solid rgba(29, 78, 216, .25); border-color: var(--primario); }
.btn-lect { flex: 0 0 auto; min-width: 54px; min-height: 54px; border-radius: 10px; border: 1px solid var(--borde); background: #fff; font-size: 1.2rem; font-weight: 700; cursor: pointer; color: var(--tinta); }
.btn-lect.activo { background: var(--azul); color: #fff; border-color: var(--azul); }
.flash { margin: 10px; padding: 12px 14px; border-radius: 12px; min-height: 62px; display: flex; flex-direction: column; justify-content: center; }
.flash-vacio { background: #eef1f6; color: var(--tinta-2); }
.flash-ok { background: var(--ok); color: #fff; }
.flash-aviso { background: var(--aviso); color: #fff; }
.flash-error { background: var(--error); color: #fff; }
.flash.pulso { animation: pulso .25s ease-out; }
@keyframes pulso { from { transform: scale(1.03); } to { transform: scale(1); } }
.f-tit { font-weight: 800; font-size: 1.15rem; font-family: var(--mono); word-break: break-all; }
.f-sub { font-size: .9rem; opacity: .92; }
.lineas { list-style: none; margin: 0; padding: 0 10px 90px; flex: 1; }
.lineas-lectura { padding-bottom: 20px; }
.linea { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--borde); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; }
.linea-ultima { border: 2px solid var(--ok); background: #f3fbf7; }
.linea-nc { border-left: 5px solid var(--aviso); }
.l-txt { flex: 1; min-width: 0; }
.l-sku { font-family: var(--mono); font-weight: 700; word-break: break-all; }
.l-desc { font-size: .86rem; color: var(--tenue); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.l-cant { font-size: 1.5rem; font-weight: 800; min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.vacio { color: var(--tenue); text-align: center; padding: 24px 10px; list-style: none; }
.conteo-pie { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--borde); z-index: 30; max-width: 720px; margin: 0 auto; }
.conteo-pie .btn { flex: 1; min-height: 52px; }
.lista-obj { list-style: none; padding: 0; margin: 0; max-height: 55vh; overflow: auto; }
.lista-obj li { display: flex; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--borde); }
.lista-obj li > span { font-size: 1.2rem; width: 22px; color: var(--tenue); }
.obj-ok > span { color: var(--ok) !important; }
.obj-ok { opacity: .6; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.kpis > div { background: var(--fondo); border-radius: 10px; padding: 10px; text-align: center; }
.kpis b { display: block; font-size: 1.4rem; }
.kpis span { font-size: .8rem; color: var(--tenue); }
.lista-simple { list-style: none; padding: 0; margin: 0; }
.lista-simple li { padding: 8px 2px; border-bottom: 1px solid var(--borde); font-family: var(--mono); }
.camara { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.camara video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-guia { position: absolute; left: 10%; right: 10%; top: 38%; height: 24%; border: 3px solid rgba(46, 196, 182, .9); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.cam-ultimo { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px; background: rgba(0,0,0,.6); color: #fff; text-align: center; font-family: var(--mono); }
.modal-camara { max-width: 640px; }

/* ---------- Administrador ---------- */
.app-admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.nav { background: var(--gris); color: #fff; padding: 16px 10px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.nav-marca { font-weight: 800; padding: 6px 10px 18px; display: flex; gap: 10px; align-items: center; }
.nav-marca img { border-radius: 8px; }
.nav a { color: #cdd5e6; text-decoration: none; display: block; padding: 10px 12px; border-radius: 8px; font-weight: 600; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.activo { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 4px 0 0 var(--azul-2); }
.nav-pie { margin-top: auto; font-size: .85rem; color: #aab4c8; padding: 10px; }
.nav-pie a { padding: 6px 0; color: #cdd5e6; }
.admin-main { padding: 24px 28px 60px; min-width: 0; }
.admin-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-cab h1 { font-size: 1.5rem; margin: 0; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filtros label { margin: 0; min-width: 160px; }
.tabla-cont { overflow: auto; border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; box-shadow: var(--sombra); max-height: 70vh; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 9px 12px; border-bottom: 1px solid #eef1f6; text-align: left; vertical-align: top; }
th { background: #f7f9fc; font-weight: 700; color: var(--tinta-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.fila-click { cursor: pointer; } tr.fila-click:hover td { background: #f7f9fc; }
td.mono { font-family: var(--mono); font-size: .85rem; }
.neg { color: var(--error); font-weight: 700; } .pos { color: var(--azul); font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.kpi-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 12px 14px; }
.kpi b { display: block; font-size: 1.4rem; } .kpi span { color: var(--tenue); font-size: .82rem; }
.zona-bloque { border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; margin-bottom: 12px; overflow: hidden; }
.zona-bloque > header { padding: 10px 14px; background: #f7f9fc; font-weight: 700; display: flex; justify-content: space-between; }
.zona-bloque label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-top: 1px solid #eef1f6; font-weight: 400; cursor: pointer; }
.zona-bloque label:hover { background: #fafbfd; }
.op-ronda { flex: 1; } .op-ronda small { color: var(--tenue); }
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--borde); margin-bottom: 14px; flex-wrap: wrap; }
.pestanas button { border: 0; background: none; font: inherit; font-weight: 600; padding: 10px 14px; cursor: pointer; color: var(--tenue); border-bottom: 3px solid transparent; }
.pestanas button.activo { color: var(--tinta); border-color: var(--primario); }
.drop { border: 2px dashed var(--borde); border-radius: var(--radio); padding: 22px; text-align: center; background: #fafbfd; }
.drop.sobre { border-color: var(--primario); background: var(--azul-claro); }
.acciones-fila { display: flex; gap: 8px; flex-wrap: wrap; }
.adv { max-height: 160px; overflow: auto; font-size: .85rem; background: var(--aviso-fondo); padding: 8px 12px; border-radius: 8px; margin: 8px 0; }
.adv li { margin: 2px 0; }
@media (max-width: 860px) {
  .app-admin { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px; }
  .nav-marca { padding: 6px 10px; } .nav a { padding: 8px 10px; }
  .nav-pie { margin: 0 0 0 auto; padding: 6px; }
  .admin-main { padding: 16px; }
}
body:has(.conteo-pie) #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
/* Nueva ronda: lectura de etiqueta de zona */
.zona-lector { display: flex; gap: 6px; margin-top: 4px; }
.zona-lector input { margin: 0; font-family: var(--mono); font-size: 1.1rem; min-height: 54px; border: 2px solid var(--primario); flex: 1; }
.zona-msg { margin: -4px 0 12px; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.zona-ok { background: var(--ok-fondo); color: #0b6b3d; }
.zona-error { background: var(--error-fondo); color: var(--error); }
.separador { display: flex; align-items: center; gap: 10px; color: var(--tenue); font-size: .85rem; margin: 4px 0 12px; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--borde); }
/* Administrador: zona de pruebas y etiquetas */
.zona-peligro { border-color: #f1b4b4; }
.zona-peligro h2 { color: var(--error); }
.lista-check { max-height: 300px; overflow: auto; border: 1px solid var(--borde); border-radius: 10px; padding: 4px 0; margin-bottom: 12px; }
.lista-check label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; font-weight: 400; cursor: pointer; }
.lista-check label:hover { background: #f7f9fc; }
.opciones-fila { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.opciones-fila label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.login .tarjeta h2 { font-size: 1.15rem; }
.login .btn-enlace { margin-top: 6px; padding-left: 0; }
.capturista { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: .95rem; }
.capturista b { font-size: 1.05rem; }
/* Tablero de avance */
.av-tot { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.av-kpi { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px 18px; box-shadow: var(--sombra); }
.av-kpi span { display: block; color: var(--tenue); font-size: .85rem; font-weight: 600; }
.av-kpi b { display: block; font-size: 2.2rem; line-height: 1.15; font-variant-numeric: tabular-nums; color: #1b6aaa; }
.av-kpi small { color: var(--tenue); }
.av-barra-cont { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px 18px; box-shadow: var(--sombra); }
.av-barra-txt { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.av-barra-txt b { font-size: 1.6rem; color: #1b6aaa; }
.av-barra { height: 22px; background: #e6edf5; border-radius: 999px; overflow: hidden; }
.av-barra > div { height: 100%; background: linear-gradient(90deg, var(--azul), var(--azul-2)); border-radius: 999px; transition: width .6s ease; }
.av-zonas { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 10px; }
.av-zona { background: #fff; border: 1px solid var(--borde); border-left: 6px solid #c5ccd8; border-radius: 10px; padding: 12px 14px; }
.avz-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.avz-nombre { font-weight: 600; margin: 4px 0; }
.avz-num { font-variant-numeric: tabular-nums; }
.avz-sub { color: var(--tenue); font-size: .82rem; margin-top: 4px; }
.ez-sin .badge { background: #eef1f6; color: var(--tenue); }
.ez-curso { border-left-color: var(--azul-2); } .ez-curso .badge { background: var(--azul-claro); color: var(--azul); }
.ez-contada { border-left-color: var(--ok); } .ez-contada .badge { background: var(--ok-fondo); color: #0b6b3d; }
.ez-cons { border-left-color: var(--gris); } .ez-cons .badge { background: #e6eaed; color: var(--gris); }
@media (prefers-reduced-motion: reduce) { .av-barra > div { transition: none; } }
/* Reportes: resaltado y totales */
td.resaltado { background: #fff1c2; font-weight: 700; }
td.mono { white-space: nowrap; }
tfoot td { position: sticky; bottom: 0; background: #e8eef5; font-weight: 700; border-top: 2px solid #1b6aaa; }

/* Marca configurable */
.marca-logo { max-height: 64px; max-width: 220px; object-fit: contain; }
.nav-marca .marca-logo { max-height: 30px; max-width: 40px; border-radius: 6px; background: #fff; }
.pie-marca { color: var(--tenue); font-size: .82rem; text-align: center; padding: 18px 10px 8px; white-space: pre-line; }
.pantalla-login .pie-marca { color: rgba(255,255,255,.85); }
.admin-main .pie-marca { border-top: 1px solid var(--borde); margin-top: 32px; }
/* Cuadro emergente de número de parte */
.mat-pop { background: none; border: 0; padding: 0; font: inherit; color: var(--azul); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.popover-mat { position: fixed; z-index: 900; background: #fff; border: 1px solid var(--borde); border-top: 4px solid var(--azul); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 12px 14px; min-width: 220px; max-width: 320px; font-size: .9rem; }
.popover-mat h4 { margin: 0 0 6px; font-family: var(--mono); color: var(--azul); }
.popover-mat .pm-fila { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.popover-mat .pm-esp { border-bottom: 1px solid var(--borde); padding-bottom: 6px; margin-bottom: 4px; font-weight: 600; }
.popover-mat .pm-tot { border-top: 2px solid var(--azul); margin-top: 4px; padding-top: 6px; font-weight: 700; }
.popover-mat .pm-sub { color: var(--tenue); font-size: .78rem; margin: 2px 0 2px; }
tr.fila-resaltada td { background: #fff1c2; }
.b-reab { background: #fff1c2; color: #8a5a00; }
.config-logo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.config-logo .vista { width: 96px; height: 96px; border: 1px dashed var(--borde); border-radius: 12px; display: grid; place-items: center; background: #fafbfc; overflow: hidden; }
.config-logo .vista img { max-width: 88px; max-height: 88px; object-fit: contain; }
tr.fila-resaltada td.dif-fila, tr.fila-resaltada td.dif-fila span { color: #c00000; font-weight: 700; }
