.account-button.is-logged-in {
  background: var(--black);
  color: var(--white);
  font-weight: 900;
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17, 17, 17, 0.44);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.auth-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  width: min(100% - 32px, 760px);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: var(--cream);
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(17, 17, 17, 0.28);
  transform: translate(-50%, -46%) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.auth-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.auth-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 28px 18px;
}

.auth-modal-header h2 {
  color: var(--black);
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.auth-modal-header p {
  max-width: 540px;
  margin-top: 8px;
  color: var(--muted);
}

.auth-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  font-size: 1.4rem;
  line-height: 1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 28px 22px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tab.active {
  background: var(--black);
  color: var(--white);
}

.auth-panel {
  display: none;
  padding: 0 28px 28px;
}

.auth-panel.active {
  display: block;
}

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

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.auth-field label {
  color: var(--black);
  font-size: 0.82rem;
  font-weight: 900;
}

.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  outline: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.auth-field input,
.auth-field select {
  min-height: 48px;
  padding: 0 14px;
}

.auth-field textarea {
  min-height: 86px;
  padding: 12px 14px;
  resize: vertical;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  background: var(--white);
  border-color: rgba(199, 169, 107, 0.72);
  box-shadow: 0 0 0 4px rgba(199, 169, 107, 0.14);
}

.auth-helper {
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-submit {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-weight: 950;
}

.auth-status {
  min-height: 24px;
  color: #6d5521;
  font-size: 0.92rem;
  font-weight: 800;
}

.auth-session {
  display: none;
  gap: 16px;
  padding: 0 28px 28px;
}

.auth-session.active {
  display: grid;
}

.auth-session-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.auth-session-card strong {
  display: block;
  color: var(--black);
  font-size: 1.05rem;
}

.auth-session-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-secondary {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-weight: 900;
}

@media (max-width: 700px) {
  .auth-modal {
    width: min(100% - 20px, 520px);
    border-radius: 18px;
  }

  .auth-modal-header {
    padding: 22px 20px 16px;
  }

  .auth-tabs {
    margin-inline: 20px;
  }

  .auth-panel,
  .auth-session {
    padding-inline: 20px;
    padding-bottom: 22px;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }
}
