:root {
  --account-text: #1d1d1f;
  --account-sub: #5f6673;
  --account-muted: #818895;
  --account-border: rgba(24, 29, 38, 0.1);
  --account-surface: rgba(255, 255, 255, 0.94);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #f5f5f7;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--account-text);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.92), rgba(245, 245, 247, 0.96) 42%),
    #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

:where(a, button, input):focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.22);
  outline-offset: 3px;
}

.account-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.account-nav {
  width: min(100% - 2rem, 720px);
  min-height: 62px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.account-back,
.account-brand,
.account-home-link {
  text-decoration: none;
}

.account-back {
  color: #343b46;
  font-size: 0.9rem;
  font-weight: 500;
}

.account-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 600;
}

.account-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.account-main {
  width: min(100% - 2rem, 520px);
  min-height: calc(100vh - 64px);
  margin-inline: auto;
  display: grid;
  align-items: center;
  padding: 34px 0 54px;
}

.account-card {
  border: 1px solid var(--account-border);
  border-radius: 28px;
  background: var(--account-surface);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.09);
  padding: clamp(24px, 5vw, 34px);
}

.account-title {
  margin-bottom: 28px;
}

.account-title p {
  margin: 0;
  color: var(--account-text);
  font-size: clamp(1.9rem, 8vw, 3.1rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.account-title h1 {
  margin: 5px 0 0;
  color: var(--account-muted);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0;
}

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

.account-avatar {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1d1d1f;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.account-avatar--quiet {
  background: #e9ecf2;
  color: #4c5563;
}

.account-status-line {
  margin: -4px 0 0;
  color: var(--account-text);
  font-size: 1.14rem;
  font-weight: 650;
}

.account-status-line span {
  display: block;
  margin-top: 2px;
  color: var(--account-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.account-email-block {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-email-block span,
.account-profile-form label,
.account-profile-help {
  color: var(--account-muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.account-email-block strong {
  color: #20242c;
  font-size: 1rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.account-profile-form {
  display: grid;
  gap: 9px;
}

.account-profile-form label span,
.account-profile-help span {
  color: #9aa1ad;
  font-weight: 500;
}

.account-profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.account-profile-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(24, 29, 38, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  color: #1d1d1f;
  font: inherit;
  font-size: 0.96rem;
  padding: 10px 13px;
  outline: none;
}

.account-profile-row input:focus {
  border-color: rgba(0, 102, 204, 0.28);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.account-primary,
.account-secondary {
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 17px;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.account-primary {
  appearance: none;
  border: 1px solid rgba(24, 29, 38, 0.12);
  background: #1d1d1f;
  color: #ffffff;
}

.account-primary:disabled {
  cursor: progress;
  opacity: 0.72;
}

.account-secondary {
  appearance: none;
  border: 1px solid var(--account-border);
  background: rgba(255, 255, 255, 0.88);
  color: #343b46;
}

.account-profile-reset[hidden] {
  display: none;
}

.account-profile-help {
  min-height: 1.2em;
  margin: 0;
}

.account-profile-status {
  min-height: 1.3em;
  margin: 0;
  color: var(--account-muted);
  font-size: 0.86rem;
}

.account-profile-status[data-tone="error"] {
  color: #a33a3a;
}

.account-profile-status[data-tone="success"] {
  color: #256f49;
}

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

.account-actions--bottom {
  padding-top: 2px;
}

@media (max-width: 560px) {
  .account-nav,
  .account-main {
    width: min(100% - 1.25rem, 520px);
  }

  .account-main {
    align-items: start;
    min-height: calc(100vh - 62px);
    padding: 24px 0 36px;
  }

  .account-card {
    border-radius: 24px;
    padding: 22px;
  }

  .account-title {
    margin-bottom: 22px;
  }

  .account-state {
    gap: 18px;
  }

  .account-brand span {
    display: none;
  }

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

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

  .account-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-primary,
  .account-secondary {
    width: 100%;
  }
}
