:root {
  color-scheme: dark;
  --login-bg: #07110d;
  --login-panel: #0d1a14;
  --login-card: rgba(15, 30, 23, 0.84);
  --login-line: rgba(255, 255, 255, 0.1);
  --login-line-strong: rgba(148, 214, 0, 0.54);
  --login-green: #94d600;
  --login-green-strong: #78b000;
  --login-text: #f5f8f6;
  --login-muted: #96a49c;
  --login-danger: #ff8c8c;
  --login-radius: 18px;
}

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

html,
body {
  min-height: 100%;
  margin: 0;
}

body.login-page {
  background: var(--login-bg);
  color: var(--login-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

.login-brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(42px, 5vw, 78px);
  background:
    radial-gradient(circle at 20% 20%, rgba(148, 214, 0, 0.18), transparent 32%),
    linear-gradient(145deg, #101f17 0%, #07110d 72%);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.login-brand-panel::before,
.login-brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(148, 214, 0, 0.13);
  border-radius: 50%;
}

.login-brand-panel::before {
  width: 560px;
  height: 560px;
  right: -310px;
  top: -180px;
}

.login-brand-panel::after {
  width: 390px;
  height: 390px;
  left: -250px;
  bottom: -160px;
}

.login-brand-content {
  width: min(100%, 530px);
  margin: auto 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 42px;
  border: 1px solid rgba(148, 214, 0, 0.28);
  border-radius: 20px;
  background: rgba(148, 214, 0, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.brand-mark img {
  width: 33px;
  height: 48px;
  object-fit: contain;
}

.brand-eyebrow,
.login-kicker {
  margin: 0 0 14px;
  color: var(--login-green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-brand-content h1 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.brand-copy {
  max-width: 500px;
  margin: 28px 0 0;
  color: #b2beb7;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.72;
}

.login-brand-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #829087;
  font-size: 0.8rem;
}

.security-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--login-green);
  box-shadow: 0 0 0 5px rgba(148, 214, 0, 0.1), 0 0 18px rgba(148, 214, 0, 0.72);
}

.login-form-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 48px clamp(28px, 7vw, 120px);
  background:
    radial-gradient(circle at 100% 0, rgba(148, 214, 0, 0.07), transparent 24%),
    var(--login-panel);
}

.login-card {
  width: min(100%, 440px);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 46px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mobile-brand img {
  width: 24px;
  height: 36px;
  object-fit: contain;
}

.login-heading {
  margin-bottom: 34px;
}

.login-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

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

.login-form {
  display: grid;
  gap: 22px;
}

.form-alert:empty,
.field-error:empty,
.caps-lock:empty {
  display: none;
}

.form-alert {
  padding: 13px 15px;
  border: 1px solid rgba(255, 120, 120, 0.28);
  border-radius: 12px;
  background: rgba(255, 90, 90, 0.08);
  color: #ffb1b1;
  font-size: 0.875rem;
  line-height: 1.45;
}

.form-alert ul {
  margin: 0;
  padding-left: 18px;
}

.login-field {
  display: grid;
  gap: 9px;
}

.login-field label {
  color: #dbe3de;
  font-size: 0.86rem;
  font-weight: 650;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell > svg {
  position: absolute;
  left: 16px;
  width: 19px;
  height: 19px;
  color: #708078;
  pointer-events: none;
  transition: color 160ms ease;
}

.input-shell input {
  width: 100%;
  height: 56px;
  padding: 0 48px;
  border: 1px solid var(--login-line);
  border-radius: 13px;
  outline: none;
  background: rgba(4, 12, 8, 0.52);
  color: var(--login-text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-shell input::placeholder {
  color: #65736b;
}

.input-shell input:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.input-shell input:focus {
  border-color: var(--login-line-strong);
  background: rgba(4, 12, 8, 0.76);
  box-shadow: 0 0 0 4px rgba(148, 214, 0, 0.09);
}

.input-shell:focus-within > svg {
  color: var(--login-green);
}

.input-validation-error {
  border-color: rgba(255, 110, 110, 0.62) !important;
}

.field-error,
.caps-lock {
  color: var(--login-danger);
  font-size: 0.78rem;
  line-height: 1.4;
}

.caps-lock {
  color: #f5c76c;
}

.password-toggle {
  position: absolute;
  right: 9px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #718078;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  color: var(--login-green);
  outline: none;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
  display: none;
}

.password-toggle.is-visible .eye-closed {
  display: block;
}

.remember-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #aeb9b2;
  font-size: 0.82rem;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

.remember-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.custom-checkbox {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: rgba(4, 12, 8, 0.5);
  color: #07110d;
}

.custom-checkbox svg {
  width: 13px;
  height: 13px;
  opacity: 0;
  transform: scale(0.6);
  transition: 140ms ease;
}

.remember-option input:checked + .custom-checkbox {
  border-color: var(--login-green);
  background: var(--login-green);
}

.remember-option input:checked + .custom-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

.remember-option input:focus-visible + .custom-checkbox {
  outline: 3px solid rgba(148, 214, 0, 0.18);
  outline-offset: 2px;
}

.login-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 56px;
  margin-top: 2px;
  padding: 0 22px;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: var(--login-green);
  color: #0a140f;
  font-weight: 780;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(117, 174, 0, 0.17);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #a2e900;
  box-shadow: 0 16px 36px rgba(117, 174, 0, 0.24);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(148, 214, 0, 0.3);
  outline-offset: 3px;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.78;
}

.submit-arrow {
  position: absolute;
  right: 20px;
  width: 20px;
  height: 20px;
}

.submit-loading {
  display: none;
  align-items: center;
  gap: 9px;
}

.login-submit.is-loading .submit-label,
.login-submit.is-loading .submit-arrow {
  display: none;
}

.login-submit.is-loading .submit-loading {
  display: flex;
}

.button-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(7, 17, 13, 0.28);
  border-top-color: #07110d;
  border-radius: 50%;
  animation: login-spin 700ms linear infinite;
}

.login-help {
  margin: 26px 0 0;
  color: #6f7e75;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

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

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

  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    padding: 42px 24px;
  }

  .mobile-brand {
    display: flex;
  }
}

@media (max-width: 480px) {
  .login-form-panel {
    align-items: start;
    padding: 30px 20px;
  }

  .mobile-brand {
    margin-bottom: 42px;
  }

  .login-heading {
    margin-bottom: 30px;
  }

  .login-heading h2 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
