/* Account security pages — password / 2FA / setup (forms & endpoints untouched) */

html[data-theme="light"] .tf-sec-page{
  --sc-bg:#E8EAE8;
  --sc-card:#FFFFFF;
  --sc-border:#D5D8D5;
  --sc-text:#1A1F1C;
  --sc-muted:#66706A;
  --sc-soft:rgba(26,31,28,.045);
  --sc-green:#2F9E63;
  --sc-green-soft:rgba(47,158,99,.1);
  --sc-green-border:rgba(47,158,99,.22);
  --sc-shadow:0 12px 32px rgba(26,31,28,.07);
  --sc-ease:cubic-bezier(.22,1,.36,1);
  --sc-danger:#C44B4B;
  --sc-danger-soft:rgba(196,75,75,.1);
  --sc-danger-border:rgba(196,75,75,.28);
}
html[data-theme="dark"] .tf-sec-page{
  --sc-bg:#121412;
  --sc-card:#1A1C1A;
  --sc-border:rgba(255,255,255,.09);
  --sc-text:#E8ECE9;
  --sc-muted:#9AA39D;
  --sc-soft:rgba(255,255,255,.04);
  --sc-green:#4CAF78;
  --sc-green-soft:rgba(76,175,120,.12);
  --sc-green-border:rgba(76,175,120,.24);
  --sc-shadow:none;
  --sc-ease:cubic-bezier(.22,1,.36,1);
  --sc-danger:#E07070;
  --sc-danger-soft:rgba(224,112,112,.12);
  --sc-danger-border:rgba(224,112,112,.28);
}
.tf-sec-page{
  --sc-bg:#E8EAE8;
  --sc-card:#FFFFFF;
  --sc-border:#D5D8D5;
  --sc-text:#1A1F1C;
  --sc-muted:#66706A;
  --sc-soft:rgba(26,31,28,.045);
  --sc-green:#2F9E63;
  --sc-green-soft:rgba(47,158,99,.1);
  --sc-green-border:rgba(47,158,99,.22);
  --sc-shadow:0 12px 32px rgba(26,31,28,.07);
  --sc-ease:cubic-bezier(.22,1,.36,1);
  --sc-danger:#C44B4B;
  --sc-danger-soft:rgba(196,75,75,.1);
  --sc-danger-border:rgba(196,75,75,.28);
  position:relative;
  overflow-x:hidden;
  background:var(--sc-bg);
  color:var(--sc-text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  padding-top:72px;
  min-height:100vh;
}

html[data-theme="light"] body:has(.tf-sec-page) .site-glow{
  background:linear-gradient(180deg,#F0F1F0,#E8EAE8 50%,#E0E2E0);
}
html[data-theme="dark"] body:has(.tf-sec-page) .site-glow{
  background:
    radial-gradient(circle at 18% 8%,rgba(76,175,120,.08),transparent 32%),
    linear-gradient(180deg,#121412,#161816 55%,#121412);
}
html[data-theme="dark"] body:has(.tf-sec-page) .tf-topbar.topbar,
html[data-theme="dark"] body:has(.tf-sec-page) .tf-topbar.topbar.scrolled{
  background:#121412;
  border-bottom:1px solid rgba(255,255,255,.07);
}
html[data-theme="light"] body:has(.tf-sec-page) .tf-topbar.topbar,
html[data-theme="light"] body:has(.tf-sec-page) .tf-topbar.topbar.scrolled{
  background:#FAFBFA;
  border-bottom:1px solid rgba(23,23,23,.08);
}

.tf-sec-atmosphere{
  pointer-events:none;
  position:absolute;
  inset:0;
  z-index:0;
  overflow:hidden;
}
.tf-sec-orb{
  position:absolute;
  border-radius:50%;
  filter:blur(72px);
  opacity:.48;
}
.tf-sec-orb-a{
  width:min(420px,55vw);height:min(420px,55vw);
  top:-8%;left:-10%;
  background:radial-gradient(circle,rgba(47,158,99,.28),transparent 70%);
  animation:sc-orb 17s ease-in-out infinite alternate;
}
.tf-sec-orb-b{
  width:min(340px,45vw);height:min(340px,45vw);
  right:-8%;top:35%;
  background:radial-gradient(circle,rgba(76,175,120,.14),transparent 70%);
  animation:sc-orb 21s ease-in-out infinite alternate-reverse;
}

.tf-sec-state{
  position:relative;
  z-index:1;
  padding:120px 24px;
  text-align:center;
  color:var(--sc-muted);
}
.tf-sec-state a{color:var(--sc-green);font-weight:700}

.tf-sec-hero{
  position:relative;
  z-index:1;
  padding:clamp(28px,4vw,44px) 0 8px;
}
.tf-sec-hero-inner{max-width:720px}
.tf-sec-eyebrow{
  margin:0 0 10px;
  color:var(--sc-green);
  font-size:11px;
  font-weight:750;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.tf-sec-hero h1{
  margin:0;
  font-family:"Space Grotesk",Inter,system-ui,sans-serif;
  font-size:clamp(1.9rem,3.8vw,2.7rem);
  letter-spacing:-.04em;
  line-height:1.08;
}
.tf-sec-lead{
  margin:12px 0 0;
  color:var(--sc-muted);
  font-size:1.02rem;
  line-height:1.5;
  max-width:52ch;
}
.tf-sec-lead strong{color:var(--sc-text)}

.tf-sec-section{
  position:relative;
  z-index:1;
  padding:clamp(18px,3vw,28px) 0 clamp(48px,7vw,80px);
}
.tf-sec-shell{max-width:min(760px,100%)}
.tf-sec-grid,
.tf-sec-setup-grid{
  display:grid;
  gap:clamp(14px,2vw,18px);
  max-width:min(980px,100%);
}
.tf-sec-setup-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.tf-sec-grid{grid-template-columns:1fr;max-width:min(760px,100%)}

.tf-sec-card{
  border:1px solid var(--sc-border)!important;
  border-radius:22px!important;
  background:var(--sc-card)!important;
  box-shadow:var(--sc-shadow)!important;
  padding:clamp(22px,3vw,30px)!important;
  color:var(--sc-text)!important;
  position:relative;
}
.tf-sec-card-danger{
  border-color:var(--sc-danger-border)!important;
  background:
    linear-gradient(180deg,var(--sc-danger-soft),transparent 40%),
    var(--sc-card)!important;
}
.tf-sec-card-head{
  display:flex;
  gap:14px;
  align-items:flex-start;
  margin-bottom:8px;
}
.tf-sec-badge{
  display:grid;
  place-items:center;
  width:44px;height:44px;
  border-radius:12px;
  background:var(--sc-green-soft);
  color:var(--sc-green);
  font-size:18px;
  font-weight:800;
  flex-shrink:0;
}
.tf-sec-badge-danger{
  background:var(--sc-danger-soft);
  color:var(--sc-danger);
}
.tf-sec-card-head h2,
.tf-sec-card h2{
  margin:0;
  font-family:"Space Grotesk",Inter,system-ui,sans-serif;
  font-size:1.35rem;
  letter-spacing:-.02em;
  color:var(--sc-text)!important;
}
.tf-sec-card-head p{
  margin:4px 0 0;
  color:var(--sc-muted);
  font-size:13.5px;
  line-height:1.4;
}
.tf-sec-step{
  display:grid;
  place-items:center;
  width:34px;height:34px;
  margin-bottom:14px;
  border-radius:10px;
  background:var(--sc-green);
  color:#F7FBF8;
  font-weight:850;
  font-size:14px;
}

.tf-sec-status-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:12px 0 10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--sc-border);
  background:var(--sc-soft);
  color:var(--sc-muted);
  font-size:13px;
  font-weight:650;
}
.tf-sec-status-pill.is-ok{
  border-color:var(--sc-green-border);
  background:var(--sc-green-soft);
  color:var(--sc-green);
}
.tf-sec-status-pill strong{font-weight:800}
.tf-sec-copy{
  margin:0 0 4px;
  color:var(--sc-muted);
  font-size:.98rem;
  line-height:1.5;
}
.tf-sec-copy strong{color:var(--sc-text)}

.tf-sec-card label{
  display:block;
  margin:16px 0 0;
  color:var(--sc-muted)!important;
  font-weight:700;
  font-size:12px;
}
.tf-sec-card input{
  width:100%;
  margin-top:7px;
  color:var(--sc-text)!important;
  background:var(--sc-soft)!important;
  border:1px solid var(--sc-border)!important;
  border-radius:12px!important;
  padding:13px 14px;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
  letter-spacing:.04em;
}
.tf-sec-card input:focus{
  border-color:var(--sc-green-border)!important;
  box-shadow:0 0 0 3px var(--sc-green-soft)!important;
}
.tf-sec-error{margin:12px 0 0;color:var(--sc-danger);font-weight:650}

.tf-sec-btn-primary{
  margin-top:20px!important;
  background:var(--sc-green)!important;
  border-color:transparent!important;
  color:#F7FBF8!important;
  border-radius:12px!important;
  font-weight:750!important;
  min-height:48px;
  box-shadow:0 8px 20px rgba(47,158,99,.22)!important;
  transition:transform .2s var(--sc-ease);
}
.tf-sec-btn-primary:hover:not(:disabled){transform:translateY(-1px)}
.tf-sec-btn-primary:disabled{opacity:.7;cursor:wait}
.tf-sec-btn-ghost{
  background:var(--sc-soft)!important;
  border:1px solid var(--sc-border)!important;
  color:var(--sc-text)!important;
  border-radius:12px!important;
  font-weight:700!important;
  min-height:48px;
  box-shadow:none!important;
}
.tf-sec-btn-ghost:hover{border-color:var(--sc-green-border)!important}
.tf-sec-btn-danger{
  margin-top:18px!important;
  background:var(--sc-danger-soft)!important;
  border:1px solid var(--sc-danger-border)!important;
  color:var(--sc-danger)!important;
  border-radius:12px!important;
  font-weight:750!important;
  min-height:48px;
}
.tf-sec-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:10px;
  margin-top:20px;
}
.tf-sec-actions .btn{
  margin:0!important;
  min-height:48px!important;
  height:48px;
  padding:0 18px!important;
  box-sizing:border-box;
  flex:1 1 auto;
  align-self:stretch;
  line-height:1;
}
.tf-sec-actions .tf-sec-btn-primary{
  box-shadow:0 6px 14px rgba(47,158,99,.18)!important;
}
.tf-sec-foot{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  align-items:center;
  margin-top:18px!important;
  color:var(--sc-muted)!important;
  font-size:14px;
}
.tf-sec-foot a{color:var(--sc-green)!important;font-weight:750}

.tf-sec-qr{
  margin:16px 0 0;
  padding:18px;
  border:1px solid var(--sc-border);
  border-radius:18px;
  background:var(--sc-soft);
  display:grid;
  place-items:center;
  min-height:240px;
}
.tf-sec-qr img{
  display:block;
  width:220px;
  height:220px;
  border-radius:12px;
  background:#fff;
}
.tf-sec-qr-empty{
  max-width:36ch;
  text-align:center;
  color:var(--sc-muted);
  font-size:14px;
  line-height:1.5;
}
.tf-sec-qr-empty a{color:var(--sc-green);font-weight:700}
.tf-sec-secret{
  margin:14px 0 0;
  color:var(--sc-muted);
  font-size:14px;
  word-break:break-all;
}
.tf-sec-secret code{
  color:var(--sc-text);
  font-weight:700;
}
.tf-sec-skip{margin-top:16px}
.tf-sec-note{
  margin:10px 0 0!important;
  color:var(--sc-muted)!important;
  font-size:13px!important;
}

.tf-sec-anim{
  opacity:0;
  transform:translateY(14px);
  animation:sc-rise .55s var(--sc-ease) forwards;
  animation-delay:var(--d,0ms);
}

@keyframes sc-rise{to{opacity:1;transform:none}}
@keyframes sc-orb{
  from{transform:translate3d(0,0,0) scale(1)}
  to{transform:translate3d(16px,10px,0) scale(1.06)}
}

@media (max-width:820px){
  .tf-sec-setup-grid{grid-template-columns:1fr}
}
@media (max-width:620px){
  .tf-sec-page{padding-top:64px}
  .tf-sec-actions{flex-direction:column}
  .tf-sec-actions .btn{width:100%}
}

@media (prefers-reduced-motion:reduce){
  .tf-sec-orb,
  .tf-sec-anim{animation:none!important}
  .tf-sec-anim{opacity:1;transform:none}
  .tf-sec-btn-primary:hover:not(:disabled){transform:none!important}
}
