/* creaTECH MFA / 2FA — UI profesional */
.mfa-shell {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  max-width: 460px;
  margin: 1.25rem auto;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.mfa-shell-header {
  background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
  color: #f8fafc;
  padding: 1.1rem 1.35rem;
  text-align: center;
}
.mfa-shell-header .mfa-kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.25rem;
}
.mfa-shell-header h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.mfa-shell-header p {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  opacity: 0.92;
}
.mfa-shell-body {
  padding: 1.35rem 1.5rem 1rem;
  text-align: center;
}
.mfa-shell-body .mfa-steps {
  text-align: left;
  max-width: 420px;
  margin: 0 auto 1.1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #334155;
}
.mfa-shell-body .mfa-steps ol {
  margin: 0.4rem 0 0 1.1rem;
  padding: 0;
}
.mfa-shell-body .mfa-steps li { margin-bottom: 0.35rem; }
.mfa-store-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.mfa-store-links a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  color: #0f766e;
  background: #f8fafc;
}
.mfa-store-links a:hover {
  background: #ecfdf5;
  border-color: #0f766e;
}
.mfa-qr-wrap {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  margin: 0.5rem auto;
}
.mfa-secret {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  background: #f1f5f9;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  word-break: break-all;
  max-width: 100%;
}
.mfa-field {
  max-width: 280px;
  margin: 0.65rem auto;
  text-align: left;
}
.mfa-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.25rem;
}
.mfa-field input.form-control {
  text-align: center;
  font-size: 1.15rem;
  letter-spacing: 0.2em;
}

/* Casillas OTP 6/8 dígitos — cuadros grandes */
.modal-content.mfa-modal-content {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.modal-dialog.mfa-modal-dialog {
  max-width: 500px;
}

.mfa-otp {
  max-width: 100%;
  margin: 1.15rem auto 0.5rem;
  text-align: center;
}
.mfa-otp-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mfa-otp-cells {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 0.55rem;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
}
.mfa-otp-cell {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 56px;
  flex: 0 0 56px;
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  height: 64px !important;
  min-height: 64px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid #64748b !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #0f172a !important;
  font-family: "Segoe UI", Consolas, "Courier New", monospace !important;
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  line-height: 64px !important;
  text-align: center !important;
  letter-spacing: 0 !important;
  float: none !important;
  caret-color: #0f766e;
  outline: none !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.12s ease;
  -webkit-appearance: none !important;
  -moz-appearance: textfield !important;
  appearance: none !important;
}
.mfa-otp-cell:hover {
  border-color: #0f766e !important;
  background: #f8fafc !important;
}
.mfa-otp-cell:focus {
  border-color: #0f766e !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.28) !important;
  transform: translateY(-2px);
}
.mfa-otp-cell.filled {
  border-color: #0d9488 !important;
  background: #f0fdfa !important;
  color: #134e4a !important;
}
.mfa-otp-hint {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}
.mfa-otp-mode {
  margin: 0.85rem 0 0.15rem;
  text-align: center;
  font-size: 0.86rem;
}
.mfa-otp-mode-link {
  color: #0f766e;
  text-decoration: none;
  border-bottom: 1px dotted #5eead4;
  padding-bottom: 1px;
  font-weight: 600;
}
.mfa-otp-mode-link:hover {
  color: #134e4a;
  border-bottom-style: solid;
}
.mfa-otp-challenge {
  margin: 0.35rem auto 0.65rem;
}
.mfa-otp[data-length="8"] .mfa-otp-cell {
  -ms-flex: 0 0 40px;
  flex: 0 0 40px;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 52px !important;
  min-height: 52px !important;
  font-size: 1.35rem !important;
  line-height: 52px !important;
  border-radius: 10px !important;
}
.mfa-otp[data-length="8"] .mfa-otp-cells {
  gap: 0.35rem;
}

.mfa-actions .btn-mfa,
.mfa-actions .btn.btn-mfa,
#Modal1 .mfa-actions .btn-mfa {
  background: #0f766e !important;
  background-color: #0f766e !important;
  background-image: none !important;
  border: 1px solid #0f766e !important;
  color: #fff !important;
  min-width: 200px;
  font-weight: 600;
  padding: 0.65rem 1.35rem !important;
  border-radius: 8px !important;
  text-transform: none !important;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35) !important;
}
.mfa-actions .btn-mfa:hover,
.mfa-actions .btn.btn-mfa:hover,
#Modal1 .mfa-actions .btn-mfa:hover,
.mfa-actions .btn-mfa:focus,
.mfa-actions .btn-mfa:active {
  background: #0d9488 !important;
  background-color: #0d9488 !important;
  background-image: none !important;
  border-color: #0d9488 !important;
  color: #fff !important;
}

@media (max-width: 420px) {
  .mfa-otp-cells { gap: 0.35rem; }
  .mfa-otp-cell {
    -ms-flex: 0 0 42px;
    flex: 0 0 42px;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 50px !important;
    min-height: 50px !important;
    font-size: 1.4rem !important;
    line-height: 50px !important;
    border-radius: 10px !important;
  }
  .mfa-otp[data-length="8"] .mfa-otp-cell {
    -ms-flex: 0 0 32px;
    flex: 0 0 32px;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 44px !important;
    min-height: 44px !important;
    font-size: 1.1rem !important;
    line-height: 44px !important;
  }
}

.mfa-shell-footer {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.85rem 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}
.mfa-shell-footer a { color: #0f766e; }
.mfa-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.mfa-actions .btn { min-width: 120px; }

/* Panel opciones de cuenta */
.mfa-panel {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.mfa-panel-top {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.mfa-status-badge {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  line-height: 1;
}
.mfa-status-badge.ok {
  background: radial-gradient(circle at 30% 30%, #86efac, #16a34a 70%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}
.mfa-status-badge.off {
  background: radial-gradient(circle at 30% 30%, #e2e8f0, #94a3b8 75%);
  color: #fff;
}
.mfa-panel-meta h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
}
.mfa-panel-meta .mfa-meta-line {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0.15rem 0;
}
.mfa-panel-meta .mfa-meta-line strong { color: #334155; }
.mfa-panel-controls {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}
.mfa-panel-controls .form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}
.mfa-panel-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.mfa-panel .mfa-disabled-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Opciones: Idioma | 2FA en 2 columnas + leyendas */
.mfa-idioma-row > [class*="col-"] {
  margin-bottom: 1rem;
}
.mfa-idioma-row .mfa-panel {
  height: 100%;
  margin-bottom: 0;
}
.mfa-idioma-row .mfa-status-badge {
  width: 64px;
  height: 64px;
  font-size: 1.85rem;
}
.mfa-cmd-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.mfa-cmd-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}
.mfa-cmd-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.mfa-cmd-help {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #64748b;
  max-width: 36rem;
}
.mfa-cmd-help.mfa-cmd-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  color: #475569;
}
.mfa-cmd-help.mfa-cmd-note .fa {
  color: #0f766e;
  margin-right: 0.3rem;
}
.mfa-panel-controls .form-group .mfa-cmd-help {
  margin-top: 0.35rem;
}

/* Códigos de respaldo post-activación */
.mfa-backup-wrap {
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
}
.mfa-backup-ok {
  text-align: center;
  color: #15803d;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.mfa-backup-ok .fa {
  font-size: 1.35rem;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.mfa-backup-explain {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: #134e4a;
  line-height: 1.45;
}
.mfa-backup-explain h5 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f766e;
}
.mfa-backup-explain p { margin: 0 0 0.5rem; }
.mfa-backup-when {
  margin: 0;
  padding-left: 1.1rem;
}
.mfa-backup-when li { margin-bottom: 0.35rem; }

.mfa-backup-box {
  position: relative;
  border: 2px solid #f59e0b;
  background: #fffbeb;
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}
.mfa-backup-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: #92400e;
}
.mfa-copy-btn {
  border: 1px solid #d97706;
  background: #fff;
  color: #b45309;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.mfa-copy-btn:hover { background: #fef3c7; }
.mfa-copy-btn.copied {
  border-color: #16a34a;
  color: #15803d;
  background: #ecfdf5;
}
.mfa-backup-plain {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.mfa-backup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.75rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1rem;
  letter-spacing: 0.06em;
}
.mfa-backup-list li {
  background: #fff;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  text-align: center;
  color: #78350f;
}
.mfa-copy-feedback {
  min-height: 1.2em;
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  text-align: center;
}
.mfa-copy-feedback.ok { color: #15803d; font-weight: 600; }
.mfa-copy-feedback.err { color: #b91c1c; }

.mfa-backup-ack {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: #334155;
  margin: 0.75rem 0 0.25rem;
  cursor: pointer;
  line-height: 1.35;
}
.mfa-backup-ack input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}
#mfaBackupContinue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .mfa-backup-list { grid-template-columns: 1fr; }
}

