/* ==========================================================================
   PETRA 用户中心（/register、/login、/account）
   只补站点 CSS（assets/css/site.css）里没有的「表单控件」与页面骨架；
   token / .btn / .card / .meta-list / .badge / .site-header 全部复用站点既有样式，无任何框架。
   ========================================================================== */

.acct-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.acct-main {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  padding: 48px 0 64px;
}

.acct-card {
  width: 100%;
  max-width: 560px;
}

.acct-title {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.acct-lead {
  margin: 0 0 18px;
  color: var(--muted-foreground);
  font-size: 14px;
}

/* 内联错误：不弹窗、不跳页；用站点 destructive token 做左侧提示条 */
.acct-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--destructive);
  background: var(--muted);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--foreground);
}

.acct-form {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.acct-form--inline {
  margin-top: 22px;
}

.acct-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.acct-field input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 16px; /* ≥16px：iOS 聚焦不放大 */
}

.acct-field input:focus {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
  border-color: transparent;
}

.acct-form .btn {
  margin-top: 6px;
  height: 44px;
}

.acct-alt {
  margin: 18px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.acct-note {
  color: var(--muted-foreground);
  font-size: 12px;
}

.acct-facts {
  margin: 18px 0 0;
}

.acct-facts dd {
  font-size: 14px;
}

.acct-foot {
  flex-shrink: 0;
  padding: 24px 16px 32px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.9;
}

.acct-foot p {
  margin: 0;
}

.acct-foot a {
  color: inherit;
}

/* 移动端：单列（meta-list 改为上下两行，长文案不再右对齐挤成一列） */
@media (max-width: 640px) {
  .acct-main {
    padding: 24px 0 40px;
  }

  .acct-card {
    max-width: 100%;
    padding: var(--space-xl);
  }

  .acct-title {
    font-size: 24px;
  }

  .acct-facts div {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .acct-facts dd {
    text-align: left;
  }
}

/* ==========================================================================
   切片 2（兑换 / 设备 / 找回密码）：只补站点 CSS 里没有的四个小件
   —— 成功条 .acct-ok、动作行 .acct-actions、页内导航 .acct-nav、设备表 .acct-table
   ========================================================================== */

.acct-ok {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent, #fc4c02);
  background: var(--muted);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.7;
  color: var(--foreground);
}

.acct-ok p {
  margin: 0;
}

.acct-ok p + p {
  margin-top: 6px;
}

.acct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.acct-actions--split {
  margin: 18px 0 0;
}

.acct-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.acct-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--foreground);
  font-size: 13px;
  text-decoration: none;
}

.acct-nav__link.is-active {
  border-color: var(--accent, #fc4c02);
  color: var(--accent, #fc4c02);
  font-weight: 600;
}

.acct-tablewrap {
  margin: 18px 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.acct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.acct-table th,
.acct-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.acct-table th {
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.acct-table code {
  font-size: 12px;
}

.acct-table form {
  margin: 0;
}

.acct-table__empty {
  color: var(--muted-foreground);
  white-space: normal;
}

.acct-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 12px;
}

.acct-badge--on {
  background: rgba(252, 76, 2, 0.12);
  color: var(--accent, #fc4c02);
  font-weight: 600;
}

/* 窄屏：设备表改成一行一卡（表头隐藏，单元格用 data-label 前缀） */
@media (max-width: 640px) {
  .acct-table thead {
    display: none;
  }

  .acct-table,
  .acct-table tbody,
  .acct-table tr,
  .acct-table td {
    display: block;
    width: 100%;
  }

  .acct-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 6px 2px;
  }

  .acct-table td {
    border: 0;
    white-space: normal;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 12px;
  }

  .acct-table td::before {
    content: attr(data-label);
    color: var(--muted-foreground);
    font-size: 12px;
    flex: 0 0 auto;
  }

  .acct-table__empty::before {
    content: none;
  }
}
