/* Popup SIUC para páginas de autenticación. Compatible con CSP y rutas amigables. */
.siuc-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 28, 34, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: siuc-auth-popup-fade .16s ease-out;
}

.siuc-popup {
  width: min(420px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 65px rgba(24, 28, 34, .24);
  animation: siuc-auth-popup-in .2s ease-out;
}

.siuc-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #f0f1f3;
  background: #fff;
}

.siuc-popup-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.siuc-popup-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef5ff;
  color: #5b83c9;
}

.siuc-popup-icon .material-symbols-outlined,
.siuc-popup-icon.material-symbols-outlined {
  width: 19px;
  height: 19px;
  font-size: 19px;
  color: currentColor;
}

.siuc-popup--success .siuc-popup-icon {
  background: #e8f6f4;
  color: #087d78;
}

.siuc-popup--error .siuc-popup-icon {
  background: #fdeceb;
  color: #da291c;
}

.siuc-popup--warning .siuc-popup-icon {
  background: #fff3e8;
  color: #e56a21;
}

.siuc-popup-title {
  margin: 0;
  color: #4f5358;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 750;
}

.siuc-popup-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #a0a4a8;
  font-size: 19px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.siuc-popup-close:hover,
.siuc-popup-close:focus-visible {
  background: #f3f4f5;
  color: #da291c;
  outline: none;
}

.siuc-popup-body {
  padding: 20px 22px 22px;
  background: #fff;
}

.siuc-popup-msg {
  margin: 0;
  color: #64686d;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.siuc-popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
  background: #fff;
}

.siuc-popup-footer .siuc-btn,
.siuc-popup-footer button[data-act] {
  min-width: 104px;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.siuc-popup-footer [data-act="ok"] {
  background: #da291c;
  border-color: #da291c;
  color: #fff;
  box-shadow: 0 5px 14px rgba(218, 41, 28, .2);
}

.siuc-popup-footer [data-act="ok"]:hover,
.siuc-popup-footer [data-act="ok"]:focus-visible {
  background: #c52419;
  border-color: #c52419;
  outline: none;
}

.siuc-popup-footer [data-act="cancel"] {
  background: #fff;
  border-color: #d8dade;
  color: #64686d;
}

@keyframes siuc-auth-popup-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes siuc-auth-popup-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
  .siuc-popup-backdrop { padding: 14px; align-items: flex-end; }
  .siuc-popup { width: 100%; border-radius: 18px 18px 12px 12px; }
  .siuc-popup-footer { flex-direction: column-reverse; }
  .siuc-popup-footer .siuc-btn,
  .siuc-popup-footer button[data-act] { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .siuc-popup-backdrop,
  .siuc-popup { animation: none; }
}
