.account-shell {
  min-height: 100vh;
  background: var(--page, #f7f5f0);
  color: var(--ink, #1f2823);
}

.account-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.account-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 80px;
}

.account-intro {
  max-width: 760px;
  margin-bottom: 30px;
}

.account-intro h1 {
  margin: 8px 0 14px;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: .98;
}

.account-intro > p:last-of-type {
  max-width: 680px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.account-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.account-trust span {
  padding: 8px 12px;
  border: 1px solid var(--line, #d8ddd8);
  border-radius: 999px;
  background: var(--surface, #fff);
  font-size: .85rem;
  font-weight: 700;
}

.account-card {
  border: 1px solid var(--line, #d8ddd8);
  border-radius: 24px;
  background: var(--surface, #fff);
  padding: clamp(22px, 4vw, 34px);
  box-shadow: 0 20px 50px rgba(31, 40, 35, .07);
}

#authPanel {
  max-width: 620px;
}

.account-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--soft, #eef1ed);
  margin-bottom: 24px;
}

.account-tab {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 10px 16px;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.account-tab.active {
  background: var(--surface, #fff);
  box-shadow: 0 4px 16px rgba(31, 40, 35, .09);
}

.account-form {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.account-form label {
  font-size: .88rem;
  font-weight: 700;
}

.account-form input {
  width: 100%;
  border: 1px solid var(--line, #d8ddd8);
  border-radius: 14px;
  padding: 13px 14px;
  background: var(--surface, #fff);
  color: inherit;
  font: inherit;
}

.account-form input:focus {
  outline: 3px solid rgba(84, 118, 96, .18);
  border-color: #547660;
}

.account-password-rule,
.account-notice,
.account-card > p,
.account-profile p {
  color: var(--muted, #68716b);
  line-height: 1.6;
}

.account-notice {
  margin-top: 18px;
  font-size: .88rem;
}

.account-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
}

.account-text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #35674f;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.account-text-button:disabled {
  opacity: .55;
  cursor: wait;
}

.account-recovery-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line, #d8ddd8);
}

#linkActionPanel {
  max-width: 620px;
}

.account-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.account-profile h2 {
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr);
  gap: 22px;
  align-items: start;
}

.account-side-stack {
  display: grid;
  gap: 22px;
}

.account-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.account-section-heading h2,
.account-card h2 {
  margin: 6px 0 10px;
}

.account-small-button {
  white-space: nowrap;
  padding: 10px 14px;
}

.account-security-entry,
.account-security-center {
  border: 1px solid var(--line, #d8ddd8);
}

.account-security-entry {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--soft, #f6f8f5);
}

.account-security-entry p {
  margin: 6px 0 0;
}

.account-security-center {
  scroll-margin-top: 24px;
}

.account-security-center.is-targeted,
.account-card.is-security-target {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.account-security-summary {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.account-security-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft, #f6f8f5);
}

.account-security-summary span {
  color: var(--muted, #68716b);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

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

.account-security-actions .button {
  justify-content: center;
  width: 100%;
}

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

.account-order {
  border: 1px solid var(--line, #d8ddd8);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 18px;
  background: var(--soft, #f6f8f5);
}

.account-order h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.account-order p {
  margin: 3px 0;
  color: var(--muted, #68716b);
}

.account-order-actions {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 10px;
}

.account-order-status {
  align-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #d8ddd8);
  font-size: .82rem;
  font-weight: 700;
}

.account-order-support {
  grid-column: 1 / -1;
  margin-top: 4px;
  border-top: 1px solid var(--line, #d8ddd8);
  padding-top: 12px;
}

.account-order-support summary {
  color: var(--forest, #2f5b46);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.account-order-support-body {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.account-order-support .after-sales-heading {
  align-items: start;
  margin: 0;
}

.account-order-support .after-sales-heading h4 {
  margin: 0 0 6px;
  font-family: var(--serif, "Iowan Old Style", "Songti SC", STSong, SimSun, Georgia, serif);
  font-size: 1.25rem;
}

.account-order-support .support-request-form {
  margin-top: 0;
}

.account-order-support .support-request-list {
  max-height: 520px;
  overflow: auto;
}

.account-empty {
  border: 1px dashed var(--line, #d8ddd8);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  color: var(--muted, #68716b);
}

.account-success {
  min-height: 1.3em;
  color: #2f7450;
  font-weight: 700;
}

.account-session-list,
.account-security-event-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.account-session,
.account-security-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--line, #d8ddd8);
  border-radius: 16px;
  background: var(--soft, #f6f8f5);
}

.account-session.current,
.account-security-event.new-device {
  border-color: #547660;
}

.account-session h3,
.account-session p,
.account-security-event h3,
.account-security-event p {
  margin: 0;
}

.account-session p,
.account-security-event p {
  margin-top: 4px;
  color: var(--muted, #68716b);
  font-size: .84rem;
}

.account-mfa-details {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line, #d8ddd8);
  border-radius: 14px;
  background: var(--soft, #f6f8f5);
}

.account-mfa-details code,
.account-mfa-details pre {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  padding: 12px;
  border-radius: 10px;
  background: #fffdf8;
  border: 1px solid var(--line, #d8ddd8);
}

#mfaLoginField {
  display: grid;
  gap: 8px;
}

.account-full-button {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 18px;
}

.account-danger-zone {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line, #d8ddd8);
}

.account-danger-button {
  border: 1px solid #a83b35;
  background: #fff4f2;
  color: #8b2823;
}

.account-global-status {
  min-height: 1.5em;
  margin: 18px 0 0;
  color: var(--muted, #68716b);
}

@media (max-width: 860px) {
  .account-header,
  .account-profile,
  .account-section-heading {
    align-items: flex-start;
  }

  .account-header {
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .account-main,
  .account-header {
    width: min(100% - 20px, 1180px);
  }

  .account-main {
    padding-top: 30px;
  }

  .account-profile,
  .account-section-heading {
    flex-direction: column;
  }

  .account-order,
  .account-session,
  .account-security-event {
    grid-template-columns: 1fr;
  }

  .account-order-actions {
    justify-items: start;
  }

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

  .account-order-status {
    justify-self: start;
  }
}
