:root {
  --x-bg: #07111f;
  --x-bg-soft: #0b1730;
  --x-panel: rgba(8, 18, 38, 0.88);
  --x-panel-2: rgba(10, 22, 45, 0.95);
  --x-border: rgba(255, 255, 255, .07);
  --x-text: #e8eefc;
  --x-muted: #8fa3c7;
  --x-primary: #3b82f6;
  --x-success: #10b981;
  --x-warning: #f59e0b;
  --x-danger: #ef4444;
  --x-purple: #8b5cf6;
  --x-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  --x-radius: 18px;
}

.x-products-page {
  padding: 18px;
  color: var(--x-text);
}

.x-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.x-page-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.x-page-subtitle {
  margin: 6px 0 0;
  color: var(--x-muted);
  font-size: 14px;
}

.x-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.x-btn {
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: .2s ease;
  box-shadow: none !important;
}

.x-btn:hover {
  transform: translateY(-1px);
}

.x-btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
}

.x-btn-secondary {
  background: rgba(59, 130, 246, .12);
  border-color: rgba(59, 130, 246, .22);
  color: #cfe0ff;
}

.x-btn-ghost {
  background: rgba(255, 255, 255, .04);
  border-color: var(--x-border);
  color: #dbe7ff;
}

.x-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.x-kpi-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)),
    linear-gradient(135deg, rgba(18, 39, 82, .95), rgba(7, 15, 30, .98));
  border: 1px solid var(--x-border);
  border-radius: 18px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--x-shadow);
  min-height: 145px;
}

.x-kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  filter: blur(8px);
}

.x-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.x-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.x-kpi-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #dfe9ff;
}

.x-kpi-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.x-kpi-label {
  font-size: 14px;
  font-weight: 700;
  margin-top: 6px;
  color: #dce7fb;
}

.x-kpi-meta {
  font-size: 12px;
  color: var(--x-muted);
  margin-top: 8px;
}

.x-kpi-blue .x-kpi-icon {
  background: rgba(59, 130, 246, .18);
  color: #7db3ff;
}

.x-kpi-orange .x-kpi-icon {
  background: rgba(249, 115, 22, .18);
  color: #ffb26c;
}

.x-kpi-yellow .x-kpi-icon {
  background: rgba(245, 158, 11, .18);
  color: #ffd166;
}

.x-kpi-red .x-kpi-icon {
  background: rgba(239, 68, 68, .18);
  color: #ff8a8a;
}

.x-kpi-green .x-kpi-icon {
  background: rgba(16, 185, 129, .18);
  color: #6ee7b7;
}

.x-kpi-purple .x-kpi-icon {
  background: rgba(139, 92, 246, .18);
  color: #c4b5fd;
}

.x-panel {
  background: linear-gradient(180deg, rgba(10, 20, 40, .94), rgba(8, 16, 32, .96));
  border: 1px solid var(--x-border);
  border-radius: var(--x-radius);
  box-shadow: var(--x-shadow);
  margin-bottom: 18px;
  overflow: visible;
}

.x-toolbar-panel {
  padding: 14px;
}

.x-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.x-toolbar-left {
  flex: 1 1 280px;
}

.x-toolbar-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.x-search-box {
  position: relative;
  width: 100%;
}

.x-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8fa3c7;
}

.x-search-box input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--x-border);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  padding: 0 14px 0 40px;
  outline: none;
}

.x-search-box input::placeholder {
  color: #7e92b6;
}

.x-filter {
  min-width: 140px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--x-border);
  background: rgba(255, 255, 255, .04);
  color: #dce7fb;
  padding: 0 12px;
  outline: none;
}

.x-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px 0;
  flex-wrap: wrap;
}

.x-panel-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.x-panel-head p {
  margin: 4px 0 0;
  color: var(--x-muted);
  font-size: 13px;
}

.x-table-wrap {
  padding: 18px;
  overflow: visible;
}

.x-empty-state {
  min-height: 320px;
  border: 1px dashed rgba(255, 255, 255, .10);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
}

.x-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  color: #7db3ff;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .18);
}

.x-empty-state h4 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
}

.x-empty-state p {
  max-width: 560px;
  color: var(--x-muted);
  margin: 0 0 18px;
  line-height: 1.6;
}

.x-alert-list {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.x-alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}

.x-alert-item i {
  font-size: 16px;
}

.x-alert-success {
  background: rgba(16, 185, 129, .10);
  border-color: rgba(16, 185, 129, .18);
  color: #baf5df;
}

.x-alert-warning {
  background: rgba(245, 158, 11, .10);
  border-color: rgba(245, 158, 11, .18);
  color: #ffe2a5;
}

.x-alert-danger {
  background: rgba(239, 68, 68, .10);
  border-color: rgba(239, 68, 68, .18);
  color: #ffc1c1;
}

.x-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.x-widget-placeholder {
  padding: 18px;
}

.x-widget-message {
  min-height: 240px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, .10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--x-muted);
  background: rgba(255, 255, 255, .02);
  text-align: center;
  padding: 20px;
}

@media (max-width: 1600px) {
  .x-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .x-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .x-analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .x-kpi-grid {
    grid-template-columns: 1fr;
  }

  .x-page-title {
    font-size: 22px;
  }

  .x-empty-state {
    min-height: 260px;
  }
}


.x-toolbar-panel {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01)),
    linear-gradient(135deg, rgba(9, 22, 48, .95), rgba(5, 12, 24, .98));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.x-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.x-toolbar__left {
  flex: 1 1 280px;
  min-width: 240px;
}

.x-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.x-toolbar__search {
  position: relative;
  width: 100%;
}

.x-toolbar__search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8ea2c8;
  font-size: 14px;
  pointer-events: none;
}

.x-toolbar__search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .04);
  color: #eef4ff;
  outline: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.x-toolbar__search input::placeholder {
  color: #7f93ba;
}

.x-toolbar__search input:focus {
  border-color: rgba(59, 130, 246, .28);
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .10);
}

.x-toolbar__select {
  min-width: 145px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .04);
  color: #e7efff;
  outline: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.x-toolbar__select:focus {
  border-color: rgba(59, 130, 246, .28);
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .10);
}

/* BOTONES */
.x-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.x-btn:hover {
  transform: translateY(-1px);
}

.x-btn--ghost {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .08);
  color: #eaf1ff;
}

.x-btn--ghost:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .12);
  color: #fff;
}

.x-btn--secondary {
  background: rgba(59, 130, 246, .12);
  border-color: rgba(59, 130, 246, .18);
  color: #cfe0ff;
}

.x-btn--secondary:hover {
  background: rgba(59, 130, 246, .18);
  border-color: rgba(59, 130, 246, .24);
  color: #fff;
}

.x-btn--primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: rgba(59, 130, 246, .28);
  color: #fff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .28);
}

.x-btn--primary:hover {
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, .34);
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .x-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .x-toolbar__left,
  .x-toolbar__right {
    width: 100%;
  }

  .x-toolbar__right {
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .x-toolbar__right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .x-toolbar__select,
  .x-btn {
    width: 100%;
    min-width: unset;
  }
}


.x-table-products {
  color: #eaf1ff;
  border-collapse: separate;
  border-spacing: 0;
}

.x-table-products thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 700;
  color: #9fb3d9;
  border: none;
  padding: 14px;
  background: rgba(255, 255, 255, .02);
}

.x-table-products tbody tr {
  background: rgba(255, 255, 255, .01);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  transition: .2s ease;
}

.x-table-products tbody tr:hover {
  background: rgba(59, 130, 246, .06);
}

.x-table-products td {
  padding: 14px;
  vertical-align: middle;
  border: none;
}

/* IMAGEN */
.x-product-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}

.x-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* NOMBRE */
.x-product-name {
  font-weight: 700;
  color: #fff;
}

.x-product-sub {
  font-size: 12px;
  color: #8ea2c8;
}

/* STOCK */
.x-stock {
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
}

.x-stock--good {
  background: rgba(16, 185, 129, .15);
  color: #6ee7b7;
}

.x-stock--low {
  background: rgba(245, 158, 11, .15);
  color: #ffd166;
}

.x-stock--out {
  background: rgba(239, 68, 68, .15);
  color: #ff9a9a;
}

/* BADGES */
.x-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.x-badge-success {
  background: rgba(16, 185, 129, .15);
  color: #6ee7b7;
}

.x-badge-warning {
  background: rgba(245, 158, 11, .15);
  color: #ffd166;
}

.x-badge-danger {
  background: rgba(239, 68, 68, .15);
  color: #ff9a9a;
}

.x-badge-muted {
  background: rgba(148, 163, 184, .15);
  color: #cbd5f5;
}

/* ACCIONES */
.x-actions {
  display: flex;
  gap: 6px;
}

.x-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .05);
  color: #dce7fb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s;
}

.x-action-btn:hover {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}

.x-action-edit:hover {
  background: rgba(59, 130, 246, .2);
}

.x-action-kardex:hover {
  background: rgba(16, 185, 129, .2);
}

/* DROPDOWN */
.x-dropdown {
  background: #0b1730;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
}

.x-dropdown .dropdown-item {
  color: #eaf1ff;
}

.x-dropdown .dropdown-item:hover {
  background: rgba(255, 255, 255, .05);
}

.x-table-products {
  width: 100%;
  color: #eaf1ff;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.x-table-products thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .45px;
  font-weight: 800;
  color: #b8c7e6;
  padding: 16px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.x-table-products tbody tr {
  background: rgba(255, 255, 255, .018);
  transition: all .2s ease;
}

.x-table-products tbody tr:hover {
  background: rgba(59, 130, 246, .08);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .08);
}

.x-table-products tbody td {
  padding: 16px 14px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

/* imagen */
.x-product-img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.x-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* nombre */
.x-product-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 4px;
}

.x-product-sub {
  font-size: 12px;
  color: #8ea2c8;
  line-height: 1.35;
}

/* stock */
.x-stock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 10px 15px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 16px;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.x-stock--good {
  background: rgba(16, 185, 129, .18);
  color: #7bf0c3;
  border-color: rgba(16, 185, 129, .20);
}

.x-stock--low {
  background: rgba(245, 158, 11, .18);
  color: #ffd977;
  border-color: rgba(245, 158, 11, .22);
}

.x-stock--out {
  background: rgba(239, 68, 68, .18);
  color: #ffaaaa;
  border-color: rgba(239, 68, 68, .22);
}

/* badges */
.x-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .2px;
  border: 1px solid transparent;
}

.x-badge-success {
  background: rgba(16, 185, 129, .16);
  color: #78efc4;
  border-color: rgba(16, 185, 129, .20);
}

.x-badge-warning {
  background: rgba(245, 158, 11, .16);
  color: #ffd977;
  border-color: rgba(245, 158, 11, .20);
}

.x-badge-danger {
  background: rgba(239, 68, 68, .16);
  color: #ffaaaa;
  border-color: rgba(239, 68, 68, .20);
}

.x-badge-muted {
  background: rgba(148, 163, 184, .16);
  color: #d8e1f1;
  border-color: rgba(148, 163, 184, .18);
}

/* acciones */
.x-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.x-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .05);
  color: #dce7fb;
  cursor: pointer;
  transition: all .2s ease;
}

.x-action-btn:hover {
  transform: translateY(-1px);
}

/* botón editar */
.x-action-edit {
  background: rgba(59, 130, 246, .12);
  border-color: rgba(59, 130, 246, .18);
  color: #8db9ff;
}

.x-action-edit:hover {
  background: rgba(59, 130, 246, .20);
  color: #ffffff;
}

/* botón kardex */
.x-action-kardex {
  background: rgba(16, 185, 129, .12);
  border-color: rgba(16, 185, 129, .18);
  color: #79efc4;
}

.x-action-kardex:hover {
  background: rgba(16, 185, 129, .20);
  color: #ffffff;
}

/* botón más */
.x-action-more {
  background: rgba(148, 163, 184, .10);
  border-color: rgba(148, 163, 184, .16);
  color: #d4ddec;
}

.x-action-more:hover {
  background: rgba(148, 163, 184, .18);
  color: #ffffff;
}

/* dropdown */
.x-dropdown {
  background: #0b1730;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .30);
}

.x-dropdown .dropdown-item {
  color: #eaf1ff;
  font-size: 13px;
  padding: 10px 14px;
}

.x-dropdown .dropdown-item:hover {
  background: rgba(255, 255, 255, .05);
  color: #fff;
}

.x-status-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.x-status-sub {
  font-size: 11px;
  color: #8ea2c8;
  line-height: 1.2;
  text-align: center;
}

.x-price {
  font-weight: 700;
  color: #eaf1ff;
  white-space: nowrap;
}


.x-modal {
  background: linear-gradient(180deg, rgba(10, 20, 40, .98), rgba(7, 14, 28, .99));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  color: #eef4ff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  overflow: hidden;
}

.x-modal__header {
  background: rgba(255, 255, 255, .03);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  color: #fff;
  padding: 16px 20px;
}

.x-modal__header .modal-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.x-modal__close {
  color: #fff;
  opacity: .85;
  text-shadow: none;
}

.x-modal__close:hover {
  color: #fff;
  opacity: 1;
}

.x-modal__body {
  padding: 18px;
}

.x-modal__footer {
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .02);
  padding: 14px 18px;
}

.x-label {
  font-size: 13px;
  font-weight: 700;
  color: #dce7fb;
  margin-bottom: 8px;
  display: block;
}

.x-input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: #eef4ff;
}

.x-input:focus {
  border-color: rgba(59, 130, 246, .28);
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .10);
  color: #fff;
}

.x-input[readonly] {
  background: rgba(255, 255, 255, .03);
  color: #b9c8e6;
}

.x-panel-mini {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 16px;
}

.x-section-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

.x-help-text {
  color: #8ea2c8;
  font-size: 12px;
}

.x-image-upload img {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.x-input-group {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, .35);
  background: rgba(8, 18, 38, .92);
  overflow: hidden;
  transition: all .2s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
}

.x-input-group:focus-within {
  border-color: rgba(59, 130, 246, .70);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.x-input-icon {
  width: 48px;
  min-width: 48px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d7e6ff;
  background: rgba(255, 255, 255, .03);
  border-right: 1px solid rgba(255, 255, 255, .06);
  font-size: 14px;
}

.x-input-group .x-input {
  flex: 1;
  height: 46px;
  border: none !important;
  background: transparent !important;
  color: #eef4ff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 14px;
}

.x-input-group .x-input::placeholder {
  color: #8ea2c8;
}

.x-input-group .x-input:focus {
  outline: none;
}

.previsualizarProducto,
.previsualizarEditarProducto {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  transition: all .25s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}

.previsualizarProducto:hover,
.previsualizarEditarProducto:hover {
  transform: scale(1.13);
}

.x-image-upload input[type="file"] {
  margin-top: 10px;
  color: #9fb3d9;
}

.x-kardex-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid transparent;
}

.x-kardex-badge--blue {
  background: rgba(59, 130, 246, .16);
  color: #8db9ff;
  border-color: rgba(59, 130, 246, .18);
}

.x-kardex-badge--green {
  background: rgba(16, 185, 129, .16);
  color: #78efc4;
  border-color: rgba(16, 185, 129, .18);
}

.x-kardex-badge--red {
  background: rgba(239, 68, 68, .16);
  color: #ffaaaa;
  border-color: rgba(239, 68, 68, .18);
}

.x-kardex-badge--yellow {
  background: rgba(245, 158, 11, .16);
  color: #ffd977;
  border-color: rgba(245, 158, 11, .18);
}

.x-kardex-qty-in {
  font-weight: 800;
  color: #78efc4;
}

.x-kardex-qty-out {
  font-weight: 800;
  color: #ffaaaa;
}

.x-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* BOTON BASE */
.x-action-btn {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: #cfd8ff;
  transition: .2s ease;
  cursor: pointer;
}

/* HOVER GENERAL */
.x-action-btn:hover {
  transform: translateY(-2px);
}

/* EDITAR */
.x-action-edit:hover {
  background: rgba(59, 130, 246, .15);
  color: #8db9ff;
  border-color: rgba(59, 130, 246, .3);
}

/* KARDEX */
.x-action-kardex:hover {
  background: rgba(16, 185, 129, .15);
  color: #78efc4;
  border-color: rgba(16, 185, 129, .3);
}

/* STOCK */
.x-action-stock:hover {
  background: rgba(245, 158, 11, .15);
  color: #ffd977;
  border-color: rgba(245, 158, 11, .3);
}

/* DUPLICAR */
.x-action-duplicate:hover {
  background: rgba(139, 92, 246, .15);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, .3);
}

/* DELETE */
.x-action-delete:hover {
  background: rgba(239, 68, 68, .15);
  color: #ffaaaa;
  border-color: rgba(239, 68, 68, .3);
}


.x-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.x-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.x-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, .15);
  border-radius: 50px;
  transition: .3s;
}

.x-slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: .3s;
}

.x-switch input:checked+.x-slider {
  background: #22c55e;
}

.x-switch input:checked+.x-slider:before {
  transform: translateX(20px);
}

.x-status-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.x-status-text {
  font-size: 11px;
  opacity: .7;
}

.x-product-card__price,
td,
.stat-value {
  font-variant-numeric: tabular-nums;
}

.x-cardFiltroProducto,
.x-alertFiltroProducto {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.x-cardFiltroProducto:hover,
.x-alertFiltroProducto:hover {
  transform: translateY(-2px);
}

.x-cardFiltroProducto.is-active,
.x-alertFiltroProducto.is-active {
  box-shadow: 0 0 0 2px rgba(76, 132, 255, .65), 0 14px 30px rgba(0, 0, 0, .24);
  border-color: rgba(76, 132, 255, .75) !important;
}

.x-widget-body {
  padding: 16px 18px 18px;
}

.x-mini-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.x-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .05);
}

.x-mini-row__main {
  min-width: 0;
  flex: 1;
}

.x-mini-row__title {
  color: #eef4ff;
  font-weight: 600;
  line-height: 1.2;
}

.x-mini-row__sub {
  color: rgba(230, 238, 255, .62);
  font-size: .85rem;
  margin-top: 4px;
}

.x-mini-row__meta {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.x-widget-message {
  padding: 24px 10px;
  text-align: center;
  color: rgba(230, 238, 255, .55);
}

.x-rpt-pdf-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 18, 40, 0.92);
  z-index: 30;
  backdrop-filter: blur(4px);
}

.x-rpt-pdf-loader__box {
  width: 320px;
  max-width: 86%;
  text-align: center;
  color: #fff;
}

.x-rpt-pdf-loader__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #f8fafc;
}

.x-rpt-pdf-loader__percent {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 14px;
  color: #ffffff;
}

.x-rpt-pdf-loader__progress {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, .14);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
}

.x-rpt-pdf-loader__bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #22c55e);
  border-radius: 999px;
  transition: width .25s ease;
}

.x-rpt-pdf-loader__subtext {
  margin-top: 12px;
  font-size: 13px;
  color: #cbd5e1;
}

.x-alert-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  justify-content: center;
}

.x-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  /* 🔥 evita que se bajen */
}

.x-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5f5;
  transition: all .18s ease;
  padding: 0;
  flex: 0 0 auto;
  /* 🔥 clave */
}

.x-action-btn i {
  font-size: 17px;
}

/* hover pro */
.x-action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 41, 59, 0.95);
  color: #fff;
}

/* colores por tipo */
.x-action-edit:hover {
  border-color: rgba(59, 130, 246, .6);
}

.x-action-kardex:hover {
  border-color: rgba(16, 185, 129, .6);
}

.x-action-stock:hover {
  border-color: rgba(234, 179, 8, .6);
}

.x-action-transfer:hover {
  border-color: rgba(168, 85, 247, .6);
}

.x-action-duplicate:hover {
  border-color: rgba(14, 165, 233, .6);
}

.x-action-delete {
  /* color: #fca5a5; */
}

.x-action-delete:hover {
  border-color: rgba(239, 68, 68, .6);
  background: rgba(127, 29, 29, .35);
}

.x-action-edit:hover {
  border-color: #3b82f6;
}

.x-action-stock:hover {
  border-color: #f59e0b;
}

.x-action-transfer:hover {
  border-color: #8b5cf6;
}

.x-action-print:hover {
  border-color: #22c55e;
}

.x-action-duplicate:hover {
  border-color: #06b6d4;
}

/* .x-action-delete {
  color: #fca5a5;
} */

.x-action-delete:hover {
  /* border-color: #ef4444; */
  background: rgba(127, 29, 29, .35);
}

.btnQuitarImagenNueva {
  display: none;
}

.btnQuitarImagenEditar {
  display: none;
}

.previsualizarProducto,
.previsualizarEditarProducto {
  width: 180px;
  height: 180px;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .25);
  box-shadow: 0 14px 35px rgba(0, 0, 0, .22);
}

.x-file-upload {
  margin: 14px auto 8px;
  width: fit-content;
  min-width: 180px;
  height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(96, 165, 250, .25);
  color: #dbeafe;
  font-weight: 700;
  font-size: 13px;
  transition: .18s ease;
}

.x-file-upload:hover {
  background: rgba(59, 130, 246, .2);
  border-color: rgba(96, 165, 250, .55);
  transform: translateY(-1px);
}

.x-file-upload input {
  display: none;
}

.btnQuitarImagenNueva,
.btnQuitarImagenEditar {
  margin-top: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 13px;
}

.x-help-text {
  color: rgba(203, 213, 225, .62);
  font-size: 12px;
}