:root {
  --green: #247a46;
  --green-dark: #1c6338;
  --green-soft: #edf7f0;
  --ink: #17231c;
  --text: #526159;
  --muted: #748078;
  --line: #dce5df;
  --panel: #f6f9f7;
  --white: #ffffff;
  --danger-bg: #fff1f1;
  --danger: #a72e2e;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; background: var(--white); }
button, input { font: inherit; }
a { color: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.03fr) minmax(420px, .97fr);
}

.brand-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(79, 165, 102, .26), transparent 28%),
    radial-gradient(circle at 18% 88%, rgba(70, 145, 92, .18), transparent 34%),
    linear-gradient(145deg, #17291f 0%, #1d3b29 58%, #214c31 100%);
  color: white;
  padding: clamp(40px, 6vw, 88px);
}
.brand-panel::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  right: -180px;
  bottom: -190px;
}

.brand-inner {
  min-height: calc(100vh - clamp(80px, 12vw, 176px));
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-width: 620px;
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: min(100%, 285px);
  height: auto;
  object-fit: contain;
}

.brand-copy { margin: auto 0 28px; }
.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #80ce93;
}
.brand-copy h1 {
  margin: 0;
  max-width: 580px;
  font-size: clamp(42px, 4.4vw, 68px);
  line-height: .99;
  letter-spacing: -.055em;
}
.brand-lead {
  max-width: 610px;
  margin: 24px 0 0;
  color: #cedbd3;
  font-size: 17px;
  line-height: 1.7;
}

.benefits {
  display: grid;
  gap: 10px;
  margin-bottom: 34px;
  color: #deebe2;
  font-size: 14px;
}
.benefits > div { display: flex; align-items: center; gap: 10px; }
.benefit-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(105, 203, 131, .14);
  color: #7ed291;
  font-weight: 800;
  flex: 0 0 auto;
}
.brand-footer { margin: 0; color: #9fb3a6; font-size: 12px; }

.form-panel {
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 88px);
  background:
    linear-gradient(rgba(255,255,255,.94), rgba(255,255,255,.94)),
    radial-gradient(circle at 20% 10%, #dfeee4, transparent 33%);
}

.login-card { width: min(100%, 460px); }
.mobile-brand {
  display: none;
  align-items: center;
  margin-bottom: 38px;
  width: fit-content;
  padding: 12px 16px 8px;
  border-radius: 12px;
  background: #18291f;
}
.mobile-brand .brand-logo { width: min(100%, 230px); }

.login-header { margin-bottom: 34px; }
.login-header .eyebrow { color: var(--green); margin-bottom: 10px; }
.login-header h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.login-header p:last-child { margin: 12px 0 0; color: var(--text); font-size: 15px; line-height: 1.6; }

.alert {
  margin: 0 0 20px;
  padding: 13px 14px;
  border: 1px solid #f1caca;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 14px;
}
.login-form { display: grid; gap: 22px; }
.field-group label {
  display: block;
  margin-bottom: 8px;
  color: #27342c;
  font-size: 14px;
  font-weight: 750;
}
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px 0 48px;
  border: 1px solid #cfd9d2;
  border-radius: 11px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input-wrap input::placeholder { color: #9aa49e; }
.input-wrap input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(36,122,70,.11); }
.field-icon {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: #799085;
  font-weight: 800;
  pointer-events: none;
}
.lock-icon { font-size: 10px; }
.password-wrap input { padding-right: 88px; }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.password-toggle:hover { background: var(--green-soft); }
.password-toggle:focus-visible, .submit-btn:focus-visible, a:focus-visible { outline: 3px solid rgba(36,122,70,.25); outline-offset: 2px; }

.submit-btn {
  width: 100%;
  min-height: 54px;
  margin-top: 2px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(30, 103, 58, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(30, 103, 58, .22); }

.login-help {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.login-help a { color: var(--green); font-weight: 750; text-decoration: none; }
.login-help a:hover { text-decoration: underline; }
.login-footer {
  margin-top: 42px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: #8b9690;
  font-size: 11px;
}
.secure { display: inline-flex; align-items: center; gap: 6px; }
.secure-dot { width: 7px; height: 7px; border-radius: 50%; background: #48a764; }

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; min-height: 100vh; }
  .brand-panel { display: none; }
  .form-panel { min-height: 100vh; align-items: start; padding: 42px 24px; }
  .login-card { margin: auto; }
  .mobile-brand { display: flex; }
}

@media (max-width: 520px) {
  .form-panel { padding: 26px 18px 34px; }
  .mobile-brand { margin-bottom: 38px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 10px; }
  .brand-word { font-size: 24px; }
  .login-header { margin-bottom: 28px; }
  .login-header h2 { font-size: 34px; }
  .login-help { flex-direction: column; }
  .login-footer { margin-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
