/* overlay */
.twofa-overlay {
  display: none;                   /* по умолчанию скрыт */
  position: fixed;
  inset: 0;
  background: rgba(26, 7, 45, .55);
  z-index: 10000;
  place-items: center;             /* работает с display:grid */
}
.twofa-overlay.open {
  display: grid;                   /* показываем ТОЛЬКО при .open */
}

/* modal */
.twofa-modal {
  width: min(560px, 92vw);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(38, 0, 77, .35);
  padding: 24px 22px 18px;
  position: relative;
  transform: translateY(10px);
  transition: transform .2s ease;
  animation: pop .18s ease-out;
}
.twofa-overlay.open .twofa-modal {
  transform: translateY(0);
}

/* close button */
.twofa-close {
  position: absolute;
  top: 8px; right: 10px;
  font-size: 28px; line-height: 1;
  background: transparent; border: 0;
  color: #6b6b6b; cursor: pointer;
}
.twofa-close:hover { color: #000; }

/* header */
.twofa-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 8px;
}
.twofa-shield {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; background: #410093; color: #fff; font-size: 22px;
}
.twofa-text { color: #3a3a3a; margin: 6px 0 10px; }
.twofa-bullets { margin: 8px 0 18px 18px; color: #444; }
.twofa-bullets li { margin: 6px 0; }

/* buttons */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 10px 14px; border-radius: 12px; border: 2px solid transparent;
  font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-primary { background:#F56F20; color:#fff; }
.btn-primary:hover { filter: brightness(0.95); }
.btn-ghost { background: transparent; color:#410093; border-color:#410093; }
.btn-ghost:hover { background: rgba(65,0,147,0.06); }

/* animations */
@keyframes pop {
  from { transform: translateY(8px); opacity: 0.98; }
  to   { transform: translateY(0);   opacity: 1; }
}

/* safety: если где-то остался атрибут hidden */
[hidden] { display: none !important; }
