.account-page {
  background: radial-gradient(ellipse at 80% 0, #162332 0, #0b111b 55%);
  min-height: 100vh;
}

.account-page .zone-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 1320px;
  padding: clamp(14px, 3vw, 38px) clamp(12px, 4vw, 52px) 44px;
}

.account-page .zone-account-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 13px;
  margin-bottom: clamp(14px, 2.5vw, 30px);
}

.account-page .zone-brand {
  font-size: clamp(15px, 2.2vw, 22px);
}

.account-page .zone-btn {
  box-sizing: border-box;
  min-height: 48px;
  text-align: center;
  padding: 9px 14px;
  line-height: 1.45;
}

.account-page .zone-message:empty {
  display: none;
}

.account-page .zone-message:not(:empty) {
  position: sticky;
  top: 8px;
  z-index: 5;
  padding: 10px 14px;
  border: 1px solid var(--zone-line);
  border-radius: 12px;
  background: #101b26;
}

.account-auth {
  display: grid;
  grid-template-columns: minmax(345px, 1fr) minmax(0, 1.16fr);
  align-items: start;
  gap: clamp(12px, 2vw, 24px);
}

.account-page .zone-card {
  padding: clamp(15px, 2.8vw, 30px);
}

.account-page h1 {
  margin: 0 0 12px;
  font-size: clamp(25px, 3.8vw, 39px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.account-page h2 {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 26px);
}

.account-auth .zone-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid #304052;
  border-radius: 15px;
  background: #0b131e;
}

.account-auth .zone-tabs .zone-btn {
  border-color: transparent;
}

.account-auth .zone-tabs button[aria-pressed="true"] {
  background: #ddf7d2;
  color: #142318;
}

.account-auth-form .zone-fields {
  gap: 12px;
}

.account-page .zone-fields input {
  min-height: 52px;
  font-size: 17px;
}

.account-page .zone-fields .btn-toggle-pwd {
  min-width: 44px;
  min-height: 44px;
}

.account-page .zone-fields .zone-muted,
.account-youtube p {
  margin: 0;
}

.account-auth-cover {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
  min-height: 310px;
  padding: clamp(18px, 4vw, 44px);
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid #324154;
  background: linear-gradient(0deg, #101923 0%, #101923a6 32%, #10192300 68%),
    url("tesla-zone-home.jpg") 28% center / cover #101923;
}

.account-auth-cover p {
  max-width: 440px;
  margin: 12px 0 0;
  font-size: clamp(20px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1.35;
}

.account-profile,
.account-profile-grid {
  display: grid;
  gap: clamp(12px, 2vw, 22px);
}

.account-profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.account-profile-grid:not(.account-settings) {
  align-items: stretch;
}

.account-identity,
.account-membership {
  display: flex;
  flex-direction: column;
}

.account-identity-heading,
.account-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-card-heading {
  flex-wrap: wrap;
  justify-content: space-between;
}

.account-identity-heading img {
  flex: none;
  border-radius: 13px;
  object-fit: cover;
  background: #0d1520;
}

.account-identity-heading > div {
  min-width: 0;
}

.account-identity-heading h1 {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.account-identity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  color: var(--zone-muted);
  overflow-wrap: anywhere;
}

.account-profile-editor {
  margin-bottom: 16px;
}

.account-profile-editor summary {
  min-height: 44px;
  width: fit-content;
  padding: 10px 0;
  font-weight: 800;
  color: var(--zone-accent);
  cursor: pointer;
}

.account-profile-editor[open] form {
  padding-block: 10px 4px;
}

.account-page .zone-fields input[type="file"] {
  min-width: 0;
  font-size: 14px;
}

.account-page input[type="file"]::file-selector-button {
  margin-inline-end: 10px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: #253144;
  color: var(--zone-text);
  font: inherit;
  cursor: pointer;
}

.account-facts {
  display: grid;
  gap: 5px;
  margin: 14px 0 18px;
}

.account-facts > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--zone-line);
}

.account-facts dt {
  color: var(--zone-muted);
}

.account-facts dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.account-membership .is-expired,
.account-membership .account-expired {
  color: #ffb7ac;
}

.account-membership .is-expired {
  background: #342226;
  border-color: #654146;
}

.account-expired {
  margin: 0 0 14px;
}

.account-youtube {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.account-youtube .account-actions {
  margin-top: 0;
}

.account-settings summary {
  display: list-item;
  cursor: pointer;
  min-height: 44px;
  box-sizing: border-box;
  padding: 8px 0;
  font-size: 18px;
  font-weight: 800;
  border-radius: 6px;
}

.account-settings summary:focus-visible {
  outline: 3px solid var(--zone-blue);
}

.account-settings details[open] > :not(summary) {
  margin-top: 12px;
}

@media (max-width: 710px) {
  .account-auth,
  .account-profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-auth-cover {
    min-height: 0;
    background: #14212f;
  }

  .account-page .zone-card {
    border-radius: 17px;
  }
}

@media (max-width: 430px) {
  .account-identity .account-actions > :not(.zone-hidden) {
    flex: 1 1 auto;
  }

  .account-page .zone-brand-mark {
    width: 33px;
    height: 33px;
  }
}
