.da-auth-shell {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(45, 38, 31, 0.1);
  background: rgba(247, 243, 237, 0.78);
  backdrop-filter: blur(18px);
}

.da-auth-shell__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: 0.7rem 0;
}

.da-auth-brand,
.da-auth-link,
.da-auth-secondary-link {
  color: var(--da-ink, #171412);
  text-decoration: none;
}

.da-auth-brand {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.da-auth-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
}

.da-auth-nav form {
  margin: 0;
}

.da-auth-user {
  max-width: 42vw;
  overflow: hidden;
  color: var(--da-muted, #6f675f);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.da-auth-link,
.da-auth-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  border: 1px solid rgba(45, 38, 31, 0.12);
  border-radius: 999px;
  padding: 0 0.9rem;
  background: rgba(255, 255, 255, 0.54);
  color: var(--da-ink, #171412);
  font: inherit;
  cursor: pointer;
}

.da-auth-link--primary,
.da-auth-submit {
  border-color: rgba(154, 107, 63, 0.4);
  background: var(--da-accent, #9a6b3f);
  color: #fff;
}

.da-auth-page {
  display: grid;
  min-height: calc(100vh - 8rem);
  place-items: center;
  padding: clamp(2rem, 6vw, 6rem) 1rem;
}

.da-auth-card {
  width: min(100%, 30rem);
  border: 1px solid rgba(45, 38, 31, 0.12);
  border-radius: var(--da-radius-lg, 2rem);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--da-shadow-md, 0 18px 60px rgba(22, 18, 14, 0.12));
}

.da-auth-kicker {
  margin: 0 0 0.7rem;
  color: var(--da-accent-dark, #6e4728);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.da-auth-card h1 {
  margin: 0;
  color: var(--da-ink, #171412);
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.da-auth-intro {
  margin: 1rem 0 0;
  color: var(--da-muted, #6f675f);
  line-height: 1.6;
}

.da-auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.6rem;
}

.da-auth-field {
  display: grid;
  gap: 0.45rem;
}

.da-auth-field label {
  color: var(--da-ink-soft, #3f3a35);
  font-size: 0.88rem;
  font-weight: 700;
}

.da-auth-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(45, 38, 31, 0.14);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--da-ink, #171412);
  font: inherit;
}

.da-auth-field input:focus,
.da-auth-link:focus-visible,
.da-auth-button:focus-visible,
.da-auth-submit:focus-visible,
.da-auth-secondary-link:focus-visible {
  outline: 3px solid rgba(154, 107, 63, 0.26);
  outline-offset: 3px;
}

.da-auth-hint {
  margin: 0;
  color: var(--da-muted, #6f675f);
  font-size: 0.84rem;
}

.da-auth-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.4rem;
}

.da-auth-submit {
  min-height: 2.8rem;
  border: 0;
  border-radius: 999px;
  padding: 0 1.25rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.da-auth-secondary-link {
  color: var(--da-accent-dark, #6e4728);
  font-weight: 700;
}

.da-auth-errors,
.da-flash {
  border: 1px solid rgba(154, 107, 63, 0.24);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--da-ink-soft, #3f3a35);
}

.da-auth-errors {
  margin-top: 1.25rem;
  padding: 1rem;
}

.da-auth-errors p {
  margin: 0 0 0.5rem;
  font-weight: 800;
}

.da-auth-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.da-flash-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 120;
  display: grid;
  gap: 0.6rem;
  width: min(100% - 2rem, 26rem);
}

.da-flash {
  padding: 0.85rem 1rem;
  box-shadow: var(--da-shadow-sm, 0 8px 24px rgba(22, 18, 14, 0.06));
}

.da-flash--alert {
  border-color: rgba(185, 28, 28, 0.3);
}

@media (min-width: 1101px) {
  body:has(.da-exercise-page) .da-auth-shell {
    box-sizing: border-box;
    width: calc(100% - 22rem);
    margin-left: 22rem;
    z-index: 70;
  }
}

@media (max-width: 40rem) {
  .da-auth-shell__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .da-auth-nav {
    width: 100%;
    justify-content: space-between;
  }

  .da-auth-card {
    border-radius: var(--da-radius-md, 1.5rem);
  }
}
