/* =========================================================
   S.I.C. 2FA Modal Pro
   Se usa sobre login.php. No cambia la URL visible.
   ========================================================= */

body.sic-2fa-active .wrap-login100 {
  transform: scale(.93) translateY(8px);
  filter: blur(2px) saturate(.8);
  opacity: .35;
  transition: transform .35s ease, filter .35s ease, opacity .35s ease;
  pointer-events: none;
}

.wrap-login100 {
  transition: transform .35s ease, filter .35s ease, opacity .35s ease;
}

.sic-2fa-popup.swal2-popup {
  border-radius: 28px !important;
  padding: 0 !important;
  overflow: hidden !important;
  width: 460px !important;
  max-width: calc(100vw - 24px) !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 28px 80px rgba(5, 14, 38, .36) !important;
  backdrop-filter: blur(18px);
}

.sic-2fa-popup .swal2-html-container {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.sic-2fa-backdrop.swal2-backdrop-show {
  background: radial-gradient(circle at top left, rgba(37,117,252,.34), rgba(8,16,34,.68) 45%, rgba(8,16,34,.82)) !important;
  backdrop-filter: blur(8px);
}

.sic-2fa-modal {
  position: relative;
  padding: 34px 34px 30px;
  color: #152033;
  text-align: center;
}

.sic-2fa-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  width: 260px;
  height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(37,117,252,.34), rgba(37,117,252,0) 68%);
  pointer-events: none;
}

.sic-2fa-icon {
  position: relative;
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2575fc, #6a11cb);
  color: #fff;
  box-shadow: 0 18px 38px rgba(37,117,252,.36);
  animation: sicFloatIn .55s ease both;
}

.sic-2fa-icon svg {
  width: 38px;
  height: 38px;
}

.sic-2fa-title {
  position: relative;
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.4px;
}

.sic-2fa-subtitle {
  position: relative;
  margin: 9px auto 18px;
  max-width: 360px;
  color: #69748a;
  font-size: 14.5px;
  line-height: 1.5;
}

.sic-2fa-qr-card {
  position: relative;
  display: inline-flex;
  padding: 13px;
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(21,32,51,.08);
  box-shadow: 0 18px 45px rgba(21,32,51,.12);
  animation: sicPop .42s ease both;
}

.sic-2fa-qr-card img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 16px;
}

.sic-2fa-secret-box {
  margin: 14px auto 16px;
  padding: 12px 14px;
  max-width: 360px;
  border-radius: 16px;
  background: #f3f6fb;
  border: 1px dashed rgba(37,117,252,.35);
}

.sic-2fa-secret-label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: #7b879b;
  font-weight: 700;
}

.sic-2fa-secret {
  display: block;
  overflow-wrap: anywhere;
  color: #1e4fba;
  font-family: Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.sic-2fa-code-wrap {
  position: relative;
  margin-top: 12px;
}

.sic-2fa-code {
  width: 100%;
  height: 58px;
  border: 2px solid #dbe4f3;
  border-radius: 18px;
  outline: none;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 9px;
  color: #152033;
  background: #fbfdff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sic-2fa-code:focus {
  border-color: #2575fc;
  box-shadow: 0 0 0 5px rgba(37,117,252,.12);
  transform: translateY(-1px);
}

.sic-2fa-help {
  margin: 12px 0 0;
  color: #8490a3;
  font-size: 12.5px;
}

.sic-2fa-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.sic-2fa-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.sic-2fa-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2575fc, #6a11cb);
  box-shadow: 0 16px 32px rgba(37,117,252,.26);
}

.sic-2fa-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(37,117,252,.34);
}

.sic-2fa-btn-secondary {
  color: #415069;
  background: #eef3fb;
}

.sic-2fa-btn[disabled] {
  opacity: .72;
  cursor: not-allowed;
  transform: none !important;
}

.sic-2fa-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  animation: sicSpin .75s linear infinite;
}

.sic-2fa-success {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 22px 48px rgba(34,197,94,.34);
  animation: sicSuccessPop .52s ease both;
}

.sic-2fa-success svg {
  width: 48px;
  height: 48px;
}

.sic-2fa-shake {
  animation: sicShake .42s ease both;
}

@keyframes sicFloatIn {
  from { opacity: 0; transform: translateY(12px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sicPop {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes sicSpin {
  to { transform: rotate(360deg); }
}

@keyframes sicSuccessPop {
  0% { opacity: 0; transform: scale(.78); }
  60% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes sicShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

@media (max-width: 480px) {
  .sic-2fa-modal {
    padding: 28px 20px 24px;
  }

  .sic-2fa-title {
    font-size: 22px;
  }

  .sic-2fa-qr-card img {
    width: 194px;
    height: 194px;
  }

  .sic-2fa-actions {
    flex-direction: column-reverse;
  }
}
