:root {
  --bg0: #eef7f0;
  --bg1: #f7f3da;
  --text: #0b1220;
  --muted: rgba(20, 30, 60, 0.72);
  --line: rgba(20, 30, 60, 0.14);
  --card: rgba(255, 255, 255, 0.82);
  --glass: rgba(255, 255, 255, 0.62);
  --brand: #088c16;
  --brand2: #009002;
  --warn: #f1b806;
  --bad: #dc3545;
  --good: #088c16;
  --shadow: 0 18px 50px rgba(12, 20, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg0) 0%, #eef7f0 38%, #f8f5df 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.auth-grid {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.auth-side {
  position: relative;
  padding: 36px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(700px 420px at 14% 18%, rgba(8, 140, 22, 0.16), transparent 60%),
    radial-gradient(600px 390px at 80% 85%, rgba(0, 144, 2, 0.12), transparent 62%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.6));
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
}

.brand-dot {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

.auth-headline {
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.1;
  font-weight: 800;
}

.auth-copy {
  color: var(--muted);
  max-width: 46ch;
}

.stats {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.stat-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-card b {
  font-size: 17px;
}

.auth-form-wrap {
  padding: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72));
}

.go-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(8, 140, 22, 0.24);
  border-radius: 12px;
  background: rgba(8, 140, 22, 0.08);
  color: #067812;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  width: fit-content;
  box-shadow: 0 6px 18px rgba(8, 140, 22, 0.12);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.go-home-btn:visited {
  color: #067812;
  text-decoration: none !important;
}

.go-home-btn:hover,
.go-home-btn:focus-visible {
  background: rgba(8, 140, 22, 0.14);
  border-color: rgba(8, 140, 22, 0.35);
  color: #05660f;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.auth-form-wrap h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
}

.subline {
  color: var(--muted);
  margin-top: 8px;
}

.alert-stack {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.alert-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 14px;
}

.alert-item.error {
  border-color: rgba(220, 53, 69, 0.35);
  background: rgba(220, 53, 69, 0.1);
}

.alert-item.success {
  border-color: rgba(8, 140, 22, 0.35);
  background: rgba(8, 140, 22, 0.1);
}

.form-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.two-col {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.field {
  position: relative;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: rgba(8, 140, 22, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(8, 140, 22, 0.12);
}

.pass-wrap {
  position: relative;
}

.toggle-pass {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 30px;
  min-width: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.meta-row {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.strength {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.strength-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.12);
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.2s ease, background 0.2s ease;
}

.btn-brand {
  margin-top: 6px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 14px 30px rgba(8, 140, 22, 0.28);
  cursor: pointer;
}

.btn-brand:hover {
  filter: brightness(0.96);
}

.helper-links {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.helper-links a {
  color: #067812;
  text-decoration: none;
  font-weight: 700;
}

.helper-links a:hover {
  text-decoration: underline;
}

.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.parsley-errors-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.parsley-errors-list li {
  font-size: 12px;
  color: #b21f2d;
}

.input.parsley-error {
  border-color: rgba(220, 53, 69, 0.6);
  box-shadow: 0 0 0 0.18rem rgba(220, 53, 69, 0.12);
}

.input.parsley-success {
  border-color: rgba(8, 140, 22, 0.45);
}

.is-hidden {
  display: none !important;
}

.auth-loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(1px);
  z-index: 9999;
}

.auth-loading-overlay.is-active {
  display: flex;
}

.auth-loading-gif {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(12, 20, 55, 0.22);
}

@media (max-width: 991px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .auth-side,
  .auth-form-wrap {
    padding: 22px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}
