/* ============================================================
   2FA 动态验证码（本地生成 / 参考站版式）
   ============================================================ */

.tfa-page {
  background: #f7f9fc;
  padding: 34px 0 64px;
}

.tfa-wrap {
  width: min(760px, 92vw);
  margin: 0 auto;
}

/* ---------- 页头 ---------- */
.tfa-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tfa-eyebrow {
  display: block;
  font-size: 11.5px;
  line-height: 1;
  letter-spacing: .16em;
  font-weight: 800;
  color: #93a0b1;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.tfa-head h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 800;
  color: var(--text, #172033);
}
.tfa-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}
.tfa-tags span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(18, 168, 154, .09);
  color: #0e9b8e;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- 主卡 ---------- */
.tfa-card {
  background: #fff;
  border: 1px solid rgba(20, 39, 66, .055);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 22px 55px rgba(31, 51, 79, .07);
}
.tfa-panel {
  border: 1px solid #e8eef3;
  border-radius: 16px;
  padding: 24px 24px 22px;
}
.tfa-panel h2 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text, #172033);
}
.tfa-desc {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #7b8798;
}

.tfa-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #33415a;
  margin-bottom: 10px;
}

#tfa-input {
  display: block;
  width: 100%;
  min-height: 156px;
  padding: 16px 18px;
  border: 1px solid #e1e9f0;
  border-radius: 14px;
  background: #fbfdff;
  color: var(--text, #172033);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 14.5px;
  line-height: 1.8;
  resize: vertical;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
#tfa-input::placeholder {
  color: #a8b3c2;
  font-family: inherit;
}
#tfa-input:focus {
  border-color: var(--accent, #12a89a);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 168, 154, .1);
}

.tfa-btns {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.tfa-btn-main {
  flex: 1 1 auto;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--accent, #12a89a);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: .16s;
}
.tfa-btn-main:hover { background: var(--accent-strong, #087f75); }
.tfa-btn-main:active { transform: translateY(1px); }
.tfa-btn-ghost {
  flex: 0 0 148px;
  height: 50px;
  border: 1px solid #e1e9f0;
  border-radius: 12px;
  background: #fff;
  color: #4c5a70;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: .16s;
}
.tfa-btn-ghost:hover { border-color: #c9d6e2; color: #24344b; }

/* ---------- 结果 ---------- */
.tfa-result {
  margin-top: 18px;
  padding: 18px 20px 16px;
  border: 1px solid #d5eeea;
  border-radius: 14px;
  background: linear-gradient(180deg, #f3fbfa 0%, #fff 100%);
}
.tfa-result[hidden] { display: none; }
.tfa-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.tfa-result-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #7c9a97;
  margin-bottom: 6px;
}
.tfa-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 42px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: .1em;
  color: #0d6a63;
  white-space: nowrap;
}
.tfa-copy {
  flex: 0 0 96px;
  height: 42px;
}
.tfa-bar {
  height: 6px;
  margin: 15px 0 9px;
  border-radius: 999px;
  background: #e4f2f0;
  overflow: hidden;
}
.tfa-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--accent, #12a89a);
  transition: width .2s linear, background .3s;
}
.tfa-bar i.low { background: #e0902f; }
.tfa-result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #8b98a8;
}

/* ---------- 提示条 ---------- */
.tfa-note {
  margin-top: 16px;
  padding: 13px 18px 14px;
  border-radius: 12px;
  background: #eef8f6;
}
.tfa-note strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0e9b8e;
  margin-bottom: 5px;
}
.tfa-note span {
  display: block;
  font-size: 12.5px;
  line-height: 1.7;
  color: #8b98a8;
}

/* ---------- 账户绑定（折叠） ---------- */
.tfa-account-card { margin-top: 16px; }
.tfa-account summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #172033);
}
.tfa-account summary::-webkit-details-marker { display: none; }
.tfa-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 700;
}
.tfa-badge.on { background: rgba(18, 168, 154, .12); color: #0e9b8e; }
.tfa-badge.off { background: rgba(214, 151, 38, .14); color: #a9740f; }
.tfa-chev {
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid #9aa7b6;
  border-bottom: 2px solid #9aa7b6;
  transform: rotate(45deg);
  transition: transform .18s;
}
.tfa-account[open] .tfa-chev { transform: rotate(225deg); }
.tfa-account-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #e3eaf1;
}
.tfa-points { margin-top: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .tfa-page { padding: 22px 0 48px; }
  .tfa-head h1 { font-size: 27px; }
  .tfa-card { padding: 16px; border-radius: 18px; }
  .tfa-panel { padding: 18px 15px 16px; border-radius: 14px; }
  .tfa-panel h2 { font-size: 21px; }
  .tfa-desc { font-size: 13px; margin-bottom: 16px; }
  #tfa-input { min-height: 128px; font-size: 14px; padding: 14px 15px; }
  .tfa-code { font-size: 30px; letter-spacing: .04em; }
  .tfa-btn-main, .tfa-btn-ghost { height: 46px; }
  .tfa-btn-ghost { flex: 0 0 96px; font-size: 14px; }
  .tfa-copy { flex: 0 0 80px; height: 38px; }
  .tfa-tags span { height: 27px; font-size: 12px; padding: 0 11px; }
}
