/* IEICII Eventos · cierre visual v274.1.2
   Cargado al final de la cascada. Aplica a cualquier vista cuyo dominio visual sea event. */
body[data-ui-domain="event"]{
  --event-action-bg:var(--brand,#1f5eff);
  --event-action-text:var(--brand-contrast,#fff);
  --event-action-border:color-mix(in srgb,var(--brand,#1f5eff) 78%,#111827);
  --event-secondary-border:color-mix(in srgb,var(--text,#172033) 30%,var(--line,#d8e0ea));
}

/* Acciones: activo debe verse activo. */
body[data-ui-domain="event"] .btn.primary:not(:disabled):not([disabled]):not([aria-disabled="true"]),
body[data-ui-domain="event"] button.btn.primary:not(:disabled):not([disabled]):not([aria-disabled="true"]),
body[data-ui-domain="event"] a.btn.primary:not([aria-disabled="true"]){
  background:linear-gradient(135deg,var(--event-action-bg),color-mix(in srgb,var(--event-action-bg) 82%,#0b1e48))!important;
  border-color:var(--event-action-border)!important;
  color:var(--event-action-text)!important;
  opacity:1!important;
  font-weight:900!important;
  text-shadow:none!important;
  box-shadow:0 7px 18px color-mix(in srgb,var(--event-action-bg) 24%,transparent)!important;
}
body[data-ui-domain="event"] .btn.primary:not(:disabled):hover,
body[data-ui-domain="event"] button.btn.primary:not(:disabled):hover,
body[data-ui-domain="event"] a.btn.primary:hover{
  filter:brightness(.96)!important;
  transform:translateY(-1px);
  box-shadow:0 10px 24px color-mix(in srgb,var(--event-action-bg) 30%,transparent)!important;
}

/* Secundarios: no deben confundirse con texto plano. */
body[data-ui-domain="event"] .btn:not(.primary):not(.danger):not(.light):not(:disabled):not([disabled]),
body[data-ui-domain="event"] button.btn:not(.primary):not(.danger):not(.light):not(:disabled):not([disabled]),
body[data-ui-domain="event"] a.btn:not(.primary):not(.danger):not(.light):not([aria-disabled="true"]){
  background:var(--surface,#fff)!important;
  color:var(--text,#172033)!important;
  border-color:var(--event-secondary-border)!important;
  opacity:1!important;
  font-weight:850!important;
  box-shadow:0 3px 10px rgba(15,23,42,.08)!important;
}
body[data-ui-domain="event"] .btn:not(.primary):not(.danger):not(.light):not(:disabled):hover,
body[data-ui-domain="event"] button.btn:not(.primary):not(.danger):not(.light):not(:disabled):hover,
body[data-ui-domain="event"] a.btn:not(.primary):not(.danger):not(.light):hover{
  border-color:color-mix(in srgb,var(--brand,#1f5eff) 48%,var(--line,#d8e0ea))!important;
  background:color-mix(in srgb,var(--brand,#1f5eff) 5%,var(--surface,#fff))!important;
}

/* Peligro legible y no lavado. */
body[data-ui-domain="event"] .btn.danger:not(:disabled),
body[data-ui-domain="event"] button.btn.danger:not(:disabled),
body[data-ui-domain="event"] a.btn.danger{
  background:color-mix(in srgb,var(--bad,#c0392b) 9%,var(--surface,#fff))!important;
  color:color-mix(in srgb,var(--bad,#c0392b) 88%,#111827)!important;
  border-color:color-mix(in srgb,var(--bad,#c0392b) 58%,var(--line,#d8e0ea))!important;
  opacity:1!important;
  font-weight:900!important;
}

/* Deshabilitado: legible, pero inequívocamente no accionable. */
body[data-ui-domain="event"] .btn:disabled,
body[data-ui-domain="event"] button.btn:disabled,
body[data-ui-domain="event"] .btn[disabled],
body[data-ui-domain="event"] [aria-disabled="true"].btn{
  background:color-mix(in srgb,var(--muted,#667085) 13%,var(--surface,#fff))!important;
  color:color-mix(in srgb,var(--muted,#667085) 78%,var(--text,#172033))!important;
  border-color:color-mix(in srgb,var(--muted,#667085) 32%,var(--line,#d8e0ea))!important;
  box-shadow:none!important;
  opacity:.72!important;
  cursor:not-allowed!important;
  filter:none!important;
}

/* Resumen del configurador: cifra separada de la etiqueta. */
body[data-ui-domain="event"] .event-config-status-v76>div{
  grid-template-columns:54px minmax(0,1fr)!important;
  gap:16px!important;
  min-height:62px!important;
  padding:12px 14px!important;
  border:1px solid color-mix(in srgb,var(--brand,#1f5eff) 18%,var(--line,#d8e0ea))!important;
  background:var(--surface,#fff)!important;
}
body[data-ui-domain="event"] .event-config-status-v76>div>strong{
  display:grid!important;place-items:center!important;width:44px!important;height:44px!important;
  border-radius:13px!important;background:color-mix(in srgb,var(--brand,#1f5eff) 9%,var(--surface,#fff))!important;
  color:var(--brand,#1f5eff)!important;font-size:1.38rem!important;line-height:1!important;margin:0!important;
}
body[data-ui-domain="event"] .event-config-status-v76>div>span{
  display:block!important;margin:0!important;font-weight:900!important;line-height:1.22!important;color:var(--text,#172033)!important;
}

/* KPIs del centro de control y cierre. */
body[data-ui-domain="event"] .event-control-kpis-v184 article,
body[data-ui-domain="event"] .event-program-kpis-v184 article{
  gap:8px!important;background:var(--surface,#fff)!important;
  border-color:color-mix(in srgb,var(--brand,#1f5eff) 14%,var(--line,#d8e0ea))!important;
  box-shadow:0 5px 16px rgba(15,23,42,.045)!important;
}
body[data-ui-domain="event"] .event-control-kpis-v184 article>span,
body[data-ui-domain="event"] .event-program-kpis-v184 article>span{display:block!important;margin:0!important;color:var(--muted,#667085)!important;font-weight:850!important}
body[data-ui-domain="event"] .event-control-kpis-v184 article>strong,
body[data-ui-domain="event"] .event-program-kpis-v184 article>strong{display:block!important;margin:0!important;color:var(--text,#172033)!important;font-size:1.6rem!important;line-height:1.05!important}
body[data-ui-domain="event"] .event-control-kpis-v184 article>small,
body[data-ui-domain="event"] .event-program-kpis-v184 article>small{display:block!important;margin:0!important;color:var(--muted,#667085)!important;line-height:1.35!important}

/* Tarjetas de módulos: nombre y contador nunca pegados. */
body[data-ui-domain="event"] .event-module-card-v184>div:first-child{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:14px!important;width:100%!important;
}
body[data-ui-domain="event"] .event-module-card-v184>div:first-child>span{
  min-width:0!important;display:block!important;font-weight:850!important;color:var(--text,#172033)!important;
}
body[data-ui-domain="event"] .event-module-card-v184>div:first-child>strong{
  display:inline-grid!important;place-items:center!important;min-width:34px!important;height:34px!important;padding:0 9px!important;
  border-radius:999px!important;background:color-mix(in srgb,var(--brand,#1f5eff) 10%,var(--surface,#fff))!important;
  color:var(--brand,#1f5eff)!important;font-size:.9rem!important;font-weight:950!important;line-height:1!important;
}
body[data-ui-domain="event"] .event-module-card-v184{
  background:var(--surface,#fff)!important;border-color:color-mix(in srgb,var(--brand,#1f5eff) 16%,var(--line,#d8e0ea))!important;
  box-shadow:0 5px 15px rgba(15,23,42,.035)!important;
}
body[data-ui-domain="event"] .event-module-card-v184.is-ready{
  background:color-mix(in srgb,var(--ok,#15805f) 4%,var(--surface,#fff))!important;
  border-color:color-mix(in srgb,var(--ok,#15805f) 38%,var(--line,#d8e0ea))!important;
}
body[data-ui-domain="event"] .event-module-card-v184.is-attention{
  background:color-mix(in srgb,var(--warn,#b26a00) 5%,var(--surface,#fff))!important;
  border-color:color-mix(in srgb,var(--warn,#b26a00) 44%,var(--line,#d8e0ea))!important;
}
body[data-ui-domain="event"] .event-module-card-v184:hover{
  transform:translateY(-2px)!important;box-shadow:0 10px 24px rgba(15,23,42,.09)!important;
}

/* Auditoría: título y explicación no se funden. */
body[data-ui-domain="event"] .event-overview-admin-v184 .notice.slim{
  display:grid!important;grid-template-columns:minmax(0,max-content) minmax(0,1fr)!important;gap:8px!important;align-items:start!important;
}
body[data-ui-domain="event"] .event-overview-admin-v184 .notice.slim>strong{display:block!important;margin:0!important;line-height:1.35!important}
body[data-ui-domain="event"] .event-overview-admin-v184 .notice.slim>small{display:block!important;margin:0!important;line-height:1.4!important;color:var(--muted,#667085)!important}

/* Formularios / paneles de eventos: borde visible sin teñir todo. */
body[data-ui-domain="event"] .workspace-section.card,
body[data-ui-domain="event"] .event-config-assistant-v76,
body[data-ui-domain="event"] .event-public-module-card-v184{
  border-color:color-mix(in srgb,var(--text,#172033) 10%,var(--line,#d8e0ea))!important;
}

/* Mantener enlaces/acciones en headers dentro del ancho disponible. */
body[data-ui-domain="event"] .section-head>.actions{flex-wrap:wrap!important;justify-content:flex-end!important}
body[data-ui-domain="event"] .section-head>.actions .btn{max-width:100%!important;white-space:nowrap!important}

@media(max-width:760px){
  body[data-ui-domain="event"] .section-head>.actions{width:100%!important;justify-content:stretch!important}
  body[data-ui-domain="event"] .section-head>.actions .btn{flex:1 1 100%!important;justify-content:center!important}
  body[data-ui-domain="event"] .event-overview-admin-v184 .notice.slim{grid-template-columns:1fr!important}
}
