body {
  background: #f6faf6;
}

.auth-shell,
.profile-shell {
  position: relative;
  display: grid;
  min-height: 680px;
  padding: 42px 0 58px;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 36%, rgba(189, 229, 126, 0.22), transparent 25%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9) 50%, rgba(239, 248, 235, 0.9));
}

.auth-shell::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(120deg, transparent 0 46%, rgba(14, 122, 54, 0.04) 46% 72%, transparent 72%),
    repeating-linear-gradient(135deg, rgba(7, 81, 38, 0.035) 0 1px, transparent 1px 30px);
  pointer-events: none;
}

.auth-shell {
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
}

.auth-visual {
  position: absolute;
  inset: auto 0 0 auto;
  width: min(50vw, 620px);
  height: 560px;
  pointer-events: none;
}

.auth-visual::before {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(100%, 620px);
  height: 410px;
  content: "";
  background:
    radial-gradient(circle at 72% 28%, rgba(132, 205, 82, 0.28), transparent 18%),
    radial-gradient(circle at 48% 58%, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(223, 241, 216, 0.34) 46%, rgba(7, 81, 38, 0.1)),
    repeating-linear-gradient(135deg, rgba(7, 81, 38, 0.08) 0 1px, transparent 1px 24px);
  border-radius: 34px 0 0 34px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 28px 60px rgba(7, 81, 38, 0.08);
  opacity: 0.72;
}

.auth-visual::after {
  position: absolute;
  right: 64px;
  bottom: 112px;
  width: 320px;
  height: 240px;
  content: "";
  background:
    radial-gradient(ellipse at 72% 36%, rgba(101, 183, 66, 0.2) 0 18%, transparent 19%),
    radial-gradient(ellipse at 46% 56%, rgba(181, 219, 102, 0.18) 0 24%, transparent 25%),
    linear-gradient(135deg, transparent 44%, rgba(255, 255, 255, 0.2) 45% 48%, transparent 49%);
  border-radius: 38% 62% 44% 56%;
  filter: blur(0.2px);
  opacity: 0.82;
}

.auth-visual__pack,
.auth-visual__leaf,
.auth-visual__soil {
  display: none;
}

.auth-card,
.profile-card {
  position: relative;
  z-index: 2;
  width: min(100% - 28px, 520px);
  padding: clamp(24px, 5vw, 38px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(223, 232, 225, 0.95);
  border-radius: 14px;
  box-shadow: 0 22px 48px rgba(16, 35, 24, 0.12);
  backdrop-filter: blur(14px);
}

.auth-card__header {
  margin-bottom: 22px;
}

.auth-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 12px;
  color: #075126;
  background: #e9f6ec;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.auth-card h1,
.profile-card h1 {
  margin: 0 0 10px;
  color: #063d1e;
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 900;
  line-height: 1.16;
}

.auth-card p,
.profile-card p {
  margin: 0;
  color: #647267;
  font-size: 16px;
  line-height: 1.6;
}

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

.auth-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

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

.auth-field span {
  color: #17391e;
  font-size: 14px;
  font-weight: 800;
}

.auth-field small {
  color: #647267;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  color: #102318;
  background: #fff;
  border: 1px solid #dfe8e1;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(16, 35, 24, 0.04);
  font-size: 17px;
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #17391e;
  font-size: 14px;
  font-weight: 800;
}

.auth-check input {
  width: 18px;
  height: 18px;
  accent-color: #0e7a36;
}

.auth-field input:focus,
.otp-box:focus {
  border-color: #0e7a36;
  box-shadow: 0 0 0 4px rgba(14, 122, 54, 0.13);
}

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 13px 24px;
  color: #fff;
  background: linear-gradient(135deg, #0b672e, #0e7a36);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 14px 24px rgba(14, 122, 54, 0.2);
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.auth-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(14, 122, 54, 0.24);
}

.auth-button.is-loading {
  opacity: 0.74;
  pointer-events: none;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.auth-links--center {
  justify-content: center;
}

.auth-links a,
.auth-link-button {
  color: #075126;
  background: transparent;
  border: 0;
  font-weight: 800;
}

.auth-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 800;
}

.auth-alert--success {
  color: #075126;
  background: #e9f6ec;
  border: 1px solid #cce9d3;
}

.auth-alert--error {
  color: #8a1f11;
  background: #fff0ed;
  border: 1px solid #ffd2c8;
}

.auth-alert--debug {
  color: #5c4306;
  background: #fff7da;
  border: 1px solid #f4dda0;
}

.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(38px, 1fr));
  gap: 8px;
}

.otp-box {
  width: 100%;
  aspect-ratio: 1;
  color: #063d1e;
  background: #fff;
  border: 1px solid #dfe8e1;
  border-radius: 10px;
  font-size: clamp(22px, 8vw, 32px);
  font-weight: 900;
  text-align: center;
  outline: 0;
  transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.otp-box:not(:placeholder-shown) {
  transform: translateY(-1px);
}

.otp-help {
  color: #647267;
  font-size: 13px;
  text-align: center;
}

.resend-form {
  margin-top: 16px;
  text-align: center;
}

.auth-link-button:disabled {
  color: #647267;
  cursor: not-allowed;
}

.otp-success {
  animation: otp-pop 0.45s ease;
}

.profile-shell {
  place-items: center;
}

.profile-card {
  display: grid;
  gap: 22px;
}

.profile-avatar {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0b672e, #65b742);
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(14, 122, 54, 0.22);
  font-size: 34px;
  font-weight: 900;
}

.profile-details {
  display: grid;
  gap: 12px;
}

.profile-details div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: #f6faf6;
  border: 1px solid #dfe8e1;
  border-radius: 10px;
}

.profile-details span {
  color: #647267;
  font-weight: 700;
}

.profile-details strong {
  color: #063d1e;
}

.profile-logout {
  background: #063d1e;
}

.admin-dashboard-card {
  display: grid;
  gap: 22px;
}

.admin-dashboard-grid {
  display: grid;
  gap: 12px;
}

.admin-dashboard-grid div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: #f6faf6;
  border: 1px solid #dfe8e1;
  border-radius: 10px;
}

.admin-dashboard-grid span {
  color: #647267;
  font-weight: 700;
}

.admin-dashboard-grid strong {
  color: #063d1e;
}

.admin-dashboard-actions {
  margin: 0;
}

.logout-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(16, 35, 24, 0.42);
  backdrop-filter: blur(8px);
  animation: modal-fade 0.18s ease;
}

.logout-modal {
  width: min(100%, 420px);
  padding: 28px;
  text-align: center;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 22px 48px rgba(16, 35, 24, 0.18);
  animation: modal-pop 0.22s ease;
}

.logout-modal__icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  place-items: center;
  color: #b7791f;
  background: #fff7da;
  border: 2px solid #f0c46a;
  border-radius: 50%;
  font-size: 34px;
  font-weight: 900;
}

.logout-modal h2 {
  margin: 0 0 10px;
  color: #063d1e;
  font-size: 24px;
  font-weight: 900;
}

.logout-modal p {
  margin: 0 0 24px;
  color: #647267;
}

.logout-modal__actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.logout-modal__button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  font-weight: 900;
}

.logout-modal__button--cancel {
  color: #24312a;
  background: #e5e7eb;
}

.logout-modal__button--confirm {
  color: #fff;
  background: #2563eb;
}

@keyframes otp-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 640px) {
  .auth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .otp-inputs {
    gap: 12px;
  }
}

@media (max-width: 860px) {
  .auth-visual {
    display: none;
  }

  .auth-shell,
  .profile-shell {
    min-height: auto;
    padding: 30px 0 42px;
  }
}
