@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --green-950: #052e16;
  --green-900: #14532d;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-300: #86efac;
  --green-100: #dcfce7;
  --green-50:  #f0fdf4;
  --text:      #0f172a;
  --text-mid:  #64748b;
  --text-soft: #94a3b8;
  --border:    #e2e8f0;
  --white:     #ffffff;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
  background:
    linear-gradient(rgba(5,46,22,0.72), rgba(5,46,22,0.72)),
    url('../images/bg.jpg') center/cover no-repeat fixed;
}

/* ══════════════════════════════════════════
   WRAPPER
   ══════════════════════════════════════════ */
.login-wrapper {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 32px 80px rgba(0,0,0,0.50),
    0 8px 24px rgba(0,0,0,0.30);
}

/* ══════════════════════════════════════════
   LEFT PANEL
   ══════════════════════════════════════════ */
.left-panel {
  background: linear-gradient(155deg, var(--green-950) 0%, var(--green-900) 45%, #1a6b3a 80%, var(--green-700) 100%);
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.left-panel::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(74,222,128,0.18) 0%, transparent 65%);
  top: -120px;
  right: -120px;
  pointer-events: none;
}

.left-panel::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(34,197,94,0.14) 0%, transparent 65%);
  bottom: -100px;
  left: -80px;
  pointer-events: none;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 11px;
  background: rgba(255,255,255,0.10);
  padding: 7px;
  border: 1px solid rgba(255,255,255,0.14);
}

.brand-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.brand-name span { color: var(--green-300); }

/* Tagline */
.subtitle {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.65);
  margin-bottom: 24px;
  max-width: 340px;
  position: relative;
  z-index: 1;
}

/* Features */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 11px 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s;
}

.feature-item:hover { background: rgba(255,255,255,0.09); }

.fi-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(74,222,128,0.16);
  border: 1px solid rgba(74,222,128,0.22);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-300);
}

.fi-body h4 {
  font-size: 13px;
  font-weight: 650;
  color: var(--green-100);
  margin-bottom: 3px;
}

.fi-body p {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   RIGHT PANEL
   ══════════════════════════════════════════ */
.right-panel {
  background: var(--white);
  padding: 28px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.form-box {
  width: 100%;
  max-width: 360px;
}

/* Close btn */
.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  color: var(--green-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.close-btn:hover {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}

/* Heading area */
.form-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--green-700);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.form-eyebrow::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--green-500);
  border-radius: 50%;
}

.form-box h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.form-box .desc {
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Fields ── */
.field { margin-bottom: 10px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.field input {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder { color: var(--text-soft); }

.field input:focus {
  border-color: var(--green-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.14);
}

/* ── Password ── */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 58px; }

.toggle-pass {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: var(--green-700);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px;
}

/* ── Strength bar ── */
.strength-wrap { margin-top: 4px; margin-bottom: 8px; }

.strength-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 5px;
}

.requirements-bad  { color: #dc2626; }
.requirements-mid  { color: #d97706; }
.requirements-good { color: var(--green-700); }

.password-strength-bar {
  height: 4px;
  width: 100%;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.3s;
}

.strength-weak   { background: #ef4444; }
.strength-medium { background: #f59e0b; }
.strength-strong { background: var(--green-500); }

/* ── Match ── */
.match-wrap { margin-top: 4px; margin-bottom: 8px; }

.match-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 5px;
}

.match-indicator {
  height: 4px;
  width: 100%;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.3s;
}

.match-ok    { background: var(--green-500); }
.match-error { background: #ef4444; }
.text-ok     { color: var(--green-700); }
.text-error  { color: #dc2626; }

/* ── Terms ── */
.terms-field {
  margin: 10px 0 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 11px;
}

.terms-field label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-mid);
}

.terms-field input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--green-600);
  margin-top: 2px;
  flex-shrink: 0;
}

.terms-field a { color: var(--green-700); font-weight: 600; text-decoration: underline; }

/* ── Field errors ── */
.field.has-error input {
  border-color: #ef4444;
  background: #fff5f5;
}

.field.has-error input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.14);
}

.field-err {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #dc2626;
}

/* ── Terms hint ── */
.terms-hint {
  margin: 7px 0 0;
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.5;
}

.terms-field input[type="checkbox"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.terms-field label:has(input:disabled) {
  cursor: default;
  opacity: 0.7;
}

/* ── Alerts ── */
.alert {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.alert-error   { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.alert-success { color: #166534; background: var(--green-50); border: 1px solid var(--green-100); }
.alert-warn    { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--green-700), var(--green-950));
  color: var(--white);
  border: none;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  letter-spacing: -0.1px;
  transition: opacity 0.15s, box-shadow 0.15s, transform 0.1s;
}

.btn-primary:hover {
  opacity: 0.93;
  box-shadow: 0 6px 20px rgba(21,128,61,0.35);
  transform: translateY(-1px);
}

.btn-primary:active { transform: none; box-shadow: none; }

.link-button {
  display: block;
  text-align: center;
  text-decoration: none;
}

.btn-clear-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 6px;
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--text-soft);
  cursor: pointer;
  text-align: center;
  transition: color 0.15s;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.btn-clear-link:hover { color: var(--text-mid); }

/* ── Footer link ── */
.bottom-text {
  text-align: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mid);
}

.bottom-text a { color: var(--green-700); font-weight: 700; text-decoration: none; }
.bottom-text a:hover { text-decoration: underline; }

.verification-card { text-align: center; }
.verification-card h3 { margin: 0 0 8px; font-size: 21px; color: var(--text-dark); }
.verification-card > p { margin: 0 0 20px; color: var(--text-mid); font-size: 13px; line-height: 1.6; }
.verification-icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px;
  border-radius: 16px; background: var(--green-50); color: var(--green-700); font-size: 25px;
}
.verification-form { text-align: left; }
.verification-form label { display: block; margin-bottom: 7px; color: var(--text-mid); font-size: 12px; font-weight: 700; }
.verification-form input {
  width: 100%; box-sizing: border-box; margin-bottom: 12px; padding: 14px;
  border: 1px solid var(--border); border-radius: 11px; text-align: center;
  font: 800 22px/1 'Inter', sans-serif; letter-spacing: 9px; color: var(--text-dark);
}
.verification-form input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
.resend-form { margin-top: 4px; }
.cancel-registration-form { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.cancel-registration-button {
  border: 0; background: transparent; color: #b91c1c; cursor: pointer;
  font: 600 12px/1.4 'Inter', sans-serif; text-decoration: underline;
  text-decoration-style: dotted; text-underline-offset: 3px;
}
.cancel-registration-button:hover { color: #7f1d1d; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 860px) {
  .login-wrapper { grid-template-columns: 1fr; }
  .left-panel  { padding: 40px 28px; }
  .right-panel { padding: 40px 28px; }
}
