.account-main {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.account-main.narrow {
  width: min(520px, calc(100% - 48px));
}

.account-intro {
  max-width: 720px;
  margin-bottom: 32px;
}

.account-title {
  color: var(--text, #1c1c1e);
  font-size: clamp(2.35rem, 7vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.account-subtitle {
  max-width: 640px;
  margin-top: 18px;
  color: var(--secondary, #5d5d63);
  font-size: 1.05rem;
}

.account-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  color: var(--secondary, #5d5d63);
}

.account-spinner {
  width: 24px;
  height: 24px;
  flex: none;
  border: 3px solid var(--separator, #d1d1d6);
  border-top-color: var(--brand, #125973);
  border-radius: 50%;
  animation: account-spin 0.8s linear infinite;
}

@keyframes account-spin {
  to { transform: rotate(360deg); }
}

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

.account-card {
  border: 1px solid var(--separator, #d1d1d6);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 32px);
  background: var(--surface, #ffffff);
  box-shadow: var(--shadow-small, 0 10px 26px rgba(28, 28, 30, 0.07));
}

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

.account-card h2 {
  margin-bottom: 6px;
  color: var(--text, #1c1c1e);
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.account-card-copy {
  margin-bottom: 20px;
  color: var(--secondary, #5d5d63);
  font-size: 0.94rem;
}

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

.account-field {
  min-width: 0;
}

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

.account-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--text, #1c1c1e);
  font-size: 0.86rem;
  font-weight: 750;
}

.account-field input,
.account-field select,
.account-field textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--separator, #d1d1d6);
  border-radius: 13px;
  padding: 12px 14px;
  background: var(--background, #f2f2f7);
  color: var(--text, #1c1c1e);
  font: inherit;
  font-size: 1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.account-field textarea {
  min-height: 104px;
  resize: vertical;
}

.account-field input:focus,
.account-field select:focus,
.account-field textarea:focus {
  border-color: var(--brand, #125973);
  outline: none;
  box-shadow: 0 0 0 3px rgba(18, 89, 115, 0.15);
}

.account-field input[readonly] {
  color: var(--secondary, #5d5d63);
  cursor: default;
}

.account-field input[type="date"] {
  display: block;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.account-help {
  margin-top: 8px;
  color: var(--secondary, #5d5d63);
  font-size: 0.82rem;
}

.account-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.account-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  background: var(--brand, #125973);
  color: #ffffff;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

.account-button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.account-button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.account-button.secondary {
  border-color: var(--separator, #d1d1d6);
  background: transparent;
  color: var(--brand, #125973);
}

.account-button.secondary:hover {
  background: var(--surface-soft, #e8f1f4);
}

.account-button.danger {
  border-color: #b93632;
  background: transparent;
  color: #9f2f2b;
}

.account-status {
  min-height: 1.4em;
  margin-top: 14px;
  color: var(--secondary, #5d5d63);
  font-size: 0.9rem;
}

.account-status.success {
  color: var(--green, #19784c);
  font-weight: 700;
}

.account-status.error {
  color: #a82f2b;
  font-weight: 650;
}

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

.account-summary-item {
  border-radius: 16px;
  padding: 16px;
  background: var(--background, #f2f2f7);
}

.account-summary-label {
  display: block;
  margin-bottom: 4px;
  color: var(--secondary, #5d5d63);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.account-summary-value {
  overflow-wrap: anywhere;
  color: var(--text, #1c1c1e);
  font-weight: 750;
}

.account-login-card {
  margin-top: 28px;
}

.account-login-card .account-button {
  width: 100%;
}

.account-login-card .account-field + .account-field {
  margin-top: 16px;
}

.account-login-card .account-field + .account-button {
  margin-top: 18px;
}

.account-login-card .account-button.secondary {
  margin-top: 10px;
}

.account-page-footer {
  width: min(1040px, calc(100% - 48px));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border-top: 1px solid var(--separator, #d1d1d6);
  padding: 24px 0 32px;
  color: var(--secondary, #5d5d63);
  font-size: 0.86rem;
}

.account-page-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px clamp(8px, 2vw, 16px);
}

.account-page-footer nav a + a::before {
  content: "|" / "";
  display: inline-block;
  margin-right: clamp(8px, 2vw, 16px);
  color: var(--separator, #d1d1d6);
  font-weight: 400;
}

.account-hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .account-main,
  .account-main.narrow,
  .account-page-footer {
    width: min(100% - 28px, 1040px);
  }

  .account-main {
    padding: 48px 0 68px;
  }

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

  .account-card.full,
  .account-field.full {
    grid-column: auto;
  }

  .account-page-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-spinner {
    animation-duration: 1.6s;
  }

  .account-button,
  .account-field input,
  .account-field select,
  .account-field textarea {
    transition: none;
  }
}
