/* =============================================================================
   Soft Imperio — Panel · SALDO DE SOFT IMPERIO AI (16-sep-2026)

   Pedido del dueño: «no entiendo muy bien esto», «lo quiero mejor estructurado»
   y «dale el estilo de softimperio.com/AI». Así que esta sección, y solo esta,
   lleva la piel del estudio: fondo gris #101214, tarjetas casi negras con una
   línea blanca que casi no se ve, Inter y el verde de la marca solo en el botón
   principal. Los valores salen de tailwind.config.js y style.css del estudio
   (soft-imperio-studio), no a ojo.

   Todo cuelga de .iax para no tocar el resto del panel, que sigue claro. Al
   entrar en la sección, admin.js pone body.ia-oscuro y el marco (barra de arriba
   y fondo) se oscurece también: una franja blanca encima se veía partida.
   ============================================================================= */

body.ia-oscuro .app-main {
  background: #101214;
  color-scheme: dark;
}

body.ia-oscuro .app-topbar {
  background: rgba(16, 18, 20, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.ia-oscuro .app-topbar h1 {
  color: #f7f7f8;
  font-family: Inter, "Inter Fallback", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

body.ia-oscuro .app-burger {
  color: #babdc5;
}

.iax {
  --x-bg: #101214;
  --x-panel: #16181b;
  --x-card: rgba(255, 255, 255, 0.03);
  --x-card-hover: rgba(255, 255, 255, 0.05);
  --x-line: rgba(255, 255, 255, 0.06);
  --x-line-2: rgba(255, 255, 255, 0.1);
  --x-text: #f7f7f8;
  --x-body: #d9dadd;
  --x-sub: #a8a8a8;
  --x-muted: #7b8087;
  --x-green: #00ff00;
  --x-pos: #6ee787;
  --x-neg: #ff8a8a;
  --x-warn: #f2c14e;
  --x-radius: 12px;

  color-scheme: dark;
  color: var(--x-body);
  font-family: Inter, "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  max-width: 1440px;
  margin-inline: auto;
}

/* Con clases de display por todas partes, el atributo hidden pierde: aquí manda. */
.iax [hidden] {
  display: none !important;
}

.iax h2,
.iax h3,
.iax h4 {
  color: var(--x-text);
  font-family: inherit;
  letter-spacing: 0;
  margin: 0;
}

.iax .num,
.iax-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Cabecera */
.iax-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.iax-head h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.iax-head p {
  margin: 0.3rem 0 0;
  color: var(--x-sub);
}

.iax-head__acc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.iax-vivo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--x-sub);
  font-size: 13px;
  padding-right: 0.35rem;
}

.iax-vivo__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--x-pos);
  box-shadow: 0 0 0 0 rgba(110, 231, 135, 0.45);
  animation: iax-latido 2.4s ease-out infinite;
}

.iax-vivo.is-off .iax-vivo__dot {
  background: var(--x-muted);
  animation: none;
}

@keyframes iax-latido {
  0% { box-shadow: 0 0 0 0 rgba(110, 231, 135, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(110, 231, 135, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 231, 135, 0); }
}

/* ----------------------------------------------------------------- Botones */
.iax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 36px;
  padding: 0 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--x-line);
  background: rgba(255, 255, 255, 0.05);
  color: #e8e9eb;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.iax-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.iax-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.iax-btn:focus-visible,
.iax-tab:focus-visible,
.iax-seg button:focus-visible,
.iax-link:focus-visible,
.iax-row:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.iax-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.iax-btn--sm {
  height: 30px;
  padding: 0 0.7rem;
  font-size: 13px;
  border-radius: 8px;
}

/* El verde con brillo del botón Generar del estudio: el único verde que se ve. */
.iax-btn--primary {
  color: #14151a;
  border-color: transparent;
  font-weight: 600;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.1) 48%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #7dff7d 0%, #00ff00 52%, #00b300 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 5px rgba(0, 0, 0, 0.18),
    0 10px 24px -12px rgba(0, 255, 0, 0.55);
}

.iax-btn--primary:hover {
  color: #14151a;
  filter: brightness(1.06);
}

.iax-btn[aria-pressed="false"] {
  color: var(--x-muted);
}

.iax-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--x-sub);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.iax-link:hover {
  color: #fff;
}

/* ------------------------------------------------------------- Pestañas */
.iax-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  margin-bottom: 1.5rem;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--x-card);
  border: 1px solid var(--x-line);
  border-radius: 12px;
}

.iax-tabs::-webkit-scrollbar {
  display: none;
}

.iax-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 34px;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--x-sub);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.iax-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.iax-tab[aria-selected="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.iax-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--x-sub);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.iax-count--warn {
  background: rgba(242, 193, 78, 0.16);
  color: var(--x-warn);
}

/* ------------------------------------------------ Barra de filtros y campos */
.iax-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.iax-bar__fill {
  flex: 1;
}

.iax-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--x-card);
  border: 1px solid var(--x-line);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.iax-seg button {
  height: 28px;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--x-sub);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.iax-seg button:hover {
  color: #fff;
}

.iax-seg button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.iax-note {
  color: var(--x-muted);
  font-size: 13px;
}

.iax-input {
  height: 36px;
  padding: 0 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--x-line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--x-text);
  font: inherit;
  min-width: 0;
}

.iax-input::placeholder {
  color: var(--x-muted);
}

.iax-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

select.iax-input {
  padding-right: 2rem;
}

select.iax-input option {
  background: #1c1e20;
  color: var(--x-text);
}

.iax-search {
  width: min(320px, 100%);
}

.iax-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.iax-field label {
  color: var(--x-sub);
  font-size: 13px;
  font-weight: 500;
}

.iax-field small {
  color: var(--x-muted);
  font-size: 12px;
  line-height: 1.35;
}

/* ------------------------------------------------------------- Tarjetas */
.iax-card {
  background: var(--x-card);
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius);
  padding: 1.1rem 1.2rem;
  min-width: 0;
}

.iax-card + .iax-card,
.iax-card + .iax-bar,
.iax-kpis + .iax-card,
.iax-cols + .iax-card {
  margin-top: 1rem;
}

.iax-card--flush {
  padding: 0;
  overflow: hidden;
}

.iax-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.iax-card--flush .iax-card__head {
  padding: 1rem 1.2rem 0;
}

.iax-card__head h3 {
  font-size: 15px;
  font-weight: 600;
}

.iax-card__head p {
  margin: 0.2rem 0 0;
  color: var(--x-muted);
  font-size: 13px;
}

.iax-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.iax-cols > .iax-card + .iax-card {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .iax-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------- Cifras */
.iax-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.iax-kpis--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1280px) {
  .iax-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .iax-kpis,
  .iax-kpis--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.iax-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  background: var(--x-card);
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius);
  min-width: 0;
}

.iax-kpi__k {
  color: var(--x-sub);
  font-size: 13px;
  font-weight: 500;
}

.iax-kpi__v {
  color: var(--x-text);
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.65rem);
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.iax-kpi__s {
  color: var(--x-muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.iax-kpi--gana .iax-kpi__v {
  color: var(--x-pos);
}

.iax-kpi--pierde .iax-kpi__v {
  color: var(--x-neg);
}

.iax-pct {
  color: var(--x-pos);
  font-weight: 600;
}

.iax-pos {
  color: var(--x-pos);
}

.iax-neg {
  color: var(--x-neg);
}

.iax-dim {
  color: var(--x-muted);
}

/* La cuenta de la ganancia, dicha en una línea gris: sin caja de color. */
.iax-cuenta {
  margin: 0.85rem 0 1.25rem;
  color: var(--x-muted);
  font-size: 13px;
  line-height: 1.5;
}

.iax-cuenta b {
  color: var(--x-body);
  font-weight: 500;
}

.iax-aviso {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  border: 1px solid var(--x-line);
  background: var(--x-card);
  color: var(--x-body);
  font-size: 13.5px;
}

.iax-aviso--warn {
  border-color: rgba(242, 193, 78, 0.28);
}

.iax-aviso--warn::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--x-warn);
  flex: none;
}

.iax-aviso--warn {
  flex-wrap: nowrap;
}

.iax-aviso--warn > span {
  flex: 1;
  min-width: 0;
}

.iax-aviso .iax-link {
  margin-left: auto;
  flex: none;
}

.iax-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

/* ----------------------------------------------------------- Listas vivas */
.iax-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.iax-feed li + li {
  border-top: 1px solid var(--x-line);
}

.iax-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.35rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.iax-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.iax-row__main {
  min-width: 0;
}

.iax-row__t {
  display: block;
  color: var(--x-text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iax-row__s {
  display: block;
  color: var(--x-muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iax-row__v {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.iax-row__v b {
  display: block;
  color: var(--x-text);
  font-weight: 600;
}

.iax-vacio {
  padding: 1.6rem 0.5rem;
  color: var(--x-muted);
  text-align: center;
  font-size: 13.5px;
}

/* Lo que acaba de entrar se ilumina un momento. */
.iax-nuevo {
  animation: iax-nuevo 2.6s ease-out;
}

@keyframes iax-nuevo {
  0% { background-color: rgba(0, 255, 0, 0.12); }
  100% { background-color: transparent; }
}

/* ------------------------------------------------------------ Avatares */
.iax-ava {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: hsl(var(--h, 210) 22% 24%);
  color: hsl(var(--h, 210) 60% 86%);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.iax-ava--lg {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.iax-quien {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.iax-quien > span:last-child {
  min-width: 0;
}

/* Miniatura de lo generado. */
.iax-thumb {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  flex: none;
  overflow: hidden;
  border-radius: 8px;
  background: #1c1e20;
  border: 1px solid var(--x-line);
}

.iax-thumb img,
.iax-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.iax-thumb__ic {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--x-sub);
}

.iax-thumb__ic svg {
  width: 16px;
  height: 16px;
}

.iax-thumb--vid::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  border-left: 6px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

/* --------------------------------------------------------------- Chips */
.iax-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 22px;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cfd1d6;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.iax-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, var(--x-muted));
}

.iax-chip--izipay { --c: #6ee787; }
.iax-chip--mano { --c: #7fb0ff; }
.iax-chip--regalo { --c: #c9a2ff; }
.iax-chip--descuento { --c: #ff8a8a; }
.iax-chip--warn { --c: var(--x-warn); color: var(--x-warn); }
.iax-chip--dev { --c: #ff8a8a; }
.iax-chip--curso { --c: #7fb0ff; }

/* --------------------------------------------------------------- Tablas */
.iax-scroll {
  overflow-x: auto;
}

.iax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.iax-table th {
  padding: 0.7rem 0.9rem;
  color: var(--x-muted);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--x-line);
  background: transparent;
}

.iax-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--x-line);
  color: var(--x-body);
  vertical-align: middle;
  white-space: nowrap;
}

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

.iax-table th.num,
.iax-table td.num {
  text-align: right;
}

.iax-table tbody tr[data-ia-email],
.iax-table tbody tr[data-ia-abrir] {
  cursor: pointer;
}

.iax-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.iax-table tfoot th,
.iax-table tfoot td {
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--x-line-2);
  border-bottom: 0;
  color: var(--x-text);
  font-weight: 600;
  font-size: 13.5px;
}

.iax-table .iax-fuerte {
  color: var(--x-text);
  font-weight: 600;
}

.iax-table .iax-neg {
  color: var(--x-neg);
}

.iax-table tr.is-devuelta td {
  color: var(--x-muted);
}

.iax-table tr.is-devuelta .iax-tachado {
  text-decoration: line-through;
}

/* El prompt en dos líneas como mucho: en una sola se comía el ancho de la tabla. */
.iax-table td.iax-td-prompt {
  white-space: normal;
  min-width: 14rem;
  width: 40%;
}

.iax-prompt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: var(--x-sub);
  line-height: 1.4;
}

.iax-mono {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--x-muted);
}

.iax-mas {
  display: flex;
  justify-content: center;
  padding: 0.8rem;
  border-top: 1px solid var(--x-line);
}

/* ------------------------------------------------------ Ficha del cliente */
.iax-ficha__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0.25rem 0 1.25rem;
}

.iax-ficha__top h3 {
  font-size: 1.25rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.iax-ficha__top p {
  margin: 0.2rem 0 0;
  color: var(--x-muted);
  font-size: 13px;
}

.iax-ficha__acc {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.iax-volver {
  margin-bottom: 0.5rem;
}

/* ------------------------------------------ Servicio y Ajustes (lo de antes)
   Las funciones que pintan la salud, la ganancia y la comisión siguen siendo
   las de antes (y sus pruebas en pruebas/panel-salud.js): generan .stat-card,
   .badge y tablas. Aquí solo se les pone la piel. */
.iax .stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

@media (max-width: 1100px) {
  .iax .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.iax .stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  background: var(--x-card);
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius);
  box-shadow: none;
}

.iax .stat-card .k {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--x-sub);
  font-size: 13px;
  font-weight: 500;
}

.iax .stat-card .k svg {
  width: 15px;
  height: 15px;
  color: var(--x-muted);
}

.iax .stat-card .v {
  color: var(--x-text);
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.iax .muted {
  color: var(--x-muted) !important;
}

.iax .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 22px;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  color: #cfd1d6;
  font-size: 12px;
  font-weight: 500;
}

.iax .badge--warn {
  background: rgba(242, 193, 78, 0.12);
  color: var(--x-warn);
}

.iax .badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.iax .empty-state {
  color: var(--x-muted);
  text-align: center;
}

.iax .empty-state h4 {
  color: var(--x-body);
  font-size: 14px;
  margin-bottom: 0.2rem;
}

.iax .empty-state p {
  margin: 0;
}

.iax code {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  background: transparent;
  color: var(--x-muted);
}

.iax-ajustes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .iax-ajustes {
    grid-template-columns: minmax(0, 1fr);
  }
}

.iax-ajustes .iax-card + .iax-card {
  margin-top: 0;
}

.iax-form-fila {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.iax-form-fila .iax-field {
  width: 8.5rem;
}

.iax-texto {
  margin: 0 0 1rem;
  color: var(--x-sub);
  font-size: 13.5px;
  line-height: 1.5;
}

.iax-texto b {
  color: var(--x-body);
  font-weight: 500;
}

.iax-ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--x-sub);
}

/* ---------------------------------------------- Hoja lateral: cargar saldo */
.iax-hoja {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: #16181b;
  color: #d9dadd;
  color-scheme: dark;
  font-family: Inter, "Inter Fallback", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  box-shadow: -30px 0 60px -20px rgba(0, 0, 0, 0.6);
  transform: translateX(100%);
  transition-property: transform, display, overlay;
  transition-duration: 0.26s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  transition-behavior: allow-discrete;
}

.iax-hoja[open] {
  transform: translateX(0);
}

@starting-style {
  .iax-hoja[open] {
    transform: translateX(100%);
  }
}

.iax-hoja::backdrop {
  background-color: rgba(0, 0, 0, 0);
  transition:
    display 0.26s allow-discrete,
    overlay 0.26s allow-discrete,
    background-color 0.26s ease-out;
}

.iax-hoja[open]::backdrop {
  background-color: rgba(0, 0, 0, 0.55);
}

@starting-style {
  .iax-hoja[open]::backdrop {
    background-color: rgba(0, 0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .iax-hoja {
    transition-duration: 0.01s;
  }

  .iax-vivo__dot,
  .iax-nuevo {
    animation: none;
  }
}

.iax-hoja form {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.iax-hoja__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.iax-hoja__head h3 {
  margin: 0;
  color: #f7f7f8;
  font-size: 16px;
  font-weight: 600;
}

.iax-hoja__body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}

.iax-hoja__foot {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.iax-hoja .iax-input {
  width: 100%;
  height: 40px;
}

.iax-hoja__saldo {
  color: var(--x-muted, #7b8087);
  font-size: 13px;
  min-height: 1.2em;
}

.iax-hoja__saldo b {
  color: #f7f7f8;
  font-weight: 600;
}

/* ------------------------------------------------------------- Celular */
@media (max-width: 640px) {
  .iax-head h2 {
    font-size: 1.25rem;
  }

  .iax-head__acc {
    width: 100%;
  }

  .iax-card {
    padding: 0.95rem;
  }

  .iax-card--flush {
    padding: 0;
  }

  .iax-search {
    width: 100%;
  }

  .iax-ficha__acc {
    margin-left: 0;
    width: 100%;
  }
}
