.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-button {
  color: var(--ink);
  background: transparent;
  border: 1px solid #cfdcc8;
  border-radius: 6px;
  padding: 11px 17px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}

.login-button:hover {
  color: var(--green-2);
  background: #f4f8eb;
  border-color: var(--green);
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 35, 24, .72);
  backdrop-filter: blur(6px);
}

.auth-dialog {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 30px 90px rgba(15, 30, 18, .34);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f1f5ec;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green-2);
  margin-bottom: 24px;
  font: 600 17px Georgia, serif;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 25px;
  background: #eef4e5;
  border-radius: 9px;
}

.auth-tab {
  border: 0;
  border-radius: 7px;
  padding: 11px 12px;
  color: #64705f;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 12px rgba(39, 60, 32, .1);
}

.auth-dialog h2 {
  margin: 0 0 9px;
  color: var(--ink);
  font: 600 31px/1.15 Georgia, serif;
}

.auth-description {
  margin: 0 0 24px;
  color: #6b786c;
  font-size: 14px;
  line-height: 1.55;
}

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

.auth-field[hidden] {
  display: none;
}

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

.auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid #d5dfd0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}

.auth-field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(121, 173, 23, .12);
}

.auth-password-control {
  position: relative;
}

.auth-password-control input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #748071;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  color: var(--green-2);
  background: #f1f6e8;
}

.password-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.password-eye {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 70% 10% 70% 10%;
  transform: rotate(45deg) scale(.72);
}

.password-eye::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: currentColor;
}

.password-toggle[aria-pressed="true"] .password-eye::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 6px;
  width: 2px;
  height: 25px;
  border-radius: 2px;
  background: currentColor;
}

.auth-submit {
  width: 100%;
  min-height: 49px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.auth-submit:hover {
  background: var(--green-2);
}

.auth-submit:disabled {
  opacity: .65;
  cursor: wait;
}

.auth-forgot {
  display: block;
  margin: 16px auto 0;
  border: 0;
  background: transparent;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.auth-status {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.auth-status.is-visible {
  display: block;
}

.auth-status.is-error {
  color: #982d2d;
  background: #fff0f0;
}

.auth-status.is-success {
  color: #31600f;
  background: #eff8e3;
}

.auth-status.is-info {
  color: #48534a;
  background: #f1f4f1;
}

body.auth-modal-open {
  overflow: hidden;
}

@media (max-width: 650px) {
  .header-actions {
    gap: 7px;
  }

  .login-button {
    padding: 10px 12px;
    font-size: 12px;
  }

  .auth-dialog {
    padding: 30px 22px;
  }
}
