.auth-document .modern-legacy-content {
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: #f3f6f8;
}

.auth-page {
  display: grid;
  min-height: clamp(560px, calc(100svh - 180px), 900px);
  place-items: center;
  padding: 52px 24px;
  background: #f3f6f8;
}

.auth-card {
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid #d9e1e7;
  border-top: 4px solid #0068b5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(24, 43, 58, 0.09);
}

.auth-card-compact { width: min(100%, 500px); }

.auth-card-heading {
  padding: 30px 38px 23px;
  border-bottom: 1px solid #e3e9ed;
}

.auth-eyebrow {
  color: #0068b5;
  font-size: 12px;
  font-weight: 700;
}

.auth-card-heading h1 {
  margin: 9px 0 3px;
  color: #142330;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
}

.auth-card-heading p {
  margin: 0;
  color: #60717e;
  font-size: 14px;
}

.auth-error {
  margin: 18px 38px 0;
  padding: 10px 12px;
  border-left: 3px solid #a4262c;
  background: #fbeeed;
  color: #8f2025;
  font-size: 14px;
}

.auth-form { padding: 27px 38px 24px; }

.auth-fields { display: grid; gap: 18px; }

.auth-field {
  display: grid;
  gap: 7px;
  color: #273b49;
  font-size: 14px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #c7d2da;
  border-radius: 3px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 400;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.auth-field input:hover { border-color: #8fa5b5; }

.auth-field input:focus {
  border-color: #0068b5;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 104, 181, 0.14);
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 25px;
}

.auth-submit,
.auth-reset {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 21px;
  border: 1px solid #0068b5;
  border-radius: 3px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.auth-submit { color: #fff; background: #0068b5; }
.auth-submit:hover { border-color: #004f8b; background: #004f8b; }
.auth-reset { color: #284252; background: #fff; border-color: #c7d2da; }
.auth-reset:hover { border-color: #8197a6; background: #f5f8fa; }

.auth-card-compact .auth-actions { justify-content: space-between; }
.auth-card-compact .auth-submit { min-width: 150px; }

.auth-secondary-link,
.auth-switch a {
  color: #0068b5;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.auth-secondary-link:hover,
.auth-switch a:hover { color: #003b66; text-decoration: underline; }

.account-edit-page {
  min-height: clamp(620px, calc(100svh - 190px), 960px);
  padding-block: 52px;
}

.account-edit-card { width: min(100%, 600px); }

.account-edit-card .auth-fields { gap: 15px; }

.auth-notice {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid #ecc7be;
  border-left: 3px solid #c6533c;
  background: #fff7f4;
  color: #873927;
  font-size: 14px;
  line-height: 1.5;
}

.auth-notice.is-success {
  border-color: #b9d9c6;
  border-left-color: #27814b;
  background: #f2faf5;
  color: #205d38;
}

.account-edit-actions {
  flex-wrap: wrap;
}

.account-edit-actions .auth-submit { min-width: 140px; }
.account-edit-actions .auth-secondary-link { margin-left: auto; }

.account-page {
  min-height: clamp(620px, calc(100svh - 180px), 960px);
  padding: 58px 24px 78px;
  background: #f3f6f8;
}

.account-container { width: min(100%, 820px); margin: 0 auto; }

.account-heading {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #d9e1e7;
}

.account-heading h1 {
  margin: 8px 0 4px;
  color: #142330;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 400;
  line-height: 1.2;
}

.account-heading p { margin: 0; color: #60717e; font-size: 15px; }

.account-card {
  padding: 30px 34px 28px;
  border-top: 4px solid #0068b5;
  background: #fff;
  box-shadow: 0 16px 42px rgba(24, 43, 58, 0.09);
}

.account-card-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e3e9ed;
}

.account-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #0068b5;
  border-radius: 50%;
  color: #0068b5;
  font-size: 18px;
  font-weight: 700;
}

.account-label { margin: 0 0 2px; color: #0068b5; font-size: 12px; font-weight: 700; }
.account-card-top h2 { margin: 0; color: #142330; font-size: 24px; line-height: 1.3; }
.account-email { margin: 3px 0 0; color: #60717e; font-size: 14px; }

.account-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
  padding: 6px 0 0;
}

.account-details > div {
  display: grid;
  grid-template-columns: minmax(110px, .45fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f3;
}

.account-details dt { color: #60717e; font-size: 13px; }
.account-details dd { margin: 0; color: #273b49; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }

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

.account-action { text-decoration: none; }
.account-action:hover { color: #fff; text-decoration: none; }

.account-center-page {
  min-height: calc(100svh - 90px);
  padding: 56px 24px 84px;
  background: #f3f6f8;
}

.account-center-shell { width: min(100%, 1080px); margin: 0 auto; }

.account-center-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #d9e1e7;
}

.account-center-heading h1 {
  margin: 8px 0 5px;
  color: #142330;
  font-size: clamp(32px, 5vw, 50px);
  font-weight: 400;
  line-height: 1.15;
}

.account-center-heading p { margin: 0; color: #60717e; font-size: 15px; }

.account-center-avatar {
  display: grid;
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #0068b5;
  border-radius: 50%;
  background: #fff;
  color: #0068b5;
  font-size: 20px;
  font-weight: 700;
}

.account-center-card {
  border-top: 4px solid #0068b5;
  background: #fff;
  box-shadow: 0 16px 42px rgba(24, 43, 58, 0.09);
}

.account-center-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 34px 20px;
  border-bottom: 1px solid #e3e9ed;
}

.account-center-card-heading h2 { margin: 2px 0 0; color: #142330; font-size: 24px; line-height: 1.3; }
.account-center-card-note { color: #60717e; font-size: 13px; }

.account-profile-form { padding: 27px 34px 30px; }
.account-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.account-profile-grid .auth-field input[readonly] { color: #667784; background: #f3f6f8; }
.account-profile-status { min-height: 24px; margin: 19px 0 0; color: #205d38; font-size: 14px; }
.account-profile-status.is-error { color: #8f2025; }
.account-profile-status.is-success { color: #205d38; }

.account-center-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 5px; }
.account-center-actions .auth-submit { min-width: 120px; }

@media (max-width: 680px) {
  .account-center-page { min-height: calc(100svh - 150px); padding: 34px 16px 54px; }
  .account-center-heading { align-items: flex-start; }
  .account-center-avatar { width: 60px; height: 60px; font-size: 17px; }
  .account-center-card-heading { align-items: flex-start; flex-direction: column; padding: 22px 20px 17px; }
  .account-profile-form { padding: 22px 20px 24px; }
  .account-profile-grid { grid-template-columns: 1fr; gap: 15px; }
  .account-center-actions { align-items: flex-start; flex-direction: column; gap: 13px; }
}

@media (max-width: 640px) {
  .account-page { min-height: calc(100svh - 150px); padding: 34px 16px 54px; }
  .account-card { padding: 24px 20px; }
  .account-card-top { align-items: flex-start; }
  .account-details { grid-template-columns: 1fr; }
  .account-card-actions { align-items: flex-start; flex-direction: column; gap: 14px; }
}

.auth-switch {
  margin: 23px 0 0;
  padding-top: 18px;
  border-top: 1px solid #e3e9ed;
  color: #60717e;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 600px) {
  .auth-page { min-height: calc(100svh - 150px); padding: 30px 16px; }
  .account-edit-page { min-height: calc(100svh - 150px); padding: 30px 16px; }
  .auth-card-heading { padding: 25px 23px 19px; }
  .auth-card-heading h1 { font-size: 25px; }
  .auth-form { padding: 23px; }
  .auth-actions { gap: 12px; }
  .auth-card-compact .auth-submit { min-width: 128px; }
  .account-edit-actions .auth-secondary-link { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-field input,
  .auth-submit,
  .auth-reset { transition: none; }
}
