/* ArtisJet Cotizador UI - Hoja de Estilos Aislada (v0.1.4) */

/* =========================================================
   TOKENS DE DISEÑO ARTISJET (Scoped a .v2-app-scope)
   ========================================================= */
.v2-app-scope{
  --ui-primary:#008BD2;
  --ui-primary-hover:#0079B8;
  --ui-primary-soft:#EAF7FD;
  --ui-ink:#17242C;
  --ui-text:#34454F;
  --ui-muted:#71818A;
  --ui-border:#DCE5E9;
  --ui-border-strong:#C7D4DA;
  --ui-surface:#FFFFFF;
  --ui-background:#F3F7F9;
  --ui-danger:#D83B3B;
  --ui-danger-soft:#FFF0F0;
  --ui-success:#17875D;
  --ui-success-soft:#EAF8F2;
  --ui-amber:#8A6116;
  --ui-amber-soft:#FFF7E6;
  --ui-amber-border:#F3D48C;
}

/* Scoped resets for ArtisJet Cotizador UI within WordPress / Astra / Elementor */
.v2-app-scope, .v2-app-scope *{box-sizing:border-box;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
.v2-app-scope{
  margin:0;
  padding:0;
  background:var(--ui-background);
  color:var(--ui-text);
  font-family:'Montserrat',sans-serif;
  -webkit-font-smoothing:antialiased;
}
.v2-app-scope button, .v2-app-scope input, .v2-app-scope select, .v2-app-scope textarea{font-family:inherit;}
.v2-app-scope button{ -webkit-tap-highlight-color:transparent; }

.v2-app-scope :focus-visible{ outline:2.5px solid var(--ui-primary); outline-offset:2px; }

/* LOCAL-ESTABILIDAD-01A: Precedencia absoluta para el atributo [hidden] en todo el alcance del cotizador */
#artisjetCotizadorRoot[hidden],
#artisjetCotizadorRoot [hidden],
.v2-app-scope[hidden],
.v2-app-scope [hidden]{
  display:none !important;
}

@media (prefers-reduced-motion:reduce){
  .v2-app-scope *{ transition:none !important; animation:none !important; }
}

/* =========================================================
   ESTRUCTURA GENERAL Y LAYOUT
   ========================================================= */
.v2-app{
  width:100%;max-width:100%;margin:0;padding:0;
}
.v2-app[hidden]{display:none !important;}
.v2-app-container{
  max-width:680px;margin:0 auto;padding:0 16px 48px;box-sizing:border-box;
}
@media (min-width:960px){
  .v2-app-container{max-width:1100px;padding:0 28px 56px;}
}
.v2-app.v2-modo-historial .v2-app-container{
  max-width:1380px;
}

/* =========================================================
   BLOQUEO GLOBAL DE SESIÓN NO DISPONIBLE
   ========================================================= */
.v2-bloqueo-sesion{
  display:flex;align-items:center;justify-content:center;
  min-height:75vh;padding:32px 16px;box-sizing:border-box;
}
.v2-bloqueo-sesion[hidden]{display:none !important;}
.v2-bloqueo-card{
  background:var(--ui-surface);border:1.5px solid var(--ui-border);border-radius:22px;
  padding:40px 28px;max-width:480px;width:100%;text-align:center;
  box-shadow:0 8px 32px rgba(23,36,44,.08);animation:v2FadeIn .2s ease-out;
}
.v2-bloqueo-icono{
  width:64px;height:64px;border-radius:50%;background:var(--ui-amber-soft);
  border:1.5px solid var(--ui-amber-border);color:var(--ui-amber);
  display:inline-flex;align-items:center;justify-content:center;margin-bottom:18px;
}
.v2-bloqueo-icono svg{width:32px;height:32px;pointer-events:none;}
.v2-bloqueo-titulo{
  margin:0 0 10px;font-size:20px;font-weight:800;color:var(--ui-ink);letter-spacing:-.01em;
}
.v2-bloqueo-mensaje{
  margin:0 0 24px;font-size:14px;color:var(--ui-muted);line-height:1.55;
}
.v2-btn-iniciar-sesion{
  width:100%;text-decoration:none;
}

/* Encabezado */
.v2-header{margin-bottom:20px;}
.v2-header-top{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-bottom:8px;flex-wrap:wrap;
}
.v2-brand{
  display:block;font-size:11.5px;font-weight:800;color:var(--ui-primary);
  letter-spacing:.14em;
}
.v2-header-acciones{display:flex;align-items:center;gap:12px;}
.v2-usuario-chip{display:flex;align-items:center;gap:7px;}
.v2-usuario-avatar{
  width:26px;height:26px;border-radius:50%;background:var(--ui-primary-soft);color:var(--ui-primary-hover);
  display:flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:800;flex-shrink:0;
}
.v2-usuario-nombre{font-size:12px;font-weight:700;color:var(--ui-text);}
@media (max-width:639.98px){ .v2-usuario-nombre{display:none;} }

.v2-header-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.v2-title{margin:0;font-size:21px;font-weight:800;color:var(--ui-ink);letter-spacing:-.01em;}
@media (min-width:960px){ .v2-title{font-size:24px;} }
.v2-badge-estado{
  font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  color:var(--ui-muted);background:var(--ui-surface);border:1px solid var(--ui-border);
  border-radius:999px;padding:4px 11px;transition:all .18s;
}
.v2-badge-origen{
  font-size:11px;font-weight:750;letter-spacing:.02em;
  color:#1A6389;background:#E8F5FB;border:1px solid #BDE2F2;
  border-radius:999px;padding:3px 10px;display:inline-flex;align-items:center;gap:5px;
}
.v2-badge-origen[hidden]{
  display:none !important;
}
.v2-badge-estado.v2-badge-emitida{
  color:var(--ui-success);
  background:var(--ui-success-soft);
  border-color:#A8E2CA;
}
.v2-subtitle{margin:4px 0 0;font-size:12.5px;color:var(--ui-muted);font-weight:500;line-height:1.4;}

/* Layout Workspace (Desktop a 2 columnas) */
.v2-layout-workspace{
  display:block;
}
@media (min-width:960px){
  .v2-layout-workspace{
    display:grid;
    grid-template-columns:230px 1fr;
    gap:28px;
    align-items:start;
  }
}
.v2-layout-workspace[hidden]{
  display:none !important;
}

/* Indicador lateral Desktop */
.v2-desktop-sidebar{
  display:none;
}
@media (min-width:960px){
  .v2-desktop-sidebar{
    display:flex;
    flex-direction:column;
    gap:18px;
    background:var(--ui-surface);
    border:1px solid var(--ui-border);
    border-radius:18px;
    padding:20px 16px;
    box-shadow:0 2px 10px rgba(23,36,44,.03);
  }
}
.v2-desktop-sidebar-title{
  font-size:11px;font-weight:800;color:var(--ui-muted);
  text-transform:uppercase;letter-spacing:.07em;margin:0 0 4px;padding-left:6px;
}
.v2-desktop-pasos-lista{
  list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px;
}
.v2-desktop-paso-item{
  display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:12px;
  cursor:default;user-select:none;transition:background-color .15s;
}
.v2-desktop-paso-item.v2-paso-activo{background:var(--ui-primary-soft);}
.v2-desktop-paso-circulo{
  width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:800;color:#fff;background:var(--ui-border);flex-shrink:0;
  transition:background-color .15s;
}
.v2-desktop-paso-item.v2-paso-activo .v2-desktop-paso-circulo{background:var(--ui-primary);}
.v2-desktop-paso-item.v2-paso-completado .v2-desktop-paso-circulo{background:var(--ui-success);}
.v2-desktop-paso-nombre{
  font-size:13px;font-weight:700;color:var(--ui-muted);
}
.v2-desktop-paso-item.v2-paso-activo .v2-desktop-paso-nombre{color:var(--ui-ink);font-weight:800;}
.v2-desktop-paso-item.v2-paso-completado .v2-desktop-paso-nombre{color:var(--ui-text);}

.v2-desktop-resumen-widget{
  border-top:1px dashed var(--ui-border);padding-top:14px;display:flex;flex-direction:column;gap:8px;
}
.v2-widget-label{font-size:10.5px;font-weight:800;color:var(--ui-muted);text-transform:uppercase;letter-spacing:.04em;}
.v2-widget-valor{font-size:12.5px;font-weight:700;color:var(--ui-ink);overflow-wrap:anywhere;}

/* Contenido Principal */
.v2-main-content{
  min-width:0;
}

/* Barra de progreso Móvil (Informativa) */
.v2-pasos-nav-movil{margin-bottom:20px;user-select:none;}
@media (min-width:960px){ .v2-pasos-nav-movil{display:none;} }
.v2-pasos-lista-movil{list-style:none;display:flex;align-items:flex-start;margin:0 0 8px;padding:0;}
.v2-paso-item-movil{flex:0 0 auto;}
.v2-paso-indicador{
  display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:2px;cursor:default;
}
.v2-paso-circulo-movil{
  width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:800;color:#fff;background:var(--ui-border);transition:background-color .15s;
}
.v2-paso-nombre-movil{font-size:10.5px;font-weight:700;color:var(--ui-muted);white-space:nowrap;transition:color .15s;}
.v2-paso-item-movil.v2-paso-activo .v2-paso-circulo-movil{background:var(--ui-primary);}
.v2-paso-item-movil.v2-paso-activo .v2-paso-nombre-movil{color:var(--ui-ink);}
.v2-paso-item-movil.v2-paso-completado .v2-paso-circulo-movil{background:var(--ui-success);}
.v2-paso-item-movil.v2-paso-completado .v2-paso-nombre-movil{color:var(--ui-text);}
.v2-paso-conector-movil{flex:1 1 auto;height:2px;background:var(--ui-border);margin:13px 6px 0;border-radius:2px;transition:background-color .15s;}
.v2-paso-conector-movil.v2-conector-completado{background:var(--ui-success);}
.v2-paso-contador-movil{margin:0;font-size:11.5px;font-weight:700;color:var(--ui-muted);text-align:center;}

/* Secciones y Tarjetas */
.v2-section{margin-bottom:20px;}
.v2-section:last-child{margin-bottom:0;}
.v2-section-head{margin-bottom:12px;}
.v2-section-title{margin:0;font-size:12px;font-weight:800;color:var(--ui-primary-hover);text-transform:uppercase;letter-spacing:.07em;}
.v2-section-desc{margin:4px 0 0;font-size:12.5px;color:var(--ui-muted);line-height:1.4;}

.v2-tarjeta{
  background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:18px;
  padding:20px;box-shadow:0 2px 12px rgba(23,36,44,.05);
}

.v2-paso-footer{margin-top:20px;}

/* =========================================================
   CAMPOS DE FORMULARIO (ESPACIADOS HOMOLOGADOS)
   ========================================================= */
.v2-campo{margin-bottom:18px;}
.v2-campo:last-child{margin-bottom:0;}
.v2-campo label{display:block;font-size:13px;font-weight:700;color:var(--ui-ink);margin-bottom:7px;}
.v2-campo .v2-requerido{color:var(--ui-danger);}
.v2-campo .v2-opcional-tag{
  font-size:10px;font-weight:700;color:var(--ui-muted);background:var(--ui-background);
  border:1px solid var(--ui-border);border-radius:999px;padding:2px 8px;margin-left:6px;letter-spacing:.02em;
}
.v2-campo input[type=text],.v2-campo input[type=tel],.v2-campo input[type=email],
.v2-campo input[type=date],.v2-campo input[type=number],
.v2-campo select,.v2-campo textarea{
  width:100%;font-family:'Montserrat',sans-serif;font-size:14.5px;padding:12px 14px;
  min-height:48px;border:1.5px solid var(--ui-border);border-radius:14px;
  color:var(--ui-ink);background:var(--ui-surface);transition:border-color .15s,box-shadow .15s;
  appearance:none;-webkit-appearance:none;
}
.v2-campo select{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371818A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat;background-position:right 14px center;padding-right:38px;
}
.v2-campo input:hover,.v2-campo select:hover,.v2-campo textarea:hover{border-color:var(--ui-border-strong);}
.v2-campo input:focus,.v2-campo select:focus,.v2-campo textarea:focus{
  outline:none;border-color:var(--ui-primary);box-shadow:0 0 0 3.5px rgba(0,139,210,.15);
}
.v2-campo textarea{resize:vertical;min-height:80px;line-height:1.45;}
.v2-ayuda-campo{margin:8px 0 0;font-size:11.5px;color:var(--ui-muted);line-height:1.45;}
.v2-campo-fila{display:flex;flex-direction:column;gap:16px;margin-bottom:18px;}
.v2-campo-fila:last-child{margin-bottom:0;}
@media (min-width:520px){
  .v2-campo-fila.dos-columnas{flex-direction:row;gap:18px;}
  .v2-campo-fila.dos-columnas > .v2-campo{flex:1 1 0;min-width:0;margin-bottom:0;}
}

/* Estado de Validación Visual (Rojo) */
.v2-campo.v2-campo-error label{color:var(--ui-danger) !important;}
.v2-campo.v2-campo-error input,
.v2-campo.v2-campo-error select,
.v2-campo.v2-campo-error textarea{
  border-color:var(--ui-danger) !important;
  box-shadow:0 0 0 3.5px rgba(216,59,59,.14) !important;
  background-color:#FFFDFC !important;
}
.v2-campo.v2-campo-error .v2-campo-moneda,
.v2-campo.v2-campo-error .v2-campo-unidad{
  border-color:var(--ui-danger) !important;
  box-shadow:0 0 0 3.5px rgba(216,59,59,.14) !important;
  background-color:#FFFDFC !important;
}
.v2-error-msg{
  display:block;margin:6px 0 0;font-size:12px;font-weight:700;
  color:var(--ui-danger);line-height:1.35;
  animation:v2FadeInError .15s ease-out;
}
.v2-error-msg[hidden]{display:none !important;}
@keyframes v2FadeInError{
  from{opacity:0;transform:translateY(-2px);}
  to{opacity:1;transform:translateY(0);}
}

.v2-metodo-grid.v2-campo-error{
  border:1.5px dashed var(--ui-danger);
  border-radius:16px;
  padding:12px;
  background-color:rgba(216,59,59,.03);
}

/* Campo de moneda */
.v2-campo-moneda{
  display:flex;align-items:center;min-height:48px;
  border:1.5px solid var(--ui-border);border-radius:14px;
  background:var(--ui-surface);overflow:hidden;transition:border-color .15s,box-shadow .15s;
}
.v2-campo-moneda:hover{border-color:var(--ui-border-strong);}
.v2-campo-moneda:focus-within{border-color:var(--ui-primary);box-shadow:0 0 0 3.5px rgba(0,139,210,.14);}
.v2-campo-moneda .v2-moneda-prefijo{
  padding:0 4px 0 14px;color:var(--ui-muted);font-weight:700;flex-shrink:0;
}
.v2-campo-moneda:focus-within .v2-moneda-prefijo{color:var(--ui-primary);}
.v2-campo-moneda input{
  flex:1 1 auto;min-width:0;border:0 !important;border-radius:0 !important;outline:0;
  box-shadow:none !important;background:transparent !important;
  padding:12px 4px;font-size:15px;font-weight:600;color:var(--ui-ink);font-family:'Montserrat',sans-serif;
}
.v2-campo-moneda .v2-moneda-sufijo{
  padding:0 14px 0 6px;color:var(--ui-muted);font-weight:700;letter-spacing:.02em;flex-shrink:0;font-size:13.5px;
}

/* Campo con unidad */
.v2-campo-unidad{
  display:flex;align-items:center;min-height:48px;
  border:1.5px solid var(--ui-border);border-radius:14px;
  background:var(--ui-surface);overflow:hidden;transition:border-color .15s,box-shadow .15s;
}
.v2-campo-unidad:hover{border-color:var(--ui-border-strong);}
.v2-campo-unidad:focus-within{border-color:var(--ui-primary);box-shadow:0 0 0 3.5px rgba(0,139,210,.14);}
.v2-campo-unidad input{
  flex:1 1 auto;min-width:0;border:0 !important;border-radius:0 !important;outline:0;
  box-shadow:none !important;background:transparent !important;
  padding:12px 6px 12px 14px;font-size:15px;font-weight:600;color:var(--ui-ink);font-family:'Montserrat',sans-serif;
}
.v2-unidad-sufijo{padding:0 14px 0 4px;color:var(--ui-muted);font-weight:700;letter-spacing:.02em;flex-shrink:0;}
.v2-paquete-titulo{
  font-size:11.5px;font-weight:800;color:var(--ui-primary-hover);text-transform:uppercase;
  letter-spacing:.06em;margin:22px 0 16px;padding-top:16px;border-top:1px dashed var(--ui-border);
}

/* =========================================================
   BOTONES
   ========================================================= */
.v2-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:48px;padding:0 20px;border-radius:14px;font-weight:700;font-size:14px;
  cursor:pointer;border:none;font-family:'Montserrat',sans-serif;
  transition:background-color .15s,border-color .15s,color .15s,transform .12s;
}
.v2-btn[hidden]{
  display:none !important;
}
.v2-btn:active{transform:scale(.98);}
.v2-btn:disabled{
  opacity:.45;cursor:not-allowed !important;transform:none !important;
  pointer-events:none;
}

.v2-btn-primary{background:var(--ui-primary);color:#fff;border:1.5px solid var(--ui-primary);}
.v2-btn-primary:hover:not(:disabled){background:var(--ui-primary-hover);border-color:var(--ui-primary-hover);color:#fff;}

.v2-btn-secondary{background:var(--ui-background);color:var(--ui-ink);border:1.5px solid var(--ui-border);}
.v2-btn-secondary:hover:not(:disabled){background:#E4ECF0;color:var(--ui-ink);border-color:var(--ui-border-strong);}

.v2-btn-outline{background:var(--ui-surface);color:var(--ui-primary);border:1.5px solid var(--ui-primary);}
.v2-btn-outline:hover:not(:disabled){background:var(--ui-primary-soft);color:var(--ui-primary-hover);border-color:var(--ui-primary-hover);}

.v2-btn-danger{background:var(--ui-danger);color:#fff;border:1.5px solid var(--ui-danger);}
.v2-btn-danger:hover:not(:disabled){background:#C22F2F;border-color:#C22F2F;color:#fff;}

.v2-btn-block{width:100%;}
.v2-btn-sm{min-height:36px;padding:0 12px;font-size:12px;border-radius:10px;}
.v2-btn-link{
  background:none;border:none;color:var(--ui-primary);font-weight:700;font-size:13px;
  cursor:pointer;padding:6px 0;display:inline-flex;align-items:center;gap:6px;font-family:'Montserrat',sans-serif;
}
.v2-btn-link:hover{color:var(--ui-primary-hover);text-decoration:underline;}

.v2-acciones-fila{display:flex;gap:12px;flex-direction:column-reverse;}
@media (min-width:480px){ .v2-acciones-fila{flex-direction:row;} }
.v2-acciones-fila .v2-btn{flex:1;}

/* =========================================================
   STEPPER CON SVG REALES
   ========================================================= */
.v2-stepper{
  display:inline-flex;align-items:stretch;height:42px;
  border:1.5px solid var(--ui-border);border-radius:12px;
  overflow:hidden;background:var(--ui-surface);flex-shrink:0;
}
.v2-stepper-btn{
  width:42px;height:100%;background:var(--ui-surface);border:none;color:var(--ui-ink);
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:background-color .15s,color .15s;flex-shrink:0;padding:0;
}
.v2-stepper-btn:hover:not(:disabled){background:var(--ui-primary-soft);color:var(--ui-primary);}
.v2-stepper-btn:active:not(:disabled){background:#D6EFFF;}
.v2-stepper-btn:disabled{opacity:.35;cursor:not-allowed;}
.v2-stepper-btn svg{width:16px;height:16px;pointer-events:none;}

.v2-stepper-valor{
  min-width:46px;display:flex;align-items:center;justify-content:center;
  font-size:15px;font-weight:800;color:var(--ui-ink);background:var(--ui-surface);
  border-left:1px solid var(--ui-border);border-right:1px solid var(--ui-border);
  padding:0 6px;user-select:none;
}

.v2-stepper.v2-compacto{
  height:34px;
  min-height:34px;
  max-height:34px;
  border-radius:10px;
  box-sizing:border-box;
  flex-shrink:0;
  min-width:104px;
  align-items:stretch;
  align-self:center;
}
.v2-stepper.v2-compacto .v2-stepper-btn{
  width:32px;
  min-width:32px;
  max-width:32px;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  padding:0;
  margin:0;
  box-sizing:border-box;
}
.v2-stepper.v2-compacto .v2-stepper-btn svg{
  width:14px;
  height:14px;
  flex-shrink:0;
  display:block;
}
.v2-stepper.v2-compacto .v2-stepper-valor{
  min-width:36px;
  height:100%;
  font-size:13.5px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding:0 4px;
  flex:1 0 auto;
}

/* Stepper principal de Equipos alineado con input/select (48px) */
.v2-stepper.v2-stepper-equipo-principal{
  height:48px;
  min-height:48px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
}
.v2-stepper.v2-stepper-equipo-principal .v2-stepper-btn{
  width:48px;
  height:100%;
  flex:0 0 48px;
}
.v2-stepper.v2-stepper-equipo-principal .v2-stepper-btn svg{
  width:16px;
  height:16px;
}
.v2-stepper.v2-stepper-equipo-principal .v2-stepper-valor{
  min-width:48px;
  height:100%;
  font-size:15.5px;
  font-weight:800;
}

/* =========================================================
   PASO 1: CLIENTE + CONTEXTO REGULAR/EXPO
   ========================================================= */
.v2-tipo-cotizacion-bar{margin-bottom:18px;}
.v2-tipo-cotizacion-label{
  display:block;font-size:11px;font-weight:800;color:var(--ui-muted);
  text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px;
}
.v2-segmented{
  display:inline-flex;background:var(--ui-background);border:1px solid var(--ui-border);
  border-radius:12px;padding:3px;gap:2px;
}
.v2-segmented-btn{
  border:none;background:transparent;color:var(--ui-muted);font-weight:700;font-size:12.5px;
  padding:8px 18px;border-radius:9px;cursor:pointer;font-family:'Montserrat',sans-serif;transition:.15s;
}
.v2-segmented-btn:hover{color:var(--ui-ink);}
.v2-segmented-btn.v2-segmented-activo{background:var(--ui-surface);color:var(--ui-primary-hover);box-shadow:0 1px 4px rgba(23,36,44,.1);}
.v2-campo-evento{margin-top:10px;max-width:440px;}
.v2-campo-evento[hidden]{display:none;}
.v2-expo-card{
  display:flex;
  flex-direction:column;
  gap:4px;
  background:var(--ui-primary-soft);
  border:1px solid var(--ui-border);
  border-left:3.5px solid var(--ui-primary);
  border-radius:6px;
  padding:10px 14px;
  margin-top:4px;
}
.v2-expo-card-badge{
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.5px;
  color:var(--ui-primary);
}
.v2-expo-card-nombre{
  font-size:14px;
  font-weight:700;
  color:var(--ui-ink);
  line-height:1.3;
}
.v2-expo-card-detalles{
  font-size:12px;
  color:var(--ui-muted);
  line-height:1.4;
}
.v2-expo-card-estado{
  display:inline-block;
  align-self:flex-start;
  margin-top:3px;
  font-size:11px;
  font-weight:600;
  padding:1px 6px;
  border-radius:4px;
  background:#E1EFFE;
  color:#1E429F;
  text-transform:capitalize;
}
.v2-expo-vacio{
  display:flex;
  align-items:flex-start;
  gap:10px;
  background:var(--ui-amber-soft);
  border:1px solid var(--ui-amber-border);
  border-left:3.5px solid var(--ui-amber);
  border-radius:6px;
  padding:10px 14px;
  margin-top:4px;
}
.v2-expo-vacio-icon{
  font-size:16px;
  line-height:1;
  flex-shrink:0;
  margin-top:2px;
}
.v2-expo-vacio-texto strong{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--ui-amber);
  line-height:1.3;
}
.v2-expo-vacio-texto span{
  display:block;
  font-size:12px;
  color:var(--ui-text);
  margin-top:2px;
  line-height:1.4;
}
.v2-expo-cargando{
  font-size:12px;
  color:var(--ui-muted);
  padding:8px 0;
  font-style:italic;
}

.v2-cliente-buscar-bloque{
  position:relative;margin-bottom:18px;padding-bottom:16px;
  border-bottom:1px dashed var(--ui-border);
}
.v2-buscar-input-wrapper{position:relative;display:flex;align-items:center;width:100%;}
.v2-buscar-input-wrapper svg.v2-icono-buscar{
  position:absolute;left:14px;color:var(--ui-muted);pointer-events:none;
}
#v2CampoBuscarCliente{
  width:100%;font-size:14.5px;font-weight:500;padding:12px 38px 12px 42px;
  min-height:48px;border:1.5px solid var(--ui-border);border-radius:12px;
  color:var(--ui-ink);background:var(--ui-background);transition:border-color .15s,box-shadow .15s,background-color .15s;
}
#v2CampoBuscarCliente:focus{
  background:var(--ui-surface);outline:none;border-color:var(--ui-primary);
  box-shadow:0 0 0 3.5px rgba(0,139,210,.15);
}
.v2-btn-limpiar-buscar{
  position:absolute;right:10px;top:50%;transform:translateY(-50%);
  background:var(--ui-border);border:none;color:var(--ui-muted);
  width:24px;height:24px;min-width:24px;min-height:24px;max-width:24px;max-height:24px;
  border-radius:50%;display:none;align-items:center;justify-content:center;
  cursor:pointer;padding:0;margin:0;box-sizing:border-box;flex-shrink:0;
  transition:background-color .15s,color .15s;
}
.v2-btn-limpiar-buscar:hover{color:var(--ui-ink);background:var(--ui-border-strong);}
.v2-btn-limpiar-buscar svg{
  width:12px;height:12px;pointer-events:none;display:block;
}

.v2-resultados-cliente{
  position:absolute;top:calc(100% + 2px);left:0;right:0;z-index:50;
  border:1.5px solid var(--ui-primary);border-radius:12px;background:var(--ui-surface);
  box-shadow:0 8px 24px rgba(23,36,44,.15);overflow:hidden;max-height:260px;overflow-y:auto;
}
.v2-resultados-cliente[hidden]{display:none;}
.v2-resultado-cliente{
  width:100%;display:flex;flex-direction:column;gap:2px;text-align:left;background:transparent;
  border:none;border-bottom:1px solid var(--ui-border);padding:8px 12px;cursor:pointer;font-family:inherit;
  transition:background-color .12s;
}
.v2-resultado-cliente:last-child{border-bottom:none;}
.v2-resultado-cliente:hover,
.v2-resultado-cliente.v2-activo{
  background:var(--ui-primary-soft);outline:none;
}
.v2-resultado-cliente-principal{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
}
.v2-resultado-empresa{font-size:13px;font-weight:800;color:var(--ui-ink);}
.v2-resultado-ciudad{font-size:11px;font-weight:700;color:var(--ui-primary-hover);}
.v2-resultado-cliente-secundario{
  display:flex;align-items:center;gap:5px;font-size:11px;color:var(--ui-muted);flex-wrap:wrap;
}
.v2-resultado-nombre{color:var(--ui-text);font-weight:600;}
.v2-resultado-sep{color:var(--ui-border-strong);}
.v2-resultado-estado{padding:10px 12px;font-size:12px;color:var(--ui-muted);text-align:center;font-weight:600;}
.v2-resultado-vacio{padding:10px 12px;text-align:center;}
.v2-resultado-vacio-titulo{margin:0 0 2px;font-size:12px;font-weight:700;color:var(--ui-ink);}
.v2-resultado-vacio-desc{font-size:11px;color:var(--ui-muted);display:block;}

.v2-cliente-header-form{
  display:flex;flex-direction:column;gap:10px;margin-bottom:16px;
}
.v2-cliente-header-row{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
}
.v2-cliente-form-titulo{
  font-size:11.5px;font-weight:800;color:var(--ui-primary-hover);
  text-transform:uppercase;letter-spacing:.05em;margin:0;
}
.v2-btn-limpiar-form-cliente{
  background:none;border:none;color:var(--ui-muted);font-weight:700;font-size:12px;
  cursor:pointer;padding:4px 0;font-family:'Montserrat',sans-serif;
  transition:color .15s;
}
.v2-btn-limpiar-form-cliente:hover{color:var(--ui-ink);text-decoration:underline;}

.v2-cliente-panel-contextual{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:8px 12px;background:var(--ui-background);border:1px solid var(--ui-border);
  border-radius:12px;
}
.v2-cliente-panel-contextual[hidden]{display:none !important;}

.v2-cliente-badge-origen{
  font-size:11px;font-weight:700;padding:4px 10px;border-radius:8px;
  display:inline-flex;align-items:center;gap:5px;line-height:1.35;
  animation:v2FadeIn .15s ease-out;
}
.v2-cliente-badge-origen[hidden]{display:none !important;}
.v2-cliente-badge-origen.v2-origen-directorio{
  background:var(--ui-success-soft);color:var(--ui-success);border:1px solid #C4EED0;
}
.v2-cliente-badge-origen.v2-origen-editado{
  background:var(--ui-amber-soft);color:var(--ui-amber);border:1px solid var(--ui-amber-border);
}
.v2-cliente-badge-origen.v2-origen-desvinculado{
  background:var(--ui-primary-soft);color:var(--ui-primary);border:1px solid #BCE5F7;
}

.v2-btn-desvincular-cliente{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:36px;padding:0 12px;font-size:12px;font-weight:700;
  border-radius:10px;border:1.5px solid var(--ui-primary);
  background:var(--ui-surface);color:var(--ui-primary);
  cursor:pointer;font-family:'Montserrat',sans-serif;white-space:nowrap;
  transition:background-color .15s,color .15s,border-color .15s;flex-shrink:0;
}
.v2-btn-desvincular-cliente:hover{
  background:var(--ui-primary-soft);color:var(--ui-primary-hover);border-color:var(--ui-primary-hover);
}
.v2-btn-desvincular-cliente[hidden]{display:none !important;}

@media (max-width:339px){
  .v2-cliente-panel-contextual{
    flex-direction:column;align-items:stretch;gap:8px;
  }
  .v2-btn-desvincular-cliente{width:100%;text-align:center;}
}

.v2-nota-form{
  margin-top:18px;font-size:11.5px;color:var(--ui-muted);line-height:1.45;
  background:var(--ui-background);border-radius:12px;padding:11px 14px;
}

/* =========================================================
   PASO 2: CONFIGURADOR + SELECTOR CON ICONOS (V2.0A9)
   ========================================================= */
.v2-tipos-tabs{
  display:flex;gap:8px;
  flex-wrap:nowrap !important;
  overflow-x:auto;-webkit-overflow-scrolling:touch;
  padding-bottom:6px;margin-bottom:16px;
  scrollbar-width:thin;
  scrollbar-color:var(--ui-border-strong) transparent;
  scroll-behavior:smooth;
}
.v2-tipos-tabs::-webkit-scrollbar{height:5px;}
.v2-tipos-tabs::-webkit-scrollbar-thumb{background:var(--ui-border-strong);border-radius:99px;}

.v2-tab-tipo{
  flex:0 0 auto;
  flex-shrink:0 !important;
  display:inline-flex;align-items:center;gap:8px;
  white-space:nowrap !important;
  min-width:max-content;
  padding:10px 16px;border-radius:13px;border:1.5px solid var(--ui-border);
  background:var(--ui-surface);color:var(--ui-text);font-weight:700;font-size:13px;
  cursor:pointer;font-family:'Montserrat',sans-serif;transition:border-color .15s,background-color .15s,color .15s;
}
.v2-tab-tipo svg{
  width:17px;height:17px;flex-shrink:0;pointer-events:none;color:currentColor;
}
.v2-tab-tipo:hover:not(.v2-tab-bloqueado){border-color:var(--ui-border-strong);}
.v2-tab-tipo.v2-tab-activo{background:var(--ui-primary);border-color:var(--ui-primary);color:#fff;}
.v2-tab-tipo.v2-tab-bloqueado{
  cursor:not-allowed;color:var(--ui-muted);opacity:.75;background:var(--ui-surface);
}
/* Indicadores por categoria */
.v2-tab-tipo-badge{
  display:inline-flex;align-items:center;justify-content:center;text-align:center;
  min-width:20px;height:20px;box-sizing:border-box;
  padding:0 6px;border-radius:6px;
  font-size:11px;font-weight:600;line-height:1;font-family:'Montserrat',sans-serif;
  letter-spacing:0;text-transform:none;
  background:#E0F2FE;color:#0369A1;border:1px solid #BAE6FD;
  margin-left:6px;white-space:nowrap;flex-shrink:0;transition:all .15s ease;
}
.v2-tab-tipo-badge[hidden]{display:none !important;}
.v2-tab-tipo:hover:not(.v2-tab-bloqueado) .v2-tab-tipo-badge{
  background:#BAE6FD;color:#0284C7;border-color:#7DD3FC;
}
.v2-tab-tipo.v2-tab-activo .v2-tab-tipo-badge{
  background:rgba(255,255,255,.22);color:#FFFFFF;border:1px solid rgba(255,255,255,.45);
}
.v2-tab-tipo-badge-envio.v2-badge-neutro{
  background:rgba(100,116,139,.14);
  color:var(--ui-muted, #64748B);
  font-weight:800;
  letter-spacing:0.5px;
}
.v2-tab-tipo.v2-tab-activo .v2-tab-tipo-badge-envio.v2-badge-neutro{
  background:rgba(255,255,255,.3);
  color:#FFFFFF;
}

.v2-fijos-fila{display:flex;flex-direction:column;gap:14px;margin-bottom:16px;}
@media (min-width:480px){ .v2-fijos-fila{flex-direction:row;} }
.v2-fijos-fila > .v2-campo{flex:1;margin-bottom:0;}

.v2-modo-selector{display:flex;flex-direction:column;gap:10px;margin-bottom:18px;}
@media (min-width:480px){ .v2-modo-selector{flex-direction:row;} }
.v2-radio-tarjeta{
  flex:1;display:flex;align-items:center;gap:10px;padding:13px 14px;
  border:1.5px solid var(--ui-border);border-radius:14px;cursor:pointer;
  background:var(--ui-surface);transition:border-color .15s,background-color .15s;
}
.v2-radio-tarjeta:hover{border-color:var(--ui-border-strong);}
.v2-radio-tarjeta.v2-seleccionado{border-color:var(--ui-primary);background:var(--ui-primary-soft);}
.v2-radio-tarjeta input[type=radio]{width:19px;height:19px;flex-shrink:0;accent-color:var(--ui-primary);}
.v2-radio-tarjeta-texto{font-size:13.5px;font-weight:700;color:var(--ui-ink);}

.v2-pack-card{
  border:1.5px solid var(--ui-border);border-radius:16px;padding:16px;background:var(--ui-background);
}
.v2-pack-titulo{font-size:14px;font-weight:800;color:var(--ui-ink);margin:0 0 12px;}
.v2-pack-colores{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px;}
.v2-swatch-chip{
  display:flex;align-items:center;gap:7px;background:var(--ui-surface);border:1px solid var(--ui-border);
  border-radius:999px;padding:6px 12px 6px 8px;font-size:12.5px;font-weight:700;color:var(--ui-ink);
}
.v2-swatch-dot{width:14px;height:14px;border-radius:50%;flex-shrink:0;border:1px solid rgba(0,0,0,.1);}
.v2-pack-precio-fila{
  display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;
  padding:11px 0;border-top:1px dashed var(--ui-border);border-bottom:1px dashed var(--ui-border);margin-bottom:14px;
}
.v2-pack-precio-detalle{font-size:12.5px;color:var(--ui-muted);}
.v2-pack-precio-valor{font-size:13.5px;font-weight:800;color:var(--ui-ink);}
.v2-pack-precio-nota{font-size:10.5px;font-weight:700;color:var(--ui-muted);text-transform:uppercase;letter-spacing:.03em;}
.v2-pack-controles{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.v2-pack-controles-label{font-size:12.5px;font-weight:700;color:var(--ui-ink);}

.v2-individual-lista{display:flex;flex-direction:column;gap:10px;margin-bottom:16px;}
.v2-color-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  border:1.5px solid var(--ui-border);border-radius:14px;padding:11px 14px;background:var(--ui-surface);
}
.v2-color-row-info{display:flex;align-items:center;gap:10px;min-width:0;}
.v2-color-row-nombre{font-size:13.5px;font-weight:700;color:var(--ui-ink);}
.v2-color-row-precio{display:block;font-size:11.5px;color:var(--ui-muted);}

/* =========================================================
   CONFIGURADOR DE EQUIPOS (V2.0B1)
   ========================================================= */
.v2-equipo-draft-card{
  border:1.5px solid var(--ui-border);border-radius:18px;padding:18px;
  background:var(--ui-background);margin-bottom:16px;position:relative;
}
.v2-equipo-draft-card:last-child{margin-bottom:0;}
.v2-equipo-draft-header{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-bottom:14px;padding-bottom:12px;border-bottom:1px dashed var(--ui-border);
}
.v2-equipo-draft-title{
  font-size:12.5px;font-weight:800;color:var(--ui-primary-hover);text-transform:uppercase;letter-spacing:.05em;
}
.v2-equipo-draft-badge{
  font-size:10.5px;font-weight:800;color:var(--ui-ink);background:var(--ui-surface);
  border:1px solid var(--ui-border);border-radius:999px;padding:3px 10px;
}
.v2-btn-eliminar-draft{
  display:inline-flex;align-items:center;gap:5px;background:transparent;
  border:1px solid var(--ui-border);border-radius:8px;padding:4px 9px;
  font-size:11.5px;font-weight:700;color:var(--ui-muted);cursor:pointer;
  transition:color .15s,border-color .15s,background-color .15s;
}
.v2-btn-eliminar-draft:hover{color:var(--ui-danger);border-color:var(--ui-danger);background:var(--ui-danger-soft);}

.v2-caracteristicas-wrapper{
  background:var(--ui-surface);border:1.5px solid var(--ui-border);border-radius:14px;
  padding:14px;margin-bottom:16px;
}
.v2-caracteristicas-lista{display:flex;flex-direction:column;gap:8px;margin-bottom:10px;}
.v2-caracteristica-fila{
  display:flex;align-items:center;gap:8px;background:#FFFFFF;
  border:1.5px solid var(--ui-border);border-radius:12px;padding:3px 6px 3px 12px;
  transition:border-color .15s,box-shadow .15s,background-color .15s;
}
.v2-caracteristica-fila:hover{
  border-color:var(--ui-border-strong);
}
.v2-caracteristica-fila:focus-within{
  border-color:var(--ui-primary);
  box-shadow:0 0 0 3px rgba(0,139,210,.14);
}
.v2-caracteristica-bullet{
  width:6px;height:6px;border-radius:50%;background:var(--ui-primary);flex-shrink:0;
}
.v2-caracteristica-input{
  flex:1 1 auto;min-width:0;border:none !important;outline:none !important;
  box-shadow:none !important;background:transparent !important;
  padding:8px 4px;font-size:13px;font-weight:600;color:var(--ui-ink);
  font-family:'Montserrat',sans-serif;cursor:text;
}
.v2-btn-eliminar-caracteristica{
  width:28px;height:28px;border-radius:8px;border:none;background:transparent;
  color:var(--ui-muted);font-size:18px;font-weight:700;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:.15s;
}
.v2-btn-eliminar-caracteristica:hover{color:var(--ui-danger);background:var(--ui-danger-soft);}

.v2-caracteristicas-acciones{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;
  padding-top:4px;
}
.v2-btn-agregar-caracteristica{
  display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;
  color:var(--ui-primary);background:var(--ui-primary-soft);border:1px solid var(--ui-primary);
  border-radius:9px;padding:6px 12px;cursor:pointer;font-family:'Montserrat',sans-serif;
  transition:background-color .15s,color .15s;
}
.v2-btn-agregar-caracteristica:hover{background:#DBF0FB;color:var(--ui-primary-hover);}
.v2-btn-restablecer-caracteristicas{
  background:none;border:none;color:var(--ui-muted);font-size:11.5px;font-weight:600;
  text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:4px 0;
  font-family:'Montserrat',sans-serif;
}
.v2-btn-restablecer-caracteristicas:hover{color:var(--ui-ink);}

.v2-precio-referencia-caja{
  background:var(--ui-background);border:1.5px solid var(--ui-border);border-radius:14px;
  padding:12px 14px;min-height:48px;display:flex;align-items:center;justify-content:space-between;
}
.v2-precio-referencia-valor{font-size:14.5px;font-weight:800;color:var(--ui-muted);}

/* Toggle de Entrega para Expo */
.v2-expo-entrega-card{
  background:var(--ui-surface);border:1.5px solid var(--ui-border);border-radius:16px;
  padding:14px 16px;margin-bottom:16px;transition:border-color .15s,background-color .15s;
}
.v2-expo-entrega-card.v2-activo{
  border-color:var(--ui-primary);background:var(--ui-primary-soft);
}
.v2-checkbox-label{
  display:flex;align-items:center;gap:10px;cursor:pointer;user-select:none;
}
.v2-checkbox-input{
  width:18px;height:18px;accent-color:var(--ui-primary);cursor:pointer;margin:0;
}
.v2-checkbox-title{
  font-size:13.5px;font-weight:700;color:var(--ui-ink);
}

/* Estilos de Equipos en Modal y Revisión */
.v2-equipo-detalle-item{
  border:1px solid var(--ui-border);border-radius:14px;padding:14px;margin-bottom:10px;background:var(--ui-surface);
  box-sizing:border-box;min-width:0;
}
.v2-equipo-detalle-header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px;
  min-width:0;
}
.v2-equipo-detalle-modelo{font-size:14px;font-weight:800;color:var(--ui-ink);overflow-wrap:break-word;word-break:break-word;min-width:0;}
.v2-equipo-detalle-controles{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  margin:8px 0 6px;flex-wrap:wrap;min-width:0;
}
.v2-equipo-bullets{
  list-style:none;padding:0;margin:4px 0 8px;display:flex;flex-direction:column;gap:3px;
}
.v2-equipo-bullets li{
  font-size:12px;color:var(--ui-text);line-height:1.4;display:flex;align-items:flex-start;gap:6px;
}
.v2-btn-editar-precio{
  display:inline-flex;align-items:center;gap:5px;
  background:var(--ui-background);border:1px solid var(--ui-border);border-radius:8px;
  color:var(--ui-muted);font-size:11.5px;font-weight:600;padding:4px 8px;
  cursor:pointer;font-family:'Montserrat',sans-serif;transition:all .15s;
  margin-top:4px;
}
.v2-btn-editar-precio:hover{
  border-color:var(--ui-primary);color:var(--ui-primary-hover);background:var(--ui-primary-soft);
}

.v2-modal-precio-editor{
  background:var(--ui-background);border:1.5px solid var(--ui-border);border-radius:12px;
  padding:12px 14px;margin:10px 0;animation:v2FadeIn .15s ease-out;
  box-sizing:border-box;min-width:0;
}
.v2-modal-editor-label{
  display:block;font-size:11px;font-weight:800;color:var(--ui-muted);
  text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px;
}

@keyframes v2FadeIn{
  from{opacity:0;transform:translateY(-4px);}
  to{opacity:1;transform:translateY(0);}
}

/* Microfase AJUSTE-02B, 02B.1, 02B.1B & 02B.1C: Estilos del Ajuste Comercial de Tintas y Homologación */
.v2-btn-ajuste-gear{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:center;
  gap:5px;
  background:var(--ui-background);
  border:1.5px solid var(--ui-border);
  border-radius:10px;
  height:34px;
  min-height:34px;
  max-height:34px;
  box-sizing:border-box;
  color:var(--ui-muted);
  font-size:11.5px;
  font-weight:600;
  padding:0 10px;
  cursor:pointer;
  font-family:'Montserrat',sans-serif;
  transition:all .15s ease-in-out;
  white-space:nowrap;
  flex-shrink:0;
}
.v2-btn-ajuste-gear:hover{
  border-color:var(--ui-primary);
  color:var(--ui-primary-hover);
  background:var(--ui-primary-soft);
}
.v2-btn-ajuste-gear:disabled{
  opacity:0.5;
  cursor:not-allowed;
  border-color:var(--ui-border) !important;
  color:var(--ui-muted) !important;
  background:var(--ui-background) !important;
}
.v2-btn-ajuste-gear.v2-ajuste-activo{
  border-color:var(--ui-primary);
  color:var(--ui-primary-hover);
  background:var(--ui-primary-soft);
  font-weight:700;
}
.v2-btn-ajuste-gear.v2-ajuste-activo:hover{
  background:var(--ui-primary);
  color:#ffffff;
}
.v2-btn-ajuste-gear.v2-ajuste-activo:disabled{
  opacity:0.7;
  cursor:default;
}
.v2-btn-ajuste-gear .v2-ajuste-gear-texto{
  display:inline;
}
@media (max-width:559.98px){
  .v2-btn-ajuste-gear{
    padding:0;
    width:34px;
    height:34px;
    min-height:34px;
    max-height:34px;
    box-sizing:border-box;
    justify-content:center;
  }
  .v2-btn-ajuste-gear .v2-ajuste-gear-texto{
    display:none;
  }
}

.v2-badge-ajuste-tinta{
  display:inline-flex;
  align-items:center;
  gap:3px;
  background:var(--ui-primary-soft);
  color:var(--ui-primary-hover);
  border:1px solid var(--ui-primary);
  border-radius:6px;
  font-size:10px;
  font-weight:700;
  padding:2px 6px;
  text-transform:uppercase;
  letter-spacing:.04em;
  white-space:nowrap;
}

/* Microfase AJUSTE-02B.1C: Chips descriptivos de estado de ajuste (no parecen botones interactivos) */
.v2-chip-ajuste-estado{
  display:inline-flex;
  align-items:center;
  gap:3px;
  font-size:10px;
  font-weight:700;
  padding:2px 7px;
  border-radius:6px;
  letter-spacing:.02em;
  white-space:nowrap;
  line-height:1.2;
}
.v2-chip-ajuste-estado.v2-chip-ajuste-descuento{
  background:var(--ui-primary-soft);
  color:var(--ui-primary-hover);
  border:1px solid rgba(0,139,210,0.35);
}
.v2-chip-ajuste-estado.v2-chip-ajuste-cortesia{
  background:var(--ui-success-soft);
  color:var(--ui-success);
  border:1px solid rgba(23,135,93,0.35);
}
.v2-chip-ajuste-estado.v2-chip-ajuste-precio{
  background:#F3F0FC;
  color:#5B3FA8;
  border:1px solid #D6CCF7;
}
.v2-chip-ajuste-estado.v2-chip-ajuste-incremento{
  background:var(--ui-amber-soft);
  color:var(--ui-amber);
  border:1px solid var(--ui-amber-border);
}
.v2-chip-ajuste-estado.v2-chip-ajuste-default{
  background:var(--ui-primary-soft);
  color:var(--ui-primary-hover);
  border:1px solid rgba(0,139,210,0.35);
}

.v2-modal-ajuste-tinta-editor{
  background:var(--ui-background);
  border:1.5px solid var(--ui-primary);
  border-radius:12px;
  padding:12px 14px;
  margin:10px 0;
  animation:v2FadeIn .15s ease-out;
  box-sizing:border-box;
  width:100%;
  min-width:0;
}
@media (min-width:560px){
  .v2-modal-ajuste-tinta-editor{
    grid-column: 1 / -1;
  }
}

/* Microfase AJUSTE-02B.1: Estilos de Ajuste Grupal y Helper de Porcentaje */
.v2-btn-ajuste-grupal{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:var(--ui-primary-soft);
  border:1.5px solid var(--ui-primary);
  border-radius:8px;
  color:var(--ui-primary-hover);
  font-size:11.5px;
  font-weight:700;
  padding:5px 12px;
  cursor:pointer;
  font-family:'Montserrat',sans-serif;
  transition:all .15s ease-in-out;
  white-space:nowrap;
  flex-shrink:0;
}
.v2-btn-ajuste-grupal:hover{
  background:var(--ui-primary);
  color:#ffffff;
}
.v2-btn-ajuste-grupal:disabled{
  opacity:0.5;
  cursor:not-allowed;
  border-color:var(--ui-border) !important;
  color:var(--ui-muted) !important;
  background:var(--ui-background) !important;
}

/* =========================================================
   MICROFASE AJUSTE-02B.1D: VISTA DEDICADA DE AJUSTE GRUPAL
   ========================================================= */
.v2-vista-ajuste-grupal{
  display:flex;
  flex-direction:column;
  gap:12px;
  animation:v2FadeIn .15s ease-out;
  box-sizing:border-box;
  width:100%;
}
.v2-vista-grupal-topbar{
  display:flex;
  align-items:center;
  margin-bottom:2px;
}
.v2-btn-volver-conceptos{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:none;
  border:none;
  padding:4px 0;
  font-family:'Montserrat',sans-serif;
  font-size:12.5px;
  font-weight:700;
  color:var(--ui-primary);
  cursor:pointer;
  transition:all .15s ease;
  text-decoration:none;
}
.v2-btn-volver-conceptos:hover{
  color:var(--ui-primary-hover);
  text-decoration:underline;
  transform:translateX(-2px);
}
.v2-vista-grupal-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding-bottom:10px;
  border-bottom:1px solid var(--ui-border);
}
.v2-vista-grupal-titulo{
  margin:0;
  font-size:15px;
  font-weight:800;
  color:var(--ui-ink);
  letter-spacing:.01em;
}
.v2-vista-grupal-subtitulo{
  font-size:11.5px;
  color:var(--ui-muted);
  margin-top:2px;
}
.v2-vista-grupal-contador{
  font-size:11.5px;
  font-weight:700;
  color:var(--ui-primary-hover);
  background:var(--ui-primary-soft);
  padding:3px 8px;
  border-radius:6px;
  white-space:nowrap;
  flex-shrink:0;
}
.v2-vista-grupal-seccion-seleccion{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.v2-vista-grupal-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
  padding:0 2px;
}
.v2-vista-grupal-toolbar-label{
  font-weight:700;
  color:var(--ui-ink);
}
.v2-vista-grupal-toolbar .v2-btn-link{
  font-size:11.5px;
  font-weight:700;
  color:var(--ui-primary);
  background:none;
  border:none;
  cursor:pointer;
  padding:0;
  text-decoration:underline;
}
.v2-vista-grupal-toolbar .v2-btn-link:hover{
  color:var(--ui-primary-hover);
}
.v2-ajuste-grupal-lista{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:240px;
  overflow-y:auto;
  overflow-x:hidden;
  box-sizing:border-box;
  min-width:0;
  border:1px solid var(--ui-border);
  border-radius:10px;
  padding:10px;
  background:var(--ui-background);
}
.v2-ajuste-grupal-grupo-bloque{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin-bottom:6px;
  box-sizing:border-box;
  min-width:0;
}
.v2-ajuste-grupal-grupo-bloque:last-child{
  margin-bottom:0;
}
.v2-ajuste-grupal-grupo-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  font-size:11.5px;
  font-weight:700;
  color:var(--ui-text, #4B5963);
  padding:4px 2px 6px;
  border-bottom:1px dashed var(--ui-border);
  letter-spacing:.01em;
  min-width:0;
}
.v2-ajuste-grupal-grupo-titulo{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-width:0;
  flex:1 1 auto;
  color:var(--ui-text, #4B5963);
  font-weight:750;
  line-height:1.3;
}
.v2-ajuste-grupal-grupo-subtitulo{
  font-weight:500;
  color:var(--ui-muted);
  font-size:11px;
}
.v2-btn-grupo-toggle{
  background:none;
  border:none;
  color:var(--ui-primary);
  font-size:11px;
  font-weight:700;
  font-family:'Montserrat',sans-serif;
  cursor:pointer;
  padding:2px 6px;
  text-decoration:underline;
  border-radius:4px;
  transition:color .12s ease, background-color .12s ease;
  white-space:nowrap;
  flex-shrink:0;
  line-height:1.2;
}
.v2-btn-grupo-toggle:hover{
  color:var(--ui-primary-hover);
  background:var(--ui-primary-soft);
  text-decoration:none;
}
.v2-ajuste-grupal-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:7px 10px;
  background:var(--ui-surface);
  border:1px solid var(--ui-border);
  border-radius:8px;
  font-size:12px;
  cursor:pointer;
  transition:all .15s ease;
  box-sizing:border-box;
  min-width:0;
}
.v2-ajuste-grupal-item:hover{
  border-color:var(--ui-primary);
  background:rgba(0,139,210,0.02);
}
.v2-ajuste-grupal-item input[type="checkbox"]{
  accent-color:var(--ui-primary);
  width:16px;
  height:16px;
  margin:0;
  cursor:pointer;
}
.v2-ajuste-grupal-precio-efectivo{
  font-weight:700;
  color:var(--ui-primary-hover);
}
.v2-ajuste-grupal-precio-base{
  font-size:11px;
  color:var(--ui-muted);
}
.v2-vista-grupal-formulario{
  background:var(--ui-surface);
  border:1.5px solid var(--ui-primary);
  border-radius:12px;
  padding:14px;
  box-shadow:0 4px 16px rgba(0,139,210,0.08);
  box-sizing:border-box;
  min-width:0;
}
.v2-vista-grupal-acciones{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:10px;
}

.v2-modal-ajuste-grupal-editor{
  background:var(--ui-surface);
  border:1.5px solid var(--ui-primary);
  border-radius:12px;
  padding:14px;
  margin:10px 0 16px;
  animation:v2FadeIn .15s ease-out;
  box-sizing:border-box;
  width:100%;
  box-shadow:0 4px 16px rgba(0,139,210,0.08);
}

.v2-modo-captura-toggle{
  display:inline-flex;
  gap:4px;
  background:var(--ui-background);
  padding:3px;
  border-radius:8px;
  border:1.5px solid var(--ui-border);
  margin-bottom:12px;
}
.v2-modo-captura-opcion{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 12px;
  border-radius:6px;
  font-size:11.5px;
  font-weight:600;
  color:var(--ui-muted);
  cursor:pointer;
  user-select:none;
  transition:all .15s;
}
.v2-modo-captura-opcion input[type="radio"]{
  accent-color:var(--ui-primary);
  margin:0;
  cursor:pointer;
}
.v2-modo-captura-opcion.v2-activa,
.v2-modo-captura-opcion.v2-activo{
  background:var(--ui-surface);
  color:var(--ui-ink);
  font-weight:700;
  box-shadow:0 1px 3px rgba(0,0,0,0.06);
}

/* =========================================================
   SEPARACIÓN VISUAL DISCRETA DE GRUPOS DE TINTA (VISTA CONCEPTOS)
   ========================================================= */
.v2-detalle-subgrupo-tintas{
  background:var(--ui-surface);
  border:1px solid var(--ui-border);
  border-radius:10px;
  padding:10px;
  margin-top:14px;
  box-sizing:border-box;
  min-width:0;
}
@media (min-width:600px){
  .v2-detalle-subgrupo-tintas{
    padding:12px 14px;
  }
}
.v2-detalle-subgrupo-tintas:first-child{
  margin-top:4px;
}
.v2-subgrupo-header{
  padding-bottom:8px;
  margin-bottom:8px;
  border-bottom:1px solid #eef2f6;
  min-width:0;
}
.v2-subgrupo-titulo{
  font-size:12.5px;
  font-weight:800;
  color:var(--ui-ink);
  letter-spacing:.01em;
  min-width:0;
}
.v2-subgrupo-subtitulo{
  font-size:11px;
  font-weight:600;
  color:var(--ui-muted);
  margin-top:2px;
  min-width:0;
}

/* Miniaturas y Layout Superior de Equipos (Configurador y Modal) */
.v2-equipo-header-row{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:16px;
  align-items:flex-end;
  margin-bottom:18px;
}
.v2-equipo-thumb-col{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  flex-shrink:0;
}
.v2-equipo-thumb-box{
  width:84px;
  height:48px;
  background:#FFFFFF;
  border:1.5px solid var(--ui-border);
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:4px 6px;
  overflow:hidden;
  box-sizing:border-box;
  box-shadow:0 1px 3px rgba(23,36,44,.04);
  transition:border-color .15s;
}
.v2-equipo-thumb-box:hover{border-color:var(--ui-border-strong);}
.v2-equipo-thumb-img{
  width:100%;height:100%;object-fit:contain;object-position:center;display:block;
}
.v2-equipo-thumb-placeholder{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  color:var(--ui-muted);background:var(--ui-background);border-radius:8px;
}
.v2-equipo-modelo-col{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.v2-equipo-modelo-col label{
  display:block;
  font-size:12.5px;
  font-weight:700;
  color:var(--ui-ink);
  margin-bottom:6px;
  line-height:1.35;
}
.v2-equipo-modelo-col select{
  width:100%;
  height:48px;
  min-height:48px;
  margin-bottom:0;
}
.v2-equipo-cantidad-col{
  flex-shrink:0;
  display:flex;
  flex-direction:column;

}
.v2-equipo-cantidad-col label{
  display:block;
  font-size:12.5px;
  font-weight:700;
  color:var(--ui-ink);
  margin-bottom:6px;
  line-height:1.35;
}
.v2-equipo-cantidad-col .v2-stepper{
  height:48px;
  min-height:48px;
  margin-bottom:0;
}
.v2-equipo-modal-thumb-box{
  width:52px;height:52px;flex:0 0 52px;background:#FFFFFF;
  border:1px solid var(--ui-border);border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  padding:4px;overflow:hidden;box-sizing:border-box;
}

@media (max-width:580px){
  .v2-equipo-header-row{
    grid-template-columns:auto 1fr;
    gap:12px 14px;
  }
  .v2-equipo-thumb-col{
    grid-column:1;
    grid-row:1;
  }
  .v2-equipo-modelo-col{
    grid-column:2;
    grid-row:1;
  }
  .v2-equipo-cantidad-col{
    grid-column:1 / -1;
    grid-row:2;
  }
  .v2-equipo-cantidad-col .v2-stepper{
    width:100%;
    justify-content:space-between;
  }
  .v2-equipo-cantidad-col .v2-stepper-btn{
    flex:1;
  }
  .v2-equipo-cantidad-col .v2-stepper-valor{
    flex:2;
  }
}

/* Resumen Compacto (Fase UX-RESUMEN-COTIZADOR-01B) */
.v2-resumen-compacto-card{
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  background:var(--ui-primary-soft);border:1.5px solid #CFEAFA;border-radius:16px;
  padding:14px 18px;margin:20px 0;
}
.v2-resumen-compacto-card[hidden]{display:none !important;}
.v2-resumen-compacto-info{display:flex;flex-direction:column;gap:3px;min-width:0;}
.v2-resumen-compacto-conteo{font-size:14px;font-weight:800;color:var(--ui-ink);line-height:1.3;}
.v2-resumen-compacto-monto{font-size:13px;font-weight:600;color:var(--ui-primary-hover);line-height:1.3;}
.v2-resumen-compacto-guardado{font-size:11px;color:var(--ui-muted, #71818A);margin-top:2px;line-height:1.2;}
.v2-resumen-compacto-acciones{display:flex;align-items:center;gap:10px;}
@media (max-width: 600px) {
  .v2-resumen-compacto-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    margin: 16px 0;
  }
  .v2-resumen-compacto-info {
    width: 100%;
  }
  .v2-resumen-compacto-acciones {
    width: 100%;
  }
  .v2-resumen-compacto-acciones .v2-btn {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
  }
}

/* Entrega */
.v2-metodo-grid{display:flex;flex-direction:column;gap:10px;margin-bottom:16px;}
@media (min-width:640px){ .v2-metodo-grid{flex-direction:row;flex-wrap:wrap;} }
.v2-metodo-grid .v2-radio-tarjeta{align-items:flex-start;}
@media (min-width:640px){ .v2-metodo-grid .v2-radio-tarjeta{flex:1 1 calc(50% - 5px);} }
.v2-radio-tarjeta-textos{display:flex;flex-direction:column;gap:2px;}
.v2-radio-tarjeta-sub{font-size:11.5px;color:var(--ui-muted);font-weight:500;}

.v2-entrega-subcampos{border-top:1px dashed var(--ui-border);padding-top:18px;margin-top:4px;}
.v2-entrega-subcampos[hidden]{display:none;}
.v2-info-recoleccion{
  display:flex;align-items:flex-start;gap:10px;background:var(--ui-success-soft);color:var(--ui-success);
  border-radius:12px;padding:11px 13px;font-size:12.5px;line-height:1.45;
}

/* =========================================================
   PASO 3: REVISIÓN COMPLETA Y DEFINITIVA
   ========================================================= */
.v2-revision-bloque-titulo{
  margin:0 0 10px;font-size:11px;font-weight:800;color:var(--ui-primary-hover);
  text-transform:uppercase;letter-spacing:.05em;
}
.v2-revision-fila{
  display:flex;justify-content:space-between;gap:10px;font-size:13px;
  padding:7px 0;border-bottom:1px dashed var(--ui-border);
}
.v2-revision-fila:last-child{border-bottom:none;}
.v2-revision-fila span{color:var(--ui-muted);}
.v2-revision-fila strong{color:var(--ui-ink);text-align:right;font-weight:700;}
.v2-revision-precio-lista{
  display:block;
  font-size:11px;
  color:var(--ui-muted);
  font-weight:600;
  line-height:1.25;
  margin-top:1px;
  white-space:nowrap;
}
.v2-revision-vacio{font-size:12.5px;color:var(--ui-muted);text-align:center;padding:8px 4px;}
.v2-revision-bloque{margin-bottom:16px;}
.v2-revision-bloque:last-child{margin-bottom:0;}

/* Bloque de Fecha, Vigencia y Vencimiento */
.v2-vigencia-custom-wrap{margin-top:8px;}
.v2-vigencia-custom-wrap[hidden]{display:none;}
.v2-vencimiento-highlight{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:var(--ui-primary-soft);border:1px solid #CFEAFA;border-radius:14px;
  padding:12px 16px;margin-top:16px;
}
.v2-vencimiento-highlight-label{font-size:12px;font-weight:800;color:var(--ui-primary-hover);text-transform:uppercase;letter-spacing:.04em;}
.v2-vencimiento-highlight-valor{font-size:14px;font-weight:800;color:var(--ui-ink);}

/* Agente de Venta */
.v2-agente-card{
  background:var(--ui-background);border:1px solid var(--ui-border);border-radius:14px;
  padding:14px 16px;display:flex;flex-direction:column;gap:3px;
}
.v2-agente-nombre{font-size:14.5px;font-weight:800;color:var(--ui-ink);}
.v2-agente-cargo{font-size:12px;font-weight:700;color:var(--ui-primary-hover);}
.v2-agente-telefono{font-size:12px;color:var(--ui-text);margin-top:2px;}
.v2-agente-nota{font-size:11px;color:var(--ui-muted);margin-top:6px;font-style:italic;}

/* Subtotales discretos por categoría en Revisión */
.v2-revision-categoria-subtotal{
  margin-top:8px;
  padding:10px 12px;
  background:var(--ui-background);
  border:1px solid var(--ui-border);
  border-radius:12px;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.v2-revision-categoria-subtotal-fila{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.v2-revision-categoria-subtotal-fila span{
  font-size:12.5px;
  font-weight:700;
  color:var(--ui-text);
}
.v2-revision-categoria-subtotal-fila strong{
  font-size:13.5px;
  font-weight:800;
  color:var(--ui-ink);
}
.v2-revision-categoria-subtotal-nota{
  font-size:11px;
  font-weight:600;
  color:var(--ui-muted);
  text-align:right;
}

/* =========================================================
   PRODUCCION-01C1: UX DE REVISIÓN DE PRODUCCIÓN EN PASO 3
   Scroll Interno + Subtotal Sticky + Observaciones Visibles
   ========================================================= */
.v2-revision-produccion-bloque{
  margin-bottom:16px;
  position:relative;
}
.v2-revision-produccion-titulo{
  font-size:11.5px;
  font-weight:800;
  color:var(--ui-primary-hover);
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-bottom:8px;
}
.v2-revision-produccion-scroll{
  max-height:380px;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:6px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  scrollbar-color:var(--ui-border, #DCE5E9) transparent;
}
.v2-revision-produccion-scroll::-webkit-scrollbar{
  width:6px;
}
.v2-revision-produccion-scroll::-webkit-scrollbar-track{
  background:transparent;
}
.v2-revision-produccion-scroll::-webkit-scrollbar-thumb{
  background-color:var(--ui-border, #DCE5E9);
  border-radius:9999px;
}
.v2-revision-produccion-scroll::-webkit-scrollbar-thumb:hover{
  background-color:var(--ui-muted, #71818A);
}
.v2-revision-produccion-item{
  margin-bottom:12px;
  padding-bottom:10px;
  border-bottom:1px dashed var(--ui-border);
}
.v2-revision-produccion-item:last-child{
  margin-bottom:4px;
}
.v2-revision-produccion-obs{
  font-size:11.5px;
  color:var(--ui-muted);
  margin-top:2px;
  line-height:1.35;
  white-space:pre-wrap;
  word-break:break-word;
}
.v2-revision-produccion-subtotal-sticky{
  background:var(--ui-background, #F3F7F9);
  box-shadow:0 -3px 10px rgba(23, 36, 44, 0.04);
}

/* Totales en Revisar (Jerarquía Mejorada) */
.v2-totales-lista{display:flex;flex-direction:column;gap:4px;margin-bottom:8px;}
.v2-totales-fila{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13.5px;padding:6px 0;}
.v2-totales-fila span{color:var(--ui-text);font-weight:600;}
.v2-totales-fila strong{color:var(--ui-ink);font-weight:700;font-size:14.5px;}

/* AJUSTE-REVISION-01A: Estilo de fila informativa para ajuste comercial neto */
.v2-totales-fila-ajuste-neto{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;padding:3px 0;}
.v2-totales-fila-ajuste-neto .v2-totales-ajuste-neto-label{color:var(--ui-muted,#64748b);font-weight:600;font-size:12.5px;}
.v2-totales-fila-ajuste-neto .v2-totales-ajuste-neto-monto{font-weight:600;font-size:13.5px;white-space:nowrap;letter-spacing:-.01em;}
.v2-totales-fila-ajuste-neto .v2-totales-ajuste-neto-monto.v2-ajuste-negativo{color:#0284c7;}
.v2-totales-fila-ajuste-neto .v2-totales-ajuste-neto-monto.v2-ajuste-positivo{color:#334155;}
.v2-totales-separador{border:none;border-top:1.5px dashed var(--ui-border);margin:10px 0;}
.v2-totales-destacado{
  background:var(--ui-primary-soft);border:1.5px solid #CFEAFA;border-radius:14px;
  padding:14px 18px;display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:6px;
}
.v2-totales-destacado-etiqueta{display:flex;flex-direction:column;gap:2px;}
.v2-totales-destacado-titulo{
  font-size:12px;font-weight:800;color:var(--ui-primary-hover);text-transform:uppercase;letter-spacing:.06em;
}
.v2-totales-destacado-sub{font-size:11px;color:var(--ui-muted);font-weight:600;}
.v2-totales-destacado-monto{
  font-size:24px;font-weight:800;color:var(--ui-ink);letter-spacing:-.02em;text-align:right;
}
@media (min-width:600px){ .v2-totales-destacado-monto{font-size:26px;} }
.v2-totales-nota{margin:12px 0 0;font-size:11.5px;color:var(--ui-muted);line-height:1.45;text-align:center;}

/* Políticas */
.v2-politicas-lista{display:flex;flex-direction:column;gap:10px;}
.v2-politica-item{
  display:flex;gap:10px;background:var(--ui-amber-soft);border:1px solid var(--ui-amber-border);
  border-radius:12px;padding:11px 13px;
}
.v2-politica-icono{color:var(--ui-amber);flex-shrink:0;margin-top:1px;}
.v2-politica-titulo{font-size:12.5px;font-weight:800;color:var(--ui-amber);margin:0 0 2px;}
.v2-politica-texto{font-size:12px;color:#6B4A11;line-height:1.5;margin:0;}
.v2-sin-politicas{font-size:12.5px;color:var(--ui-muted);text-align:center;padding:10px 4px;}

/* Acciones Finales en Paso 3 — Revisar */
.v2-revision-acciones-grid{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.v2-revision-acciones-grid .v2-btn{
  width:100%;
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  font-weight:700;
  border-radius:14px;
}
@media (min-width:600px){
  .v2-revision-acciones-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
    align-items:stretch;
  }
  .v2-revision-acciones-grid.v2-acciones-emitida{
    grid-template-columns:1fr;
  }
  .v2-revision-acciones-grid .v2-btn{
    width:100%;
    height:100%;
  }
}

.v2-acciones-nota{margin:12px 0 0;font-size:11.5px;color:var(--ui-muted);text-align:center;line-height:1.4;}

/* =========================================================
   H2R2D3A — PATRÓN VISUAL UX DE MODALES Y SHEETS (REFERENCIA V1)
   Overlay oscuro, backdrop blur, bottom sheet en móvil, modal
   centrado en desktop, bordes amplios y animaciones discretas.
   ========================================================= */
.v2-modal-overlay{
  position:fixed;inset:0;background:rgba(23,36,44,.45);z-index:300;
  display:flex;align-items:flex-end;justify-content:center;padding:0;
  backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  transition:opacity .2s ease;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  box-sizing:border-box;
}
.v2-modal-overlay[hidden]{display:none !important;}
@media (min-width:600px){ .v2-modal-overlay{align-items:center;justify-content:center;padding:16px;} }
@media (min-width:980px){ .v2-modal-overlay{padding:24px;} }

.v2-modal{
  background:var(--ui-surface);width:100%;max-width:620px;max-height:90vh;
  border-radius:24px 24px 0 0;padding:20px 20px calc(20px + env(safe-area-inset-bottom,0px));
  box-shadow:0 -10px 40px rgba(23,36,44,.2);display:flex;flex-direction:column;
  animation:v2SlideUpSheet .22s cubic-bezier(.16,1,.3,1);
  box-sizing:border-box;
  margin:auto 0 0;
  min-width:0;
}
@media (min-width:600px){
  .v2-modal{
    border-radius:24px;padding:22px 24px;max-height:calc(100vh - 32px);
    margin:auto;
    animation:v2FadeInSheet .2s ease-out;
  }
}

@keyframes v2SlideUpSheet{
  from{transform:translateY(100%);}
  to{transform:translateY(0);}
}
@keyframes v2FadeInSheet{
  from{opacity:0;transform:scale(.96);}
  to{opacity:1;transform:scale(1);}
}

/* Patrón visual V1 de Bottom Sheet de Acciones (H2R2D3B.1 Stacking Fix) */
.v2-actions-overlay{
  position:fixed;inset:0;background:rgba(23,36,44,.45);z-index:100100;
  display:flex;align-items:flex-end;justify-content:center;padding:0;
  backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  transition:opacity .2s ease;
}
.v2-actions-overlay[hidden]{display:none !important;}
@media (min-width:600px){ .v2-actions-overlay{align-items:center;padding:20px;} }

/* Modal de Progreso y Modal Interstitial: SIEMPRE CENTRADOS (Móvil y Desktop) */
#v2ModalProgreso.v2-modal-overlay,
#v2ModalInterPdf.v2-modal-overlay{
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  z-index: 100200 !important;
}

.v2-actions-bottom-sheet{
  background:var(--ui-surface,#fff);width:100%;max-width:480px;
  border-radius:24px 24px 0 0;
  padding:14px 20px calc(20px + env(safe-area-inset-bottom,0px));
  box-shadow:0 -10px 40px rgba(23,36,44,.2);
  animation:v2SlideUpSheet .22s cubic-bezier(.16,1,.3,1);
}
@media (min-width:600px){
  .v2-actions-bottom-sheet{border-radius:24px;padding:24px;animation:v2FadeInSheet .2s ease-out;}
}

.v2-sheet-drag-handle{
  width:36px;height:4px;border-radius:99px;background:var(--ui-border,#DCE5E9);
  margin:0 auto 14px;
}
@media (min-width:600px){ .v2-sheet-drag-handle{display:none;} }

.v2-actions-title{
  margin:0 0 4px;font-size:18px;font-weight:800;color:var(--ui-ink,#17242C);
  text-align:center;letter-spacing:-.01em;
}
.v2-actions-subtitle{
  margin:0 0 16px;font-size:12.5px;color:var(--ui-muted,#71818A);
  text-align:center;line-height:1.45;
}
.v2-actions-list{
  display:flex;flex-direction:column;gap:8px;margin-bottom:14px;
}
.v2-action-row{
  width:100%;display:flex;align-items:center;gap:13px;min-height:56px;padding:12px 14px;
  border:1.5px solid var(--ui-border,#DCE5E9);border-radius:14px;
  background:var(--ui-surface,#fff);color:var(--ui-ink,#17242C);
  font-family:'Montserrat',sans-serif;
  cursor:pointer;transition:background-color .15s,border-color .15s,transform .12s;
  text-align:left;
}
.v2-action-row:hover{background:#EAF7FD;border-color:var(--ui-primary,#008BD2);}
.v2-action-row:active{transform:scale(.98);}
.v2-action-icon{
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
  width:38px;height:38px;border-radius:11px;
  background:#EAF7FD;color:#008BD2;
}
.v2-action-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;}
.v2-action-text strong{font-size:14.5px;font-weight:700;color:var(--ui-ink,#17242C);}
.v2-action-text small{font-size:11.5px;font-weight:500;color:var(--ui-muted,#71818A);line-height:1.35;}
.v2-btn-cancelar-sheet{
  width:100%;padding:14px;border-radius:14px;border:none;
  background:var(--ui-background,#F3F7F9);color:var(--ui-ink,#17242C);
  font-family:'Montserrat',sans-serif;font-size:14.5px;font-weight:700;
  cursor:pointer;transition:background-color .15s,transform .12s;
}
.v2-btn-cancelar-sheet:hover{background:#E9EFF1;}
.v2-btn-cancelar-sheet:active{transform:scale(.98);}

/* Modal de Progreso Estilo V1 adaptado a V2 (Centrado móvil y desktop) */
.v2-modal-progreso-card {
  max-width: 360px !important;
  width: 100% !important;
  text-align: center;
  padding: 28px 24px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  border-radius: 24px !important;
  align-items: center;
  margin: auto !important;
  animation: v2FadeInSheet .2s ease-out !important;
}

/* Modal Interstitial: "¿Ya tienes el PDF?" (H2R2D3B2.1 Homologación Visual) */
.v2-modal-inter-card {
  position: relative !important;
  max-width: 420px !important;
  width: 100% !important;
  text-align: center;
  padding: 28px 24px calc(22px + env(safe-area-inset-bottom, 0px)) !important;
  border-radius: 24px !important;
  align-items: center;
  margin: auto !important;
  animation: v2FadeInSheet .2s ease-out !important;
  background: var(--ui-surface, #FFFFFF) !important;
  box-shadow: 0 10px 40px rgba(23, 36, 44, 0.2) !important;
}
.v2-btn-cerrar-inter {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ui-muted, #71818A);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .15s, color .15s;
  padding: 0;
}
.v2-btn-cerrar-inter:hover {
  background: var(--ui-background, #F3F7F9);
  color: var(--ui-ink, #17242C);
}
.v2-inter-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--ui-primary-soft, #EAF7FD);
  color: var(--ui-primary, #008BD2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 14px;
}
.v2-inter-titulo {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
  color: var(--ui-ink, #17242C);
  letter-spacing: -.01em;
}
.v2-inter-texto {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--ui-text, #34454F);
  line-height: 1.45;
}
.v2-inter-nota {
  margin: 0 0 20px;
  font-size: 12px;
  color: var(--ui-muted, #71818A);
  line-height: 1.4;
}
.v2-inter-acciones {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
}
.v2-inter-btn-canal {
  width: 100% !important;
  padding: 13px 18px !important;
  border-radius: 12px !important;
  background: var(--ui-primary, #008BD2) !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 14.5px !important;
  border: 1px solid var(--ui-primary, #008BD2) !important;
  cursor: pointer !important;
  transition: background-color .15s, transform .12s !important;
}
.v2-inter-btn-canal:hover {
  background: var(--ui-primary-hover, #0079B8) !important;
  border-color: var(--ui-primary-hover, #0079B8) !important;
}
.v2-inter-btn-canal:active {
  transform: scale(.98) !important;
}
.v2-inter-btn-guardar {
  width: 100% !important;
  padding: 12px 18px !important;
  border-radius: 12px !important;
  background: var(--ui-background, #F3F7F9) !important;
  color: var(--ui-ink, #17242C) !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  border: 1px solid var(--ui-border, #DCE5E9) !important;
  cursor: pointer !important;
  transition: background-color .15s, border-color .15s, transform .12s !important;
}
.v2-inter-btn-guardar:hover {
  background: #E9EFF1 !important;
  border-color: var(--ui-border-strong, #C7D4DA) !important;
}
.v2-inter-btn-guardar:active {
  transform: scale(.98) !important;
}
.v2-spinner-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}
.v2-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid var(--ui-primary-soft, #eaf7fd);
  border-top-color: var(--ui-primary, #008bd2);
  border-radius: 50%;
  animation: v2Girar .8s linear infinite;
}
@keyframes v2Girar {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .v2-spinner { animation-duration: 1.6s; }
}
.v2-progreso-titulo {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ui-ink, #17242c);
  letter-spacing: -.01em;
}
.v2-progreso-subtexto {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ui-muted, #71818a);
  min-height: 20px;
  line-height: 1.4;
}
.v2-progreso-barra-track {
  width: 100%;
  height: 6px;
  background: var(--ui-background, #f3f7f9);
  border: 1px solid var(--ui-border, #dce5e9);
  border-radius: 99px;
  margin-top: 16px;
  overflow: hidden;
}
.v2-progreso-barra-fill {
  height: 100%;
  background: var(--ui-primary, #008bd2);
  border-radius: 99px;
  transition: width .22s ease-out;
}

/* Botones de alta jerarquía para la toolbar del visualizador documental */
.aj-doc-btn-guardar-pdf {
  background: #008bd2 !important;
  color: #ffffff !important;
  border: 1px solid #008bd2 !important;
  font-weight: 800 !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: background-color .15s, transform .12s !important;
}
.aj-doc-btn-guardar-pdf:hover {
  background: #0079b8 !important;
  border-color: #0079b8 !important;
}
.aj-doc-btn-guardar-pdf:active {
  transform: scale(.97) !important;
}
.aj-doc-btn-acciones {
  background: var(--ui-primary-soft, #EAF7FD) !important;
  color: var(--ui-primary, #008BD2) !important;
  border: 1.5px solid var(--ui-primary, #008BD2) !important;
  font-weight: 700 !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: background-color .15s, border-color .15s, color .15s, transform .12s !important;
}
.aj-doc-btn-acciones:hover {
  background: #DBF0FB !important;
  border-color: var(--ui-primary-hover, #0079B8) !important;
  color: var(--ui-primary-hover, #0079B8) !important;
}
.aj-doc-btn-acciones:active {
  transform: scale(.97) !important;
}

.v2-modal-header{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding-bottom:14px;border-bottom:1px solid var(--ui-border);margin-bottom:16px;min-width:0;
}
.v2-modal-header h3{margin:0;font-size:16px;font-weight:800;color:var(--ui-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
.v2-btn-cerrar-modal{
  background:transparent;border:none;color:var(--ui-muted);font-size:22px;line-height:1;
  cursor:pointer;width:32px;height:32px;display:flex;align-items:center;justify-content:center;
  border-radius:8px;flex-shrink:0;
}
.v2-btn-cerrar-modal:hover{color:var(--ui-ink);background:var(--ui-background);}

.v2-modal-body{overflow-y:auto;overflow-x:hidden;padding-right:2px;flex:1 1 auto;margin-bottom:16px;min-width:0;box-sizing:border-box;}
.v2-modal-body::-webkit-scrollbar{width:6px;}
.v2-modal-body::-webkit-scrollbar-thumb{background:var(--ui-border-strong);border-radius:99px;}

.v2-detalle-grupo{border:1px solid var(--ui-border);border-radius:14px;padding:12px;margin-bottom:12px;box-sizing:border-box;min-width:0;}
@media (min-width:760px){
  .v2-detalle-grupo{padding:14px;}
}
.v2-detalle-grupo:last-child{margin-bottom:0;}
.v2-detalle-grupo-header{font-size:11.5px;font-weight:800;color:var(--ui-primary-hover);margin-bottom:10px;min-width:0;}
.v2-detalle-lineas{display:flex;flex-direction:column;gap:8px;min-width:0;}

/* =========================================================
   ESTRUCTURA RESPONSIVE DEL DETALLE DE CONCEPTOS (AJUSTE-02B.1F)
   ========================================================= */

/* Nivel 1: Móvil (<560px) - Apilado vertical compacto y legible */
.v2-detalle-item{
  display:flex;flex-direction:column;gap:8px;padding:10px 8px;border-bottom:1px solid var(--ui-border);
  border-left:3px solid transparent;border-radius:6px;
  transition:border-left-color .15s ease, background-color .15s ease;
  min-width:0;box-sizing:border-box;
}
.v2-detalle-item.v2-item-ajustado{
  border-left-color:var(--ui-primary);
  background:linear-gradient(90deg, rgba(0,139,210,0.04) 0%, rgba(255,255,255,0) 100%);
}
.v2-detalle-lineas .v2-detalle-item:last-child{border-bottom:none;padding-bottom:4px;}

.v2-detalle-row-top{
  display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;
}
.v2-detalle-info-col{
  display:flex;flex-direction:column;gap:3px;min-width:0;flex:1 1 auto;overflow:hidden;
}
.v2-detalle-info-main{
  display:flex;align-items:center;gap:6px;min-width:0;
}
.v2-detalle-nombre-tinta{
  font-size:13.5px;font-weight:700;color:var(--ui-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;
}
.v2-tinta-qty-chip{
  font-size:11.5px;font-weight:700;color:var(--ui-muted);white-space:nowrap;flex-shrink:0;
}
.v2-detalle-info-sub{
  display:flex;align-items:center;gap:4px;margin-top:1px;min-width:0;flex-wrap:wrap;
}
.v2-detalle-top-acciones{
  display:inline-flex;align-items:center;align-self:center;gap:6px;flex-shrink:0;white-space:nowrap;
}

.v2-detalle-row-mid{
  display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0;
}
.v2-detalle-row-precios{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;
  background:var(--ui-background);border-radius:8px;padding:6px 12px;width:100%;
  box-sizing:border-box;min-width:0;
}
.v2-detalle-precio-item{display:flex;flex-direction:column;gap:1px;min-width:0;}
.v2-detalle-precio-label{font-size:9px;font-weight:800;color:var(--ui-muted);text-transform:uppercase;letter-spacing:.04em;}
.v2-detalle-precio-valor{font-size:12.5px;font-weight:700;color:var(--ui-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.v2-detalle-precio-item.v2-subtotal{text-align:right;}
.v2-detalle-precio-item.v2-subtotal .v2-detalle-precio-valor{color:var(--ui-primary-hover);font-weight:800;}

.v2-precio-base-tachado{
  font-size:10.5px;color:var(--ui-muted);text-decoration:line-through;line-height:1.2;white-space:nowrap;
}
.v2-precio-ajustado{
  color:var(--ui-primary-hover) !important;font-weight:800 !important;
}

/* Nivel 2: Intermedio / Tablet / Laptops chicas (560px a 759.98px)
   Redistribución armónica en 2 filas:
   - Fila 1: Datos de tinta + chip de estado a la izquierda, botones de acción a la derecha.
   - Fila 2: Stepper (cantidad) a la izquierda, precios (Unitario y Subtotal) a la derecha.
   Cero desbordes, textos protegidos, botones 100% accesibles. */
@media (min-width:560px) and (max-width:759.98px){
  .v2-detalle-item{
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:center;
    gap:10px 12px;
    padding:10px 12px;
  }
  .v2-detalle-row-top{
    grid-column:1 / -1;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    width:100%;
    min-width:0;
  }
  .v2-detalle-row-mid{
    grid-column:1;
    display:flex;
    align-items:center;
    width:auto;
  }
  .v2-detalle-row-precios{
    grid-column:2;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:16px;
    background:transparent;
    padding:0;
    width:100%;
    min-width:0;
  }
  .v2-detalle-precio-item{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    text-align:right;
    min-width:0;
  }
  .v2-modal-ajuste-tinta-editor{
    grid-column:1 / -1;
  }
}

/* Nivel 3: Desktop amplio (>= 760px) - Disposición ejecutiva tabular completa
   Alineación horizontal de una sola línea protegida con min-width: 0 */
@media (min-width:760px){
  .v2-detalle-item{
    display:grid;
    grid-template-columns:minmax(130px, 1.4fr) auto auto minmax(85px, 105px) minmax(95px, 115px);
    align-items:center;
    gap:10px 12px;
    padding:8px 10px;
  }
  .v2-detalle-row-top{display:contents;}
  .v2-detalle-row-mid{display:contents;}
  .v2-detalle-row-precios{display:contents;}
  .v2-detalle-precio-item{display:flex;flex-direction:column;align-items:flex-end;text-align:right;min-width:0;}
  .v2-modal-ajuste-tinta-editor{
    grid-column:1 / -1;
  }
}

.v2-btn-eliminar-linea{
  background:transparent;border:1.5px solid var(--ui-border);color:var(--ui-muted);
  width:34px;min-width:34px;max-width:34px;height:34px;min-height:34px;max-height:34px;
  box-sizing:border-box;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;
  align-self:center;cursor:pointer;flex-shrink:0;transition:.15s;padding:0;
}
.v2-btn-eliminar-linea:hover{border-color:var(--ui-danger);color:var(--ui-danger);background:var(--ui-danger-soft);}
.v2-btn-eliminar-linea svg{width:16px;height:16px;pointer-events:none;}

.v2-modal-footer{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding-top:14px;border-top:1px solid var(--ui-border);flex-wrap:wrap;min-width:0;
}

.v2-modal-vaciar-dialog{max-width:400px;}
.v2-modal-usar-base-dialog{max-width:480px;width:100%;}
.v2-link-origen{
  background:none;border:none;padding:0;color:var(--ui-primary, #008BD2);
  font-weight:700;font-size:13px;cursor:pointer;text-decoration:underline;
  display:inline-flex;align-items:center;gap:4px;font-family:inherit;
}
.v2-link-origen:hover{color:var(--ui-primary-hover, #0079B8);}

/* Microfase AJUSTE-02B.1F: Modal fluido centrado y contenido protegido contra recortes */
.v2-modal.v2-modal-detalle-dialog{
  width:100%;
  max-width:100%;
}
@media (min-width:600px){
  .v2-modal.v2-modal-detalle-dialog{
    width:min(820px, calc(100vw - 32px));
    max-width:calc(100vw - 32px);
  }
}

/* =========================================================
   PRODUCCION-01A1: CARD RESPONSIVE DE PRODUCCIÓN EN MODAL
   ========================================================= */
.v2-prod-card{
  background:#FFFFFF;
  border:1.5px solid var(--ui-border, #DCE5E9);
  border-radius:14px;
  padding:14px 16px;
  margin-bottom:12px;
  box-sizing:border-box;
  min-width:0;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.v2-prod-card:last-child{
  margin-bottom:0;
}
.v2-prod-card:hover{
  border-color:#B8D5E5;
  box-shadow:0 2px 10px rgba(23,36,44,.04);
}
.v2-prod-card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  min-width:0;
}
.v2-prod-badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:#F0F7FA;
  border:1px solid #D2E7F3;
  color:var(--ui-primary-hover, #0079B8);
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
  padding:3px 9px;
  border-radius:6px;
  line-height:1;
}
.v2-prod-badge svg{
  color:var(--ui-primary, #008BD2);
  flex-shrink:0;
}
.v2-prod-card-body{
  margin-bottom:12px;
  min-width:0;
}
.v2-prod-card-title{
  font-size:14.5px;
  font-weight:700;
  color:var(--ui-ink, #17242C);
  line-height:1.35;
  word-break:break-word;
}
.v2-prod-card-obs{
  font-size:12px;
  color:var(--ui-muted, #71818A);
  line-height:1.45;
  margin-top:4px;
  word-break:break-word;
  background:#F8FBFC;
  padding:6px 10px;
  border-radius:6px;
  border-left:2.5px solid var(--ui-border, #DCE5E9);
}
.v2-prod-card-metrics{
  display:grid;
  grid-template-columns:auto 1fr 1fr;
  align-items:center;
  gap:12px 18px;
  background:var(--ui-background, #F3F7F9);
  border:1px solid #E6EFF3;
  border-radius:10px;
  padding:10px 14px;
  box-sizing:border-box;
  min-width:0;
}
.v2-prod-metric-col{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.v2-prod-metric-col.v2-metric-qty{
  flex-shrink:0;
}
.v2-prod-metric-col.v2-metric-unitario{
  text-align:left;
  padding-left:4px;
}
.v2-prod-metric-col.v2-metric-subtotal{
  text-align:right;
  align-items:flex-end;
}
.v2-prod-metric-label{
  font-size:9.5px;
  font-weight:800;
  color:var(--ui-muted, #71818A);
  text-transform:uppercase;
  letter-spacing:.04em;
  white-space:nowrap;
}
.v2-prod-metric-val{
  font-size:13.5px;
  font-weight:700;
  color:var(--ui-ink, #17242C);
  white-space:nowrap;
  letter-spacing:-.01em;
}
.v2-prod-subtotal-wrap{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
}
.v2-prod-val-subtotal{
  color:var(--ui-primary-hover, #0079B8);
  font-weight:800;
  font-size:14.5px;
  line-height:1.2;
}
.v2-prod-iva-tag{
  display:block;
  font-size:10px;
  font-weight:600;
  color:var(--ui-muted, #71818A);
  line-height:1.2;
  white-space:nowrap;
}
.v2-prod-stepper .v2-stepper-valor{
  min-width:44px;
  text-align:center;
  padding:0 4px;
  font-weight:700;
}

/* Responsive Tablet (< 680px) */
@media (max-width: 679.98px){
  .v2-prod-card-metrics{
    grid-template-columns:auto 1fr;
    gap:10px 14px;
  }
  .v2-prod-metric-col.v2-metric-qty{
    grid-column:1;
    grid-row:1;
  }
  .v2-prod-metric-col.v2-metric-unitario{
    grid-column:2;
    grid-row:1;
    text-align:right;
    align-items:flex-end;
    padding-left:0;
  }
  .v2-prod-metric-col.v2-metric-subtotal{
    grid-column:1 / -1;
    grid-row:2;
    border-top:1px dashed #DCE5E9;
    padding-top:8px;
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    width:100%;
  }
  .v2-prod-subtotal-wrap{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:2px;
  }
}

/* Responsive Mobile (< 460px) */
@media (max-width: 459.98px){
  .v2-prod-card{
    padding:12px;
  }
  .v2-prod-card-metrics{
    display:flex;
    flex-direction:column;
    gap:9px;
    padding:10px 12px;
  }
  .v2-prod-metric-col.v2-metric-qty{
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    width:100%;
  }
  .v2-prod-metric-col.v2-metric-unitario{
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    width:100%;
    border-top:1px solid #EAEFF2;
    padding-top:6px;
  }
  .v2-prod-metric-col.v2-metric-subtotal{
    border-top:1px dashed #DCE5E9;
    padding-top:8px;
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    width:100%;
  }
  .v2-prod-metric-val{
    font-size:13px;
  }
  .v2-prod-val-subtotal{
    font-size:14px;
  }
}

/* =========================================================
   PRODUCCION-01A1B: ALINEACIÓN PRECIO UNITARIO Y SUBTOTAL
   ========================================================= */
.v2-prod-precios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}
@media (max-width: 540px) {
  .v2-prod-precios-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
.v2-prod-precio-label {
  display: flex;
  align-items: center;
  min-height: 20px;
  height: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ui-ink, #17242C);
  margin-bottom: 7px;
  line-height: 1.35;
  box-sizing: border-box;
}
.v2-prod-input-moneda {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;
  min-height: 48px;
  box-sizing: border-box;
  background: var(--ui-surface, #FFFFFF);
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.v2-prod-input-moneda:hover {
  border-color: var(--ui-border-strong, #C7D4DA);
}
.v2-prod-input-moneda:focus-within {
  border-color: var(--ui-primary, #008BD2);
  box-shadow: 0 0 0 3.5px rgba(0, 139, 210, 0.14);
}
.v2-prod-input-moneda .v2-prod-moneda-simbolo {
  padding: 0 4px 0 14px;
  color: var(--ui-muted, #71818A);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  user-select: none;
}
.v2-prod-input-moneda:focus-within .v2-prod-moneda-simbolo {
  color: var(--ui-primary, #008BD2);
}
.v2-prod-input-moneda input#v2ProdPrecioUnitario {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 14px 0 4px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--ui-ink, #17242C) !important;
  font-family: 'Montserrat', sans-serif !important;
  box-sizing: border-box !important;
}
.v2-prod-subtotal-caja {
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;
  min-height: 48px;
  box-sizing: border-box;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 14px;
  background: var(--ui-background, #F3F7F9);
  padding: 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ui-primary-hover, #0079B8);
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.01em;
}

/* =========================================================
   PRODUCCION-01F: GESTOR UNIFICADO DE CONCEPTOS DE PRODUCCIÓN
   ========================================================= */
#v2ConfiguradorProduccion,
#v2ConfiguradorRefacciones,
#v2ConfiguradorServicios {
  margin-bottom: 20px;
}
.v2-prod-unified-wrapper {
  width: 100%;
  box-sizing: border-box;
}
.v2-prod-unified-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.v2-prod-inline-resumen-subtitulo {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ui-muted, #71818A);
}
.v2-prod-resumen-conteo {
  font-weight: 500;
  color: var(--ui-muted, #71818A);
}
.v2-prod-resumen-subtotal {
  font-weight: 700;
  color: var(--ui-ink, #17242C);
}
.v2-prod-btn-nuevo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #FFFFFF;
  background: var(--ui-primary, #008BD2);
  border: 1px solid var(--ui-primary, #008BD2);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.v2-prod-btn-nuevo:hover {
  background: var(--ui-primary-hover, #0079B8);
  border-color: var(--ui-primary-hover, #0079B8);
}
.v2-prod-btn-nuevo:active {
  transform: scale(0.98);
}
.v2-prod-btn-nuevo:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
/* =========================================================
   ESTADO VACÍO HOMOLOGADO (PRODUCCIÓN, REFACCIONES Y SERVICIOS)
   ========================================================= */
.v2-prod-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 46px 24px;
  min-height: 280px;
  background: var(--ui-background, #F8FAFC);
  border: 1.5px dashed var(--ui-border, #CBD5E1);
  border-radius: 14px;
  margin: 4px 0 0;
  box-sizing: border-box;
}
.v2-prod-empty-box[hidden] {
  display: none !important;
}
.v2-prod-empty-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--ui-primary-soft, #F0F7FD);
  color: var(--ui-primary, #008BD2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.v2-prod-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ui-ink, #17242C);
  margin: 0 0 8px 0;
  line-height: 1.3;
}
.v2-prod-empty-desc {
  font-size: 13px;
  color: var(--ui-muted, #71818A);
  margin: 0 0 20px 0;
  max-width: 440px;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .v2-prod-empty-box {
    padding: 36px 16px;
    min-height: 260px;
  }
}
/* Barra de búsqueda y Toolbar con Lupa Única */
.v2-prod-inline-toolbar {
  width: 100%;
  margin-bottom: 20px;
}
.v2-prod-inline-search-wrap {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 10px;
  background: #FFFFFF;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.v2-prod-inline-search-wrap:focus-within {
  border-color: var(--ui-primary, #008BD2);
  box-shadow: 0 0 0 3px rgba(0, 139, 210, 0.12);
}
.v2-prod-inline-search-icon {
  width: 42px;
  height: 100%;
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ui-muted, #71818A);
  pointer-events: none;
}
.v2-prod-inline-search-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.v2-prod-inline-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 14px 0 0 !important;
  margin: 0 !important;
  font-size: 13.5px;
  line-height: 1.2;
  color: var(--ui-ink, #17242C);
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
}
.v2-prod-inline-search-input::-webkit-search-decoration,
.v2-prod-inline-search-input::-webkit-search-cancel-button,
.v2-prod-inline-search-input::-webkit-search-results-button,
.v2-prod-inline-search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.v2-prod-inline-search-input::-ms-clear,
.v2-prod-inline-search-input::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}
.v2-prod-inline-filtro-info {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ui-muted, #71818A);
  font-weight: 600;
}
.v2-prod-inline-nota-iva {
  font-size: 11.5px;
  color: var(--ui-muted, #71818A);
  font-style: italic;
  margin-top: 7px;
}
/* Contenedor de scroll interno para 50-100 conceptos con inset horizontal limpio */
.v2-prod-inline-scroll-area {
  max-height: 490px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 12px 8px 12px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#v2ProdInlineListado,
#v2RefInlineListado,
#v2ServInlineListado {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
.v2-prod-inline-scroll-area::-webkit-scrollbar {
  width: 6px;
}
.v2-prod-inline-scroll-area::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}
.v2-prod-inline-scroll-area::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
.v2-prod-inline-scroll-area::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
/* Fila-Tarjeta Compacta */
.v2-prod-card-row {
  background: #FFFFFF;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 12px;
  padding: 12px 14px;
  box-sizing: border-box;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v2-prod-card-row:hover {
  border-color: #CBD5E1;
  background-color: #FAFCFE;
}
.v2-prod-card-row.v2-prod-card-editing {
  background: #F4F9FD !important;
  border: 1.5px solid var(--ui-primary, #008BD2) !important;
  box-shadow: 0 0 0 2px rgba(0, 139, 210, 0.12);
  padding: 14px;
}
/* Nivel 1: Número + Concepto + Observaciones subordinadas */
.v2-prod-card-top-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.v2-prod-card-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ui-primary, #008BD2);
  background: #EBF5FB;
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
  margin-top: 1px;
}
.v2-prod-card-content {
  flex: 1;
  min-width: 0;
}
.v2-prod-card-titulo {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ui-ink, #17242C);
  line-height: 1.35;
  word-break: break-word;
}
.v2-prod-card-obs {
  font-size: 12px;
  color: var(--ui-muted, #71818A);
  line-height: 1.45;
  margin-top: 5px;
  white-space: pre-wrap;
  word-break: break-word;
}
/* Nivel 2: Franja de Métricas y Acciones */
.v2-prod-card-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 36px;
}
/* Franja de métricas en gris muy suave (#F8FAFC) con contraste sutil e integrado */
.v2-prod-card-metrics {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 12.5px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 7px;
  padding: 4px 10px;
  box-sizing: border-box;
}
.v2-prod-metric-pill {
  color: var(--ui-ink, #17242C);
}
.v2-prod-metric-pill strong {
  font-weight: 700;
}
.v2-prod-metric-sep {
  color: #CBD5E1;
  font-weight: 700;
}
.v2-prod-metric-unit {
  font-variant-numeric: tabular-nums;
  color: #64748B;
}
.v2-prod-metric-sub {
  color: var(--ui-ink, #17242C);
  font-variant-numeric: tabular-nums;
}
.v2-prod-metric-sub strong {
  font-weight: 800;
  color: var(--ui-primary, #008BD2);
}
/* Botones de acción homologados */
.v2-prod-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.v2-prod-btn-accion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  box-sizing: border-box;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--ui-border, #DCE5E9);
  background: #FFFFFF;
  color: var(--ui-ink, #17242C);
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1;
}
.v2-prod-btn-accion:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}
.v2-prod-btn-duplicar {
  color: #0369A1;
  border-color: #BAE6FD;
  background: #F0F9FF;
}
.v2-prod-btn-duplicar:hover {
  background: #E0F2FE;
  border-color: #7DD3FC;
  color: #0284C7;
}
.v2-prod-btn-editar:hover {
  color: var(--ui-primary, #008BD2);
  border-color: var(--ui-primary, #008BD2);
}
.v2-prod-btn-eliminar {
  color: #DC2626;
  border-color: #FECACA;
  background: #FEF2F2;
}
.v2-prod-btn-eliminar:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
}
.v2-prod-btn-accion:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
/* Formulario inline de edición expandida */
.v2-prod-edit-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.v2-prod-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v2-prod-edit-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.v2-prod-edit-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 13px;
  background: #FFFFFF;
  color: var(--ui-ink, #17242C);
  outline: none;
  transition: border-color .15s ease;
}
.v2-prod-edit-input:focus {
  border-color: var(--ui-primary, #008BD2);
}
.v2-prod-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  background: #FFFFFF;
  color: var(--ui-ink, #17242C);
  outline: none;
  resize: vertical;
  min-height: 48px;
  transition: border-color .15s ease;
}
.v2-prod-edit-textarea:focus {
  border-color: var(--ui-primary, #008BD2);
}
.v2-prod-edit-num-grid {
  display: grid;
  grid-template-columns: 80px 120px 1fr;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 4px;
}
.v2-prod-edit-subtotal-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
  height: 33px;
  padding: 0 10px;
  background: #EBF5FB;
  border: 1px solid #BAE6FD;
  border-radius: 7px;
  box-sizing: border-box;
}
.v2-prod-edit-subtotal-val {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ui-primary, #008BD2);
  line-height: 33px;
  font-variant-numeric: tabular-nums;
}
.v2-prod-edit-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.v2-prod-btn-guardar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--ui-primary, #008BD2);
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1;
  transition: background .15s ease;
}
.v2-prod-btn-guardar:hover {
  background: var(--ui-primary-hover, #0079B8);
}
.v2-prod-btn-cancelar {
  background: #FFFFFF;
  color: #64748B;
  border: 1px solid #CBD5E1;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1;
  transition: background .15s ease;
}
.v2-prod-btn-cancelar:hover {
  background: #F1F5F9;
  color: var(--ui-ink, #17242C);
}
/* Responsividad en anchos estrechos (<580px) */
@media (max-width: 580px) {
  .v2-prod-card-row {
    padding: 12px;
    gap: 10px;
    border-radius: 10px;
  }
  .v2-prod-card-top-row {
    gap: 8px;
  }
  .v2-prod-card-badge {
    padding: 2px 6px;
    font-size: 11px;
  }
  .v2-prod-card-titulo {
    font-size: 13.5px;
    line-height: 1.35;
  }
  .v2-prod-card-obs {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.45;
  }
  .v2-prod-card-bottom-row {
    padding-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 2px;
  }
  /* Bloque económico móvil: ligero, integrado, sin aspecto de caja pesada */
  .v2-prod-card-metrics {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 10px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
    box-sizing: border-box;
  }
  .v2-prod-metric-pill {
    color: var(--ui-ink, #17242C);
    font-size: 12px;
  }
  .v2-prod-metric-unit {
    color: #64748B;
    font-size: 12px;
  }
  .v2-prod-metric-sub {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--ui-ink, #17242C);
  }
  .v2-prod-metric-sub strong {
    color: var(--ui-primary, #008BD2);
    font-weight: 800;
  }
  /* Botones de acción móviles: 3 columnas perfectamente alineadas y táctiles */
  .v2-prod-card-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .v2-prod-btn-accion {
    height: 34px;
    min-height: 34px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 4px;
    width: 100%;
    box-sizing: border-box;
  }
  .v2-prod-btn-accion svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
  }
  .v2-prod-edit-num-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 380px) {
  .v2-prod-card-actions {
    gap: 6px;
  }
  .v2-prod-btn-accion {
    font-size: 11px;
    gap: 3px;
  }
  .v2-prod-card-metrics {
    padding: 6px 8px;
    font-size: 11.5px;
  }
  .v2-prod-metric-pill,
  .v2-prod-metric-unit,
  .v2-prod-metric-sub {
    font-size: 11.5px;
  }
}

/* =========================================================
   SERVICIOS-HIBRIDO-01B1: FORMULARIO HÍBRIDO, CHECKLIST Y PULIDO VISUAL
   ========================================================= */
.v2-serv-row-grid-2 {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: flex-start;
}
@media (max-width: 640px) {
  .v2-serv-row-grid-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
.v2-serv-select {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 7px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: 'Montserrat', sans-serif;
  background: #FFFFFF;
  color: var(--ui-ink, #17242C);
  outline: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.v2-serv-select:focus {
  border-color: var(--ui-primary, #008BD2);
  box-shadow: 0 0 0 2px rgba(0, 139, 210, 0.12);
}
.v2-serv-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.v2-serv-pill-label {
  font-size: 11px;
  color: var(--ui-muted, #71818A);
  font-weight: 500;
}
.v2-serv-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #0369A1;
  background: #E0F2FE;
  border: 1px solid #BAE6FD;
  border-radius: 9999px;
  padding: 3px 9px;
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1.3;
}
.v2-serv-pill-btn:hover {
  background: #BAE6FD;
  border-color: #7DD3FC;
  color: #0284C7;
}
.v2-serv-fecha-card-box {
  background: #FFFFFF;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 6px 0;
}
.v2-serv-fecha-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.v2-serv-fecha-toggle-wrap {
  display: inline-flex;
  align-items: stretch;
  background: #F1F5F9;
  border-radius: 7px;
  padding: 3px;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  height: 38px;
  box-sizing: border-box;
}
.v2-serv-fecha-toggle-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: #64748B;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  box-sizing: border-box;
  line-height: 1;
  transition: all .15s ease;
  white-space: nowrap;
}
.v2-serv-fecha-toggle-btn.activo {
  background: #FFFFFF;
  color: #008BD2;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.v2-serv-fecha-input-col {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 170px;
}
/* Componente Unificado de Selección de Fechas DD/MM/AAAA */
.v2-fecha-picker-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.v2-fecha-picker-wrap.compacto {
  width: 175px;
  max-width: 100%;
}
.v2-fecha-picker-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  padding: 12px 14px;
  min-height: 48px;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 14px;
  color: var(--ui-ink, #17242C);
  background: var(--ui-surface, #FFFFFF);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  user-select: none;
}
.v2-fecha-picker-display.compacto {
  min-height: 38px;
  height: 38px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 7px;
}
.v2-fecha-picker-display .placeholder {
  color: #94A3B8;
  font-weight: 500;
}
.v2-fecha-picker-display .con-fecha {
  color: #17242C;
  font-weight: 600;
}
.v2-fecha-picker-native {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
}
.v2-fecha-picker-native::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.v2-fecha-picker-wrap:hover .v2-fecha-picker-display {
  border-color: var(--ui-border-strong, #CBD5E1);
}
.v2-fecha-picker-native:focus + .v2-fecha-picker-display,
.v2-fecha-picker-wrap:focus-within .v2-fecha-picker-display {
  outline: none;
  border-color: var(--ui-primary, #008BD2);
  box-shadow: 0 0 0 3px rgba(0, 139, 210, .15);
}
.v2-fecha-picker-native:disabled + .v2-fecha-picker-display {
  background: var(--ui-surface-subtle, #F8FAFC) !important;
  border-color: var(--ui-border, #DCE5E9) !important;
  color: var(--ui-muted, #94A3B8) !important;
  cursor: not-allowed !important;
  opacity: 0.7 !important;
}
.v2-fecha-picker-native:disabled {
  cursor: not-allowed !important;
  pointer-events: none !important;
}
.v2-fecha-picker-native.error + .v2-fecha-picker-display {
  border-color: #DC2626 !important;
  background-color: #FEF2F2 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15) !important;
}
.v2-fecha-picker-icon {
  flex-shrink: 0;
  margin-left: 8px;
}
.v2-serv-fecha-error-msg {
  display: block;
  font-size: 11.5px;
  color: #DC2626;
  font-weight: 600;
  margin-top: 5px;
  line-height: 1.3;
}
.v2-serv-fecha-hint {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  font-size: 12px;
  color: #64748B;
  font-style: italic;
  padding-left: 2px;
}
/* Bloque Mantenimiento Técnico */
.v2-serv-mantenimiento-panel {
  background: #F8FBFE;
  border: 1.5px solid #BAE6FD;
  border-radius: 9px;
  padding: 12px 14px;
  margin: 2px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v2-serv-mantenimiento-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.v2-serv-mantenimiento-title {
  font-size: 12px;
  font-weight: 750;
  color: #0369A1;
  text-transform: uppercase;
  letter-spacing: .03em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.v2-serv-mantenimiento-subtitle {
  font-size: 11.5px;
  color: #64748B;
  margin: 0;
  line-height: 1.35;
}
.v2-serv-checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}
@media (max-width: 600px) {
  .v2-serv-checklist-grid {
    grid-template-columns: 1fr;
  }
}
.v2-serv-check-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: #1E293B;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  padding: 4px 5px;
  border-radius: 4px;
  transition: background-color .12s ease;
}
.v2-serv-check-item:hover {
  background-color: #EFF6FF;
}
.v2-serv-check-item input[type="checkbox"] {
  accent-color: #008BD2;
  margin-top: 2px;
  cursor: pointer;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
/* Tareas personalizadas */
.v2-serv-custom-section {
  border-top: 1px dashed #CBD5E1;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v2-serv-custom-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.v2-serv-custom-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #0F172A;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 3px 8px;
  line-height: 1.3;
  max-width: 100%;
  word-break: break-word;
  box-sizing: border-box;
}
.v2-serv-custom-remove {
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.v2-serv-custom-remove:hover {
  color: #DC2626;
}
.v2-serv-custom-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.v2-serv-custom-input {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--ui-border, #DCE5E9);
  border-radius: 6px;
  min-height: 38px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  color: var(--ui-ink, #17242C);
  outline: none;
}
.v2-serv-custom-input:focus {
  border-color: var(--ui-primary, #008BD2);
}
.v2-serv-custom-add-btn {
  background: #FFFFFF;
  color: #0369A1;
  border: 1px solid #BAE6FD;
  font-weight: 600;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1;
  transition: all .15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}
.v2-serv-custom-add-btn:hover {
  background: #E0F2FE;
  border-color: #7DD3FC;
}
@media (max-width: 600px) {
  .v2-serv-custom-add-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .v2-serv-custom-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 42px;
  }
  .v2-serv-custom-add-btn {
    width: 100%;
    min-height: 44px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    padding: 0 16px;
    white-space: normal;
  }
}
/* Alerta contextual de precio revisado */
.v2-serv-aviso-alcance {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 12px;
  color: #92400E;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.v2-serv-check-confirmacion-box {
  background: #FEF9C3;
  border: 1.5px solid #F59E0B;
  border-radius: 7px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #78350F;
  cursor: pointer;
}
.v2-serv-check-confirmacion-box input[type="checkbox"] {
  accent-color: #D97706;
  width: 15px;
  height: 15px;
  cursor: pointer;
}
/* Badges en tarjeta guardada */
.v2-serv-tag-tipo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: 1px 7px;
  border-radius: 4px;
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}
.v2-serv-tag-alcance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}
.v2-serv-tag-alcance.modificado {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FCD34D;
}
.v2-serv-tag-fecha {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}
/* Pulido de dimensiones y espaciados de formulario de servicios y refacciones */
#v2ServGestionInlineWrapper .v2-prod-edit-fields,
#v2RefGestionInlineWrapper .v2-prod-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#v2ServGestionInlineWrapper .v2-prod-edit-input,
#v2RefGestionInlineWrapper .v2-prod-edit-input {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13.5px;
}
#v2ServGestionInlineWrapper .v2-prod-edit-textarea,
#v2RefGestionInlineWrapper .v2-prod-edit-textarea {
  min-height: 80px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}
#v2ServGestionInlineWrapper .v2-prod-edit-subtotal-box,
#v2RefGestionInlineWrapper .v2-prod-edit-subtotal-box {
  height: 40px;
}
#v2ServGestionInlineWrapper .v2-prod-edit-subtotal-val,
#v2RefGestionInlineWrapper .v2-prod-edit-subtotal-val {
  line-height: 40px;
  font-size: 14px;
}
#v2ServGestionInlineWrapper .v2-prod-btn-guardar,
#v2ServGestionInlineWrapper .v2-prod-btn-cancelar,
#v2RefGestionInlineWrapper .v2-prod-btn-guardar,
#v2RefGestionInlineWrapper .v2-prod-btn-cancelar {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
}
#v2ServGestionInlineWrapper .v2-prod-edit-actions-row,
#v2RefGestionInlineWrapper .v2-prod-edit-actions-row {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #E2E8F0;
}
#v2RefInlineListado > .v2-prod-card-row,
#v2ServInlineListado > .v2-prod-card-row {
  margin-bottom: 12px;
}
#v2RefInlineListado > .v2-prod-card-row:last-child,
#v2ServInlineListado > .v2-prod-card-row:last-child {
  margin-bottom: 0;
}

/* =========================================================
   TOAST
   ========================================================= */
.v2-toast-host{
  position:fixed;left:0;right:0;bottom:18px;display:flex;justify-content:center;
  z-index:100300;pointer-events:none;padding:0 16px;
}
.v2-toast{
  background:var(--ui-ink);color:#fff;font-size:13px;font-weight:600;padding:12px 18px;
  border-radius:12px;box-shadow:0 6px 20px rgba(23,36,44,.25);max-width:420px;text-align:center;
  opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .18s,transform .18s,visibility .18s;pointer-events:none;
}
.v2-toast.v2-mostrar{opacity:1;visibility:visible;transform:translateY(0);pointer-events:none;}

/* =========================================================
   FAB FLOTANTE — NUEVA COTIZACIÓN EXCLUSIVA POST-EMISIÓN
   ========================================================= */
.v2-fab-nueva-cotizacion {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--ui-primary, #008BD2);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 139, 210, 0.42), 0 2px 6px rgba(23, 36, 44, 0.15);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100050;
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), box-shadow .18s ease, background-color .15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.v2-fab-nueva-cotizacion:hover {
  background: var(--ui-primary-hover, #0079B8);
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(0, 139, 210, 0.52), 0 3px 8px rgba(23, 36, 44, 0.18);
}
.v2-fab-nueva-cotizacion:active {
  transform: scale(0.95);
}
.v2-fab-nueva-cotizacion:focus-visible {
  outline: 2px solid #008BD2;
  outline-offset: 3px;
}
@media (max-width: 639.98px) {
  .v2-fab-nueva-cotizacion {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}
.v2-fab-nueva-cotizacion svg {
  display: block;
  width: 24px;
  height: 24px;
  stroke: #FFFFFF;
  color: #FFFFFF;
  flex: none;
  pointer-events: none;
}
.v2-fab-nueva-cotizacion svg line {
  stroke: #FFFFFF;
  stroke-width: 2.6;
}

/* Desktop / Tablet Grande > 639.98px: Ocultar FAB (H2R2D3B3.4.3) */
@media (min-width: 640px) {
  #v2FabNuevaCotizacion,
  .v2-fab-nueva-cotizacion {
    display: none !important;
  }
}

/* =========================================================
   H2R3B-02.3.2 — HEADER GLOBAL EN DOS FRANJAS VISUALES
   Franja 1: Identidad de Marca y Usuario (Fondo Blanco, padding: 18px 0 16px)
   Franja 2: Navegación Global / Acciones (Fondo Soft, padding: 10px 0 12px)
   Margen inferior equilibrado: 18px desktop / 16px mobile
   ========================================================= */
.v2-header-global{
  width:100%;
  background:transparent;
  margin:0 0 18px 0;
  padding:0;
  border-radius:0 !important;
  border:none !important;
  box-shadow:none !important;
}

/* Franja 1: Identidad (Marca a la izquierda, Usuario a la derecha) */
.v2-franja-identidad{
  width:100%;
  background:#FFFFFF;
  border-bottom:1px solid var(--ui-border);
  box-shadow:0 1px 3px rgba(23,36,44,.02);
  padding:18px 0 16px;
}
.v2-franja-inner{
  max-width:1100px;
  margin:0 auto;
  padding:0 24px;
  box-sizing:border-box;
}
.v2-app.v2-modo-historial .v2-franja-inner{
  max-width:1380px;
}

.v2-franja-identidad .v2-franja-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

/* Izquierda: Jerarquía vertical Marca y Módulo */
.v2-header-left{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:3px;
  min-width:0;
  flex-shrink:0;
}
.v2-header-brand{
  font-size:11px;
  font-weight:800;
  color:var(--ui-primary);
  letter-spacing:.16em;
  text-transform:uppercase;
  line-height:1.2;
}
.v2-header-modulo{
  font-size:18px;
  font-weight:700;
  color:var(--ui-ink);
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  letter-spacing:-.01em;
}

/* Derecha: Identidad de usuario y menú de cuenta integrado */
.v2-header-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.v2-cuenta-menu-wrap{
  position:relative;
}
.v2-cuenta-btn{
  display:flex;
  align-items:center;
  gap:10px;
  background:#FAFCFD;
  border:1px solid #DCE7EC;
  border-radius:12px;
  padding:5px 12px 5px 8px;
  cursor:pointer;
  transition:all .15s ease;
  min-height:42px;
}
.v2-cuenta-btn:hover,
.v2-cuenta-btn[aria-expanded="true"]{
  background:#F2F7FA;
  border-color:var(--ui-primary);
}
.v2-usuario-avatar{
  width:30px;
  height:30px;
  border-radius:50%;
  background:var(--ui-primary-soft);
  color:var(--ui-primary-hover);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11.5px;
  font-weight:800;
  flex-shrink:0;
}
.v2-usuario-info{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  text-align:left;
  line-height:1.2;
}
.v2-usuario-nombre{
  font-size:12.5px;
  font-weight:700;
  color:var(--ui-ink);
  max-width:160px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.v2-sesion-tag{
  font-size:10px;
  font-weight:600;
  color:var(--ui-muted);
  display:flex;
  align-items:center;
  gap:4px;
}
.v2-sesion-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#10B981;
  display:inline-block;
}
.v2-cuenta-chevron{
  color:var(--ui-muted);
  transition:transform .15s ease;
}
.v2-cuenta-btn[aria-expanded="true"] .v2-cuenta-chevron{
  transform:rotate(180deg);
}
.v2-cuenta-dropdown{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:220px;
  background:#FFFFFF;
  border:1px solid var(--ui-border);
  border-radius:14px;
  box-shadow:0 10px 25px rgba(23,36,44,.1);
  padding:8px 0;
  z-index:100;
}
.v2-cuenta-dropdown[hidden]{
  display:none !important;
}
.v2-cuenta-dropdown-header{
  padding:8px 16px 10px;
}
.v2-dropdown-nombre{
  font-size:13px;
  font-weight:700;
  color:var(--ui-ink);
  margin-bottom:2px;
}
.v2-dropdown-cargo{
  font-size:11px;
  color:var(--ui-muted);
  margin-bottom:2px;
}
.v2-dropdown-codigo{
  font-size:10.5px;
  font-weight:600;
  color:var(--ui-primary);
}
.v2-cuenta-dropdown-divider{
  height:1px;
  background:#EEF3F5;
  margin:4px 0;
}
.v2-cuenta-dropdown-item{
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 16px;
  font-size:12.5px;
  font-weight:600;
  color:var(--ui-text);
  text-decoration:none;
  transition:background .12s ease;
}
.v2-cuenta-dropdown-item:hover{
  background:#F5FAFD;
  color:var(--ui-primary-hover);
}
.v2-cuenta-dropdown-item.v2-item-logout{
  color:#9C2B2B;
}
.v2-cuenta-dropdown-item.v2-item-logout:hover{
  background:#FDE8E8;
}
/* LOGIN-ROUTING-01C_B.1: Elemento activo "Mi dashboard" gobernado por capability canViewDashboard */
.v2-cuenta-dropdown-item.v2-item-dashboard{
  cursor:pointer;
  color:var(--ui-text);
}
.v2-cuenta-dropdown-item.v2-item-dashboard:hover{
  background:#F5FAFD;
  color:var(--ui-primary-hover);
}

/* Franja 2: Navegación Global (Fondo soft ArtisJet, padding compacto: 10px 0 12px) */
.v2-franja-nav{
  width:100%;
  background:var(--ui-primary-soft);
  border-bottom:1px solid #D7E9F3;
  padding:10px 0 12px;
}
.v2-franja-nav .v2-franja-inner{
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.v2-header-acciones-global{
  display:flex;
  align-items:center;
  gap:12px;
}
.v2-header-acciones-global .v2-btn{
  min-height:40px;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  gap:7px;
  box-sizing:border-box;
}

/* Subbarra contextual en el workspace (fuera del header) */
.v2-header-subbar{
  margin-top:0;
  margin-bottom:20px;
}
.v2-app.v2-modo-historial .v2-header-subbar{
  display:none !important;
}

/* Responsivo Mobile (< 768px) */
@media (max-width:767.98px){
  .v2-header-global{
    margin-bottom:16px;
  }
  .v2-franja-identidad{
    padding:14px 0 12px;
  }
  .v2-franja-inner{
    padding:0 16px;
  }
  .v2-header-brand{
    font-size:10px;
    letter-spacing:.14em;
  }
  .v2-header-modulo{
    font-size:15.5px;
  }
  .v2-usuario-info{
    display:none;
  }
  .v2-cuenta-btn{
    padding:4px 8px 4px 6px;
    min-height:36px;
    gap:6px;
  }
  .v2-franja-nav{
    padding:10px 0 12px;
  }
  .v2-header-acciones-global{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    width:100%;
    box-sizing:border-box;
  }
  .v2-header-acciones-global .v2-btn{
    width:100%;
    min-height:44px;
    justify-content:center;
    font-size:13px;
    padding:0 10px;
    border-radius:12px;
  }
}
@media (max-width:360px){
  .v2-header-brand{
    font-size:9.5px;
    letter-spacing:.12em;
  }
  .v2-header-modulo{
    font-size:14px;
  }
  .v2-header-acciones-global .v2-btn{
    font-size:12px;
    gap:4px;
    padding:0 6px;
  }
}

/* =========================================================
   H2R3B-02.3.4 — FRANJA DE CONTEOS POR ESTADO COMERCIAL
   Balance simétrico de padding vertical (12px arriba / 12px abajo)
   con 24px desktop / 16px mobile y margin-bottom: 0
   ========================================================= */
.v2-historial-conteos-estado{
  display:flex;
  align-items:center;
  gap:10px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:12px 24px;
  padding-inline:24px;
  scroll-padding-left:24px;
  scroll-padding-right:24px;
  scroll-padding-inline:24px;
  margin-bottom:0;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  box-sizing:border-box;
  width:100%;
}
@media (max-width:767.98px){
  .v2-historial-conteos-estado{
    padding:12px 16px;
    padding-inline:16px;
    scroll-padding-left:16px;
    scroll-padding-right:16px;
    scroll-padding-inline:16px;
    margin-bottom:0;
  }
}
.v2-historial-conteos-estado::-webkit-scrollbar{
  height:4px;
}
.v2-historial-conteos-estado::-webkit-scrollbar-thumb{
  background:#DCE7EC;
  border-radius:4px;
}

/* Chip individual: ancho automático según contenido, sin encogimiento ni recorte */
#v2AppShell .v2-conteo-chip,
.v2-conteo-chip{
  flex:0 0 auto;
  flex-shrink:0;
  width:auto;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 13px;
  border-radius:20px;
  font-size:12px;
  font-weight:700;
  border:1px solid #DCE7EC !important;
  background:#FFFFFF !important;
  color:var(--ui-ink) !important;
  cursor:pointer;
  white-space:nowrap;
  transition:all .15s ease;
  min-height:36px;
  box-sizing:border-box;
  box-shadow:0 1px 2px rgba(23,36,44,.03);
}

/* Hover de chip inactivo: aislamiento explícito para evitar texto blanco por reglas externas de WP */
#v2AppShell .v2-conteo-chip:hover,
.v2-conteo-chip:hover{
  border-color:var(--ui-primary) !important;
  background:#F5FAFD !important;
  color:var(--ui-ink) !important;
}
#v2AppShell .v2-conteo-chip:hover .v2-conteo-label,
.v2-conteo-chip:hover .v2-conteo-label{
  color:var(--ui-ink) !important;
}

/* Focus visible para accesibilidad por teclado */
#v2AppShell .v2-conteo-chip:focus-visible,
.v2-conteo-chip:focus-visible{
  outline:2.5px solid var(--ui-primary);
  outline-offset:2px;
}

.v2-conteo-label{
  white-space:nowrap;
  flex-shrink:0;
  line-height:1.2;
  color:inherit;
}
.v2-conteo-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:19px;
  height:18px;
  padding:0 5px;
  border-radius:10px;
  font-size:11px;
  font-weight:800;
  background:#EEF4F7;
  color:var(--ui-text);
  flex-shrink:0;
  box-sizing:border-box;
  line-height:1;
}

/* Chip activo: selección visual persistente */
#v2AppShell .v2-conteo-chip.v2-conteo-activo,
.v2-conteo-chip.v2-conteo-activo{
  border-color:var(--ui-primary) !important;
  background:#E8F5FB !important;
  color:#1A6389 !important;
  box-shadow:0 1px 3px rgba(26,99,137,.14);
}
#v2AppShell .v2-conteo-chip.v2-conteo-activo .v2-conteo-label,
.v2-conteo-chip.v2-conteo-activo .v2-conteo-label{
  color:#1A6389 !important;
}

/* Chip activo + hover: preserva estado activo sin mutar a blanco */
#v2AppShell .v2-conteo-chip.v2-conteo-activo:hover,
.v2-conteo-chip.v2-conteo-activo:hover{
  border-color:var(--ui-primary) !important;
  background:#E8F5FB !important;
  color:#1A6389 !important;
}
#v2AppShell .v2-conteo-chip.v2-conteo-activo:hover .v2-conteo-label,
.v2-conteo-chip.v2-conteo-activo:hover .v2-conteo-label{
  color:#1A6389 !important;
}

/* Badge numérico en chip activo (normal y con hover) */
#v2AppShell .v2-conteo-chip.v2-conteo-activo .v2-conteo-num,
#v2AppShell .v2-conteo-chip.v2-conteo-activo:hover .v2-conteo-num,
.v2-conteo-chip.v2-conteo-activo .v2-conteo-num,
.v2-conteo-chip.v2-conteo-activo:hover .v2-conteo-num{
  background:#1A6389 !important;
  color:#FFFFFF !important;
}

/* Badges numéricos por estado comercial (inactivos y con hover del padre) */
#v2AppShell .v2-conteo-chip.v2-conteo-cotizada:not(.v2-conteo-activo) .v2-conteo-num,
#v2AppShell .v2-conteo-chip.v2-conteo-cotizada:not(.v2-conteo-activo):hover .v2-conteo-num,
.v2-conteo-chip.v2-conteo-cotizada:not(.v2-conteo-activo) .v2-conteo-num,
.v2-conteo-chip.v2-conteo-cotizada:not(.v2-conteo-activo):hover .v2-conteo-num{ background:#E8F5FB !important; color:#1A6389 !important; }

#v2AppShell .v2-conteo-chip.v2-conteo-en_seguimiento:not(.v2-conteo-activo) .v2-conteo-num,
#v2AppShell .v2-conteo-chip.v2-conteo-en_seguimiento:not(.v2-conteo-activo):hover .v2-conteo-num,
.v2-conteo-chip.v2-conteo-en_seguimiento:not(.v2-conteo-activo) .v2-conteo-num,
.v2-conteo-chip.v2-conteo-en_seguimiento:not(.v2-conteo-activo):hover .v2-conteo-num{ background:#FFF6E0 !important; color:#78520D !important; }

#v2AppShell .v2-conteo-chip.v2-conteo-pausada:not(.v2-conteo-activo) .v2-conteo-num,
#v2AppShell .v2-conteo-chip.v2-conteo-pausada:not(.v2-conteo-activo):hover .v2-conteo-num,
.v2-conteo-chip.v2-conteo-pausada:not(.v2-conteo-activo) .v2-conteo-num,
.v2-conteo-chip.v2-conteo-pausada:not(.v2-conteo-activo):hover .v2-conteo-num{ background:#F3EEFA !important; color:#5F4B78 !important; }

#v2AppShell .v2-conteo-chip.v2-conteo-ganada:not(.v2-conteo-activo) .v2-conteo-num,
#v2AppShell .v2-conteo-chip.v2-conteo-ganada:not(.v2-conteo-activo):hover .v2-conteo-num,
.v2-conteo-chip.v2-conteo-ganada:not(.v2-conteo-activo) .v2-conteo-num,
.v2-conteo-chip.v2-conteo-ganada:not(.v2-conteo-activo):hover .v2-conteo-num{ background:#E8F8F0 !important; color:#157347 !important; }

#v2AppShell .v2-conteo-chip.v2-conteo-perdida:not(.v2-conteo-activo) .v2-conteo-num,
#v2AppShell .v2-conteo-chip.v2-conteo-perdida:not(.v2-conteo-activo):hover .v2-conteo-num,
.v2-conteo-chip.v2-conteo-perdida:not(.v2-conteo-activo) .v2-conteo-num,
.v2-conteo-chip.v2-conteo-perdida:not(.v2-conteo-activo):hover .v2-conteo-num{ background:#FDE8E8 !important; color:#9C2B2B !important; }

/* Ocultar temporalmente pestañas no productivas de ciclo de vida (H2R3B-02) */
#v2HistorialTabArchivadas,
#v2HistorialTabPapelera{
  display:none !important;
}

/* =========================================================
   H2 — HISTORIAL PROPIO DE SOLO LECTURA
   ========================================================= */
.v2-app.v2-modo-historial .v2-app-container{max-width:1380px;}
.v2-app.v2-modo-historial .v2-header-row,
.v2-app.v2-modo-historial .v2-subtitle{display:none;}
.v2-app.v2-modo-historial .v2-layout-workspace,
.v2-app.v2-modo-historial .v2-pasos-nav-movil{display:none !important;}
.v2-historial-view{animation:v2FadeIn .18s ease-out;}
.v2-historial-view[hidden]{display:none !important;}
.v2-historial-cabecera{
  display:flex;flex-direction:column;gap:14px;margin-bottom:18px;
}
.v2-historial-cabecera-principal{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;
}
.v2-historial-titulo-wrap{display:flex;align-items:flex-start;gap:10px;min-width:0;}
.v2-historial-icono{
  width:40px;height:40px;border-radius:13px;background:var(--ui-primary-soft);color:var(--ui-primary);
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.v2-historial-icono svg{width:20px;height:20px;}
.v2-historial-titulo{margin:0;font-size:20px;font-weight:800;color:var(--ui-ink);letter-spacing:-.01em;}
.v2-historial-descripcion{margin:4px 0 0;font-size:12.5px;color:var(--ui-muted);line-height:1.45;}
.v2-historial-cabecera-acciones{display:flex;gap:8px;flex-wrap:wrap;}
.v2-historial-actualizado{font-size:11.5px;color:var(--ui-muted);font-weight:600;min-height:17px;}
.v2-historial-actualizado strong{color:var(--ui-text);}

.v2-historial-panel{
  background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:20px;
  box-shadow:0 3px 16px rgba(23,36,44,.055);overflow:hidden;
}
.v2-historial-tabs{
  display:flex;gap:4px;padding:10px 12px 0;border-bottom:1px solid var(--ui-border);overflow-x:auto;
  scrollbar-width:none;
}
.v2-historial-tabs::-webkit-scrollbar{display:none;}
.v2-historial-tab{
  position:relative;border:0;background:transparent;color:var(--ui-muted);font-size:13px;font-weight:750;
  min-height:44px;padding:0 13px;cursor:pointer;white-space:nowrap;border-radius:10px 10px 0 0;
}
.v2-historial-tab:hover{color:var(--ui-ink);background:var(--ui-background);}
.v2-historial-tab[aria-selected="true"]{color:var(--ui-primary-hover);font-weight:800;}
.v2-historial-tab[aria-selected="true"]::after{
  content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:3px;border-radius:4px 4px 0 0;background:var(--ui-primary);
}
.v2-historial-tab-contador{
  display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:18px;margin-left:6px;padding:0 5px;
  border-radius:999px;background:rgba(0,0,0,.06);font-size:10px;font-weight:800;color:var(--ui-muted);
}
.v2-historial-tab[aria-selected="true"] .v2-historial-tab-contador{background:var(--ui-primary-soft);color:var(--ui-primary-hover);}

/* Herramientas (Buscador y Filtros con altura uniforme 42px) */
.v2-historial-herramientas{padding:14px 16px;border-bottom:1px solid var(--ui-border);background:#fff;}
.v2-historial-herramientas-fila{display:flex;align-items:center;gap:10px;}
.v2-historial-busqueda{position:relative;flex:1 1 auto;min-width:0;}
.v2-historial-busqueda svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--ui-muted);pointer-events:none;width:16px;height:16px;}
.v2-historial-busqueda input{
  width:100%;height:42px;min-height:42px;border:1.5px solid var(--ui-border);border-radius:12px;background:var(--ui-background);
  color:var(--ui-ink);font-size:13px;padding:0 38px 0 38px;outline:0;transition:all .15s ease;box-sizing:border-box;
}
.v2-historial-busqueda input:focus{border-color:var(--ui-primary);box-shadow:0 0 0 3px rgba(0,139,210,.12);background:#fff;}
.v2-historial-busqueda-limpiar{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);width:26px;height:26px;border:0;border-radius:6px;
  background:transparent;color:var(--ui-muted);cursor:pointer;font-size:18px;line-height:1;display:flex;align-items:center;justify-content:center;
}
.v2-historial-busqueda-limpiar:hover{background:#fff;color:var(--ui-ink);}

.v2-historial-filtros-toggle{
  flex:0 0 auto;height:42px;min-height:42px;border-radius:12px;display:inline-flex;align-items:center;gap:7px;padding:0 14px;
  font-size:13px;font-weight:700;box-sizing:border-box;
}
.v2-historial-filtros-toggle .v2-filtro-indicador{
  display:none;width:7px;height:7px;border-radius:50%;background:var(--ui-primary);
}
.v2-historial-filtros-toggle.v2-tiene-filtros .v2-filtro-indicador{display:none !important;}
.v2-historial-filtros-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:18px;height:18px;padding:0 5px;border-radius:9px;
  background:var(--ui-primary, #009845);color:#fff;
  font-size:11px;font-weight:800;line-height:1;box-sizing:border-box;margin-left:2px;
}
.v2-historial-filtros-badge[hidden]{display:none !important;}

/* Estructura del Drawer / Panel de filtros */
.v2-historial-filtros-drawer{
  position:fixed;inset:0;z-index:615;background:rgba(23,36,44,.45);
  display:flex;align-items:flex-end;justify-content:center;
  opacity:0;pointer-events:none;transition:opacity .18s ease-out;
}
.v2-historial-filtros-drawer.v2-abierto{
  opacity:1;pointer-events:auto;
}
.v2-historial-filtros-dialog{
  background:#fff;width:100%;max-width:480px;border-radius:20px 20px 0 0;
  padding:20px 20px calc(24px + env(safe-area-inset-bottom,0px));
  box-shadow:0 -8px 32px rgba(23,36,44,.16);
  transform:translateY(100%);transition:transform .2s ease-out;
  max-height:85vh;overflow-y:auto;
}
.v2-historial-filtros-drawer.v2-abierto .v2-historial-filtros-dialog{
  transform:translateY(0);
}
.v2-historial-filtros-header{
  display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid var(--ui-border);
}
.v2-historial-filtros-titulo{margin:0;font-size:16px;font-weight:800;color:var(--ui-ink);}
.v2-historial-filtros-cerrar{
  width:36px;height:36px;border:1px solid var(--ui-border);border-radius:10px;background:#fff;color:var(--ui-muted);font-size:22px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;
}
.v2-historial-filtros-cerrar:hover{background:var(--ui-background);color:var(--ui-ink);}
.v2-historial-filtros-body{
  display:grid;grid-template-columns:1fr;gap:14px;
}
.v2-historial-filtro label{display:block;margin-bottom:5px;font-size:11px;font-weight:800;color:var(--ui-muted);text-transform:uppercase;letter-spacing:.04em;}
.v2-historial-filtro select{
  width:100%;height:42px;min-height:42px;border:1.5px solid var(--ui-border);border-radius:12px;background:#fff;color:var(--ui-ink);
  font-size:12.5px;padding:0 34px 0 12px;outline:0;
}
.v2-historial-input-date{
  width:100%;height:42px;min-height:42px;border:1.5px solid var(--ui-border);border-radius:12px;background:#fff;color:var(--ui-ink);
  font-size:12.5px;padding:0 12px;outline:0;box-sizing:border-box;font-family:inherit;
}
.v2-historial-input-date:focus{border-color:var(--ui-primary);}
.v2-historial-filtro-rango-wrap{
  display:flex;flex-direction:column;gap:4px;width:100%;
}
.v2-historial-filtro-rango-wrap[hidden]{display:none !important;}
.v2-historial-filtro-rango-campos{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;
}
.v2-historial-rango-error{
  font-size:11px;color:var(--ui-danger, #dc2626);margin-top:2px;line-height:1.3;font-weight:600;
}
.v2-historial-rango-error[hidden]{display:none !important;}
.v2-historial-limpiar-filtros{
  align-self:end;justify-self:start;width:auto;height:42px;min-height:42px;padding:0 18px;
  font-family:'Montserrat',sans-serif;font-size:12.5px;font-weight:700;color:var(--ui-primary-hover);
  background:#fff;border:1.5px solid var(--ui-border);border-radius:12px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  white-space:nowrap;box-sizing:border-box;text-decoration:none;transition:all .15s ease;
}
.v2-historial-limpiar-filtros:hover:not(:disabled){
  background:var(--ui-background);border-color:var(--ui-border-strong);color:var(--ui-primary);
}
.v2-historial-limpiar-filtros:focus-visible{
  outline:2px solid var(--ui-primary);outline-offset:2px;
}
.v2-historial-limpiar-filtros:disabled{
  opacity:0.45;cursor:default;background:var(--ui-background);border-color:var(--ui-border);color:var(--ui-muted);pointer-events:none;
}

/* Acciones y feedback del Drawer de Filtros en Móvil */
.v2-historial-filtros-acciones-movil{
  display:flex;flex-direction:column;gap:8px;margin-top:6px;width:100%;
}
.v2-historial-drawer-resumen{
  font-size:12px;font-weight:600;color:var(--ui-muted, #71818A);
  text-align:center;line-height:1.35;padding:2px 0;
}
.v2-historial-btn-ver-resultados{
  width:100%;height:46px;min-height:46px;display:inline-flex;align-items:center;justify-content:center;
  font-family:'Montserrat',sans-serif;font-size:13.5px;font-weight:800;border-radius:12px;
  box-sizing:border-box;cursor:pointer;transition:all .15s ease;
}
.v2-historial-btn-ver-resultados:disabled{
  opacity:0.5;cursor:not-allowed;pointer-events:none;
}

.v2-historial-aviso{
  margin:14px 16px;border:1px solid var(--ui-border);border-radius:13px;padding:11px 14px;font-size:12px;line-height:1.45;
  color:var(--ui-text);background:var(--ui-background);
}
.v2-historial-aviso[hidden]{display:none !important;}
.v2-historial-aviso.v2-error{color:#8F2929;background:var(--ui-danger-soft);border-color:#F0B6B6;}
.v2-historial-aviso.v2-advertencia{color:var(--ui-amber);background:var(--ui-amber-soft);border-color:var(--ui-amber-border);}
.v2-historial-aviso-accion{margin-left:6px;border:0;background:transparent;color:inherit;font-weight:800;text-decoration:underline;cursor:pointer;padding:0;}

.v2-historial-cargando{display:grid;gap:10px;padding:18px 16px;}
.v2-historial-cargando[hidden]{display:none !important;}
.v2-historial-skeleton{height:64px;border-radius:12px;background:linear-gradient(90deg,#EDF2F4 25%,#F8FAFB 45%,#EDF2F4 65%);background-size:220% 100%;animation:v2HistorialSkeleton 1.2s linear infinite;}
@keyframes v2HistorialSkeleton{to{background-position:-220% 0;}}

/* Tabla de Escritorio */
.v2-historial-tabla-wrap{display:none;overflow-x:auto;}
.v2-historial-tabla-wrap[hidden],.v2-historial-cards[hidden]{display:none !important;}
.v2-historial-tabla{width:100%;border-collapse:separate;border-spacing:0;min-width:768px;}
.v2-historial-tabla th{
  position:sticky;top:0;z-index:1;background:#F8FAFB;color:var(--ui-muted);font-size:10px;font-weight:800;
  text-transform:uppercase;letter-spacing:.05em;text-align:left;padding:12px 14px;border-bottom:1px solid var(--ui-border);
}
.v2-historial-tabla td{padding:14px 14px;border-bottom:1px solid var(--ui-border);vertical-align:middle;font-size:12.5px;color:var(--ui-text);}
.v2-historial-tabla tbody tr{transition:background-color .14s ease;}
.v2-historial-tabla tbody tr:hover{background:#F8FBFC;}
.v2-historial-tabla tbody tr:last-child td{border-bottom:0;}
.v2-historial-folio-btn{
  border:0;background:transparent;padding:4px 8px;margin:-4px -8px;color:var(--ui-primary-hover);
  font-weight:800;font-size:13px;cursor:pointer;text-align:left;letter-spacing:.01em;
  border-radius:8px;display:inline-flex;align-items:center;gap:5px;transition:all .15s ease;
}
.v2-historial-folio-btn:hover{background:var(--ui-primary-soft);color:var(--ui-primary);text-decoration:none;}
.v2-historial-folio-btn:focus-visible{outline:2px solid var(--ui-primary);outline-offset:2px;background:var(--ui-primary-soft);}
.v2-historial-folio-icono{
  display:inline-flex;align-items:center;justify-content:center;color:var(--ui-primary);
  opacity:.75;transition:transform .15s ease, opacity .15s ease;
}
.v2-historial-folio-btn:hover .v2-historial-folio-icono{opacity:1;transform:translateX(2px);}

.v2-historial-cliente{font-weight:750;color:var(--ui-ink);font-size:13px;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.35;}
.v2-historial-cliente-sec{margin-top:4px;font-size:11px;color:var(--ui-muted);font-weight:500;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;}
.v2-historial-cotizado{max-width:220px;color:var(--ui-ink);}
.v2-historial-cotizado-principal{font-weight:650;font-size:12.5px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ui-ink);}
.v2-historial-cotizado-secundario{font-size:11px;color:var(--ui-muted);font-weight:500;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;}
.v2-historial-cotizado-vacio{font-size:11.5px;color:var(--ui-muted);font-style:italic;}
.v2-historial-equipo{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ui-ink);font-weight:600;}
.v2-historial-total{white-space:nowrap;color:var(--ui-ink);font-weight:800;font-size:13.5px;}
.v2-historial-fecha{white-space:nowrap;font-size:12px;}
.v2-historial-fecha small{display:block;margin-top:3px;color:var(--ui-muted);font-size:10px;font-weight:600;}
.v2-historial-chip{
  display:inline-flex;align-items:center;gap:5px;min-height:24px;padding:3px 9px;border-radius:999px;
  font-size:10px;font-weight:800;line-height:1.2;white-space:nowrap;border:1px solid transparent;letter-spacing:.02em;
}
.v2-historial-chip::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;}
.v2-estado-cotizada{color:#1A6389;background:#E8F5FB;border-color:#BDE2F2;}
.v2-estado-en_seguimiento{color:#78520D;background:#FFF6E0;border-color:#F7DC9B;}
.v2-estado-pausada{color:#5F4B78;background:#F3EEFA;border-color:#D6C6EB;}
.v2-estado-ganada{color:#157347;background:#E8F8F0;border-color:#A3E5C4;}
.v2-estado-perdida{color:#9C2B2B;background:#FDE8E8;border-color:#F8B4B4;}
.v2-sync-sincronizada{color:#157347;background:#E8F8F0;border-color:#A3E5C4;}

/* Tarjetas Móviles (<768px) con composición de 4 zonas */
.v2-historial-cards{display:grid;gap:12px;padding:14px 16px;}
.v2-historial-card{
  border:1px solid var(--ui-border);border-radius:16px;padding:16px;background:#fff;
  box-shadow:0 2px 8px rgba(23,36,44,.04);display:flex;flex-direction:column;gap:11px;
}
.v2-historial-card-header{
  display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid var(--ui-border);padding-bottom:10px;
}
.v2-historial-card-folio{
  font-size:15px;font-weight:800;color:var(--ui-primary-hover);letter-spacing:.01em;
}
.v2-historial-card-fecha{
  font-size:11.5px;color:var(--ui-muted);font-weight:600;
}
.v2-historial-card-body{
  display:flex;flex-direction:column;gap:3px;
}
.v2-historial-card-cliente{
  font-size:14px;font-weight:750;color:var(--ui-ink);line-height:1.35;overflow-wrap:anywhere;word-break:break-word;
}
.v2-historial-card-empresa{
  font-size:12px;font-weight:500;color:var(--ui-muted);line-height:1.3;margin-top:2px;overflow-wrap:anywhere;word-break:break-word;
}
.v2-historial-card-cotizado{display:flex;flex-direction:column;gap:2px;margin-top:6px;padding:8px 10px;background:var(--ui-background);border-radius:10px;}
.v2-historial-card-cotizado-principal{font-size:12px;font-weight:650;color:var(--ui-ink);line-height:1.4;overflow-wrap:anywhere;word-break:break-word;}
.v2-historial-card-cotizado-secundario{font-size:11px;color:var(--ui-muted);font-weight:500;line-height:1.35;overflow-wrap:anywhere;word-break:break-word;}
.v2-historial-card-cotizado-vacio{font-size:11.5px;color:var(--ui-muted);font-style:italic;}
.v2-historial-card-equipo{
  font-size:12px;color:var(--ui-text);line-height:1.4;margin-top:2px;
}
.v2-historial-card-resumen-row{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:#F4F8FA;border:1px solid #E1EDF2;border-radius:12px;padding:10px 14px;margin-top:4px;
}
.v2-historial-card-chips{
  display:flex;gap:6px;flex-wrap:wrap;align-items:center;
}
.v2-historial-card-bloque-total{
  display:flex;flex-direction:column;align-items:flex-end;text-align:right;flex-shrink:0;
}
.v2-historial-card-total-label{
  font-size:9px;font-weight:800;color:var(--ui-muted);text-transform:uppercase;letter-spacing:.06em;margin-bottom:1px;
}
.v2-historial-card-total-monto{
  font-size:15px;font-weight:800;color:var(--ui-ink);white-space:nowrap;
}
.v2-historial-card-btn{
  width:100%;min-height:38px;font-size:13px;font-weight:700;border-radius:10px;margin-top:2px;
}
@media (max-width:379.98px){
  .v2-historial-card-resumen-row{
    flex-direction:column;align-items:flex-start;gap:8px;
  }
  .v2-historial-card-bloque-total{
    align-items:flex-start;text-align:left;
  }
}

.v2-historial-vacio{text-align:center;padding:50px 20px;}
.v2-historial-vacio[hidden]{display:none !important;}
.v2-historial-vacio-icono{width:50px;height:50px;border-radius:16px;margin:0 auto 12px;background:var(--ui-background);color:var(--ui-muted);display:flex;align-items:center;justify-content:center;}
.v2-historial-vacio h3{margin:0 0 6px;font-size:15px;font-weight:800;color:var(--ui-ink);}
.v2-historial-vacio p{margin:0;font-size:12px;color:var(--ui-muted);line-height:1.5;}
.v2-historial-pie{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-top:1px solid var(--ui-border);font-size:11.5px;color:var(--ui-muted);}

.v2-historial-detalle-overlay{position:fixed;inset:0;z-index:620;background:rgba(23,36,44,.52);display:flex;justify-content:flex-end;}
.v2-historial-detalle-overlay[hidden]{display:none !important;}
.v2-historial-detalle{
  width:100%;height:100%;background:#F8FBFC;display:flex;flex-direction:column;box-shadow:-14px 0 44px rgba(23,36,44,.2);
  animation:v2HistorialDetalleEntrada .18s ease-out;
}
@keyframes v2HistorialDetalleEntrada{from{transform:translateX(18px);opacity:.65;}to{transform:translateX(0);opacity:1;}}
.v2-historial-detalle-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 24px 18px;border-bottom:1px solid var(--ui-border);background:#FFFFFF;}
.v2-historial-detalle-kicker{font-size:10px;font-weight:800;color:var(--ui-muted);text-transform:uppercase;letter-spacing:.08em;display:block;line-height:1.2;}
.v2-historial-detalle-titulo{margin:4px 0 0;font-size:22px;font-weight:800;color:var(--ui-ink);overflow-wrap:anywhere;word-break:break-word;letter-spacing:-.02em;line-height:1.2;}
.v2-historial-detalle-cerrar{
  flex:0 0 auto;width:36px;height:36px;border:1.5px solid var(--ui-border);border-radius:10px;background:#FFFFFF;
  color:var(--ui-ink) !important;font-size:20px;font-weight:700;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;padding:0;transition:all .15s ease;
}
.v2-historial-detalle-cerrar:hover{background:var(--ui-background);color:var(--ui-ink) !important;border-color:var(--ui-border-strong);}
.v2-historial-detalle-cerrar:focus-visible{outline:2px solid var(--ui-primary);outline-offset:2px;background:#FFFFFF;color:var(--ui-ink) !important;border-color:var(--ui-primary);}
.v2-historial-detalle-cerrar:active{background:#E2EBF0;color:var(--ui-ink) !important;}
.v2-historial-detalle-body{flex:1 1 auto;overflow-y:auto;padding:20px 24px 32px;background:#F8FBFC;}
.v2-historial-detalle-cargando{display:flex;align-items:center;justify-content:center;min-height:220px;color:var(--ui-muted);font-size:13px;font-weight:650;}
.v2-historial-detalle-error{margin:20px 0;padding:14px;border-radius:13px;background:var(--ui-danger-soft);border:1px solid #F0B6B6;color:#8F2929;font-size:12.5px;line-height:1.45;}
.v2-historial-detalle-resumen{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px;}
.v2-historial-detalle-dato{padding:12px 14px;border-radius:12px;background:#FFFFFF;border:1px solid var(--ui-border);box-shadow:0 1px 4px rgba(23,36,44,.03);min-width:0;display:flex;flex-direction:column;justify-content:center;}
.v2-historial-detalle-dato-label{display:block;font-size:9.5px;font-weight:800;color:var(--ui-muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px;}
.v2-historial-detalle-dato-valor{display:block;font-size:13px;font-weight:700;color:var(--ui-ink);overflow-wrap:anywhere;word-break:break-word;line-height:1.35;}

/* Modificadores de Resumen para Destacar Jerarquía Comercial */
.v2-historial-detalle-dato.v2-dato-destacado-total{background:var(--ui-primary-soft);border-color:rgba(0,139,210,.25);}
.v2-historial-detalle-dato.v2-dato-destacado-total .v2-historial-detalle-dato-label{color:var(--ui-primary-hover);}
.v2-historial-detalle-dato.v2-dato-destacado-total .v2-historial-detalle-dato-valor{font-size:15.5px;font-weight:800;color:var(--ui-primary-hover);}
.v2-historial-detalle-dato.v2-dato-secundario{background:#FAFDFE;border-color:#E6EFF2;}
.v2-historial-detalle-dato.v2-dato-secundario .v2-historial-detalle-dato-valor{font-size:12px;font-weight:600;color:var(--ui-text);}

.v2-historial-detalle-seccion{border:1px solid var(--ui-border);border-radius:16px;background:#FFFFFF;box-shadow:0 1px 4px rgba(23,36,44,.03);padding:20px 22px;margin-bottom:16px;}
.v2-historial-detalle-seccion:last-child{margin-bottom:0;}
.v2-historial-detalle-seccion h4{margin:0 0 16px;font-size:11.5px;font-weight:800;color:var(--ui-primary-hover);text-transform:uppercase;letter-spacing:.06em;}
.v2-historial-detalle-seccion > .v2-historial-detalle-dato + .v2-historial-detalle-dato{margin-top:10px;}

/* Tarjetas internas del cliente con bordes suaves y mayor respiración */
.v2-historial-detalle-seccion-cliente .v2-historial-detalle-dato{
  background:#FAFCFD;border:1px solid #E6EFF3;box-shadow:none;padding:12px 16px;
}
.v2-historial-detalle-seccion-cliente .v2-cliente-dato-principal{
  background:#FFFFFF;border:1.5px solid #DCE7EC;
}
.v2-historial-detalle-seccion-cliente .v2-cliente-dato-principal .v2-historial-detalle-dato-valor{
  font-size:13.5px;font-weight:750;color:var(--ui-ink);
}

.v2-historial-detalle-linea{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:12px 0;border-bottom:1px solid #EEF3F5;}
.v2-historial-detalle-linea:last-child{border-bottom:0;padding-bottom:0;}
.v2-historial-detalle-linea:first-of-type{padding-top:0;}
.v2-historial-detalle-linea-nombre{font-size:13px;font-weight:700;color:var(--ui-ink);line-height:1.4;overflow-wrap:anywhere;word-break:break-word;}
.v2-historial-detalle-linea-meta{font-size:11.5px;color:var(--ui-muted);margin-top:4px;line-height:1.4;overflow-wrap:anywhere;word-break:break-word;}
.v2-historial-detalle-linea-total{font-size:13.5px;font-weight:800;color:var(--ui-ink);white-space:nowrap;text-align:right;}
.v2-historial-detalle-car-lista{margin:6px 0 0 16px;padding:0;font-size:11px;color:var(--ui-muted);line-height:1.45;}
.v2-historial-detalle-nota{font-size:12px;color:var(--ui-muted);line-height:1.5;margin:0;}

/* Contacto y Datos en Detalle */
.v2-historial-detalle-contacto-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px;}
.v2-historial-detalle-dato-correo{grid-column:1 / -1;}
@media (min-width:540px){
  .v2-historial-detalle-contacto-grid{grid-template-columns:minmax(110px, 1fr) minmax(110px, 1fr) minmax(160px, 1.4fr);}
  .v2-historial-detalle-dato-correo{grid-column:auto;}
  .v2-historial-detalle-resumen{grid-template-columns:repeat(3,minmax(0,1fr));}
}

/* =========================================================
   H2R3B-01 — ESTILOS SECCIÓN ESTADO COMERCIAL EN DETALLE
   ========================================================= */
.v2-historial-detalle-seccion-estado{
  border:1px solid var(--ui-border);border-radius:16px;background:#FFFFFF;
  box-shadow:0 1px 4px rgba(23,36,44,.03);padding:20px 22px;margin-bottom:16px;
}
.v2-historial-estado-header{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap;
}
.v2-historial-estado-actual-caja{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
}
.v2-historial-estado-actual-label{
  font-size:12px;font-weight:700;color:var(--ui-ink);
}
.v2-historial-estado-control-grid{
  display:grid;grid-template-columns:1fr;gap:12px;margin-top:12px;
}
@media (min-width:540px){
  .v2-historial-estado-control-grid{grid-template-columns:minmax(200px, 1fr) auto;}
}
.v2-historial-select-estado{
  width:100%;min-height:44px;padding:10px 14px;font-size:13.5px;font-weight:600;
  color:var(--ui-ink);background:#FAFCFD;border:1.5px solid #DCE7EC;border-radius:12px;
  outline:none;transition:border-color .15s ease, box-shadow .15s ease;cursor:pointer;
  box-sizing:border-box;font-family:inherit;
}
.v2-historial-select-estado:focus{
  border-color:var(--ui-primary);box-shadow:0 0 0 3px rgba(26,99,137,.12);
}
.v2-historial-select-estado:disabled{
  background:#F1F4F6;color:var(--ui-muted);cursor:not-allowed;border-color:#E2E8EC;
}
/* H2R3B-01.1 — Layout equilibrado de acciones de estado */
.v2-historial-estado-acciones,
.v2-confirmar-botones{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:stretch;
  width:100%;
}
.v2-historial-estado-acciones .v2-btn,
.v2-confirmar-botones .v2-btn{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  white-space:nowrap;
  box-sizing:border-box;
  padding:10px 16px;
  font-size:13px;
  line-height:1.2;
}
.v2-historial-estado-acciones .v2-btn-secondary,
.v2-confirmar-botones .v2-btn-secondary{
  flex-shrink:0;
  padding-left:14px;
  padding-right:14px;
}
@media (min-width:540px){
  .v2-historial-estado-acciones{
    display:flex;
    width:auto;
  }
  .v2-confirmar-botones{
    display:flex;
    width:auto;
  }
}
@media (max-width:340px){
  .v2-historial-estado-acciones,
  .v2-confirmar-botones{
    grid-template-columns:1fr;
    gap:8px;
  }
  .v2-historial-estado-acciones .v2-btn,
  .v2-confirmar-botones .v2-btn{
    width:100%;
  }
}
.v2-historial-motivo-box{
  margin-top:12px;display:flex;flex-direction:column;gap:6px;
}
.v2-historial-motivo-box label{
  font-size:12px;font-weight:700;color:var(--ui-ink);
}
.v2-historial-motivo-textarea{
  width:100%;min-height:76px;padding:10px 12px;font-size:13px;color:var(--ui-ink);
  background:#FFFFFF;border:1.5px solid #DCE7EC;border-radius:10px;resize:vertical;
  outline:none;box-sizing:border-box;font-family:inherit;line-height:1.45;
}
.v2-historial-motivo-textarea:focus{
  border-color:var(--ui-primary);box-shadow:0 0 0 3px rgba(26,99,137,.12);
}
.v2-historial-motivo-textarea:disabled{
  background:#F1F4F6;cursor:not-allowed;
}
.v2-historial-motivo-contador{
  font-size:11px;color:var(--ui-muted);text-align:right;
}
.v2-historial-confirmar-caja{
  margin-top:14px;padding:14px 16px;background:#FFF9ED;border:1.5px solid #F5D99B;
  border-radius:12px;display:flex;flex-direction:column;gap:10px;
}
.v2-confirmar-texto{
  margin:0;font-size:12.5px;line-height:1.45;color:#6E4B07;font-weight:600;
}
/* .v2-confirmar-botones unificado arriba en H2R3B-01.1 */
.v2-historial-feedback{
  margin-top:12px;padding:10px 14px;border-radius:10px;font-size:12.5px;line-height:1.45;font-weight:600;
}
.v2-historial-feedback-exito{
  background:#E8F8F0;color:#157347;border:1px solid #A3E5C4;
}
.v2-historial-feedback-alerta{
  background:#FFF6E0;color:#78520D;border:1px solid #F7DC9B;
}
.v2-historial-feedback-error{
  background:#FDE8E8;color:#9C2B2B;border:1px solid #F8B4B4;
}
.v2-historial-feedback-info{
  background:#E8F5FB;color:#1A6389;border:1px solid #BDE2F2;
}

/* =========================================================
   H2R5B-03 — ESTILOS SECCIÓN SEGUIMIENTO COMERCIAL EN DETALLE
   ========================================================= */
.v2-historial-detalle-seccion-crm{
  border:1px solid var(--ui-border);border-radius:16px;background:#FFFFFF;
  box-shadow:0 1px 4px rgba(23,36,44,.03);padding:20px 22px;margin-bottom:16px;
}
.v2-crm-header{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px;flex-wrap:wrap;
}
.v2-crm-btn-agregar{
  min-height:44px;padding:8px 16px;font-size:13px;font-weight:700;
  border-radius:10px;background:#FFFFFF;border:1.5px solid #DCE7EC;
  color:var(--ui-ink, #17242C);cursor:pointer;display:inline-flex;align-items:center;
  gap:6px;transition:all .15s ease;font-family:inherit;box-sizing:border-box;
}
.v2-crm-btn-agregar:hover{
  background:#EFF6FB;border-color:#BDE2F2;color:var(--ui-primary, #1A6389) !important;
}
.v2-crm-btn-agregar:active{
  background:#E0EFF7;border-color:#A5D4EA;color:var(--ui-primary, #1A6389) !important;
}
.v2-crm-btn-agregar:focus-visible{
  outline:2px solid var(--ui-primary, #1A6389);outline-offset:2px;
}
.v2-crm-form-nota{
  background:#F8FAFC;border:1.5px solid #E2E8F0;border-radius:12px;
  padding:14px 16px;margin-bottom:16px;
}
.v2-crm-textarea{
  width:100%;min-height:85px;padding:10px 12px;font-family:inherit;
  font-size:13.5px;color:var(--ui-ink);background:#FFFFFF;
  border:1.5px solid #DCE7EC;border-radius:10px;box-sizing:border-box;
  resize:vertical;outline:none;transition:border-color .15s ease;line-height:1.45;
}
.v2-crm-textarea:focus{
  border-color:var(--ui-primary);box-shadow:0 0 0 3px rgba(26,99,137,.12);
}
.v2-crm-textarea:disabled{
  background:#F1F4F6;color:var(--ui-muted);cursor:not-allowed;
}
.v2-crm-form-meta{
  display:flex;align-items:center;justify-content:space-between;margin-top:10px;
  gap:12px;flex-wrap:wrap;
}
.v2-crm-contador{
  font-size:11.5px;color:var(--ui-muted);font-weight:600;
}
.v2-crm-form-acciones{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.v2-crm-form-acciones .v2-btn{
  min-height:44px;padding:8px 16px;font-size:13px;display:inline-flex;
  align-items:center;justify-content:center;box-sizing:border-box;
}
.v2-crm-conteo-discreto{
  font-size:11.5px;font-weight:600;color:var(--ui-muted, #6F818C);
  margin:0 0 12px 2px;letter-spacing:.02em;line-height:1.2;
}
.v2-crm-timeline-scroll{
  max-height:320px;overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;scrollbar-width:thin;
  scrollbar-color:#CBD5E1 transparent;padding-right:4px;
}
.v2-crm-timeline-scroll::-webkit-scrollbar{
  width:6px;
}
.v2-crm-timeline-scroll::-webkit-scrollbar-track{
  background:transparent;
}
.v2-crm-timeline-scroll::-webkit-scrollbar-thumb{
  background:#CBD5E1;border-radius:4px;
}
.v2-crm-timeline-scroll::-webkit-scrollbar-thumb:hover{
  background:#94A3B8;
}
.v2-crm-timeline{
  position:relative;padding-left:26px;margin:10px 0 0;list-style:none;
}
.v2-crm-timeline::before{
  content:'';position:absolute;top:6px;bottom:6px;left:8px;
  width:2px;background:#E2E8F0;
}
.v2-crm-item{
  position:relative;padding-bottom:16px;
}
.v2-crm-item:last-child{
  padding-bottom:0;
}
.v2-crm-item-marker{
  position:absolute;left:-26px;top:2px;width:18px;height:18px;
  border-radius:50%;background:#FFFFFF;border:2px solid #94A3B8;
  display:flex;align-items:center;justify-content:center;box-sizing:border-box;
}
.v2-crm-item-marker-manual{
  border-color:#0284C7;background:#E0F2FE;color:#0284C7;
}
.v2-crm-item-marker-cambio_estado{
  border-color:#10B981;background:#D1FAE5;color:#059669;
}
.v2-crm-item-marker-sistema{
  border-color:#64748B;background:#F1F5F9;color:#475569;
}
.v2-crm-item-header{
  display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:4px;
}
.v2-crm-item-autor{
  font-size:12.5px;font-weight:700;color:var(--ui-ink);
}
.v2-crm-item-fecha{
  font-size:11.5px;color:var(--ui-muted);
}
.v2-crm-item-texto{
  font-size:13px;line-height:1.45;color:var(--ui-ink);margin:0;
  white-space:pre-wrap;word-break:break-word;overflow-wrap:break-word;
}
.v2-crm-item-motivo{
  font-size:12px;line-height:1.4;color:#64748B;margin:4px 0 0;
  font-style:italic;word-break:break-word;overflow-wrap:break-word;
}
.v2-crm-estado-caja{
  padding:16px 14px;text-align:center;border-radius:12px;
  background:#F8FAFC;color:var(--ui-muted);font-size:13px;
}
.v2-crm-cargando{
  display:flex;align-items:center;justify-content:center;gap:10px;
}
.v2-crm-error{
  background:#FEF2F2;color:#B91C1C;border:1px solid #FECACA;
}
.v2-crm-vacio{
  border:1px dashed #E2E8F0;
}
.v2-crm-btn-reintentar{
  margin-top:10px;min-height:44px;
}
.v2-crm-spinner{
  width:16px;height:16px;border:2px solid #CBD5E1;border-top-color:var(--ui-primary);
  border-radius:50%;animation:v2-crm-spin .8s linear infinite;display:inline-block;
}
@keyframes v2-crm-spin { to { transform:rotate(360deg); } }

.v2-crm-feedback{
  margin-top:10px;padding:10px 12px;border-radius:10px;font-size:12.5px;line-height:1.4;
}
.v2-crm-feedback-alerta{ background:#FFFBEB;color:#B45309;border:1px solid #FDE68A; }
.v2-crm-feedback-error{ background:#FEF2F2;color:#B91C1C;border:1px solid #FECACA; }
.v2-crm-feedback-exito{ background:#ECFDF5;color:#047857;border:1px solid #A7F3D0; }
.v2-crm-feedback-info{ background:#EFF6FF;color:#1D4ED8;border:1px solid #BFDBFE; }

@media (max-width:639.98px){
  .v2-historial-detalle-seccion-crm{
    padding:16px 14px;margin-bottom:14px;width:100%;box-sizing:border-box;
  }
  .v2-crm-header{
    flex-direction:row;justify-content:space-between;align-items:center;
  }
  .v2-crm-form-meta{
    flex-direction:column;align-items:flex-start;
  }
  .v2-crm-form-acciones{
    width:100%;flex-direction:column;
  }
  .v2-crm-form-acciones .v2-btn{
    width:100%;
  }
  .v2-crm-timeline-scroll{
    max-height:290px;padding-right:2px;
  }
}

.v2-historial-detalle-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 24px calc(15px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--ui-border);background:#FFFFFF;}
.v2-historial-detalle-acciones-pie{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
}
#v2HistorialDetalleUsarComoBase{
  white-space:nowrap;
  min-height:44px;
  height:44px;
  padding:0 14px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex-shrink:0;
}
#v2HistorialDetalleCerrarPie{
  min-height:44px;
  height:44px;
  padding:0 14px;
  white-space:nowrap;
  flex-shrink:0;
}
@media (max-width:480px){
  .v2-historial-detalle-footer{
    flex-wrap:wrap;
    gap:10px;
    padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));
  }
  .v2-historial-detalle-acciones-pie{
    width:100%;
    justify-content:flex-end;
  }
  .v2-historial-solo-lectura{
    width:100%;
  }
}
.v2-historial-solo-lectura{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--ui-muted);font-weight:700;}
.v2-historial-solo-lectura svg{width:14px;height:14px;}
body.v2-historial-sin-scroll{overflow:hidden;}

/* Breakpoints estrictos: 768px */
@media (min-width:768px){
  .v2-historial-cabecera{flex-direction:row;align-items:flex-end;justify-content:space-between;}
  .v2-historial-tabla-wrap{display:block;}
  .v2-historial-cards{display:none;}
  .v2-historial-detalle{max-width:580px;}

  /* Filtros en línea para >=768px */
  .v2-historial-filtros-drawer,
  .v2-historial-filtros-drawer[hidden]{
    display:contents !important;position:static !important;inset:auto !important;z-index:auto !important;
    background:none !important;opacity:1 !important;pointer-events:auto !important;
  }
  .v2-historial-filtros-dialog{
    display:contents !important;background:none !important;width:auto !important;max-width:none !important;
    padding:0 !important;box-shadow:none !important;transform:none !important;overflow:visible !important;
  }
  .v2-historial-filtros-header{display:none !important;}
  .v2-historial-filtros-body{
    display:flex !important;flex-wrap:wrap !important;gap:12px 14px !important;
    justify-content:flex-start !important;align-items:flex-end !important;margin-top:14px !important;
    padding-top:14px !important;border-top:1px dashed var(--ui-border) !important;
  }
  .v2-historial-filtro{flex:0 0 175px;min-width:155px;}
  .v2-historial-filtro-rango-wrap{flex:0 0 auto;width:auto;}
  .v2-historial-filtro-rango-campos{display:flex;gap:10px;align-items:flex-end;width:auto;}
  .v2-historial-filtro-rango-campos .v2-historial-filtro{flex:0 0 145px;min-width:130px;}
  .v2-historial-limpiar-filtros{width:auto !important;align-self:flex-end !important;margin-bottom:0 !important;}
  .v2-historial-filtros-acciones-movil{display:none !important;}
  .v2-historial-filtros-toggle{display:none !important;}
}

@media (max-width:767.98px){
  .v2-historial-tabla-wrap{display:none;}
  .v2-historial-cards{display:grid;}
  .v2-historial-cabecera-principal{display:block;}
  .v2-historial-cabecera-acciones{margin-top:10px;width:100%;}
  .v2-historial-cabecera-acciones .v2-btn{flex:1 1 auto;}
  .v2-historial-limpiar-filtros{width:100% !important;height:42px;min-height:42px;margin-top:2px;justify-content:center;}
}

@media (max-width:519.98px){
  .v2-app.v2-modo-historial .v2-app-container{padding-left:10px;padding-right:10px;}
  .v2-header-acciones{gap:6px;}
  .v2-header-acciones .v2-btn-sm{padding:0 10px;}
  .v2-header-acciones .v2-btn-sm svg{display:none;}
  .v2-historial-panel{border-radius:16px;}
  .v2-historial-titulo{font-size:18px;}
  .v2-historial-icono{width:38px;height:38px;}
  .v2-historial-pie{align-items:flex-start;flex-direction:column;}
}

/* =========================================================
   ESTILOS DOCUMENTALES CARTA (NAMESPACE .aj-doc-*)
   Cargados exclusivamente mediante el plugin WordPress:
   ArtisJet Document Engine (artisjet-doc-engine.css)
   ========================================================= */

/* =========================================================
   UX-PREVIEW-ACTIONS-01 / UX-PREVIEW-ACTIONS-01A:
   BARRA PRINCIPAL VISOR (ACCIONES + NUEVA COTIZACION)
   - Eliminacion visual de Guardar PDF de la barra principal
   - Header Desktop con respiracion vertical (+14px de padding vertical: 17px)
   - Logo Horizontal ArtisJet en todas las resoluciones (desktop, tablet, movil)
   - Correccion de doble signo '+' en boton 'Nueva cotizacion'
   - Fila 1 movil equilibrada: Logo horizontal a la izq y 'Emitida | FOLIO' a la der
   - Fila 2 movil con distribucion equilibrada y sin overflow
   ========================================================= */
#ajDocPreviewRoot {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  background: var(--ui-background, #F3F7F9);
  color: var(--ui-ink, #17242C);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
#ajDocPreviewRoot[hidden] {
  display: none !important;
}

.aj-doc-toolbar {
  flex: 0 0 auto;
  background: var(--ui-surface, #FFFFFF);
  color: var(--ui-ink, #17242C);
  padding: 17px 20px !important; /* +14px total adicional de respiracion vertical en desktop (17px vs 10px original) */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ui-border, #DCE5E9);
  box-shadow: 0 2px 8px rgba(23, 36, 44, 0.05);
  box-sizing: border-box;
  z-index: 10;
  width: 100%;
}
.aj-doc-toolbar.aj-doc-emitida {
  padding: 17px 20px !important;
  justify-content: space-between !important;
}
.aj-doc-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.aj-doc-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.aj-doc-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.aj-doc-actions-group .aj-doc-btn {
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.aj-doc-toolbar #ajDocBtnGuardarPdf,
.aj-doc-toolbar .aj-doc-btn-guardar-pdf {
  display: none !important;
}

/* Base Branding ArtisJet y Chip Estado Documental */
.aj-doc-brand-home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.aj-doc-brand-home-btn {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 1;
}
.aj-doc-brand-picture {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.aj-doc-brand-logo-img {
  display: block;
  height: 28px;
  max-height: 30px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  vertical-align: middle;
}
.aj-doc-estado-emitido {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ui-success-soft, #EAF8F2);
  color: var(--ui-success, #17875D);
  border: 1px solid rgba(23, 135, 93, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  user-select: none;
  cursor: default;
  white-space: nowrap;
}
.aj-doc-estado-emitido .aj-doc-estado-label {
  color: var(--ui-success, #17875D);
  font-weight: 700;
}
.aj-doc-estado-emitido .aj-doc-estado-sep {
  color: var(--ui-muted, #71818A);
  opacity: 0.7;
}
.aj-doc-estado-emitido .aj-doc-estado-folio {
  color: var(--ui-ink, #17242C);
  font-weight: 600;
  letter-spacing: .03em;
}

/* Ocultar texto compacto en desktop por defecto */
.aj-doc-txt-compact {
  display: none !important;
}

/* Tablet 640px - 959.98px */
@media (max-width: 959.98px) {
  .aj-doc-toolbar,
  .aj-doc-toolbar.aj-doc-emitida {
    padding: 12px 16px !important;
    gap: 12px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-brand-logo-img,
  .aj-doc-brand-logo-img {
    height: 26px !important;
    max-height: 28px !important;
    max-width: 150px !important;
    object-fit: contain !important;
  }
}

/* Movil <= 639.98px: 2 filas ordenadas, distribucion equilibrada sin overflow */
@media (max-width: 639.98px) {
  .aj-doc-toolbar,
  .aj-doc-toolbar.aj-doc-emitida {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 10px 12px !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .aj-doc-toolbar-left,
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-toolbar-left {
    display: flex !important;
    width: 100% !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocBrandHome {
    display: flex !important;
    width: 100% !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }
  .aj-doc-brand-home-btn {
    display: inline-flex !important;
    align-items: center !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-brand-picture {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-brand-logo-img,
  .aj-doc-brand-logo-img {
    display: block !important;
    height: 26px !important;
    max-height: 26px !important;
    width: auto !important;
    max-width: 135px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocEstadoEmitido,
  .aj-doc-estado-emitido {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocEstadoEmitido svg {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
  }
  .aj-doc-toolbar-right,
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-toolbar-right {
    display: flex !important;
    width: 100% !important;
    justify-content: stretch !important;
    align-items: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .aj-doc-toolbar .aj-doc-zoom-wrap,
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-zoom-wrap {
    display: none !important;
  }
  .aj-doc-actions-group,
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-actions-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  .aj-doc-actions-group .aj-doc-btn,
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-actions-group .aj-doc-btn {
    height: 38px !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }
  .aj-doc-actions-group #ajDocBtnAcciones,
  .aj-doc-toolbar.aj-doc-emitida #ajDocBtnAcciones {
    flex: 1 1 0% !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    background: var(--ui-primary-soft, #EAF7FD) !important;
    color: var(--ui-primary, #008BD2) !important;
    border: 1.5px solid var(--ui-primary, #008BD2) !important;
    min-width: 0 !important;
  }
  .aj-doc-actions-group #ajDocBtnNuevaCotizacion,
  .aj-doc-toolbar.aj-doc-emitida #ajDocBtnNuevaCotizacion {
    flex: 1.2 1 0% !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    background: var(--ui-primary, #008BD2) !important;
    color: #ffffff !important;
    border: 1.5px solid var(--ui-primary, #008BD2) !important;
    box-shadow: 0 2px 6px rgba(0, 139, 210, 0.25) !important;
    min-width: 0 !important;
  }
}

/* Pantallas <= 420px: texto compacto "Nueva" (icono SVG '+' ya proporciona el signo) */
@media (max-width: 420px) {
  .aj-doc-toolbar .aj-doc-txt-full,
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-txt-full {
    display: none !important;
  }
  .aj-doc-toolbar .aj-doc-txt-compact,
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-txt-compact {
    display: inline !important;
  }
}

/* Pantallas extra estrechas <= 380px */
@media (max-width: 380px) {
  .aj-doc-toolbar,
  .aj-doc-toolbar.aj-doc-emitida {
    padding: 8px 8px !important;
    gap: 8px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocBrandHome {
    gap: 6px !important;
  }
  .aj-doc-actions-group,
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-actions-group {
    gap: 6px !important;
  }
  .aj-doc-actions-group .aj-doc-btn,
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-actions-group .aj-doc-btn {
    padding: 0 6px !important;
    font-size: 11.5px !important;
    gap: 4px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida .aj-doc-brand-logo-img,
  .aj-doc-brand-logo-img {
    height: 24px !important;
    max-height: 24px !important;
    max-width: 120px !important;
  }
  .aj-doc-toolbar.aj-doc-emitida #ajDocEstadoEmitido,
  .aj-doc-estado-emitido {
    font-size: 10px !important;
    padding: 2px 6px !important;
    gap: 3px !important;
  }
}

/* =========================================================
   SERVICIOS-REFACCIONES-VISIBILIDAD-01A: REFACCIONES SUGERIDAS
   ========================================================= */
.v2-ref-sugerida-row {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: 8px;
}
.v2-ref-sugerida-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0369A1;
  cursor: pointer;
  user-select: none;
}
.v2-ref-sugerida-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #0284C7;
  cursor: pointer;
  margin: 0;
}
.v2-ref-equipo-wrap {
  margin-top: 8px;
  margin-bottom: 8px;
}
.v2-ref-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.v2-ref-pill-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ui-muted, #64748B);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.v2-ref-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.15s ease;
}
.v2-ref-pill-btn:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
  color: #0F172A;
}
.v2-badge-refaccion-sugerida {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 8px;
  font-size: 11px;
  font-weight: 750;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}
.v2-ref-card-sugerida {
  border-left: 3px solid #94A3B8 !important;
  background: #F8FAFC !important;
}
.v2-ref-metric-sugerida {
  color: #475569 !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   SERVICIOS-REFACCIONES-VISIBILIDAD-01A1: Diferenciación visual de refacciones
   ========================================================================== */

/* Badge visible para refacciones sugeridas en revisión y modal */
.v2-badge-revision-no-incluida {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 750;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 1.2;
}

/* Badge visible para refacciones cotizadas cuando coexisten con sugeridas */
.v2-badge-refaccion-cotizada {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  border-radius: 4px;
  letter-spacing: 0.03em;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.2;
}

/* Sección de sugeridas en revisión de cotización (Paso 3) */
.v2-revision-ref-sugeridas-seccion {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #CBD5E1;
}

.v2-revision-ref-sugeridas-titulo {
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.v2-revision-ref-sugeridas-guia {
  font-size: 11.5px;
  color: #64748B;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Tarjeta dedicada de refacción sugerida en revisión (Paso 3) */
.v2-revision-ref-sugerida-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 3px solid #94A3B8;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  transition: border-color 0.15s ease;
}

.v2-revision-ref-sugerida-card:last-child {
  margin-bottom: 6px;
}

.v2-revision-ref-sugerida-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.v2-revision-ref-sugerida-info {
  flex: 1 1 auto;
  min-width: 0;
}

.v2-revision-ref-sugerida-nombre-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.v2-revision-ref-sugerida-nombre {
  font-size: 13.5px;
  color: #1E293B;
  font-weight: 700;
  line-height: 1.35;
}

.v2-revision-ref-sugerida-cant {
  font-size: 12px;
  color: #64748B;
  font-weight: 600;
}

.v2-revision-ref-sugerida-precios {
  flex: 0 0 auto;
  text-align: right;
  min-width: 150px;
}

.v2-revision-precio-sugerido-val {
  display: block;
  font-size: 13.5px;
  color: #1E293B;
  font-weight: 750;
  line-height: 1.25;
}

.v2-revision-precio-sugerido-unit {
  display: block;
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
  margin-top: 1px;
}

.v2-revision-ref-sugerida-explicacion {
  display: block;
  font-size: 10.5px;
  color: #64748B;
  font-weight: 600;
  margin-top: 3px;
  line-height: 1.3;
}

.v2-revision-ref-equipo-rel {
  font-size: 11.5px;
  color: #0284C7;
  font-weight: 600;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.v2-revision-sugeridas-subtotal-box {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
}

/* Adaptación responsive para móvil y pantallas estrechas */
@media (max-width: 600px) {
  .v2-revision-ref-sugerida-top {
    flex-direction: column;
    gap: 8px;
  }
  .v2-revision-ref-sugerida-precios {
    text-align: left;
    min-width: unset;
    width: 100%;
    padding-top: 6px;
    border-top: 1px dashed #E2E8F0;
  }
  .v2-revision-ref-sugerida-explicacion {
    font-size: 10px;
  }
}

/* =========================================================
   INDICADOR GLOBAL DE CAPACIDAD DE EMISIÓN
   Fase: EMISION-PAYLOAD-OPTIMIZACION-GLOBAL-01 (v0.1.8.8)
   ========================================================= */
.v2-app-scope .v2-capacidad-indicador-card {
  margin: 14px 0;
  padding: 14px 18px;
  border-radius: 12px;
  font-family: inherit;
  transition: opacity .2s ease;
}
.v2-app-scope .v2-capacidad-indicador-card[hidden] {
  display: none !important;
}

/* Estado Advertencia (90% - 100% T1: 43,650 a 48,500 bytes) */
.v2-app-scope .v2-capacidad-indicador-card.estado-advertencia {
  background: var(--ui-amber-soft, #FFF7E6);
  border: 1px solid var(--ui-amber-border, #F3D48C);
  color: var(--ui-ink, #17242C);
}
.v2-app-scope .v2-capacidad-indicador-card.estado-advertencia .v2-capacidad-titulo {
  color: var(--ui-amber, #8A6116);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 2px;
}
.v2-app-scope .v2-capacidad-indicador-card.estado-advertencia .v2-capacidad-mensaje {
  color: var(--ui-text, #34454F);
  font-size: 12px;
  line-height: 1.4;
}
.v2-app-scope .v2-capacidad-indicador-card.estado-advertencia .v2-capacidad-badge {
  background: #FCE8BD;
  color: var(--ui-amber, #8A6116);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
}
.v2-app-scope .v2-capacidad-indicador-card.estado-advertencia .v2-capacidad-progreso-fill {
  background: var(--ui-amber, #8A6116);
}

/* Estado Excedido (> 100% T1 / > 48,500 B) */
.v2-app-scope .v2-capacidad-indicador-card.estado-excedido {
  background: var(--ui-danger-soft, #FFF0F0);
  border: 1px solid #F5C2C2;
  color: var(--ui-ink, #17242C);
}
.v2-app-scope .v2-capacidad-indicador-card.estado-excedido .v2-capacidad-titulo {
  color: var(--ui-danger, #D83B3B);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 2px;
}
.v2-app-scope .v2-capacidad-indicador-card.estado-excedido .v2-capacidad-mensaje {
  color: var(--ui-text, #34454F);
  font-size: 12px;
  line-height: 1.4;
}
.v2-app-scope .v2-capacidad-indicador-card.estado-excedido .v2-capacidad-badge {
  background: #FFD6D6;
  color: var(--ui-danger, #D83B3B);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
}
.v2-app-scope .v2-capacidad-indicador-card.estado-excedido .v2-capacidad-progreso-fill {
  background: var(--ui-danger, #D83B3B);
}

.v2-app-scope .v2-capacidad-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}
.v2-app-scope .v2-capacidad-icono-wrap {
  flex-shrink: 0;
  margin-top: 1px;
}
.v2-app-scope .v2-capacidad-textos {
  flex-grow: 1;
}
.v2-app-scope .v2-capacidad-badge {
  flex-shrink: 0;
  white-space: nowrap;
}
.v2-app-scope .v2-capacidad-progreso-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.v2-app-scope .v2-capacidad-progreso-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .25s ease-out;
}
@media (max-width: 600px) {
  .v2-app-scope .v2-capacidad-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .v2-app-scope .v2-capacidad-badge {
    width: 100%;
    text-align: right;
  }
}



