/* v716 · Ajustes completo: una sola gramática visual de arriba abajo.
   También deja clases reutilizables para extender este mismo patrón al resto del panel. */
:root{
  --eg-ui-surface:#0d1012;
  --eg-ui-surface-inner:#090b0d;
  --eg-ui-line:rgba(229,231,235,.14);
  --eg-ui-line-soft:rgba(229,231,235,.08);
  --eg-ui-radius:15px;
  --eg-ui-pad-x:26px;
  --eg-ui-pad-y:22px;
  --eg-ui-muted:#9aa1a6;
}

/* Clases comunes, listas para reutilizar en otras plantillas sin inventar otro sistema. */
.eg-ui-card{
  box-sizing:border-box;
  background:var(--eg-ui-surface);
  border:1px solid var(--eg-ui-line);
  border-radius:var(--eg-ui-radius);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03),0 12px 28px rgba(0,0,0,.24);
}
.eg-ui-section{padding:var(--eg-ui-pad-y) var(--eg-ui-pad-x)}
.eg-ui-table{width:100%;border-collapse:separate;border-spacing:0;background:var(--eg-ui-surface-inner);border:1px solid var(--eg-ui-line-soft);border-radius:11px;overflow:hidden}
.eg-ui-table th,.eg-ui-table td{padding:12px 14px;border-bottom:1px solid var(--eg-ui-line-soft);text-align:left;vertical-align:middle}
.eg-ui-table tr:last-child td{border-bottom:0}

/* AJUSTES: todos los módulos independientes usan exactamente la misma superficie. */
body.eg-pagina-ajustes .eg-ajustes-hero,
body.eg-pagina-ajustes .eg-ajustes-kpi,
body.eg-pagina-ajustes .eg-ajustes-action-card,
body.eg-pagina-ajustes .eg-ajustes-tech,
body.eg-pagina-ajustes .eg-ajustes-config-panel,
body.eg-pagina-ajustes .eg-ajustes-section-card{
  background:var(--eg-ui-surface)!important;
  border:1px solid var(--eg-ui-line)!important;
  border-radius:var(--eg-ui-radius)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03),0 12px 28px rgba(0,0,0,.24)!important;
}

/* Nada de overlays, degradados heredados ni cambio de tono a mitad de página. */
body.eg-pagina-ajustes .eg-ajustes-hero::before,
body.eg-pagina-ajustes .eg-ajustes-hero::after,
body.eg-pagina-ajustes .eg-ajustes-kpi::before,
body.eg-pagina-ajustes .eg-ajustes-kpi::after,
body.eg-pagina-ajustes .eg-ajustes-action-card::before,
body.eg-pagina-ajustes .eg-ajustes-action-card::after,
body.eg-pagina-ajustes .eg-ajustes-tech::before,
body.eg-pagina-ajustes .eg-ajustes-tech::after,
body.eg-pagina-ajustes .eg-ajustes-config-panel::before,
body.eg-pagina-ajustes .eg-ajustes-config-panel::after,
body.eg-pagina-ajustes .eg-ajustes-section-card::before,
body.eg-pagina-ajustes .eg-ajustes-section-card::after{
  content:none!important;display:none!important;background:none!important
}

/* Tarjetas posteriores al formulario: misma respiración y jerarquía que la parte superior. */
body.eg-pagina-ajustes .eg-ajustes-section-card{
  box-sizing:border-box!important;
  padding:24px 26px!important;
  margin:0 0 18px!important;
  overflow:hidden!important;
}
body.eg-pagina-ajustes .eg-ajustes-section-card>h2,
body.eg-pagina-ajustes .eg-ajustes-section-card>h3{
  margin:0 0 8px!important;
  padding:0!important;
  border:0!important;
  background:none!important;
  box-shadow:none!important;
  color:#f3f5f6!important;
}
body.eg-pagina-ajustes .eg-ajustes-section-card>h2{font-size:24px!important;line-height:1.15!important}
body.eg-pagina-ajustes .eg-ajustes-section-card>h3{font-size:20px!important;line-height:1.2!important}
body.eg-pagina-ajustes .eg-ajustes-section-card>p:first-of-type{margin-top:0!important}

/* Si un panel vive DENTRO del formulario grande, deja de ser caja dentro de caja:
   pasa a ser una sección plana del mismo módulo, separada solo por una línea. */
body.eg-pagina-ajustes .eg-ajustes-config-panel .eg-ajustes-section-flat,
body.eg-pagina-ajustes .eg-ajustes-config-panel>.panel{
  margin:0!important;
  padding:22px 26px!important;
  border:0!important;
  border-top:1px solid var(--eg-ui-line-soft)!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent!important;
}

/* El contenido largo de Configuración mantiene la misma alineación lateral de principio a fin. */
body.eg-pagina-ajustes .eg-ajustes-config-panel{
  padding:0!important;
  overflow:hidden!important;
}
body.eg-pagina-ajustes .eg-ajustes-config-head{
  padding:22px 26px 18px!important;
  margin:0!important;
  background:transparent!important;
  border-bottom:1px solid var(--eg-ui-line)!important;
}
body.eg-pagina-ajustes .eg-ajustes-config-panel>h2,
body.eg-pagina-ajustes .eg-ajustes-config-panel>h3,
body.eg-pagina-ajustes .eg-ajustes-config-panel>p,
body.eg-pagina-ajustes .eg-ajustes-config-panel>label,
body.eg-pagina-ajustes .eg-ajustes-config-panel>.filtros,
body.eg-pagina-ajustes .eg-ajustes-config-panel>details,
body.eg-pagina-ajustes .eg-ajustes-config-panel>hr{
  box-sizing:border-box!important;
  margin-left:26px!important;
  margin-right:26px!important;
}
body.eg-pagina-ajustes .eg-ajustes-config-panel>h2,
body.eg-pagina-ajustes .eg-ajustes-config-panel>h3{
  color:#f3f5f6!important;
}
body.eg-pagina-ajustes .eg-ajustes-config-panel>h2{
  font-size:23px!important;
  line-height:1.15!important;
  margin-top:26px!important;
  margin-bottom:8px!important;
  padding-top:22px!important;
  border-top:1px solid var(--eg-ui-line-soft)!important;
}
body.eg-pagina-ajustes .eg-ajustes-config-panel>.eg-ajustes-config-head+h2{
  margin-top:22px!important;padding-top:0!important;border-top:0!important
}
body.eg-pagina-ajustes .eg-ajustes-config-panel>h3{
  font-size:19px!important;line-height:1.2!important;margin-top:24px!important;margin-bottom:8px!important
}
body.eg-pagina-ajustes .eg-ajustes-config-panel>p,
body.eg-pagina-ajustes .eg-ajustes-config-panel>label,
body.eg-pagina-ajustes .eg-ajustes-section-card p,
body.eg-pagina-ajustes .eg-ajustes-section-card label{
  color:#aeb4b8;
  line-height:1.55;
}

/* Inputs: no vuelven a tocar el borde de una tabla/tarjeta ni se salen de su módulo. */
body.eg-pagina-ajustes input[type="text"],
body.eg-pagina-ajustes input[type="number"],
body.eg-pagina-ajustes input[type="url"],
body.eg-pagina-ajustes input[type="password"],
body.eg-pagina-ajustes input[type="file"],
body.eg-pagina-ajustes textarea,
body.eg-pagina-ajustes select{
  box-sizing:border-box!important;
  min-height:42px;
}
body.eg-pagina-ajustes input[type="text"],
body.eg-pagina-ajustes input[type="url"],
body.eg-pagina-ajustes input[type="password"],
body.eg-pagina-ajustes textarea,
body.eg-pagina-ajustes select{
  max-width:100%!important;
}
body.eg-pagina-ajustes .eg-ajustes-section-card>form,
body.eg-pagina-ajustes .eg-ajustes-section-card>div:not(.alcance):not(.tarjeta),
body.eg-pagina-ajustes .eg-ajustes-section-card>label{
  box-sizing:border-box;
}

/* Tablas: mismo borde exterior, filas respiradas y separación lateral real. */
body.eg-pagina-ajustes .eg-ajustes-section-card>table,
body.eg-pagina-ajustes .eg-ajustes-config-panel table,
body.eg-pagina-ajustes #ajustesVolumenes table{
  width:100%!important;
  margin:14px 0!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  background:var(--eg-ui-surface-inner)!important;
  border:1px solid var(--eg-ui-line-soft)!important;
  border-radius:11px!important;
  overflow:hidden!important;
}
body.eg-pagina-ajustes .eg-ajustes-section-card th,
body.eg-pagina-ajustes .eg-ajustes-section-card td,
body.eg-pagina-ajustes .eg-ajustes-config-panel th,
body.eg-pagina-ajustes .eg-ajustes-config-panel td{
  padding:12px 14px!important;
  border-bottom:1px solid var(--eg-ui-line-soft)!important;
  vertical-align:middle!important;
}
body.eg-pagina-ajustes .eg-ajustes-section-card th,
body.eg-pagina-ajustes .eg-ajustes-config-panel th{
  color:#aeb4b8!important;
  font-size:12px!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}
body.eg-pagina-ajustes .eg-ajustes-section-card tr:last-child td,
body.eg-pagina-ajustes .eg-ajustes-config-panel tr:last-child td{border-bottom:0!important}

/* Fila de añadir volumen: separación real respecto de tabla y bordes. */
body.eg-pagina-ajustes #ajustesVolumenes>form{
  margin-top:16px!important;
  padding-top:16px!important;
  border-top:1px solid var(--eg-ui-line-soft)!important;
  gap:12px!important;
}
body.eg-pagina-ajustes #ajustesVolumenes>form label{min-width:180px}

/* Bloques auxiliares dentro de una tarjeta nunca cambian el color general. */
body.eg-pagina-ajustes .eg-ajustes-section-card .tarjeta,
body.eg-pagina-ajustes .eg-ajustes-section-card .alcance,
body.eg-pagina-ajustes .eg-ajustes-config-panel .tarjeta,
body.eg-pagina-ajustes .eg-ajustes-config-panel .alcance{
  background:transparent!important;
  border:1px solid var(--eg-ui-line-soft)!important;
  border-radius:10px!important;
  box-shadow:none!important;
  padding:14px 16px!important;
}

/* Coherencia vertical entre módulos que antes heredaban márgenes aleatorios. */
body.eg-pagina-ajustes .eg-ajustes-section-card+ .eg-ajustes-section-card{margin-top:0!important}
body.eg-pagina-ajustes .eg-ajustes-section-card form[style*="display:flex"]{gap:10px!important}
body.eg-pagina-ajustes .eg-ajustes-section-card form[style*="display:flex"] input{min-width:0}

@media(max-width:900px){
  :root{--eg-ui-pad-x:20px;--eg-ui-pad-y:20px}
  body.eg-pagina-ajustes .eg-ajustes-section-card{padding:20px!important}
  body.eg-pagina-ajustes .eg-ajustes-config-head{padding:20px!important}
  body.eg-pagina-ajustes .eg-ajustes-config-panel>h2,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>h3,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>p,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>label,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>.filtros,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>details,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>hr{margin-left:20px!important;margin-right:20px!important}
}
@media(max-width:560px){
  :root{--eg-ui-pad-x:16px;--eg-ui-pad-y:18px}
  body.eg-pagina-ajustes .eg-ajustes-section-card{padding:18px 16px!important;border-radius:12px!important}
  body.eg-pagina-ajustes .eg-ajustes-config-head{padding:18px 16px!important}
  body.eg-pagina-ajustes .eg-ajustes-config-panel>h2,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>h3,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>p,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>label,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>.filtros,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>details,
  body.eg-pagina-ajustes .eg-ajustes-config-panel>hr{margin-left:16px!important;margin-right:16px!important}
  body.eg-pagina-ajustes .eg-ajustes-section-card th,
  body.eg-pagina-ajustes .eg-ajustes-section-card td{padding:10px!important}
  body.eg-pagina-ajustes #ajustesVolumenes>form{display:grid!important;grid-template-columns:1fr!important}
  body.eg-pagina-ajustes #ajustesVolumenes>form label,
  body.eg-pagina-ajustes #ajustesVolumenes>form button{width:100%!important;min-width:0!important}
}
