/* ══════════════════════════════════════════
   TOKENS
══════════════════════════════════════════ */
:root {
  --green:        #18a84a;
  --green-d:      #0d7a35;
  --green-dd:     #07522a;
  --green-l:      #e8f8ee;
  --green-glow:   rgba(24,168,74,.35);
  --orange:       #f47c20;
  --orange-l:     rgba(244,124,32,.12);
  --sidebar-bg:   #0a1f12;
  --panel-bg:     #0d2818;
  --card-bg:      #ffffff;
  --border:       rgba(24,168,74,.18);
  --border-light: rgba(255,255,255,.07);
  --text:         #111c16;
  --text-soft:    #5a7060;
  --text-muted:   #94a89b;
  --font:         'Plus Jakarta Sans', sans-serif;
  --mono:         'JetBrains Mono', monospace;
  --radius:       20px;
  --radius-sm:    12px;
  --input-h:      52px;
  --transition:   .2s cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════════
   RESET
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); overflow: hidden; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ══════════════════════════════════════════
   FULL-PAGE LAYOUT — two halves
══════════════════════════════════════════ */
.login-shell {
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   LEFT PANEL — immersive dark brand side
══════════════════════════════════════════ */
.left-panel {
  background: var(--sidebar-bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 52px;
}

/* Layered organic blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(24,168,74,.22) 0%, transparent 70%);
  top: -160px; left: -100px;
  animation-delay: 0s;
}
.blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(244,124,32,.14) 0%, transparent 70%);
  bottom: 0; right: -80px;
  animation-delay: -3s;
}
.blob-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(24,168,74,.1) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation-delay: -5s;
}

/* Geometric dot grid */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(24,168,74,.18) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

/* Diagonal accent stripe */
.accent-stripe {
  position: absolute;
  top: 0; right: 120px;
  width: 2px; height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(24,168,74,.3) 30%, rgba(24,168,74,.6) 60%, rgba(244,124,32,.4) 80%, transparent 100%);
}
.accent-stripe-2 {
  right: 220px;
  background: linear-gradient(180deg, transparent 0%, rgba(24,168,74,.1) 40%, rgba(24,168,74,.25) 70%, transparent 100%);
}

/* Floating produce icons */
.float-icons { position: absolute; inset: 0; pointer-events: none; }
.fi {
  position: absolute;
  font-size: 2.2rem;
  opacity: 0;
  animation: floatUp 12s linear infinite;
  filter: drop-shadow(0 4px 16px rgba(24,168,74,.4));
}
.fi:nth-child(1)  { left: 8%;  animation-delay: 0s;   animation-duration: 14s; font-size: 2rem; }
.fi:nth-child(2)  { left: 22%; animation-delay: -3s;  animation-duration: 16s; font-size: 1.6rem; }
.fi:nth-child(3)  { left: 38%; animation-delay: -7s;  animation-duration: 13s; font-size: 2.4rem; }
.fi:nth-child(4)  { left: 55%; animation-delay: -2s;  animation-duration: 15s; font-size: 1.8rem; }
.fi:nth-child(5)  { left: 70%; animation-delay: -9s;  animation-duration: 12s; font-size: 2rem; }
.fi:nth-child(6)  { left: 82%; animation-delay: -5s;  animation-duration: 17s; font-size: 1.5rem; }
.fi:nth-child(7)  { left: 15%; animation-delay: -11s; animation-duration: 14s; font-size: 2.2rem; }
.fi:nth-child(8)  { left: 48%; animation-delay: -4s;  animation-duration: 18s; font-size: 1.4rem; }
.fi:nth-child(9)  { left: 90%; animation-delay: -8s;  animation-duration: 13s; font-size: 2rem; }
.fi:nth-child(10) { left: 62%; animation-delay: -6s;  animation-duration: 16s; font-size: 1.7rem; }

@keyframes floatUp {
  0%   { transform: translateY(110vh) rotate(0deg);   opacity: 0; }
  5%   { opacity: .7; }
  90%  { opacity: .4; }
  100% { transform: translateY(-15vh) rotate(25deg);  opacity: 0; }
}
@keyframes blobFloat {
  0%,100% { transform: scale(1) translate(0,0); }
  33%     { transform: scale(1.08) translate(20px,-15px); }
  66%     { transform: scale(.95) translate(-12px,20px); }
}

/* LEFT CONTENT */
.left-logo {
  display: flex; align-items: center; gap: 13px;
  position: relative; z-index: 2;
  animation: revealDown .7s cubic-bezier(.4,0,.2,1) both;
}
.left-logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--green), var(--green-d));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 0 1px rgba(24,168,74,.4), 0 8px 24px rgba(24,168,74,.3);
}
.left-logo-text { font-size: 1.3rem; font-weight: 900; color: #fff; letter-spacing: -.3px; }
.left-logo-text span { color: var(--orange); }
.left-logo-sub { font-size: .62rem; color: rgba(255,255,255,.35); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-top: 1px; }

.left-center { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; }

.left-headline {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.5px;
  color: #fff;
  margin-bottom: 20px;
  animation: revealUp .8s .15s cubic-bezier(.4,0,.2,1) both;
}
.left-headline em {
  font-style: normal;
  background: linear-gradient(90deg, var(--green), #4fe889, var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.left-sub {
  font-size: .95rem;
  color: rgba(255,255,255,.5);
  line-height: 1.65;
  max-width: 380px;
  font-weight: 500;
  margin-bottom: 40px;
  animation: revealUp .8s .25s cubic-bezier(.4,0,.2,1) both;
}

/* Stat pills */
.left-stats {
  display: flex; gap: 12px; flex-wrap: wrap;
  animation: revealUp .8s .38s cubic-bezier(.4,0,.2,1) both;
}
.stat-pill {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 12px 18px;
  backdrop-filter: blur(10px);
  transition: border-color var(--transition), background var(--transition);
}
.stat-pill:hover {
  background: rgba(24,168,74,.1);
  border-color: rgba(24,168,74,.3);
}
.sp-icon { font-size: 1.4rem; }
.sp-val { font-size: 1rem; font-weight: 800; color: #fff; line-height: 1; }
.sp-label { font-size: .65rem; color: rgba(255,255,255,.35); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin-top: 2px; }

/* Feature list */
.left-features {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 36px;
  animation: revealUp .8s .48s cubic-bezier(.4,0,.2,1) both;
}
.feature-row {
  display: flex; align-items: center; gap: 10px;
  font-size: .82rem; color: rgba(255,255,255,.45); font-weight: 500;
}
.feature-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 8px var(--green-glow);
}

/* Testimonial card */
.testimonial-card {
  position: relative; z-index: 2;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; padding: 20px 22px;
  backdrop-filter: blur(12px);
  animation: revealUp .8s .55s cubic-bezier(.4,0,.2,1) both;
}
.tc-quote {
  font-size: .85rem; color: rgba(255,255,255,.6);
  line-height: 1.6; font-weight: 500; font-style: italic;
  margin-bottom: 14px;
}
.tc-quote::before { content: '"'; color: var(--green); font-size: 1.2rem; line-height: 0; vertical-align: -.2em; margin-right: 3px; }
.tc-quote::after  { content: '"'; color: var(--green); font-size: 1.2rem; line-height: 0; vertical-align: -.2em; margin-left: 3px; }
.tc-author { display: flex; align-items: center; gap: 10px; }
.tc-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800; color: #fff;
}
.tc-name { font-size: .78rem; font-weight: 700; color: rgba(255,255,255,.8); }
.tc-role { font-size: .65rem; color: rgba(255,255,255,.3); }
.tc-stars { margin-left: auto; color: #f5a623; font-size: .75rem; }

/* ══════════════════════════════════════════
   RIGHT PANEL — clean white login card
══════════════════════════════════════════ */
.right-panel {
  background: #f4f7f5;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 40px 48px;
  position: relative;
  overflow: hidden;
}

/* Subtle background pattern on right */
.right-panel::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(24,168,74,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Corner accent */
.right-panel::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 180px; height: 180px;
  background: radial-gradient(circle at top right, rgba(24,168,74,.08), transparent 70%);
  pointer-events: none;
}

.login-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0,0,0,.04), 0 20px 60px rgba(0,0,0,.08), 0 0 0 1px rgba(24,168,74,.07);
  padding: 44px 42px 40px;
  width: 100%;
  max-width: 396px;
  position: relative; z-index: 2;
  animation: cardReveal .65s .1s cubic-bezier(.4,0,.2,1) both;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Green top accent bar */
.login-card::before {
  content: '';
  position: absolute; top: 0; left: 32px; right: 32px; height: 3px;
  background: linear-gradient(90deg, var(--green), var(--orange));
  border-radius: 0 0 4px 4px;
}

/* CARD HEADER */
.card-logo-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.card-logo {
  display: flex; align-items: center; gap: 10px;
}
.card-logo-icon {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--green), var(--green-d));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(24,168,74,.3);
}
.card-logo-brand { font-size: .95rem; font-weight: 900; color: var(--text); }
.card-logo-brand span { color: var(--orange); }
.card-logo-sub { font-size: .6rem; color: var(--text-muted); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }

.secure-badge {
  display: flex; align-items: center; gap: 5px;
  background: var(--green-l); border-radius: 99px; padding: 4px 10px;
  font-size: .65rem; font-weight: 700; color: var(--green-d);
}
.secure-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }

@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(24,168,74,.6); } 50%{ box-shadow: 0 0 0 5px rgba(24,168,74,0); } }

.card-welcome { font-size: 1.5rem; font-weight: 900; color: var(--text); letter-spacing: -.3px; margin-bottom: 4px; }
.card-sub { font-size: .82rem; color: var(--text-muted); font-weight: 500; margin-bottom: 32px; }

/* FORM */
.form-group { margin-bottom: 16px; }
.form-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .75rem; font-weight: 700; color: var(--text);
  margin-bottom: 7px; letter-spacing: .1px;
}
.form-label a { font-size: .73rem; font-weight: 600; color: var(--green-d); }
.form-label a:hover { color: var(--green); }

.input-wrap {
  position: relative;
}
.input-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; color: var(--text-muted);
  pointer-events: none; transition: color var(--transition);
}
.form-input {
  width: 100%; height: var(--input-h);
  border: 1.5px solid #e2e8e4;
  border-radius: var(--radius-sm);
  padding: 0 46px 0 44px;
  font-size: .88rem; font-family: var(--font);
  color: var(--text); background: #fafcfb;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-input::placeholder { color: #b0bfb5; }
.form-input:hover { border-color: #c8d9cc; background: #fff; }
.form-input:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24,168,74,.1);
}
.form-input:focus ~ .input-icon,
.input-wrap:focus-within .input-icon { color: var(--green); }

/* Input validation states */
.form-input.is-valid { border-color: var(--green); background: #fff; }
.form-input.is-invalid { border-color: #e53935; background: #fff; box-shadow: 0 0 0 4px rgba(229,57,53,.08); }
.invalid-msg { font-size: .72rem; color: #e53935; font-weight: 600; margin-top: 5px; display: flex; align-items: center; gap: 4px; }

/* Password toggle */
.pw-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: .95rem; color: var(--text-muted); cursor: pointer;
  padding: 4px; transition: color var(--transition);
  background: none; border: none;
}
.pw-toggle:hover { color: var(--green-d); }

/* Remember me row */
.remember-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.remember-check {
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; color: var(--text-soft); cursor: pointer;
}
.remember-check input[type="checkbox"] {
  width: 17px; height: 17px; border-radius: 5px;
  accent-color: var(--green); cursor: pointer;
}

/* SUBMIT BUTTON */
.btn-signin {
  width: 100%; height: 52px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-d) 100%);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 800; letter-spacing: .1px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; font-family: var(--font);
  box-shadow: 0 4px 14px rgba(24,168,74,.35), 0 1px 3px rgba(0,0,0,.1);
  transition: all var(--transition); position: relative; overflow: hidden;
  margin-bottom: 16px;
}
.btn-signin::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 60%);
  opacity: 0; transition: opacity var(--transition);
}
.btn-signin:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(24,168,74,.45); }
.btn-signin:hover::before { opacity: 1; }
.btn-signin:active { transform: scale(.98) translateY(0); box-shadow: 0 2px 8px rgba(24,168,74,.3); }
.btn-signin.loading .btn-label { opacity: 0; }
.btn-signin.loading .btn-loader { display: flex !important; }
.btn-loader {
  display: none; position: absolute;
  align-items: center; gap: 6px;
}
.btn-loader-dot {
  width: 7px; height: 7px; background: #fff;
  border-radius: 50%; animation: btnBounce 1s infinite;
}
.btn-loader-dot:nth-child(2) { animation-delay: .15s; }
.btn-loader-dot:nth-child(3) { animation-delay: .3s; }
@keyframes btnBounce { 0%,100%{transform:scale(1)} 50%{transform:scale(1.5)} }

/* Divider */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; font-size: .72rem; color: var(--text-muted); font-weight: 600;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e8ede9; }

/* Alt sign-in methods */
.alt-methods { display: flex; gap: 10px; margin-bottom: 28px; }
.btn-alt {
  flex: 1; height: 44px; border: 1.5px solid #e2e8e4;
  border-radius: var(--radius-sm); background: #fafcfb;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: .78rem; font-weight: 700; color: var(--text);
  cursor: pointer; transition: all var(--transition);
}
.btn-alt:hover { background: #fff; border-color: var(--green); color: var(--green-d); box-shadow: 0 2px 8px rgba(24,168,74,.12); }
.btn-alt i { font-size: 1rem; }

/* Footer row */
.card-footer-row {
  text-align: center;
  font-size: .75rem; color: var(--text-muted); font-weight: 500;
}
.card-footer-row a { color: var(--green-d); font-weight: 700; }
.card-footer-row a:hover { color: var(--green); }

/* Help row */
.help-row {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 20px; font-size: .72rem; color: var(--text-muted); font-weight: 600;
}
.help-row a { color: var(--text-muted); display: flex; align-items: center; gap: 5px; transition: color var(--transition); }
.help-row a:hover { color: var(--green-d); }

/* OTP screen */
.otp-screen { display: none; }
.otp-header { text-align: center; margin-bottom: 24px; }
.otp-icon-wrap {
  width: 68px; height: 68px; border-radius: 20px;
  background: var(--green-l); display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin: 0 auto 14px;
  box-shadow: 0 4px 16px rgba(24,168,74,.2);
  animation: popIn .4s cubic-bezier(.4,0,.2,1) both;
}
.otp-title { font-size: 1.2rem; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.otp-sub { font-size: .8rem; color: var(--text-muted); font-weight: 500; line-height: 1.5; }
.otp-sub strong { color: var(--text); }

.otp-inputs {
  display: flex; gap: 10px; justify-content: center; margin-bottom: 24px;
}
.otp-box {
  width: 52px; height: 60px; text-align: center;
  border: 2px solid #e2e8e4; border-radius: var(--radius-sm);
  font-size: 1.5rem; font-weight: 800; font-family: var(--mono);
  color: var(--text); background: #fafcfb; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  caret-color: var(--green);
}
.otp-box:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(24,168,74,.1);
  background: #fff;
}
.otp-box.filled { border-color: var(--green); background: var(--green-l); }

.otp-resend { text-align: center; font-size: .78rem; color: var(--text-muted); font-weight: 600; margin-bottom: 22px; }
.otp-resend a { color: var(--green-d); font-weight: 700; cursor: pointer; }
.otp-resend a:hover { color: var(--green); }
.otp-timer { font-weight: 700; color: var(--orange); font-family: var(--mono); }

/* Right panel bottom info */
.right-bottom {
  position: absolute; bottom: 20px; left: 0; right: 0;
  text-align: center; font-size: .7rem; color: var(--text-muted); font-weight: 500;
  z-index: 2;
}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes revealDown  { from{opacity:0;transform:translateY(-20px)} to{opacity:1;transform:translateY(0)} }
@keyframes revealUp    { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes popIn       { from{transform:scale(.7);opacity:0} 80%{transform:scale(1.06)} to{transform:scale(1);opacity:1} }
@keyframes shake       { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }

.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97) both; }

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
#toast-stack {
  position: fixed; top: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast-item {
  background: #0a1f12; color: #fff;
  padding: 12px 18px; border-radius: 12px;
  font-size: .82rem; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: revealDown .3s both; min-width: 230px;
}
.toast-item.success { border-left: 4px solid var(--green); }
.toast-item.error   { border-left: 4px solid #e53935; }
.toast-item.info    { border-left: 4px solid #1a73e8; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 991px) {
  body { overflow: auto; }
  html, body { height: auto; }
  .login-shell { grid-template-columns: 1fr; min-height: 100vh; height: auto; }
  .left-panel { display: none; }
  .right-panel { min-height: 100vh; padding: 40px 24px; }
  .login-card { padding: 36px 28px 32px; }
}
@media (max-width: 480px) {
  .alt-methods { flex-direction: column; }
  .otp-box { width: 44px; height: 54px; font-size: 1.3rem; }
}
