:root {
  color-scheme: light;
  --account-ink: #123247;
  --account-muted: #607b89;
  --account-line: #d4e4e9;
  --account-cyan: #08a7c4;
  --account-teal: #008a82;
  --account-red: #e84b62;
  --account-green: #178b63;
  --account-bg: #f2f8fa;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  background: var(--account-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(20, 125, 145, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 125, 145, 0.035) 1px, transparent 1px),
    #f2f8fa;
  background-size: 28px 28px;
  color: var(--account-ink);
  font-family: "Be Vietnam Pro", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.account-page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 80px;
}

.account-heading {
  display: flex;
  min-height: 154px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 30px 34px;
  border: 1px solid #cae1e7;
  border-left: 5px solid var(--account-cyan);
  background: #fff;
  box-shadow: 0 16px 38px rgba(18, 50, 71, 0.07);
}

.account-eyebrow {
  margin: 0 0 8px;
  color: #0789a2;
  font-size: 11px;
  font-weight: 800;
}

.account-heading h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.account-heading p:last-child {
  margin: 12px 0 0;
  color: var(--account-muted);
  font-size: 14px;
  line-height: 1.7;
}

.account-heading__mark {
  display: grid;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  place-items: center;
  border: 1px solid #93d8e4;
  background: #e8f9fb;
  color: #087f96;
  font-size: 28px;
  font-weight: 800;
  box-shadow: inset 0 0 0 7px #fff;
}

.account-layout,
.account-dashboard {
  display: grid;
  margin-top: 22px;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  gap: 22px;
}

.account-dashboard {
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
}

.account-card {
  border: 1px solid var(--account-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 50, 71, 0.06);
}

.auth-card,
.security-card,
.profile-card,
.account-aside {
  padding: 30px;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 28px;
  padding: 4px;
  border: 1px solid #d7e5e9;
  border-radius: 7px;
  background: #f3f8fa;
}

.auth-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #647d89;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-switch button.is-active {
  background: #fff;
  color: #087f96;
  box-shadow: 0 3px 12px rgba(18, 50, 71, 0.09);
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 24px;
}

.section-title h2,
.account-aside h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
}

.section-title p {
  margin: 5px 0 0;
  color: var(--account-muted);
  font-size: 12px;
  line-height: 1.6;
}

.section-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #bce1e8;
  border-radius: 50%;
  color: #07849b;
  font-size: 9px;
  font-weight: 800;
}

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

.account-form label,
.label-row label {
  color: #355666;
  font-size: 11px;
  font-weight: 700;
}

.account-form label span {
  color: #8296a0;
  font-weight: 500;
}

.account-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cddde2;
  border-radius: 6px;
  outline: none;
  background: #fbfdfe;
  color: var(--account-ink);
  font-size: 13px;
}

.account-form input:focus {
  border-color: #42b7ca;
  box-shadow: 0 0 0 3px rgba(8, 167, 196, 0.12);
}

.account-form input[readonly] {
  background: #edf4f6;
  color: #617b87;
  cursor: not-allowed;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
}

.text-button,
.back-button {
  width: max-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #087f96;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.back-button {
  margin-bottom: 20px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #69838f;
  cursor: pointer;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

button.primary-action {
  width: 100%;
  margin-top: 8px;
}

.primary-action {
  background: #059db7;
  color: #fff;
  box-shadow: 0 8px 18px rgba(5, 157, 183, 0.2);
}

.primary-action:hover,
.primary-action:focus-visible {
  background: #07869d;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.secondary-action {
  border-color: #bfd8df;
  background: #fff;
  color: #245266;
}

.form-status {
  min-height: 0;
  margin: 4px 0 0;
  padding: 0;
  color: var(--account-muted);
  font-size: 11px;
  line-height: 1.55;
}

.form-status:not(:empty) {
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid #cfe3e8;
  border-radius: 6px;
  background: #f1fafb;
}

.form-status.is-error:not(:empty) {
  border-color: #f3c1c8;
  background: #fff2f4;
  color: #af3042;
}

.form-status.is-success:not(:empty) {
  border-color: #bfe0d1;
  background: #effaf5;
  color: #15704f;
}

.ecosystem-list {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.ecosystem-list a {
  display: grid;
  min-height: 72px;
  padding: 13px;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  column-gap: 11px;
  border: 1px solid #d8e6ea;
  border-radius: 6px;
  color: var(--account-ink);
  text-decoration: none;
}

.ecosystem-list a:hover {
  border-color: #9bd7e2;
  background: #f2fbfc;
}

.ecosystem-list span {
  display: grid;
  width: 32px;
  height: 32px;
  grid-row: 1 / 3;
  place-items: center;
  border: 1px solid #c4dfe5;
  border-radius: 50%;
  color: #07849b;
  font-size: 9px;
  font-weight: 800;
}

.ecosystem-list strong {
  align-self: end;
  font-size: 12px;
}

.ecosystem-list small {
  align-self: start;
  margin-top: 3px;
  color: #78909b;
  font-size: 9px;
}

.security-note {
  margin-top: 20px;
  padding: 16px;
  border-left: 3px solid var(--account-red);
  background: #fff5f6;
}

.security-note strong {
  font-size: 11px;
}

.security-note p {
  margin: 6px 0 0;
  color: #79656a;
  font-size: 10px;
  line-height: 1.6;
}

.profile-card {
  align-self: start;
}

.profile-topline {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  background: #e5f8fb;
  color: #07849b;
  font-size: 17px;
  font-weight: 800;
}

.profile-topline h2 {
  margin: 0;
  font-size: 18px;
}

.profile-topline p:last-child {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--account-muted);
  font-size: 11px;
  text-overflow: ellipsis;
}

.state-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf8f2;
  color: var(--account-green);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.state-pill.is-expired {
  background: #fff0f2;
  color: #bd3348;
}

.account-metrics {
  display: grid;
  margin-top: 28px;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #e1ebee;
  border-bottom: 1px solid #e1ebee;
}

.account-metrics > div {
  min-width: 0;
  padding: 20px 14px;
  border-right: 1px solid #e1ebee;
}

.account-metrics > div:first-child {
  padding-left: 0;
}

.account-metrics > div:last-child {
  border-right: 0;
}

.account-metrics span,
.account-metrics small {
  display: block;
  color: #78909b;
  font-size: 9px;
}

.account-metrics strong {
  display: block;
  overflow: hidden;
  margin: 7px 0 5px;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
}

.icon-action {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid #bfd8df;
  border-radius: 6px;
  background: #fff;
  color: #1e6175;
  font-size: 19px;
  cursor: pointer;
}

.forgot-inline {
  margin: 4px auto 0;
}

.account-session-bar {
  display: flex;
  min-height: 64px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  background: #fff;
  color: var(--account-muted);
  font-size: 10px;
}

.account-session-bar button {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #efbdc4;
  border-radius: 6px;
  background: #fff5f6;
  color: #b93448;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.contact-dock {
  position: fixed;
  bottom: 22px;
  left: 14px;
  z-index: 70;
  display: grid;
  gap: 8px;
}

.contact-dock a {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 8px;
  background: #087ee5;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(18, 50, 71, 0.2);
}

.contact-dock a:first-child {
  font-size: 23px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .account-page {
    width: min(100% - 28px, 620px);
    padding: 22px 0 92px;
  }

  .account-heading {
    min-height: 0;
    padding: 24px 20px;
  }

  .account-heading__mark {
    display: none;
  }

  .account-heading h1 {
    font-size: 30px;
  }

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

  .auth-card,
  .security-card,
  .profile-card,
  .account-aside {
    padding: 22px 18px;
  }

  .profile-topline {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .profile-avatar {
    width: 48px;
    height: 48px;
  }

  .state-pill {
    width: max-content;
    grid-column: 2;
  }

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

  .account-metrics > div,
  .account-metrics > div:first-child {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid #e1ebee;
  }

  .account-metrics > div:last-child {
    border-bottom: 0;
  }

  .profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 46px;
  }

  .contact-dock {
    bottom: 12px;
    left: 10px;
    grid-template-columns: 1fr 1fr;
  }

  .contact-dock a {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .profile-actions {
    grid-template-columns: 1fr 46px;
  }

  .profile-actions .primary-action,
  .profile-actions .secondary-action {
    grid-column: 1 / -1;
  }

  .profile-actions .icon-action {
    grid-column: 2;
  }
}
