/* 安全中心：注册 / 找回 / 申诉
   视觉取向：浅色分栏 + 胶囊选中态 + 左侧主色竖条（有意区别于常见「蓝色实心块」tab 布局） */

.auth-card.wide {
  width: min(760px, calc(100vw - 40px));
  padding: 0;
  overflow: hidden;
}

.sec-shell {
  display: grid;
  grid-template-columns: 176px 1fr;
  min-height: 520px;
}

/* ---------- 左侧分区 ---------- */

.sec-rail {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(238, 243, 250, 0.66));
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sec-rail-group {
  margin: 14px 0 4px;
  padding-left: 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.72;
}

.sec-rail-group:first-child { margin-top: 0; }

.sec-tab {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px 12px 10px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.sec-tab:hover { background: rgba(79, 134, 232, 0.08); color: var(--text); }

.sec-tab[aria-selected="true"] {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(40, 60, 95, 0.1);
}

.sec-tab[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

/* ---------- 右侧内容 ---------- */

.sec-body {
  padding: 24px 26px 26px;
  max-height: min(82vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sec-body h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 650;
}

.sec-sub {
  margin: 0 0 18px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.sec-form { display: flex; flex-direction: column; gap: 14px; }

.sec-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
}

.sec-row > label,
.sec-row > .sec-label {
  font-size: 13.5px;
  color: var(--muted);
  text-align: right;
}

.sec-row .req::after { content: " *"; color: var(--danger); }

.sec-field { position: relative; display: flex; gap: 8px; align-items: center; }

.sec-field input[type="text"],
.sec-field input[type="password"],
.sec-field input[type="email"],
.sec-field input[type="tel"],
.sec-field select,
.sec-field textarea {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.sec-field input:focus,
.sec-field select:focus,
.sec-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 134, 232, 0.14);
}

.sec-field textarea { min-height: 82px; resize: vertical; line-height: 1.6; }

.sec-prefix {
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(238, 243, 250, 0.9);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.sec-hint { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.sec-hint.ok { color: var(--ok); }
.sec-hint.warn { color: var(--gold); }

.sec-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding-left: 104px;
}

.sec-btn {
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.16s ease, opacity 0.16s ease;
}

.sec-btn:hover:not(:disabled) { filter: brightness(1.06); }
.sec-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.sec-btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--line-strong);
}

.sec-btn.small { padding: 8px 14px; font-size: 13px; }

.sec-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.sec-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 104px;
  font-size: 12.5px;
  color: var(--muted);
}

.sec-error {
  min-height: 18px;
  margin: 0;
  padding-left: 104px;
  font-size: 12.5px;
  color: var(--danger);
  line-height: 1.5;
}

.sec-error.ok { color: var(--ok); }

/* ---------- 滑块拼图 ---------- */

.puz {
  width: 320px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #dfe7f1;
  user-select: none;
  touch-action: none;
}

.puz-stage {
  position: relative;
  width: 320px;
  height: 160px;
  overflow: hidden;
}

.puz-stage svg { display: block; width: 100%; height: 100%; }

.puz-piece {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.28));
  transition: left 0.02s linear;
}

.puz-piece svg,
.puz-piece svg * { width: 44px; height: 44px; }

.puz-refresh {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.puz-track {
  position: relative;
  height: 40px;
  margin: 0;
  background: #f1f5fa;
  border-top: 1px solid var(--line);
}

.puz-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(79, 134, 232, 0.22), rgba(124, 111, 214, 0.22));
}

.puz-knob {
  position: absolute;
  left: 0;
  top: 0;
  width: 46px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 14px;
  cursor: grab;
  box-shadow: 0 3px 10px rgba(79, 134, 232, 0.38);
}

.puz-knob:active { cursor: grabbing; }

.puz-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 14px;
  font-size: 12.5px;
  color: var(--muted);
  pointer-events: none;
}

.puz.done .puz-knob { background: linear-gradient(135deg, var(--ok), #3fa79e); }
.puz.fail .puz-knob { background: linear-gradient(135deg, var(--danger), #d9786f); animation: puz-shake 0.32s ease; }

@keyframes puz-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ---------- 步骤条（申诉向导） ---------- */

.steps {
  display: flex;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(238, 243, 250, 0.7);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}

.steps li .n {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(23, 42, 68, 0.1);
  font-size: 11px;
}

.steps li.active {
  background: rgba(79, 134, 232, 0.14);
  color: var(--primary);
  font-weight: 600;
}

.steps li.active .n { background: var(--primary); color: #fff; }

.steps li.done { color: var(--ok); }
.steps li.done .n { background: var(--ok); color: #fff; }

/* ---------- 申诉专用 ---------- */

.sec-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sec-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.radio-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.radio-list label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.sec-section {
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.sec-section:first-child { margin-top: 0; }

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.upload-row input[type="file"] { display: none; }

.tip-box {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(79, 134, 232, 0.07);
  border: 1px solid rgba(79, 134, 232, 0.16);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}

.tip-box b { color: var(--text); }

.sec-card-box {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

/* ---------- 完成态 ---------- */

.sec-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 42px 20px;
  text-align: center;
}

.sec-done .mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(47, 156, 114, 0.14);
  color: var(--ok);
  font-size: 26px;
}

.sec-done h3 { margin: 0; font-size: 16px; }
.sec-done p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

.sec-ticket {
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(238, 243, 250, 0.9);
  border: 1px dashed var(--line-strong);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--text);
}

@media (max-width: 900px) {
  .sec-shell { grid-template-columns: 1fr; min-height: 0; }
  .sec-pane, .sec-body { min-width: 0; overflow-wrap: anywhere; }
  .sec-rail {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }
  .sec-rail-group { display: none; }
  .sec-tab { white-space: nowrap; }
  .sec-row { grid-template-columns: 1fr; }
  .sec-row > label, .sec-row > .sec-label { text-align: left; }
  .sec-actions, .sec-error, .sec-check { padding-left: 0; }
  .sec-grid2, .sec-grid3, .radio-list { grid-template-columns: 1fr; }
  .puz, .puz-stage { width: 100%; }
}


/* ---------- 安全中心：品牌区瘦身（进安全中心后收成一条） ---------- */
.auth-card.compact .auth-hero {
  padding: 16px 22px 14px;
  background: linear-gradient(160deg, rgba(79, 134, 232, 0.14) 0%, rgba(124, 111, 214, 0.10) 100%);
}
.auth-card.compact .auth-hero::after { display: none; }
.auth-card.compact .hero-mascot { display: none; }
.auth-card.compact .auth-wordmark {
  font-size: 19px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-card.compact .auth-wordmark::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 3px 8px rgba(79, 134, 232, 0.35);
}
.auth-card.compact .auth-slogan { display: none; }
.auth-card.compact .auth-avatar { display: none; }
.auth-card.compact .auth-form { padding-top: 8px; }
.auth-card.compact .sec-shell { min-height: 0; }


/* 输入框 + 行内按钮（发验证码 / 发送验证邮件） */
.sec-field-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}
.sec-field-inline > input {
  flex: 1 1 auto;
  min-width: 0;
}
.sec-field-inline > .sec-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}


/* 提交按钮吸底：视图内容再长也不会把主按钮滚出视野 */
.sec-body > .sec-form > .sec-actions,
.sec-body > .sec-form > .sec-error + .sec-actions {
  position: sticky;
  bottom: -26px;
  margin: 14px -26px -26px;
  padding: 12px 26px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--bg-1) 38%);
  z-index: 1;
}

/* 步骤条文字不要被裁 */
.steps li { white-space: nowrap; }
.steps { gap: 6px; }
@media (max-width: 780px) {
  .steps li { font-size: 11.5px; padding: 5px 8px; }
}

/* 五步进度条：容器窄时压缩字号与内边距，保证每步文字完整 */
.steps { display: flex; flex-wrap: wrap; gap: 4px; }
.steps li {
  white-space: nowrap;
  font-size: 11.5px;
  padding: 5px 8px;
  gap: 4px;
}
.steps li .step-idx,
.steps li b { font-size: 11px; }


/* 第 3 步标签较长，容器窄时单独压缩，避免被相邻项挤掉字 */
.steps li:nth-child(3) { letter-spacing: -.2px; }
.steps li .n { min-width: 15px; }

/* 协议链接：不要默认下划线挤在一起，改用颜色 + 悬停下划线 */
.sec-check a,
.sec-check a:visited {
  color: #5b8def;
  text-decoration: none;
  margin: 0 1px;
  border-bottom: 1px solid rgba(91, 141, 239, .35);
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}
.sec-check a:hover {
  color: #3f6fe0;
  border-bottom-color: #3f6fe0;
}
.sec-check { line-height: 1.9; }

/* 协议勾选行：允许多行，书名号内不断行 */
.sec-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
  line-height: 2;
}
.sec-check input[type="checkbox"] { margin: 0 6px 0 0; flex: none; }
.sec-check a { white-space: nowrap; margin: 0; }
.sec-check .ck-sep { color: #b9c2d4; margin: 0 2px; }

/* 容器被压窄时（PC 外壳 900px 以下）表单不竖排 */
@media (max-width: 900px) {
  .sec-row { grid-template-columns: 1fr; gap: 6px; }
  .sec-row > label, .sec-row > .sec-label { width: auto; text-align: left; }
  .sec-row > .sec-field { width: 100%; }
  .sec-rail { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; }
  .sec-tab { white-space: nowrap; flex: 0 0 auto; }
  .sec-body h2, .sec-body p { max-width: 100%; }
  .sec-form { padding-left: 0; padding-right: 0; }
  .sec-actions, .sec-error, .sec-check { padding-left: 0; }
}

/* ---------- 账号中心副窗口（注册 / 找回 / 申诉） ---------- */
.sec-modal[hidden], .sec-modal.hidden { display: none !important; }
.sec-modal {
  position: fixed; inset: 0; z-index: 9400;
  display: flex; align-items: center; justify-content: center;
}
.sec-modal-mask {
  position: absolute; inset: 0;
  background: rgba(14, 20, 34, .48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sec-modal-win {
  position: relative;
  width: min(900px, calc(100vw - 48px));
  height: min(628px, calc(100vh - 48px));
  background: #fbfcfe;
  border-radius: 16px;
  box-shadow: 0 30px 72px rgba(10, 18, 32, .34);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sec-modal-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid #eef2f8;
}
.sec-modal-mark {
  width: 22px; height: 22px; border-radius: 7px; flex: 0 0 22px;
  background: linear-gradient(135deg, #5b8def, #8b6bf0);
  box-shadow: 0 4px 10px rgba(91, 141, 239, .30);
}
.sec-modal-head b { font-size: 14px; color: #1e2a3f; font-weight: 700; letter-spacing: .02em; }
.sec-modal-x {
  margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 9px;
  background: #f4f7fc; color: #6b7a90; font-size: 17px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s;
}
.sec-modal-x:hover { background: #eaf0fa; color: #33415c; }
.sec-modal-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }

/* 副窗口里的账号中心：左栏固定 196，右侧自适应，不会再把表单挤扁 */
.sec-modal-body .sec-shell {
  height: 100%;
  grid-template-columns: 196px 1fr;
  border: 0; border-radius: 0;
  background: transparent;
  min-height: 0;
}
.sec-modal-body .sec-rail {
  background: #fff;
  border-right: 1px solid #eef2f8;
  padding: 16px 10px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
}
.sec-modal-body .sec-body {
  padding: 22px 30px 28px;
  overflow-y: auto;
  min-width: 0;
}
.sec-modal-body .sec-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}
.sec-modal-body .sec-body h2 { margin: 0 0 6px; font-size: 17px; }
.sec-modal-body .sec-sub { margin: 0 0 18px; font-size: 12.5px; color: #7d8aa0; line-height: 1.7; }

@media (max-width: 760px) {
  .sec-modal-win { width: calc(100vw - 20px); height: calc(100vh - 20px); border-radius: 12px; }
  .sec-modal-body .sec-shell { grid-template-columns: 1fr; }
  .sec-modal-body .sec-rail {
    display: flex; flex-direction: row; overflow-x: auto; gap: 6px;
    border-right: 0; border-bottom: 1px solid #eef2f8; padding: 10px 12px;
    height: auto; flex: 0 0 auto;
  }
  .sec-modal-body .sec-rail-group { display: none; }
  .sec-modal-body .sec-tab { white-space: nowrap; flex: 0 0 auto; }
  .sec-modal-body .sec-body { padding: 16px 16px 20px; }
  .sec-modal-body .sec-row { grid-template-columns: 1fr; gap: 6px; }
}
