﻿:root {
  --tinta: #17212C;
  --tinta-suave: #223140;
  --oxido: #F20A37;
  --oxido-oscuro: #C8082D;
  --papel: #FFFFFF;
  --papel-tarjeta: #FFFFFF;
  --linea: #E7E5E0;
  --texto: #1C1F24;
  --texto-tenue: #6E7178;
  --verde: #3E7A54;
  --verde-fondo: #E8F1EA;
  --rojo: #AE4A3A;
  --rojo-fondo: #FAEBE7;
  --ambar-fondo: #FBF0DF;

  --fuente-cuerpo: 'elza', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --fuente-titulo: 'magistral-condensed', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radio: 7px;
  --radio-chico: 5px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--fuente-cuerpo);
  color: var(--texto);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}

.vista[hidden] { display: none; }

/* ============ LOGIN ============ */
.vista-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FBFAF8 url('/img/fondo-inicio.png') repeat; background-size: 340px;
}

.login-panel {
  width: 100%;
  max-width: 380px;
  background: var(--papel-tarjeta);
  border-radius: var(--radio);
  border: 1px solid var(--linea);
  padding: 2.5rem 2.25rem 2.25rem;
}

.login-marca { margin-bottom: 2.25rem; }
.login-marca-nombre {
  display: block;
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--tinta);
  letter-spacing: -0.015em;
}
.login-marca-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--texto-tenue);
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-form { display: flex; flex-direction: column; gap: 1.1rem; }

.campo { display: flex; flex-direction: column; gap: 0.4rem; }
.campo-label { font-size: 0.82rem; font-weight: 500; color: var(--texto); }

input[type="email"], input[type="password"], .campo-password input {
  font-family: var(--fuente-cuerpo);
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--linea);
  border-radius: 4px;
  background: var(--papel);
  color: var(--texto);
  outline: none;
  transition: border-color 0.15s ease;
}
input[type="email"]:focus, input[type="password"]:focus, .campo-password input:focus {
  border-color: var(--oxido);
  box-shadow: 0 0 0 3px rgba(201,122,61,0.15);
}

/* Campo de contraseña con el ojo para mostrarla (login, olvidé y cambiar contraseña) */
.campo-password { position: relative; display: block; }
.campo-password input { width: 100%; padding-right: 2.8rem; }
.btn-ver-password {
  position: absolute; top: 50%; right: 0.35rem; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; padding: 0; border: none; border-radius: 4px;
  background: none; color: var(--texto-tenue, #6B6F76); cursor: pointer;
}
.btn-ver-password:hover, .btn-ver-password:focus-visible { color: var(--oxido); outline: none; background: rgba(201,122,61,0.1); }
.btn-ver-password svg[hidden] { display: none; }

/* Campo rechazado al guardar (ej. desglose más largo de lo permitido) */
input.invalido { border-color: #B00020 !important; background: #FFF6F6; }
.error-campo { display: block; min-width: 9rem; margin-top: 0.2rem; color: #B00020; font-size: 0.72rem; line-height: 1.3; white-space: normal; }

.login-error {
  font-size: 0.85rem;
  color: var(--rojo);
  background: var(--rojo-fondo);
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
}

.btn {
  font-family: var(--fuente-cuerpo);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.7rem 1.1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primario { background: var(--oxido); color: #fff; }
.btn-primario:hover { background: var(--oxido-oscuro); box-shadow: 0 4px 14px rgba(189,91,46,0.3); }
.btn-ancho { width: 100%; margin-top: 0.4rem; }

.btn-texto {
  background: none;
  border: none;
  color: var(--texto-tenue);
  font-family: var(--fuente-cuerpo);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
}
.btn-texto:hover { color: var(--texto); }

/* ============ APP SHELL — sidebar ============ */
.vista-app { min-height: 100vh; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #FBFAF8;
  border-right: 1px solid var(--linea);
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-marca {
  padding: 0 0.6rem;
  margin-bottom: 2rem;
}
.sidebar-marca-nombre {
  display: block;
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--tinta);
}
.sidebar-marca-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--texto-tenue);
  margin-top: 0.15rem;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; }
.nav-item {
  background: none;
  border: none;
  border-radius: var(--radio-chico);
  color: var(--texto-tenue);
  font-family: var(--fuente-cuerpo);
  font-size: 0.87rem;
  font-weight: 500;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  text-align: left;
  transition: color 0.1s ease, background-color 0.1s ease;
}
.nav-item:hover { color: var(--texto); background: #F0EEE8; }
.nav-item-activo { color: var(--tinta); background: #F0EEE8; font-weight: 600; }
.nav-item-activo:hover { color: var(--tinta); }

.sidebar-usuario {
  border-top: 1px solid var(--linea);
  padding: 0.9rem 0.6rem 0 0.6rem;
  margin-top: 0.9rem;
}
.sidebar-usuario-info { margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.6rem; }
.sidebar-usuario-textos { min-width: 0; }
/* Foto de perfil (migracion 055): tocarla para cambiarla */
.sidebar-foto { position: relative; flex: none; padding: 0; border: none; background: none; cursor: pointer; border-radius: 50%; }
.sidebar-foto:focus-visible { outline: 2px solid var(--oxido); outline-offset: 2px; }
.sidebar-foto .chat-av.sidebar-av { width: 40px; height: 40px; font-size: 0.85rem; }
.sidebar-foto-camara { position: absolute; right: -4px; bottom: -4px; font-size: 0.65rem; background: #fff; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.sidebar-foto:disabled { opacity: 0.5; cursor: wait; }
.usuario-nombre { display: block; font-size: 0.85rem; font-weight: 600; color: var(--texto); }
.usuario-rol {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--ambar-fondo);
  color: var(--oxido-oscuro);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
}
.sidebar-usuario-accion {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.3rem 0;
  font-size: 0.8rem;
}

.contenido { flex: 1; min-width: 0; max-width: 1100px; padding: 2.25rem 2.5rem 4rem; }

.panel[hidden] { display: none; }

.panel-encabezado {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.panel-titulo {
  font-family: var(--fuente-titulo);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--tinta);
}
.panel-subtitulo {
  font-size: 0.88rem;
  color: var(--texto-tenue);
  margin: 0.25rem 0 0;
}

.btn-secundario {
  background: #fff;
  color: var(--tinta);
  border: 1px solid var(--linea);
}
.btn-secundario:hover { background: #F5F4F1; }

/* ---- filtros ---- */
.filtros-barra {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.filtro-input, .filtro-select {
  font-family: var(--fuente-cuerpo);
  font-size: 0.85rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--linea);
  border-radius: 4px;
  background: #fff;
  color: var(--texto);
  outline: none;
}
.filtro-input { flex: 1 1 240px; min-width: 200px; }
.filtro-input:focus, .filtro-select:focus {
  border-color: var(--oxido);
  box-shadow: 0 0 0 3px rgba(201,122,61,0.12);
}
.filtro-select { cursor: pointer; }

/* ---- paginación ---- */
.paginacion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 1.25rem;
}
.paginacion[hidden] { display: none; }
.paginacion-info { font-size: 0.83rem; color: var(--texto-tenue); }
.paginacion .btn-texto:disabled { opacity: 0.35; cursor: default; }
.paginacion .btn-texto:disabled:hover { color: var(--texto-tenue); }

.estado-carga, .estado-vacio {
  padding: 3rem 0;
  text-align: center;
  color: var(--texto-tenue);
  font-size: 0.92rem;
}

/* ============ TABLA ============ */
.tabla {
  width: 100%;
  border-collapse: collapse;
  background: var(--papel-tarjeta);
  border-radius: 4px;
  border: 1px solid var(--linea);
  overflow: hidden;
}
.tabla thead th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--texto-tenue);
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--linea);
  background: #F4F2EC;
}
.tabla tbody td {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--linea);
}
.tabla tbody tr:last-child td { border-bottom: none; }
.tabla tbody tr.fila-clic { cursor: pointer; transition: background-color 0.1s ease; }
.tabla tbody tr.fila-clic:hover { background: #F8F6F3; }

.tabla-compacta thead th, .tabla-compacta tbody td { padding: 0.55rem 0.75rem; font-size: 0.85rem; }
/* Cotizaciones (escritorio): columnas mas juntas y Acciones mas ancha, para que los botones vayan en 2 o 3
   renglones y no uno sobre otro. Folio, total y fecha sin partirse (columnas de MODULOS.cotizaciones) */
@media (min-width: 900px) {
  #cotizaciones-tabla thead th, #cotizaciones-tabla tbody td { padding: 0.55rem 0.6rem; }
  #cotizaciones-tabla tbody td:nth-child(2), #cotizaciones-tabla tbody td:nth-child(6), #cotizaciones-tabla tbody td:nth-child(8) { white-space: nowrap; }
  #cotizaciones-tabla tbody td:last-child { min-width: 340px; }
  #cotizaciones-tabla tbody td:last-child .acciones-lista { gap: 0.15rem 0.75rem; }
  #cotizaciones-tabla tbody td:last-child .btn-texto { padding: 0.1rem 0.2rem; }
  #cotizaciones-tabla tbody td:last-child .btn-chico { padding: 0.2rem 0.6rem; }
}

.celda-folio { font-weight: 600; color: var(--tinta); }
.celda-total { font-variant-numeric: tabular-nums; }

/* ============ BADGES DE ESTATUS ============ */
.badge-estatus {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  white-space: nowrap;
}
.badge-nuevo { background: #EDEEF0; color: #4B5157; }
.badge-diseno { background: var(--ambar-fondo); color: var(--oxido-oscuro); }
.badge-produccion { background: #E7EEF8; color: #35578C; }
.badge-listo { background: #F1E9F9; color: #6E4A9E; }
.badge-entregado { background: var(--verde-fondo); color: var(--verde); }
.badge-cancelado { background: var(--rojo-fondo); color: var(--rojo); }

/* ============ DETALLE DE PEDIDO ============ */
.btn-volver {
  background: none;
  border: none;
  color: var(--texto-tenue);
  font-family: var(--fuente-cuerpo);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}
.btn-volver:hover { color: var(--tinta); }

.detalle-resumen-estado { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; margin-bottom: 0.3rem; }
.resumen-badge { font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 12px; display: inline-flex; align-items: center; gap: 0.3rem; }
.resumen-badge-link { border: 0; font-family: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.resumen-badge-link:hover { filter: brightness(0.94); }
.resumen-badge-ok { background: #E8F5E9; color: #2E7D32; }
.resumen-badge-pendiente { background: #FFF3E0; color: #E65100; }
.resumen-badge-alerta { background: #FBEAEA; color: #B00020; }
.resumen-badge-neutral { background: #EDEBE5; color: #6B6F76; }
.tarjeta-titulo-colapsable { cursor: pointer; user-select: none; }
.tarjeta-resumen { font-size: 0.78rem; font-weight: 400; color: var(--texto-tenue); margin-left: 0.5rem; }
/* Flecha para abrir/cerrar la tarjeta: grande y roja para que se vea (30 oct 2026) */
.tarjeta-chevron { font-size: 1.5rem; line-height: 1; color: var(--oxido); padding: 0.1rem 0.4rem; border-radius: var(--radio-chico); transition: transform 0.15s ease, background 0.15s ease; margin-left: auto; cursor: pointer; }
.tarjeta-titulo-colapsable:hover .tarjeta-chevron { background: var(--rojo-fondo); color: var(--oxido-oscuro); }
.tarjeta-chevron.tarjeta-chevron-colapsado { transform: rotate(-90deg); }


.detalle-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.detalle-encabezado {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.detalle-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.tarjeta {
  background: var(--papel-tarjeta);
  border-radius: 4px;
  border: 1px solid var(--linea);
  padding: 1.25rem 1.35rem 1.4rem;
  margin-bottom: 1.5rem;
}
.tarjeta:last-child { margin-bottom: 0; }
.tarjeta-titulo {
  font-family: var(--fuente-titulo);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.9rem;
  color: var(--tinta);
}

/* ---- checklist de diseño ---- */
.checklist { display: flex; flex-direction: column; gap: 0.6rem; }
.checklist[hidden] { display: none; }
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
}
.checklist-marca {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.checklist-marca-ok { background: var(--verde-fondo); color: var(--verde); }
.checklist-marca-pendiente { background: #EDEEF0; color: #9AA0A6; }
.checklist-completo {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  padding: 0.5rem 0.7rem;
  border-radius: 4px;
}
.checklist-completo-si { background: var(--verde-fondo); color: var(--verde); }
.checklist-completo-no { background: var(--ambar-fondo); color: var(--oxido-oscuro); }

/* ---- historial ---- */
.historial { list-style: none; margin: 0; padding: 0; }
.historial-item {
  position: relative;
  padding: 0 0 1.1rem 1.1rem;
  border-left: 2px solid var(--linea);
  margin-left: 0.35rem;
}
.historial-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.historial-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--oxido);
}
.historial-estatus { font-size: 0.85rem; font-weight: 600; color: var(--tinta); }
.historial-detalle { font-size: 0.8rem; color: var(--texto-tenue); margin-top: 0.15rem; }
.historial-fecha { font-size: 0.72rem; color: #9AA0A6; margin-top: 0.2rem; }

@media (max-width: 780px) {
  .detalle-grid { grid-template-columns: 1fr; }
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--linea); }
  .sidebar-nav { flex-direction: row; overflow-x: auto; gap: 0.3rem; }
  .contenido { padding: 1.25rem 1rem 3rem; }
}

/* ============ MÓDULOS GENÉRICOS (Clientes, Producción, Catálogo, Cotizaciones) ============ */
.panel-generico[hidden] { display: none; }

.badge-si { background: var(--verde-fondo); color: var(--verde); }
.badge-no { background: #EDEEF0; color: #6B6F76; }

/* ============ IMPRESIÓN ============ */
@media print {
  .no-imprimir, .sidebar, .filtros-barra, .paginacion, #panel-lista { display: none !important; }
  body { background: #fff; }
  .contenido { max-width: 100%; padding: 0; margin: 0; }
  .panel[hidden] { display: none !important; }
  #panel-detalle { display: block !important; }
  .tarjeta { box-shadow: none; border: 1px solid var(--linea); break-inside: avoid; }
  .detalle-grid { grid-template-columns: 1fr 1fr; }

  body:has(#modal-ver-cotizacion:not([hidden])) > *:not(#modal-ver-cotizacion) { display: none !important; }
  #modal-ver-cotizacion { position: static !important; background: none !important; padding: 0 !important; display: block !important; }
  #modal-ver-cotizacion .modal-caja { box-shadow: none !important; max-height: none !important; max-width: 100% !important; }
  body:has(#panel-impresion-pedido:not([hidden])) > *:not(#panel-impresion-pedido) { display: none !important; }
  #panel-impresion-pedido { position: static !important; }
  .panel-impresion { padding: 0.7rem !important; }
  .pi-encabezado { margin-bottom: 0.6rem !important; padding-bottom: 0.5rem !important; }
  .pi-titulo { margin: 0.3rem 0 !important; font-size: 1.1rem !important; }
  .pi-datos-grid { margin-bottom: 0.6rem !important; }
  body:has(#panel-impresion-ot:not([hidden])) > *:not(#panel-impresion-ot) { display: none !important; }
  #panel-impresion-ot { position: static !important; }
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(27,36,48,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}
.modal-overlay[hidden] { display: none; }

#modal-seleccionar-catalogo { z-index: 200; }

.modal-caja {
  background: #fff;
  border-radius: 6px;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}

.modal-encabezado {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--linea);
}
.modal-titulo { font-family: var(--fuente-titulo); font-size: 1.2rem; font-weight: 600; color: var(--tinta); margin: 0; }

.modal-cuerpo { padding: 1.25rem 1.35rem; overflow-y: auto; flex: 1; }

.filtro-select-ancho { width: 100%; padding: 0.6rem 0.7rem; }

.nc-items-encabezado {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1.1rem; margin-bottom: 0.5rem;
}
.nc-items { display: flex; flex-direction: column; gap: 0.6rem; }

.nc-renglon {
  display: grid;
  grid-template-columns: 100px 1fr 70px 70px 90px 28px;
  gap: 0.4rem;
  align-items: center;
  background: #F8F6F3;
  border-radius: 4px;
  padding: 0.5rem;
}
.nc-renglon select, .nc-renglon input {
  font-family: var(--fuente-cuerpo);
  font-size: 0.8rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--linea);
  border-radius: 4px;
  width: 100%;
}
.nc-renglon-subtotal { font-size: 0.8rem; font-weight: 600; color: var(--tinta); text-align: right; }
.nc-quitar-renglon {
  background: none; border: none; color: var(--rojo); cursor: pointer; font-size: 1rem; padding: 0;
}

.nc-totales {
  margin-top: 1.25rem;
  border-top: 1px solid var(--linea);
  padding-top: 0.9rem;
}
.nc-totales > div { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 0.2rem 0; color: var(--texto-tenue); }
.nc-totales strong { color: var(--texto); font-variant-numeric: tabular-nums; }
.nc-total-final { margin-top: 0.35rem; padding-top: 0.5rem !important; border-top: 1px dashed var(--linea); }
.nc-total-final span, .nc-total-final strong { font-size: 1rem; color: var(--tinta) !important; }

.modal-pie {
  display: flex; justify-content: flex-end; gap: 0.75rem;
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--linea);
}

/* ---- crear cliente rápido dentro del modal ---- */
.nc-cliente-fila { display: flex; align-items: center; gap: 0.7rem; }
.nc-cliente-fila select { flex: 1; }
.nc-cliente-form {
  margin-top: 0.6rem;
  padding: 0.8rem;
  background: #F8F6F3;
  border-radius: 4px;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.nc-cliente-form input {
  font-family: var(--fuente-cuerpo); font-size: 0.85rem;
  padding: 0.5rem 0.6rem; border: 1px solid var(--linea); border-radius: 4px;
}
.nc-cliente-form-botones { display: flex; justify-content: flex-end; gap: 0.6rem; }

.nc-notas {
  font-family: var(--fuente-cuerpo); font-size: 0.85rem;
  padding: 0.6rem 0.7rem; border: 1px solid var(--linea); border-radius: 4px;
  resize: vertical; width: 100%;
}
.nc-fila-doble {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem;
  margin-top: 0.9rem;
}

/* ---- selector visual del catálogo (con fotos) ---- */
.modal-caja-ancha { max-width: 760px; }

.nc-renglon {
  grid-template-columns: 190px 1fr 34px 70px 70px 90px 28px;
}
.nc-ver-catalogo {
  background: #fff; border: 1px solid var(--linea); border-radius: 4px;
  cursor: pointer; font-size: 0.9rem; padding: 0.35rem;
  display: flex; align-items: center; justify-content: center;
}
.nc-ver-catalogo:hover { background: #F5F4F1; }

.msc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.7rem;
  max-height: 55vh;
  overflow-y: auto;
}
.msc-card {
  border: 1px solid var(--linea);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.msc-card:hover { border-color: var(--oxido); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.msc-card-img {
  width: 100%; height: 110px;
  background: #F2F1EE center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: #B9B5AC; font-size: 0.75rem;
}
.msc-card-info { padding: 0.55rem 0.65rem; }
.msc-card-nombre { font-size: 0.82rem; font-weight: 600; color: var(--texto); line-height: 1.25; }
.msc-card-categoria { font-size: 0.7rem; color: var(--texto-tenue); margin-top: 0.15rem; }
.msc-card-precio { font-size: 0.78rem; font-weight: 700; color: var(--oxido-oscuro); margin-top: 0.3rem; }

/* ---- botones de tipo de renglon (estilo "Desde Catalogo / Manual" del sistema viejo) ---- */
.nc-tipo-botones { display: flex; gap: 0.3rem; }
.nc-tipo-btn {
  font-family: var(--fuente-cuerpo); font-size: 0.72rem; font-weight: 600;
  padding: 0.4rem 0.5rem; border-radius: 4px; border: 1px solid var(--linea);
  background: #fff; color: var(--texto-tenue); cursor: pointer; white-space: nowrap;
}
.nc-tipo-btn:hover { background: #F5F4F1; }
.nc-tipo-btn-activo { background: var(--verde); border-color: var(--verde); color: #fff; }
.nc-tipo-btn-activo:hover { background: var(--verde); }

/* ============ NUEVA COTIZACIÓN — calcado del sistema anterior ============ */
.modal-caja-grande { max-width: 720px; }

.nc-campos-arriba {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0.7rem;
}
.nc-campos-arriba input, .nc-campos-arriba select {
  font-family: var(--fuente-cuerpo); font-size: 0.85rem;
  padding: 0.55rem 0.6rem; border: 1px solid var(--linea); border-radius: 4px; width: 100%;
}

.nc-botones-agregar { display: flex; gap: 0.5rem; margin-top: 1.1rem; }
.nc-boton-agregar {
  font-family: var(--fuente-cuerpo); font-size: 0.82rem; font-weight: 600;
  padding: 0.55rem 0.9rem; border-radius: 4px; border: 1px solid var(--linea);
  background: #fff; color: var(--texto); cursor: pointer;
}
.nc-boton-agregar:hover { background: #F5F4F1; }
.nc-boton-agregar-activo { background: var(--verde); border-color: var(--verde); color: #fff; }
.nc-boton-agregar-activo:hover { background: var(--verde); }

.nc-items-vacio {
  text-align: center; color: var(--texto-tenue); font-size: 0.85rem;
  padding: 1.5rem 0; margin-top: 0.9rem;
}
.nc-items-vacio[hidden] { display: none; }

.nc-item-fila {
  display: grid;
  grid-template-columns: 1fr 70px 70px 90px 90px auto 28px;
  gap: 0.4rem;
  align-items: center;
  background: #F8F6F3;
  border-radius: 4px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}
.nc-item-fila input {
  font-family: var(--fuente-cuerpo); font-size: 0.8rem;
  padding: 0.4rem 0.5rem; border: 1px solid var(--linea); border-radius: 4px; width: 100%;
}
.nc-item-nombre-fijo {
  font-size: 0.82rem; font-weight: 600; color: var(--tinta);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nc-item-subtotal { font-size: 0.82rem; font-weight: 600; text-align: right; color: var(--tinta); }
.nc-item-quitar { background: none; border: none; color: var(--rojo); cursor: pointer; font-size: 1rem; padding: 0; }

.nc-anticipo { color: var(--oxido-oscuro) !important; }
.nc-anticipo span, .nc-anticipo strong { color: var(--oxido-oscuro) !important; }

@media (max-width: 700px) {
  .nc-campos-arriba { grid-template-columns: 1fr 1fr; }
}

.btn-peligro { background: #fff; color: var(--rojo); border: 1px solid var(--rojo); }
.btn-peligro:hover { background: var(--rojo-fondo); }

.btn-restaurar { color: var(--verde); }
.btn-eliminar-def { color: var(--rojo); }

.tabla thead th:first-child, .tabla tbody td:first-child { width: 34px; text-align: center; }

.msc-card-nota { font-size: 0.68rem; color: var(--rojo); margin-top: 0.25rem; line-height: 1.2; }

.campo-checkbox { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--texto); }
.campo-checkbox input { width: auto; }
.campo-checkbox[hidden] { display: none; }

.usuario-rol-tabla {
  background: var(--ambar-fondo) !important;
  color: var(--oxido-oscuro) !important;
}

.tabla-foto-mini { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; display: block; }
.tabla-foto-vacia { color: #B9B5AC; font-size: 0.75rem; }

/* ============ LISTAS EN TARJETA (Pedidos, Cotizaciones) ============ */
.lista-seleccionar-barra { margin-bottom: 0.7rem; }
.lista-seleccionar-barra[hidden] { display: none; }

.lista-tarjetas[hidden] { display: none; }
.lista-tarjetas { display: flex; flex-direction: column; gap: 0.55rem; }

.lista-tarjeta {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--papel-tarjeta);
  border: 1px solid var(--linea);
  border-radius: 6px;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.lista-tarjeta:hover { border-color: #D8CFC2; background: #FBFAF8; }

.lista-tarjeta-chk { display: flex; flex-shrink: 0; cursor: default; }
.lista-tarjeta-chk input { cursor: pointer; }

.lista-tarjeta-principal { flex: 1; min-width: 0; }
.lista-tarjeta-titulo {
  font-family: var(--fuente-titulo);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--tinta);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lista-tarjeta-sub {
  font-size: 0.78rem;
  color: var(--texto-tenue);
  margin-top: 0.2rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.lista-tarjeta-precio { flex-shrink: 0; text-align: right; min-width: 90px; }
.lista-tarjeta-total { font-size: 1rem; font-weight: 700; color: var(--tinta); font-variant-numeric: tabular-nums; }
.lista-tarjeta-precio-nota { font-size: 0.7rem; color: var(--oxido-oscuro); text-transform: capitalize; margin-top: 0.1rem; }

.lista-tarjeta-badge { flex-shrink: 0; }

.lista-tarjeta-acciones { flex-shrink: 0; display: flex; gap: 0.4rem; }
.lista-tarjeta-acciones .btn-texto { white-space: nowrap; }

@media (max-width: 700px) {
  .lista-tarjeta { flex-wrap: wrap; }
  .lista-tarjeta-principal { flex-basis: 100%; order: 1; }
  .lista-tarjeta-precio { order: 3; margin-left: auto; }
  .lista-tarjeta-badge { order: 2; }
}

.lista-tarjeta-sin-clic { cursor: default; }
.lista-tarjeta-sin-clic:hover { border-color: var(--linea); background: var(--papel-tarjeta); }

/* ---- estaciones de produccion ---- */
.estacion-bloque {
  background: #F8F6F3;
  border-radius: 6px;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.7rem;
}
.estacion-bloque-actual { background: #E7EEF8; box-shadow: inset 3px 0 0 #35578C; }
.estacion-encabezado { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.estacion-nombre { font-family: var(--fuente-titulo); font-size: 0.95rem; font-weight: 600; color: var(--tinta); }
.estacion-fila {
  display: grid;
  grid-template-columns: 130px 90px 90px 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.estacion-fila select, .estacion-fila input {
  font-family: var(--fuente-cuerpo); font-size: 0.8rem;
  padding: 0.4rem 0.5rem; border: 1px solid var(--linea); border-radius: 4px; width: 100%;
}
.estacion-notas {
  font-family: var(--fuente-cuerpo); font-size: 0.8rem;
  padding: 0.4rem 0.5rem; border: 1px solid var(--linea); border-radius: 4px;
  width: 100%; resize: vertical;
}
.estacion-etiqueta { font-size: 0.68rem; color: var(--texto-tenue); margin-bottom: 0.15rem; display: block; }

@media (max-width: 640px) {
  .estacion-fila { grid-template-columns: 1fr 1fr; }
}

/* ============ AJUSTES MÓVIL (consolidado) ============ */
@media (max-width: 720px) {
  /* Encabezados de panel: que el botón no se amontone con el título */
  .panel-encabezado { flex-wrap: wrap; gap: 0.8rem; }
  .panel-encabezado > div:last-child { display: flex; flex-wrap: wrap; gap: 0.5rem; width: 100%; }

  /* Barra de filtros: que el buscador no obligue a scroll horizontal */
  .filtros-barra { gap: 0.5rem; }
  .filtro-input { min-width: 0; flex: 1 1 100%; }
  .filtro-select { flex: 1 1 auto; }

  /* Tablas anchas (Clientes, Catálogo, Producción): scroll horizontal en vez de aplastarse */
  .tabla { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabla th, .tabla td { white-space: nowrap; }

  /* Modales: menos aire, más espacio útil */
  .modal-overlay { padding: 0.6rem; align-items: flex-end; }
  .modal-caja, .modal-caja-ancha, .modal-caja-grande { max-width: 100%; max-height: 94vh; border-radius: 10px 10px 0 0; }
  .modal-encabezado { padding: 0.9rem 1rem; }
  .modal-cuerpo { padding: 1rem; }
  .modal-pie { padding: 0.8rem 1rem; flex-wrap: wrap; }
  .modal-pie .btn { flex: 1 1 auto; }

  /* Nueva Cotización: los grids de campos colapsan a 1 columna, sin tocar el formulario en sí */
  .nc-campos-arriba { grid-template-columns: 1fr; }
  .nc-fila-doble { grid-template-columns: 1fr; }
  .nc-tipo-botones, .nc-botones-agregar { flex-wrap: wrap; }
  .nc-item-fila {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "nombre nombre" "talla cantidad" "precio subtotal" "quitar quitar";
  }

  /* Estaciones de producción: apiladas en vez de 4 columnas */
  .estacion-fila { grid-template-columns: 1fr; }

  /* Renglones antiguos (por si quedan referenciados) */
  .nc-renglon { grid-template-columns: 1fr; }

  /* Tarjetas de lista: acciones en su propia fila, sin amontonarse */
  .lista-tarjeta-acciones { flex-basis: 100%; order: 4; flex-wrap: wrap; margin-top: 0.4rem; }

  /* Campos dobles genéricos (editar cliente/producto, etc.) */
  .nc-campos-arriba input, .nc-campos-arriba select { font-size: 0.9rem; }
}

@media (max-width: 420px) {
  .contenido { padding: 1rem 0.75rem 3rem; }
  .panel-titulo { font-size: 1.4rem; }
  .login-panel { padding: 2rem 1.5rem 1.75rem; }
  .msc-grid { grid-template-columns: repeat(2, 1fr); }
}

.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1rem; }
.tabla-scroll[hidden] { display: none; }

.tarjeta-titulo-fila { display: flex; align-items: center; justify-content: space-between; }
.tarjeta-nota { font-size: 0.75rem; color: var(--texto-tenue); margin: 0.1rem 0 0.7rem; }
.lista-archivos { display: flex; flex-direction: column; gap: 0.5rem; }
.archivo-fila {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  background: #F8F6F3; border-radius: 4px; padding: 0.55rem 0.75rem;
}
.archivo-fila a { font-size: 0.82rem; color: var(--oxido-oscuro); font-weight: 600; text-decoration: none; }
.archivo-fila a:hover { text-decoration: underline; }
.archivo-tipo { font-size: 0.7rem; color: var(--texto-tenue); text-transform: uppercase; letter-spacing: 0.03em; }
.archivos-vacio { font-size: 0.82rem; color: var(--texto-tenue); }

/* ============ EN PROCESO (Marketing) ============ */
.mkt-grid[hidden] { display: none; }
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.mkt-card {
  background: var(--papel-tarjeta); border: 1px solid var(--linea); border-radius: 6px; overflow: hidden;
}
.mkt-card-mockup {
  width: 100%; height: 150px; background: #F0EDE6 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: var(--texto-tenue); font-size: 0.78rem;
}
.mkt-card-cuerpo { padding: 0.9rem 1rem; }
.mkt-card-titulo { font-family: var(--fuente-titulo); font-weight: 600; font-size: 1rem; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-card-sub { font-size: 0.78rem; color: var(--texto-tenue); margin-top: 0.15rem; }
.mkt-card-pie { display: flex; align-items: center; justify-content: space-between; margin-top: 0.6rem; }
.mkt-card-etapa {
  font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 20px;
  background: var(--ambar-fondo); color: var(--oxido-oscuro);
}
.mkt-card-piezas { font-size: 0.78rem; color: var(--texto); font-weight: 600; }

/* ============ DASHBOARD ============ */
.dash-seccion-titulo { font-family: var(--fuente-titulo); font-size: 1.05rem; font-weight: 600; color: var(--tinta); margin: 1.8rem 0 0.8rem; }
.dash-seccion-titulo:first-of-type { margin-top: 0.5rem; }
.dash-nota { font-size: 0.75rem; color: var(--texto-tenue); margin-top: -0.3rem; margin-bottom: 0.3rem; }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; }
.stat-card { background: var(--papel-tarjeta); border: 1px solid var(--linea); border-radius: 8px; padding: 1.35rem 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: box-shadow 0.15s ease, transform 0.15s ease; min-width: 0; overflow: hidden; container-type: inline-size; }
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.stat-etiqueta { font-size: 0.72rem; color: var(--texto-tenue); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; overflow: hidden; white-space: normal; line-height: 1.2; }
.stat-valor { font-family: var(--fuente-titulo); font-size: clamp(1.35rem, 4vw, 2rem); font-weight: 700; color: var(--tinta); margin-top: 0.45rem; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@supports (container-type: inline-size) {
  .stat-valor { font-size: clamp(1rem, 11cqi, 1.75rem); }
  .stat-etiqueta { font-size: clamp(0.6rem, 6cqi, 0.72rem); }
}
.dash-barra-cuello .dash-barra-relleno { background: #B00020; }
.dash-barra-badge { font-size: 0.68rem; color: #B00020; font-weight: 700; margin-left: 0.4rem; }
.stat-card-alerta { border-color: #B00020; background: #FBEAEA; }
.stat-card-alerta .stat-valor { color: #B00020; }
.stat-tendencia { font-size: 0.7rem; margin-top: 0.25rem; }
.stat-tendencia-arriba { color: #2E7D32; font-weight: 600; }
.stat-tendencia-abajo { color: #B00020; font-weight: 600; }

.dashboard-barras { display: flex; flex-direction: column; gap: 0.5rem; }
.dash-barra-fila { display: grid; grid-template-columns: 160px 1fr 40px; align-items: center; gap: 0.7rem; }
.dash-barra-etiqueta { font-size: 0.82rem; color: var(--texto); }
.dash-barra-pista { background: #EFEBE2; border-radius: 20px; height: 10px; overflow: hidden; }
.dash-barra-relleno { background: var(--oxido); height: 100%; border-radius: 20px; }
.dash-barra-numero { font-size: 0.82rem; font-weight: 600; color: var(--tinta); text-align: right; }

.dash-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.dashboard-lista { display: flex; flex-direction: column; gap: 0.4rem; }
.dash-item-fila {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  background: var(--papel-tarjeta); border: 1px solid var(--linea); border-radius: 4px; padding: 0.6rem 0.8rem;
}
.dash-item-nombre { font-size: 0.85rem; color: var(--texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-item-sub { font-size: 0.72rem; color: var(--texto-tenue); }
.dash-item-valor { font-size: 0.85rem; font-weight: 600; color: var(--oxido-oscuro); flex-shrink: 0; }

@media (max-width: 780px) {
  .dash-columnas { grid-template-columns: 1fr; }
  .dash-barra-fila { grid-template-columns: 110px 1fr 36px; }
}

.nc-comprobante-bloque { background: #F8F6F3; border-radius: 6px; padding: 0.8rem 0.9rem; margin-top: 1.1rem; }

/* ============ VER COTIZACIÓN (formato imprimible) ============ */
.mvc-encabezado { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--oxido); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.mvc-marca { font-family: var(--fuente-titulo); font-size: 1.3rem; font-weight: 600; color: var(--tinta); }
.mvc-marca-sub { font-size: 0.75rem; color: var(--texto-tenue); margin-top: 0.2rem; }
.mvc-folio-bloque { text-align: right; }
.mvc-folio { font-family: var(--fuente-titulo); font-size: 1.1rem; font-weight: 600; color: var(--oxido-oscuro); }
.mvc-folio-sub { font-size: 0.78rem; color: var(--texto-tenue); margin-top: 0.15rem; }

.mvc-seccion-titulo { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--oxido-oscuro); margin: 1.1rem 0 0.5rem; }
.mvc-datos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1.5rem; }
.mvc-dato-etiqueta { font-size: 0.7rem; color: var(--texto-tenue); }
.mvc-dato-valor { font-size: 0.88rem; color: var(--texto); font-weight: 600; }
.mvc-abrir-whatsapp { display: inline-block; margin-top: 0.3rem; text-decoration: none; }

.mvc-tabla { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.mvc-tabla th { text-align: left; font-size: 0.72rem; color: var(--texto-tenue); border-bottom: 1px solid var(--linea); padding: 0.4rem 0.3rem; }
.mvc-tabla td { font-size: 0.85rem; padding: 0.5rem 0.3rem; border-bottom: 1px solid var(--linea); }
.mvc-tabla .num { text-align: right; font-variant-numeric: tabular-nums; }

.mvc-totales { margin-left: auto; width: 260px; margin-top: 0.8rem; }
.mvc-totales-fila { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 0.3rem 0; }
.mvc-totales-fila.mvc-total-final { font-weight: 700; font-size: 1.05rem; border-top: 1px solid var(--linea); margin-top: 0.3rem; padding-top: 0.5rem; color: var(--tinta); }
.mvc-totales-fila.mvc-anticipo { color: var(--oxido-oscuro); font-weight: 600; }

.mvc-notas-caja { background: #F8F6F3; border-radius: 4px; padding: 0.8rem 0.9rem; font-size: 0.78rem; color: var(--texto-tenue); white-space: pre-line; margin-top: 1rem; }

.stock-bajo { color: var(--rojo); font-weight: 700; }

.material-fila {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  background: #F8F6F3; border-radius: 4px; padding: 0.55rem 0.75rem; margin-bottom: 0.4rem;
}
.material-fila-texto { font-size: 0.82rem; color: var(--texto); }
.material-fila-quitar { background: none; border: none; color: var(--rojo); cursor: pointer; font-size: 0.95rem; }

.explosion-fila {
  display: grid; grid-template-columns: 1fr 100px 100px 90px; gap: 0.6rem; align-items: center;
  padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--linea);
  font-size: 0.85rem;
}
.explosion-suficiente { color: var(--verde); font-weight: 600; }
.explosion-insuficiente { color: var(--rojo); font-weight: 600; }

/* ============ MENU HAMBURGUESA MOVIL ============ */
.btn-menu-movil {
  display: none;
  position: fixed;
  top: 0.9rem; left: 0.9rem;
  z-index: 60;
  width: 42px; height: 42px;
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 6px;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.overlay-menu-movil {
  display: none;
  position: fixed; inset: 0;
  background: rgba(23,33,44,0.5);
  z-index: 40;
}
.overlay-menu-movil[hidden] { display: none !important; }

@media (max-width: 780px) {
  .btn-menu-movil { display: block; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    border-right: 1px solid var(--linea);
    border-bottom: none;
  }
  .sidebar.sidebar-abierto { transform: translateX(0); }
  .sidebar-nav { flex-direction: column; overflow-x: visible; }
  .overlay-menu-movil:not([hidden]) { display: block; }
  .contenido { padding-top: 4.2rem; }
}

/* ============ TABLERO DE PRODUCCION (Kanban) ============ */
.tablero-columnas {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}
.tablero-columnas[hidden] { display: none; }
.tablero-col {
  flex: 0 0 260px;
  background: #F4F2EC;
  border-radius: 8px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
}
.tablero-col-titulo {
  font-family: var(--fuente-titulo);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tinta);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tablero-col-contador {
  background: #fff;
  border-radius: 100px;
  font-size: 0.72rem;
  padding: 0.1rem 0.5rem;
  color: var(--texto-tenue);
}
.tablero-tarjetas {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.tablero-tarjeta {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 6px;
  padding: 0.7rem 0.8rem;
}
.tablero-tarjeta-folio {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--tinta);
}
.tablero-tarjeta-cliente {
  font-size: 0.78rem;
  color: var(--texto-tenue);
  margin-top: 0.1rem;
}
.tablero-tarjeta-items {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--texto);
  line-height: 1.4;
}
.tablero-tarjeta-prioridad {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 100px;
  margin-top: 0.4rem;
  background: var(--rojo-fondo);
  color: var(--rojo);
}
.tablero-tarjeta-avanzar {
  margin-top: 0.6rem;
  width: 100%;
  font-size: 0.78rem;
  padding: 0.4rem 0.5rem;
}
.tablero-vacio-col {
  font-size: 0.75rem;
  color: var(--texto-tenue);
  text-align: center;
  padding: 1rem 0;
}

@media (max-width: 720px) {
  .tablero-col { flex: 0 0 220px; }
}


/* ============ TABLERO DE PRODUCCION (lista con prioridad) ============ */
.tablero-lista[hidden] { display: none; }
.tablero-lista { display: flex; flex-direction: column; gap: 0.6rem; }

.tablero-fila {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
}
.tablero-fila-flechas {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-shrink: 0;
}
.tablero-flecha {
  width: 26px; height: 22px;
  border: 1px solid var(--linea);
  background: #F5F4F1;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  color: var(--texto-tenue);
}
.tablero-flecha:hover:not(:disabled) { background: #EAE8E2; color: var(--tinta); }
.tablero-flecha:disabled { opacity: 0.3; cursor: default; }

.tablero-fila-cuerpo { flex: 1; min-width: 0; }
.tablero-fila-encabezado { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.tablero-fila-folio {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--tinta);
}
.tablero-fila-cliente { font-size: 0.78rem; color: var(--texto-tenue); margin-top: 0.1rem; }
.tablero-fila-items {
  font-size: 0.75rem;
  color: var(--texto);
  margin-top: 0.25rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tablero-fila-derecha {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.tablero-etapa-badge {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 0.75rem;
  background: var(--ambar-fondo);
  color: var(--oxido-oscuro);
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
}
.tablero-btn-avanzar { font-size: 0.75rem; white-space: nowrap; }

@media (max-width: 620px) {
  .tablero-fila { flex-wrap: wrap; }
  .tablero-fila-cuerpo { flex-basis: 100%; order: 2; margin-top: 0.4rem; }
  .tablero-fila-derecha { order: 3; flex-basis: 100%; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 0.4rem; }
  .tablero-fila-flechas { order: 1; flex-direction: row; }
}


/* ============ LEYENDA Y BARRA DE PROGRESO DEL TABLERO ============ */
.tablero-leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  background: #F4F2EC;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.8rem;
  font-size: 0.72rem;
  color: var(--texto-tenue);
}
.tablero-leyenda-item strong { color: var(--tinta); }

.tablero-progreso {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.tablero-paso {
  font-size: 0.65rem;
  font-weight: 700;
  width: 26px; height: 20px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: #EDEEF0;
  color: #9AA0A6;
}
.tablero-paso-completo { background: var(--verde-fondo); color: var(--verde); }
.tablero-paso-actual { background: var(--ambar-fondo); color: var(--oxido-oscuro); outline: 2px solid var(--oxido); outline-offset: -1px; }
.tablero-paso-pendiente { background: #EDEEF0; color: #9AA0A6; }

@media (max-width: 620px) {
  .tablero-leyenda { font-size: 0.68rem; gap: 0.4rem 0.7rem; }
  .tablero-paso { width: 24px; height: 18px; font-size: 0.6rem; }
}


/* ============ LINEA SECUNDARIA DE RENGLON (Tela / Tipo de prenda) ============ */
.nc-item-fila-secundaria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.3rem;
  padding: 0 0.5rem 0.5rem;
}
.nc-item-fila-secundaria textarea {
  grid-column: 1 / -1;
  font-family: var(--fuente-cuerpo);
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--linea);
  border-radius: 4px;
  width: 100%;
  background: #fff;
  resize: vertical;
}
.mvc-item-descripcion { font-size: 0.75rem; color: var(--texto-tenue); margin-top: 0.15rem; line-height: 1.35; }
.nc-item-fila-secundaria input {
  font-family: var(--fuente-cuerpo);
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--linea);
  border-radius: 4px;
  width: 100%;
  background: #fff;
}
@media (max-width: 620px) {
  .nc-item-fila-secundaria { grid-template-columns: 1fr; }
}
.dash-semanas-menu {
  position: absolute;
  top: 110%;
  left: 0;
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 8px;
  padding: 0.6rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 50;
  min-width: 220px;
}
.dash-semanas-menu label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.2rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.dash-semanas-menu[hidden] { display: none; }

/* ===== Rediseño Dashboard profesional ===== */
.dash-seccion { margin-bottom: 1.6rem; }
.dash-seccion .dash-seccion-titulo { margin-top: 0; margin-bottom: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }

.dash-sec-ventas { --dash-accent: #0F0F0F; }
.dash-sec-flujo { --dash-accent: #440418; }
.dash-sec-produccion { --dash-accent: #F20A37; }
.dash-sec-desempeno { --dash-accent: #2E7D32; }
.dash-sec-semana { --dash-accent: #EA9368; }


.dash-sec-produccion .dash-barra-relleno { background: var(--dash-accent, var(--oxido)); }

@media (max-width: 640px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .stat-card { padding: 0.75rem 0.85rem; }
  .stat-valor { font-size: 1.4rem; }
  .stat-etiqueta { font-size: 0.66rem; }
  .dash-barra-fila { grid-template-columns: 90px 1fr 32px; gap: 0.5rem; }
}

/* ===== Busqueda global ===== */
.btn-buscar-global-fijo {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0.9rem; right: 0.9rem;
  left: auto;
  z-index: 60;
  width: 42px; height: 42px;
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 6px;
  font-size: 1.2rem;
  cursor: pointer;
}
.bg-grupo { margin-bottom: 1rem; }
.bg-grupo-titulo { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-tenue); font-weight: 600; margin-bottom: 0.4rem; }
.bg-item { padding: 0.55rem 0.6rem; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; }
.bg-item:hover { background: #F4F2EC; }
.bg-item-titulo { font-size: 0.85rem; font-weight: 600; color: var(--tinta); }
.bg-item-sub { font-size: 0.75rem; color: var(--texto-tenue); }
.bg-vacio { font-size: 0.82rem; color: var(--texto-tenue); text-align: center; padding: 1.2rem 0; }

/* ===== Panel de Configuracion ===== */
.config-tarjeta { padding: 1.2rem 1.4rem; }
.config-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1.4rem; }
.config-campo { display: flex; flex-direction: column; gap: 0.3rem; }
.config-campo-ancho { grid-column: 1 / -1; }
.config-label { font-size: 0.82rem; font-weight: 600; color: var(--tinta); }
.config-ayuda { font-size: 0.72rem; color: var(--texto-tenue); }
.config-input {
  font-family: var(--fuente-cuerpo);
  font-size: 0.9rem;
  height: 40px;
  box-sizing: border-box;
  padding: 0 0.75rem;
  border: 1px solid var(--linea);
  border-radius: 6px;
  background: #fff;
  color: var(--texto);
  outline: none;
  width: 100%;
}
.config-input:focus { border-color: var(--oxido); box-shadow: 0 0 0 3px rgba(201,122,61,0.12); }
.config-guardar-barra { display: flex; align-items: center; gap: 1rem; margin-top: 0.4rem; }
@media (max-width: 640px) {
  .config-grid { grid-template-columns: 1fr; }
}

/* ===== Sistema de notificaciones (toast + confirmacion) ===== */
.toast-contenedor {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 340px;
}
.toast {
  background: #fff;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  border-left: 4px solid var(--oxido);
  font-size: 0.85rem;
  color: var(--texto);
  animation: toast-entrada 0.2s ease;
}
.toast-exito { border-left-color: #2E7D32; }
.toast-error { border-left-color: #B00020; }
.toast-info { border-left-color: var(--oxido); }
.toast { display: flex; align-items: center; gap: 0.8rem; }
.toast-accion { margin-left: auto; flex-shrink: 0; background: none; border: 1px solid var(--marca-rojo, #F20A37); color: var(--marca-rojo, #F20A37); border-radius: 6px; padding: 0.3rem 0.6rem; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.toast-accion:hover { background: var(--marca-rojo, #F20A37); color: #fff; }
textarea.config-input { resize: vertical; font-family: inherit; line-height: 1.4; }
@keyframes toast-entrada {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.modal-caja-chica { max-width: 380px; }
.mc-mensaje { font-size: 0.92rem; color: var(--texto); line-height: 1.5; white-space: pre-line; }

/* ===== Calendario de entregas ===== */
.cal-mes-titulo { font-family: var(--fuente-titulo); font-weight: 700; font-size: 1rem; min-width: 160px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; }
.cal-dia-header { font-size: 0.72rem; font-weight: 600; color: var(--texto-tenue); text-transform: uppercase; text-align: center; padding-bottom: 0.3rem; }
.cal-celda {
  position: relative;
  background: #F4F2EC;
  border-radius: 8px;
  min-height: 64px;
  padding: 0.5rem;
}
.cal-celda-vacia { background: transparent; }
.cal-celda-con-pedidos { background: #fff; border: 1px solid var(--linea); cursor: pointer; transition: box-shadow 0.15s ease; }
.cal-celda-con-pedidos:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.cal-celda-numero { font-size: 0.82rem; font-weight: 600; color: var(--tinta); }
.cal-celda-badge {
  position: absolute;
  bottom: 0.4rem;
  right: 0.4rem;
  background: var(--oxido);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 100px;
  padding: 0.1rem 0.5rem;
}
.cal-celda-badge-express { background: #7B3FA0; }
.cal-detalle-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--linea);
  cursor: pointer;
  font-size: 0.85rem;
}
.cal-detalle-fila:last-child { border-bottom: none; }
.cal-express-tag { font-size: 0.7rem; font-weight: 700; color: #7B3FA0; }
@media (max-width: 640px) {
  .cal-grid { gap: 0.3rem; }
  .cal-celda { min-height: 48px; padding: 0.3rem; }
  .cal-dia-header { font-size: 0.6rem; }
}

/* ===== Vista de estacion de trabajo ===== */
.et-scrap-fila { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.4rem; padding: 0.45rem 0.7rem; border: 1px solid var(--linea); border-radius: 6px; font-size: 0.88rem; background: #FFF7F5; }
.et-reportadas { margin-bottom: 0.8rem; }
.et-reportada-fila { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.4rem; padding: 0.45rem 0.7rem; border: 1px solid var(--linea); border-left: 4px solid var(--marca-rojo, #C8102E); border-radius: 6px; font-size: 0.88rem; background: #fff; }
.et-reportada-botones { display: flex; gap: 0.8rem; flex-shrink: 0; }
.et-quitar-rep { color: var(--marca-rojo, #C8102E); }
.et-dano-editando { margin: 0 0 0.5rem; font-weight: 600; font-size: 0.9rem; }
.et-scrap-quitar { background: none; border: none; color: var(--rojo, #B00020); font-size: 1.1rem; cursor: pointer; }

/* Pieza danada por parte (lib/estructuraPrenda.js) */
.et-dano { margin-top: 0.6rem; padding: 0.8rem; border: 1px solid var(--linea); border-radius: 8px; background: var(--papel); }
.et-dano-prendas { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.btn-chip { background: var(--papel); border: 1px solid var(--linea); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.85rem; cursor: pointer; color: var(--tinta); }
.btn-chip.activo { border-color: var(--marca-rojo); color: var(--marca-rojo); background: #FFF0F3; }
.et-dano-figura, .rep-figura { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.estructura-vista { margin: 0; text-align: center; }
.estructura-vista figcaption { font-size: 0.78rem; color: var(--texto-tenue); }
.estructura-svg { width: 170px; height: auto; display: block; }
.rep-figura .estructura-svg { width: 90px; }
.estructura-svg polygon { fill: #FFFFFF; stroke: #6B7178; stroke-width: 1.2; stroke-linejoin: round; }
.estructura-interactiva polygon { cursor: pointer; transition: fill 0.15s; }
.estructura-interactiva polygon:hover { fill: #E6F1FB; }
.estructura-svg polygon.sel { fill: #FCD9DF; stroke: var(--marca-rojo); stroke-width: 2; }
.et-dano-estado { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; font-size: 0.88rem; }
.et-dano-campos { display: grid; grid-template-columns: 110px 90px minmax(0, 1fr); gap: 0.6rem; }
.et-dano-botones { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.6rem; }
.rep-parte { font-size: 0.9rem; margin-top: 0.2rem; }
@media (max-width: 640px) {
  .et-dano-campos { grid-template-columns: 1fr 1fr; }
  .et-dano-nota { grid-column: 1 / -1; }
  .estructura-svg { width: 140px; }
}

.nc-item-agregar-talla {
  background: none;
  border: 1px solid var(--linea);
  border-radius: 4px;
  color: var(--oxido);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
}
.nc-item-agregar-talla:hover { background: rgba(201,122,61,0.08); }
.nc-item-nombre-continuacion { min-height: 1px; }
@media (max-width: 640px) {
  .nc-item-agregar-talla { grid-column: 1 / -1; justify-self: start; }
}

/* ===== Hoja formal de impresion de pedido ===== */
.panel-impresion {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  font-family: var(--fuente-cuerpo);
  color: #1a1a1a;
}
.pi-encabezado { display: flex; align-items: center; gap: 1rem; border-bottom: 2px solid var(--oxido); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.pi-logo { max-height: 60px; max-width: 160px; object-fit: contain; }
.pi-empresa-nombre { font-family: var(--fuente-titulo); font-weight: 700; font-size: 1.2rem; }
.pi-empresa-dato { font-size: 0.82rem; color: #555; }
.pi-titulo { font-family: var(--fuente-titulo); font-size: 1.4rem; margin: 0 0 1rem; }
.pi-datos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.5rem; font-size: 0.9rem; margin-bottom: 1.4rem; }
.pi-tabla { width: 100%; border-collapse: collapse; margin-bottom: 0.6rem; font-size: 0.78rem; }
.pi-tabla th, .pi-tabla td { border: 1px solid #ccc; padding: 0.2rem 0.35rem; text-align: left; }
.pi-tabla th { background: #f4f2ec; }
.pi-totales { margin-left: auto; width: 280px; font-size: 0.92rem; margin-bottom: 1.4rem; }
.pi-totales div { display: flex; justify-content: space-between; padding: 0.3rem 0; border-bottom: 1px solid #eee; }
.pi-totales .pi-saldo strong { color: var(--oxido); }
.pi-notas { font-size: 0.82rem; color: #444; margin-bottom: 2rem; white-space: pre-line; }
.pi-firmas { display: flex; justify-content: space-between; margin-top: 3rem; gap: 2rem; }
.pi-firma { flex: 1; text-align: center; font-size: 0.82rem; }
.pi-linea { border-top: 1px solid #333; margin-bottom: 0.4rem; height: 40px; }

@media print {
  .panel-impresion { max-width: 100%; padding: 0; }
}
.pi-leyenda-ot { margin-top: 0.8rem; padding: 0.7rem 0.9rem; background: #FFF3E0; border: 1px solid #E65100; border-radius: 6px; font-size: 0.78rem; color: #5C3A00; line-height: 1.4; }
.pi-producto-bloque { margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--linea); page-break-inside: avoid; }
.pi-producto-bloque:last-child { border-bottom: none; }
.pi-producto-nombre { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.1rem; }
.pi-producto-specs { font-size: 0.68rem; color: var(--texto-tenue); margin-bottom: 0.25rem; }
.sin-seleccion th:first-child, .sin-seleccion td:first-child { display: none; }
.sin-seleccion th:nth-child(7), .sin-seleccion td:nth-child(7) { display: none; }
.tablero-tarjeta-antiguedad { font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 10px; display: inline-block; margin-top: 0.4rem; }
.tablero-tarjeta-antiguedad-ok { background: #E8F5E9; color: #2E7D32; }
.tablero-tarjeta-antiguedad-media { background: #FFF3E0; color: #E65100; }
.tablero-tarjeta-antiguedad-alta { background: #FBEAEA; color: #B00020; }
.tablero-col-contador-alerta { background: #FBEAEA !important; color: #B00020 !important; }
.tablero-tarjeta { border-left: 4px solid #D8D5CD; }
.tablero-tarjeta-borde-ok { border-left-color: #2E7D32; }
.tablero-tarjeta-borde-media { border-left-color: #E65100; }
.tablero-tarjeta-borde-alta { border-left-color: #B00020; }
.tablero-tarjeta-folio { font-size: 1rem; font-weight: 700; color: var(--oxido); }
.tablero-col-piezas { font-size: 0.72rem; color: var(--texto-tenue); font-weight: 400; margin-left: 0.3rem; }

/* ===== Paleta de marca GTR of Mexico: Blanco #EAE5E1, Naranja #EA9368, Rojo #F20A37, Burgundy #440418, Negro #0F0F0F ===== */
:root { --marca-blanco: #EAE5E1; --marca-naranja: #EA9368; --marca-rojo: #F20A37; --marca-burgundy: #440418; --marca-negro: #0F0F0F; }
.sidebar { background: var(--marca-negro); border-right: 1px solid #262626; }
.sidebar .sidebar-marca { border-bottom: 1px solid #262626; }
.sidebar .sidebar-marca-nombre { color: var(--marca-blanco); font-weight: 700; }
.sidebar .sidebar-marca-sub { color: #A8A29E; }
.sidebar .nav-item { color: #D6D0CB; border-radius: 8px; transition: background 0.15s ease, color 0.15s ease; }
.sidebar .nav-item:hover { background: rgba(234, 229, 225, 0.08); color: #FFFFFF; }
.sidebar .nav-item.nav-item-activo { background: var(--marca-rojo); color: #FFFFFF; font-weight: 600; }

/* Grupos del menu lateral (Ventas, Produccion, ...): titulo que pliega/despliega */
.sidebar .sidebar-nav { overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #3A3A3A transparent; }
.nav-grupo { display: flex; flex-direction: column; gap: 0.1rem; margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid #2E2E2E; }
.nav-grupo[hidden] { display: none; }
.nav-grupo-items { display: flex; flex-direction: column; gap: 0.1rem; }
.nav-grupo-plegado .nav-grupo-items { display: none; }
.nav-grupo-titulo {
  display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--fuente-cuerpo); font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #FFFFFF; padding: 0.3rem 0.6rem;
}
.nav-grupo-titulo::after { content: '▾'; font-size: 0.75rem; transition: transform 0.15s ease; }
.nav-grupo-plegado .nav-grupo-titulo::after { transform: rotate(-90deg); }
.nav-grupo-titulo:hover { color: #FFB3C1; }
.nav-grupo-items { margin-left: 0.6rem; padding-left: 0.3rem; border-left: 1px solid #3A3A3A; }
.sidebar .nav-grupo-items .nav-item { padding-left: 0.6rem; color: #B5AFAA; font-weight: 400; }
.sidebar .nav-grupo-items .nav-item:hover { color: #FFFFFF; }
.sidebar .nav-grupo-items .nav-item.nav-item-activo { color: #FFFFFF; font-weight: 600; }
/* Favoritos del menu: estrella en cada opcion y vista de solo favoritos */
.nav-fila { position: relative; display: flex; }
.nav-fila:has(> .nav-item[hidden]) { display: none; }
.nav-fila .nav-item { flex: 1; min-width: 0; padding-right: 1.8rem; }
.nav-fav { position: absolute; top: 50%; right: 0.2rem; transform: translateY(-50%); width: 1.5rem; height: 1.5rem; padding: 0; border: none; border-radius: 6px; background: none; color: #B5AFAA; font-size: 0.95rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity 0.1s ease; }
.nav-fila:hover .nav-fav, .nav-fav:focus-visible, .nav-fav-marcada { opacity: 1; }
.nav-fav:hover { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }
.nav-fav-marcada, .nav-fav-marcada:hover { color: #F5B942; }
.nav-item-activo + .nav-fav { color: #FFFFFF; }
@media (hover: none) { .nav-fav { opacity: 0.7; } .nav-fav-marcada { opacity: 1; } }
.nav-modos { display: flex; gap: 0.2rem; padding: 0.2rem; margin-bottom: 0.7rem; border-radius: 8px; background: #1F1F1F; flex-shrink: 0; }
.nav-modos[hidden] { display: none; }
.nav-modo { flex: 1; min-width: 0; padding: 0.35rem 0.2rem; border: none; border-radius: 6px; background: none; color: #B5AFAA; font-family: var(--fuente-cuerpo); font-size: 0.74rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.nav-modo:hover { color: #FFFFFF; }
.nav-modo-activo, .nav-modo-activo:hover { background: #3A3A3A; color: #FFFFFF; }
.nav-fav-vacio { margin: 0 0 0.7rem; padding: 0 0.3rem; color: #B5AFAA; font-size: 0.8rem; line-height: 1.4; }
.nav-fav-vacio[hidden] { display: none; }
.nav-fav-vacio strong { color: #FFFFFF; }
.nav-solo-favoritos .nav-grupo { margin-top: 0; padding-top: 0; border-top: none; }
.nav-solo-favoritos .nav-grupo-titulo, .nav-solo-favoritos .nav-fila-sin-favorito, .nav-solo-favoritos .nav-grupo-sin-favorito { display: none; }
.nav-solo-favoritos .nav-grupo-plegado .nav-grupo-items { display: flex; }
.nav-solo-favoritos .nav-grupo-items { margin-left: 0; padding-left: 0; border-left: none; }
.sidebar .nav-solo-favoritos .nav-grupo-items .nav-item { color: #D6D0CB; font-weight: 500; }
.sidebar .nav-solo-favoritos .nav-grupo-items .nav-item.nav-item-activo { color: #FFFFFF; font-weight: 600; }
.nav-contador {
  display: inline-block; margin-left: 0.45rem; min-width: 1.2rem; padding: 0 0.35rem;
  border-radius: 999px; background: var(--marca-naranja); color: #FFFFFF;
  font-size: 0.68rem; font-weight: 700; line-height: 1.2rem; text-align: center; vertical-align: middle;
}
.nav-contador[hidden] { display: none; }
.sidebar-nav-plano .nav-grupo { margin-top: 0; padding-top: 0; border-top: none; }
.sidebar-nav-plano .nav-grupo-items { margin-left: 0; padding-left: 0; border-left: none; }
.sidebar-nav-plano .nav-fav { display: none; }
.sidebar-nav-plano .nav-fila .nav-item { padding-right: 0.6rem; }
.sidebar-nav-plano .nav-grupo-titulo { display: none; }
.sidebar-nav-plano .nav-grupo-plegado .nav-grupo-items { display: flex; }
.sidebar-nav-plano .nav-grupo-items .nav-item { padding-left: 0.6rem; }
.sidebar .sidebar-usuario { border-top: 1px solid #262626; }
.sidebar .usuario-nombre { color: var(--marca-blanco); }
.sidebar .sidebar-usuario-accion { color: #A8A29E; }
.sidebar .sidebar-usuario-accion:hover { color: #FFFFFF; }
.sidebar #btn-salir { color: var(--marca-naranja); }
.sidebar #btn-salir:hover { color: #F5B393; }
.sidebar .sidebar-logo { display: block; width: 100%; max-width: 140px; height: auto; }
.sidebar .sidebar-marca { padding-top: 1.2rem; padding-bottom: 1.2rem; }
.sidebar .sidebar-logo { max-width: 150px; }
.login-logo { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto 0.6rem; }
.login-marca { text-align: center; } .login-marca-sub { display: block; text-align: center; }
.detalle-tabs-nav { display: flex; gap: 0.4rem; border-bottom: 2px solid var(--linea); margin-bottom: 1.2rem; flex-wrap: wrap; }
.detalle-tab-btn { background: none; border: none; padding: 0.7rem 1rem; font-size: 0.88rem; font-weight: 500; color: var(--texto-tenue); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s ease, border-color 0.15s ease; }
.detalle-tab-btn:hover { color: var(--texto); }
.detalle-tab-btn.detalle-tab-btn-activo { color: var(--oxido); border-bottom-color: var(--oxido); font-weight: 600; }
.detalle-tab-panel[hidden] { display: none; }
.acciones-lista { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.7rem; }
.dash-resumen-ejecutivo { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.dash-kpi-grande { background: var(--papel-tarjeta); border: 1px solid var(--linea); border-radius: 10px; padding: 1.6rem 1.8rem; }
.dash-kpi-principal { border-color: var(--oxido); border-width: 2px; position: relative; }
.dash-kpi-etiqueta { font-size: 0.78rem; color: var(--texto-tenue); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.dash-kpi-valor { font-family: var(--fuente-titulo); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; color: var(--tinta); margin-top: 0.4rem; font-variant-numeric: tabular-nums; }
.dash-sparkline { width: 100%; height: 40px; margin-top: 0.8rem; display: block; }
@media (max-width: 640px) { .dash-resumen-ejecutivo { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 641px) {
  .dash-grid-ventas { grid-template-columns: repeat(3, 1fr); }
  .dash-grid-ventas > :last-child:nth-child(3n+1) { grid-column: 1 / -1; }
}

/* ===== Estados y seguimiento de cotizaciones ===== */
.btn-chico { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.seguimiento-texto { font-size: 0.8rem; color: var(--texto-tenue); }
.seguimiento-alerta { font-size: 0.8rem; font-weight: 600; color: #B45309; background: #FFF4E5; padding: 0.15rem 0.45rem; border-radius: 4px; display: inline-block; }
.mvc-estado { border: 1px solid var(--linea); border-radius: 8px; padding: 0.8rem 1rem; margin-bottom: 1rem; background: #FAF8F6; }
.mvc-estado-cabecera { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.mvc-linea { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.25rem; font-size: 0.82rem; color: var(--texto-tenue); }
.mvc-linea li::before { content: '○'; margin-right: 0.45rem; }
.mvc-linea li.hecho { color: var(--texto); }
.mvc-linea li.hecho::before { content: '●'; color: #2E7D32; }
.mvc-linea li.cerrada::before { color: #B00020; }
.mvc-estado-acciones { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ---- Configuracion: pestañas y matriz de permisos ---- */
.config-tab-btn { background: none; border: none; padding: 0.7rem 1rem; font-size: 0.88rem; font-weight: 500; color: var(--texto-tenue); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.config-tab-btn:hover { color: var(--texto); }
.config-tab-btn.config-tab-btn-activo { color: var(--oxido); border-bottom-color: var(--oxido); font-weight: 600; }
.tabla-permisos th { font-size: 0.72rem; text-align: center; vertical-align: bottom; }
.tabla-permisos th.tp-grupo { border-bottom: none; color: var(--texto-tenue); font-weight: 500; }
.tabla-permisos td { text-align: center; }
.tabla-permisos td:first-child, .tabla-permisos th:first-child { text-align: left; white-space: nowrap; }
.tabla-permisos tr.tp-director td { color: var(--texto-tenue); }
.tabla-historial-config td { vertical-align: top; }
.tabla-historial-config .tabla-historial-fecha { white-space: nowrap; }
.cfg-historial-paginas { display: flex; align-items: center; justify-content: flex-end; gap: 0.8rem; margin-top: 0.8rem; }
.tp-nuevo { font-size: 0.65rem; background: #FFF3E0; color: #E65100; border-radius: 8px; padding: 0.05rem 0.4rem; margin-left: 0.3rem; }

/* ---- Tablero: tarjeta clicable y acciones ---- */
.tablero-tarjeta-abrible { cursor: pointer; }
.tablero-tarjeta-abrible:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.tablero-tarjeta-acciones { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }

/* ---- Entregas ---- */
.ment-saldo { background: #FFF3E0; color: #8A3C00; border-radius: 8px; padding: 0.6rem 0.8rem; margin-bottom: 0.8rem; font-size: 0.85rem; }
.ment-saldo p { margin: 0 0 0.4rem; }
.ment-saldo-bloqueado { background: #FBEAEA; color: #B00020; }
.ment-saldo-check { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; }
.detalle-entrega { font-size: 0.85rem; color: var(--texto-tenue); margin-top: 0.5rem; }
.saldo-pendiente { color: #B00020; font-weight: 600; }

/* ---- Descripcion del producto (detalle, estacion e impresos) ---- */
.pp-descripcion { font-size: 0.82rem; margin: 0 0 0.6rem; white-space: pre-line; }
.et-descripcion { font-size: 0.85rem; margin-top: 0.7rem; white-space: pre-line; }
.et-descripcion strong { display: block; }
/* Estacion: cada prenda con sus especificaciones, tallas y desglose (lo mismo que la OT impresa) */
.et-prenda { border-top: 1px solid var(--linea); padding-top: 0.8rem; margin-top: 0.8rem; }
.et-prenda:first-child { border-top: none; padding-top: 0; margin-top: 0.4rem; }
.et-prenda-titulo { display: flex; justify-content: space-between; gap: 0.8rem; font-size: 1rem; margin: 0 0 0.5rem; }
.et-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.35rem 1rem; margin: 0; }
.et-specs div { min-width: 0; }
.et-specs dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--texto-tenue); }
.et-specs dd { margin: 0; font-size: 0.92rem; font-weight: 600; overflow-wrap: anywhere; }
.et-tallas { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0.7rem 0 0.4rem; font-size: 0.9rem; }
.et-tallas b { margin-right: 0.25rem; }
.et-reposiciones { margin: 0 0 0.7rem; padding: 0.5rem 0.7rem; border-radius: var(--radio-chico); background: var(--ambar-fondo); color: var(--oxido-oscuro); font-size: 0.88rem; }
.et-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.et-botones-ot { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* La OT en pantalla (Ver OT): la hoja encima de todo, con su barra de Imprimir y Cerrar */
#panel-impresion-ot.ot-en-pantalla { position: fixed; inset: 0; z-index: 2000; overflow: auto; max-width: none; background: #fff; padding: 1rem max(1rem, calc((100vw - 820px) / 2)) 2rem; }
.ot-barra { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.5rem 0; margin-bottom: 0.5rem; background: #fff; border-bottom: 1px solid var(--linea); }
/* Pantalla de la estacion (11 nov 2026): encabezado con la entrega, Diseño y "Qué se trabaja" lado a lado, botones fijos abajo */
.et-cabecera { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.8rem; }
.et-cabecera .panel-titulo { margin: 0; }
.et-cabecera .panel-subtitulo { margin: 0.15rem 0 0; }
.et-entrega { margin: 0.4rem 0 0; font-size: 0.95rem; }
.et-entrega b { font-weight: 600; }
.et-entrega-urgente { color: var(--marca-rojo); }
.et-etiqueta-express { display: inline-block; padding: 0 0.45rem; border-radius: 999px; background: var(--marca-rojo); color: #fff; font-size: 0.78rem; font-weight: 600; text-transform: capitalize; }
.et-avance-ot { margin: 0.8rem 0; }
.et-avance-ot .config-ayuda { margin: 0.35rem 0 0; }
#et-alertas:empty { display: none; }
#et-alertas { margin-bottom: 0.8rem; }
.et-columnas { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; align-items: start; }
.et-columnas > .tarjeta { margin: 0; }
@media (max-width: 900px) { .et-columnas { grid-template-columns: minmax(0, 1fr); } }
.et-col-diseno .et-links { margin-top: 0.8rem; gap: 0.5rem; }
.et-cuadro-tallas { margin: 0.8rem 0 0.4rem; text-align: center; }
.et-cuadro-tallas th, .et-cuadro-tallas td { text-align: center; padding: 0.35rem 0.5rem; }
.et-cuadro-tallas th:first-child, .et-cuadro-tallas td:first-child { text-align: left; }
.et-cuadro-tallas td { font-size: 1rem; }
.et-cuadro-tallas tfoot td { font-weight: 600; border-top: 2px solid var(--linea); }
.et-desglose { margin-top: 0.6rem; }
.et-desglose summary { cursor: pointer; font-size: 0.9rem; color: var(--texto-tenue); padding: 0.3rem 0; }
.et-rollos-titulo { font-size: 0.95rem; margin: 1rem 0 0.4rem; }
.et-botones-fijos { position: sticky; bottom: 0; z-index: 5; background: var(--papel); padding: 0.7rem 0; border-top: 1px solid var(--linea); }
.et-diseno-galeria { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.4rem; }
.et-diseno-galeria:empty { display: none; }
.et-diseno-img { display: flex; flex-direction: column; gap: 0.3rem; width: 140px; color: var(--texto); text-decoration: none; font-size: 0.85rem; }
.et-diseno-img img, .et-diseno-archivo { width: 140px; height: 140px; object-fit: contain; border-radius: var(--radio-chico); border: 1px solid var(--linea); background: var(--papel); }
.et-diseno-img.et-diseno-principal { width: 100%; }
.et-diseno-img.et-diseno-principal img { width: 100%; height: auto; max-height: 420px; }
.et-diseno-archivo { display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.et-diseno-img:hover img { border-color: var(--tinta); }
.ent-abrir { white-space: nowrap; }
#modal-entrega .campo { display: block; margin-bottom: 0.8rem; }
#modal-entrega .campo input { width: 100%; }

/* ---- Filtros avanzados (Pedidos y Cotizaciones) ---- */
.fav-panel { margin: 0 0 0.8rem; padding: 1rem; }
.fav-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem 0.9rem; }
.fav-grid .campo { margin: 0; }
.fav-grid input, .fav-grid select { width: 100%; }
.fav-check { align-self: end; padding-bottom: 0.4rem; }
.fav-estados { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.3rem; }
.fav-acciones { display: flex; justify-content: flex-end; gap: 0.8rem; margin-top: 0.8rem; }
.fav-estado-lista { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0 0 0.6rem; }
.fav-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fav-chips[hidden] { display: none; }
.fav-chip { background: #E6F1FB; color: #0C447C; border: none; border-radius: 12px; padding: 0.25rem 0.6rem; font-size: 0.78rem; cursor: pointer; }
.fav-chip:hover { background: #B5D4F4; }
.fav-resumen { font-size: 0.82rem; color: var(--texto-tenue); }
.fav-grid .filtro-input, .fav-grid .filtro-select { flex: none; min-width: 0; }
.fav-check { flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.5rem; }

/* ---- Dashboard por rol ---- */
.dash-controles { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.dash-controles .filtro-input, .dash-controles .filtro-select { flex: none; min-width: 0; }
.dash-seccion-nota { font-size: 0.8rem; font-weight: 400; color: var(--texto-tenue); }
.dash-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.dash-kpi-card { display: flex; flex-direction: column; gap: 0.25rem; text-align: left; background: var(--papel-tarjeta); border: 1px solid var(--linea); border-radius: 10px; padding: 0.9rem 1rem; cursor: pointer; font: inherit; color: inherit; }
.dash-kpi-card:hover { border-color: var(--oxido); }
.dash-kpi-card:disabled { cursor: default; }
.dash-kpi-card:disabled:hover { border-color: var(--linea); }
.dash-kpi-card-titulo { font-size: 0.78rem; color: var(--texto-tenue); font-weight: 500; }
.dash-kpi-card-valor { font-size: 1.45rem; font-weight: 700; }
.dash-kpi-card-nota { font-size: 0.75rem; color: var(--texto-tenue); }
.dash-kpi-aviso { background: #FFF3E0; border-color: #F5C08A; }
.dash-kpi-aviso .dash-kpi-card-valor { color: #B45309; }
.dash-kpi-peligro { background: #FBEAEA; border-color: #EBA3A3; }
.dash-kpi-peligro .dash-kpi-card-valor { color: #B00020; }
.dash-barras-tarjeta { margin-bottom: 0.8rem; }
.dash-tablas { margin-bottom: 1rem; }
.dash-tablas-tabs { display: flex; flex-wrap: wrap; gap: 0.3rem; border-bottom: 2px solid var(--linea); margin-bottom: 0.6rem; }
.dash-tabla[hidden] { display: none; }
.dash-tabla .btn-texto { margin-top: 0.5rem; }

/* Importado del sistema anterior (lista y detalle de pedidos y cotizaciones) */
.etiqueta-origen { display: inline-block; margin-left: 0.4rem; padding: 0.1rem 0.45rem; border-radius: 10px; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.02em; vertical-align: middle; white-space: nowrap; background: #ECEAE4; color: #5F5A50; border: 1px solid #D8D4CA; }

/* Configuracion > dias inhabiles y mensajes; modal de mensajes al cliente */
.cfg-inhabil-form { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.cfg-inhabil-form input[type="date"] { width: auto; }
.cfg-inhabil-form input[type="text"] { flex: 1; min-width: 180px; }
.cfg-plantilla { margin-bottom: 1rem; }
.cfg-plantilla-encabezado { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.cfg-plantilla-titulo { font-size: 1rem; margin: 0; }
.cfg-plantilla-chip { font-size: 0.72rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: #EDEEF0; color: #4B5157; }
.cfg-plantilla-chip-aprobada { background: var(--verde-fondo); color: var(--verde); }
.cfg-plantilla-chip-rechazada, .cfg-plantilla-chip-pendiente { background: var(--rojo-fondo); color: var(--rojo); }
.cfg-plantilla-chip-enviada { background: var(--ambar-fondo); color: var(--oxido-oscuro); }
.cfg-pl-meta-texto, .mmsg-texto { white-space: pre-line; overflow-wrap: anywhere; font-size: 0.85rem; background: #F7F6F3; border: 1px solid var(--linea); border-radius: var(--radio-chico); padding: 0.6rem 0.8rem; }
.cfg-pl-avisos { margin: 0; padding-left: 1.2rem; color: var(--rojo); font-size: 0.8rem; }
.mmsg-item { border-bottom: 1px solid var(--linea); padding: 0.8rem 0; }
.mmsg-item:first-child { padding-top: 0; }
.mmsg-acciones { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.6rem; }
#mmsg-aviso { color: var(--rojo); margin-top: 0; }
#modal-mensajes { z-index: 110; } /* se abre encima de la cotizacion o el pedido */
@media (max-width: 640px) { .cfg-inhabil-form input[type="date"] { width: 100%; } }

/* Promociones: Configuracion y partidas de la cotizacion */
.cfg-promo-titulo-fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
#cfg-promo-editor { margin-bottom: 1rem; }
.cfg-pr-casillas { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.cfg-pr-productos { display: flex; flex-direction: column; gap: 0.4rem; max-height: 320px; overflow-y: auto; }
.cfg-pr-producto { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.cfg-pr-producto .config-input { width: 120px; flex-shrink: 0; }
.cfg-promo-estado-vigente { background: var(--verde-fondo); color: var(--verde); }
.nc-r-promo-fila { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0.25rem; }
.nc-r-promo { width: 100%; }
.nc-r-promo-aviso { font-size: 0.74rem; color: var(--texto-tenue); }
.nc-r-promo-aviso.nc-r-promo-falta { color: var(--rojo); }
.mvc-item-promo { font-size: 0.75rem; color: var(--verde); margin-top: 0.15rem; line-height: 1.35; }
@media (max-width: 640px) { .cfg-pr-producto { flex-direction: column; align-items: stretch; } .cfg-pr-producto .config-input { width: 100%; } }

/* ============ CELULAR: listas como tarjetas, barra del detalle y franja de los botones fijos ============ */
@media (max-width: 720px) {
  /* Cada fila de una lista es una tarjeta; el titulo de la columna lo pone app.js en data-label */
  .tabla.tabla-tarjetas-movil { display: block; overflow: visible; border: none; background: transparent; border-radius: 0; }
  .tabla-tarjetas-movil thead { display: block; }
  .tabla-tarjetas-movil thead tr { display: flex; }
  .tabla-tarjetas-movil thead th { display: none; }
  /* La casilla "seleccionar todos" del encabezado se queda, con su texto */
  .tabla-tarjetas-movil thead th:has(input[type="checkbox"]) {
    display: flex; align-items: center; gap: 0.5rem; padding: 0 0 0.6rem; border: none; background: none;
    font-size: 0.85rem; font-weight: 400; color: var(--texto);
  }
  .tabla-tarjetas-movil thead th:has(input[type="checkbox"])::after { content: 'Seleccionar todos'; }
  .tabla-tarjetas-movil tbody { display: flex; flex-direction: column; gap: 0.6rem; }
  .tabla-tarjetas-movil tbody tr {
    display: block; position: relative; background: var(--papel-tarjeta);
    border: 1px solid var(--linea); border-radius: var(--radio); padding: 0.55rem 0.9rem;
  }
  .tabla-tarjetas-movil tbody tr:has(> td > input[type="checkbox"]) { padding-right: 2.8rem; }
  .tabla.tabla-tarjetas-movil tbody td {
    display: flex; justify-content: flex-end; align-items: baseline; gap: 0.35rem 1rem; flex-wrap: wrap;
    padding: 0.28rem 0; border: none; white-space: normal; text-align: right; font-size: 0.86rem; overflow-wrap: anywhere;
  }
  .tabla-tarjetas-movil tbody td::before {
    content: attr(data-label); flex-shrink: 0; text-align: left; font-size: 0.74rem; color: var(--texto-tenue);
    margin-right: auto; /* el titulo a la izquierda y los valores juntos a la derecha (ej. estatus + En riesgo) */
  }
  .tabla-tarjetas-movil tbody td[data-label=""]::before { content: none; }
  .tabla-tarjetas-movil tbody td[data-label=""] { justify-content: flex-start; text-align: left; }
  /* La casilla de cada fila, arriba a la derecha */
  .tabla.tabla-tarjetas-movil tbody td:has(> input[type="checkbox"]) { position: absolute; top: 0.6rem; right: 0.8rem; padding: 0; }
  /* Acciones en su propio renglon, al final */
  .tabla.tabla-tarjetas-movil tbody td[data-label="Acciones"] {
    justify-content: flex-start; margin-top: 0.35rem; padding-top: 0.5rem; border-top: 1px solid var(--linea);
  }
  .tabla-tarjetas-movil tbody td[data-label="Acciones"]::before { content: none; }
  /* La foto del catalogo va sola, sin etiqueta */
  .tabla.tabla-tarjetas-movil tbody td[data-label="Foto"] { justify-content: flex-start; }
  .tabla-tarjetas-movil tbody td[data-label="Foto"]::before { content: none; }
  .tabla-tarjetas-movil + .paginacion, .tabla-scroll:has(> .tabla-tarjetas-movil) { overflow: visible; }

  /* Ver cotizacion: la X siempre arriba a la derecha y los botones (Mensajes, Compartir, PDF) en su propio
     renglon debajo del titulo, repartidos a lo ancho */
  #modal-ver-cotizacion .modal-encabezado { position: relative; flex-wrap: wrap; gap: 0.7rem; }
  #modal-ver-cotizacion .modal-encabezado .modal-titulo { padding-right: 2.6rem; }
  #modal-ver-cotizacion .modal-encabezado > div { width: 100%; flex-wrap: wrap; gap: 0.5rem !important; }
  #modal-ver-cotizacion .modal-encabezado > div .btn { flex: 1 1 0; min-width: 0; padding: 0.55rem 0.6rem; font-size: 0.85rem; white-space: nowrap; }
  #mvc-cerrar { position: absolute; top: 0.75rem; right: 0.8rem; font-size: 1.3rem; padding: 0.3rem 0.5rem; }
  /* Texto que en el celular sobra (ej. "Descargar" en "Descargar PDF") */
  .solo-escritorio { display: none; }

  /* Detalle del pedido: los botones de arriba bajan de renglon en vez de salirse de la pantalla */
  .detalle-toolbar > div { flex-wrap: wrap; }

  /* Franja fija detras de los botones de menu y busqueda: el contenido pasa por debajo y no se encima */
  .app-shell::before {
    content: ''; position: fixed; top: 0; left: 0; right: 0; height: 3.75rem; z-index: 39;
    background: var(--papel); border-bottom: 1px solid var(--linea);
  }
}

/* Marcas de aviso junto al estatus: cotizacion vencida, pedido en riesgo o atrasado */
.marca-aviso { display: inline-block; margin-left: 0.35rem; padding: 0.1rem 0.45rem; border-radius: 10px; font-size: 0.68rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.marca-vencida, .marca-riesgo { background: var(--ambar-fondo); color: var(--oxido-oscuro); }
.marca-atrasado { background: var(--rojo-fondo); color: var(--rojo); }
.mvc-vencida { color: var(--oxido-oscuro); font-weight: 600; }

/* Lista (carpeta) del catalogo: etiqueta junto al nombre y filtros del selector de la cotizacion */
.etiqueta-lista { display: inline-block; margin-left: 0.4rem; padding: 0.1rem 0.45rem; border-radius: 10px; font-size: 0.66rem; font-weight: 600;
  white-space: nowrap; vertical-align: middle; background: #E7EEF8; color: #35578C; }
.msc-card-info .etiqueta-lista { margin: 0.25rem 0 0; }
.msc-filtros { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.msc-filtros .filtro-input { flex: 1 1 200px; }

/* ===== Chat interno ===== */
.btn-chat-fijo { right: calc(0.9rem + 50px); }
.chat-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--oxido); color: #fff;
  font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center;
}
.chat-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: 380px; max-width: 100%;
  background: var(--papel); border-left: 1px solid var(--linea);
  box-shadow: -6px 0 24px rgba(0,0,0,0.12);
  display: flex; flex-direction: column;
}
.chat-panel[hidden] { display: none; }
.chat-cabecera { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--linea); background: var(--tinta); color: #fff; }
.chat-cabecera h3 { flex: 1; margin: 0; font-size: 1rem; font-family: var(--fuente-titulo); letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-cabecera .chat-icono { color: #fff; }
.chat-icono { background: none; border: none; font-size: 1.15rem; cursor: pointer; padding: 0.3rem 0.45rem; border-radius: 5px; color: var(--tinta); }
.chat-icono:hover { background: rgba(127,127,127,0.15); }
.chat-vista { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.chat-vista[hidden] { display: none; }
.chat-btn-nuevo { margin: 0.7rem; }
.chat-lista { display: flex; flex-direction: column; }
.chat-item { display: flex; gap: 0.6rem; align-items: flex-start; text-align: left; width: 100%; padding: 0.65rem 0.8rem; background: none; border: none; border-bottom: 1px solid var(--linea); cursor: pointer; font: inherit; color: inherit; }
.chat-item:hover { background: #F4F2EC; }
.chat-item-icono { font-size: 1.2rem; line-height: 1.4; }
.chat-item-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.chat-item-fila { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.chat-item-fila strong { font-size: 0.88rem; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-hora { font-size: 0.7rem; color: var(--texto-tenue); white-space: nowrap; }
.chat-item-ultimo { font-size: 0.78rem; color: var(--texto-tenue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-nuevo .chat-item-ultimo { color: var(--texto); font-weight: 600; }
.chat-item-badge { background: var(--oxido); color: #fff; border-radius: 9px; min-width: 18px; padding: 0 5px; font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center; }
.chat-grupo { padding: 0.6rem 0.8rem 0; }
.chat-usuario { display: flex; align-items: center; gap: 0.4rem; padding: 0 0.8rem; border-bottom: 1px solid var(--linea); }
.chat-usuario-btn { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.6rem 0; background: none; border: none; cursor: pointer; font: inherit; text-align: left; color: inherit; }
.chat-usuario-btn strong { font-size: 0.88rem; color: var(--tinta); }
.chat-usuario-btn span { font-size: 0.74rem; color: var(--texto-tenue); }
.chat-usuario-btn:hover strong { color: var(--oxido); }
.chat-grupo-form { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.8rem; border-top: 1px solid var(--linea); margin-top: auto; }
.chat-grupo-form[hidden] { display: none; }
.chat-grupo-form input { padding: 0.5rem 0.6rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); font: inherit; }
.chat-vista-conv { overflow: hidden; }
.chat-mensajes { flex: 1; overflow-y: auto; padding: 0.8rem; display: flex; flex-direction: column; gap: 0.45rem; background: #F6F5F1; }
.chat-msg { align-self: flex-start; max-width: 82%; background: #fff; border: 1px solid var(--linea); border-radius: 10px 10px 10px 3px; padding: 0.45rem 0.6rem; font-size: 0.86rem; overflow-wrap: anywhere; }
.chat-msg-mio { align-self: flex-end; background: #E3ECF5; border-color: #CFDCEA; border-radius: 10px 10px 3px 10px; }
.chat-msg-de { font-size: 0.72rem; font-weight: 700; color: var(--oxido-oscuro); margin-bottom: 0.15rem; }
.chat-msg-texto { white-space: pre-line; }
.chat-msg-hora { font-size: 0.66rem; color: var(--texto-tenue); text-align: right; margin-top: 0.2rem; }
.chat-msg-visto { font-size: 0.66rem; color: var(--verde); text-align: right; font-weight: 600; }
/* Zumbido: el icono tiembla mientras haya uno sin leer; el panel se sacude al llegar o al mandarlo */
@keyframes chat-temblar {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  10%, 50%, 90% { transform: translate(-3px, 1px) rotate(-8deg); }
  30%, 70% { transform: translate(3px, -1px) rotate(8deg); }
}
@keyframes chat-temblar-pausa {
  0%, 30%, 100% { transform: translate(0, 0) rotate(0); }
  3%, 15%, 27% { transform: translate(-3px, 1px) rotate(-10deg); }
  9%, 21% { transform: translate(3px, -1px) rotate(10deg); }
}
.btn-chat-fijo.chat-zumbando { animation: chat-temblar-pausa 2.5s ease-in-out infinite; box-shadow: 0 0 0 3px rgba(212, 37, 37, 0.35); }
.chat-sacudir { animation: chat-temblar 0.7s ease-in-out; }
.chat-msg.chat-msg-zumbido { align-self: center; background: #FFF4D6; border-color: #F0D58A; color: #6B4E00; font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 12px; }
/* Con "reducir movimiento" (Windows sin animaciones) no tiembla: parpadea un aro rojo, para que el aviso no se pierda */
@keyframes chat-aro { 0%, 100% { box-shadow: 0 0 0 2px rgba(212, 37, 37, 0.25); } 50% { box-shadow: 0 0 0 7px rgba(212, 37, 37, 0.7); } }
@media (prefers-reduced-motion: reduce) {
  .btn-chat-fijo.chat-zumbando { animation: chat-aro 1.2s ease-in-out infinite; }
  .chat-sacudir { animation: none; }
}
.chat-msg.chat-msg-sticker { background: transparent; border-color: transparent; padding: 0.1rem 0.2rem; }
.chat-sticker-img { display: block; width: 96px; height: 96px; object-fit: contain; }
.chat-stickers-panel { max-height: 230px; overflow-y: auto; margin-bottom: 0.4rem; padding: 0.3rem 0.4rem 0.5rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); background: #fff; }
.chat-stickers-panel[hidden] { display: none; }
.chat-stickers-grupo { margin: 0.45rem 0 0.15rem; font-size: 0.72rem; font-weight: 700; color: var(--tinta); }
.chat-stickers-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 0.15rem; }
.chat-sticker { background: none; border: none; padding: 0.25rem; border-radius: 6px; cursor: pointer; }
.chat-sticker:hover, .chat-sticker:focus-visible { background: rgba(127,127,127,0.15); }
.chat-sticker img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.chat-msg-img { display: block; max-width: 100%; max-height: 220px; border-radius: 6px; margin-bottom: 0.25rem; }
.chat-msg-archivo { display: inline-block; margin-bottom: 0.25rem; color: var(--tinta); font-weight: 600; text-decoration: underline; }
.chat-folio { background: none; border: none; padding: 0; font: inherit; color: var(--oxido-oscuro); font-weight: 700; text-decoration: underline; cursor: pointer; }
.chat-anteriores { align-self: center; font-size: 0.78rem; }
.chat-vacio { margin: auto; }
.chat-error { color: var(--rojo); font-size: 0.82rem; padding: 0.8rem; }
.chat-escribir { border-top: 1px solid var(--linea); padding: 0.5rem; background: var(--papel); }
.chat-archivo-nombre { font-size: 0.74rem; color: var(--texto-tenue); padding: 0 0.3rem 0.3rem; }
.chat-archivo-nombre:empty { display: none; }
.chat-escribir-fila { display: flex; align-items: flex-end; gap: 0.4rem; }
.chat-escribir-fila textarea { flex: 1; resize: none; min-height: 38px; max-height: 120px; padding: 0.5rem 0.6rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); font: inherit; font-size: 0.88rem; }
@media (max-width: 720px) {
  .chat-panel { width: 100%; border-left: none; }
  .chat-escribir-fila textarea { font-size: 16px; } /* sin zoom automatico en iPhone */
}
/* En escritorio, los botones de los encabezados no quedan debajo de los fijos de Mensajes y Buscar */
@media (min-width: 721px) {
  .panel-encabezado { padding-right: 104px; }
}

/* ===== Dashboard: ventas por producto ===== */
.dash-productos-cabecera { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; margin-bottom: 0.6rem; }
.dash-productos-scroll { overflow-x: auto; }
.dash-productos-tabla { min-width: 600px; width: 100%; }
.dash-productos-tabla .num { text-align: right; white-space: nowrap; }
.dash-prod-cat { cursor: pointer; font-weight: 600; }
.dash-prod-cat:hover { background: #F4F2EC; }
.dash-prod-flecha { display: inline-block; width: 1em; color: var(--texto-tenue); transition: transform 0.15s; }
.dash-prod-abierta .dash-prod-flecha { transform: rotate(90deg); }
.dash-prod-item td:first-child { padding-left: 1.8rem; color: var(--texto-tenue); }
.dash-prod-item[hidden] { display: none; }
.dash-prod-total td { font-weight: 700; border-top: 2px solid var(--linea); }
.dash-var { display: inline-block; min-width: 3.6em; font-size: 0.72rem; color: var(--texto-tenue); text-align: right; }
.dash-var-sube { color: var(--verde); }
.dash-var-baja { color: var(--rojo); }
.tabla.dash-productos-tabla thead th:first-child, .tabla.dash-productos-tabla tbody td:first-child { width: auto; text-align: left; min-width: 200px; }
.dash-productos-tabla .num .dash-var { display: block; min-width: 0; }

/* ===== Metros de impresion (estacion de Impresion) ===== */
.imp-totales { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 0.8rem; }
.imp-totales > div { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.55rem 0.7rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); }
.imp-totales strong { font-size: 1.15rem; color: var(--tinta); }
.imp-sub { font-size: 0.72rem; color: var(--texto-tenue); }
.imp-tabla-scroll { overflow-x: auto; }
.imp-tabla { min-width: 720px; }
.tabla.imp-tabla thead th:first-child, .tabla.imp-tabla tbody td:first-child { width: auto; text-align: left; }
.imp-num { text-align: right; white-space: nowrap; }
.imp-fila-repo td { background: var(--ambar-fondo); }
.imp-badge-repo { display: inline-block; padding: 0.05rem 0.4rem; border-radius: 4px; background: #E9A23B; color: #fff; font-size: 0.7rem; font-weight: 700; }
.imp-form { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; align-items: end; margin-top: 0.8rem; }
.imp-form .campo { margin: 0; }
.imp-form input, .imp-form select { width: 100%; }
.imp-campo-ancho { grid-column: span 2; }
@media (max-width: 720px) {
  .imp-totales { grid-template-columns: 1fr 1fr 1fr; gap: 0.4rem; }
  .imp-totales strong { font-size: 0.95rem; }
  .imp-form { grid-template-columns: 1fr 1fr; }
  .imp-campo-ancho { grid-column: 1 / -1; }
  .imp-form .btn { grid-column: 1 / -1; }
}

/* ===== Orden de estaciones y estaciones de la OT ===== */
.cfg-estaciones-orden { margin: 0 0 0.8rem; padding-left: 1.4rem; max-width: 420px; }
.cfg-estacion { padding: 0.25rem 0; border-bottom: 1px solid var(--linea); }
.cfg-estacion > span:first-child { display: inline-block; min-width: 220px; }
.cfg-estacion-botones { float: right; }
.cfg-estacion-botones .btn-texto { padding: 0 0.4rem; }
.mco-estaciones { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.4rem 0; }
.mco-estacion { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); cursor: pointer; }
.mco-num { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--tinta); color: #fff; font-size: 0.72rem; font-weight: 700; }

/* ===== Estacion: guardar avance ===== */
.et-avance { margin: 0 0 0.7rem; padding: 0.5rem 0.7rem; border-radius: var(--radio-chico); background: var(--ambar-fondo); font-size: 0.85rem; color: var(--tinta); }
.et-botones { display: grid; grid-template-columns: 1fr 2fr; gap: 0.6rem; margin-top: 1.2rem; }
.et-botones .btn { font-size: 1.05rem; padding: 1rem; }
.etiqueta-avance { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.4rem; border-radius: 4px; background: #E9A23B; color: #fff; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
@media (max-width: 720px) { .et-botones { grid-template-columns: 1fr; } }

/* ===== Comprobante de anticipo = evidencia de la autorizacion ===== */
.nc-comprobante-bloque { background: #FFF4F6; border: 2px solid var(--oxido); }
.nc-comprobante-titulo { display: block; font-weight: 700; color: var(--oxido-oscuro); font-size: 0.95rem; margin-bottom: 0.2rem; }
.mec-comprobante { margin-top: 0.8rem; padding: 0.7rem 0.8rem; border-radius: var(--radio-chico); font-size: 0.88rem; background: #F4F2EC; display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.mec-comprobante-ok { background: var(--verde-fondo); color: var(--verde); }
.mec-comprobante-falta { background: var(--ambar-fondo); color: var(--tinta); }

/* ===== Archivos del pedido: miniatura y tipo editable ===== */
.archivo-fila { justify-content: flex-start; gap: 0.7rem; }
.archivo-miniatura { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 5px; border: 1px solid var(--linea); background-size: cover; background-position: center; background-color: #fff; }
.archivo-info { min-width: 0; }
.archivo-tipo-editar { font-size: 0.72rem; color: var(--texto-tenue); }
.archivo-tipo-select { font-size: 0.74rem; padding: 0.1rem 0.3rem; border: 1px solid var(--linea); border-radius: 4px; background: var(--papel); color: var(--tinta); }

/* Metros de impresion (historial y correcciones) */
.mi-fecha { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--texto-tenue); }
.mi-tabla { min-width: 940px; }
.mi-acciones { white-space: nowrap; text-align: right; }
.mi-acciones .btn-texto { padding: 0.1rem 0.35rem; }
@media (max-width: 640px) { .mi-totales { grid-template-columns: 1fr; } }

/* Precios por cantidad del catalogo (selector de la cotizacion y columna Precios) */
.tiers-linea { white-space: nowrap; line-height: 1.35; }
.tiers-vacio { color: var(--texto-tenue); font-weight: 400; }
.msc-card-precio .tiers-linea { font-size: 0.74rem; }

/* Flujo de diseño en orden (lib/flujoDiseno.js) y panel Pendientes */
.flujo-paso { align-items: center; flex-wrap: wrap; gap: 0.45rem; padding: 0.35rem 0.5rem; border-radius: var(--radio-chico); }
.flujo-paso-actual { background: var(--ambar-fondo); }
.flujo-bloque { margin: 0.7rem 0 0.2rem; font-size: 0.78rem; font-weight: 700; color: var(--tinta); }
.flujo-bloque:first-child { margin-top: 0; }
.flujo-paso-hecho > span:not(.flujo-area):not(.flujo-num) { color: var(--texto-tenue); }
.flujo-num { display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--linea); font-size: 0.72rem; font-weight: 700; }
.flujo-paso-hecho .flujo-num { background: #2E7D32; color: #fff; }
.flujo-area { font-size: 0.66rem; font-weight: 700; padding: 0.08rem 0.45rem; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.02em; }
.flujo-area-diseno { background: #EDE7F6; color: #4527A0; }
.flujo-area-ventas { background: #E3F2FD; color: #1565C0; }
.flujo-ver { font-size: 0.78rem; white-space: nowrap; }
.flujo-por { font-size: 0.74rem; color: var(--texto-tenue); }
.flujo-por-cliente { color: var(--verde); font-weight: 600; }
.flujo-bloqueo { flex-basis: 100%; margin-left: 1.75rem; font-size: 0.72rem; color: var(--texto-tenue); }
/* Aprobacion del cliente en su liga (imagen del mockup / prueba de color y su respuesta) */
.dp-bloque .campo-ayuda { display: block; margin: 0.2rem 0 0.5rem; }
.dp-fila { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.5rem 0; border-top: 1px solid var(--linea); }
.dp-mini { flex: 0 0 auto; width: 64px; height: 64px; border-radius: var(--radio-chico); overflow: hidden; background: var(--papel); border: 1px solid var(--linea); }
.dp-mini img { width: 100%; height: 100%; object-fit: cover; }
.dp-info { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; min-width: 0; }
.dp-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; margin-top: 0.2rem; }
.dp-ok { color: var(--verde, #2E7D32); font-weight: 600; }
.dp-cambios { color: var(--oxido); white-space: pre-line; }
.dp-espera { color: var(--texto-tenue); font-style: italic; }
.pend-atrasado { color: #B00020; font-weight: 700; }
/* Semaforo de Diseno (lib/propuestaDiseno.js): el texto dice lo mismo que el color */
.conteo-diseno { display: inline-block; margin: 0.1rem 0.25rem 0.1rem 0; padding: 0.12rem 0.5rem; border-radius: 10px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.conteo-diseno::before { content: ''; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.3rem; background: currentColor; }
.conteo-verde { background: #E8F5E9; color: #2E7D32; }
.conteo-amarillo { background: #FFF4E5; color: #B45309; }
.conteo-rojo { background: #FDECEA; color: #B00020; }
.conteo-listo { background: #EDE7F6; color: #4527A0; }
.pc-lista { display: flex; flex-direction: column; gap: 0.6rem; }
.pc-fila { padding: 0.5rem 0.6rem; border: 1px solid var(--linea); border-radius: 6px; display: flex; flex-direction: column; gap: 0.25rem; align-items: flex-start; }
.pc-imagen img { max-width: 220px; max-height: 160px; border-radius: 4px; border: 1px solid var(--linea); display: block; }
.conteo-espera { background: #EEF0F2; color: #4A5560; }
.pd-resumen { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.pd-acciones { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.pd-acciones .btn { white-space: nowrap; }

/* Proveedores y compras de insumos */
.campo-ayuda { display: block; font-size: 0.74rem; color: var(--texto-tenue); margin-top: 0.25rem; }
.check-linea { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; cursor: pointer; }
.seccion-subtitulo { font-size: 0.9rem; font-weight: 700; margin: 0 0 0.4rem; }
.mov-tipo { font-size: 0.7rem; font-weight: 700; padding: 0.08rem 0.45rem; border-radius: 10px; text-transform: uppercase; }
.mov-entrada { background: #E8F5E9; color: #2E7D32; }
.mov-salida { background: #FFEBEE; color: #B00020; }
#mcom-partidas input, #mcom-partidas select { width: 100%; }
.prov-inactivo { opacity: 0.55; }
#modal-compra { z-index: 110; }
.campo[hidden], .campo-ayuda[hidden] { display: none; }
/* Receta por talla y descuento al crear la OT (lib/inventarioOT.js) */
.mm-fila-agregar { display: grid; grid-template-columns: 1fr 9rem 9rem; gap: 0.5rem; }
@media (max-width: 640px) { .mm-fila-agregar { grid-template-columns: 1fr; } }
.explosion-fila-5 { grid-template-columns: 1fr 100px 100px 100px 90px; }
.explosion-descuenta { font-size: 0.66rem; font-weight: 700; color: #1565C0; text-transform: uppercase; }
/* Comprobante de pago sin su pago registrado (lib/filtrosListas.js: comprobantes_sin_pago) */
.marca-comprobante { background: var(--ambar-fondo); color: var(--oxido-oscuro); }
.aviso-comprobante { margin: 0 0 0.9rem; border-left: 3px solid var(--oxido); padding: 0.6rem 0.8rem; }
/* Comprobantes sin pago con su miniatura (Pagos del pedido) */
.comprobantes-libres { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: -0.4rem 0 0.9rem; }
.comprobante-libre { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--papel); max-width: 100%; }
.comprobante-libre-mini { flex: 0 0 auto; width: 72px; height: 96px; border-radius: var(--radio-chico); overflow: hidden; background: var(--rojo-fondo); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--oxido); text-decoration: none; }
.comprobante-libre-mini img { width: 100%; height: 100%; object-fit: cover; }
.comprobante-libre-info { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.pago-repetido { font-size: 0.74rem; color: var(--rojo); margin-top: 0.2rem; }
/* Ajustes de piezas del pedido (lib/ajustesPedido.js) */
.ajustes-titulo { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-tenue); margin: 1rem 0 0.3rem; }
.ajuste-mas { color: #2E7D32; font-weight: 600; }
.ajuste-menos { color: #B00020; font-weight: 600; }

/* ============ MI SEGUIMIENTO (cotizaciones por vendedora) ============ */
.seg-encabezado-acciones { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.seg-seccion { background: var(--papel-tarjeta); border: 1px solid var(--linea); border-left: 4px solid var(--linea); border-radius: 10px; margin-bottom: 0.9rem; overflow: hidden; }
.seg-seccion-por_cerrar { border-left-color: #B3261E; }
.seg-seccion-requiere_seguimiento { border-left-color: var(--marca-naranja); }
.seg-seccion-autorizadas { border-left-color: var(--verde); }
.seg-seccion-por_enviar { border-left-color: var(--tinta); }
.seg-seccion-para_recuperar { border-left-color: #6B6F76; }
.seg-seccion-titulo {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%;
  background: none; border: none; cursor: pointer; text-align: left; font: inherit;
  font-weight: 600; color: var(--tinta); padding: 0.8rem 1rem;
}
.seg-seccion-titulo::before { content: '▾'; font-size: 0.8rem; margin-right: 0.4rem; transition: transform 0.15s ease; }
.seg-seccion-titulo > span:first-child { flex: 1; }
.seg-seccion-plegada .seg-seccion-titulo::before { transform: rotate(-90deg); }
.seg-seccion-plegada .seg-seccion-cuerpo { display: none; }
.seg-seccion-n { display: inline-block; margin-left: 0.35rem; padding: 0 0.45rem; border-radius: 999px; background: #EDEEF0; font-size: 0.75rem; }
.seg-seccion-monto { font-size: 0.85rem; color: var(--texto-tenue); font-variant-numeric: tabular-nums; }
.seg-seccion-cuerpo { padding: 0 1rem 0.6rem; }
.seg-seccion-cuerpo > .tarjeta-nota { margin: 0 0 0.4rem; }
.seg-fila { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; padding: 0.7rem 0; border-top: 1px solid var(--linea); }
.seg-fila-datos { min-width: 0; font-size: 0.88rem; }
.seg-fila-monto { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.seg-fila-acciones { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; }
.seg-chip { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.7rem; font-weight: 600; vertical-align: middle; }
.seg-chip-vencida { background: #FBE9E7; color: #B3261E; }
.seg-chip-recuperando { background: var(--verde-fondo); color: var(--verde); }

/* Notas de texto del pedido, en la pestaña Archivos (migracion 028) */
.nota-form { margin: 0 0 0.9rem; }
.nota-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.88rem; padding: 0.5rem 0.6rem; border: 1px solid var(--linea); border-radius: 6px; resize: vertical; }
.nota-form .acciones-lista { justify-content: flex-end; margin-top: 0.4rem; }
.lista-notas { margin-bottom: 0.6rem; }
.nota-fila { padding: 0.55rem 0.7rem; margin-bottom: 0.5rem; background: #FFF8E1; border-left: 3px solid #F2A900; border-radius: 4px; }
.nota-texto { white-space: pre-line; font-size: 0.88rem; overflow-wrap: anywhere; }

/* Correccion de la cotizacion de un pedido (lib/correccionCotizacion.js) */
.aviso-correccion { margin: 0 0 0.9rem; border-left: 3px solid #1565C0; padding: 0.6rem 0.8rem; background: #EEF4FB; }
.pagos-correccion { margin: 0 0 0.9rem; padding: 0.6rem 0.8rem; border: 1px dashed var(--linea); border-radius: 6px; font-size: 0.85rem; }
.pagos-correccion .acciones-lista { margin-top: 0.4rem; flex-wrap: wrap; align-items: center; }
.pc-aceptar { display: inline-flex; gap: 0.35rem; align-items: center; }
/* Cambiar piezas o precios (lib/correccionCotizacion.js: cambio) */
.modal-cambio { max-width: 920px; width: 100%; }
.mcp-folio { font-weight: 400; color: var(--texto-tenue); font-size: 0.9em; }
.mcp-intro { margin: 0 0 0.7rem; }
.mcp-tabla td { vertical-align: middle; }
.tabla.mcp-tabla thead th:first-child, .tabla.mcp-tabla tbody td:first-child { text-align: left; width: auto; min-width: 15rem; }
.mcp-tabla .num { text-align: right; white-space: nowrap; }
.mcp-tabla input.mcp-in { width: 6.5rem; padding: 0.3rem 0.4rem; border: 1px solid var(--linea); border-radius: 4px; text-align: right; }
.mcp-sub td { font-size: 0.82rem; color: var(--tinta-suave); background: #FAF9F7; }
.mcp-sub td:first-child { padding-left: 1.4rem; }
.mcp-sugerida td { background: var(--ambar-fondo); }
.mcp-quitada td { color: var(--texto-tenue); text-decoration: line-through; }
.mcp-quitada td:last-child { text-decoration: none; }
.mcp-nota { font-size: 0.76rem; color: var(--tinta-suave); }
.mcp-chip { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: #E8EEF6; font-size: 0.72rem; }
.mcp-abajo { display: grid; grid-template-columns: 1fr minmax(15rem, 19rem); gap: 1rem; margin-top: 0.9rem; align-items: start; }
.mcp-datos { display: flex; flex-direction: column; gap: 0.7rem; }
.mcp-causas { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.mcp-opcion { display: flex; align-items: center; gap: 0.35rem; font-size: 0.88rem; flex-wrap: wrap; }
.mcp-totales { width: 100%; margin: 0; }
.mcp-sube strong { color: #2E7D32; }
.mcp-baja strong { color: #B00020; }
.mcp-pie { flex-wrap: wrap; }
.mcp-cotizador { margin-right: auto; font-size: 0.82rem; }
@media (max-width: 700px) { .mcp-abajo { grid-template-columns: 1fr; } }

/* OT impresa: resumen por talla, especificaciones vacias y Express (como la OT de papel) */
.pi-express { display: inline-block; margin-left: 0.6rem; padding: 0.1rem 0.6rem; border: 2px solid #B00020; color: #B00020; border-radius: 4px; font-size: 0.8em; letter-spacing: 0.06em; }
.pi-specs td:first-child { font-weight: 600; width: 35%; }
.pi-sin-especificar { color: #8A6D00; font-style: italic; }
.pi-resumen-tallas { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin: 0.3rem 0 0.4rem; font-size: 0.82rem; }
.pi-resumen-total { font-weight: 700; }
.pi-total-general { margin-top: 0.4rem; font-weight: 700; font-size: 0.9rem; text-align: right; }
.pi-nota { border-left: 3px solid #F2A900; padding: 0.2rem 0.5rem; margin-bottom: 0.4rem; font-size: 0.8rem; }

/* ============ OT IMPRESA (hoja carta, como la OT de papel) ============
   Todo en em sobre una base de 9 pt: --ot-escala (ajustarOTaHoja en app.js) la reduce hasta 78 % para que
   quepa en una hoja; si no cabe, sigue en otra sin partir una prenda. */
.ot-hoja { max-width: 760px; padding: 1rem; font-size: calc(9pt * var(--ot-escala, 1)); line-height: 1.3; color: #111; font-family: var(--fuente-cuerpo); }
.ot-hoja.ot-midiendo { width: 760px; max-width: none; padding: 0; font-size: 9pt; }
.ot-cabecera { display: flex; align-items: center; gap: 0.9em; border-bottom: 2px solid #111; padding-bottom: 0.5em; }
.ot-logo { max-height: 3.4em; max-width: 9em; object-fit: contain; }
.ot-titulo-bloque { flex: 1; min-width: 0; }
.ot-empresa { font-size: 0.85em; color: #444; }
.ot-titulo { font-family: var(--fuente-titulo); font-size: 1.7em; line-height: 1.1; margin: 0; text-transform: uppercase; letter-spacing: 0.02em; }
.ot-express { border: 2px solid #B00020; color: #B00020; font-weight: 700; padding: 0.15em 0.6em; letter-spacing: 0.08em; }
.ot-total { display: flex; flex-direction: column; align-items: center; border: 2px solid #111; padding: 0.2em 0.8em; line-height: 1.1; }
.ot-total span { font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.06em; }
.ot-total strong { font-size: 1.7em; font-variant-numeric: tabular-nums; }
.ot-datos { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr 1fr; gap: 0 0.9em; margin: 0.5em 0 0.6em; }
.ot-datos div { min-width: 0; }
.ot-datos dt { font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.06em; color: #555; }
.ot-datos dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ot-tabla { width: 100%; border-collapse: collapse; font-size: 1em; }
.ot-tabla th, .ot-tabla td { border: 1px solid #999; padding: 0.15em 0.4em; text-align: left; vertical-align: top; }
.ot-tabla th { background: #ECEAE4; font-weight: 700; }
.ot-specs { margin-bottom: 0.6em; table-layout: fixed; break-inside: avoid; }
.ot-specs th:first-child, .ot-specs td:first-child { width: 8.5em; font-weight: 600; }
.ot-specs th span { display: block; font-weight: 600; text-transform: uppercase; font-size: 0.9em; }
.ot-detalle { white-space: pre-line; font-size: 0.9em; }
.ot-sin-especificar { color: #8A6D00; font-style: italic; }
.ot-spec-cambio { font-weight: 700; }
.ot-spec-antes { font-size: 0.85em; color: #666; white-space: nowrap; }
.ot-prenda { margin-bottom: 0.55em; break-inside: avoid; }
.ot-prenda-titulo { display: flex; justify-content: space-between; gap: 1em; margin: 0 0 0.2em; padding: 0.2em 0.4em; background: #111; color: #fff; font-size: 1em; text-transform: uppercase; letter-spacing: 0.03em; }
.ot-tallas { display: flex; flex-wrap: wrap; gap: 0.15em 1.1em; margin: 0.15em 0 0.3em; }
.ot-tallas b { margin-right: 0.2em; }
.ot-desglose td:first-child, .ot-desglose th:first-child { width: 3em; text-align: right; font-variant-numeric: tabular-nums; }
.ot-desglose td:nth-child(2), .ot-desglose th:nth-child(2) { width: 3.6em; }
.ot-desglose td:nth-child(5), .ot-desglose th:nth-child(5) { width: 3.2em; }
.ot-dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8em; align-items: start; }
.ot-sin-desglose { margin: 0.2em 0; font-style: italic; }
.ot-subtitulo { font-size: 1em; text-transform: uppercase; letter-spacing: 0.04em; margin: 0.4em 0 0.2em; }
.ot-notas { break-inside: avoid; }
.ot-nota { border-left: 3px solid #F2A900; padding: 0.1em 0.5em; margin-bottom: 0.25em; }
.ot-nota .nota-texto { white-space: pre-line; }
.ot-nota small { color: #555; }
@page ot { size: letter; margin: 8mm; }
@media print {
  #panel-impresion-ot { page: ot; max-width: none; padding: 0 !important; }
  .ot-tabla th, .ot-prenda-titulo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.ot-partidas { margin-left: auto; font-style: italic; color: #555; }
.ot-total-fila td { font-weight: 700; border-top: 2px solid #111; font-variant-numeric: tabular-nums; }
.ot-specs-doble .ot-spec-etiqueta { width: 8.5em; font-weight: 600; }
.btn-ayuda-fijo { right: calc(0.9rem + 100px); text-decoration: none; }
.ot-resumen { border: 1px solid #999; padding: 0.3em 0.6em; margin: 0 0 0.6em; break-inside: avoid; }
.ot-resumen div { padding: 0.05em 0; }
.ot-resumen-total { border-top: 1px solid #111; margin-top: 0.2em; padding-top: 0.2em; }
.mlc-sin-marca { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0 0 0.7rem; font-size: 0.85rem; line-height: 1.35; cursor: pointer; }
.mlc-sin-marca input { margin-top: 0.2rem; }
#mlc-whatsapp { display: block; text-align: center; text-decoration: none; box-sizing: border-box; }
#mlc-whatsapp[hidden] { display: none; }
.ment-contacto { margin: -0.3rem 0 0.7rem; font-size: 0.88rem; color: var(--tinta-suave, #555); }

/* Cotizacion: clientes existentes al escribir el nombre (evita duplicados) */
.nc-campos-arriba .campo { position: relative; }
.nc-sugerencias { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 2px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio-chico); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); max-height: 260px; overflow-y: auto; }
.nc-sugerencias[hidden] { display: none; }
.nc-sugerencia { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--linea); padding: 0.5rem 0.7rem; cursor: pointer; font: inherit; color: var(--texto); }
.nc-sugerencia:last-child { border-bottom: none; }
.nc-sugerencia:hover, .nc-sugerencia:focus { background: var(--ambar-fondo); }
.nc-sugerencia span { display: block; font-size: 0.78rem; color: var(--texto-tenue); }
.nc-cliente-existente { display: block; margin-top: 0.25rem; font-size: 0.75rem; color: var(--verde); }
.nc-cliente-existente[hidden] { display: none; }
.mvc-anticipo-captura { margin-top: 0.6rem; }
.mvc-vendedora { margin: 0.5rem 0; font-size: 0.88rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }

/* Mi seguimiento: clientes para volver a comprar (lib/recompra.js) y sus contactos en la ficha */
.seg-seccion-recompra { border-left-color: var(--verde); }
.seg-recompra-nota { margin-top: 0.5rem; }
.seg-recompra-nota textarea { width: 100%; resize: vertical; }
.seg-recompra-botones { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.35rem; }
.mec-contactos { margin-top: 0.9rem; padding: 0.7rem 0.8rem; border-radius: var(--radio-chico); background: #F4F2EC; font-size: 0.85rem; max-height: 200px; overflow-y: auto; }
.mec-contactos-titulo { font-weight: 600; margin-bottom: 0.4rem; }
.mec-contacto { padding: 0.35rem 0; border-top: 1px solid #E0DED8; }
.mec-contacto:first-of-type { border-top: none; }
.mec-contacto div { white-space: pre-line; }

/* Promociones de la pagina (lib/promocionesPagina.js): la tarjeta imita la de fabricotextiles.com */
.pp-seccion { margin-bottom: 1.6rem; }
#pp-nueva { white-space: nowrap; }
.pp-seccion-titulo { font-size: 1rem; margin: 0 0 0.7rem; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.pp-item { display: flex; flex-direction: column; gap: 0.5rem; }
.pp-meta { font-size: 0.82rem; }
.pp-acciones { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; }
.pp-tarjeta { background: #fff; border: 1px solid #E0DED8; border-top: 4px solid #FF5A00; border-radius: 10px; padding: 1.1rem 1.1rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; min-height: 230px; }
.pp-tarjeta.pp-azul { border-top-color: #0011FF; }
.pp-tag { align-self: flex-start; background: #FF5A00; color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.2rem 0.55rem; border-radius: 4px; }
.pp-azul .pp-tag { background: #0011FF; }
.pp-titulo { font-size: 1.05rem; font-weight: 800; line-height: 1.25; }
.pp-texto { font-size: 0.82rem; color: #6B6F76; line-height: 1.5; margin: 0; flex: 1; white-space: pre-line; }
.pp-aviso { font-size: 0.75rem; font-weight: 700; color: #B3261E; }
.pp-boton { align-self: flex-start; background: #111; color: #fff; font-size: 0.78rem; font-weight: 700; padding: 0.45rem 0.9rem; border-radius: 6px; }
.modal-promo-pagina { max-width: 860px; }
.pp-editor { display: grid; grid-template-columns: 1fr 300px; gap: 1.2rem; }
.pp-campos { display: flex; flex-direction: column; gap: 0.7rem; }
.pp-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.pp-vista { display: flex; flex-direction: column; gap: 0.5rem; }
@media (max-width: 760px) { .pp-editor { grid-template-columns: 1fr; } }

/* Chat: avisos, separadores por dia e iniciales */
.chat-avisos { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; padding: 0 0.8rem 0.5rem; font-size: 0.78rem; }
.chat-avisos .btn-texto { font-size: 0.78rem; padding: 0; }
.chat-avisos .btn-texto:disabled { color: var(--texto-tenue); cursor: default; text-decoration: none; }
.chat-dia { align-self: center; margin: 0.4rem 0 0.1rem; padding: 0.15rem 0.7rem; border-radius: 10px; background: #E7E4DC; color: var(--texto); font-size: 0.7rem; font-weight: 600; }
.chat-dia::first-letter { text-transform: uppercase; }
.chat-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }
.chat-av-foto { object-fit: cover; background: #ddd; }
.chat-av-chico { width: 18px; height: 18px; font-size: 0.55rem; vertical-align: middle; margin-right: 0.15rem; }
.chat-av-0 { background: #C1440E; } .chat-av-1 { background: #2E7D32; } .chat-av-2 { background: #1565C0; } .chat-av-3 { background: #6A1B9A; }
.chat-av-4 { background: #00838F; } .chat-av-5 { background: #AD1457; } .chat-av-6 { background: #5D4037; } .chat-av-7 { background: #EF6C00; }
.chat-av-grupo { background: #E7E4DC; font-size: 1rem; }
.chat-av-sistema { background: #1F2328; font-size: 0.62rem; }

/* Chat: responder citando, escribiendo y conversacion del pedido */
.chat-msg-pie { display: flex; justify-content: flex-end; align-items: center; gap: 0.4rem; margin-top: 0.2rem; }
.chat-msg-pie .chat-msg-hora { margin-top: 0; }
.chat-responder { background: none; border: none; padding: 0 0.2rem; font-size: 0.8rem; line-height: 1; color: var(--texto-tenue); cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.chat-msg:hover .chat-responder, .chat-responder:focus { opacity: 1; }
@media (hover: none) { .chat-responder { opacity: 0.7; } }
.chat-cita { display: flex; flex-direction: column; gap: 0.1rem; width: 100%; text-align: left; margin-bottom: 0.3rem; padding: 0.3rem 0.5rem; background: rgba(0,0,0,0.05); border: none; border-left: 3px solid var(--oxido); border-radius: 4px; font: inherit; font-size: 0.76rem; color: var(--texto); cursor: pointer; }
.chat-cita strong { font-size: 0.72rem; color: var(--oxido-oscuro); }
.chat-cita span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-msg-resaltado { box-shadow: 0 0 0 3px rgba(193,68,14,0.35); }
.chat-respondiendo { display: flex; align-items: flex-start; gap: 0.4rem; margin-bottom: 0.4rem; padding: 0.35rem 0.5rem; border-left: 3px solid var(--oxido); background: #F4F2EC; border-radius: 4px; font-size: 0.78rem; }
.chat-respondiendo[hidden] { display: none; }
.chat-respondiendo > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-respondiendo span { color: var(--texto-tenue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-escribiendo { min-height: 1.1rem; padding: 0 0.8rem; font-size: 0.72rem; font-style: italic; color: var(--texto-tenue); background: #F6F5F1; }
.chat-info { padding: 0.45rem 0.8rem; border-bottom: 1px solid var(--linea); font-size: 0.76rem; background: var(--papel); }
.chat-info[hidden] { display: none; }
.chat-participantes { color: var(--texto-tenue); }
.chat-info-botones { display: flex; gap: 0.9rem; margin-top: 0.2rem; }
.chat-info-botones .btn-texto { font-size: 0.76rem; padding: 0; }
.chat-agregar-form { display: flex; gap: 0.4rem; margin-top: 0.35rem; }
.chat-agregar-form[hidden] { display: none; }
.chat-agregar-form select { flex: 1; min-width: 0; padding: 0.3rem; font: inherit; font-size: 0.8rem; }
.detalle-encabezado-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }

/* Capacitaciones por puesto (lib/capacitaciones.js): panel de Direccion */
#cap-nueva { white-space: nowrap; }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.cap-item { background: #fff; border: 1px solid #E0DED8; border-top: 4px solid var(--rojo); border-radius: 10px; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.45rem; }
.cap-item.cap-apagada { border-top-color: #C9C6BE; opacity: 0.75; }
.cap-item-cab { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.cap-progreso { font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.cap-barra { height: 6px; border-radius: 3px; background: #EDEEF0; overflow: hidden; }
.cap-barra span { display: block; height: 100%; background: var(--verde); }
.modal-capacitacion { max-width: 760px; }
.cap-form { display: flex; flex-direction: column; gap: 0.8rem; }
.cap-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.3rem 0.8rem; margin-top: 0.3rem; }
.cap-material { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.3rem; }
.cap-preguntas { display: flex; flex-direction: column; gap: 0.7rem; margin: 0.5rem 0; }
.cap-pregunta { border: 1px solid #E0DED8; border-radius: var(--radio-chico); padding: 0.6rem 0.7rem; display: flex; flex-direction: column; gap: 0.35rem; }
.cap-pregunta-cab { display: flex; gap: 0.5rem; align-items: center; }
.cap-pregunta-cab .config-input { flex: 1; }
.cap-opcion { display: flex; gap: 0.5rem; align-items: center; padding-left: 1.4rem; }
.cap-opcion input[type="radio"] { width: auto; accent-color: var(--verde); }
.cap-opcion .config-input { flex: 1; }
.cap-pregunta .cap-p-mas { align-self: flex-start; margin-left: 1.4rem; font-size: 0.8rem; }
.cap-aprobar .config-input { width: 110px; }
.cap-tabla td:first-child, .cap-tabla th:first-child { width: 34px; }
.cap-ok { color: var(--verde); font-weight: 600; }
.cap-asistencia { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: flex-end; margin: 0.6rem 0 1rem; }
.cap-asistencia .config-input { width: 170px; }
.cap-subtitulo { font-size: 1rem; margin: 0.8rem 0 0.2rem; }
.cap-revision-form { display: grid; grid-template-columns: 170px 1fr auto; gap: 0.6rem; align-items: start; margin-bottom: 0.8rem; }
.cap-revision { border-top: 1px solid #E0DED8; padding: 0.5rem 0; font-size: 0.85rem; }
.cap-revision-cab { display: flex; gap: 0.6rem; align-items: baseline; }
.cap-revision-cab .btn-texto { margin-left: auto; font-size: 0.78rem; }
.cap-revision-nota { white-space: pre-line; margin-top: 0.2rem; }
@media (max-width: 640px) { .cap-revision-form { grid-template-columns: 1fr; } }

/* Extras de un producto (lib/extras.js): bordado u otro servicio que se cobra por pieza con la prenda */
.mp-extra-fila { display: grid; grid-template-columns: 9rem 1fr 7rem 13rem auto; gap: 0.4rem; align-items: center; margin: 0.35rem 0; }
.mp-extra-fila input, .mp-extra-fila select { min-width: 0; }
.nc-item-extras { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0.25rem 0 0.1rem 0.4rem; }
.nc-extra { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--tinta); }
.nc-extra label { display: flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.nc-extra input[type=number] { width: 6rem; font-size: 0.8rem; }
.nc-extra-ayuda { font-size: 0.75rem; color: var(--gris, #777); }
.mvc-extra td { font-size: 0.85em; color: var(--gris, #666); }
.mvc-extra td:first-child { padding-left: 1.2rem; }
@media (max-width: 600px) { .mp-extra-fila { grid-template-columns: 1fr 1fr; } }
.mp-liga-opciones { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0.35rem 0; }
.mp-liga-opciones label { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; }
.nc-extra input.nc-r-te-piezas { width: 4rem; margin: 0 0.2rem; }
.pedido-alerta-ok { background: #E8F5E9 !important; color: #2E7D32 !important; border-color: #A5D6A7 !important; }
.pedido-alerta { margin-top: 0.5rem; padding: 0.45rem 0.7rem; border-radius: 6px; background: #fff4e5; color: #8a4b00; border: 1px solid #f3c27a; font-size: 0.85rem; }
.ot-alertas { margin: 0.4rem 0; padding: 0.35rem 0.6rem; border: 2px solid #000; font-weight: 700; font-size: 0.85rem; }
.nc-extra input.nc-r-extra-piezas { width: 4rem; }

/* ---- Pizarrón (lib/pizarron.js): todo en una sola vista, sin desplazarse a la derecha ---- */
.pz-acciones { display: flex; align-items: center; gap: 0.6rem; }
.pz-envoltura { width: 100%; }
.pizarron { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.78rem; background: var(--papel-tarjeta); }
.pizarron th, .pizarron td { border: 1px solid var(--linea); padding: 0.28rem 0.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pizarron thead th { background: var(--tinta); color: #fff; font-weight: 600; font-size: 0.66rem; text-align: center; white-space: normal; overflow-wrap: anywhere; line-height: 1.1; position: sticky; top: 0; z-index: 1; }
.pizarron .pz-grupos th { background: var(--tinta-suave); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.15rem; }
.pizarron .pz-grupos th:empty { background: var(--papel); border-color: var(--papel); }
.pizarron tbody tr:nth-child(even) { background: #FAF9F6; }
.pizarron tbody tr:hover { background: var(--ambar-fondo); }
.pz-c-sec { width: 2.7rem; } .pz-c-ot { width: 4rem; } .pz-c-pedido { width: 5rem; } .pz-c-num { width: 2.6rem; }
.pz-c-caja { width: 1.7rem; } .pz-c-estacion { width: 3.5rem; } .pz-c-fecha { width: 3.6rem; }
.pz-sec { text-align: center; font-weight: 700; }
.pz-sec-input::-webkit-inner-spin-button, .pz-sec-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pz-sec-input { -moz-appearance: textfield; width: 100%; padding: 0.1rem 0.15rem; font-size: 0.78rem; font-weight: 700; text-align: center; border: 1px solid var(--linea); border-radius: 4px; }
.pz-num, .pz-fecha { text-align: center; }
.pz-celda { text-align: center; font-weight: 700; }
.pz-ok { background: var(--verde-fondo); color: var(--verde); }
.pz-medio, .pz-proceso { background: var(--ambar-fondo); color: var(--oxido-oscuro); }
.pz-no { background: #F1F0EC; color: var(--texto-tenue); font-weight: 400; }
.pz-sin { background: #F7F6F2; }
.pz-marcar { width: 100%; border: 1px dashed var(--texto-tenue); background: transparent; border-radius: 4px; cursor: pointer; font: inherit; font-weight: 700; color: inherit; padding: 0; line-height: 1.3; }
.pz-marcar:hover { border-color: var(--oxido); color: var(--oxido); }
.pz-abrir { font-weight: 600; padding: 0; }
/* OT desde el pizarron y pedidos terminados (19 nov 2026) */
.pz-ver-ot { font-weight: 600; padding: 0; font-size: inherit; }
.pizarron tbody tr.pz-fila-terminada { background: #EEEDE8; color: var(--texto-tenue); }
.pizarron tbody tr.pz-fila-terminada:hover { background: #E6E4DD; }
.pz-terminados { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; white-space: nowrap; }
.pz-atrasado { color: var(--rojo); font-weight: 700; }
.pz-fecha-btn { border: none; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; }
.pz-entregar { width: 100%; border: 1px solid var(--linea); background: var(--papel); border-radius: 4px; padding: 0; font: inherit; font-size: 0.62rem; font-weight: 600; white-space: normal; line-height: 1.1; color: var(--texto); cursor: pointer; }
.pz-entregar:hover { border-color: var(--oxido); color: var(--oxido); }
#ment-ir-pagos { margin-top: 0.3rem; }
.texto-suave { color: var(--texto-tenue); font-size: 0.78rem; }
#ment-fecha-ayuda { display: block; margin-top: 0.2rem; }
.pz-express { font-size: 0.75rem; }
.pizarron thead th[data-orden] { cursor: pointer; }
.pizarron thead .pz-orden-btn { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem; width: 100%; white-space: normal; overflow-wrap: anywhere; }
.pizarron thead .th-flecha { opacity: 0.45; }
.pizarron thead .th-orden-activa { background: var(--oxido-oscuro); }
.pizarron thead .th-orden-activa .th-flecha { color: #fff; }
.pz-orden-aviso { font-size: 0.8rem; color: var(--oxido-oscuro); margin: 0 0 0.4rem; }
.pz-vacio { text-align: center; color: var(--texto-tenue); padding: 1rem; }
.pz-leyenda { font-size: 0.75rem; color: var(--texto-tenue); margin-top: 0.5rem; }
/* En el celular no cabe: ahi si se desplaza */
@media (max-width: 900px) {
  .pz-envoltura { overflow-x: auto; }
  .pizarron { min-width: 900px; }
}

/* ============ FICHA DEL PRODUCTO POR SECCIONES (lib/tiposProducto.js) ============ */
.modal-ficha { max-width: min(1240px, 97vw); max-height: 94vh; }
/* Ficha del producto: formulario y, a la derecha, la vista previa (abajo en pantallas angostas) */
.mp-con-vista { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.mp-formulario { min-width: 0; }
.mp-def { display: block; font-size: 0.74rem; color: var(--texto-tenue); line-height: 1.35; margin-top: 0.25rem; font-weight: 400; }
.mp-campo-angosto { max-width: 24rem; }
.mp-vista { position: sticky; top: 0; background: #F8F6F3; border: 1px solid var(--linea); border-radius: 6px; padding: 0.7rem; font-size: 0.8rem; }
.mp-vista-titulo { font-weight: 700; color: var(--tinta); margin-bottom: 0.5rem; }
.mp-vista-bloque { background: #fff; border: 1px solid var(--linea); border-radius: 4px; padding: 0.5rem; margin-bottom: 0.55rem; }
.mp-vista-donde { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-tenue); margin-bottom: 0.35rem; }
.mp-vista-card { cursor: default; max-width: 13rem; }
.mp-vista-pdf { width: 100%; border-collapse: collapse; font-size: 0.74rem; }
.mp-vista-pdf th { font-weight: 600; text-align: left; border-bottom: 1px solid var(--linea); padding: 0.15rem 0.2rem; color: var(--texto-tenue); }
.mp-vista-pdf td { padding: 0.25rem 0.2rem; vertical-align: top; }
.mp-vista-pdf .num { text-align: right; white-space: nowrap; }
.mp-vista-desc { color: var(--texto-tenue); font-size: 0.68rem; line-height: 1.3; white-space: pre-line; }
.mp-vista-unidad { color: var(--texto-tenue); font-size: 0.66rem; }
.mp-vista-extra td { border-top: 1px dashed var(--linea); }
.mp-vista-nota { margin: 0.3rem 0 0; font-size: 0.7rem; color: var(--texto-tenue); line-height: 1.35; }
.mp-vista-liga { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.mp-vista-chip { display: inline-block; padding: 0.1rem 0.45rem; border: 1px solid var(--linea); border-radius: 999px; font-size: 0.72rem; }
.mp-vista-ot div { margin: 0.1rem 0; }
.mp-vista-resaltado { outline: 2px solid var(--oxido); outline-offset: 1px; background: var(--ambar-fondo); border-radius: 3px; }
/* Solo consulta (Ventas, Marketing, Produccion): sin botones de cambiar */
.mp-solo-lectura #mp-guardar, .mp-solo-lectura #mp-tier-agregar, .mp-solo-lectura #mp-extra-agregar, .mp-solo-lectura .mp-tier-quitar,
.mp-solo-lectura .mp-extra-quitar, .mp-solo-lectura .mp-campo-quitar, .mp-solo-lectura .mp-foto-quitar, .mp-solo-lectura #mp-foto-subir,
.mp-solo-lectura #mp-campo-nuevo-bloque, .mp-solo-lectura #mp-tipo-nuevo, .mp-solo-lectura .mp-compra { display: none !important; }
.mp-aviso-lectura { margin: 0 0 0.6rem; }
@media (max-width: 1000px) { .mp-con-vista { grid-template-columns: 1fr; } .mp-vista { position: static; } }
.nc-r-unidad { align-self: center; font-size: 0.78rem; color: var(--texto-tenue); white-space: nowrap; }
/* Produccion no ve precios de venta en el catalogo */
.sin-precios .col-precio, .sin-precios .mp-precio, .sin-precios .mp-extra-precio { display: none !important; }
/* Telas de la corrida en Ver estaciones (lib/cambiosTela.js) */
.me-telas { margin-bottom: 1rem; }
.me-telas-titulo { font-size: 0.95rem; margin-bottom: 0.4rem; }
.me-tela { border: 1px solid var(--linea); border-radius: 4px; padding: 0.5rem 0.6rem; margin-bottom: 0.4rem; background: #fff; }
.me-tela-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; }
.me-tela-producto { font-weight: 600; flex: 1 1 14rem; }
.me-tela-cambio { font-size: 0.78rem; color: var(--oxido); margin-top: 0.25rem; }
.me-tela-form[hidden] { display: none; }
.me-tela-form { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.45rem; align-items: center; }
.me-tela-form input { flex: 1 1 11rem; min-width: 0; padding: 0.38rem 0.5rem; border: 1px solid var(--linea); border-radius: 4px; }
.ot-alertas { white-space: pre-line; }
.mvc-item-unidad { font-size: 0.72rem; color: var(--texto-tenue); }
.mp-seccion { border: 1px solid var(--linea); border-radius: 6px; margin-bottom: 0.6rem; background: #fff; }
.mp-seccion > summary { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.8rem; cursor: pointer; list-style: none; }
.mp-seccion > summary::-webkit-details-marker { display: none; }
.mp-seccion > summary::after { content: '▸'; margin-left: 0.2rem; color: var(--texto-tenue); }
.mp-seccion[open] > summary::after { content: '▾'; }
.mp-seccion[open] > summary { border-bottom: 1px solid var(--linea); }
.mp-sec-num { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--tinta); color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mp-sec-titulo { flex: none; font-weight: 600; color: var(--tinta); font-size: 0.92rem; }
.mp-sec-resumen { flex: 1; min-width: 0; text-align: right; font-size: 0.76rem; color: var(--texto-tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-sec-cuerpo { padding: 0.8rem; }
.modal-ficha .mp-sec-cuerpo input[type=text], .modal-ficha .mp-sec-cuerpo input[type=number], .modal-ficha .mp-sec-cuerpo select { font-family: var(--fuente-cuerpo); font-size: 0.86rem; padding: 0.42rem 0.55rem; border: 1px solid var(--linea); border-radius: 4px; width: 100%; background: #fff; }
.modal-ficha .mp-chip input, .modal-ficha .mp-liga-opciones input { width: auto; }
.mp-rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.mp-ancho-2 { grid-column: span 2; }
.mp-bloque { margin-top: 0.8rem; }
.mp-rejilla + .mp-rejilla, .mp-tipo-nuevo + .mp-rejilla, #mp-tipo-aviso + .mp-rejilla { margin-top: 0.7rem; }
.mp-tipo-nuevo, .mp-campo-nuevo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.7rem; padding: 0.55rem; background: #F8F6F3; border-radius: 4px; }
.mp-tipo-nuevo input, .mp-campo-nuevo input { flex: 1; min-width: 12rem; padding: 0.4rem 0.5rem; border: 1px solid var(--linea); border-radius: 4px; }
#mp-tipo-aviso { margin: 0.5rem 0 0; color: var(--oxido-oscuro); }
#mp-campos-ayuda { margin: 0 0 0.6rem; }
.mp-campo-quitar { background: none; border: none; color: var(--texto-tenue); cursor: pointer; font-size: 0.7rem; padding: 0 0.15rem; }
.mp-campo-quitar:hover { color: var(--rojo); }
.mp-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.mp-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.6rem; border: 1px solid var(--linea); border-radius: 999px; font-size: 0.82rem; cursor: pointer; background: #fff; }
.mp-chip:has(input:checked) { background: var(--ambar-fondo); border-color: var(--oxido); }
.mp-vista-previa { margin-top: 0.8rem; padding: 0.6rem 0.7rem; background: #F8F6F3; border-radius: 4px; }
.mp-vista-previa p { margin: 0.25rem 0 0; font-size: 0.82rem; line-height: 1.4; white-space: pre-line; }
.mp-tier { display: grid; grid-template-columns: 7rem 7rem 9rem max-content; justify-content: start; gap: 0.4rem; align-items: center; margin: 0.3rem 0; }
.modal-ficha .mp-sec-cuerpo .btn-chico { align-self: flex-start; width: auto; margin-top: 0.3rem; }
.mp-tier input { min-width: 0; width: 100%; padding: 0.35rem 0.5rem; border: 1px solid var(--linea); border-radius: 4px; }
.mp-tier-cabeza { font-size: 0.74rem; color: var(--texto-tenue); margin-bottom: 0; }
.mp-compra { padding-top: 0.7rem; border-top: 1px dashed var(--linea); }
.mp-fotos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.35rem 0; }
.mp-foto { position: relative; width: 84px; height: 84px; border-radius: 4px; overflow: hidden; border: 1px solid var(--linea); }
.mp-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-foto-quitar { position: absolute; top: 2px; right: 2px; width: 1.25rem; height: 1.25rem; border: none; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.65rem; cursor: pointer; }
.etiqueta-comercializado, .etiqueta-descontinuado { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.4rem; border-radius: 3px; font-size: 0.68rem; font-weight: 600; white-space: nowrap; }
.etiqueta-comercializado { background: var(--ambar-fondo); color: var(--oxido-oscuro); }
.etiqueta-descontinuado { background: #EEE; color: #666; }
@media (max-width: 760px) {
  .mp-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-sec-resumen { display: none; }
}
@media (max-width: 480px) {
  .mp-rejilla { grid-template-columns: 1fr; }
  .mp-ancho-2 { grid-column: auto; }
  .mp-tier { grid-template-columns: 1fr 1fr 1fr max-content; justify-content: stretch; }
}

/* ============ COTIZADOR EN UNA PANTALLA ============ */
.modal-cotizador { max-width: min(1320px, 97vw); width: 100%; height: 95vh; max-height: 95vh; }
.modal-cotizador .modal-encabezado { padding: 0.65rem 1.1rem; }
/* Si la ventana es baja se desliza la forma completa: condiciones, notas y totales nunca quedan cortados en una caja chica */
.cot-cuerpo { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.7rem 1.1rem 0.9rem; overflow-y: auto; min-height: 0; }
.cot-cliente { flex: none; padding-bottom: 0.6rem; border-bottom: 1px solid var(--linea); }
.cot-cliente .nc-campos-arriba { gap: 0.45rem 0.7rem; }
.cot-cliente .campo-label { font-size: 0.72rem; }
.cot-cliente .nc-campos-arriba input, .cot-cliente .nc-campos-arriba select { padding: 0.38rem 0.5rem; }
.cot-principal { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0.9rem; }
.cot-productos { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cot-productos-barra { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.cot-buscador { position: relative; flex: 1; min-width: 14rem; }
.cot-buscador input { width: 100%; padding: 0.5rem 0.7rem; border: 1px solid var(--linea); border-radius: 4px; font-family: var(--fuente-cuerpo); font-size: 0.86rem; }
.cot-productos-barra .nc-botones-agregar { margin-top: 0; }
.nc-sugerencia-vacia { padding: 0.6rem 0.7rem; font-size: 0.82rem; color: var(--texto-tenue); }
/* height: 0 + flex: la lista llena lo que sobra y se desliza por dentro, sin empujar la altura de la forma */
.cot-productos-lista { flex: 1 1 0; height: 0; min-height: 11rem; overflow-y: auto; padding-right: 0.3rem; }
.cot-productos-lista .nc-items-vacio { margin-top: 0; }
.cot-columnas { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 5.2rem 6.5rem 6.5rem 1.6rem; gap: 0.4rem; padding: 0.1rem 0.6rem 0.25rem; background: #fff; font-size: 0.7rem; color: var(--texto-tenue); }
.cot-columnas span:nth-child(4) { text-align: right; }
.cot-partida { border: 1px solid var(--linea); border-radius: 6px; background: #F8F6F3; padding: 0.45rem 0.1rem 0.2rem; }
.cot-partida .nc-item-fila { grid-template-columns: minmax(0, 1fr) 5.2rem 6.5rem 6.5rem 1.6rem; background: transparent; margin-top: 0; padding: 0 0.5rem; }
.cot-partida .nc-item-subtotal { font-size: 0.92rem; }
.cot-partida .nc-r-nombre { font-weight: 600; }
.cot-partida .nc-item-extras { margin: 0.35rem 0.5rem 0; padding: 0.3rem 0.45rem; background: #fff; border-radius: 4px; border: 1px dashed var(--linea); }
.cot-partida .nc-extra input[type=number] { width: 5rem; padding: 0.2rem 0.35rem; border: 1px solid var(--linea); border-radius: 4px; }
.nc-suma-pieza { flex-basis: 100%; font-size: 0.76rem; font-weight: 600; color: var(--tinta); }
.nc-suma-pieza:empty { display: none; }
.nc-extra-promo { font-size: 0.72rem; font-weight: 700; color: var(--verde); }
.cot-partida .nc-item-fila-secundaria { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; padding: 0 0.5rem 0.35rem; }
.cot-partida .nc-item-fila-secundaria > input { flex: 1 1 9rem; width: auto; min-width: 0; }
.cot-partida .nc-item-fila-secundaria > textarea { flex: 1 1 100%; }
.cot-partida .nc-r-promo-fila { flex: 2 1 16rem; min-width: 0; }
.cot-partida .nc-r-promo { padding: 0.33rem 0.4rem; border: 1px solid var(--linea); border-radius: 4px; font-size: 0.78rem; background: #fff; }
.cot-resumen { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--linea); border-radius: 6px; background: #FBFAF8; }
.cot-resumen-scroll { flex: 1 0 auto; padding: 0.7rem; display: flex; flex-direction: column; gap: 0.6rem; }
/* Comprobante (solo al editar): debajo de las notas y a lo ancho, para no empujarlas fuera de la vista */
.cot-productos .nc-comprobante-bloque { flex: none; margin: 0.5rem 0 0; padding: 0.5rem 0.7rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); column-gap: 1rem; align-items: start; }
.cot-productos .nc-comprobante-bloque > * { grid-column: 1; }
.cot-productos .nc-comprobante-titulo { font-size: 0.85rem; }
.cot-productos .nc-comprobante-bloque input[type=number] { width: 100%; padding: 0.38rem 0.5rem; border: 1px solid var(--linea); border-radius: 4px; background: #fff; font-family: var(--fuente-cuerpo); }
.cot-productos .nc-comprobante-bloque .tarjeta-nota { font-size: 0.74rem; margin-bottom: 0.25rem !important; }
.cot-productos .nc-comprobante-bloque .btn-chico { justify-self: start; width: auto; }
.cot-productos .nc-comprobante-bloque .nc-fila-doble { grid-column: 2; grid-row: 1 / span 3; margin-top: 0 !important; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.cot-productos .nc-comprobante-bloque > p.campo-label { grid-column: 2; grid-row: 4; margin-top: 0.2rem !important; font-size: 0.7rem; }
.cot-condiciones { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.cot-condicion-ancha { grid-column: 1 / -1; }
.cot-condiciones select { padding: 0.38rem 0.5rem; }
.cot-condiciones .campo-label, .cot-notas .campo-label { font-size: 0.72rem; }
.cot-notas { flex: none; display: flex; flex-direction: column; margin-top: 0.5rem; }
/* Altura automatica (ajustarNotasCotizacion): el texto se ve completo; solo una nota muy larga se desliza por dentro */
.cot-notas textarea { font-size: 0.78rem; line-height: 1.35; resize: none; overflow-y: auto; max-height: 35vh; }
.cot-resumen-fijo { flex: none; padding: 0.6rem 0.7rem 0.7rem; border-top: 1px solid var(--linea); background: #fff; border-radius: 0 0 6px 6px; }
.cot-resumen-fijo .nc-totales { margin: 0; padding: 0; background: none; border: none; }
.cot-botones { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.55rem; }
.cot-botones .btn-primario { flex: 1; }
@media (max-width: 1000px) {
  .modal-cotizador { height: auto; max-height: 96vh; }
  .cot-cuerpo { display: block; overflow-y: auto; position: relative; padding-bottom: 0; }
  .cot-principal { display: block; }
  .cot-productos-lista { overflow: visible; padding-right: 0; }
  .cot-columnas { display: none; }
  .cot-partida { margin-bottom: 0.5rem; }
  .cot-partida .nc-item-fila { grid-template-columns: 1fr 1fr 1.6rem; }
  .cot-partida .nc-r-nombre, .cot-partida .nc-item-nombre-fijo { grid-column: 1 / -1; }
  .cot-partida .nc-item-subtotal { grid-column: 1 / 2; text-align: left; }
  .cot-partida .nc-extra { flex-wrap: wrap; }
  .cot-resumen { margin-top: 0.6rem; border: none; background: none; }
  .cot-resumen-scroll { padding: 0; }
  .cot-productos-lista { flex: none; height: auto; min-height: 0; overflow: visible; }
  .cot-productos .nc-comprobante-bloque { grid-template-columns: minmax(0, 1fr); }
  .cot-productos .nc-comprobante-bloque .nc-fila-doble, .cot-productos .nc-comprobante-bloque > p.campo-label { grid-column: 1; grid-row: auto; margin-top: 0.4rem !important; }
  /* El total queda siempre a la vista en el celular */
  .cot-resumen-fijo { position: sticky; bottom: 0; z-index: 3; margin: 0.6rem -1.1rem 0; padding: 0.5rem 1.1rem 0.7rem; box-shadow: 0 -4px 10px rgba(0,0,0,0.08); border-radius: 0; }
  .cot-resumen-fijo #nc-iva-fila, .cot-resumen-fijo .nc-totales > div:first-child { display: none; }
}
@media (max-width: 620px) {
  .cot-cliente .nc-campos-arriba { grid-template-columns: 1fr 1fr; }
}

/* ============ RESULTADOS DE PROMOCIONES (Marketing) ============ */
.rm-periodo { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.rm-tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.rm-tarjeta { padding: 0.8rem 1rem; border: 1px solid var(--linea); border-radius: 6px; background: #fff; }
.rm-tarjeta span { display: block; font-size: 0.76rem; color: var(--texto-tenue); }
.rm-tarjeta strong { font-size: 1.35rem; color: var(--tinta); font-variant-numeric: tabular-nums; }
.rm-seccion { margin-bottom: 1.2rem; }
/* Anuncios: gasto contra ventas (lib/campanasAnuncios.js) */
.rm-anuncios-encabezado { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.rm-anuncios-encabezado .pp-seccion-titulo { margin: 0; }
.rm-anuncios td, .rm-anuncios th { white-space: nowrap; }
.rm-anuncios td:first-child { white-space: normal; min-width: 11rem; }
.rm-total td { background: #F6F5F1; }
.rm-aprox { color: var(--texto-tenue); margin-left: 0.15rem; }
.rm-retorno-bien { color: #2E7D32; }
.rm-retorno-mal { color: #B00020; }
.mia-periodo { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.mia-tabla { max-height: 18rem; overflow-y: auto; }
/* Metros de impresion: total por OT (lib/impresion.js totalesPorOT) */
.mi-por-ot { margin-top: 1.2rem; }
.mi-por-ot-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0.6rem; }
.mi-ot { border: 1px solid var(--linea); border-radius: 8px; padding: 0.6rem 0.75rem; background: #fff; }
.mi-ot-titulo { margin-bottom: 0.2rem; }
.mi-ot-frase { font-size: 0.9rem; margin-bottom: 0.2rem; }
.mi-ot-repo { color: #B45309; }
.mi-ot-cerrada { font-size: 0.68rem; font-weight: 600; padding: 0.05rem 0.4rem; border-radius: 8px; background: #E8F5E9; color: #2E7D32; }
.et-imp-frase { margin: 0.3rem 0 0; font-size: 0.88rem; }
.mca-switch { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.modal-ficha [hidden], .modal-cotizador [hidden] { display: none !important; }

/* ============ Bordados por lugar (lib/bordados.js) ============ */
.nc-bordados { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.bd-modal { max-width: min(68rem, 96vw); width: 100%; }
.bd-vistas { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; margin: 0.4rem 0 0.7rem; }
.bd-vista { flex: 0 1 14.5rem; min-width: 11rem; }
.bd-vista:only-child { flex-basis: 30rem; }
.bd-vista-nombre { text-align: center; font-size: 0.78rem; color: var(--texto-secundario, #666); margin-top: 0.15rem; }
.bd-lienzo { position: relative; background: #fff; border-radius: 6px; line-height: 0; }
.bd-lienzo img { width: 100%; display: block; }
.bd-zona { position: absolute; padding: 0; background: rgba(242, 169, 0, 0.1); border: 1.5px dashed #b67f00; border-radius: 3px; cursor: pointer; font-weight: 700; font-size: 0.8rem; line-height: 1; color: #000; min-height: 0; min-width: 0; }
.bd-zona:hover { background: rgba(242, 169, 0, 0.35); }
.bd-zona-on { background: rgba(242, 169, 0, 0.75); border-style: solid; }
.bd-zona-ocupada { background: rgba(120, 120, 120, 0.35); border-style: solid; cursor: not-allowed; }
.bd-fila { display: grid; grid-template-columns: minmax(7.5rem, 1.2fr) 5.5rem 5rem minmax(6rem, 1.2fr) 4.2rem minmax(8.5rem, 1.1fr) 5rem 1.6rem; gap: 0.4rem; align-items: center; padding: 0.3rem 0; border-top: 1px solid #e5e5e5; font-size: 0.82rem; }
.bd-fila input, .bd-fila select { width: 100%; min-width: 0; padding: 0.25rem 0.35rem; font-size: 0.82rem; box-sizing: border-box; }
.bd-fila-cab { font-size: 0.72rem; color: #666; border-top: 0; padding-bottom: 0; }
.bd-precio-caja { display: flex; gap: 0.2rem; align-items: center; min-width: 0; }
.bd-precio-caja .bd-precio { flex: 1 1 3.2rem; }
.bd-chips { display: flex; gap: 0.15rem; }
.bd-chip { padding: 0.12rem 0.25rem; font-size: 0.72rem; border: 1px solid #bbb; border-radius: 4px; background: #fff; color: #222; cursor: pointer; }
.bd-chip-on { background: #F2A900; border-color: #b67f00; }
.bd-importe { text-align: right; font-variant-numeric: tabular-nums; }
.bd-total { text-align: right; font-weight: 600; margin-top: 0.5rem; }
.bd-hoja-producto { font-size: 0.95rem; margin: 0.7rem 0 0.3rem; }
#mhb-contenido input { width: 100%; box-sizing: border-box; }
#mhb-contenido td:first-child, #mhb-contenido th:first-child { min-width: 12rem; text-align: left; }
@media (max-width: 720px) {
  .bd-fila { grid-template-columns: 1fr 1fr; }
  .bd-fila-cab { display: none; }
  .bd-lugar { grid-column: 1 / -1; font-weight: 600; }
}
/* Hoja de bordado impresa: como la hoja de papel, una por vista */
.bd-impresion { background: #fff; color: #000; }
.bd-hoja { padding: 0.4rem; font-size: 11pt; }
.bd-hoja-cab { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 0.6rem; }
.bd-hoja-logo { width: 9rem; max-height: 5rem; object-fit: contain; }
.bd-hoja-datos { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1rem; margin: 0; }
.bd-hoja-datos > div { display: flex; gap: 0.4rem; border-bottom: 1px solid #000; }
.bd-hoja-datos .bd-ancho { grid-column: 1 / -1; }
.bd-hoja-datos dt { font-size: 8.5pt; white-space: nowrap; }
.bd-hoja-datos dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.bd-hoja-producto-nombre { font-size: 12pt; }
.bd-hoja-medio { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-bottom: 0.6rem; }
.bd-hoja-lienzo { max-width: 26rem; }
.bd-hoja-medio > .bd-hoja-logos:only-child { grid-column: 1 / -1; }
.bd-zona-imp { position: absolute; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11pt; line-height: 1; }
.bd-zona-imp-on { background: rgba(242, 169, 0, 0.55); border: 1.5px solid #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bd-hoja-logos h3 { font-size: 10pt; margin: 0 0 0.25rem; }
.bd-hoja-logo-fila { border-bottom: 1px solid #000; padding: 0.3rem 0; font-size: 10pt; }
.bd-hoja-desc { white-space: pre-line; font-size: 9pt; margin: 0; }
.bd-hoja-logos h3 + p, .bd-hoja-logo-fila + h3 { margin-top: 0.5rem; }
.bd-hoja-tabla { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.bd-hoja-tabla th, .bd-hoja-tabla td { border: 1px solid #000; padding: 0.35rem; text-align: left; height: 1.5rem; }
@page bordado { size: letter; margin: 8mm; }
@media print {
  body:has(#panel-impresion-bordado:not([hidden])) > *:not(#panel-impresion-bordado) { display: none !important; }
  #panel-impresion-bordado { page: bordado; }
  .bd-hoja { break-after: page; break-inside: avoid; }
  .bd-hoja:last-child { break-after: auto; }
}

/* Avance de cada estacion en la misma OT (cola y pantalla de la estacion) */
.ot-tira { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.35rem; }
.ot-tira-paso { padding: 0.05rem 0.4rem; border-radius: 4px; border: 1px solid var(--linea); color: var(--texto-tenue); font-size: 0.72rem; white-space: nowrap; }
.ot-tira-completo { background: #E6F4EA; border-color: #BFE3CB; color: #1E6B3A; }
.ot-tira-en_proceso { background: #FCF1DF; border-color: #EFD3A1; color: #8A5A12; }
.ot-tira-mia { border-color: var(--tinta); color: var(--tinta); font-weight: 700; }
.mvc-folio-ref { margin-top: 0.15rem; font-size: 0.8rem; font-weight: 700; color: var(--oxido); }

/* Ficha del producto: ayudas, definiciones y vista previa con mas contraste (antes --texto-tenue en letra chica) */
.modal-ficha { --texto-ficha: #3A414B; }
.modal-ficha .config-ayuda, .modal-ficha .mp-def { color: var(--texto-ficha); font-size: 0.78rem; }
.modal-ficha .mp-vista-desc, .modal-ficha .mp-vista-unidad { color: var(--texto-ficha); font-size: 0.72rem; }
.modal-ficha .mp-vista-nota, .modal-ficha .mp-vista-donde, .modal-ficha .mp-vista-pdf th { color: var(--texto-ficha); }
.modal-ficha .mp-vista-nota { font-size: 0.74rem; }

/* Catalogo > Listas (catalogo v2): familias -> lineas y estilos con tallas */
.lc-caja { max-width: min(1100px, 96vw); max-height: 92vh; }
.lc-caja .modal-cuerpo { overflow-y: auto; }
.lc-pestanas { display: flex; gap: 0.3rem; border-bottom: 1px solid var(--linea); margin-bottom: 0.8rem; }
.lc-pestana { background: none; border: none; border-bottom: 3px solid transparent; padding: 0.5rem 0.9rem; font-family: var(--fuente-cuerpo); font-size: 0.9rem; color: var(--texto-tenue); cursor: pointer; }
.lc-pestana.activa { color: var(--tinta); border-bottom-color: var(--oxido); font-weight: 600; }
.lc-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.lc-subtitulo { font-family: var(--fuente-titulo); font-size: 1rem; margin: 0.4rem 0 0.5rem; }
.lc-lista { display: flex; flex-direction: column; gap: 0.3rem; }
.lc-fila { display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.5rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); background: var(--papel-tarjeta); cursor: default; }
#lc-lista-familias .lc-fila { cursor: pointer; }
.lc-fila.elegida { border-color: var(--oxido); box-shadow: inset 3px 0 0 var(--oxido); }
.lc-fila.inactiva { opacity: 0.6; }
.lc-fila input[type=text] { flex: 1; min-width: 0; font-family: var(--fuente-cuerpo); font-size: 0.86rem; padding: 0.3rem 0.45rem; border: 1px solid var(--linea); border-radius: 4px; }
.lc-estilo-nombre { min-width: 7rem; font-size: 0.88rem; }
.lc-activo { display: flex; align-items: center; gap: 0.2rem; font-size: 0.8rem; color: var(--texto-tenue); white-space: nowrap; }
.lc-uso { font-size: 0.75rem; color: var(--texto-tenue); white-space: nowrap; }
.lc-ver { font-size: 0.78rem; white-space: nowrap; }
.lc-agregar { display: flex; gap: 0.4rem; margin-top: 0.6rem; }
.lc-agregar input { flex: 1; min-width: 0; font-family: var(--fuente-cuerpo); font-size: 0.86rem; padding: 0.35rem 0.5rem; border: 1px solid var(--linea); border-radius: 4px; }
.lc-agregar .lc-tallas { flex: 2; }
@media (max-width: 760px) {
  .lc-columnas { grid-template-columns: 1fr; }
  .lc-fila { flex-wrap: wrap; }
}

/* Bordados: prenda a elegir (servicio suelto o producto sin dibujo), lugar escrito a mano y medida con tamano "Otro" */
.bd-prenda { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.bd-prenda .campo-label { margin: 0; }
.bd-lugar-libre { display: flex; align-items: center; gap: 0.3rem; }
.bd-tamano-caja { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
#mbd-agregar-lugar { margin: 0.4rem auto; }

/* Entregas parciales (lib/entregasParciales.js): detalle del pedido, OT impresa, estacion y Pizarron */
.ep-lista { display: flex; flex-direction: column; gap: 0.6rem; }
.ep-item { border: 1px solid var(--linea); border-left: 4px solid var(--oxido); border-radius: var(--radio-chico); padding: 0.6rem 0.75rem; }
.ep-item-entregada { border-left-color: var(--verde); background: var(--verde-fondo); }
.ep-item-cab { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 0.8rem; align-items: baseline; }
.ep-estado { font-size: 0.82rem; color: var(--texto-tenue); }
.ep-estado.ep-urgente { color: var(--rojo); font-weight: 700; }
.ep-estado.ep-entregada { color: var(--verde); font-weight: 600; }
.ep-item-nota { font-size: 0.85rem; color: var(--texto-tenue); margin-top: 0.2rem; white-space: pre-line; }
.ep-piezas { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; align-items: center; }
.ep-producto { font-size: 0.8rem; font-weight: 600; margin-right: 0.2rem; }
.ep-chip { font-size: 0.82rem; border: 1px solid var(--linea); border-radius: 999px; padding: 0.1rem 0.55rem; background: var(--papel); }
.ep-acciones { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.5rem; }
.ep-modal { max-width: 640px; }
.ep-campos { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; margin-bottom: 0.6rem; }
.ep-campos label { display: flex; flex-direction: column; gap: 0.2rem; }
.ep-campo-nota { flex: 1; min-width: 200px; }
.ep-prenda { margin-top: 0.6rem; }
.ep-prenda-titulo { font-size: 0.9rem; margin: 0 0 0.3rem; }
.ep-tabla .num { text-align: right; }
.ep-tabla .ep-cant { width: 5rem; text-align: right; }
.ep-tabla .ep-cant.campo-invalido { border-color: var(--rojo); background: var(--rojo-fondo); }
.ep-total { margin-top: 0.6rem; font-weight: 700; text-align: right; }
.ep-produccion { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.ep-produccion-item { border: 2px solid var(--oxido); border-radius: 6px; padding: 0.45rem 0.7rem; background: #FFF1F3; }
.ep-produccion-cab { font-weight: 700; color: var(--oxido-oscuro); }
.ep-produccion-nota { font-weight: 400; color: var(--texto); }
.ep-produccion-hechas { font-size: 0.85rem; color: var(--verde); }
.ep-produccion-ot { margin: 0.4rem 0; }
.ep-produccion-ot .ep-produccion-item { border: 2px solid #000; border-radius: 0; background: none; padding: 0.3rem 0.6rem; }
.ep-produccion-ot .ep-produccion-cab { color: #000; }
.ep-produccion-ot .ep-chip { border-color: #000; }
.ep-produccion-ot .ep-produccion-hechas { color: #000; }
.pz-parcial { display: block; font-size: 0.72rem; color: var(--oxido-oscuro); font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) {
  .ep-tabla .ep-cant { width: 4rem; }
}

/* Especificaciones de la OT con listas (lib/especificacionesOT.js) */
.mpp-esp-ayuda { margin: 0.6rem 0 0.2rem; }
.pp-esp-cambios { font-size: 0.78rem; margin: 0 0 0.6rem; }
.pp-esp-cambios summary { cursor: pointer; color: var(--texto-tenue); }
.pp-esp-cambios ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.pp-esp-cambios li span { color: var(--texto-tenue); }
.lc-esp-campo { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.6rem; max-width: 320px; }

/* Orden por columna: flechas en los encabezados de Pedidos, Cotizaciones y Catalogo (lib/filtrosListas.js) */
.th-orden-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.th-orden-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }
.th-orden-btn:disabled { cursor: default; }
.th-orden-btn:disabled .th-flecha { display: none; }
.th-flecha { font-size: 0.75em; opacity: 0.3; min-width: 0.8em; }
.th-orden-btn:hover .th-flecha { opacity: 0.7; }
.th-orden-activa .th-flecha { opacity: 1; color: var(--rojo, #E30613); }

/* Resumen de la OT (Metros de impresion): para leer en pantalla, no para imprimir */
.mi-ver-ot { all: unset; cursor: pointer; color: inherit; text-decoration: underline; text-decoration-color: var(--linea); text-underline-offset: 3px; }
.mi-ver-ot:hover { text-decoration-color: currentColor; }
.mi-ver-ot:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }
.mro-datos { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-bottom: 0.6rem; font-size: 0.92rem; }
.mro-datos b { font-weight: 600; color: var(--texto-tenue); margin-right: 0.25rem; }
.mro-seccion { font-size: 0.95rem; margin: 1.1rem 0 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--linea); }
.mro-imagenes { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.mro-imagenes .et-diseno-img.et-diseno-principal { width: min(100%, 420px); }
.mro-imagenes .et-diseno-img.et-diseno-principal img { width: 100%; height: auto; max-height: 420px; }
.mro-ligas { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.mro-frase { margin: 0 0 0.5rem; }

/* ---- Finanzas (lib/finanzas.js) ---- */
.fin-borrador { font-size: 0.7rem; font-family: var(--fuente-texto, inherit); background: var(--ambar-fondo); color: var(--oxido-oscuro); padding: 0.15rem 0.5rem; border-radius: 999px; vertical-align: middle; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.fin-candado { max-width: 420px; display: flex; flex-direction: column; gap: 0.8rem; }
.fin-candado[hidden] { display: none; }
#fin-bloquear { white-space: nowrap; }
.fin-candado .campo { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; }
.fin-h2 { font-family: var(--fuente-titulo); font-size: 1.1rem; margin: 1.6rem 0 0.6rem; color: var(--tinta); }
.fin-candado .fin-h2 { margin-top: 0; }
.fin-nota { font-size: 0.82rem; color: var(--texto-tenue); margin: 0 0 0.8rem; line-height: 1.4; }
.fin-avisos { background: var(--ambar-fondo); border: 1px solid #E8C994; border-radius: 6px; padding: 0.6rem 0.9rem; font-size: 0.85rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.fin-tabla thead th:first-child, .fin-tabla tbody td:first-child { width: auto; text-align: left; }
.fin-tabla th { white-space: nowrap; }
.fin-der { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-tenue { color: var(--texto-tenue); }
.fin-neg { color: var(--rojo); font-weight: 600; }
.fin-pos { color: var(--verde); }
.fin-parcial td { font-style: italic; }
.fin-falta { color: var(--rojo); font-size: 0.8rem; }
.fin-aviso-celda { font-size: 0.8rem; min-width: 160px; }
.fin-detalle summary { cursor: pointer; font-weight: 600; }
.fin-variante { font-size: 0.8rem; margin: 0.4rem 0 0.2rem 0.9rem; }
.fin-variante ul { margin: 0.2rem 0 0; padding-left: 1.1rem; }
.fin-barra { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.7rem; }
.fin-barra input[type="search"] { flex: 1 1 220px; max-width: 360px; }
.fin-celda-ancha { min-width: 220px; }
.fin-acciones { white-space: nowrap; text-align: right; }
.fin-editando td { background: #FBF8F2; vertical-align: top; }
.fin-editando input, .fin-editando select { width: 100%; min-width: 90px; font-size: 0.82rem; padding: 0.3rem 0.4rem; }
.fin-editando .fin-input-num { min-width: 80px; }
.fin-editando .fin-input-ancho { min-width: 220px; }
.fin-barra-der { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.fin-importar { display: flex; flex-direction: column; gap: 0.9rem; }
.fin-importar .campo { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; }
.fin-importar .campo[hidden] { display: none; }
.fin-errores { background: #FBEAEA; border-color: #E5B3B3; color: #7A1A1A; }
.fin-imp-tabla { font-size: 0.85rem; margin-bottom: 0.7rem; }
.fin-imp-tabla ul { margin: 0.3rem 0 0; padding-left: 1.2rem; max-height: 220px; overflow-y: auto; }
.fin-grupo td { background: #F4F1EC; font-weight: 700; }

/* ---- Finanzas: pestañas por grupo, ayuda "?", gráficas y reportes (migración 060) */
#fin-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.fin-tabs-grupo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.fin-tabs-titulo { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texto-tenue); font-weight: 700; margin-right: 0.2rem; }
.fin-ayuda { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--linea); background: #F4F1EC; color: var(--tinta-suave); font-size: 0.68rem; font-weight: 700; line-height: 1; padding: 0; cursor: pointer; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.fin-ayuda:hover, .fin-ayuda:focus-visible { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.fin-pop { position: absolute; z-index: 3000; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: 0 8px 28px rgba(23, 33, 44, 0.18); padding: 0.75rem 0.9rem; font-size: 0.84rem; line-height: 1.45; color: var(--texto); }
.fin-pop-titulo { font-weight: 700; margin-bottom: 0.3rem; color: var(--tinta); }
.fin-pop-ejemplo { margin-top: 0.45rem; padding: 0.4rem 0.55rem; background: #F7F5F0; border-radius: var(--radio-chico); font-size: 0.8rem; color: var(--tinta-suave); }
.fin-pop-mas { margin-top: 0.4rem; font-size: 0.78rem; }
.fin-stat-nota { font-size: 0.72rem; color: var(--texto-tenue); margin-top: 0.25rem; line-height: 1.3; }
.fin-grafica { width: 100%; height: auto; max-width: 900px; display: block; margin: 0.3rem 0 0.2rem; }
.fin-g-barra { fill: var(--tinta-suave); }
.fin-g-barra-tenue { fill: #A9B4BF; }
.fin-g-barra-2 { fill: #C9A66B; }
.fin-g-alerta { fill: #D98A3D; }
.fin-g-neg { fill: var(--rojo); }
.fin-g-eje { stroke: #B8B4AC; stroke-width: 1; }
.fin-g-ref { stroke: var(--verde); stroke-width: 1.5; stroke-dasharray: 5 4; }
.fin-g-ref.fin-g-ref-2 { stroke: var(--oxido); }
.fin-g-ref-txt { font-size: 11px; fill: var(--verde); font-weight: 600; }
.fin-g-ref-txt.fin-g-ref-2 { fill: var(--oxido); }
.fin-g-etq, .fin-g-etq-izq, .fin-g-val { font-size: 11px; fill: var(--texto-tenue); }
.fin-g-val { fill: var(--texto); font-variant-numeric: tabular-nums; }
.fin-leyenda { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.75rem; color: var(--texto-tenue); margin-bottom: 0.8rem; }
.fin-leyenda i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 0.3rem; vertical-align: middle; }
.fin-leyenda i.fin-g-barra { background: var(--tinta-suave); }
.fin-leyenda i.fin-g-barra-tenue { background: #A9B4BF; }
.fin-leyenda i.fin-g-barra-2 { background: #C9A66B; }
.fin-leyenda i.fin-g-neg { background: var(--rojo); }
.fin-leyenda i.fin-g-ref { height: 0; border-top: 2px dashed var(--verde); }
.fin-leyenda i.fin-g-ref-2 { height: 0; border-top: 2px dashed var(--oxido); }
.fin-er th, .fin-er td { white-space: nowrap; }
.fin-er-estado { font-size: 0.68rem; font-weight: 400; color: var(--texto-tenue); }
.fin-er-acciones .btn-texto { display: block; margin-left: auto; font-size: 0.75rem; }
.fin-subtotal td { font-weight: 600; border-top: 1px solid var(--linea); }
.fin-total td { font-weight: 700; background: #F4F1EC; }
.fin-sin-pres td { background: #FBF6EC; }
.fin-dos-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.fin-h3 { font-size: 0.9rem; margin: 0.4rem 0 0.4rem; color: var(--tinta); }
.fin-semana-btn { font-weight: 600; font-size: 0.8rem; }
.fin-c-grupo[hidden], .fin-concepto[hidden] { display: none; }
.fin-concepto { padding: 0.6rem 0.8rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); margin-bottom: 0.5rem; font-size: 0.86rem; line-height: 1.45; max-width: 820px; }
.fin-concepto-t { font-weight: 700; color: var(--tinta); margin-bottom: 0.2rem; }
.fin-resaltado { border-color: var(--oxido); box-shadow: 0 0 0 2px rgba(242, 10, 55, 0.15); }
.fin-deshecho td { text-decoration: line-through; color: var(--texto-tenue); }
.fin-deshecho td:last-child { text-decoration: none; }
select.fin-sin-liga { border-color: #E8C994; background: #FFFBF2; }
.fin-filtros label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; }
.fin-solo-imprimir { display: none; }
@media (max-width: 640px) {
  #fin-tabs { flex-direction: column; gap: 0.5rem; }
  .fin-pop { font-size: 0.8rem; }
}
@media print {
  body:has(#panel-finanzas:not([hidden])) .panel:not(#panel-finanzas) { display: none !important; }
  #panel-finanzas .panel-encabezado, #fin-tabs, #fin-cargando, .fin-ayuda, .fin-barra, .fin-acciones { display: none !important; }
  .fin-solo-imprimir { display: block; margin-bottom: 0.6rem; font-size: 0.85rem; }
  #panel-finanzas .tabla-scroll { overflow: visible !important; }
  #panel-finanzas .fin-tabla { font-size: 0.7rem; }
  #panel-finanzas .fin-h2 { break-after: avoid; }
  #panel-finanzas .fin-grafica { max-width: 100%; break-inside: avoid; }
  #panel-finanzas details { display: block; }
}
.fin-liga-prop { margin-bottom: 1rem; }

/* Visor de fotos del catalogo (clic en la foto de la lista o en la lupa de Ver catalogo) */
.tabla-foto-mini[data-ver-foto] { cursor: zoom-in; }
.msc-card-img { position: relative; }
.ver-foto-lupa { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: none; border-radius: 50%; background: rgba(255,255,255,0.92); box-shadow: 0 1px 4px rgba(0,0,0,0.25); cursor: zoom-in; font-size: 0.9rem; line-height: 1; padding: 0; }
.ver-foto-lupa:hover { background: #fff; }
.visor-foto { position: fixed; inset: 0; z-index: 3000; background: rgba(15,15,15,0.88); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.visor-foto[hidden] { display: none; }
.visor-foto img { max-width: 90vw; max-height: 86vh; object-fit: contain; background: #fff; border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,0.5); cursor: default; }
.visor-foto button { position: absolute; border: none; background: rgba(255,255,255,0.15); color: #fff; cursor: pointer; border-radius: 50%; width: 46px; height: 46px; font-size: 1.6rem; line-height: 1; }
.visor-foto button:hover { background: rgba(255,255,255,0.3); }
.visor-foto button[hidden] { display: none; }
.visor-foto-cerrar { top: 18px; right: 18px; font-size: 1.2rem !important; }
.visor-foto-ant { left: 18px; top: 50%; transform: translateY(-50%); }
.visor-foto-sig { right: 18px; top: 50%; transform: translateY(-50%); }
.visor-foto-cuenta { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 0.85rem; }

/* Cobro por metro (lib/unidades.js): etiqueta en el producto del pedido y selector pieza/metro */
.etiqueta-metros { font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 10px; background: #E3F2FD; color: #1565C0; margin-left: 0.3rem; }
.pp-unidad-wrap, .nc-r-por-metro-wrap { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--texto-tenue); }
.pp-unidad-wrap select, .nc-r-por-metro-wrap select { font-size: 0.78rem; padding: 0.1rem 0.3rem; }

/* Pizarron: producido el dia (19 nov 2026) */
.pz-dia { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.pz-dia input { padding: 4px 6px; }
.pz-dia-resumen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; background: #FFF8E1; border: 1px solid #F0D98A; border-radius: 6px; font-size: 13px; }
.pz-dia-chip { background: #fff; border: 1px solid #E5D9A8; border-radius: 12px; padding: 2px 10px; }
.pizarron td.pz-dia-hecho { outline: 2px solid #E0A800; outline-offset: -2px; font-weight: 600; }

/* Mockup en la OT (19 nov 2026): elegir en pantalla e imprimir cada imagen en su hoja despues de la OT */
.ot-elegir-mkp { border: 1px solid #E5D9A8; background: #FFF8E1; border-radius: 6px; padding: 0.6rem 0.8rem; margin: 0 0 1rem; font-size: 0.85rem; }
.ot-elegir-mkp p { margin: 0 0 0.5rem; }
.ot-mkp-opciones { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ot-mkp-opcion { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; width: 120px; padding: 0.35rem; border: 1px solid #ddd; border-radius: 6px; background: #fff; cursor: pointer; font-size: 0.75rem; text-align: center; }
.ot-mkp-opcion:has(input:checked) { border-color: #C8102E; box-shadow: 0 0 0 2px #C8102E33; }
.ot-mkp-opcion img { width: 100%; height: 100px; object-fit: contain; background: #f6f6f6; }
.ot-mkp-hoja { break-before: page; page-break-before: always; text-align: center; }
.ot-mkp-cabecera { display: flex; justify-content: space-between; gap: 1em; border-bottom: 2px solid #111; padding-bottom: 0.3em; margin-bottom: 0.6em; font-size: 1.1em; text-align: left; }
.ot-mkp-hoja img { max-width: 100%; max-height: 235mm; object-fit: contain; }
.ot-en-pantalla .ot-mkp-hoja { border-top: 3px dashed #bbb; margin-top: 1.5rem; padding-top: 1rem; }
.ot-en-pantalla .ot-mkp-hoja img { max-height: 80vh; }
.ot-midiendo .ot-elegir-mkp, .ot-midiendo #oti-mockups { display: none !important; }

/* OT con entregas parciales ya entregadas (19 nov 2026): Pedido / Entregado / Falta */
.ot-desglose-falta td:nth-child(-n+3), .ot-desglose-falta th:nth-child(-n+3) { width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; }
.ot-desglose-falta td:nth-child(4), .ot-desglose-falta th:nth-child(4) { width: 3.6em; }
.ot-desglose-falta td:nth-child(5), .ot-desglose-falta th:nth-child(5) { width: auto; }
.ot-desglose-falta td:nth-child(7), .ot-desglose-falta th:nth-child(7) { width: 3.2em; }
.ot-fila-entregada td { color: #888; }
.ot-midiendo #oti-opcion-falta { display: none !important; }

.archivo-mkp-ot { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; font-size: 0.8rem; cursor: pointer; }

/* Reportar pieza dañada encima de la vista previa de la OT (19 nov 2026) */
#modal-reportar-dano { z-index: 2100; }

/* Partes de la pieza dañada como botones y prenda a escoger (19 nov 2026) */
.et-dano-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0; }
.et-dano-chips .btn-chip { font-size: 0.8rem; padding: 0.25rem 0.65rem; }
.btn-chip-par { font-weight: 600; }
.et-dano-tipo { margin-bottom: 0.5rem; }

/* Varias partes de una vez al reportar desde el Pizarron (19 nov 2026) */
.et-dano-agregar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
.mrd-lista { margin-top: 0.6rem; display: grid; gap: 0.3rem; }

/* Reposiciones por OT con detalle y notas (19 nov 2026) */
.rep-fila { cursor: pointer; }
.rep-fila:hover td { background: #FFF6F7; }
.rep-detalle-cabecera { margin: 0.4rem 0 0.9rem; }
.rep-detalle-cabecera h2 { margin: 0; font-size: 1.15rem; color: var(--tinta); }
.rep-detalle-cabecera span { font-size: 0.88rem; color: var(--texto-tenue); }
.rep-detalle { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.rep-notas h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.rep-notas textarea { width: 100%; box-sizing: border-box; }
.rep-notas-botones { display: flex; justify-content: flex-end; margin: 0.4rem 0 0.8rem; }
@media (max-width: 900px) { .rep-detalle { grid-template-columns: 1fr; } }

/* Editar y quitar desde el detalle de Reposiciones (19 nov 2026) */
.rep-acciones { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.rep-editar-quitar { display: flex; gap: 0.6rem; }

/* Clientes (19 nov 2026): nombre a la izquierda y ancho, numeros, ficha y posibles duplicados */
#clientes-tabla thead th:first-child, #clientes-tabla tbody td:first-child { width: auto; text-align: left; }
.col-cliente-nombre { min-width: 220px; text-align: left; font-weight: 600; }
.col-cliente-tel { white-space: nowrap; }
#clientes-tabla .col-num { text-align: right; white-space: nowrap; }
.mec-ficha { margin-top: 1.1rem; border-top: 1px solid var(--borde, #e5e5e5); padding-top: 0.8rem; }
.mec-ficha-resumen { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; margin-bottom: 0.4rem; }
.mec-ficha-titulo { font-size: 0.95rem; margin: 0.9rem 0 0.4rem; }
.mec-ficha-tabla { max-height: 220px; overflow: auto; }
.mec-ficha-tabla .tabla thead th:first-child, .mec-ficha-tabla .tabla tbody td:first-child { width: auto; text-align: left; }
.mdc-caja { max-width: 1100px; }
.mdc-grupo { margin-bottom: 0.9rem; }
.mdc-grupo-cab { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.mdc-tabla { width: 100%; }
.mdc-tabla .mdc-accion { min-width: 230px; }
.mdc-fila-queda td { background: #F1FAF3; }
.mdc-grupo-pie { display: flex; justify-content: flex-end; gap: 0.8rem; margin-top: 0.6rem; }

/* Codigo de cliente (20 nov 2026) */
#clientes-tabla .col-cliente-codigo { width: 4.5rem; text-align: right; color: var(--texto-tenue); white-space: nowrap; }
#clientes-tabla thead th:first-child { text-align: right; }
.nc-cliente-fijo { background: var(--fondo-suave, #f3f3f1); font-weight: 600; cursor: default; }
.nc-cliente-quitar { font-size: 0.72rem; margin-left: 0.4rem; padding: 0; }
.nc-cliente-quitar[hidden] { display: none; }
/* Codigo angosto junto al nombre: juntos ocupan dos columnas de la cotizacion */
.nc-codigo-nombre { grid-column: span 2; display: flex; gap: 0.7rem; min-width: 0; }
.nc-codigo-nombre > .campo:first-child { flex: 0 0 5.5rem; }
.nc-codigo-nombre > .campo:last-child { flex: 1; min-width: 0; }
@media (max-width: 620px) { .nc-codigo-nombre { grid-column: 1 / -1; } }

/* Personas de contacto del cliente (migracion 068) */
.mec-personas { margin-top: 1rem; }
.mec-persona { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--linea); font-size: 0.88rem; }
.mec-persona-principal { font-size: 0.7rem; color: var(--verde); border: 1px solid var(--verde); border-radius: 3px; padding: 0 0.3rem; margin-left: 0.3rem; }
.mec-persona-acciones { display: flex; gap: 0.6rem; white-space: nowrap; }
.mec-personas-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto auto; gap: 0.4rem; margin-top: 0.5rem; align-items: center; }
.mec-personas-form input { padding: 0.4rem 0.5rem; border: 1px solid var(--linea); border-radius: 4px; font: inherit; font-size: 0.85rem; min-width: 0; }
@media (max-width: 620px) { .mec-personas-form { grid-template-columns: 1fr; } }

/* Caja Codigo que busca (20 nov 2026): la lista ocupa Codigo y Nombre */
.nc-codigo-nombre { position: relative; }
.nc-codigo-sugerencias { top: 100%; }

/* Consultas (20 nov 2026, lib/consultas.js) */
.cq-filtros { margin-top: 0.8rem; }
.cq-filtros .cq-cliente { max-width: 220px; }
.cq-totales { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 0.6rem; }
.cq-tabla-tallas { width: auto; min-width: 320px; }
.cq-fila-total td { font-weight: 700; border-top: 2px solid var(--borde, #ddd); }
.cq-tallas { font-size: 0.82rem; color: var(--texto-tenue); min-width: 180px; }
.cq-ver-pedido { background: none; border: 0; padding: 0; color: var(--oxido); cursor: pointer; text-decoration: underline; font: inherit; font-weight: 600; }
.cq-barra { position: relative; min-width: 140px; height: 1.35rem; background: rgba(0, 0, 0, 0.04); border-radius: 3px; }
.cq-barra span { position: absolute; inset: 0 auto 0 0; background: rgba(200, 16, 46, 0.18); border-radius: 3px; }
.cq-barra em { position: relative; font-style: normal; font-size: 0.82rem; padding: 0 0.4rem; line-height: 1.35rem; white-space: nowrap; }
.cq-saldo { color: #B00020; }

/* Consultas > Almacen (20 nov 2026, lib/almacen.js) */
.cq-entra { color: #1B7A3A; }
.cq-sale { color: #9A5B00; }
.cq-negativo, .cq-negativo strong { color: #B00020; font-weight: 700; }
.cq-bajo-minimo td:first-child { box-shadow: inset 3px 0 0 #E0A100; }
.cq-papelera { background: rgba(176, 0, 32, 0.05); }
.cq-papelera-nota { font-size: 0.75rem; font-weight: 700; color: #B00020; }
.cq-aviso { border-left: 3px solid #B00020; padding-left: 0.6rem; }
.cq-mov { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.4rem; border-radius: 3px; }
.cq-mov-entrada { background: rgba(27, 122, 58, 0.12); color: #1B7A3A; }
.cq-mov-salida { background: rgba(154, 91, 0, 0.12); color: #9A5B00; }

/* Mockup corregido (20 nov 2026, lib/flujoDiseno.js) */
.mkc-bloque { border-left: 3px solid var(--oxido); padding-left: 0.6rem; }
.mkc-vigente { font-size: 0.7rem; font-weight: 700; color: #1B7A3A; background: rgba(27, 122, 58, 0.12); padding: 0.05rem 0.4rem; border-radius: 3px; }
.mkc-motivo { font-size: 0.85rem; }
.mkc-anterior { opacity: 0.7; }
.mmc-vista img { max-width: 100%; max-height: 260px; display: block; margin: 0.4rem 0; border: 1px solid #ddd; }
.ot-mkp-nota { font-size: 11pt; font-weight: 600; margin: 0.2rem 0 0.4rem; color: #B00020; }
.ot-mkp-liga { font-size: 9pt; margin-top: 0.3rem; word-break: break-all; color: #333; }
.et-mkc-motivo { display: block; font-style: normal; font-size: 0.75rem; color: #B00020; }
