:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  background: #f2f5f3;
  color: #162a2b;
  --ink: #162a2b;
  --muted: #647576;
  --line: #d9e3df;
  --paper: #ffffff;
  --wash: #e9f0ed;
  --teal: #1e7775;
  --teal-dark: #155d5c;
  --coral: #a9483a;
  --shadow: 0 16px 40px rgba(26, 56, 52, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f2f5f3; }
a { color: inherit; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  width: min(100% - 48px, 1120px); margin: 0 auto; padding: 28px 0 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 18px; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 11px; }
.site-nav { display: flex; gap: 24px; }
.site-nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.site-nav a:hover, .site-nav a.active { color: var(--teal-dark); }
.site-nav a.active { font-weight: 700; }

.account-shell { width: min(100% - 48px, 1120px); margin: 0 auto; padding: 24px 0 64px; }
.account-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 44px 0 38px; border-top: 1px solid var(--line); }
.eyebrow { margin: 0 0 10px; color: var(--teal-dark); font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1, h2 { margin: 0; color: var(--ink); }
h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
h2 { font-size: 20px; }
.hero-copy { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.hero-status { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); color: #45615e; font-size: 13px; white-space: nowrap; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2e9a6b; box-shadow: 0 0 0 4px #e2f2e8; }
.status-dot.small { width: 7px; height: 7px; margin-right: 7px; box-shadow: none; vertical-align: 1px; }

.account-grid { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(380px, 1.15fr); gap: 20px; align-items: start; }
.account-card { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 26px 28px 22px; border-bottom: 1px solid #e8efec; }
.identity-icon, .lock-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--wash); color: var(--teal-dark); font-size: 20px; }
.identity-list { margin: 0; padding: 4px 28px 22px; }
.identity-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #edf2f0; }
.identity-list > div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 700; text-align: right; }
dd.accent { color: var(--teal-dark); }
.client-note { display: grid; gap: 5px; margin: 0 28px 28px; padding: 16px; border-left: 3px solid #d79b61; background: #fff8ef; color: #6a5443; font-size: 13px; line-height: 1.55; }
.client-note strong { color: #694633; font-size: 14px; }

.password-card .card-heading { padding-bottom: 20px; }
.password-card form { padding: 24px 28px 28px; }
.field { display: block; margin: 0 0 18px; }
.field > span:first-child { display: block; margin-bottom: 8px; color: #425957; font-size: 13px; font-weight: 700; }
input { width: 100%; min-height: 46px; border: 1px solid #cbd8d4; border-radius: 5px; padding: 10px 12px; color: var(--ink); background: #fff; font: inherit; outline: none; }
input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(30, 119, 117, .14); }
.field-hint { display: block; min-height: 16px; margin-top: 6px; color: #7b8b89; font-size: 12px; }
.field-hint.success { color: #258258; }
.field-hint.error { color: var(--coral); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; border: 0; border-radius: 5px; background: var(--teal); color: #fff; cursor: pointer; font: inherit; font-weight: 800; }
.btn:hover { background: var(--teal-dark); }
.btn:disabled { cursor: wait; opacity: .72; }
.btn.secondary { width: auto; min-width: 132px; padding: 0 18px; background: #edf2f0; color: #47615d; }
.btn.secondary:hover { background: #e2ebe7; }
.btn.loading .btn-label { opacity: 0; }
.btn-spinner { display: none; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; }
.btn.loading .btn-spinner { display: block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { display: none; margin: 16px 0 0; border-radius: 5px; padding: 11px 12px; font-size: 13px; line-height: 1.45; }
.status.show { display: block; }
.status.error { background: #fbeceb; color: #963c31; }
.status.success { background: #e6f4eb; color: #226f4b; }

.account-footer-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 8px; background: #e9f0ed; color: #536966; }
.account-footer-panel div { display: grid; gap: 5px; }
.account-footer-panel strong { color: var(--ink); font-size: 14px; }
.account-footer-panel span { font-size: 13px; }

/* Existing register/login forms share these primitives. */
.shell { width: min(100% - 32px, 480px); margin: 0 auto; padding: 40px 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.topbar .brand { font-size: 20px; }
.topbar a:not(.brand), .links a { color: var(--teal-dark); font-size: 14px; text-decoration: none; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.panel__header { padding: 28px 28px 18px; border-bottom: 1px solid #e8efec; }
.panel__title { margin: 0; font-size: 22px; font-weight: 800; }
.panel__sub { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.panel__body { padding: 24px 28px 28px; }
.links { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; }
.hint { min-height: 18px; margin: 6px 0 0; color: #6a7b7f; font-size: 12px; }
.hint.ok, .hint.success { color: #18764e; }
.hint.error { color: var(--coral); }
.divider { height: 1px; margin: 28px 0; background: #e8efec; }

@media (max-width: 760px) {
  .site-header, .account-shell { width: min(100% - 32px, 600px); }
  .account-hero { align-items: flex-start; flex-direction: column; gap: 18px; padding: 32px 0 28px; }
  .account-grid { grid-template-columns: 1fr; }
  .hero-status { align-self: flex-start; }
}
@media (max-width: 520px) {
  .site-header { padding: 20px 0 18px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 12px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 28px; height: 28px; }
  .account-shell { width: min(100% - 24px, 480px); padding-bottom: 36px; }
  h1 { font-size: 29px; }
  .card-heading, .password-card form { padding-left: 20px; padding-right: 20px; }
  .identity-list { padding-left: 20px; padding-right: 20px; }
  .client-note { margin-left: 20px; margin-right: 20px; }
  .account-footer-panel { align-items: stretch; flex-direction: column; margin-top: 14px; padding: 18px; }
  .btn.secondary { width: 100%; }
  .shell { width: min(100% - 24px, 480px); padding: 24px 0; }
  .panel__header, .panel__body { padding-left: 20px; padding-right: 20px; }
}
