:root {
  --primary: #48D52F;
  --primary-hover: #8EEB2B;
  --primary-soft: #17351E;
  --success: #48D52F;
  --success-soft: #12351D;
  --error: #DC3F3A;
  --error-soft: #FFF1EF;
  --background: #030B0D;
  --surface: #081315;
  --surface-soft: #101B1E;
  --text: #F7FFF9;
  --muted: #94A9A0;
  --line: #203235;
  --white: #FFFFFF;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.26);
  --radius: 24px;
  --radius-sm: 14px;
  --transition: 180ms ease;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(72, 213, 47, 0.18), transparent 26%),
    radial-gradient(circle at 78% 86%, rgba(0, 128, 63, 0.22), transparent 32%),
    linear-gradient(135deg, #010507 0%, var(--background) 52%, #071416 100%);
}

a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

button,
input,
select {
  font: inherit;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(520px, 1.08fr) minmax(460px, 0.92fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 56px;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 32% 42%, rgba(72, 213, 47, 0.28), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(142, 235, 43, 0.12), transparent 32%),
    linear-gradient(145deg, #010608 0%, #031112 52%, #061B16 100%);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(72, 213, 47, 0.18);
  border-radius: 30px;
  pointer-events: none;
}

.brand-panel::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: 18%;
  width: 360px;
  height: 360px;
  border: 70px solid rgba(72, 213, 47, 0.07);
  border-radius: 50%;
}

.brand-mark,
.mobile-logo {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-size: 1.04rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0;
  position: relative;
  z-index: 1;
}

.brand-mark:hover {
  color: var(--white);
}

.brand-mark img {
  width: min(220px, 62vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 34px rgba(72, 213, 47, 0.18));
}

.brand-hero-logo {
  width: min(820px, 100%);
  max-height: 390px;
  object-fit: contain;
  height: auto;
  display: block;
  margin-left: -18px;
  filter: drop-shadow(0 24px 48px rgba(72, 213, 47, 0.20));
}

.brand-copy {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.brand-kicker {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.brand-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 7vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.brand-copy p:last-child {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.12rem;
  line-height: 1.7;
  letter-spacing: 0.32rem;
  text-transform: uppercase;
}

.brand-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 44px;
}

.brand-metrics div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(72, 213, 47, 0.20);
  border-radius: 18px;
  background: rgba(5, 18, 18, 0.72);
  backdrop-filter: blur(14px);
}

.brand-metrics span {
  display: block;
  margin-bottom: 6px;
  color: rgba(247, 255, 249, 0.62);
  font-size: 0.76rem;
  font-weight: 700;
}

.brand-metrics strong {
  display: block;
  color: var(--white);
  font-size: 1rem;
  white-space: nowrap;
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
}

.mobile-logo {
  display: none;
  color: var(--text);
  margin-bottom: 20px;
}

.mobile-logo img {
  width: min(240px, 72vw);
  height: auto;
}

.auth-card {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid rgba(72, 213, 47, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(15, 27, 29, 0.96), rgba(6, 17, 18, 0.96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: cardIn 320ms ease both;
}

.auth-card-wide {
  width: min(100%, 680px);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-heading {
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-hover);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-heading p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.alert {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.alert.show {
  display: flex;
}

.alert.error {
  color: #8F221E;
  background: var(--error-soft);
  border: 1px solid rgba(220, 63, 58, 0.22);
}

.alert.success {
  color: var(--primary-hover);
  background: var(--success-soft);
  border: 1px solid rgba(72, 213, 47, 0.24);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #DDEBE3;
  font-size: 0.9rem;
  font-weight: 800;
}

.field em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(2, 9, 10, 0.74);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(72, 213, 47, 0.14);
}

.field.has-error .input-wrap {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(220, 63, 58, 0.1);
}

.field.is-valid .input-wrap {
  border-color: rgba(72, 213, 47, 0.65);
}

.input-wrap svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-left: 16px;
  fill: var(--muted);
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: var(--text);
  background: transparent;
  font-size: 0.96rem;
}

.input-wrap input::placeholder {
  color: #657A72;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  min-height: 52px;
  appearance: none;
  cursor: pointer;
}

.select-wrap::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 18px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  pointer-events: none;
}

.password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-right: 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition);
}

.password-toggle:hover {
  background: var(--primary-soft);
}

.password-toggle svg {
  margin: 0;
  fill: var(--primary);
}

.field-error,
.terms-error {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  color: var(--error);
  font-size: 0.78rem;
  font-weight: 700;
}

.form-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 20px;
  font-size: 0.9rem;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #DDEBE3;
  font-size: 0.91rem;
  font-weight: 700;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.check-terms {
  margin-top: 2px;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #031008;
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  box-shadow: 0 16px 34px rgba(72, 213, 47, 0.22);
  font-weight: 900;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #B5FF3D, var(--primary));
  box-shadow: 0 20px 38px rgba(72, 213, 47, 0.30);
}

.submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.submit-btn.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-right: 9px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

.auth-switch a {
  display: inline-block;
  margin-left: 4px;
}

@media (max-width: 1040px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    min-height: 100vh;
    flex-direction: column;
    padding: 28px 20px;
  }

  .mobile-logo {
    display: inline-flex;
  }
}

@media (max-width: 720px) {
  .auth-card,
  .auth-card-wide {
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-row-inline {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .form-panel {
    padding: 20px 14px;
  }

  .auth-card,
  .auth-card-wide {
    padding: 20px;
  }

  .auth-heading h2 {
    font-size: 1.7rem;
  }

  .input-wrap {
    min-height: 50px;
  }
}
