:root {
  --bg: #061f16;
  --panel: #fffefa;
  --ink: #14251d;
  --muted: #778178;
  --line: #e3e8dc;
  --green-950: #08261b;
  --green-900: #0d3225;
  --green-700: #19644a;
  --mint: #c9f36c;
  --mint-soft: #effbdb;
  --red: #b8473b;
  --red-soft: #fbece9;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(201, 243, 108, 0.12), transparent 24%),
    radial-gradient(circle at 86% 95%, rgba(50, 129, 92, 0.26), transparent 32%),
    var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  width: min(1080px, calc(100vw - 48px));
  min-height: 640px;
  margin: max(24px, calc((100vh - 700px) / 2)) auto;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.7);
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 40px 34px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  background:
    radial-gradient(circle at 80% 12%, rgba(201, 243, 108, 0.14), transparent 28%),
    radial-gradient(circle at 12% 100%, rgba(45, 130, 91, 0.35), transparent 38%),
    var(--green-950);
}

.brand-panel::before {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -130px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(201, 243, 108, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(201, 243, 108, 0.025), 0 0 0 94px rgba(201, 243, 108, 0.018);
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 0.55px, transparent 0.55px);
  background-size: 5px 5px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

.brand-panel > * {
  position: relative;
  z-index: 1;
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  color: var(--green-950);
  background: var(--mint);
  border-radius: 13px;
  box-shadow: 0 10px 24px -14px rgba(201, 243, 108, 0.7);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
}

.brand-head div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-head strong {
  color: #fff;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.4px;
}

.brand-head span:not(.brand-mark) {
  color: rgba(255, 255, 255, 0.4);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 2.1px;
}

.brand-copy {
  margin-top: auto;
  padding: 54px 0 42px;
}

.brand-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(201, 243, 108, 0.8);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.7px;
}

.brand-kicker i {
  width: 6px;
  height: 6px;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(201, 243, 108, 0.1);
}

.brand-copy h1 {
  margin: 18px 0 15px;
  color: #fff;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -1.3px;
}

.brand-copy p {
  max-width: 310px;
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  line-height: 1.8;
}

.brand-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  max-width: 340px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
}

.brand-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.025);
}

.brand-stats strong {
  color: var(--mint);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.brand-stats span {
  color: rgba(255, 255, 255, 0.34);
  font-size: 8px;
}

.brand-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 17px;
  color: rgba(255, 255, 255, 0.32);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 9px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(201, 243, 108, 0.08);
}

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px clamp(32px, 6vw, 74px) 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 243, 108, 0.18), transparent 28%),
    var(--panel);
}

.form-wrap {
  width: 100%;
  max-width: 360px;
  margin: auto;
}

.form-eyebrow {
  color: #a0aa9f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.form-head h2 {
  margin: 8px 0 7px;
  color: var(--ink);
  font-size: 27px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.9px;
}

.form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.login-error {
  padding: 10px 12px;
  margin-top: 18px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #f2d5d0;
  border-radius: 10px;
  font-size: 10.5px;
  line-height: 1.55;
}

#login-form {
  margin-top: 25px;
}

.login-field {
  margin-bottom: 15px;
}

.login-field label {
  display: block;
  margin-bottom: 6px;
  color: #3e5045;
  font-size: 10.5px;
  font-weight: 650;
}

.login-input {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  overflow: hidden;
  background: #fbfcf8;
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.login-input:focus-within {
  background: #fff;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(25, 100, 74, 0.09);
}

.login-input > svg {
  width: 16px;
  height: 16px;
  margin-left: 13px;
  fill: none;
  stroke: #9ba49d;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.login-input input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 13px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12.5px;
}

.login-input input::placeholder {
  color: #b0b8b1;
}

.password-toggle {
  height: 28px;
  padding: 0 12px;
  color: #8d978f;
  background: transparent;
  border: 0;
  border-left: 1px solid #ecefe7;
  font-size: 9.5px;
  font-weight: 600;
  flex: none;
}

.password-toggle:hover {
  color: var(--green-700);
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 47px;
  margin-top: 22px;
  color: #fff;
  background: var(--green-900);
  border: 1px solid var(--green-900);
  border-radius: 11px;
  box-shadow: 0 12px 27px -18px rgba(8, 38, 27, 0.75);
  font-size: 12.5px;
  font-weight: 650;
  transition: background 150ms ease, transform 150ms ease;
}

.login-submit:hover:not(:disabled) {
  background: #134632;
  transform: translateY(-1px);
}

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

.login-submit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 20px 0 0;
  color: #9ba49d;
  font-size: 9px;
  line-height: 1.7;
}

.form-note svg {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.form-footer {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 32px;
  color: #b0b7b0;
  font-size: 8.5px;
}

.form-footer i {
  color: #d2d7cf;
  font-style: normal;
}

@media (max-width: 760px) {
  body {
    background: var(--green-950);
  }

  .login-shell {
    display: block;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand-panel {
    min-height: 250px;
    padding: 28px 24px 26px;
  }

  .brand-copy {
    padding: 42px 0 20px;
  }

  .brand-copy h1 {
    margin: 13px 0 0;
    font-size: 27px;
  }

  .brand-copy p,
  .brand-stats,
  .brand-foot {
    display: none;
  }

  .form-panel {
    min-height: calc(100vh - 250px);
    padding: 34px 24px 24px;
    border-radius: 26px 26px 0 0;
  }

  .form-wrap {
    max-width: 420px;
  }

  .form-footer {
    margin-top: 38px;
  }
}

@media (max-width: 380px) {
  .brand-panel {
    min-height: 225px;
  }

  .brand-copy h1 {
    font-size: 24px;
  }

  .form-panel {
    min-height: calc(100vh - 225px);
    padding: 30px 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
