.login-page {
  --login-bg: #f7f8f3;
  --login-card: #ffffff;
  --login-field: #fbfcf8;
  --login-text: #171914;
  --login-muted: #6d7168;
  --login-line: #dfe3d8;
  --login-lime: #c8ff3d;
  --login-danger: #b42318;
  background: var(--login-bg);
  color: var(--login-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
}

.login-card {
  width: min(100%, 400px);
  padding: 32px 24px 28px;
  background: var(--login-card);
  border: 1px solid var(--login-line);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(35, 39, 29, 0.08);
}

.login-brand {
  min-height: 42px;
  display: grid;
  place-items: center;
}

.login-logo { grid-area: 1 / 1; width: 132px; height: auto; max-height: 42px; object-fit: contain; }
.login-logo--dark { display: none; }
html[data-theme="dark"] .login-logo--light { display: none; }
html[data-theme="dark"] .login-logo--dark { display: block; }

.login-heading {
  margin: 34px 0 26px;
  text-align: center;
}

.login-heading h1 {
  color: var(--login-text);
  font-size: clamp(28px, 8vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 750;
}

.login-heading p,
.login-help {
  margin: 9px 0 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.45;
}

.login-fields {
  display: grid;
  gap: 16px;
}

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

.login-field > span {
  color: var(--login-text);
  font-size: 13px;
  font-weight: 650;
}

.login-field input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  color: var(--login-text);
  background: var(--login-field);
  border: 1px solid var(--login-line);
  border-radius: 12px;
  outline: none;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out;
}

.login-field input:hover { border-color: #c8cec0; }

.login-field input:focus-visible {
  background: var(--login-card);
  border-color: #7e941e;
  box-shadow: 0 0 0 3px rgba(126, 148, 30, 0.16);
}

.login-error {
  margin: 14px 0 0;
  color: var(--login-danger);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.login-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  color: #171914;
  background: var(--login-lime);
  border: 0;
  border-radius: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 150ms ease-out;
}

.login-submit:hover { background: #bdf52f; }
.login-submit:active { transform: scale(0.985); }
.login-submit:focus-visible { outline: 3px solid rgba(23, 25, 20, 0.28); outline-offset: 3px; }

.login-help { margin-top: 17px; text-align: center; }
.login-help span { color: var(--login-text); font-weight: 650; }

html[data-theme="dark"] .login-page {
  --login-bg: #11130f;
  --login-card: #191c16;
  --login-field: #22261e;
  --login-text: #f1f3eb;
  --login-muted: #9da497;
  --login-line: #343a2f;
  --login-lime: #bdf52f;
  --login-danger: #ff8a80;
}

@media (min-width: 700px) {
  .login-card { padding: 38px 36px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-field input,
  .login-submit { transition: none; }
}
