/* Account components keep the light D palette, independent of student themes. */
.account-entry,
.profile-picker {
  --entry-ink: #172a31;
  --entry-muted: #53676b;
  --entry-primary: #17635f;
  --entry-strong: #114b49;
  --entry-panel: #fffefa;
  --entry-soft: #e4f1ee;
  --entry-line: #d8e1dc;
  width: 100%;
  min-width: 0;
  margin: clamp(8px, 3vw, 40px) auto;
  color: var(--entry-ink);
  color-scheme: light;
}

.account-entry {
  max-width: 460px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--entry-line);
  border-radius: 28px;
  background: var(--entry-panel);
  box-shadow: 0 12px 40px #114b4909;
}

.account-entry__header,
.profile-picker__header {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.account-entry__header {
  justify-items: center;
  text-align: center;
}

.account-entry__mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border-radius: 18px;
  color: var(--entry-primary);
  background: var(--entry-soft);
}

.account-entry__header h1,
.profile-picker__header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

.account-entry__header p,
.profile-picker__header p,
.profile-picker__empty p {
  color: var(--entry-muted);
}

.account-entry__form {
  display: grid;
  gap: 20px;
}

.account-entry__field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.account-entry__field label {
  font-size: .9375rem;
  font-weight: 700;
}

/* More specific than application.css's generic input rule. */
.account-entry .account-entry__field input.account-entry__input[type] {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid #7c9290;
  border-radius: 12px;
  background: #fff;
  color: var(--entry-ink);
  font-size: 1rem;
  line-height: 1.5;
}

.account-entry__submit,
.profile-picker__action,
.profile-picker__logout,
.account-entry__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}

.account-entry__submit {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  background: var(--entry-primary);
  color: #fff;
  font-weight: 700;
}

.account-entry__help {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--entry-line);
}

.account-entry__link,
.profile-picker__logout {
  min-height: 44px;
  padding: 10px 8px;
  background: transparent;
  color: var(--entry-muted);
  font-size: .875rem;
  text-decoration: underline;
  text-decoration-color: #7c9290;
  text-underline-offset: 4px;
}

.account-entry__link .luxi-icon,
.profile-picker__action .luxi-icon,
.profile-picker__logout .luxi-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.profile-picker {
  max-width: 580px;
}

.profile-picker__header {
  text-align: center;
}

.profile-picker__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-picker__form,
.profile-picker__logout-form {
  margin: 0;
}

.profile-picker__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 100px;
  padding: 18px 20px;
  border: 1px solid var(--entry-line);
  border-radius: 20px;
  background: var(--entry-panel);
  color: var(--entry-ink);
  font: inherit;
  text-align: left;
  touch-action: manipulation;
}

.profile-picker__avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--entry-soft);
}

.profile-picker__avatar .luxi-mascot {
  width: 60px;
  height: 60px;
  flex-basis: 60px;
}

.profile-picker__details {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-picker__name {
  font-size: 1.1875rem;
  line-height: 1.35;
}

.profile-picker__level {
  color: var(--entry-muted);
  font-size: .9375rem;
  line-height: 1.5;
}

.profile-picker__arrow {
  display: grid;
  place-items: center;
  color: var(--entry-primary);
}

.profile-picker__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--entry-line);
}

.profile-picker__action {
  color: var(--entry-primary);
  font-weight: 700;
}

.profile-picker__logout-form {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.profile-picker__empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 32px 20px;
  border: 1px dashed #7c9290;
  border-radius: 20px;
  background: var(--entry-panel);
  text-align: center;
  overflow-wrap: anywhere;
}

.account-entry :is(a, button, input):focus-visible,
.profile-picker :is(a, button):focus-visible {
  outline: 3px solid var(--entry-primary);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px var(--entry-panel);
}

@media (hover: hover) {
  .account-entry__submit:hover:not(:disabled) {
    background: var(--entry-strong);
  }

  .profile-picker__row:hover:not(:disabled) {
    border-color: var(--entry-primary);
    background: #f3f8f5;
  }

  .account-entry__link:hover,
  .profile-picker__action:hover,
  .profile-picker__logout:hover:not(:disabled) {
    color: var(--entry-strong);
    background: var(--entry-soft);
  }
}

@media (max-width: 430px) {
  .account-entry {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .profile-picker__row {
    grid-template-columns: 56px minmax(0, 1fr) 24px;
    gap: 12px;
    min-height: 92px;
    padding: 16px 14px;
  }

  .profile-picker__avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .profile-picker__avatar .luxi-mascot {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }
}

@media (forced-colors: active) {
  .account-entry__submit,
  .profile-picker__row,
  .profile-picker__action {
    border-color: ButtonText;
  }

  .account-entry :is(a, button, input):focus-visible,
  .profile-picker :is(a, button):focus-visible {
    outline-color: Highlight;
  }
}
