/* ===============================
   Material 3 Expressive Dark Theme
   自定义登录系统 UI
================================ */

:root {
  --bg: #0b0f14;
  --surface: rgba(255,255,255,.06);
  --surface-2: rgba(255,255,255,.09);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.66);
  --stroke: rgba(255,255,255,.12);

  /* Expressive Accent */
  --primary: #7cdbff;
  --primary-2: #b6ffcf;
  --danger: #ff6b6b;

  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;

  --shadow-lg: 0 18px 60px rgba(0,0,0,.55);
  --shadow-md: 0 12px 28px rgba(0,0,0,.45);
  --shadow-sm: 0 8px 18px rgba(0,0,0,.35);

  --ring: 0 0 0 3px rgba(124,219,255,.22);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 15% 10%, rgba(124,219,255,.15), transparent 55%),
              radial-gradient(900px 500px at 85% 15%, rgba(182,255,207,.12), transparent 60%),
              radial-gradient(1100px 700px at 40% 90%, rgba(124,219,255,.10), transparent 60%),
              var(--bg);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }

hr {
  border: 0;
  border-top: 1px solid var(--stroke);
  margin: 18px 0;
}

/* ===============================
   Material Symbols
================================ */

.material-symbols-rounded {
  font-variation-settings:
    "FILL" 1,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24;
  vertical-align: middle;
}

/* ===============================
   Layout
================================ */

.center {
  min-height: 100%;
  display: grid;
  place-items: start center;
  padding: 32px;
  padding-top: 42px;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px;
}

/* ===============================
   Card
================================ */

.card {
  width: min(1320px, 100%);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,.08),
    rgba(255,255,255,.05)
  );

  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}

.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(600px 300px at 15% 10%, rgba(124,219,255,.18), transparent 60%),
              radial-gradient(500px 260px at 85% 20%, rgba(182,255,207,.14), transparent 60%);
  pointer-events: none;
  opacity: .9;
}

.card > * { position: relative; }

/* ===============================
   Brand
================================ */

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124,219,255,.25), rgba(182,255,207,.18));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: var(--shadow-sm);
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: .2px;
}

.brand p {
  margin: 3px 0 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ===============================
   Panel
================================ */

.panel {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.panel h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

/* ===============================
   Form
================================ */

.form { display: grid; gap: 12px; }

.field { display: grid; gap: 8px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(124,219,255,.45);
  box-shadow: var(--ring);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

/* ===============================
   Buttons
================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}

.btn:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.18);
}

.btn:active { transform: translateY(1px); }

.btn.filled {
  background: linear-gradient(135deg, rgba(124,219,255,.95), rgba(182,255,207,.85));
  color: #081018;
  border-color: rgba(255,255,255,.0);
}

.btn.tonal {
  background: rgba(124,219,255,.10);
  border-color: rgba(124,219,255,.22);
}

.btn.danger {
  background: rgba(255,107,107,.12);
  border-color: rgba(255,107,107,.25);
}

/* ===============================
   Codebox / Toast
================================ */

.codebox {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 13px;
  line-height: 1.35;
}

/* =============================
   Captcha
============================= */

.captcha-wrap {
  display: grid;
  gap: 12px;
}

.captcha-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.captcha-box {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.10);
  display: grid;
  place-items: center;
}

.captcha-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

.range {
  width: min(680px, 100%);
}

.range input[type="range"] {
  width: 100%;
}

/* =============================
   ME 主页优化：桌面端右侧两列网格
============================= */

.me-left .panel{
  position: sticky;
  top: 18px;
}

.me-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

/* 让每个 panel 内容更“紧凑” */
.me-grid .panel{
  padding: 18px;
}

/* 标题更稳重一点 */
.me-grid .panel h3{
  font-size: 15px;
  margin-bottom: 10px;
  letter-spacing: .2px;
}

/* 让表单按钮更整齐 */
.me-grid .actions{
  justify-content: flex-start;
}

/* 上传按钮别太靠下 */
.me-grid input[type="file"]{
  padding: 10px 12px;
}

/* 移动端回落单列 */
@media (max-width: 1024px){
  .me-left .panel{ position: static; }
  .me-grid{ grid-template-columns: 1fr; }
}

/* =============================
   2026 Auth Center refresh
============================= */

.auth-page,
.dashboard-page,
.docs-page {
  min-height: 100vh;
  background:
    radial-gradient(820px 520px at 8% 4%, rgba(42, 157, 143, .24), transparent 58%),
    radial-gradient(720px 480px at 92% 14%, rgba(255, 183, 77, .22), transparent 56%),
    radial-gradient(660px 420px at 58% 92%, rgba(87, 117, 255, .12), transparent 58%),
    linear-gradient(135deg, #fbfdff 0%, #eef8f4 46%, #fff8ed 100%);
  color: #172033;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 28px;
}

.auth-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(30, 97, 82, .12);
  box-shadow: 0 28px 78px rgba(32, 54, 80, .18);
  backdrop-filter: blur(22px);
  border-radius: 24px;
  overflow: hidden;
}

.auth-hero {
  min-height: 620px;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(160deg, rgba(23, 121, 97, .94), rgba(28, 67, 120, .88)),
    url('/assets/captcha/1.jpg') center/cover;
  color: white;
}

.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #e7fff4);
  color: #17614f;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(0,0,0,.16);
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #183d35;
  color: #fff;
  box-shadow: none;
}

.auth-hero h1 {
  margin: 24px 0 10px;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-hero p,
.page-head p,
.doc-panel p,
.muted {
  color: rgba(23,32,51,.65);
}

.auth-hero p { color: rgba(255,255,255,.78); }

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-pills span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  font-size: 12px;
  font-weight: 700;
}

.auth-panel {
  padding: 42px;
  align-self: center;
}

.auth-panel h2,
.page-head h2,
.doc-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
  letter-spacing: 0;
}

.auth-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(23,32,51,.08);
  margin-bottom: 24px;
}

.auth-tabs a {
  padding: 10px 22px;
  border-radius: 999px;
  color: #314157;
  text-decoration: none;
  font-weight: 700;
}

.auth-tabs a.active {
  background: #fff;
  color: #12352e;
  box-shadow: 0 8px 22px rgba(23,32,51,.10);
}

.form {
  display: grid;
  gap: 15px;
}

.form.compact {
  margin: 0 0 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  font-size: 13px;
  color: #4a5b70;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid rgba(23,32,51,.14);
  background: rgba(255,255,255,.82);
  color: #172033;
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.field input:focus {
  border-color: #1f8f72;
  box-shadow: 0 0 0 4px rgba(31,143,114,.15);
  background: #fff;
}

.captcha-card {
  padding: 14px;
  border: 1px solid rgba(31,143,114,.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(246,253,249,.76));
  display: grid;
  gap: 10px;
}

.captcha-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.captcha-head button {
  border: 0;
  background: transparent;
  color: #1d6d59;
  font-weight: 800;
  cursor: pointer;
}

.captcha-card img {
  width: 150px;
  height: 150px;
  justify-self: center;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(23,32,51,.12);
  transition: transform .08s linear, opacity .18s ease;
}

.captcha-card input[type="range"] {
  width: 100%;
  accent-color: #1f8f72;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(23,32,51,.13);
  background: rgba(255,255,255,.70);
  color: #172033;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23,32,51,.12);
  text-decoration: none;
}

.btn.filled {
  background: linear-gradient(135deg, #178c70, #ffb44f);
  color: #fff;
  border: 0;
}

.btn.tonal {
  background: rgba(31,143,114,.12);
  color: #11614b;
}

.btn.danger {
  background: rgba(218, 57, 57, .11);
  color: #a32828;
}

.btn.wide,
.google-link {
  width: 100%;
}

.google-link,
.docs-link {
  color: #1d6d59;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.alert {
  padding: 13px 15px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-weight: 700;
}

.alert.error { background: #ffe4df; color: #9f2f22; }
.alert.ok { background: #ddf7e9; color: #146246; }

.dashboard-shell {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 34px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 24px;
}

.profile-card,
.panel,
.doc-panel {
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(31,143,114,.12);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(32,54,80,.12);
}

.profile-card {
  position: sticky;
  top: 24px;
  padding: 24px;
  align-self: start;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.avatar-xl {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d9f5eb, #fff0d1);
  border: 4px solid #fff;
  box-shadow: 0 18px 34px rgba(23,32,51,.14);
}

.avatar-xl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-xl span {
  font-size: 56px;
  font-weight: 900;
  color: #1d6d59;
}

.profile-card h1 {
  margin: 20px 0 4px;
  font-size: 26px;
  letter-spacing: 0;
}

.profile-card p {
  margin: 0 0 20px;
  color: #627186;
  overflow-wrap: anywhere;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 24px;
}

.profile-stats span {
  padding: 12px;
  border-radius: 14px;
  background: rgba(23,32,51,.06);
  color: #627186;
  font-size: 12px;
}

.profile-stats b {
  display: block;
  color: #172033;
  margin-top: 2px;
}

.dashboard-main {
  min-width: 0;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h2 { margin-bottom: 4px; }
.page-head p { margin: 0; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  padding: 22px;
}

.panel h3 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: 0;
}

.file-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 118px;
  border: 2px dashed rgba(31,143,114,.34);
  border-radius: 16px;
  background: rgba(31,143,114,.07);
  cursor: pointer;
  color: #17614f;
  font-weight: 900;
}

.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.secret-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(23,32,51,.06);
  margin-bottom: 14px;
}

.secret-box div {
  display: grid;
  gap: 4px;
}

.secret-box span {
  color: #627186;
  font-size: 12px;
  font-weight: 800;
}

.secret-box code,
pre code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.docs-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 38px 24px;
}

.docs-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.docs-hero h1 {
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing: 0;
}

.docs-hero p {
  margin: 0;
  color: #627186;
}

.doc-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 22px;
  color: #4e5d70;
  line-height: 1.8;
}

.doc-list li::marker {
  color: #006b57;
}

.consent-card {
  width: min(640px, 100%);
  padding: 28px;
  border-radius: 32px;
  background: color-mix(in srgb, var(--md-sys-color-surface) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 18%, transparent);
  box-shadow: 0 24px 70px rgba(25, 28, 26, .16);
  backdrop-filter: blur(18px);
  animation: panelIn .48s var(--md-sys-motion-emphasized) both;
}

.consent-brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.consent-brand h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
}

.consent-brand p {
  margin: 5px 0 0;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.6;
}

.consent-target {
  display: grid;
  gap: 6px;
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(220px 140px at 86% 20%, rgba(255,193,81,.30), transparent 62%),
    color-mix(in srgb, var(--md-sys-color-primary-container) 56%, white);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent);
}

.consent-target span,
.consent-scope h2,
.consent-note b {
  color: var(--md-sys-color-primary);
  font-size: 13px;
  font-weight: 900;
}

.consent-target strong {
  color: var(--md-sys-color-on-surface);
  font-size: 28px;
  line-height: 1.16;
}

.consent-target p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.consent-user {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 18px 0;
  padding: 14px;
  border-radius: 22px;
  background: var(--md-sys-color-surface-container);
}

.avatar-sm {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-tertiary-container));
  color: var(--md-sys-color-on-primary-container);
  font-size: 22px;
  font-weight: 900;
}

.avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.consent-user strong,
.consent-user span {
  display: block;
}

.consent-user span {
  margin-top: 4px;
  color: var(--md-sys-color-on-surface-variant);
}

.consent-scope,
.consent-note {
  margin-top: 16px;
  padding: 18px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--md-sys-color-surface-container) 78%, white);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 12%, transparent);
}

.consent-scope h2 {
  margin: 0 0 8px;
}

.consent-note {
  display: grid;
  gap: 8px;
}

.consent-note code {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.06);
  color: var(--md-sys-color-on-surface-variant);
  overflow-wrap: anywhere;
}

.consent-actions {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 12px;
  margin-top: 20px;
}

.doc-panel {
  padding: 24px;
  margin-bottom: 16px;
}

.doc-panel pre {
  background: #13243a;
  color: #eff8ff;
  padding: 16px;
  border-radius: 14px;
  overflow: auto;
}

.auth-card,
.profile-card,
.panel,
.doc-panel {
  position: relative;
}

.panel::before,
.doc-panel::before,
.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.42), transparent 36%);
}

.panel > *,
.doc-panel > *,
.profile-card > * {
  position: relative;
}

.panel:hover,
.doc-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 56px rgba(32,54,80,.16);
}

.panel,
.doc-panel {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.doc-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 860px) {
  .auth-card,
  .dashboard-shell,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: auto;
    padding: 30px;
  }

  .auth-panel {
    padding: 28px;
  }

  .dashboard-shell {
    padding: 20px;
  }

  .profile-card {
    position: static;
  }

  .page-head,
  .docs-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =============================
   维迈晶辉 Material Design 3 动效版
============================= */

:root {
  --md-sys-color-primary: #006b5b;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #9ff2de;
  --md-sys-color-on-primary-container: #002019;
  --md-sys-color-secondary: #4b635c;
  --md-sys-color-secondary-container: #cee9df;
  --md-sys-color-tertiary: #6f5d00;
  --md-sys-color-tertiary-container: #ffe16d;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-background: #f8fbf7;
  --md-sys-color-surface: #fbfdf8;
  --md-sys-color-surface-container: #eef3ed;
  --md-sys-color-surface-container-high: #e8eee7;
  --md-sys-color-outline: #707973;
  --md-sys-color-on-surface: #191c1a;
  --md-sys-color-on-surface-variant: #404944;
  --md-sys-elevation-1: 0 1px 3px rgba(25, 28, 26, .16), 0 1px 2px rgba(25, 28, 26, .10);
  --md-sys-elevation-2: 0 2px 6px rgba(25, 28, 26, .16), 0 2px 4px rgba(25, 28, 26, .10);
  --md-sys-elevation-3: 0 6px 16px rgba(25, 28, 26, .16), 0 2px 8px rgba(25, 28, 26, .10);
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-motion-standard: cubic-bezier(.2, 0, 0, 1);
  --md-sys-motion-emphasized: cubic-bezier(.2, 0, 0, 1);
}

@keyframes pageRise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes softSweep {
  from { transform: translateX(-18%) skewX(-8deg); opacity: .18; }
  50% { opacity: .38; }
  to { transform: translateX(118%) skewX(-8deg); opacity: .12; }
}

@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pressPulse {
  0% { transform: scale(.98); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.auth-page,
.dashboard-page,
.docs-page {
  background:
    linear-gradient(115deg, rgba(0,107,91,.10), transparent 32%),
    linear-gradient(245deg, rgba(255,193,81,.16), transparent 34%),
    linear-gradient(180deg, #fbfdf8 0%, #eef7f2 55%, #fff8e8 100%);
  color: var(--md-sys-color-on-surface);
}

.auth-shell,
.dashboard-shell,
.docs-shell {
  animation: pageRise .52s var(--md-sys-motion-emphasized) both;
}

.auth-card {
  border-radius: var(--md-sys-shape-corner-extra-large);
  background: color-mix(in srgb, var(--md-sys-color-surface) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 18%, transparent);
  box-shadow: var(--md-sys-elevation-3);
}

.auth-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(0, 91, 77, .94), rgba(44, 74, 130, .84)),
    url('/assets/captcha/1.jpg') center/cover;
}

.auth-hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: softSweep 5.8s var(--md-sys-motion-standard) infinite;
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.brand-mark {
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--md-sys-elevation-2);
}

.brand-mark.small {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.auth-hero h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 800;
}

.hero-pills span,
.auth-motion-list span {
  animation: floatChip 3.8s ease-in-out infinite;
}

.hero-pills span:nth-child(2),
.auth-motion-list span:nth-child(2) { animation-delay: .18s; }
.hero-pills span:nth-child(3),
.auth-motion-list span:nth-child(3) { animation-delay: .36s; }

.auth-motion-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  width: min(260px, 100%);
}

.auth-motion-list span {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-corner-large);
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.92);
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.auth-tabs {
  background: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-sys-shape-corner-extra-large);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--md-sys-color-outline) 14%, transparent);
}

.auth-tabs a {
  color: var(--md-sys-color-on-surface-variant);
  transition: background .2s var(--md-sys-motion-standard), color .2s var(--md-sys-motion-standard), transform .2s var(--md-sys-motion-standard);
}

.auth-tabs a.active {
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
  box-shadow: var(--md-sys-elevation-1);
  transform: translateY(-1px);
}

.auth-panel,
.settings-grid .panel,
.doc-panel {
  animation: panelIn .48s var(--md-sys-motion-emphasized) both;
}

.settings-grid .panel:nth-child(2) { animation-delay: .06s; }
.settings-grid .panel:nth-child(3) { animation-delay: .12s; }
.settings-grid .panel:nth-child(4) { animation-delay: .18s; }
.doc-panel:nth-of-type(2) { animation-delay: .06s; }
.doc-panel:nth-of-type(3) { animation-delay: .12s; }
.doc-panel:nth-of-type(4) { animation-delay: .18s; }

.field input {
  min-height: 56px;
  border-radius: var(--md-sys-shape-corner-medium);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 44%, transparent);
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
}

.field input:hover {
  background: color-mix(in srgb, var(--md-sys-color-surface-container-high) 82%, white);
}

.field input:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent);
  background: var(--md-sys-color-surface);
}

.captcha-card,
.panel,
.doc-panel,
.profile-card {
  border-radius: var(--md-sys-shape-corner-large);
  background: color-mix(in srgb, var(--md-sys-color-surface) 88%, transparent);
  border-color: color-mix(in srgb, var(--md-sys-color-outline) 18%, transparent);
}

.captcha-card img {
  border-radius: var(--md-sys-shape-corner-large);
  box-shadow: var(--md-sys-elevation-1);
}

.btn {
  min-height: 48px;
  border-radius: var(--md-sys-shape-corner-extra-large);
  font-weight: 800;
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 22%, transparent);
  box-shadow: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--md-sys-elevation-2);
}

.btn:active {
  animation: pressPulse .24s var(--md-sys-motion-standard);
}

.btn.filled {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.btn.tonal {
  background: var(--md-sys-color-secondary-container);
  color: #17352d;
}

.btn.danger {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
}

.profile-card {
  box-shadow: var(--md-sys-elevation-2);
}

.avatar-xl {
  border-radius: var(--md-sys-shape-corner-extra-large);
  background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-tertiary-container));
  animation: floatChip 4.2s ease-in-out infinite;
}

.panel h3,
.page-head h2,
.doc-panel h2 {
  color: var(--md-sys-color-on-surface);
}

.file-drop {
  background: color-mix(in srgb, var(--md-sys-color-primary-container) 36%, white);
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 34%, transparent);
  border-radius: var(--md-sys-shape-corner-large);
}

.alert {
  border-radius: var(--md-sys-shape-corner-medium);
}

.alert.error {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
}

.alert.ok {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =============================
   手机与折叠屏适配
============================= */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
}

.auth-shell,
.dashboard-shell,
.docs-shell {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.auth-card,
.profile-card,
.panel,
.doc-panel,
.captcha-card {
  contain: layout paint;
}

.auth-panel,
.panel,
.doc-panel,
.profile-card {
  overflow-wrap: anywhere;
}

.field input,
.btn,
.auth-tabs a,
.captcha-head button {
  touch-action: manipulation;
}

pre,
code {
  max-width: 100%;
}

/* 普通手机：更像原生应用的单页卡片 */
@media (max-width: 599px) {
  .auth-page,
  .dashboard-page,
  .docs-page {
    background:
      radial-gradient(420px 260px at 12% 0%, rgba(0,107,91,.18), transparent 62%),
      radial-gradient(360px 240px at 92% 8%, rgba(255,193,81,.22), transparent 60%),
      linear-gradient(180deg, #fbfdf8 0%, #eef7f2 100%);
  }

  .auth-shell {
    min-height: 100dvh;
    align-content: start;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .auth-card {
    width: 100%;
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .auth-hero {
    min-height: 212px;
    padding: 22px;
    justify-content: flex-end;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .auth-hero h1 {
    margin-top: 16px;
    font-size: 30px;
    line-height: 1.14;
  }

  .auth-hero p {
    font-size: 14px;
    line-height: 1.65;
  }

  .hero-pills {
    gap: 6px;
    margin-top: 14px;
  }

  .hero-pills span {
    padding: 6px 9px;
    font-size: 11px;
  }

  .auth-motion-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin-top: 14px;
  }

  .auth-motion-list span {
    min-height: 34px;
    justify-content: center;
    padding: 0 8px;
    font-size: 12px;
    text-align: center;
  }

  .auth-panel {
    padding: 22px;
  }

  .auth-tabs {
    display: grid;
    width: 100%;
  }

  .auth-tabs a {
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0 12px;
  }

  .form {
    gap: 14px;
  }

  .field input {
    min-height: 54px;
    font-size: 16px;
  }

  .captcha-card {
    padding: 12px;
  }

  .captcha-card img {
    width: min(46vw, 168px);
    height: min(46vw, 168px);
  }

  .btn {
    min-height: 50px;
    width: 100%;
  }

  .docs-link {
    width: 100%;
    min-height: 44px;
    display: grid;
    place-items: center;
  }

  .dashboard-shell {
    width: 100%;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .profile-card {
    position: static;
    padding: 18px;
    border-radius: 24px;
  }

  .brand-row {
    margin-bottom: 18px;
  }

  .avatar-xl {
    width: 104px;
    height: 104px;
    border-radius: 24px;
  }

  .profile-card h1 {
    font-size: 24px;
  }

  .profile-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .page-head {
    gap: 10px;
    margin-bottom: 14px;
  }

  .page-head .btn {
    width: 100%;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .file-drop {
    min-height: 104px;
  }

  .docs-shell {
    width: 100%;
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .docs-hero {
    gap: 12px;
  }

  .docs-hero h1 {
    font-size: 27px;
    line-height: 1.18;
  }

  .doc-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .doc-panel pre {
    padding: 12px;
    font-size: 12px;
  }

  .doc-actions {
    flex-direction: column;
  }

  .consent-card {
    padding: 20px;
    border-radius: 28px;
  }

  .consent-brand {
    align-items: flex-start;
  }

  .consent-brand h1 {
    font-size: 28px;
  }

  .consent-target strong {
    font-size: 24px;
  }

  .consent-actions {
    grid-template-columns: 1fr;
  }
}

/* 很窄的小屏：避免按钮与验证码挤压 */
@media (max-width: 380px) {
  .auth-shell,
  .dashboard-shell,
  .docs-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .auth-hero,
  .auth-panel,
  .panel,
  .doc-panel,
  .profile-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .auth-motion-list {
    grid-template-columns: 1fr;
  }

  .captcha-card img {
    width: 142px;
    height: 142px;
  }
}

/* 横屏手机：减少垂直高度，避免首屏只能看到一半 */
@media (max-height: 520px) and (orientation: landscape) {
  .auth-shell {
    min-height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .auth-card {
    grid-template-columns: minmax(240px, .78fr) minmax(360px, 1fr);
  }

  .auth-hero {
    min-height: auto;
    padding: 22px;
  }

  .auth-hero h1 {
    font-size: 28px;
  }

  .auth-motion-list {
    display: none;
  }

  .auth-panel {
    padding: 22px;
  }

  .captcha-card {
    grid-template-columns: 132px 1fr;
    align-items: center;
  }

  .captcha-head,
  .captcha-card small {
    grid-column: 2;
  }

  .captcha-card img {
    grid-row: 1 / span 3;
    width: 118px;
    height: 118px;
  }
}

/* 折叠屏半开：常见 600-899px，保留单列但更舒展 */
@media (min-width: 600px) and (max-width: 899px) {
  .auth-shell {
    min-height: 100dvh;
    padding: 24px;
  }

  .auth-card {
    width: min(720px, 100%);
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: 280px;
    padding: 34px;
  }

  .auth-panel {
    padding: 34px;
  }

  .auth-motion-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .auth-motion-list span {
    justify-content: center;
  }

  .captcha-card img {
    width: 176px;
    height: 176px;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
    width: min(760px, 100%);
    padding: 24px;
  }

  .profile-card {
    position: static;
  }

  .profile-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    column-gap: 22px;
    align-items: center;
  }

  .profile-card .brand-row,
  .profile-card form {
    grid-column: 1 / -1;
  }

  .avatar-xl {
    width: 132px;
    height: 132px;
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-shell {
    width: min(760px, 100%);
  }
}

/* 折叠屏展开/小平板：双栏登录，个人中心紧凑双栏 */
@media (min-width: 900px) and (max-width: 1180px) {
  .auth-card {
    width: min(1040px, 100%);
    grid-template-columns: minmax(340px, .9fr) minmax(420px, 1.1fr);
  }

  .auth-hero {
    min-height: min(660px, calc(100dvh - 56px));
  }

  .dashboard-shell {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    padding: 26px;
  }

  .settings-grid {
    gap: 16px;
  }

  .panel {
    padding: 20px;
  }
}

/* 触摸设备：取消悬停导致的奇怪停留状态 */
@media (hover: none) {
  .btn:hover,
  .panel:hover,
  .doc-panel:hover {
    transform: none;
    box-shadow: var(--md-sys-elevation-1);
  }
}

/* =============================
   新版登录注册页
============================= */

.auth-page {
  background:
    radial-gradient(640px 360px at 12% 10%, rgba(0, 107, 91, .18), transparent 62%),
    radial-gradient(620px 360px at 86% 16%, rgba(255, 189, 72, .26), transparent 60%),
    radial-gradient(720px 420px at 52% 96%, rgba(97, 112, 255, .12), transparent 62%),
    linear-gradient(180deg, #fbfdf8 0%, #edf7f2 100%);
}

.auth-app {
  width: min(1120px, 100%);
  display: grid;
  gap: 22px;
}

.auth-brand-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 30px;
  background: color-mix(in srgb, var(--md-sys-color-surface) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 16%, transparent);
  box-shadow: var(--md-sys-elevation-1);
  backdrop-filter: blur(18px);
}

.auth-brand-strip h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
  color: var(--md-sys-color-on-surface);
}

.auth-brand-strip p {
  margin: 4px 0 0;
  color: var(--md-sys-color-on-surface-variant);
}

.auth-stage {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 360px;
  gap: 22px;
  align-items: stretch;
}

.auth-main-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,253,249,.92));
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 18%, transparent);
  box-shadow: 0 24px 70px rgba(25, 28, 26, .16);
  animation: panelIn .5s var(--md-sys-motion-emphasized) both;
}

.auth-main-card::before {
  content: "";
  position: absolute;
  inset: auto -18% -34% auto;
  width: 360px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159,242,222,.58), transparent 66%);
  pointer-events: none;
  animation: floatChip 5s ease-in-out infinite;
}

.auth-main-card > * {
  position: relative;
}

.auth-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

.auth-kicker {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 13px;
  font-weight: 900;
}

.auth-card-head h2 {
  margin: 12px 0 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.08;
  color: var(--md-sys-color-on-surface);
}

.auth-main-card .auth-tabs {
  margin: 0;
  align-self: start;
}

.auth-main-card .form {
  gap: 16px;
}

.auth-main-card .field span {
  padding-left: 4px;
}

.auth-main-card .captcha-card {
  grid-template-columns: 1fr 150px;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(206,233,223,.76), rgba(255,245,213,.62));
}

.captcha-copy {
  display: grid;
  gap: 8px;
}

.captcha-copy strong {
  font-size: 16px;
  color: var(--md-sys-color-on-surface);
}

.captcha-copy small {
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.55;
}

.captcha-copy button {
  justify-self: start;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-primary);
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--md-sys-elevation-1);
}

.auth-main-card .captcha-card img {
  width: 132px;
  height: 132px;
  grid-column: 2;
  grid-row: 1 / span 2;
}

.auth-main-card .captcha-card input[type="range"] {
  grid-column: 1 / -1;
}

.auth-side-panel {
  position: relative;
  min-height: 100%;
  padding: 24px;
  border-radius: 34px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(0, 91, 77, .92), rgba(44, 74, 130, .88));
  box-shadow: var(--md-sys-elevation-3);
  animation: panelIn .55s var(--md-sys-motion-emphasized) .08s both;
}

.side-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.side-orbit span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  animation: floatChip 4.6s ease-in-out infinite;
}

.side-orbit span:nth-child(1) {
  width: 120px;
  height: 120px;
  top: 24px;
  right: -30px;
}

.side-orbit span:nth-child(2) {
  width: 76px;
  height: 76px;
  bottom: 90px;
  left: 22px;
  animation-delay: .3s;
}

.side-orbit span:nth-child(3) {
  width: 44px;
  height: 44px;
  bottom: 28px;
  right: 52px;
  animation-delay: .6s;
}

.side-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.20);
  color: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  margin-bottom: 14px;
  animation: panelIn .45s var(--md-sys-motion-emphasized) both;
}

.side-card:nth-of-type(2) { animation-delay: .12s; }
.side-card:nth-of-type(3) { animation-delay: .20s; }
.side-card:nth-of-type(4) { animation-delay: .28s; }

.side-card.primary {
  margin-top: 120px;
  background: rgba(255,255,255,.22);
}

.side-card b {
  font-size: 18px;
}

.side-card span {
  line-height: 1.6;
  color: rgba(255,255,255,.78);
}

@media (max-width: 899px) {
  .auth-app {
    width: min(720px, 100%);
  }

  .auth-stage {
    grid-template-columns: 1fr;
  }

  .auth-side-panel {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 16px;
    border-radius: 28px;
  }

  .side-card,
  .side-card.primary {
    margin: 0;
    padding: 14px;
  }

  .side-card b {
    font-size: 15px;
  }

  .side-card span {
    font-size: 12px;
  }
}

@media (max-width: 599px) {
  .auth-app {
    gap: 14px;
  }

  .auth-brand-strip {
    align-items: flex-start;
    border-radius: 24px;
  }

  .auth-brand-strip p {
    font-size: 13px;
    line-height: 1.55;
  }

  .auth-main-card {
    padding: 20px;
    border-radius: 28px;
  }

  .auth-card-head {
    grid-template-columns: 1fr;
  }

  .auth-main-card .auth-tabs {
    width: 100%;
  }

  .auth-main-card .captcha-card {
    grid-template-columns: 1fr;
  }

  .auth-main-card .captcha-card img {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    width: min(48vw, 154px);
    height: min(48vw, 154px);
  }

  .auth-side-panel {
    grid-template-columns: 1fr;
  }
}

/* =============================
   侧栏式个人中心
============================= */

.account-page {
  min-height: 100vh;
}

.account-shell {
  width: min(1280px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.account-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 32px;
  background: color-mix(in srgb, var(--md-sys-color-surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 18%, transparent);
  box-shadow: var(--md-sys-elevation-2);
  backdrop-filter: blur(18px);
}

.account-brand,
.account-mini {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-brand span,
.account-mini span {
  display: block;
  margin-top: 3px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-mini {
  padding: 14px;
  border-radius: 24px;
  background: var(--md-sys-color-surface-container);
}

.account-mini-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-tertiary-container));
  color: var(--md-sys-color-on-primary-container);
  font-size: 21px;
  font-weight: 900;
  box-shadow: var(--md-sys-elevation-1);
}

.account-mini-avatar.large {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  font-size: 34px;
}

.account-mini-avatar.xlarge {
  width: 128px;
  height: 128px;
  border-radius: 30px;
  font-size: 50px;
}

.account-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-nav {
  display: grid;
  gap: 8px;
}

.account-nav a {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border-radius: 20px;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  transition: background .18s var(--md-sys-motion-standard), transform .18s var(--md-sys-motion-standard), color .18s var(--md-sys-motion-standard);
}

.account-nav a strong {
  color: var(--md-sys-color-on-surface);
  font-size: 14px;
}

.account-nav a span {
  font-size: 11px;
}

.account-nav a:hover,
.account-nav a.active {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  transform: translateX(2px);
}

.account-nav a:hover strong,
.account-nav a.active strong {
  color: var(--md-sys-color-on-primary-container);
}

.account-sidebar-actions {
  display: grid;
  gap: 10px;
}

.account-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.account-hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 30px;
  background:
    radial-gradient(360px 190px at 88% 18%, rgba(255,193,81,.26), transparent 62%),
    linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary-container) 52%, white), rgba(255,255,255,.88));
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 14%, transparent);
  box-shadow: var(--md-sys-elevation-1);
  animation: panelIn .42s var(--md-sys-motion-emphasized) both;
}

.account-hero h1 {
  margin: 10px 0 0;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.16;
  color: var(--md-sys-color-on-surface);
}

.account-hero p {
  width: min(680px, 100%);
  margin: 8px 0 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  line-height: 1.65;
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.account-stat,
.account-panel {
  background: color-mix(in srgb, var(--md-sys-color-surface) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 16%, transparent);
  box-shadow: var(--md-sys-elevation-1);
  backdrop-filter: blur(12px);
}

.account-stat {
  min-height: 96px;
  display: grid;
  align-content: space-between;
  padding: 16px;
  border-radius: 22px;
}

.account-stat span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-weight: 800;
}

.account-stat strong {
  color: var(--md-sys-color-on-surface);
  font-size: clamp(18px, 2vw, 24px);
  overflow-wrap: anywhere;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.account-panel {
  padding: 20px;
  border-radius: 24px;
  animation: panelIn .44s var(--md-sys-motion-emphasized) both;
}

.account-panel.full {
  grid-column: 1 / -1;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title h2 {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-size: 19px;
  line-height: 1.25;
}

.panel-title p,
.avatar-current p {
  margin: 6px 0 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
  line-height: 1.65;
}

.identity-row,
.avatar-current {
  display: flex;
  gap: 18px;
  align-items: center;
}

.identity-row strong {
  display: block;
  font-size: 20px;
  line-height: 1.25;
}

.identity-row span {
  display: block;
  margin-top: 6px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 18px;
  background: var(--md-sys-color-surface-container);
}

.status-list b {
  color: var(--md-sys-color-on-surface);
}

.status-list em {
  color: var(--md-sys-color-primary);
  font-style: normal;
  font-weight: 900;
}

.avatar-workspace {
  display: grid;
  gap: 22px;
}

.avatar-picker {
  min-height: 180px;
}

.avatar-picker-preview {
  display: none;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--md-sys-elevation-2);
}

.avatar-picker-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-picker-name {
  font-size: 13px;
  color: var(--md-sys-color-on-surface-variant);
}

.avatar-picker.has-file .avatar-picker-empty {
  display: none;
}

.avatar-picker.has-file .avatar-picker-preview {
  display: block;
}

.avatar-picker.is-dragging {
  background: var(--md-sys-color-primary-container);
  transform: scale(.995);
}

.site-list {
  display: grid;
  gap: 14px;
}

.site-list.compact {
  gap: 10px;
}

.site-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: var(--md-sys-color-surface-container);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 12%, transparent);
}

.site-card.is-revoked {
  opacity: .72;
}

.site-card h3 {
  margin: 6px 0 4px;
  font-size: 17px;
  line-height: 1.28;
  color: var(--md-sys-color-on-surface);
}

.site-card p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.site-card code {
  display: block;
  width: min(620px, 100%);
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.05);
  color: var(--md-sys-color-on-surface-variant);
  overflow-wrap: anywhere;
}

.site-platform,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 12px;
  font-weight: 900;
}

.site-meta {
  display: grid;
  gap: 5px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  white-space: nowrap;
}

.site-actions {
  display: grid;
  justify-items: end;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 22px;
  border-radius: 24px;
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
}

.empty-state.large {
  min-height: 220px;
  place-content: center;
  text-align: center;
}

.empty-state strong {
  color: var(--md-sys-color-on-surface);
  font-size: 18px;
}

@media (max-width: 1180px) {
  .account-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .account-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-actions {
    justify-items: start;
  }
}

@media (max-width: 899px) {
  .account-shell {
    grid-template-columns: 1fr;
    width: min(760px, 100%);
    padding: 18px;
  }

  .account-sidebar {
    position: static;
    border-radius: 28px;
  }

  .account-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(128px, 1fr);
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .account-nav a {
    min-height: 72px;
  }

  .account-nav a:hover,
  .account-nav a.active {
    transform: translateY(-1px);
  }

  .account-sidebar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .account-brand,
  .account-mini {
    align-items: center;
  }

  .account-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 599px) {
  .account-shell {
    width: 100%;
    min-height: 100dvh;
    padding: max(12px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
    gap: 14px;
  }

  .account-sidebar,
  .account-hero,
  .account-panel,
  .account-stat {
    border-radius: 24px;
  }

  .account-brand {
    align-items: flex-start;
  }

  .account-mini {
    align-items: flex-start;
  }

  .account-nav {
    grid-auto-columns: 132px;
  }

  .account-sidebar-actions {
    grid-template-columns: 1fr;
  }

  .account-hero {
    padding: 22px;
  }

  .account-stats {
    grid-template-columns: 1fr;
  }

  .panel-title,
  .identity-row,
  .avatar-current {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-title .btn {
    width: 100%;
  }

  .site-meta {
    white-space: normal;
  }
}

/* =============================
   接入文档增强
============================= */

.doc-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.doc-steps span {
  display: grid;
  gap: 10px;
  min-height: 132px;
  align-content: start;
  padding: 16px;
  border-radius: 22px;
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.6;
}

.doc-steps b {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.doc-callout {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--md-sys-color-primary-container) 56%, white);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent);
}

.doc-callout strong {
  color: var(--md-sys-color-on-primary-container);
}

.doc-callout span {
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.7;
}

.doc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  margin: 16px 0;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 18%, transparent);
  background: color-mix(in srgb, var(--md-sys-color-surface) 80%, transparent);
}

.doc-table th,
.doc-table td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 12%, transparent);
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.7;
}

.doc-table th {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-weight: 900;
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.doc-flow span {
  position: relative;
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
  box-shadow: var(--md-sys-elevation-1);
}

.doc-panel h3 {
  margin: 20px 0 10px;
  color: var(--md-sys-color-on-surface);
}

@media (max-width: 899px) {
  .doc-steps,
  .doc-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .doc-steps,
  .doc-flow {
    grid-template-columns: 1fr;
  }

  .doc-table {
    display: block;
    overflow-x: auto;
  }

  .doc-table th,
  .doc-table td {
    min-width: 150px;
  }
}

/* =============================
   后台管理
============================= */

.admin-page {
  min-height: 100vh;
}

.admin-shell {
  width: min(1320px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 30px;
  background: color-mix(in srgb, var(--md-sys-color-surface) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 18%, transparent);
  box-shadow: var(--md-sys-elevation-2);
  backdrop-filter: blur(18px);
}

.admin-current {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 22px;
  background: var(--md-sys-color-surface-container);
}

.admin-current strong {
  color: var(--md-sys-color-on-surface);
}

.admin-current span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: var(--md-sys-color-surface-container);
}

.admin-list strong,
.admin-list span,
.admin-list em {
  display: block;
}

.admin-list span,
.admin-list em {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-style: normal;
}

.admin-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-row-actions .btn {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
}

.admin-checks {
  display: grid;
  gap: 12px;
}

.admin-checks article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: var(--md-sys-color-surface-container);
}

.admin-checks strong,
.admin-checks span {
  display: block;
}

.admin-checks span {
  margin-top: 4px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
}

.status-pill.ok {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.status-pill.warn {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
}

@media (max-width: 899px) {
  .admin-shell {
    grid-template-columns: 1fr;
    width: min(780px, 100%);
    padding: 18px;
  }

  .admin-sidebar {
    position: static;
  }
}

@media (max-width: 599px) {
  .admin-shell {
    width: 100%;
    padding: max(12px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
    gap: 14px;
  }

  .admin-sidebar,
  .account-panel,
  .account-hero {
    border-radius: 24px;
  }

  .admin-search {
    grid-template-columns: 1fr;
  }

  .admin-checks article,
  .admin-list article {
    flex-direction: column;
    align-items: flex-start;
  }
}
