.twofa-page { min-height: 100vh; background: #f3f6fa; }
.twofa-shell { width: min(1440px, calc(100% - 36px)); margin: 0 auto; padding: 42px 0 90px; }
.twofa-heading { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.twofa-heading .eyebrow { margin-bottom: 8px; color: #168078; }
.twofa-heading h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.twofa-heading p:not(.eyebrow) { margin: 10px 0 0; color: var(--muted); }
.twofa-privacy { display: inline-flex; gap: 8px; align-items: center; padding: 9px 12px; border: 1px solid #cfe1df; border-radius: 999px; background: #fff; color: #34635f; font-size: 12px; white-space: nowrap; }
.twofa-privacy i { width: 9px; height: 9px; border-radius: 50%; background: #168078; box-shadow: 0 0 0 5px #e1f1ef; }

.twofa-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.twofa-card { overflow: hidden; border: 1px solid #dce4ed; border-radius: 12px; background: #fff; box-shadow: 0 12px 35px rgba(31, 48, 71, .06); }
.twofa-card-head { display: flex; gap: 18px; align-items: center; justify-content: space-between; min-height: 78px; padding: 16px 18px; border-bottom: 1px solid #e3e9f0; }
.twofa-card-head h2 { margin: 0; font-size: 20px; }
.twofa-card-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.twofa-head-actions { display: flex; gap: 8px; }
.twofa-head-actions button, .twofa-copy { min-height: 36px; padding: 7px 11px; border: 1px solid #cfdae6; border-radius: 7px; background: #fff; color: #31415a; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.twofa-head-actions button:hover, .twofa-copy:hover:not(:disabled) { border-color: #2864d8; color: #2864d8; }
.twofa-copy:disabled { cursor: not-allowed; opacity: .45; }

.twofa-form { display: grid; gap: 15px; padding: 20px 18px; }
.twofa-form label { display: grid; gap: 7px; color: #27364a; font-size: 13px; font-weight: 900; }
.twofa-form textarea, .twofa-form input, .twofa-form select, .twofa-readonly { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfdae6; border-radius: 7px; outline: 0; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.twofa-form textarea { resize: vertical; line-height: 1.55; }
.twofa-form textarea:focus, .twofa-form input:focus, .twofa-form select:focus { border-color: #2864d8; box-shadow: 0 0 0 3px rgba(40, 100, 216, .1); }
.twofa-readonly { display: flex; align-items: center; background: #f6f8fb; }
.twofa-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.twofa-output-card { min-height: 470px; }
.twofa-code-panel { display: grid; min-height: 235px; padding: 34px 20px 28px; place-items: center; align-content: center; border-bottom: 1px solid #e3e9f0; background: linear-gradient(135deg, #eef8f6, #edf2ff); }
.twofa-code-panel > strong { color: #0f172a; font-family: Consolas, "Courier New", monospace; font-size: clamp(48px, 7vw, 72px); letter-spacing: .12em; line-height: 1; }
.twofa-code-panel > span { margin-top: 18px; color: #526276; font-size: 13px; }
.twofa-progress { width: min(230px, 60%); height: 8px; margin-top: 14px; overflow: hidden; border-radius: 999px; background: #d8e0eb; }
.twofa-progress i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #168078, #2864d8); transition: width .25s linear; }
.twofa-badges { display: flex; gap: 8px; flex-wrap: wrap; padding: 18px; }
.twofa-badges span { padding: 6px 9px; border: 1px solid #d3dce7; border-radius: 999px; color: #526276; font-size: 11px; }
.twofa-badges .valid { border-color: #bde4cd; background: #ecfbf2; color: #16804b; }
.twofa-badges .invalid { border-color: #efc9c5; background: #fff2f1; color: #b43a32; }
.twofa-security-note { margin: 0 18px 20px; padding: 11px 13px; border-radius: 8px; background: #fff8e8; color: #7b6228; font-size: 11px; line-height: 1.65; }

.twofa-toast { position: fixed; right: 24px; bottom: 24px; z-index: 1200; padding: 12px 16px; border-radius: 9px; background: #172235; color: #fff; font-size: 13px; font-weight: 900; box-shadow: 0 14px 35px rgba(15, 23, 42, .25); opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .18s ease, transform .18s ease; }
.twofa-toast.visible { opacity: 1; transform: translateY(0); }
.twofa-toast.error { background: #b63c34; }

@media (max-width: 900px) {
  .twofa-grid { grid-template-columns: 1fr; }
  .twofa-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
  .twofa-shell { width: min(100% - 24px, 1280px); padding-top: 26px; }
  .twofa-card-head { align-items: flex-start; flex-direction: column; }
  .twofa-options { grid-template-columns: 1fr; }
  .twofa-code-panel > strong { font-size: 42px; }
  .twofa-toast { right: 12px; bottom: 12px; left: 12px; text-align: center; }
}
