/* =========================================================
   WIRTZ HUB · ENTIDADES · LISTAS DE PRECIOS
   CSS COMPLETO

   Incluye:
   - Página principal
   - Encabezado
   - Métricas
   - Filtros
   - Tabla principal
   - Detalle de lista
   - Productos
   - Clientes asignados
   - Modales
   - Importación CSV
   - Formularios
   - Toast
   - Modo oscuro
   - Responsive
   ========================================================= */

/* =========================================================
   VARIABLES LOCALES
   ========================================================= */

.listas-precios-page,
.listas-precios-modal {
  --lp-bg: #ffffff;
  --lp-bg-soft: #f8fafc;
  --lp-bg-muted: #f1f5f9;
  --lp-bg-hover: #f6f7f9;

  --lp-text: #111827;
  --lp-text-soft: #334155;
  --lp-muted: #64748b;
  --lp-muted-2: #94a3b8;

  --lp-line: rgba(15, 23, 42, 0.11);
  --lp-line-soft: rgba(15, 23, 42, 0.07);
  --lp-line-strong: rgba(15, 23, 42, 0.2);

  --lp-primary: #111827;
  --lp-primary-hover: #1f2937;

  --lp-success: #15803d;
  --lp-success-bg: rgba(21, 128, 61, 0.08);
  --lp-success-line: rgba(21, 128, 61, 0.25);

  --lp-warning: #b45309;
  --lp-warning-bg: rgba(180, 83, 9, 0.08);
  --lp-warning-line: rgba(180, 83, 9, 0.25);

  --lp-danger: #b91c1c;
  --lp-danger-bg: rgba(185, 28, 28, 0.08);
  --lp-danger-line: rgba(185, 28, 28, 0.25);

  --lp-radius-sm: 8px;
  --lp-radius-md: 12px;
  --lp-radius-lg: 16px;

  --lp-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 10px 28px rgba(15, 23, 42, 0.045);

  --lp-shadow-modal:
    0 24px 70px rgba(15, 23, 42, 0.18);

  --lp-transition: 160ms ease;
}

html[data-theme="dark"] .listas-precios-page,
html[data-theme="dark"] .listas-precios-modal {
  --lp-bg: #090909;
  --lp-bg-soft: #111111;
  --lp-bg-muted: #171717;
  --lp-bg-hover: #141414;

  --lp-text: #f8fafc;
  --lp-text-soft: #d4d4d8;
  --lp-muted: #a1a1aa;
  --lp-muted-2: #71717a;

  --lp-line: rgba(255, 255, 255, 0.11);
  --lp-line-soft: rgba(255, 255, 255, 0.07);
  --lp-line-strong: rgba(255, 255, 255, 0.2);

  --lp-primary: #f8fafc;
  --lp-primary-hover: #e5e7eb;

  --lp-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 12px 34px rgba(0, 0, 0, 0.32);

  --lp-shadow-modal:
    0 30px 80px rgba(0, 0, 0, 0.55);
}

/* =========================================================
   RESET LOCAL
   ========================================================= */

.listas-precios-page,
.listas-precios-page *,
.listas-precios-modal,
.listas-precios-modal *,
.listas-precios-toast {
  box-sizing: border-box;

  font-family:
    "ATF Franklin Gothic",
    "Franklin Gothic Medium",
    "Arial Narrow",
    Arial,
    sans-serif;
}

/* =========================================================
   PÁGINA
   ========================================================= */

.listas-precios-page {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  color: var(--lp-text);

  animation: listasPreciosPageIn 220ms ease both;
}

/* =========================================================
   CONTENEDORES BASE
   ========================================================= */

.listas-precios-head,
.listas-precios-metrics,
.listas-precios-panel,
.listas-precios-modal__card {
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius-lg);

  background: var(--lp-bg);

  box-shadow: var(--lp-shadow);
}

/* =========================================================
   ENCABEZADO
   ========================================================= */

.listas-precios-head {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 14px;

  min-height: 78px;
  padding: 14px;
}

.listas-precios-brand {
  display: flex;
  align-items: center;
  gap: 11px;

  min-width: 0;
}

.listas-precios-brand__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 40px;
  height: 40px;

  border: 1px solid var(--lp-line);
  border-radius: 12px;

  background: var(--lp-bg-soft);

  color: var(--lp-text);
}

.listas-precios-brand__icon .icon {
  width: 18px;
  height: 18px;

  stroke-width: 2.15;
}

.listas-precios-brand > div {
  min-width: 0;
}

.listas-precios-brand h2 {
  margin: 0;

  color: var(--lp-text);

  font-size: clamp(22px, 2vw, 28px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.045em;
}

.listas-precios-brand p {
  margin: 5px 0 0;

  color: var(--lp-muted);

  font-size: 10px;
  font-weight: 720;
  line-height: 1.4;
}

.listas-precios-head-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

/* =========================================================
   BOTONES
   ========================================================= */

.listas-precios-btn,
.listas-precios-icon-btn,
.listas-precios-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  min-height: 34px;
  padding: 8px 11px;

  border: 1px solid var(--lp-line);
  border-radius: 9px;

  background: var(--lp-bg);

  color: var(--lp-text);

  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;

  cursor: pointer;
  outline: none;

  transition:
    background var(--lp-transition),
    border-color var(--lp-transition),
    color var(--lp-transition),
    transform var(--lp-transition),
    opacity var(--lp-transition);
}

.listas-precios-btn:hover,
.listas-precios-icon-btn:hover,
.listas-precios-modal__close:hover {
  border-color: var(--lp-line-strong);

  background: var(--lp-bg-hover);
}

.listas-precios-btn:active,
.listas-precios-icon-btn:active,
.listas-precios-modal__close:active {
  transform: translateY(1px);
}

.listas-precios-btn:disabled,
.listas-precios-icon-btn:disabled,
.listas-precios-modal__close:disabled {
  opacity: 0.42;

  cursor: not-allowed;

  transform: none;
}

.listas-precios-btn--dark {
  border-color: var(--lp-primary);

  background: var(--lp-primary);

  color: #ffffff;
}

.listas-precios-btn--dark:hover {
  border-color: var(--lp-primary-hover);

  background: var(--lp-primary-hover);

  color: #ffffff;
}

html[data-theme="dark"] .listas-precios-btn--dark {
  border-color: #f8fafc;

  background: #f8fafc;

  color: #090909;
}

html[data-theme="dark"] .listas-precios-btn--dark:hover {
  border-color: #e5e7eb;

  background: #e5e7eb;

  color: #090909;
}

.listas-precios-btn--danger {
  border-color: var(--lp-danger-line);

  background: var(--lp-danger-bg);

  color: var(--lp-danger);
}

.listas-precios-btn--danger:hover {
  border-color: var(--lp-danger);

  background: rgba(185, 28, 28, 0.12);

  color: var(--lp-danger);
}

.listas-precios-btn .icon,
.listas-precios-icon-btn .icon,
.listas-precios-modal__close .icon {
  width: 13px;
  height: 13px;
  min-width: 13px;

  color: currentColor;
  stroke: currentColor;
  stroke-width: 2.2;
}

.listas-precios-icon-btn {
  width: 31px;
  min-width: 31px;
  height: 31px;
  min-height: 31px;
  padding: 0;

  border-radius: 8px;
}

.listas-precios-icon-btn--danger {
  border-color: var(--lp-danger-line);

  background: var(--lp-danger-bg);

  color: var(--lp-danger);
}

/* =========================================================
   MÉTRICAS
   ========================================================= */

.listas-precios-metrics {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  overflow: hidden;
}

.listas-precios-metric {
  display: grid;
  align-content: center;
  gap: 4px;

  min-height: 68px;
  padding: 11px 13px;

  border-right: 1px solid var(--lp-line-soft);
}

.listas-precios-metric:last-child {
  border-right: 0;
}

.listas-precios-metric span,
.listas-precios-title span,
.listas-precios-detail-title > div > span,
.listas-precios-section-head > div > span,
.listas-precios-modal__head > div > span,
.listas-precios-import-info > div > span,
.listas-precios-import-preview > span,
.listas-precios-summary article span {
  color: var(--lp-muted);

  font-size: 7.8px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.listas-precios-metric strong {
  color: var(--lp-text);

  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
}

.listas-precios-metric small {
  color: var(--lp-muted-2);

  font-size: 8.4px;
  font-weight: 720;
}

/* =========================================================
   PANEL PRINCIPAL
   ========================================================= */

.listas-precios-panel {
  display: grid;

  min-width: 0;

  overflow: hidden;
}

.listas-precios-toolbar {
  display: grid;
  grid-template-columns:
    minmax(170px, 0.28fr)
    minmax(0, 1fr);
  align-items: center;
  gap: 12px;

  padding: 11px 12px;

  border-bottom: 1px solid var(--lp-line-soft);
}

.listas-precios-title {
  display: grid;
  gap: 4px;

  min-width: 0;
}

.listas-precios-title strong {
  color: var(--lp-text);

  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.025em;
}

.listas-precios-filters {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;

  min-width: 0;
}

.listas-precios-search {
  position: relative;

  display: flex;
  align-items: center;
  flex: 1 1 260px;

  min-width: 220px;
  max-width: 390px;
}

.listas-precios-search .icon {
  position: absolute;
  left: 10px;
  z-index: 2;

  width: 13px;
  height: 13px;

  color: var(--lp-muted);

  pointer-events: none;
}

.listas-precios-search input {
  padding-left: 31px;
}

/* =========================================================
   CAMPOS
   ========================================================= */

.listas-precios-filters input,
.listas-precios-filters select,
.listas-precios-field input,
.listas-precios-field select,
.listas-precios-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 35px;
  padding: 8px 10px;

  border: 1px solid var(--lp-line);
  border-radius: 9px;

  background: var(--lp-bg);

  color: var(--lp-text);

  font-size: 9.8px;
  font-weight: 760;
  line-height: 1.25;

  outline: none;

  transition:
    border-color var(--lp-transition),
    box-shadow var(--lp-transition),
    background var(--lp-transition);
}

.listas-precios-filters select {
  width: auto;
  min-width: 120px;
}

.listas-precios-filters input::placeholder,
.listas-precios-field input::placeholder,
.listas-precios-field textarea::placeholder {
  color: var(--lp-muted-2);
}

.listas-precios-filters input:focus,
.listas-precios-filters select:focus,
.listas-precios-field input:focus,
.listas-precios-field select:focus,
.listas-precios-field textarea:focus {
  border-color: var(--lp-line-strong);

  box-shadow:
    0 0 0 3px rgba(15, 23, 42, 0.05);
}

html[data-theme="dark"] .listas-precios-filters input:focus,
html[data-theme="dark"] .listas-precios-filters select:focus,
html[data-theme="dark"] .listas-precios-field input:focus,
html[data-theme="dark"] .listas-precios-field select:focus,
html[data-theme="dark"] .listas-precios-field textarea:focus {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.05);
}

.listas-precios-field textarea {
  min-height: 88px;

  resize: vertical;
}

html[data-theme="dark"] .listas-precios-filters select option,
html[data-theme="dark"] .listas-precios-field select option {
  background: #111111;

  color: #ffffff;
}

/* =========================================================
   TABLA PRINCIPAL
   ========================================================= */

.listas-precios-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;

  overflow-x: auto;

  scrollbar-width: thin;
}

.listas-precios-table-wrap::-webkit-scrollbar,
.listas-precios-detail-table-wrap::-webkit-scrollbar {
  height: 10px;
}

.listas-precios-table-wrap::-webkit-scrollbar-track,
.listas-precios-detail-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.listas-precios-table-wrap::-webkit-scrollbar-thumb,
.listas-precios-detail-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;

  background: rgba(100, 116, 139, 0.4);
  background-clip: content-box;
}

.listas-precios-table {
  width: 100%;
  min-width: 1080px;

  border-collapse: separate;
  border-spacing: 0;

  color: var(--lp-text);
}

.listas-precios-table th,
.listas-precios-table td {
  height: 47px;
  padding: 0 11px;

  border-right: 1px solid var(--lp-line-soft);
  border-bottom: 1px solid var(--lp-line-soft);

  vertical-align: middle;

  text-align: left;
  white-space: nowrap;
}

.listas-precios-table th:last-child,
.listas-precios-table td:last-child {
  border-right: 0;
}

.listas-precios-table tbody tr:last-child td {
  border-bottom: 0;
}

.listas-precios-table th {
  height: 39px;

  background: var(--lp-bg-soft);

  color: var(--lp-muted);

  font-size: 7.8px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.listas-precios-table td {
  color: var(--lp-text);

  font-size: 9.5px;
  font-weight: 720;
}

.listas-precios-table tbody tr {
  background: var(--lp-bg);

  transition:
    background var(--lp-transition);
}

.listas-precios-table tbody tr:hover {
  background: var(--lp-bg-hover);
}

.listas-precios-table td strong {
  color: var(--lp-text);

  font-size: 9.8px;
  font-weight: 950;
}

.listas-precios-table td[colspan] {
  height: 150px;

  text-align: center;
}

.listas-precios-table td[colspan] strong {
  color: var(--lp-muted);

  font-size: 12px;
}

/* =========================================================
   NOMBRE DE LISTA
   ========================================================= */

.listas-precios-name {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;
}

.listas-precios-name__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 30px;
  height: 30px;

  border: 1px solid var(--lp-line);
  border-radius: 9px;

  background: var(--lp-bg-soft);

  color: var(--lp-text);
}

.listas-precios-name__icon .icon {
  width: 14px;
  height: 14px;

  stroke-width: 2.1;
}

.listas-precios-name > span:last-child {
  display: grid;
  gap: 3px;

  min-width: 0;
}

.listas-precios-name strong {
  overflow: hidden;

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

.listas-precios-name small {
  color: var(--lp-muted);

  font-size: 8.4px;
  font-weight: 760;
}

/* =========================================================
   BADGES
   ========================================================= */

.listas-precios-moneda,
.listas-precios-status,
.listas-precios-active {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 23px;
  padding: 4px 8px;

  border: 1px solid var(--lp-line);
  border-radius: 999px;

  background: var(--lp-bg-soft);

  color: var(--lp-muted);

  font-size: 7.8px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.listas-precios-status.is-active,
.listas-precios-active.is-active {
  border-color: var(--lp-success-line);

  background: var(--lp-success-bg);

  color: var(--lp-success);
}

.listas-precios-status.is-draft {
  border-color: var(--lp-warning-line);

  background: var(--lp-warning-bg);

  color: var(--lp-warning);
}

.listas-precios-status.is-inactive,
.listas-precios-active.is-inactive {
  border-color: var(--lp-danger-line);

  background: var(--lp-danger-bg);

  color: var(--lp-danger);
}

.listas-precios-actions-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   MODALES
   ========================================================= */

.listas-precios-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: none;
  place-items: center;

  padding: 14px;

  background: rgba(15, 23, 42, 0.42);

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

html[data-theme="dark"] .listas-precios-modal {
  background: rgba(0, 0, 0, 0.68);
}

.listas-precios-modal.is-open {
  display: grid;
}

.listas-precios-modal__card {
  display: grid;
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto;

  width: min(840px, 100%);
  max-height: calc(100vh - 28px);

  overflow: hidden;

  box-shadow: var(--lp-shadow-modal);

  animation: listasPreciosModalIn 200ms ease both;
}

.listas-precios-modal--detail .listas-precios-modal__card {
  width: min(1180px, 100%);
  height: min(860px, calc(100vh - 28px));
}

.listas-precios-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  min-height: 68px;
  padding: 13px 14px;

  border-bottom: 1px solid var(--lp-line-soft);
}

.listas-precios-modal__head > div {
  display: grid;
  gap: 4px;

  min-width: 0;
}

.listas-precios-modal__head h3 {
  margin: 0;

  color: var(--lp-text);

  font-size: 17px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
}

.listas-precios-modal__head p {
  margin: 0;

  color: var(--lp-muted);

  font-size: 9px;
  font-weight: 720;
  line-height: 1.35;
}

.listas-precios-modal__close {
  flex: 0 0 auto;

  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.listas-precios-modal__body {
  min-height: 0;
  max-height: calc(100vh - 150px);

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
}

.listas-precios-modal__body::-webkit-scrollbar {
  width: 10px;
}

.listas-precios-modal__body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;

  background: rgba(100, 116, 139, 0.4);
  background-clip: content-box;
}

.listas-precios-modal__footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;

  min-height: 58px;
  padding: 11px 13px;

  border-top: 1px solid var(--lp-line-soft);
}

/* =========================================================
   FORMULARIOS
   ========================================================= */

.listas-precios-form-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;

  padding: 14px;
}

.listas-precios-field {
  display: grid;
  align-content: start;
  gap: 5px;

  min-width: 0;
}

.listas-precios-field--full {
  grid-column: 1 / -1;
}

.listas-precios-field label {
  color: var(--lp-muted);

  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* =========================================================
   SWITCH
   ========================================================= */

.listas-precios-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  min-height: 58px;
  padding: 10px 11px;

  border: 1px solid var(--lp-line);
  border-radius: 11px;

  background: var(--lp-bg-soft);

  cursor: pointer;
}

.listas-precios-switch > span {
  display: grid;
  gap: 3px;

  min-width: 0;
}

.listas-precios-switch strong {
  color: var(--lp-text);

  font-size: 9.5px;
  font-weight: 950;
}

.listas-precios-switch small {
  color: var(--lp-muted);

  font-size: 8.4px;
  font-weight: 700;
  line-height: 1.3;
}

.listas-precios-switch input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;
  pointer-events: none;
}

.listas-precios-switch b {
  position: relative;

  flex: 0 0 auto;

  width: 38px;
  height: 22px;

  border: 1px solid var(--lp-line);
  border-radius: 999px;

  background: var(--lp-bg-muted);

  transition:
    background var(--lp-transition),
    border-color var(--lp-transition);
}

.listas-precios-switch b::before {
  content: "";

  position: absolute;
  top: 3px;
  left: 3px;

  width: 14px;
  height: 14px;

  border-radius: 50%;

  background: var(--lp-muted-2);

  transition:
    transform var(--lp-transition),
    background var(--lp-transition);
}

.listas-precios-switch input:checked + b {
  border-color: var(--lp-success-line);

  background: var(--lp-success-bg);
}

.listas-precios-switch input:checked + b::before {
  background: var(--lp-success);

  transform: translateX(16px);
}

/* =========================================================
   DETALLE
   ========================================================= */

.listas-precios-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;

  min-height: 78px;
  padding: 13px 14px;

  border-bottom: 1px solid var(--lp-line-soft);
}

.listas-precios-detail-title {
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 0;
}

.listas-precios-detail-title__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 38px;
  height: 38px;

  border: 1px solid var(--lp-line);
  border-radius: 11px;

  background: var(--lp-bg-soft);

  color: var(--lp-text);
}

.listas-precios-detail-title__icon .icon {
  width: 17px;
  height: 17px;

  stroke-width: 2.2;
}

.listas-precios-detail-title > div {
  display: grid;
  gap: 4px;

  min-width: 0;
}

.listas-precios-detail-title h3 {
  margin: 0;

  color: var(--lp-text);

  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;

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

.listas-precios-detail-title p {
  margin: 0;

  color: var(--lp-muted);

  font-size: 9px;
  font-weight: 720;
}

.listas-precios-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

/* =========================================================
   RESUMEN
   ========================================================= */

.listas-precios-summary {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));

  margin: 12px;

  border: 1px solid var(--lp-line);
  border-radius: 13px;

  background: var(--lp-bg-soft);

  overflow: hidden;
}

.listas-precios-summary article {
  display: grid;
  align-content: center;
  gap: 4px;

  min-height: 62px;
  padding: 10px;

  border-right: 1px solid var(--lp-line-soft);
}

.listas-precios-summary article:last-child {
  border-right: 0;
}

.listas-precios-summary article strong {
  color: var(--lp-text);

  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

/* =========================================================
   SECCIONES DEL DETALLE
   ========================================================= */

.listas-precios-detail-section {
  display: grid;
  gap: 0;

  margin: 0 12px 12px;

  border: 1px solid var(--lp-line);
  border-radius: 13px;

  background: var(--lp-bg);

  overflow: hidden;
}

.listas-precios-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  min-height: 58px;
  padding: 10px 11px;

  border-bottom: 1px solid var(--lp-line-soft);
}

.listas-precios-section-head > div {
  display: grid;
  gap: 4px;
}

.listas-precios-section-head strong {
  color: var(--lp-text);

  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}

/* =========================================================
   TABLA DE PRODUCTOS
   ========================================================= */

.listas-precios-detail-table-wrap {
  width: 100%;
  min-width: 0;

  overflow-x: auto;

  scrollbar-width: thin;
}

.listas-precios-detail-table {
  width: 100%;
  min-width: 840px;

  border-collapse: separate;
  border-spacing: 0;
}

.listas-precios-detail-table th,
.listas-precios-detail-table td {
  height: 43px;
  padding: 0 10px;

  border-right: 1px solid var(--lp-line-soft);
  border-bottom: 1px solid var(--lp-line-soft);

  color: var(--lp-text);

  font-size: 9.3px;
  font-weight: 720;

  text-align: left;
  white-space: nowrap;
}

.listas-precios-detail-table th:last-child,
.listas-precios-detail-table td:last-child {
  border-right: 0;

  text-align: center;
}

.listas-precios-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.listas-precios-detail-table th {
  height: 36px;

  background: var(--lp-bg-soft);

  color: var(--lp-muted);

  font-size: 7.7px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.listas-precios-detail-table td strong {
  color: var(--lp-text);

  font-weight: 950;
}

/* =========================================================
   CLIENTES ASIGNADOS
   ========================================================= */

.listas-precios-clients-list {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 8px;

  padding: 10px;
}

.listas-precios-client-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;

  min-width: 0;
  padding: 10px;

  border: 1px solid var(--lp-line);
  border-radius: 11px;

  background: var(--lp-bg-soft);
}

.listas-precios-client-card > div {
  display: grid;
  gap: 3px;

  min-width: 0;
}

.listas-precios-client-card span {
  color: var(--lp-muted);

  font-size: 7.7px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.listas-precios-client-card strong {
  color: var(--lp-text);

  font-size: 10px;
  font-weight: 950;

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

.listas-precios-client-card small {
  color: var(--lp-muted);

  font-size: 8.4px;
  font-weight: 720;
}

/* =========================================================
   ESTADOS VACÍOS
   ========================================================= */

.listas-precios-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;

  min-height: 150px;
  padding: 18px;

  color: var(--lp-muted);

  text-align: center;
}

.listas-precios-empty .icon {
  width: 28px;
  height: 28px;

  color: var(--lp-muted-2);

  stroke-width: 1.8;
}

.listas-precios-empty strong {
  color: var(--lp-text);

  font-size: 11px;
  font-weight: 950;
}

.listas-precios-empty span {
  max-width: 460px;

  color: var(--lp-muted);

  font-size: 9px;
  font-weight: 720;
  line-height: 1.4;
}

/* =========================================================
   IMPORTACIÓN CSV
   ========================================================= */

.listas-precios-import-info {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 12px;

  margin: 14px 14px 0;
  padding: 12px;

  border: 1px solid var(--lp-line);
  border-radius: 12px;

  background: var(--lp-bg-soft);
}

.listas-precios-import-info > div {
  display: grid;
  gap: 4px;

  min-width: 0;
}

.listas-precios-import-info strong {
  color: var(--lp-text);

  font-size: 12px;
  font-weight: 950;
}

.listas-precios-import-info p {
  margin: 0;

  color: var(--lp-muted);

  font-size: 8.8px;
  font-weight: 720;
  line-height: 1.4;
}

.listas-precios-file-drop {
  display: flex;
  align-items: center;
  gap: 11px;

  margin: 12px 14px;
  padding: 14px;

  border: 1px dashed var(--lp-line-strong);
  border-radius: 13px;

  background: var(--lp-bg-soft);

  cursor: pointer;

  transition:
    background var(--lp-transition),
    border-color var(--lp-transition);
}

.listas-precios-file-drop:hover {
  border-color: var(--lp-text-soft);

  background: var(--lp-bg-hover);
}

.listas-precios-file-drop > .icon {
  width: 25px;
  height: 25px;

  color: var(--lp-text);

  stroke-width: 1.9;
}

.listas-precios-file-drop > span {
  display: grid;
  gap: 3px;
}

.listas-precios-file-drop strong {
  color: var(--lp-text);

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

.listas-precios-file-drop small {
  color: var(--lp-muted);

  font-size: 8.6px;
  font-weight: 720;
}

.listas-precios-import-preview {
  display: grid;
  gap: 6px;

  margin: 0 14px 12px;
}

.listas-precios-import-preview pre {
  max-height: 220px;
  margin: 0;
  padding: 11px;

  border: 1px solid var(--lp-line);
  border-radius: 11px;

  background: var(--lp-bg-soft);

  color: var(--lp-text);

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;

  font-size: 8.7px;
  font-weight: 650;
  line-height: 1.5;

  overflow: auto;

  white-space: pre;
}

#listaPrecioImportResult {
  margin: 0 14px 14px;
}

.listas-precios-import-result {
  display: grid;
  gap: 8px;

  padding: 10px;

  border: 1px solid var(--lp-line);
  border-radius: 11px;

  background: var(--lp-bg-soft);
}

.listas-precios-import-result.is-ok {
  border-color: var(--lp-success-line);

  background: var(--lp-success-bg);
}

.listas-precios-import-result.is-error {
  border-color: var(--lp-danger-line);

  background: var(--lp-danger-bg);
}

.listas-precios-import-result > strong {
  color: var(--lp-text);

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

.listas-precios-import-result > div {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.listas-precios-import-result > div span,
.listas-precios-import-result > div b {
  padding: 6px 8px;

  border: 1px solid var(--lp-line-soft);
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.35);

  color: var(--lp-text);

  font-size: 8.5px;
}

html[data-theme="dark"]
  .listas-precios-import-result
  > div
  span,
html[data-theme="dark"]
  .listas-precios-import-result
  > div
  b {
  background: rgba(255, 255, 255, 0.04);
}

/* =========================================================
   TOAST
   ========================================================= */

.listas-precios-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;

  min-width: 260px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 11px 13px;

  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 11px;

  background: #111827;

  color: #ffffff;

  font-size: 9.5px;
  font-weight: 850;
  line-height: 1.35;

  box-shadow:
    0 16px 36px rgba(15, 23, 42, 0.2);

  opacity: 0;
  pointer-events: none;

  transform: translateY(10px);

  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.listas-precios-toast.is-visible {
  opacity: 1;

  transform: translateY(0);
}

.listas-precios-toast.is-error {
  border-color: var(--lp-danger-line);

  background: #7f1d1d;
}

.listas-precios-toast.is-ok {
  border-color: var(--lp-success-line);

  background: #14532d;
}

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

@media (max-width: 1280px) {
  .listas-precios-toolbar {
    grid-template-columns: 1fr;

    align-items: start;
  }

  .listas-precios-filters {
    justify-content: flex-start;
  }

  .listas-precios-summary {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .listas-precios-summary article:nth-child(3n) {
    border-right: 0;
  }

  .listas-precios-summary article:nth-child(-n + 3) {
    border-bottom: 1px solid var(--lp-line-soft);
  }
}

@media (max-width: 980px) {
  .listas-precios-head {
    grid-template-columns: 1fr;

    align-items: start;
  }

  .listas-precios-head-actions {
    justify-content: flex-start;
  }

  .listas-precios-metrics {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .listas-precios-metric:nth-child(3n) {
    border-right: 0;
  }

  .listas-precios-metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--lp-line-soft);
  }

  .listas-precios-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .listas-precios-detail-actions {
    justify-content: flex-start;

    width: 100%;
  }

  .listas-precios-clients-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .listas-precios-page {
    gap: 8px;
  }

  .listas-precios-head,
  .listas-precios-metrics,
  .listas-precios-panel,
  .listas-precios-modal__card {
    border-radius: 14px;
  }

  .listas-precios-head {
    padding: 11px;
  }

  .listas-precios-brand {
    align-items: flex-start;
  }

  .listas-precios-brand__icon {
    width: 36px;
    height: 36px;
  }

  .listas-precios-brand h2 {
    font-size: 22px;
  }

  .listas-precios-brand p {
    display: none;
  }

  .listas-precios-head-actions {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    width: 100%;
  }

  .listas-precios-head-actions .listas-precios-btn {
    width: 100%;
  }

  .listas-precios-metrics {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .listas-precios-metric:nth-child(3n) {
    border-right: 1px solid var(--lp-line-soft);
  }

  .listas-precios-metric:nth-child(2n) {
    border-right: 0;
  }

  .listas-precios-metric {
    border-bottom: 1px solid var(--lp-line-soft);
  }

  .listas-precios-metric:last-child {
    grid-column: 1 / -1;

    border-right: 0;
    border-bottom: 0;
  }

  .listas-precios-filters {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    width: 100%;
  }

  .listas-precios-search {
    grid-column: 1 / -1;

    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .listas-precios-filters select,
  .listas-precios-filters .listas-precios-btn {
    width: 100%;
    min-width: 0;
  }

  .listas-precios-modal {
    padding: 8px;
  }

  .listas-precios-modal__card {
    max-height: calc(100vh - 16px);
  }

  .listas-precios-modal--detail .listas-precios-modal__card {
    height: calc(100vh - 16px);
  }

  .listas-precios-form-grid {
    grid-template-columns: 1fr;

    padding: 11px;
  }

  .listas-precios-field--full {
    grid-column: auto;
  }

  .listas-precios-modal__footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .listas-precios-modal__footer .listas-precios-btn {
    width: 100%;
  }

  .listas-precios-summary {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    margin: 9px;
  }

  .listas-precios-summary article {
    border-right: 1px solid var(--lp-line-soft);
    border-bottom: 1px solid var(--lp-line-soft);
  }

  .listas-precios-summary article:nth-child(2n) {
    border-right: 0;
  }

  .listas-precios-summary article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .listas-precios-detail-section {
    margin: 0 9px 9px;
  }

  .listas-precios-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .listas-precios-section-head .listas-precios-btn {
    width: 100%;
  }

  .listas-precios-import-info {
    grid-template-columns: 1fr;

    margin: 11px 11px 0;
  }

  .listas-precios-import-info .listas-precios-btn {
    width: 100%;
  }

  .listas-precios-file-drop {
    margin: 10px 11px;
  }

  .listas-precios-import-preview {
    margin: 0 11px 10px;
  }

  #listaPrecioImportResult {
    margin: 0 11px 11px;
  }

  .listas-precios-detail-actions {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .listas-precios-detail-actions .listas-precios-btn {
    width: 100%;
  }

  .listas-precios-detail-actions .listas-precios-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .listas-precios-detail-head {
    position: relative;

    padding-right: 54px;
  }
}

@media (max-width: 480px) {
  .listas-precios-head-actions,
  .listas-precios-filters,
  .listas-precios-metrics,
  .listas-precios-summary,
  .listas-precios-detail-actions {
    grid-template-columns: 1fr;
  }

  .listas-precios-metric,
  .listas-precios-summary article {
    border-right: 0;
    border-bottom: 1px solid var(--lp-line-soft);
  }

  .listas-precios-metric:last-child,
  .listas-precios-summary article:last-child {
    grid-column: auto;

    border-bottom: 0;
  }

  .listas-precios-detail-title {
    align-items: flex-start;
  }

  .listas-precios-detail-title h3 {
    white-space: normal;
  }

  .listas-precios-import-result > div {
    grid-template-columns: 1fr;
  }

  .listas-precios-client-card {
    align-items: flex-start;
  }
}

/* =========================================================
   ANIMACIONES
   ========================================================= */

@keyframes listasPreciosPageIn {
  from {
    opacity: 0;

    transform: translateY(5px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes listasPreciosModalIn {
  from {
    opacity: 0;

    transform:
      translateY(8px)
      scale(0.985);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}/* =========================================================
   LISTAS DE PRECIOS · MISMA ESCALA + MODALES VISIBLES
   Agregar al FINAL de listas-precios.css
   ========================================================= */

/* =========================================================
   ESCALA GENERAL
   ========================================================= */

.listas-precios-page {
  gap: 12px !important;
}

/* =========================================================
   ENCABEZADO
   ========================================================= */

.listas-precios-head {
  min-height: 92px !important;

  padding:
    15px
    17px !important;

  gap: 16px !important;
}

.listas-precios-brand {
  gap: 13px !important;
}

.listas-precios-brand__icon {
  width: 46px !important;
  height: 46px !important;
  flex: 0 0 46px !important;

  border-radius: 11px !important;
}

.listas-precios-brand__icon .icon {
  width: 21px !important;
  height: 21px !important;
}

.listas-precios-brand h2 {
  font-size:
    clamp(
      24px,
      2.1vw,
      30px
    ) !important;

  font-weight: 950 !important;
  line-height: 1 !important;
}

.listas-precios-brand p {
  margin-top: 6px !important;

  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.45 !important;
}

/* =========================================================
   BOTONES
   ========================================================= */

.listas-precios-btn,
.listas-precios-icon-btn,
.listas-precios-modal__close {
  min-height: 36px !important;

  padding:
    0
    12px !important;

  border-radius: 9px !important;

  font-size: 11px !important;
  font-weight: 900 !important;
}

.listas-precios-btn .icon,
.listas-precios-icon-btn .icon,
.listas-precios-modal__close .icon {
  width: 15px !important;
  height: 15px !important;

  min-width: 15px !important;
  min-height: 15px !important;
}

.listas-precios-icon-btn,
.listas-precios-modal__close {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;

  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;

  padding: 0 !important;
}

/* =========================================================
   MÉTRICAS
   ========================================================= */

.listas-precios-metric {
  min-height: 72px !important;

  padding:
    11px
    12px !important;

  gap: 5px !important;
}

.listas-precios-metric span {
  font-size: 9px !important;
  font-weight: 900 !important;
}

.listas-precios-metric strong {
  font-size: 19px !important;
  font-weight: 950 !important;
}

.listas-precios-metric small {
  font-size: 9.5px !important;
  font-weight: 700 !important;
}

/* =========================================================
   PANEL Y TOOLBAR
   ========================================================= */

.listas-precios-toolbar {
  grid-template-columns:
    minmax(190px, 0.3fr)
    minmax(0, 1fr) !important;

  gap: 12px !important;

  padding:
    12px !important;
}

.listas-precios-title {
  gap: 5px !important;
}

.listas-precios-title span {
  font-size: 9px !important;
  font-weight: 900 !important;
}

.listas-precios-title strong {
  font-size: 16px !important;
  font-weight: 950 !important;
}

/* =========================================================
   FILTROS
   ========================================================= */

.listas-precios-filters {
  gap: 7px !important;
}

.listas-precios-filters input,
.listas-precios-filters select,
.listas-precios-field input,
.listas-precios-field select,
.listas-precios-field textarea {
  min-height: 36px !important;

  padding:
    0
    10px !important;

  border-radius: 9px !important;

  font-size: 10.8px !important;
  font-weight: 800 !important;
}

.listas-precios-search {
  max-width: 460px !important;
}

.listas-precios-search .icon {
  left: 11px !important;

  width: 14px !important;
  height: 14px !important;
}

.listas-precios-search input {
  padding-left: 33px !important;
}

/* =========================================================
   TABLA PRINCIPAL
   ========================================================= */

.listas-precios-table th {
  height: 42px !important;

  padding:
    0
    10px !important;

  font-size: 8.8px !important;
  font-weight: 950 !important;
}

.listas-precios-table td {
  height: 48px !important;

  padding:
    0
    10px !important;

  font-size: 10.8px !important;
  font-weight: 760 !important;
}

.listas-precios-table td strong {
  font-size: 11px !important;
  font-weight: 950 !important;
}

.listas-precios-name {
  gap: 9px !important;
}

.listas-precios-name__icon {
  width: 32px !important;
  height: 32px !important;

  border-radius: 8px !important;
}

.listas-precios-name__icon .icon {
  width: 15px !important;
  height: 15px !important;
}

.listas-precios-name small {
  font-size: 9px !important;
}

/* =========================================================
   BADGES
   ========================================================= */

.listas-precios-moneda,
.listas-precios-status,
.listas-precios-active {
  min-height: 24px !important;

  padding:
    4px
    9px !important;

  font-size: 9px !important;
  font-weight: 950 !important;
}

/* =========================================================
   BOTÓN VER / EDITAR
   ========================================================= */

.listas-precios-actions-cell {
  justify-content: flex-start !important;

  padding-left: 4px !important;
}

.listas-precios-actions-cell .listas-precios-btn {
  min-width: 104px !important;

  padding:
    0
    11px !important;
}

/* =========================================================
   MODALES · CAPA GENERAL
   ========================================================= */

.listas-precios-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99990 !important;

  display: none !important;
  place-items: center !important;

  width: 100vw !important;
  height: 100vh !important;

  padding: 18px !important;

  background:
    rgba(
      0,
      0,
      0,
      0.68
    ) !important;

  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;

  overflow: hidden !important;
}

.listas-precios-modal.is-open {
  display: grid !important;
}

/* =========================================================
   TARJETA PRINCIPAL DEL MODAL
   ========================================================= */

.listas-precios-modal__card {
  position: relative !important;
  z-index: 2 !important;

  display: grid !important;
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto !important;

  width:
    min(
      900px,
      calc(100vw - 36px)
    ) !important;

  min-width: 0 !important;

  max-height:
    calc(
      100vh -
      36px
    ) !important;

  color: #111111 !important;

  background: #ffffff !important;

  border:
    1px solid
    rgba(
      0,
      0,
      0,
      0.18
    ) !important;

  border-radius: 16px !important;

  box-shadow:
    0 30px 90px
    rgba(
      0,
      0,
      0,
      0.34
    ) !important;

  opacity: 1 !important;
  visibility: visible !important;

  overflow: hidden !important;
}

/* Modal detalle más grande */

.listas-precios-modal--detail
.listas-precios-modal__card {
  width:
    min(
      1220px,
      calc(100vw - 36px)
    ) !important;

  height:
    min(
      880px,
      calc(100vh - 36px)
    ) !important;
}

/* =========================================================
   MODO OSCURO · MODAL
   ========================================================= */

html[data-theme="dark"]
.listas-precios-modal__card {
  color: #f5f5f5 !important;

  background: #0b0b0b !important;

  border-color:
    rgba(
      255,
      255,
      255,
      0.16
    ) !important;

  box-shadow:
    0 34px 100px
    rgba(
      0,
      0,
      0,
      0.84
    ) !important;
}

/* =========================================================
   HEADER DEL MODAL
   ========================================================= */

.listas-precios-modal__head,
.listas-precios-detail-head {
  position: relative !important;
  top: auto !important;
  z-index: 5 !important;

  min-height: 70px !important;

  padding:
    13px
    15px !important;

  background: #ffffff !important;

  border-bottom:
    1px solid
    rgba(
      0,
      0,
      0,
      0.12
    ) !important;
}

html[data-theme="dark"]
.listas-precios-modal__head,
html[data-theme="dark"]
.listas-precios-detail-head {
  background: #0b0b0b !important;

  border-bottom-color:
    rgba(
      255,
      255,
      255,
      0.11
    ) !important;
}

.listas-precios-modal__head > div > span,
.listas-precios-detail-title > div > span {
  color: #666666 !important;

  font-size: 9px !important;
  font-weight: 900 !important;
}

.listas-precios-modal__head h3,
.listas-precios-detail-title h3 {
  color: #111111 !important;

  font-size: 19px !important;
  font-weight: 950 !important;
}

.listas-precios-modal__head p,
.listas-precios-detail-title p {
  color: #666666 !important;

  font-size: 10.5px !important;
}

html[data-theme="dark"]
.listas-precios-modal__head > div > span,
html[data-theme="dark"]
.listas-precios-detail-title > div > span,
html[data-theme="dark"]
.listas-precios-modal__head p,
html[data-theme="dark"]
.listas-precios-detail-title p {
  color:
    rgba(
      255,
      255,
      255,
      0.58
    ) !important;
}

html[data-theme="dark"]
.listas-precios-modal__head h3,
html[data-theme="dark"]
.listas-precios-detail-title h3 {
  color: #ffffff !important;
}

/* =========================================================
   CUERPO DEL MODAL
   ========================================================= */

.listas-precios-modal__body {
  min-height: 0 !important;

  max-height: none !important;

  overflow-x: hidden !important;
  overflow-y: auto !important;

  background: #ffffff !important;
}

html[data-theme="dark"]
.listas-precios-modal__body {
  background: #0b0b0b !important;
}

/* =========================================================
   FORMULARIOS DEL MODAL
   ========================================================= */

.listas-precios-form-grid {
  gap: 10px !important;

  padding:
    14px !important;
}

.listas-precios-field {
  gap: 6px !important;
}

.listas-precios-field label {
  color: #666666 !important;

  font-size: 9px !important;
  font-weight: 900 !important;
}

html[data-theme="dark"]
.listas-precios-field label {
  color:
    rgba(
      255,
      255,
      255,
      0.58
    ) !important;
}

.listas-precios-field input,
.listas-precios-field select,
.listas-precios-field textarea {
  color: #111111 !important;

  background: #f7f7f7 !important;

  border:
    1px solid
    rgba(
      0,
      0,
      0,
      0.16
    ) !important;

  opacity: 1 !important;
}

.listas-precios-field input:focus,
.listas-precios-field select:focus,
.listas-precios-field textarea:focus {
  background: #ffffff !important;

  border-color:
    rgba(
      0,
      0,
      0,
      0.4
    ) !important;

  box-shadow:
    0 0 0 3px
    rgba(
      0,
      0,
      0,
      0.06
    ) !important;
}

html[data-theme="dark"]
.listas-precios-field input,
html[data-theme="dark"]
.listas-precios-field select,
html[data-theme="dark"]
.listas-precios-field textarea {
  color: #f5f5f5 !important;

  background: #111111 !important;

  border-color:
    rgba(
      255,
      255,
      255,
      0.15
    ) !important;
}

html[data-theme="dark"]
.listas-precios-field input:focus,
html[data-theme="dark"]
.listas-precios-field select:focus,
html[data-theme="dark"]
.listas-precios-field textarea:focus {
  background: #151515 !important;

  border-color:
    rgba(
      255,
      255,
      255,
      0.34
    ) !important;

  box-shadow:
    0 0 0 3px
    rgba(
      255,
      255,
      255,
      0.06
    ) !important;
}

.listas-precios-field textarea {
  min-height: 96px !important;

  padding:
    10px !important;
}

/* =========================================================
   SWITCH
   ========================================================= */

.listas-precios-switch {
  min-height: 64px !important;

  padding:
    11px
    12px !important;
}

.listas-precios-switch strong {
  font-size: 11px !important;
}

.listas-precios-switch small {
  font-size: 9.5px !important;
}

/* =========================================================
   FOOTER DEL MODAL
   ========================================================= */

.listas-precios-modal__footer {
  position: relative !important;
  bottom: auto !important;
  z-index: 5 !important;

  min-height: 64px !important;

  padding:
    12px
    15px !important;

  background: #ffffff !important;

  border-top:
    1px solid
    rgba(
      0,
      0,
      0,
      0.12
    ) !important;
}

html[data-theme="dark"]
.listas-precios-modal__footer {
  background: #0b0b0b !important;

  border-top-color:
    rgba(
      255,
      255,
      255,
      0.11
    ) !important;
}

/* =========================================================
   DETALLE · RESUMEN
   ========================================================= */

.listas-precios-detail-title {
  gap: 12px !important;
}

.listas-precios-detail-title__icon {
  width: 44px !important;
  height: 44px !important;

  border-radius: 10px !important;
}

.listas-precios-detail-title__icon .icon {
  width: 19px !important;
  height: 19px !important;
}

.listas-precios-summary {
  margin: 14px !important;
}

.listas-precios-summary article {
  min-height: 72px !important;

  padding:
    11px
    12px !important;
}

.listas-precios-summary article span {
  font-size: 9px !important;
}

.listas-precios-summary article strong {
  font-size: 13px !important;
}

/* =========================================================
   DETALLE · SECCIONES
   ========================================================= */

.listas-precios-detail-section {
  margin:
    0
    14px
    14px !important;
}

.listas-precios-section-head {
  min-height: 64px !important;

  padding:
    11px
    12px !important;
}

.listas-precios-section-head > div > span {
  font-size: 9px !important;
}

.listas-precios-section-head strong {
  font-size: 14px !important;
}

/* =========================================================
   TABLA DEL DETALLE
   ========================================================= */

.listas-precios-detail-table th {
  height: 40px !important;

  font-size: 8.7px !important;
}

.listas-precios-detail-table td {
  height: 46px !important;

  font-size: 10.5px !important;
}

/* =========================================================
   CLIENTES ASIGNADOS
   ========================================================= */

.listas-precios-clients-list {
  gap: 10px !important;

  padding:
    12px !important;
}

.listas-precios-client-card {
  min-height: 68px !important;

  padding:
    11px
    12px !important;
}

.listas-precios-client-card span {
  font-size: 9px !important;
}

.listas-precios-client-card strong {
  font-size: 11px !important;
}

.listas-precios-client-card small {
  font-size: 9.5px !important;
}

/* =========================================================
   IMPORTACIÓN
   ========================================================= */

.listas-precios-import-info {
  margin:
    14px
    14px
    0 !important;

  padding:
    14px !important;
}

.listas-precios-import-info > div > span,
.listas-precios-import-preview > span {
  font-size: 9px !important;
}

.listas-precios-import-info strong {
  font-size: 14px !important;
}

.listas-precios-import-info p {
  font-size: 10px !important;
}

.listas-precios-file-drop {
  min-height: 72px !important;

  padding:
    14px !important;
}

.listas-precios-file-drop strong {
  font-size: 11px !important;
}

.listas-precios-file-drop small {
  font-size: 9.5px !important;
}

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

@media (max-width: 980px) {
  .listas-precios-head {
    min-height: 0 !important;
  }

  .listas-precios-brand h2 {
    font-size: 25px !important;
  }

  .listas-precios-brand p {
    font-size: 11px !important;
  }

  .listas-precios-toolbar {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .listas-precios-page {
    gap: 10px !important;
  }

  .listas-precios-head {
    padding:
      12px !important;
  }

  .listas-precios-brand h2 {
    font-size: 22px !important;
  }

  .listas-precios-modal {
    padding: 8px !important;
  }

  .listas-precios-modal__card,
  .listas-precios-modal--detail
  .listas-precios-modal__card {
    width:
      calc(
        100vw -
        16px
      ) !important;

    height: auto !important;

    max-height:
      calc(
        100vh -
        16px
      ) !important;

    border-radius: 13px !important;
  }

  .listas-precios-form-grid {
    grid-template-columns: 1fr !important;
  }

  .listas-precios-field--full {
    grid-column: auto !important;
  }

  .listas-precios-modal__footer {
    grid-template-columns: 1fr !important;
  }

  .listas-precios-modal__footer
  .listas-precios-btn {
    width: 100% !important;
  }
}/* =========================================================
   LISTAS DE PRECIOS · MODALES SECUNDARIOS POR ENCIMA
   Agregar al FINAL de listas-precios.css
   ========================================================= */

/* Modal principal de detalle */

#listasPreciosDetailModal {
  z-index: 99990 !important;
}

/* Ventanas abiertas desde el detalle */

#listaPrecioModal,
#listaPrecioItemModal,
#listaPrecioImportModal,
#listaPrecioAssignmentModal {
  z-index: 100100 !important;
}

/* Asegurar que la tarjeta secundaria quede adelante */

#listaPrecioModal .listas-precios-modal__card,
#listaPrecioItemModal .listas-precios-modal__card,
#listaPrecioImportModal .listas-precios-modal__card,
#listaPrecioAssignmentModal .listas-precios-modal__card {
  position: relative !important;
  z-index: 3 !important;
}

/* Fondo de la ventana secundaria */

#listaPrecioModal,
#listaPrecioItemModal,
#listaPrecioImportModal,
#listaPrecioAssignmentModal {
  background:
    rgba(
      0,
      0,
      0,
      0.74
    ) !important;

  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Oscurecer visualmente el detalle que queda detrás */

#listasPreciosDetailModal:has(
  ~ #listaPrecioModal.is-open
),
#listasPreciosDetailModal:has(
  ~ #listaPrecioItemModal.is-open
),
#listasPreciosDetailModal:has(
  ~ #listaPrecioImportModal.is-open
),
#listasPreciosDetailModal:has(
  ~ #listaPrecioAssignmentModal.is-open
) {
  pointer-events: none !important;
}

/* Las ventanas secundarias siempre reciben interacción */

#listaPrecioModal.is-open,
#listaPrecioItemModal.is-open,
#listaPrecioImportModal.is-open,
#listaPrecioAssignmentModal.is-open {
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}/* =========================================================
   LISTAS DE PRECIOS
   MISMO TAMAÑO + BORDES VISIBLES + TABLAS CUADRICULADAS
   Agregar al FINAL de listas-precios.css
   ========================================================= */

/* =========================================================
   CONTENEDOR GENERAL Y SCROLL DE PÁGINA
   ========================================================= */

.app-content:has(.listas-precios-page) {
  display: block !important;

  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  padding: 10px !important;

  overflow: visible !important;
}

.listas-precios-page {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  gap: 12px !important;

  overflow: visible !important;
}

/* =========================================================
   BORDES PRINCIPALES MÁS VISIBLES
   ========================================================= */

.listas-precios-head,
.listas-precios-metrics,
.listas-precios-panel,
.listas-precios-modal__card {
  border:
    1px solid
    rgba(
      15,
      23,
      42,
      0.19
    ) !important;

  box-shadow:
    0 1px 0
    rgba(
      255,
      255,
      255,
      0.86
    ) inset,
    0 5px 16px
    rgba(
      15,
      23,
      42,
      0.055
    ) !important;
}

.listas-precios-head:hover,
.listas-precios-panel:hover {
  border-color:
    rgba(
      15,
      23,
      42,
      0.29
    ) !important;
}

/* =========================================================
   MÉTRICAS · CUADRÍCULA
   ========================================================= */

.listas-precios-metrics {
  overflow: hidden !important;
}

.listas-precios-metric {
  border-right:
    1px solid
    rgba(
      15,
      23,
      42,
      0.16
    ) !important;

  border-bottom: 0 !important;
}

.listas-precios-metric:last-child {
  border-right: 0 !important;
}

.listas-precios-metric:hover {
  background:
    rgba(
      15,
      23,
      42,
      0.04
    ) !important;
}

/* =========================================================
   TOOLBAR Y FILTROS
   ========================================================= */

.listas-precios-toolbar {
  border-bottom:
    1px solid
    rgba(
      15,
      23,
      42,
      0.18
    ) !important;
}

.listas-precios-search input,
.listas-precios-filters select,
.listas-precios-filters button {
  border-color:
    rgba(
      15,
      23,
      42,
      0.18
    ) !important;
}

.listas-precios-search input:hover,
.listas-precios-filters select:hover,
.listas-precios-filters button:hover {
  border-color:
    rgba(
      15,
      23,
      42,
      0.28
    ) !important;
}

/* =========================================================
   PANEL PRINCIPAL
   ========================================================= */

.listas-precios-panel {
  display: block !important;

  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  overflow: visible !important;
}

.listas-precios-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  overflow-x: auto !important;
  overflow-y: visible !important;
}

/* =========================================================
   TABLA PRINCIPAL · CUADRÍCULA COMPLETA
   ========================================================= */

.listas-precios-table {
  width: 100% !important;
  min-width: 1180px !important;

  border-collapse: separate !important;
  border-spacing: 0 !important;

  border:
    1px solid
    rgba(
      15,
      23,
      42,
      0.2
    ) !important;
}

.listas-precios-table th,
.listas-precios-table td {
  border-right:
    1px solid
    rgba(
      15,
      23,
      42,
      0.15
    ) !important;

  border-bottom:
    1px solid
    rgba(
      15,
      23,
      42,
      0.15
    ) !important;
}

.listas-precios-table th:last-child,
.listas-precios-table td:last-child {
  border-right: 0 !important;
}

.listas-precios-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

/* Encabezado más marcado */

.listas-precios-table thead th {
  background:
    color-mix(
      in srgb,
      var(--lp-bg-soft) 92%,
      #eef1f4
    ) !important;

  border-bottom:
    1px solid
    rgba(
      15,
      23,
      42,
      0.22
    ) !important;
}

/* Filas alternadas */

.listas-precios-table tbody tr:nth-child(even) td {
  background:
    rgba(
      15,
      23,
      42,
      0.018
    ) !important;
}

.listas-precios-table tbody tr:hover td {
  background:
    rgba(
      15,
      23,
      42,
      0.05
    ) !important;
}

/* Columna de acciones separada */

.listas-precios-table th:last-child,
.listas-precios-table td:last-child {
  border-left:
    1px solid
    rgba(
      15,
      23,
      42,
      0.2
    ) !important;
}

/* =========================================================
   ICONOS, ESTADOS Y BADGES
   ========================================================= */

.listas-precios-name__icon,
.listas-precios-moneda,
.listas-precios-status,
.listas-precios-active {
  border-color:
    rgba(
      15,
      23,
      42,
      0.18
    ) !important;
}

/* =========================================================
   MODAL · FORMULARIO CUADRICULADO
   ========================================================= */

.listas-precios-form-grid {
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    ) !important;

  gap: 0 !important;

  margin: 14px !important;
  padding: 0 !important;

  border:
    1px solid
    rgba(
      15,
      23,
      42,
      0.18
    ) !important;

  border-radius: 11px !important;

  overflow: hidden !important;
}

.listas-precios-field,
.listas-precios-switch {
  min-height: 72px !important;

  padding:
    11px
    12px !important;

  border-right:
    1px solid
    rgba(
      15,
      23,
      42,
      0.14
    ) !important;

  border-bottom:
    1px solid
    rgba(
      15,
      23,
      42,
      0.14
    ) !important;

  border-radius: 0 !important;
}

.listas-precios-field:nth-child(2n),
.listas-precios-switch:nth-child(2n) {
  border-right: 0 !important;
}

.listas-precios-field--full {
  grid-column:
    1 /
    -1 !important;

  border-right: 0 !important;
}

.listas-precios-field:hover,
.listas-precios-field:focus-within,
.listas-precios-switch:hover {
  background:
    rgba(
      15,
      23,
      42,
      0.025
    ) !important;
}

.listas-precios-field input,
.listas-precios-field select,
.listas-precios-field textarea {
  border-color:
    rgba(
      15,
      23,
      42,
      0.17
    ) !important;
}

/* =========================================================
   DETALLE · RESUMEN CUADRICULADO
   ========================================================= */

.listas-precios-summary {
  border-color:
    rgba(
      15,
      23,
      42,
      0.19
    ) !important;
}

.listas-precios-summary article {
  border-right:
    1px solid
    rgba(
      15,
      23,
      42,
      0.15
    ) !important;

  border-bottom: 0 !important;
}

.listas-precios-summary article:last-child {
  border-right: 0 !important;
}

.listas-precios-summary article:hover {
  background:
    rgba(
      15,
      23,
      42,
      0.04
    ) !important;
}

/* =========================================================
   DETALLE · SECCIONES
   ========================================================= */

.listas-precios-detail-section {
  border-color:
    rgba(
      15,
      23,
      42,
      0.19
    ) !important;
}

.listas-precios-section-head {
  border-bottom:
    1px solid
    rgba(
      15,
      23,
      42,
      0.17
    ) !important;
}

/* =========================================================
   TABLA DE PRODUCTOS · CUADRÍCULA COMPLETA
   ========================================================= */

.listas-precios-detail-table {
  width: 100% !important;
  min-width: 900px !important;

  border-collapse: separate !important;
  border-spacing: 0 !important;

  border:
    1px solid
    rgba(
      15,
      23,
      42,
      0.19
    ) !important;
}

.listas-precios-detail-table th,
.listas-precios-detail-table td {
  border-right:
    1px solid
    rgba(
      15,
      23,
      42,
      0.15
    ) !important;

  border-bottom:
    1px solid
    rgba(
      15,
      23,
      42,
      0.15
    ) !important;
}

.listas-precios-detail-table th:last-child,
.listas-precios-detail-table td:last-child {
  border-right: 0 !important;
}

.listas-precios-detail-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.listas-precios-detail-table thead th {
  background:
    color-mix(
      in srgb,
      var(--lp-bg-soft) 92%,
      #eef1f4
    ) !important;

  border-bottom:
    1px solid
    rgba(
      15,
      23,
      42,
      0.22
    ) !important;
}

.listas-precios-detail-table tbody tr:nth-child(even) td {
  background:
    rgba(
      15,
      23,
      42,
      0.018
    ) !important;
}

.listas-precios-detail-table tbody tr:hover td {
  background:
    rgba(
      15,
      23,
      42,
      0.05
    ) !important;
}

/* =========================================================
   CLIENTES ASIGNADOS · CARDS CUADRICULADAS
   ========================================================= */

.listas-precios-clients-list {
  gap: 0 !important;

  margin: 12px !important;
  padding: 0 !important;

  border:
    1px solid
    rgba(
      15,
      23,
      42,
      0.18
    ) !important;

  border-radius: 11px !important;

  overflow: hidden !important;
}

.listas-precios-client-card {
  min-height: 72px !important;

  border: 0 !important;

  border-right:
    1px solid
    rgba(
      15,
      23,
      42,
      0.14
    ) !important;

  border-bottom:
    1px solid
    rgba(
      15,
      23,
      42,
      0.14
    ) !important;

  border-radius: 0 !important;

  background:
    var(--lp-bg) !important;
}

.listas-precios-client-card:nth-child(2n) {
  border-right: 0 !important;
}

.listas-precios-client-card:hover {
  background:
    rgba(
      15,
      23,
      42,
      0.04
    ) !important;
}

/* =========================================================
   IMPORTACIÓN · BORDES MÁS VISIBLES
   ========================================================= */

.listas-precios-import-info,
.listas-precios-file-drop,
.listas-precios-import-preview pre,
.listas-precios-import-result {
  border-color:
    rgba(
      15,
      23,
      42,
      0.18
    ) !important;
}

.listas-precios-import-result > div {
  gap: 0 !important;

  border:
    1px solid
    rgba(
      15,
      23,
      42,
      0.15
    ) !important;

  border-radius: 9px !important;

  overflow: hidden !important;
}

.listas-precios-import-result > div span,
.listas-precios-import-result > div b {
  border: 0 !important;

  border-right:
    1px solid
    rgba(
      15,
      23,
      42,
      0.13
    ) !important;

  border-bottom:
    1px solid
    rgba(
      15,
      23,
      42,
      0.13
    ) !important;

  border-radius: 0 !important;
}

/* =========================================================
   SCROLL DE PÁGINA Y FOOTER
   ========================================================= */

body:has(.listas-precios-page) .app-main {
  min-height: 100vh !important;
  height: auto !important;

  overflow: visible !important;
}

body:has(.listas-precios-page) .app-shell {
  min-height: 100vh !important;
  height: auto !important;

  overflow: visible !important;
}

body:has(.listas-precios-page) .app-footer,
body:has(.listas-precios-page) #footerMount,
body:has(.listas-precios-page) footer.app-footer {
  position: static !important;

  inset: auto !important;

  width: 100% !important;

  margin-top: 12px !important;

  transform: none !important;
}

/* =========================================================
   MODO OSCURO
   ========================================================= */

html[data-theme="dark"] .listas-precios-head,
html[data-theme="dark"] .listas-precios-metrics,
html[data-theme="dark"] .listas-precios-panel,
html[data-theme="dark"] .listas-precios-modal__card,
html[data-theme="dark"] .listas-precios-detail-section,
html[data-theme="dark"] .listas-precios-summary {
  border-color:
    rgba(
      255,
      255,
      255,
      0.2
    ) !important;
}

html[data-theme="dark"] .listas-precios-metric,
html[data-theme="dark"] .listas-precios-table th,
html[data-theme="dark"] .listas-precios-table td,
html[data-theme="dark"] .listas-precios-detail-table th,
html[data-theme="dark"] .listas-precios-detail-table td,
html[data-theme="dark"] .listas-precios-summary article,
html[data-theme="dark"] .listas-precios-field,
html[data-theme="dark"] .listas-precios-switch,
html[data-theme="dark"] .listas-precios-client-card {
  border-right-color:
    rgba(
      255,
      255,
      255,
      0.13
    ) !important;

  border-bottom-color:
    rgba(
      255,
      255,
      255,
      0.13
    ) !important;
}

html[data-theme="dark"] .listas-precios-table,
html[data-theme="dark"] .listas-precios-detail-table,
html[data-theme="dark"] .listas-precios-form-grid,
html[data-theme="dark"] .listas-precios-clients-list {
  border-color:
    rgba(
      255,
      255,
      255,
      0.19
    ) !important;
}

html[data-theme="dark"] .listas-precios-table thead th,
html[data-theme="dark"] .listas-precios-detail-table thead th {
  background:
    #111111 !important;

  border-bottom-color:
    rgba(
      255,
      255,
      255,
      0.21
    ) !important;
}

html[data-theme="dark"]
.listas-precios-table
tbody
tr:nth-child(even)
td,
html[data-theme="dark"]
.listas-precios-detail-table
tbody
tr:nth-child(even)
td {
  background:
    rgba(
      255,
      255,
      255,
      0.025
    ) !important;
}

html[data-theme="dark"]
.listas-precios-table
tbody
tr:hover
td,
html[data-theme="dark"]
.listas-precios-detail-table
tbody
tr:hover
td {
  background:
    rgba(
      255,
      255,
      255,
      0.06
    ) !important;
}

html[data-theme="dark"] .listas-precios-field:hover,
html[data-theme="dark"] .listas-precios-field:focus-within,
html[data-theme="dark"] .listas-precios-switch:hover,
html[data-theme="dark"] .listas-precios-client-card:hover {
  background:
    rgba(
      255,
      255,
      255,
      0.045
    ) !important;
}

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

@media (max-width: 980px) {
  .listas-precios-summary article {
    border-bottom:
      1px solid
      rgba(
        15,
        23,
        42,
        0.14
      ) !important;
  }

  .listas-precios-summary article:nth-child(3n) {
    border-right: 0 !important;
  }

  .listas-precios-summary article:nth-last-child(-n + 3) {
    border-bottom: 0 !important;
  }
}

@media (max-width: 760px) {
  .listas-precios-form-grid {
    grid-template-columns:
      1fr !important;

    margin: 10px !important;
  }

  .listas-precios-field,
  .listas-precios-switch,
  .listas-precios-field:nth-child(2n),
  .listas-precios-switch:nth-child(2n) {
    border-right: 0 !important;
  }

  .listas-precios-field:last-child,
  .listas-precios-switch:last-child {
    border-bottom: 0 !important;
  }

  .listas-precios-summary article {
    border-right:
      1px solid
      rgba(
        15,
        23,
        42,
        0.14
      ) !important;
  }

  .listas-precios-summary article:nth-child(2n) {
    border-right: 0 !important;
  }

  .listas-precios-summary article:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
  }

  .listas-precios-clients-list {
    grid-template-columns:
      1fr !important;
  }

  .listas-precios-client-card,
  .listas-precios-client-card:nth-child(2n) {
    border-right: 0 !important;
  }

  .listas-precios-client-card:last-child {
    border-bottom: 0 !important;
  }
}

@media (max-width: 480px) {
  .listas-precios-summary article {
    border-right: 0 !important;

    border-bottom:
      1px solid
      rgba(
        15,
        23,
        42,
        0.14
      ) !important;
  }

  .listas-precios-summary article:last-child {
    border-bottom: 0 !important;
  }
}