/* KPI estilo dashboard (glass/dark) */
.kpi-dash {
  border-radius: 19px !important;
  cursor: pointer;
  overflow: hidden;

  background: rgba(8, 12, 22, .55) !important;
  /* dark glass */
  border: 1px solid rgba(255, 255, 255, .10) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .25) !important;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.kpi-dash:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .33) !important;
  filter: brightness(1.03);
}

.kpi-dash:active {
  transform: translateY(0) scale(.99);
}

.kpi-dash .card-body {
  padding: .85rem .9rem;
}

/* Layout interno */
.kpi-dash .kpi-row {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.kpi-dash .kpi-ico {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .10);
}

.kpi-dash .kpi-ico i {
  color: #fff;
  text-shadow: 1px 2px 2px black;
}

/* Texto */
.kpi-dash .kpi-txt {
  flex: 1;
  text-align: center;
  line-height: 1.1;
}

.kpi-dash .kpi-label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  /* pill */
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .10);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  text-shadow: 1px 2px 2px black;
}

.kpi-dash .kpi-value {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  text-shadow: 1px 2px 2px black;
}

/* “Acento” por tarjeta (línea arriba) */
.kpi-dash[data-accent] {
  position: relative;
}

.kpi-dash[data-accent]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--kpi-accent);
  opacity: .95;
}

/* Colores por estado */
.kpi-dash[data-accent="red"] {
  --kpi-accent: #ff5252;
}

.kpi-dash[data-accent="yellow"] {
  --kpi-accent: #ffeb3b;
}

.kpi-dash[data-accent="blue"] {
  --kpi-accent: #33b5e5;
}

/* primary-color vibe */
.kpi-dash[data-accent="green"] {
  --kpi-accent: #00c851;
}

.kpi-dash[data-accent="orange"] {
  --kpi-accent: #ff9800;
}

.kpi-dash[data-accent="gray"] {
  --kpi-accent: #9e9e9e;
}



/* Card contenedor tabla */
.x-table-card {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(10, 16, 28, .55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

/* Header flotante */
.x-float-head {
  padding: 16px 18px;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  background: linear-gradient(90deg, rgba(47, 111, 237, .95), rgba(77, 134, 245, .92));
  color: #fff;
}

.x-float-title {
  font-weight: 800;
  letter-spacing: .2px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .35);
}


/* ==========================
   Apple Glass Status Dot
========================== */

.x-status-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-block;
  cursor: pointer;
  position: relative;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .25),
    0 4px 12px rgba(0, 0, 0, .35);

  transition: all .18s ease;
}

/* Hover tipo Apple */
.x-status-dot:hover {
  transform: scale(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 8px 20px rgba(0, 0, 0, .45);
}

/* ======================
   COLORES SUAVES
====================== */

.st-reparado {
  background: rgba(59, 130, 246, .22);
  border-color: rgba(59, 130, 246, .35);
}

.st-por {
  background: rgba(239, 68, 68, .22);
  border-color: rgba(239, 68, 68, .35);
}

.st-entregado {
  background: rgba(16, 185, 129, .22);
  border-color: rgba(16, 185, 129, .35);
}

.st-espera {
  background: rgba(245, 158, 11, .22);
  border-color: rgba(245, 158, 11, .35);
}

.st-sin {
  background: rgba(251, 146, 60, .22);
  border-color: rgba(251, 146, 60, .35);
}

.st-sinr {
  background: rgba(148, 163, 184, .20);
  border-color: rgba(148, 163, 184, .30);
}

.st-neutral {
  background: rgba(255, 255, 255, .08);
}



#lock {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  margin: auto;
}

#lock .lock-dots circle {
  fill: rgba(52, 152, 219, .35);
  stroke: rgba(52, 152, 219, .85);
  stroke-width: .6;
  r: 4;
}

#lock .lock-line {
  fill: none;
  stroke: #3498db;
  stroke-width: 2;
  marker-end: none !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .95;
  marker-end: url(#arrow);
}


.lock-dots text {
  font-size: 8px;
  fill: #e2e8f0;
  /* blanco gris suave */
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}


#lock .lock-active-dot {
  fill: #3498db;
  stroke: #3498db;
  r: 5;
}

#lock .lock-dots circle {
  fill: rgba(148, 163, 184, .10);
  stroke: rgba(148, 163, 184, .35);
  stroke-width: .8;
}

#lock .lock-active-dot {
  filter: drop-shadow(0 0 6px rgba(52, 152, 219, .45));
}


#lock .lock-step {
  font-size: 8px;
  fill: #e2e8f0;
  /* blanco gris */
  font-weight: 700;
  pointer-events: none;
}


#lock .lock-line {
  fill: none;
  stroke: rgba(59, 130, 246, .85);
  /* azul más moderno */
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .95;
  marker-end: url(#arrow);

  filter: drop-shadow(0 0 6px rgba(59, 130, 246, .25));
}

#lock .lock-line {
  color: rgba(59, 130, 246, .9);
}


.lock-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  /* el tamaño que uses */
  margin: 0 auto;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  /* invisible */
  display: none;
  z-index: 50;
  /* encima del svg */
  border-radius: 16px;
}

/* cuando está readonly */
.lock-wrap.readonly .lock-overlay {
  display: block;
  cursor: not-allowed;
}

.lock-wrap.readonly #lock {
  pointer-events: none;
}

/* extra */

/*  #lock .lock-line{ stroke-width: 2.5; opacity: .9; }*/
/* Base del lock */
#lock {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  margin: auto;
}

/* Puntos base (sin seleccionar) */
#lock .lock-dots circle {
  fill: rgba(148, 163, 184, .06);
  stroke: rgba(148, 163, 184, .30);
  stroke-width: .9;
  r: 6;
  transition: .18s;
}

/* Línea que dibuja el plugin (editable) */
#lock .lock-lines path,
#lock .lock-lines .lock-line {
  fill: none;
  stroke: rgba(59, 130, 246, .90);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, .20));
}

/* Activos (cuando pasas por un punto) */
#lock .lock-actives circle,
#lock .lock-actives .lock-active-dot {
  fill: rgba(59, 130, 246, .95);
  stroke: rgba(255, 255, 255, .35);
  stroke-width: 1;
  r: 7;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, .35));
}

/* Hover “sutil” (si quieres que se sienta interactivo) */
#lock:hover .lock-dots circle {
  stroke: rgba(226, 232, 240, .35);
}

/**/
/* Estado error (si el patrón está mal) */
#lock.is-error .lock-lines path,
#lock.is-error .lock-lines .lock-line {
  stroke: rgba(239, 68, 68, .95);
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, .20));
}

#lock.is-error .lock-actives circle {
  fill: rgba(239, 68, 68, .95);
}

/* Estado ok (si guardó o validó bien) */
#lock.is-ok .lock-lines path,
#lock.is-ok .lock-lines .lock-line {
  stroke: rgba(34, 197, 94, .95);
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, .20));
}

#lock.is-ok .lock-actives circle {
  fill: rgba(34, 197, 94, .95);
}

.lock-wrap {
  background: radial-gradient(120% 120% at 50% 0%,
      rgba(255, 255, 255, .06) 0%,
      rgba(255, 255, 255, 0) 55%);
  border-radius: 18px;
  padding: 10px 8px;
}

#lock {
  touch-action: none;
  user-select: none;
}


/* LOCK PATRON PAR AGREGAR ORDEN */

#colorIcon {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 10px;
}


.xp-colorpicker {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  z-index: 9999;

  width: 100%;
  max-width: 100%;

  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, .96);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.xp-colorpicker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.xp-colorpicker__title {
  font-weight: 900;
  color: rgba(255, 255, 255, .92);
}

.xp-colorpicker__chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
}

.xp-colorpicker__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.xp-colorpicker__label {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, .85);
}

.xp-colorpicker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
  gap: 10px;
}

.xp-swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .22);
  transition: transform .12s ease;
  position: relative;
}

.xp-swatch:hover {
  transform: translateY(-1px);
}

.xp-swatch::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  transition: box-shadow .14s ease;
}

.xp-swatch.is-selected::after {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .95);
}


/* TIPO DE EQUIPO*/

/* para que el dropdown no quede limitado y el cálculo no falle */
/*.modal,
.modal-dialog,
.modal-content{
  transform: none !important;
}*/

/**/

/* Estado inválido iOS-like */
.xp-invalid {
  border: 1px solid rgba(239, 68, 68, .95) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .14) !important;
}

/* (Opcional) estado válido suave */
.xp-valid {
  border: 1px solid rgba(34, 197, 94, .55) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .10) !important;
}

/* Mensaje error estilo SaaS */
.xp-error-msg {
  min-height: 18px;
  font-size: 12px;
  font-weight: 600;
  color: #f87171;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(-3px);
  transition: all .18s ease;
}

/* cuando hay contenido */
.xp-error-msg.active {
  opacity: 1;
  transform: translateY(0);
}

/* iconito */
.xp-error-msg::before {
  content: "⚠";
  font-size: 12px;
  line-height: 1;
}

#modalAgregarPatron {
  z-index: 3000 !important;
}

#modalAgregarPatron+.modal-backdrop {
  z-index: 2990 !important;
}

/* SweetAlert encima de cualquier modal */
.swal2-container {
  z-index: 5000 !important;
}

/* contenedor del status en la tabla */
.statusItem {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

/* dot iOS / Stripe */
.statusDot {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--st-color);

  /* glass + profundidad */
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, .04),
    0 8px 18px rgba(0, 0, 0, .45),
    0 0 8px color-mix(in srgb, var(--st-color) 55%, transparent);

  border: 1px solid rgba(255, 255, 255, .18);
}

/* texto tipo Apple */
.statusText {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  color: rgba(234, 240, 255, .92);
  opacity: .95;
}

/* en pantallas pequeñas puedes ocultar el texto y dejar solo el dot */
@media (max-width: 991.98px) {
  .statusText {
    display: none;
  }
}


@media (min-width: 992px) {
  .statusText {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  }
}

.statusItem {
  display: flex;
  align-items: center;
  gap: 6px;
}

.statusDot {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .05),
    0 0 4px currentColor;
}

/* contenedor */
.statusWrap {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* badge iOS base */
.iosBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .3px;
  cursor: pointer;
  user-select: none;

  background: var(--tint, rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .14);

  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);

  box-shadow:
    0 12px 26px rgba(0, 0, 0, .40),
    inset 0 1px 0 rgba(255, 255, 255, .10);
}

/* punto interno del status */
.iosDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--st, #6c757d);
  box-shadow: 0 0 10px color-mix(in srgb, var(--st) 55%, transparent);
  border: 1px solid rgba(255, 255, 255, .18);
}

/* borde del color del status */
.iosStatus {
  border-color: color-mix(in srgb, var(--st) 40%, rgba(255, 255, 255, .12));
}

/* badge deuda */
.iosDebt {
  cursor: default;
  background: rgba(255, 193, 7, .14);
  border: 1px solid rgba(255, 193, 7, .22);
  color: #ffd56a;
}

/* tactil */
.iosBadge:active {
  transform: scale(.98);
}

/* ===== iOS badges más vivos (menos opacos) ===== */
.iosBadge {
  background: rgba(255, 255, 255, .085) !important;
  /* antes .06 aprox */
  border: 1px solid rgba(255, 255, 255, .18) !important;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .45),
    inset 0 1px 0 rgba(255, 255, 255, .14) !important;
  color: rgba(234, 240, 255, .96) !important;
}

/* status: que el tint se sienta más “vivo” */
.iosStatus {
  background: color-mix(in srgb, var(--tint) 70%, rgba(255, 255, 255, .10)) !important;
  border-color: color-mix(in srgb, var(--st) 55%, rgba(255, 255, 255, .18)) !important;
}

/* dot con glow más fuerte */
.iosDot {
  width: 11px !important;
  height: 11px !important;
  background: var(--st) !important;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, .06),
    0 0 16px color-mix(in srgb, var(--st) 75%, transparent) !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
}

/* deuda más legible */
.iosDebt {
  background: rgba(255, 193, 7, .20) !important;
  border: 1px solid rgba(255, 193, 7, .30) !important;
  color: #ffe08a !important;
}

/* hover (desktop) para que se sienta “premium” */
@media (hover:hover) {
  .iosBadge:hover {
    background: rgba(255, 255, 255, .11) !important;
    transform: translateY(-1px);
  }
}


/*DISENO DE CARD DE ORDENES*/

.x-metric-body {
  padding: 18px 18px 12px 18px;
}

.x-metric-footer {
  padding: 10px 18px 14px 18px;
}


.x-metric-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.4px;
}

.x-metric-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, .72);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 6px;
}

.x-metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .18);
}

.x-metric {
  transition: transform .15s ease, box-shadow .15s ease;
}

.x-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .18);
}

.x-metric-link {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
}

.x-metric-link:hover {
  color: #fff;
}



.x-metric-footer .x-metric-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-size: 13px;
  font-weight: 600;

  padding: 4px 10px;
  border-radius: 12px;

  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);

  transition: all .15s ease;
}

.x-metric-footer .x-metric-link:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateY(-1px);
}

.x-metric-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .75);
}

.x-metric-icon {
  box-shadow:
    0 10px 18px rgba(0, 0, 0, .25),
    0 0 10px rgba(255, 255, 255, .05);
}



/*LINEAS DE DATATABLES EN ORDENES*/

.tablaOrdenes tbody tr {
  position: relative;
}

.tablaOrdenes tbody tr.row-sin-reparacion {
  box-shadow: inset 2px 0 0 #fb923c;
}

.tablaOrdenes tbody tr.row-entregado {
  box-shadow: inset 2px 0 0 #10b981;
}

.tablaOrdenes tbody tr.row-reparado {
  box-shadow: inset 2px 0 0 #2563eb;
}

.tablaOrdenes tbody tr.row-por-reparar {
  box-shadow: inset 2px 0 0 #ef4444;
}

.tablaOrdenes tbody tr.row-espera {
  box-shadow: inset 2px 0 0 #ffea00;
}



.tablaOrdenes tbody tr.row-entregado-sr {
  box-shadow: inset 2px 0 0 #64748b;
}

.tablaOrdenes tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}




/* =========================
   FADE ONLY ELEGANTE
========================= */

/*.tablaOrdenes tbody tr.child > td{
  background: transparent !important;
  border-top: 0 !important;
  padding-top: 8px !important;
  padding-bottom: 14px !important;
  transition: none !important;
}

.tablaOrdenes tbody tr.child > td > .x-detail-fade{
  opacity: 0 !important;
transition: opacity .50s cubic-bezier(.22,1,.36,1) !important;
  will-change: opacity;
}

.tablaOrdenes tbody tr.child > td > .x-detail-fade.x-detail-fade-visible{
  opacity: 1 !important;
}

.tablaOrdenes tbody tr.child,
.tablaOrdenes tbody tr.child > td,
.tablaOrdenes tbody tr.parent,
.tablaOrdenes tbody tr.shown{
  animation: none !important;
}

.tablaOrdenes tbody tr.parent,
.tablaOrdenes tbody tr.shown{
  background: rgba(255,255,255,.018) !important;
}


/* fila abierta destacada */

/* CARD NORMAL */

.x-metric {
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 18px !important;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.x-metric-active {
  border: 1px solid rgba(59, 130, 246, .75) !important;
  border-radius: 18px !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .12);
  transform: translateY(-1px);
}

.x-metric:hover {
  border-color: rgba(255, 255, 255, .14);
}



/* =========================
   DATATABLES LOADER LIMPIO
========================= */

/* =========================
   LOADER CENTRADO EN DATATABLE
========================= */

.dataTables_wrapper {
  position: relative;
}

.dataTables_wrapper .dataTables_processing {

  position: absolute !important;

  top: 10%;
  left: 50%;

  transform: translate(-50%, -50%);

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;

  z-index: 20;
}

/* cápsula loader */

.x-loader {

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  padding: 14px 18px;

  border-radius: 18px;

  background: rgba(15, 23, 42, .85);

  backdrop-filter: blur(10px);

  border: 1px solid rgba(255, 255, 255, .08);

  box-shadow:
    0 10px 30px rgba(0, 0, 0, .45);

}

/* dots */

.x-loader span {

  width: 10px;
  height: 10px;

  border-radius: 50%;

  background: #3b82f6;

  animation: xLoaderBounce 1.2s infinite ease-in-out;
}

.x-loader span:nth-child(2) {
  animation-delay: .15s;
}

.x-loader span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes xLoaderBounce {

  0%,
  80%,
  100% {
    transform: scale(.65);
    opacity: .5;
  }

  40% {
    transform: scale(1.2);
    opacity: 1;
  }

}

/* CARD OTRO ESTILO */

/* =========================================================
   ÓRDENES - PAGE
========================================================= */
.x-orders-page {
  --x-bg: #0f172a;
  --x-panel: rgba(15, 23, 42, .72);
  --x-panel-2: rgba(15, 23, 42, .82);
  --x-border: rgba(148, 163, 184, .14);
  --x-border-strong: rgba(148, 163, 184, .22);
  --x-text: #e5eefc;
  --x-text-soft: #94a3b8;
  --x-white: #fff;
  --x-shadow: 0 18px 45px rgba(2, 6, 23, .28);
  --x-radius-xl: 24px;
  --x-radius-lg: 18px;
  --x-radius-md: 14px;
  color: var(--x-text);
}

/* =========================================================
   HEADER
========================================================= */
.x-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.x-page-title {
  margin: 0;
  font-size: clamp(1.65rem, 2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #f8fbff;
}

.x-page-subtitle {
  margin: 6px 0 0;
  color: var(--x-text-soft);
  font-size: .96rem;
  max-width: 780px;
  line-height: 1.55;
}

.x-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* =========================================================
   BOTONES
========================================================= */
.x-btn {
  border: 1px solid var(--x-border);
  border-radius: 14px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .18s ease;
  box-shadow: none;
}

.x-btn:hover {
  transform: translateY(-1px);
}

.x-btn-primary {
  color: #fff;
  border-color: rgba(59, 130, 246, .35);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}

.x-btn-primary:hover {
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .34);
}

.x-btn-secondary {
  color: #dbeafe;
  border-color: rgba(59, 130, 246, .22);
  background: rgba(37, 99, 235, .10);
}

.x-btn-secondary:hover {
  color: #fff;
  background: rgba(37, 99, 235, .16);
}

.x-btn-ghost {
  color: #d7e4f5;
  border-color: var(--x-border);
  background: rgba(255, 255, 255, .03);
}

.x-btn-ghost:hover {
  color: #fff;
  border-color: var(--x-border-strong);
  background: rgba(255, 255, 255, .06);
}

/* =========================================================
   KPI GRID
========================================================= */
.x-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.x-stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--x-border);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .025)),
    rgba(15, 23, 42, .78);
  box-shadow: var(--x-shadow);
  padding: 16px;
  min-height: 172px;
  transition: all .18s ease;
  text-align: left;
  color: var(--x-text);
}

.x-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  opacity: .95;
  border-radius: 22px 0 0 22px;
  background: rgba(255, 255, 255, .14);
}

.x-stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--x-border-strong);
  box-shadow: 0 22px 50px rgba(2, 6, 23, .34);
}

.x-stat-card.is-active {
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 18px 50px rgba(2, 6, 23, .40);
  transform: translateY(-2px);
}

.x-stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.x-stat-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.x-stat-card__badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #dbe7f7;
}

.x-stat-card__value {
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: 8px;
}

.x-stat-card__title {
  font-size: .98rem;
  font-weight: 800;
  color: #f8fbff;
  margin-bottom: 6px;
}

.x-stat-card__meta {
  font-size: .82rem;
  line-height: 1.45;
  color: var(--x-text-soft);
  min-height: 38px;
}

.x-stat-card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: .8rem;
  font-weight: 700;
  color: #d9e8ff;
  opacity: .9;
}

/* Variantes KPI */
.x-stat-card--red::before {
  background: linear-gradient(180deg, #ef4444, #dc2626);
}

.x-stat-card--yellow::before {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.x-stat-card--blue::before {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.x-stat-card--green::before {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.x-stat-card--purple::before {
  background: linear-gradient(180deg, #8b5cf6, #7c3aed);
}

.x-stat-card--orange::before {
  background: linear-gradient(180deg, #f97316, #ea580c);
}

.x-stat-card--red .x-stat-card__icon {
  background: rgba(239, 68, 68, .18);
}

.x-stat-card--yellow .x-stat-card__icon {
  background: rgba(245, 158, 11, .18);
}

.x-stat-card--blue .x-stat-card__icon {
  background: rgba(59, 130, 246, .18);
}

.x-stat-card--green .x-stat-card__icon {
  background: rgba(34, 197, 94, .18);
}

.x-stat-card--purple .x-stat-card__icon {
  background: rgba(139, 92, 246, .18);
}

.x-stat-card--orange .x-stat-card__icon {
  background: rgba(249, 115, 22, .18);
}

/* =========================================================
   PANEL
========================================================= */
.x-panel {
  border: 1px solid var(--x-border);
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)),
    rgba(15, 23, 42, .82);
  box-shadow: var(--x-shadow);
}

.x-panel-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .10);
}

.x-panel-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fbff;
}

.x-panel-head p {
  margin: 5px 0 0;
  font-size: .9rem;
  color: var(--x-text-soft);
}

/* =========================================================
   TOOLBAR
========================================================= */
.x-toolbar-panel {
  padding: 16px 18px 0;
}

.x-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.x-toolbar__left,
.x-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.x-toolbar__search {
  position: relative;
  min-width: 320px;
}

.x-toolbar__search i {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #7f93af;
  font-size: .92rem;
  pointer-events: none;
}

.x-toolbar__search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  outline: none;
  color: #e8f1fb;
  background: rgba(2, 6, 23, .34);
  transition: all .16s ease;
}

.x-toolbar__search input::placeholder {
  color: #7c8ea8;
}

.x-toolbar__search input:focus {
  border-color: rgba(59, 130, 246, .34);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .10);
  background: rgba(2, 6, 23, .48);
}

.x-toolbar__select,
button.x-toolbar__select,
select.x-toolbar__select {
  min-width: 165px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  outline: none;
  color: #e8f1fb;
  background: rgba(2, 6, 23, .34);
  transition: all .16s ease;
}

.x-toolbar__select:focus {
  border-color: rgba(59, 130, 246, .34);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .10);
}

#daterange-btn-ordenes,
#btnResetFiltro {
  min-height: 44px;
}

/* =========================================================
   TABLA WRAP
========================================================= */
.x-table-wrap {
  padding: 14px 18px 18px;
}

.table.tablaOrdenes {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
  margin-top: 8px !important;
}

.table.tablaOrdenes thead th {
  border: none !important;
  background: transparent !important;
  color: #90a4bf !important;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 0 14px 8px !important;
  white-space: nowrap;
}

.table.tablaOrdenes tbody tr {
  background: rgba(15, 23, 42, .78);
  box-shadow: 0 10px 24px rgba(2, 6, 23, .18);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.table.tablaOrdenes tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(2, 6, 23, .24);
}

.table.tablaOrdenes tbody td {
  background: rgba(15, 23, 42, .82) !important;
  border-top: 1px solid rgba(148, 163, 184, .10) !important;
  border-bottom: 1px solid rgba(148, 163, 184, .10) !important;
  border-left: none !important;
  border-right: none !important;
  padding: 14px !important;
  vertical-align: middle !important;
  color: #e8eff8 !important;
}

.table.tablaOrdenes tbody td:first-child {
  border-left: 1px solid rgba(148, 163, 184, .10) !important;
  border-radius: 16px 0 0 16px;
}

.table.tablaOrdenes tbody td:last-child {
  border-right: 1px solid rgba(148, 163, 184, .10) !important;
  border-radius: 0 16px 16px 0;
}

/* =========================================================
   CELDAS
========================================================= */
.x-ord-code {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, .12);
  color: #cfe0ff;
  border: 1px solid rgba(59, 130, 246, .18);
  font-weight: 800;
  font-size: .83rem;
}

.x-ord-cell-main {
  display: block;
  font-size: .92rem;
  font-weight: 700;
  color: #f8fbff;
  line-height: 1.35;
}

.x-ord-cell-sub {
  display: block;
  margin-top: 4px;
  font-size: .78rem;
  line-height: 1.4;
  color: #8fa3bd;
}

.x-ord-money,
.x-ord-money-success,
.x-ord-money-info,
.x-ord-money-pending {
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.x-ord-money {
  color: #f8fbff;
}

.x-ord-money-success {
  color: #4ade80;
}

.x-ord-money-info {
  color: #60a5fa;
}

.x-ord-money-pending {
  color: #fbbf24;
}

/* =========================================================
   BADGES ESTADO
========================================================= */
.x-ord-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.x-vta-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .01em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.x-vta-statusFont {

  font-size: 12.5px;

}

.x-vta-status i {
  font-size: .82rem;
}

.x-vta-status--danger {
  background: rgba(239, 68, 68, .12);
  color: #ff8b8b;
  border-color: rgba(239, 68, 68, .22);
}

.x-vta-status--warning {
  background: rgba(245, 158, 11, .12);
  color: #ffc76a;
  border-color: rgba(245, 158, 11, .22);
}

.x-vta-status--info {
  background: rgba(59, 130, 246, .12);
  color: #8bc1ff;
  border-color: rgba(59, 130, 246, .22);
}

.x-vta-status--success {
  background: rgba(34, 197, 94, .12);
  color: #72e7a0;
  border-color: rgba(34, 197, 94, .22);
}

.x-vta-status--secondary {
  background: rgba(148, 163, 184, .12);
  color: #d2dce8;
  border-color: rgba(148, 163, 184, .22);
}

.x-ord-debt-mini {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  color: #ffcb6b;
  background: rgba(245, 158, 11, .10);
  border: 1px solid rgba(245, 158, 11, .16);
}

/* =========================================================
   FILAS SEGÚN ESTADO
========================================================= */
/* BORDE IZQUIERDO */
/* LEFT BORDER */

.row-recibido td:first-child {
  box-shadow: inset 4px 0 0 #ef4444;
}

.row-diagnostico td:first-child {
  box-shadow: inset 4px 0 0 #8b5cf6;
}

.row-aprobacion td:first-child {
  box-shadow: inset 4px 0 0 #f59e0b;
}

.row-espera td:first-child {
  box-shadow: inset 4px 0 0 #f97316;
}

.row-reparado td:first-child {
  box-shadow: inset 4px 0 0 #3b82f6;
}

.row-entregado td:first-child {
  box-shadow: inset 4px 0 0 #22c55e;
}

.row-sin-reparacion td:first-child {
  box-shadow: inset 4px 0 0 #6b7280;
}

.row-entregado-sr td:first-child {
  box-shadow: inset 4px 0 0 #94a3b8;
}

.row-anulado td:first-child {
  box-shadow: inset 4px 0 0 #dc2626;
}

.x-vta-status--diagnostico {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* BACKGROUND */

/* .row-recibido td {
  background: linear-gradient(0deg, rgba(239, 68, 68, .05), rgba(239, 68, 68, .05)), rgba(15, 23, 42, .82) !important;
}

.row-diagnostico td {
  background: linear-gradient(0deg, rgba(139, 92, 246, .05), rgba(139, 92, 246, .05)), rgba(15, 23, 42, .82) !important;
}

.row-aprobacion td {
  background: linear-gradient(0deg, rgba(245, 158, 11, .05), rgba(245, 158, 11, .05)), rgba(15, 23, 42, .82) !important;
}

.row-espera td {
  background: linear-gradient(0deg, rgba(249, 115, 22, .05), rgba(249, 115, 22, .05)), rgba(15, 23, 42, .82) !important;
}

.row-reparado td {
  background: linear-gradient(0deg, rgba(59, 130, 246, .05), rgba(59, 130, 246, .05)), rgba(15, 23, 42, .82) !important;
}

.row-entregado td {
  background: linear-gradient(0deg, rgba(34, 197, 94, .05), rgba(34, 197, 94, .05)), rgba(15, 23, 42, .82) !important;
}

.row-sin-reparacion td {
  background: linear-gradient(0deg, rgba(107, 114, 128, .05), rgba(107, 114, 128, .05)), rgba(15, 23, 42, .82) !important;
}

.row-entregado-sr td {
  background: linear-gradient(0deg, rgba(148, 163, 184, .05), rgba(148, 163, 184, .05)), rgba(15, 23, 42, .82) !important;
}

.row-anulado td {
  background: linear-gradient(0deg, rgba(220, 38, 38, .05), rgba(220, 38, 38, .05)), rgba(15, 23, 42, .82) !important;
} */

/* =========================================================
   ACCIONES
========================================================= */
.x-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.x-action-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  transition: all .16s ease;
  box-shadow: none;
}

.x-action-btn:hover {
  transform: translateY(-1px) scale(1.03);
}

.x-action-view {
  background: rgba(59, 130, 246, .16);
  color: #8bc1ff;
  border: 1px solid rgba(59, 130, 246, .20);
}

.x-action-edit {
  background: rgba(148, 163, 184, .14);
  color: #dbe7f7;
  border: 1px solid rgba(148, 163, 184, .18);
}

.x-action-status {
  background: rgba(245, 158, 11, .14);
  color: #ffc76a;
  border: 1px solid rgba(245, 158, 11, .20);
}

.x-action-print {
  background: rgba(139, 92, 246, .14);
  color: #cdb4ff;
  border: 1px solid rgba(139, 92, 246, .20);
}

.x-action-payment {
  background: rgba(34, 197, 94, .14);
  color: #7ef0aa;
  border: 1px solid rgba(34, 197, 94, .20);
}

/* =========================================================
   DATATABLES EXTRA
========================================================= */
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
  display: none !important;
}

.dataTables_wrapper .dataTables_info {
  color: #91a5be !important;
  padding-top: 12px !important;
  font-size: .88rem !important;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 10px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  min-width: 36px;
  height: 36px;
  padding: 0 12px !important;
  margin: 0 4px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(148, 163, 184, .12) !important;
  background: rgba(255, 255, 255, .03) !important;
  color: #d7e3f4 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border-color: rgba(59, 130, 246, .36) !important;
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .24);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(255, 255, 255, .06) !important;
  color: #fff !important;
  border-color: rgba(148, 163, 184, .18) !important;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
  top: 50%;
  transform: translateY(-50%);
  /* background: #2563eb !important; */
  box-shadow: none !important;
  border: none !important;
}

/* =========================================================
   RESPONSIVE CARDS
========================================================= */
.dtr-card {
  border: 1px solid rgba(148, 163, 184, .12) !important;
  border-radius: 18px !important;
  background: rgba(15, 23, 42, .86) !important;
  box-shadow: 0 14px 28px rgba(2, 6, 23, .20) !important;
  overflow: hidden;
}

.dtr-card .card-body {
  padding: 16px;
}

.dtr-title {
  font-size: .88rem;
  font-weight: 800;
  color: #f8fbff;
  margin-bottom: 12px;
}

.dtr-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, .10);
}

.dtr-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dtr-line span {
  font-size: .79rem;
  color: #91a5be;
  min-width: 96px;
}

.dtr-line b {
  flex: 1;
  margin: 0;
  text-align: right;
  color: #f8fbff;
  font-size: .84rem;
  font-weight: 700;
}

.dtr-actions .x-actions {
  justify-content: flex-start;
}

/* =========================================================
   EXPORT BUTTONS
========================================================= */
.dt-buttons {
  display: none !important;
}

/* =========================================================
   SCROLLBAR
========================================================= */
.x-table-wrap::-webkit-scrollbar,
.dataTables_scrollBody::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.x-table-wrap::-webkit-scrollbar-thumb,
.dataTables_scrollBody::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .24);
  border-radius: 999px;
}

.x-table-wrap::-webkit-scrollbar-track,
.dataTables_scrollBody::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1500px) {
  .x-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .x-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .x-page-actions {
    justify-content: flex-start;
  }

  .x-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .x-toolbar__left,
  .x-toolbar__right {
    width: 100%;
  }

  .x-toolbar__search {
    min-width: 100%;
  }

  .x-toolbar__right {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .x-orders-page {
    padding: 1rem !important;
  }

  .x-stat-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .x-stat-card {
    min-height: auto;
  }

  .x-panel-head,
  .x-toolbar-panel,
  .x-table-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .x-toolbar__select,
  #daterange-btn-ordenes,
  #btnResetFiltro {
    width: 100%;
    min-width: 100%;
  }
}

.table.tablaOrdenes tbody tr.row-sin-reparacion>td:first-child {
  box-shadow: inset 4px 0 0 #94a3b8 !important;
}



.x-ord-modal {
  background: linear-gradient(180deg, rgba(16, 27, 56, .96), rgba(5, 14, 35, .98));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  overflow: hidden;
  color: #eaf2ff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .45);
}

.x-ord-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
}

.x-ord-modal__title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
}

.x-ord-modal__subtitle {
  margin: 6px 0 0;
  color: #9fb2d0;
  font-size: .95rem;
}

.x-ord-modal__header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.x-ord-modal__close {
  background: transparent;
  border: none;
  color: #d8e6ff;
  font-size: 1.9rem;
  line-height: 1;
  opacity: .85;
}

.x-ord-modal__body {
  padding: 18px;
}

.x-ord-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px 22px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.x-ord-block {
  background: rgba(5, 18, 48, .52);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.x-ord-block__head {
  margin-bottom: 14px;
}

.x-ord-block__head h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.x-ord-grid {
  display: grid;
  gap: 14px;
}

.x-ord-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.x-ord-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.x-ord-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.x-ord-field label {
  display: block;
  margin-bottom: 7px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #90a6c7;
}

.x-ord-value {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 700;
}

.x-ord-note {
  min-height: 120px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #eef4ff;
  line-height: 1.6;
  white-space: pre-line;
}

.x-ord-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.x-ord-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.x-ord-refacciones {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.x-ord-empty {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
  border: 1px dashed rgba(255, 255, 255, .10);
  color: #8fa6c7;
  text-align: center;
}

.x-ord-mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .78rem;
  font-weight: 800;
  color: #d9e7ff;
}

.x-ord-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.x-ord-summary-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
}

.x-ord-summary-card__label {
  display: block;
  margin-bottom: 8px;
  font-size: .82rem;
  text-transform: uppercase;
  font-weight: 800;
  color: #92a8c9;
}

.x-ord-summary-card__value {
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  font-weight: 900;
}

.x-is-green {
  color: #34d399;
}

.x-is-cyan {
  color: #22d3ee;
}

.x-is-orange {
  color: #fb923c;
}

.x-ord-progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  margin-bottom: 8px;
}

.x-ord-progress__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #22d3ee);
  transition: width .25s ease;
}

.x-ord-progress-label {
  font-weight: 800;
  color: #fff;
}

.x-ord-progress__text {
  color: #97abca;
  font-size: .9rem;
}

@media (max-width: 1200px) {
  .x-ord-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .x-ord-check-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .x-ord-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {

  .x-ord-grid--2,
  .x-ord-grid--3,
  .x-ord-grid--4,
  .x-ord-summary-grid {
    grid-template-columns: 1fr;
  }

  .x-ord-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .x-ord-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .x-ord-modal__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .x-ord-modal__header-right {
    width: 100%;
    justify-content: space-between;
  }
}

.x-modal-title-with-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.x-modal-title-with-help .modal-title {
  margin: 0;
  line-height: 1.2;
}

.x-modal-title-with-help .modal-title small {
  font-size: 13px;
  margin-top: 4px;
}

.x-help-btn--sm {
  width: 30px;
  height: 30px;
  min-width: 30px;
  margin-top: 2px;
}

.x-help-btn--sm i {
  font-size: 12px;
}

.x-mini-alerts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  justify-content: center;
}

.x-mini-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
  backdrop-filter: blur(6px);
}

/* ICON */
.x-mini-alert__icon {
  font-size: 13px;
}

/* TEXT */
.x-mini-alert__text {
  color: #e5e7eb;
}

/* WARNING (amarillo) */
.x-mini-alert--warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.x-mini-alert--warning2 {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.25);
  color: #fb923c;
}

.x-mini-alert--danger1 {
  background: rgba(107, 114, 128, 0.12);
  border: 1px solid rgba(107, 114, 128, 0.25);
  color: #d1d5db;
}

.x-mini-alert--warning:hover {
  background: rgba(245, 158, 11, 0.18);
}

/* ORANGE */
.x-mini-alert--orange {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.25);
  color: #fb923c;
}

.x-mini-alert--orange:hover {
  background: rgba(249, 115, 22, 0.18);
}

/* GRAY */
.x-mini-alert--gray {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5f5;
}

.x-mini-alert--gray:hover {
  background: rgba(156, 163, 175, 0.18);
}

/* RESPONSIVE */
@media (max-width:768px) {
  .x-mini-alerts {
    flex-direction: column;
    align-items: flex-start;
  }
}

.x-mini-alert--warning.has-pending {
  animation: xPulseApproval 1.9s ease-in-out infinite;
  box-shadow:
    0 0 0 0 rgba(245, 158, 11, .22),
    0 8px 18px rgba(0, 0, 0, .18);
}

@keyframes xPulseApproval {
  0% {
    transform: translateY(0);
    box-shadow:
      0 0 0 0 rgba(245, 158, 11, .20),
      0 8px 18px rgba(0, 0, 0, .18);
  }

  50% {
    transform: translateY(-1px);
    box-shadow:
      0 0 0 8px rgba(245, 158, 11, 0),
      0 10px 22px rgba(0, 0, 0, .22);
  }

  100% {
    transform: translateY(0);
    box-shadow:
      0 0 0 0 rgba(245, 158, 11, 0),
      0 8px 18px rgba(0, 0, 0, .18);
  }
}

.x-history-status--proceso {
  color: #60A5FA;
  background: rgba(96, 165, 250, .12);
  border: 1px solid rgba(96, 165, 250, .24);
}

.dtr-card-actions .dtr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dtr-card-actions .x-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dtr-card-actions .x-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dtr-card-actions .dtr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dtr-card-actions .x-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dtr-card-actions .x-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.x-edit-order-grid--tabs {
  display: grid !important;
  grid-template-columns: 4fr 4fr 4fr !important;
  gap: 16px !important;
  align-items: start !important;
}

/* Panels principales */
.x-edit-order-grid--tabs>.x-edit-tab-panel {
  display: none !important;
  min-width: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
}

.x-edit-order-grid--tabs[data-active-tab="orden"]>.x-edit-tab-panel[data-panel="orden"],
.x-edit-order-grid--tabs[data-active-tab="equipo"]>.x-edit-tab-panel[data-panel="equipo"],
.x-edit-order-grid--tabs[data-active-tab="evidencias"]>.x-edit-tab-panel[data-panel="evidencias"],
.x-edit-order-grid--tabs[data-active-tab="tecnico"]>.x-edit-tab-panel[data-panel="tecnico"],
.x-edit-order-grid--tabs[data-active-tab="checklist"]>.x-edit-tab-panel[data-panel="checklist"],
.x-edit-order-grid--tabs[data-active-tab="historial"]>.x-edit-tab-panel[data-panel="historial"] {
  display: block !important;
}

/* Columna 2 */
.x-edit-order-grid--tabs>.x-side-summary-card {
  display: flex !important;
  flex-direction: column !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
}

/* Columna 3 */
.x-edit-order-grid--tabs>.x-side-status-card {
  display: flex !important;
  flex-direction: column !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
}

/* Estado compacto */
.x-side-status-card .x-estado-actual-box {
  grid-template-columns: 1fr !important;
}

/* Acciones compactas */
.x-side-status-card .x-eo-actions-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 9px !important;
}

.x-side-status-card .x-eo-action-card {
  min-height: 58px !important;
  padding: 9px !important;
}

.x-side-status-card .x-eo-action-card__icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
}

.x-side-status-card .x-eo-action-card__text strong {
  font-size: 11.5px !important;
}

.x-side-status-card .x-eo-action-card__text small {
  font-size: 9.5px !important;
}

.x-side-status-card .x-eo-action-card--full {
  grid-column: 2 / 3 !important;
}

/* Responsive */
@media (max-width: 1400px) {
  .x-edit-order-grid--tabs {
    grid-template-columns: 1fr !important;
  }

  .x-edit-order-grid--tabs>.x-edit-tab-panel,
  .x-edit-order-grid--tabs>.x-side-summary-card,
  .x-edit-order-grid--tabs>.x-side-status-card {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

.x-edit-order-grid--tabs {
  display: grid !important;
  grid-template-columns: 5fr 4fr 3fr !important;
  gap: 16px !important;
  align-items: start !important;
}

/* Panels principales */
.x-edit-order-grid--tabs>.x-edit-tab-panel {
  display: none !important;
  min-width: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
}

.x-edit-order-grid--tabs[data-active-tab="orden"]>.x-edit-tab-panel[data-panel="orden"],
.x-edit-order-grid--tabs[data-active-tab="equipo"]>.x-edit-tab-panel[data-panel="equipo"],
.x-edit-order-grid--tabs[data-active-tab="evidencias"]>.x-edit-tab-panel[data-panel="evidencias"],
.x-edit-order-grid--tabs[data-active-tab="tecnico"]>.x-edit-tab-panel[data-panel="tecnico"],
.x-edit-order-grid--tabs[data-active-tab="checklist"]>.x-edit-tab-panel[data-panel="checklist"],
.x-edit-order-grid--tabs[data-active-tab="historial"]>.x-edit-tab-panel[data-panel="historial"] {
  display: block !important;
}

/* Columna 2 */
.x-edit-order-grid--tabs>.x-side-summary-card {
  display: flex !important;
  flex-direction: column !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
}

/* Columna 3 */
.x-edit-order-grid--tabs>.x-side-status-card {
  display: flex !important;
  flex-direction: column !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
}

/* Estado compacto */
.x-side-status-card .x-estado-actual-box {
  grid-template-columns: 1fr !important;
}

/* Acciones compactas */
.x-side-status-card .x-eo-actions-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
}

.x-side-status-card .x-eo-action-card {
  min-height: 58px !important;
  padding: 9px !important;
}

.x-side-status-card .x-eo-action-card__icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
}

.x-side-status-card .x-eo-action-card__text strong {
  font-size: 11.5px !important;
}

.x-side-status-card .x-eo-action-card__text small {
  font-size: 9.5px !important;
}

.x-side-status-card .x-eo-action-card--full {
  grid-column: 2 / 3 !important;
}

/* Responsive */
@media (max-width: 1400px) {
  .x-edit-order-grid--tabs {
    grid-template-columns: 1fr !important;
  }

  .x-edit-order-grid--tabs>.x-edit-tab-panel,
  .x-edit-order-grid--tabs>.x-side-summary-card,
  .x-edit-order-grid--tabs>.x-side-status-card {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

/* =============================================
   EDITAR ORDEN - PESTAÑAS ESTILO TAB PRO
============================================= */

.x-edit-tabs-v2 {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 0;
  padding: 0 10px;
  border-bottom: 1px solid rgba(159, 176, 208, .14);
  background: transparent;
  /* overflow-x: auto; */
  scrollbar-width: thin;
}

.x-edit-tabs-v2::-webkit-scrollbar {
  height: 6px;
}

.x-edit-tabs-v2::-webkit-scrollbar-thumb {
  background: rgba(159, 176, 208, .18);
  border-radius: 999px;
}

.x-edit-tab-v2 {
  position: relative;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(159, 176, 208, .12);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: rgba(6, 18, 37, .52);
  color: #8FA3C4;
  font-size: 12px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: .18s ease;
  white-space: nowrap;
  flex: 0 0 auto;
  margin-bottom: -1px;
}

.x-edit-tab-v2 i {
  font-size: 13px;
  opacity: .85;
}

.x-edit-tab-v2:hover {
  color: #DCE7FF;
  background: rgba(10, 31, 66, .74);
  border-color: rgba(96, 165, 250, .22);
}

.x-edit-tab-v2.is-active {
  color: #F5F7FB;
  background:
    radial-gradient(circle at top left, rgba(47, 107, 255, .16), transparent 38%),
    linear-gradient(180deg, rgba(10, 31, 66, .96), rgba(6, 18, 37, .96));
  border-color: rgba(96, 165, 250, .32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 -8px 22px rgba(47, 107, 255, .08);
}

.x-edit-tab-v2.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #2F6BFF, #22D3EE);
}

.x-edit-tab-v2.is-active i {
  color: #60A5FA;
  opacity: 1;
}

/* Contenedor del contenido debajo de las tabs */
.x-edit-order-grid--tabs {
  border-top: 0 !important;
  padding-top: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .x-edit-tabs-v2 {
    padding: 0 6px;
  }

  .x-edit-tab-v2 {
    min-height: 40px;
    padding: 0 13px;
    font-size: 11.5px;
  }
}

/* iPad / tablets */
@media (min-width: 768px) and (max-width: 1180px) {
  .x-edit-order-grid--tabs {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .x-edit-order-grid--tabs>.x-edit-tab-panel,
  .x-edit-order-grid--tabs>.x-side-summary-card,
  .x-edit-order-grid--tabs>.x-side-status-card {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
  }

  .x-edit-order-grid--tabs>.x-side-summary-card,
  .x-edit-order-grid--tabs>.x-side-status-card {
    display: flex !important;
  }
}

/* móvil */
@media (max-width: 767px) {
  .x-edit-order-grid--tabs {
    grid-template-columns: 1fr !important;
  }

  .x-edit-order-grid--tabs>.x-edit-tab-panel,
  .x-edit-order-grid--tabs>.x-side-summary-card,
  .x-edit-order-grid--tabs>.x-side-status-card {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .x-side-status-card .x-eo-actions-panel {
    grid-template-columns: 1fr !important;
  }
}

.x-side-status-card .x-eo-actions-panel {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.x-side-status-card .x-eo-action-card {
  min-height: 110px !important;
  border-radius: 18px !important;
  padding: 14px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}

.x-side-status-card .x-eo-action-card__icon {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 15px !important;
}

.x-side-status-card .x-eo-action-card__text {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  line-height: 1.2 !important;
}

.x-side-status-card .x-eo-action-card__text strong {
  font-size: 16px !important;
}

.x-side-status-card .x-eo-action-card__text small {
  font-size: 11px !important;
  opacity: .8;
}

.x-side-status-card .x-eo-action-card--full {
  grid-column: 1 / -1 !important;
  min-height: 64px !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
}

.x-side-status-card .x-eo-action-card {
  min-height: 86px !important;
  padding: 12px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 8px !important;
}

.x-side-status-card .x-eo-action-card__icon {
  margin: 0 auto !important;
}

.x-side-status-card .x-eo-action-card__text {
  width: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.x-side-status-card .x-eo-action-card__text strong,
.x-side-status-card .x-eo-action-card__text small {
  width: 100% !important;
  text-align: center !important;
}

.x-abono-item-pro__amount--with-icon {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.x-abono-method-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(159, 176, 208, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.x-abono-method-icon i {
  font-size: 14px;
}

/* Colores por método */
.x-abono-method-icon.x-pay-method--cash i {
  color: #22c55e;
}

.x-abono-method-icon.x-pay-method--card i {
  color: #60a5fa;
}

.x-abono-method-icon.x-pay-method--transfer i {
  color: #38bdf8;
}

.x-abono-method-icon.x-pay-method--zelle i {
  color: #a78bfa;
}

.x-abono-method-icon.x-pay-method--paypal i {
  color: #93c5fd;
}

.x-abono-method-icon.x-pay-method--mobile i {
  color: #2dd4bf;
}

.x-abono-method-icon.x-pay-method--mixed i {
  color: #f59e0b;
}

.x-abono-method-icon.x-pay-method--other i {
  color: #cbd5e1;
}

/* RECIBIDO EN HISTORIAL = ROJO */
.x-history-status--recibido {
  background: rgba(239, 68, 68, .16) !important;
  color: #FCA5A5 !important;
  border: 1px solid rgba(239, 68, 68, .28) !important;
}

.x-history-status--recibido i {
  color: #F87171 !important;
}

.x-select2-refacciones-dropdown .select2-results>.select2-results__options {
  max-height: 260px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.x-select2-refacciones-dropdown .select2-results>.select2-results__options::-webkit-scrollbar {
  width: 8px;
}

.x-select2-refacciones-dropdown .select2-results>.select2-results__options::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, .85);
  border-radius: 999px;
}

.x-select2-refacciones-dropdown .select2-results>.select2-results__options::-webkit-scrollbar-thumb {
  background: rgba(47, 107, 255, .75);
  border-radius: 999px;
}

.x-select2-refacciones-dropdown .select2-results>.select2-results__options::-webkit-scrollbar-thumb:hover {
  background: rgba(47, 107, 255, 1);
}

/* =============================================
   RESUMEN FINAL - CHECKLIST EN CARDS
============================================= */

.x-check-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  width: 100%;
}

.x-check-summary-card {
  min-height: 78px;
  padding: 12px 13px;
  border-radius: 15px;
  border: 1px solid rgba(159, 176, 208, .14);
  background: rgba(255, 255, 255, .025);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.x-check-summary-card__name {
  color: #f5f7fb;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.x-check-summary-card__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 750;
}

.x-check-summary-card__icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.x-check-summary-card.is-ok {
  border-color: rgba(16, 185, 129, .26);
  background: linear-gradient(180deg, rgba(16, 185, 129, .08), rgba(255, 255, 255, .02));
}

.x-check-summary-card.is-ok .x-check-summary-card__status,
.x-check-summary-card.is-ok .x-check-summary-card__icon {
  color: #34d399;
}

.x-check-summary-card.is-ok .x-check-summary-card__icon {
  background: rgba(16, 185, 129, .15);
}

.x-check-summary-card.is-bad {
  border-color: rgba(239, 68, 68, .26);
  background: linear-gradient(180deg, rgba(239, 68, 68, .08), rgba(255, 255, 255, .02));
}

.x-check-summary-card.is-bad .x-check-summary-card__status,
.x-check-summary-card.is-bad .x-check-summary-card__icon {
  color: #f87171;
}

.x-check-summary-card.is-bad .x-check-summary-card__icon {
  background: rgba(239, 68, 68, .15);
}

.x-check-summary-card.is-neutral {
  border-color: rgba(148, 163, 184, .16);
  background: rgba(255, 255, 255, .025);
}

.x-check-summary-card.is-neutral .x-check-summary-card__status,
.x-check-summary-card.is-neutral .x-check-summary-card__icon {
  color: #cbd5e1;
}

.x-check-summary-card.is-neutral .x-check-summary-card__icon {
  background: rgba(148, 163, 184, .14);
}

.x-check-summary-empty {
  min-height: 90px;
  border-radius: 15px;
  border: 1px dashed rgba(159, 176, 208, .18);
  background: rgba(255, 255, 255, .02);
  color: #9fb0d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* =============================================
   PASO 7 - RESUMEN FINAL PRO
============================================= */

.x-review-final {
  display: grid;
  gap: 18px;
}

.x-review-hero {
  border: 1px solid rgba(96, 165, 250, .18);
  border-radius: 22px;
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(47, 107, 255, .16), transparent 32%),
    linear-gradient(180deg, rgba(9, 23, 51, .96), rgba(5, 13, 31, .98));
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.x-review-eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.x-review-hero h3 {
  margin: 0;
  color: #f5f7fb;
  font-size: 22px;
  font-weight: 900;
}

.x-review-hero p {
  margin: 6px 0 0;
  color: #9fb0d0;
  font-size: 13px;
  font-weight: 600;
}

.x-review-hero__money {
  min-width: 220px;
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(159, 176, 208, .12);
  text-align: right;
}

.x-review-hero__money span {
  display: block;
  color: #9fb0d0;
  font-size: 12px;
  font-weight: 750;
}

.x-review-hero__money strong {
  display: block;
  margin-top: 4px;
  color: #60a5fa;
  font-size: 28px;
  font-weight: 950;
}

.x-review-hero__money small {
  color: #cbd5e1;
  font-weight: 700;
}

.x-review-hero__money small b {
  color: #34d399;
}

.x-review-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.x-review-kpi {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(159, 176, 208, .12);
}

.x-review-kpi span {
  display: block;
  color: #9fb0d0;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.x-review-kpi strong {
  color: #f5f7fb;
  font-size: 18px;
  font-weight: 950;
}

.x-review-kpi--success strong {
  color: #34d399;
}

.x-review-kpi--warning strong {
  color: #fb923c;
}

.x-review-progress {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(159, 176, 208, .12);
}

.x-review-progress__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 10px;
}

.x-review-progress__bar {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, .18);
}

.x-review-progress__bar>div {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
}

.x-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.x-review-card {
  border-radius: 20px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(12, 26, 56, .78), rgba(6, 17, 38, .92));
  border: 1px solid rgba(159, 176, 208, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
  min-height: 150px;
}

.x-review-card--wide {
  grid-column: span 3;
}

.x-review-card__head {
  padding-bottom: 11px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(159, 176, 208, .10);
}

.x-review-card__head--between {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.x-review-card__head h5 {
  margin: 0;
  color: #f5f7fb;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.x-review-card__head i {
  color: #93c5fd;
}

.x-review-chip {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(47, 107, 255, .12);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, .18);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.x-review-info {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 650;
}

.x-review-info div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(159, 176, 208, .06);
  padding-bottom: 6px;
}

.x-review-info div:last-child {
  border-bottom: 0;
}

.x-review-info strong {
  color: #f5f7fb;
  font-weight: 850;
}

.x-review-info--text div {
  display: block;
  line-height: 1.45;
}

.x-review-list {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 650;
  display: grid;
  gap: 8px;
}

.x-review-list div {
  border-radius: 13px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(159, 176, 208, .08);
}

.x-resumen-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(159, 176, 208, .08);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.x-resumen-row strong {
  color: #f5f7fb;
  font-weight: 900;
}

.x-total-row strong {
  color: #60a5fa;
}

.x-saldo-row strong {
  color: #34d399;
}

.x-review-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.x-review-stat {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 850;
  border: 1px solid transparent;
}

.x-review-stat.is-ok {
  color: #34d399;
  background: rgba(16, 185, 129, .10);
  border-color: rgba(16, 185, 129, .18);
}

.x-review-stat.is-bad {
  color: #f87171;
  background: rgba(239, 68, 68, .10);
  border-color: rgba(239, 68, 68, .18);
}

.x-review-stat.is-neutral {
  color: #cbd5e1;
  background: rgba(148, 163, 184, .10);
  border-color: rgba(148, 163, 184, .16);
}

.x-check-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  width: 100%;
}

.x-check-summary-card {
  min-height: 78px;
  padding: 12px 13px;
  border-radius: 15px;
  border: 1px solid rgba(159, 176, 208, .14);
  background: rgba(255, 255, 255, .025);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.x-check-summary-card__name {
  color: #f5f7fb;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.x-check-summary-card__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 750;
}

.x-check-summary-card__icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.x-check-summary-card.is-ok {
  border-color: rgba(16, 185, 129, .26);
  background: linear-gradient(180deg, rgba(16, 185, 129, .08), rgba(255, 255, 255, .02));
}

.x-check-summary-card.is-ok .x-check-summary-card__status,
.x-check-summary-card.is-ok .x-check-summary-card__icon {
  color: #34d399;
}

.x-check-summary-card.is-ok .x-check-summary-card__icon {
  background: rgba(16, 185, 129, .15);
}

.x-check-summary-card.is-bad {
  border-color: rgba(239, 68, 68, .26);
  background: linear-gradient(180deg, rgba(239, 68, 68, .08), rgba(255, 255, 255, .02));
}

.x-check-summary-card.is-bad .x-check-summary-card__status,
.x-check-summary-card.is-bad .x-check-summary-card__icon {
  color: #f87171;
}

.x-check-summary-card.is-bad .x-check-summary-card__icon {
  background: rgba(239, 68, 68, .15);
}

.x-check-summary-card.is-neutral {
  border-color: rgba(148, 163, 184, .16);
  background: rgba(255, 255, 255, .025);
}

.x-check-summary-card.is-neutral .x-check-summary-card__status,
.x-check-summary-card.is-neutral .x-check-summary-card__icon {
  color: #cbd5e1;
}

.x-check-summary-card.is-neutral .x-check-summary-card__icon {
  background: rgba(148, 163, 184, .14);
}

.x-check-summary-empty {
  min-height: 90px;
  border-radius: 15px;
  border: 1px dashed rgba(159, 176, 208, .18);
  background: rgba(255, 255, 255, .02);
  color: #9fb0d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.x-review-card--signature {
  min-height: 220px;
}

.x-review-signature-box {
  min-height: 160px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .025);
  border: 1px dashed rgba(159, 176, 208, .18);
  overflow: hidden;
}

/* Responsive */
@media (max-width: 991px) {
  .x-review-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .x-review-hero__money {
    text-align: left;
    min-width: 0;
  }

  .x-review-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .x-review-grid {
    grid-template-columns: 1fr;
  }

  .x-review-card--wide {
    grid-column: span 1;
  }
}

@media (max-width: 520px) {
  .x-review-kpis {
    grid-template-columns: 1fr;
  }
}

.x-review-signature-box {
  min-height: 230px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .025);
  border: 1px dashed rgba(159, 176, 208, .18);
  padding: 14px;
}

.x-review-signature-box .x-signature-panel {
  height: 100%;
}

.x-review-signature-box .x-signature-panel__hint {
  color: #9fb0d0;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.x-review-signature-box .x-signature-wrap {
  min-height: 150px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(159, 176, 208, .14);
  overflow: hidden;
}

.x-review-signature-box #sig {
  min-height: 150px;
  width: 100%;
}

.x-review-signature-box canvas {
  width: 100% !important;
  height: 150px !important;
}

.x-review-signature-box .x-signature-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* =============================================
   MODAL NUEVA ORDEN - MÁS ESPACIO ÚTIL
============================================= */

#modalNuevaOrden .modal-dialog {
  max-width: min(1280px, calc(100vw - 40px)) !important;
  width: min(1280px, calc(100vw - 40px)) !important;
  height: calc(100vh - 32px) !important;
  margin: 16px auto !important;
}

#modalNuevaOrden .modal-content {
  height: 100% !important;
  max-height: calc(100vh - 32px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#modalNuevaOrden .modal-header {
  flex: 0 0 auto !important;
}

#modalNuevaOrden .x-order-steps-wrap {
  flex: 0 0 auto !important;
}

#modalNuevaOrden .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding-bottom: 110px !important;
}

#modalNuevaOrden .modal-footer,
#modalNuevaOrden .x-order-footer {
  flex: 0 0 auto !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 20 !important;
  background: rgba(6, 18, 37, .98) !important;
  border-top: 1px solid rgba(159, 176, 208, .14) !important;
}

.x-save-order-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.x-save-order-loader__box {
  width: min(420px, 100%);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 22px;
  padding: 28px;
  color: #f8fafc;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.x-save-order-loader__spinner {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 999px;
  border: 4px solid rgba(148, 163, 184, 0.22);
  border-top-color: #3b82f6;
  animation: xSaveOrderSpin 0.85s linear infinite;
}

.x-save-order-loader__content h4 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
}

.x-save-order-loader__content p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
}

.x-save-order-loader__bar {
  width: 100%;
  height: 7px;
  margin-top: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
}

.x-save-order-loader__bar span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #22c55e);
  animation: xSaveOrderBar 1.25s ease-in-out infinite;
}

@keyframes xSaveOrderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes xSaveOrderBar {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(230%);
  }
}