.account-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: 10px;
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #d8e1ed;
  border-radius: 10px;
  color: #30435e;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 1px 2px #17325d0a;
}

.account-link:hover {
  border-color: #afc7f3;
  color: #174fb8;
  background: #f5f8ff;
}

.account-link::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #a9b5c4;
}

.account-link.is-authenticated::before {
  background: #20b58a;
  box-shadow: 0 0 0 3px #20b58a1c;
}

.account-link--admin::before {
  background: #2563eb;
  box-shadow: 0 0 0 3px #2563eb1c;
}

.auth-page {
  min-height: 100vh;
}

.auth-main {
  display: grid;
  min-height: calc(100vh - 66px);
  place-items: center;
  padding: 44px 20px 72px;
}

.auth-card {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid #dce3ec;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 54px #17325d16;
}

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

.auth-kicker {
  margin: 0 0 10px;
  color: #2563eb;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.auth-card h1 {
  margin: 0;
  color: #10213a;
  font-size: 30px;
  letter-spacing: -0.045em;
}

.auth-description {
  margin: 12px 0 26px;
  color: #65748a;
  font-size: 14px;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  color: #42536b;
  font-size: 12px;
  font-weight: 800;
}

.auth-field small {
  color: #7a889a;
  font-size: 11px;
  line-height: 1.5;
}

.auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cfdae7;
  border-radius: 11px;
  color: #10213a;
  background: #f9fbfd;
}

.auth-field input:focus {
  border-color: #6d9bea;
  background: #fff;
  outline: 3px solid #2563eb1b;
}

.auth-submit,
.auth-secondary-button {
  min-height: 48px;
  border-radius: 11px;
  font-weight: 850;
  cursor: pointer;
}

.auth-submit {
  border: 1px solid #2563eb;
  color: #fff;
  background: #2563eb;
}

.auth-submit:hover {
  background: #174fb8;
}

.auth-submit:disabled,
.auth-secondary-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.auth-secondary-button {
  width: 100%;
  border: 1px solid #cfdae7;
  color: #30435e;
  background: #fff;
}

.auth-notice {
  min-height: 21px;
  margin: 15px 0 0;
  color: #65748a;
  font-size: 12px;
  line-height: 1.6;
}

.auth-notice.is-error {
  color: #c93647;
}

.auth-notice.is-success {
  color: #087f60;
}

.auth-switch {
  margin: 18px 0 0;
  color: #738197;
  font-size: 12px;
  text-align: center;
}

.auth-switch a {
  color: #2563eb;
  font-weight: 850;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.account-summary {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid #dce6f2;
  border-radius: 13px;
  background: #f6f9fd;
}

.account-summary div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 12px;
}

.account-summary dt {
  color: #77869a;
  font-size: 11px;
  font-weight: 800;
}

.account-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #1b2e49;
  font-size: 13px;
  font-weight: 750;
}

.account-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #174fb8;
  background: #eaf1ff;
  font-size: 11px;
  font-weight: 850;
}

.account-actions {
  display: flex;
  gap: 10px;
}

.account-actions > * {
  flex: 1 1 0;
}

.account-action-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #2563eb;
  border-radius: 11px;
  color: #fff;
  background: #2563eb;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.account-action-link:hover {
  background: #174fb8;
}

.account-action-link[hidden] {
  display: none;
}

.account-settings {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid #dce3ec;
}

.account-settings h2 {
  margin: 0;
  color: #10213a;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.account-settings > p {
  margin: 8px 0 18px;
  color: #65748a;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .topbar-context .source-label {
    display: none;
  }

  .account-nav {
    margin-left: auto;
  }

  .account-link {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .account-link--admin {
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-link.is-authenticated {
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auth-main {
    display: block;
    min-height: 0;
    padding: 18px 14px 40px;
  }

  .auth-card,
  .auth-card--wide {
    width: 100%;
    padding: 24px 20px;
    border-radius: 15px;
    box-shadow: 0 8px 28px #17325d12;
  }

  .auth-card h1 {
    font-size: 26px;
  }

  .account-actions {
    flex-direction: column;
  }
}
