/* ═══ Account security windows ═══ */
.sec-ov { position: fixed; inset: 0; z-index: 10080; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5,3,4,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sec-ov.open { display: flex; animation: secFade .16s ease; }
@keyframes secFade { from { opacity: 0; } }
.sec-box {
  position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 24px 22px; border-radius: 20px; background: var(--card, #1b1b1f); color: var(--text-1, #f2eaea);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 80px rgba(0,0,0,.5);
  font-family: var(--font-body, 'Inter', system-ui, sans-serif); -webkit-font-smoothing: antialiased;
  animation: secUp .22s cubic-bezier(.2,1.2,.4,1);
}
@keyframes secUp { from { transform: translateY(18px); opacity: 0; } }
.sec-box.sec-wide { max-width: 620px; padding: 24px; }
.sec-small .sec-box { text-align: center; }
.sec-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: inherit; display: grid; place-items: center; cursor: pointer; }
.sec-x:hover { background: rgba(255,255,255,.1); }
.sec-badge { width: 48px; height: 48px; flex: none; border-radius: 14px; display: inline-grid; place-items: center; color: var(--red-bright, #ff4d6a); background: rgba(200,16,46,.14); border: 1px solid rgba(255,90,115,.3); }
.sec-small .sec-badge { margin: 0 auto 12px; }
.sec-box h3 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.sec-box h4 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; }
.sec-lead { margin: 0 0 14px; font-size: .88rem; line-height: 1.55; color: var(--muted, #a08184); }
.sec-lead b { color: var(--text-1, #fff); }
.sec-head { display: flex; align-items: center; gap: 14px; margin: 0 40px 18px 0; }
.sec-head p { margin: 0; font-size: .86rem; color: var(--muted, #a08184); }
.sec-head h3 { margin: 0 0 2px; }
.sec-req { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: rgba(255,170,0,.1); border: 1px solid rgba(255,170,0,.35); color: #fcd34d; font-size: .86rem; font-weight: 600; line-height: 1.45; }
.sec-req span { flex: 1 1 200px; }
.sec-link { border: 0; background: none; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 0; }
.sec-sec { padding: 18px 0; border-top: 1px solid rgba(255,255,255,.08); }
.sec-sec:first-of-type { border-top: 0; padding-top: 0; }
.sec-head + .sec-sec, .sec-req + .sec-sec { border-top: 0; padding-top: 4px; }
.sec-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 14px; border-radius: 12px; font-size: .88rem; margin: 0 0 12px; }
.sec-status b { font-weight: 800; }
.sec-status span { color: var(--muted, #a08184); }
.sec-status.on { background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.3); color: #4ade80; }
.sec-status.off { background: rgba(255,58,92,.08); border: 1px solid rgba(255,90,115,.3); color: #ff6b81; }
.sec-note { margin: 0 0 12px; font-size: .82rem; color: var(--muted, #a08184); }
.sec-methods { display: grid; gap: 10px; }
.sec-method { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.sec-method:hover { border-color: rgba(255,90,115,.55); background: rgba(255,58,92,.07); transform: translateY(-1px); }
.sec-method:disabled { opacity: .6; }
.sec-m-ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: var(--red-bright, #ff4d6a); }
.sec-method b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .95rem; font-weight: 800; }
.sec-method b i { font-style: normal; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: rgba(74,222,128,.12); color: #4ade80; }
.sec-method small { display: block; margin-top: 3px; font-size: .8rem; line-height: 1.45; color: var(--muted, #a08184); }

.sec-form { display: flex; gap: 10px; margin: 6px 0 0; }
.sec-form.sec-col { flex-direction: column; }
.sec-small .sec-form { flex-direction: column; }
.sec-input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); color: inherit; font: inherit; font-size: .95rem; }
.sec-input:focus { outline: none; border-color: rgba(255,90,115,.7); box-shadow: 0 0 0 3px rgba(255,58,92,.15); }
.sec-code { text-align: center; font-size: 1.45rem; font-weight: 800; letter-spacing: .4em; font-variant-numeric: tabular-nums; padding-left: calc(16px + .4em); }
.sec-code.sec-rec { font-size: 1.05rem; letter-spacing: .12em; }
.sec-code::placeholder { color: rgba(255,255,255,.18); }
.sec-err { min-height: 1.2em; margin: 10px 0 0; font-size: .84rem; font-weight: 600; color: #ff6b81; }
.sec-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.sec-links button, .sec-back { border: 0; background: none; color: var(--muted, #a08184); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; padding: 6px 2px; }
.sec-links button:hover, .sec-back:hover { color: var(--text-1, #fff); }
.sec-back { margin: -4px 0 8px; }

.sec-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  color: var(--text-1, #fff); font: 700 .88rem var(--font-body, 'Inter', sans-serif); letter-spacing: .01em;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.sec-btn:hover { background: rgba(255,58,92,.1); border-color: rgba(255,90,115,.5); }
.sec-btn:disabled { opacity: .55; cursor: default; transform: none; }
.sec-btn.sec-primary { color: #fff; background: linear-gradient(135deg, rgba(255,58,92,.85), rgba(200,16,46,.7)); border-color: rgba(255,110,130,.75); box-shadow: 0 5px 16px rgba(200,16,46,.38), inset 0 1px 0 rgba(255,255,255,.24); }
.sec-btn.sec-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(200,16,46,.45), inset 0 1px 0 rgba(255,255,255,.28); }
.sec-btn.sec-danger { color: #ff7a8e; }
.sec-btn.sec-sm { height: 34px; padding: 0 14px; font-size: .8rem; }
.sec-full { width: 100%; margin-top: 12px; }
.sec-row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.sec-dev { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.06); }
.sec-dev:first-of-type { border-top: 0; }
.sec-dev-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--text-2, #d4b8ba); }
.sec-dev-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sec-dev-txt b { font-size: .92rem; font-weight: 750; }
.sec-dev-txt b i { font-style: normal; margin-left: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(74,222,128,.12); color: #4ade80; vertical-align: 1px; }
.sec-dev-txt small { font-size: .78rem; color: var(--muted, #a08184); overflow-wrap: anywhere; }

.sec-steps { margin: 0 0 14px; padding-left: 20px; font-size: .88rem; line-height: 1.7; color: var(--text-2, #d4b8ba); }
.sec-qr { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 0 0 16px; }
.sec-qr #secQr { padding: 10px; border-radius: 14px; background: #fff; line-height: 0; }
.sec-qr small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #a08184); margin-bottom: 4px; }
.sec-qr code { display: block; margin-bottom: 10px; font: 700 .9rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; overflow-wrap: anywhere; color: var(--text-1, #fff); }
.sec-qr > div:last-child { flex: 1 1 180px; min-width: 0; }
.sec-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 12px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.18); }
.sec-codes code { font: 700 .95rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-align: center; padding: 6px 0; }
.sec-check { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: .88rem; font-weight: 600; cursor: pointer; }
.sec-check input { width: 18px; height: 18px; accent-color: #e3264a; }
.sec-loading { height: 160px; background: radial-gradient(circle at center, rgba(255,58,92,.25) 0 6px, transparent 7px) center / 22px 22px no-repeat; animation: secPulse 1s ease-in-out infinite; }
@keyframes secPulse { 50% { opacity: .35; } }

@media (max-width: 600px) {
  .sec-ov { padding: 0; align-items: flex-end; }
  .sec-box, .sec-box.sec-wide { max-width: none; border-radius: 20px 20px 0 0; max-height: 94dvh; padding: 22px 16px calc(20px + env(safe-area-inset-bottom)); }
  .sec-form { flex-direction: column; }
  .sec-row-btns .sec-btn { flex: 1 1 auto; }
  .sec-codes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sec-head { margin-right: 44px; }
}

[data-theme="light"] .sec-box { background: #fff; color: #16161a; border-color: rgba(20,20,30,.08); box-shadow: 0 30px 80px rgba(20,20,30,.25); }
[data-theme="light"] .sec-lead b, [data-theme="light"] .sec-qr code { color: #16161a; }
[data-theme="light"] .sec-x, [data-theme="light"] .sec-btn { background: #f6f6f8; border-color: rgba(20,20,30,.12); color: #16161a; }
[data-theme="light"] .sec-btn.sec-primary { color: #fff; background: linear-gradient(135deg, #e3264a, #b80e2a); border-color: rgba(160,10,35,.6); }
[data-theme="light"] .sec-btn.sec-danger { color: #c8102e; }
[data-theme="light"] .sec-input { background: #fafafa; border-color: rgba(20,20,30,.15); }
[data-theme="light"] .sec-code::placeholder { color: rgba(20,20,30,.2); }
[data-theme="light"] .sec-method { background: #fff; border-color: rgba(20,20,30,.12); }
[data-theme="light"] .sec-m-ic, [data-theme="light"] .sec-dev-ic { background: #f4f4f6; }
[data-theme="light"] .sec-sec, [data-theme="light"] .sec-dev { border-color: rgba(20,20,30,.08); }
[data-theme="light"] .sec-codes { background: #fafafa; border-color: rgba(20,20,30,.18); }
[data-theme="light"] .sec-req { color: #92400e; background: #fffbeb; }
[data-theme="light"] .sec-status.on { color: #047857; }
[data-theme="light"] .sec-status.off { color: #c8102e; }
.sec-box .sec-input { height: 52px !important; min-height: 52px; box-sizing: border-box; line-height: normal; margin: 0; }
.sec-box .sec-btn { box-sizing: border-box; }
.sec-qr #secQr a.sec-btn { color: #16161a; background: #f4f4f6; border-color: rgba(20,20,30,.15); height: auto; padding: 14px 16px; white-space: normal; line-height: 1.3; }
.sec-mails { display: grid; gap: 6px; margin: 0 0 12px; }
.sec-mail { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.06); }
.sec-mail:first-child { border-top: 0; }
.sec-mail > span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.sec-mail.ok > span { color: #4ade80; background: rgba(74,222,128,.1); }
.sec-mail.bad > span { color: #ff6b81; background: rgba(255,58,92,.12); }
.sec-mail b { display: block; font-size: .86rem; font-weight: 700; overflow-wrap: anywhere; }
.sec-mail small { font-size: .76rem; color: var(--muted, #a08184); overflow-wrap: anywhere; }
.sec-mail.bad small { color: #ff8a9a; }
[data-theme="light"] .sec-mail { border-color: rgba(20,20,30,.07); }
