:root {
  --app-bg: #070b11;
  --app-bg-2: #101720;
  --app-card: #101720;
  --app-border: rgba(255, 255, 255, 0.09);
  --app-text: #f5f7fb;
  --app-soft: #aeb7c6;

  --licman-blue: #0b4f8a;
  --licman-blue-2: #1565a9;
  --licman-blue-soft: #eaf3fb;
  --licman-blue-border: #9fb9d3;
  --licman-text: #1d2a36;
  --licman-muted: #5b7085;
  --line-dark: #7f95ab;
  --line-soft: #d5e2ee;
  --white: #ffffff;
  --danger: #d93025;
  --danger-dark: #b3261e;
}

* {
  box-sizing: border-box;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 12%, rgba(174, 24, 30, 0.22), transparent 26%),
    linear-gradient(180deg, var(--app-bg) 0%, var(--app-bg-2) 100%);
  color: var(--app-text);
}

/* ===== CONTENEDOR GENERAL ===== */

.cierre-venta-layout {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* ===== CABECERA APP ===== */

.cierre-venta-layout .topbar {
  background: rgba(16, 23, 32, 0.92);
  border: 1px solid var(--app-border);
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.42);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.cierre-venta-layout .topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(217, 39, 48, 0.24), transparent 32%),
    linear-gradient(90deg, rgba(255,255,255,0.04), transparent 45%);
  pointer-events: none;
}

.cierre-venta-layout .topbar-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: center;
}

.cierre-venta-layout .brand-block h1 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(1.8rem, 2.8vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.5px;
  font-weight: 900;
}

.cierre-venta-layout .brand-block p {
  margin: 0;
  color: var(--app-soft);
  font-size: 1.05rem;
}

.cierre-venta-layout .logo-box {
  background: #ffffff;
  border-radius: 24px;
  padding: 18px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cierre-venta-layout .logo-box img {
  max-width: 240px;
  max-height: 90px;
  object-fit: contain;
}

/* ===== CONTENIDO APP ===== */

.cierre-venta-layout .content-page {
  background: rgba(16, 23, 32, 0.82);
  border: 1px solid var(--app-border);
  border-radius: 30px;
  padding: 22px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.cierre-venta-layout .page-header {
  width: min(210mm, 100%);
  margin: 0 auto 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cierre-venta-layout .page-header h2 {
  color: #ffffff;
  font-size: 1.35rem;
  margin: 0;
  font-weight: 900;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-btn,
.danger-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s ease;
  border: none;
  color: #ffffff;
}

.primary-btn {
  background: #0f4c81;
  box-shadow: 0 12px 24px rgba(15, 76, 129, 0.25);
}

.primary-btn:hover {
  background: #12619f;
  transform: translateY(-2px);
}

.danger-link {
  background: linear-gradient(90deg, #e32d34 0%, #9f1119 100%);
  box-shadow: 0 12px 24px rgba(180, 20, 28, 0.25);
}

.danger-link:hover {
  background: linear-gradient(90deg, #f03941 0%, #b5151e 100%);
  transform: translateY(-2px);
}

.alerta-validacion {
  width: min(210mm, 100%);
  margin: 0 auto 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(217, 48, 37, 0.14);
  border: 1px solid rgba(217, 48, 37, 0.35);
  color: #ff9a9a;
  font-size: 14px;
  font-weight: 800;
}

.alerta-validacion strong {
  display: block;
  color: #ffffff;
  margin-bottom: 4px;
}

/* ===== HOJA DOCUMENTO ===== */

.venta-doc {
  width: min(210mm, 100%);
  min-height: 297mm;
  margin: 0 auto;
  display: block;
  background: #ffffff;
  color: var(--licman-text);
  border: 1px solid #d7dee7;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 30px 80px rgba(0, 0, 0, 0.42);
}

#pdfArea {
  background: #ffffff;
}

/* ===== CABECERA DOCUMENTO ===== */

.venta-top-title {
  display: grid;
  grid-template-columns: 1fr 100px;
  align-items: stretch;
  background: linear-gradient(135deg, var(--licman-blue), var(--licman-blue-2));
  color: #ffffff;
  border-bottom: 1px solid var(--licman-blue-border);
}

.venta-top-title-main {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
}

.venta-top-title-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.venta-top-title-logo img {
  display: block;
  max-width: 120px;
  max-height: 58px;
  height: auto;
  object-fit: contain;
}

.venta-top-title-text {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1.15;
}

.venta-top-title-numero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 900;
}

.venta-top-title-numero span {
  color: #ffffff;
}

.venta-top-title-numero input {
  width: 44px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  color: #ffffff;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  outline: none;
  padding: 1px 0;
}

/* ===== BLOQUE SUPERIOR ===== */

.venta-top-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  border-bottom: 1px solid var(--licman-blue-border);
  background: #ffffff;
}

.venta-top-left,
.venta-top-right {
  padding: 8px 11px;
}

.venta-top-right {
  border-left: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  background: #f8fbff;
}

.line-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.line-field:last-child {
  margin-bottom: 0;
}

.line-field label {
  min-width: 106px;
  font-size: 12px;
  font-weight: 800;
  color: var(--licman-blue);
  white-space: nowrap;
}

.line-field input,
.line-field textarea,
.line-field select {
  flex: 1;
  border: none;
  border-bottom: 1px solid var(--line-dark);
  background: transparent;
  min-height: 21px;
  font-size: 12px;
  color: var(--licman-text);
  outline: none;
  padding: 1px 2px 2px;
  border-radius: 0;
}

.line-field input[type="date"] {
  min-width: 130px;
}

.right-field {
  justify-content: flex-end;
}

.right-field label {
  min-width: auto;
}

.right-mini-grid {
  display: grid;
  grid-template-columns: 1fr 24px;
  align-items: center;
  gap: 6px;
}

.mini-label {
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: var(--licman-blue);
}

.check-square {
  width: 14px;
  height: 14px;
  accent-color: var(--licman-blue);
  justify-self: start;
}

/* ===== VALIDACIÓN ===== */

.venta-validacion {
  border-bottom: 1px solid var(--licman-blue-border);
  padding: 7px 10px;
  font-size: 11.4px;
  color: var(--licman-text);
  background: var(--licman-blue-soft);
}

.venta-validacion strong {
  color: var(--licman-blue);
  font-weight: 900;
}

/* ===== SECCIONES DOCUMENTO ===== */

.venta-section {
  display: block;
  border-bottom: 1px solid var(--licman-blue-border);
  background: #ffffff;
}

.venta-section:last-child {
  border-bottom: none;
}

.venta-section-full {
  width: 100%;
}

.venta-section-title {
  background: linear-gradient(180deg, #f5faff, #e8f2fb);
  color: var(--licman-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--licman-blue-border);
}

.venta-section-body {
  padding: 7px 0;
  background: #ffffff;
}

.two-col-row,
.one-col-row {
  display: grid;
  gap: 14px;
  padding: 0 12px;
}

.two-col-row {
  grid-template-columns: 1fr 250px;
}

.one-col-row {
  grid-template-columns: 1fr;
}

.two-col-row .line-field,
.one-col-row .line-field {
  margin-bottom: 3px;
}

.two-col-row .line-field label,
.one-col-row .line-field label {
  min-width: 108px;
}

.two-col-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 0 12px;
}

.compact-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compact-line-field {
  margin-bottom: 2px;
}

.compact-line-field label {
  min-width: 112px;
}

.compact-check-row {
  grid-template-columns: 120px 70px 70px;
  gap: 10px;
  padding: 0;
  margin-bottom: 2px;
}

/* ===== ENTREGA ===== */

.entrega-body {
  padding-top: 0;
  padding-bottom: 0;
}

.entrega-top-row {
  display: grid;
  grid-template-columns: 1.15fr 82px 82px 1fr;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  min-height: 30px;
}

.short-label label {
  min-width: 118px;
}

.detalle-field label {
  min-width: 46px;
}

.check-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.8px;
  font-weight: 900;
  color: var(--licman-blue);
}

.check-option span {
  color: var(--licman-blue);
}

.check-option input[type="checkbox"],
.inline-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--licman-blue);
}

.entrega-middle-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 12px;
  padding: 5px 12px 4px;
}

.equipamiento-label {
  font-size: 11.8px;
  font-weight: 800;
  color: var(--licman-blue);
}

.referencia-entrega {
  font-size: 10.9px;
  font-weight: 600;
  color: var(--licman-muted);
  font-style: italic;
  text-align: left;
}

.entrega-lines {
  padding: 0 12px 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entrega-lines input {
  border: none;
  border-bottom: 1px solid var(--line-dark);
  background: transparent;
  min-height: 17px;
  font-size: 11.3px;
  outline: none;
  padding: 1px 2px 2px;
}

/* ===== CHECKS ===== */

.venta-check-row {
  display: grid;
  grid-template-columns: 110px 90px 90px;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  margin-bottom: 4px;
}

.venta-check-row .row-title {
  font-size: 11.9px;
  font-weight: 800;
  color: var(--licman-blue);
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.8px;
  font-weight: 800;
  color: var(--licman-text);
}

.inline-check span {
  color: var(--licman-text);
}

/* ===== OBSERVACIONES ===== */

.observaciones-body {
  padding: 6px 12px;
}

.observaciones-textarea {
  width: 100%;
  min-height: 50px;
  border: none;
  border-bottom: 1px solid var(--line-dark);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 16px,
      rgba(127, 149, 171, 0.75) 16px,
      rgba(127, 149, 171, 0.75) 17px
    );
  font-size: 11.4px;
  color: var(--licman-text);
  outline: none;
  resize: none;
  line-height: 17px;
  padding: 0 3px;
}

/* ===== FIRMAS ===== */

.firmas-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 9px 14px 9px;
  background: #ffffff;
  border-top: 1px solid var(--licman-blue-border);
}

.firma-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
}

.firma-line {
  width: 100%;
  max-width: 145px;
  border-top: 2px solid #253647;
  margin-bottom: 7px;
}

.firma-name {
  font-size: 11.2px;
  font-weight: 800;
  color: var(--licman-text);
  text-align: center;
  line-height: 1.15;
}

.required-error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.12) !important;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 980px) {
  .cierre-venta-layout {
    padding: 18px;
  }

  .cierre-venta-layout .topbar-content {
    grid-template-columns: 1fr;
  }

  .two-col-compact {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .two-col-row {
    grid-template-columns: 1fr 1fr;
  }

  .entrega-top-row {
    grid-template-columns: 1fr 80px 80px 1fr;
  }

  .entrega-middle-row {
    grid-template-columns: 160px 1fr;
  }
}

@media (max-width: 820px) {
  .cierre-venta-layout {
    padding: 0;
  }

  .cierre-venta-layout .topbar {
    border-radius: 0 0 28px 28px;
    border-top: none;
    border-left: none;
    border-right: none;
  }

  .cierre-venta-layout .content-page {
    border-radius: 28px 28px 0 0;
    border-left: none;
    border-right: none;
  }

  .cierre-venta-layout .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .danger-link {
    width: 100%;
  }

  .venta-top-grid {
    grid-template-columns: 1fr;
  }

  .venta-top-right {
    border-left: none;
    border-top: 1px solid var(--line-soft);
  }

  .two-col-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .entrega-top-row,
  .entrega-middle-row,
  .venta-check-row {
    grid-template-columns: 1fr;
  }

  .firmas-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .cierre-venta-layout .topbar {
    padding: 26px 18px;
  }

  .cierre-venta-layout .brand-block h1 {
    font-size: 2.4rem;
  }

  .cierre-venta-layout .content-page {
    padding: 16px;
  }

  .venta-top-title {
    grid-template-columns: 1fr;
  }

  .venta-top-title-numero {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    justify-content: flex-end;
  }

  .venta-top-title-main {
    grid-template-columns: 90px 1fr;
    gap: 8px;
    padding: 8px 10px;
  }

  .venta-top-title-logo img {
    max-width: 78px;
    max-height: 28px;
  }

  .venta-top-title-text {
    font-size: 10px;
    line-height: 1.2;
  }

  .line-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .line-field label {
    min-width: auto;
  }

  .right-field {
    justify-content: flex-start;
  }

  .mini-label {
    text-align: left;
  }
}

/* ===== IMPRESIÓN ===== */

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    width: 210mm;
    height: 297mm;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: hidden !important;
  }

  .topbar,
  .page-header,
  .page-actions,
  .primary-btn,
  .danger-link,
  .alerta-validacion {
    display: none !important;
  }

  .cierre-venta-layout,
  .cierre-venta-layout .content-page {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
  }

  .venta-doc {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    overflow: hidden !important;
  }
}

/* ===== MODO PDF VENTA - A4 COMPLETO LIMPIO ===== */

.pdf-mode-venta {
  width: 210mm !important;
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
}

/* Header */
.pdf-mode-venta .venta-top-title {
  grid-template-columns: 1fr 100px !important;
  min-height: 22mm !important;
}

.pdf-mode-venta .venta-top-title-main {
  grid-template-columns: 125px 1fr !important;
  gap: 8px !important;
  padding: 4px 7px !important;
}

.pdf-mode-venta .venta-top-title-logo img {
  max-width: 2000px !important;
  max-height: 90px !important;
}

.pdf-mode-venta .venta-top-title-text {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

.pdf-mode-venta .venta-top-title-numero {
  font-size: 10px !important;
  padding: 6px !important;
}

/* Bloque vendedor / fecha */
.pdf-mode-venta .venta-top-grid {
  grid-template-columns: 1fr 175px !important;
  min-height: 29mm !important;
}

.pdf-mode-venta .venta-top-left,
.pdf-mode-venta .venta-top-right {
  padding: 7px 9px !important;
}

.pdf-mode-venta .venta-top-right {
  gap: 6px !important;
}

/* Validación */
.pdf-mode-venta .venta-validacion {
  min-height: 7mm !important;
  padding: 5px 8px !important;
  font-size: 8.5px !important;
}

/* Secciones generales */
.pdf-mode-venta .venta-section-title {
  font-size: 9px !important;
  padding: 5px 8px !important;
}

.pdf-mode-venta .venta-section-body {
  padding: 6px 0 !important;
}

/* Cliente */
.pdf-mode-venta .venta-section:nth-of-type(1) {
  min-height: 31mm !important;
}

/* Equipo */
.pdf-mode-venta .venta-section:nth-of-type(2) {
  min-height: 52mm !important;
}

/* Condiciones entrega */
.pdf-mode-venta .venta-section:nth-of-type(3) {
  min-height: 35mm !important;
}

/* Condiciones venta */
.pdf-mode-venta .venta-section:nth-of-type(4) {
  min-height: 30mm !important;
}

/* Entrega */
.pdf-mode-venta .venta-section:nth-of-type(5) {
  min-height: 31mm !important;
}

/* Observaciones */
.pdf-mode-venta .venta-section:nth-of-type(6) {
  min-height: 28mm !important;
}

/* Filas y columnas */
.pdf-mode-venta .two-col-row,
.pdf-mode-venta .one-col-row {
  padding: 0 9px !important;
  gap: 10px !important;
  margin-bottom: 4px !important;
}

.pdf-mode-venta .two-col-row {
  grid-template-columns: 1fr 205px !important;
}

.pdf-mode-venta .two-col-compact {
  grid-template-columns: 1fr 1fr !important;
  gap: 18px !important;
  padding: 0 9px !important;
}

.pdf-mode-venta .compact-col {
  gap: 4px !important;
}

/* Campos */
.pdf-mode-venta .line-field {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  margin-bottom: 4px !important;
  min-height: 18px !important;
}

.pdf-mode-venta .line-field label {
  min-width: 88px !important;
  font-size: 8.5px !important;
  color: var(--licman-blue) !important;
  font-weight: 900 !important;
}

.pdf-mode-venta .right-field label {
  min-width: auto !important;
}

.pdf-mode-venta .mini-label,
.pdf-mode-venta .row-title,
.pdf-mode-venta .inline-check,
.pdf-mode-venta .check-option,
.pdf-mode-venta .equipamiento-label,
.pdf-mode-venta .referencia-entrega {
  font-size: 8.5px !important;
}

/* Entrega */
.pdf-mode-venta .entrega-top-row {
  grid-template-columns: 1.2fr 56px 56px 1fr !important;
  gap: 7px !important;
  padding: 6px 9px !important;
}

.pdf-mode-venta .entrega-middle-row {
  grid-template-columns: 140px 1fr !important;
  gap: 9px !important;
  padding: 6px 9px !important;
}

.pdf-mode-venta .entrega-lines {
  padding: 0 9px 8px !important;
}

/* Checks */
.pdf-mode-venta .compact-check-row {
  grid-template-columns: 84px 50px 50px !important;
  gap: 7px !important;
  margin-bottom: 4px !important;
}

/* Observaciones */
.pdf-mode-venta .observaciones-body {
  padding: 6px 9px !important;
}

.pdf-mode-venta .observaciones-textarea,
.pdf-mode-venta .observaciones-body .pdf-control-text {
  min-height: 42px !important;
}

/* Firmas */
.pdf-mode-venta .firmas-row {
  margin-top: auto !important;
  min-height: 26mm !important;
  padding: 12px 18px 16px !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;
}

.pdf-mode-venta .firma-item {
  min-height: 42px !important;
}

.pdf-mode-venta .firma-line {
  max-width: 135px !important;
  margin-bottom: 7px !important;
}

.pdf-mode-venta .firma-name {
  font-size: 8.5px !important;
}

/* Reemplazo visual de inputs para PDF */
.pdf-control-text {
  flex: 1;
  width: 100%;
  min-height: 17px;
  display: flex;
  align-items: center;
  padding: 1px 3px;
  border: none;
  border-bottom: 1px solid var(--line-dark);
  background: transparent;
  color: #111827;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  white-space: nowrap;
}

.pdf-check-text {
  width: 12px;
  height: 12px;
  min-width: 12px;
  border: 1px solid var(--line-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b4f8a;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  background: #ffffff;
}

/* ===== VALIDACIÓN PDF ===== */

.required-error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.16) !important;
}

.required-error-wrapper {
  border-radius: 8px;
}

.alerta-validacion,
.mensaje-error {
  width: min(210mm, 100%);
  margin: 0 auto 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(217, 48, 37, 0.14);
  border: 1px solid rgba(217, 48, 37, 0.35);
  color: #ff9a9a;
  font-size: 14px;
  font-weight: 800;
}

.alerta-validacion strong,
.mensaje-error strong {
  display: block;
  color: #ffffff;
  margin-bottom: 4px;
}

/* =========================================
   BUSCADOR DE CLIENTES REALES
   ========================================= */

.oculto {
  display: none;
}

.cliente-selector-field {
  position: relative;
  z-index: 80;
}

.cliente-buscador {
  position: relative;
  flex: 1;
  min-width: 0;
}

.cliente-buscador > input[type="text"] {
  width: 100%;
}

.cliente-resultados {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;

  z-index: 1500;

  max-height: 280px;
  overflow-y: auto;

  padding: 7px;

  border: 1px solid #c9d5e1;
  border-radius: 12px;

  background: #ffffff;

  box-shadow:
    0 18px 45px
    rgba(7, 11, 17, 0.20);
}

.cliente-resultado-item {
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  gap: 3px;

  padding: 10px 11px;

  border: none;
  border-radius: 9px;

  background: transparent;

  text-align: left;

  cursor: pointer;

  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.cliente-resultado-item:hover,
.cliente-resultado-item:focus {
  outline: none;

  background: #edf4fa;

  transform: translateY(-1px);
}

.cliente-resultado-nombre {
  font-size: 12px;
  font-weight: 900;

  color: #0e3a5b;
}

.cliente-resultado-detalle {
  font-size: 10px;
  font-weight: 700;

  color: #6b7783;
}

.cliente-resultados-vacio {
  padding: 13px 11px;

  color: #6b7783;

  font-size: 11px;
  font-weight: 700;

  text-align: center;
}

.cliente-seleccionado-badge {
  margin-top: 6px;

  min-height: 27px;

  padding: 5px 8px;

  display: flex;
  align-items: center;

  gap: 7px;

  border: 1px solid #bad6c4;

  border-radius: 9px;

  background: #edf8f1;

  color: #1f6b3b;

  font-size: 10px;
  font-weight: 900;
}

.cliente-seleccionado-punto {
  width: 7px;
  height: 7px;

  flex: 0 0 7px;

  border-radius: 50%;

  background: #2f9e57;

  box-shadow:
    0 0 0 3px
    rgba(47, 158, 87, 0.14);
}

#clienteSeleccionadoTexto {
  flex: 1;

  min-width: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#limpiarClienteSeleccionado {
  width: 21px;
  height: 21px;

  flex: 0 0 21px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: none;
  border-radius: 50%;

  background:
    rgba(31, 107, 59, 0.10);

  color: #1f6b3b;

  font-size: 16px;
  line-height: 1;

  cursor: pointer;
}

#limpiarClienteSeleccionado:hover {
  background:
    rgba(31, 107, 59, 0.18);
}

.cliente-resultados.oculto,
.cliente-seleccionado-badge.oculto {
  display: none !important;
}

/* Nunca mostrar controles internos en el PDF */

.pdf-mode-venta
.cliente-resultados,

.pdf-mode-venta
.cliente-seleccionado-badge {
  display: none !important;
}