:root {
  color-scheme: light;
  --ink: #101610;
  --muted: #6d756d;
  --line: rgba(16, 22, 16, 0.13);
  --accent: #bde991;
  --accent-strong: #77b948;
  --surface: rgba(255, 255, 255, 0.9);
  --danger: #b63d32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 16%, rgba(190, 234, 147, 0.64), transparent 34rem),
    radial-gradient(circle at 86% 10%, rgba(246, 218, 169, 0.66), transparent 32rem),
    linear-gradient(145deg, #f4f5ef 0%, #e8ece5 100%);
  font-family: Avenir Next, Futura, Century Gothic, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: linear-gradient(rgba(16, 22, 16, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 22, 16, 0.08) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  position: relative;
  width: min(540px, 100%);
  padding: clamp(28px, 6vw, 54px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 38px;
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(35, 48, 36, 0.18);
  backdrop-filter: blur(24px);
}

.login-card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(189, 233, 145, 0.65), transparent 68%);
  pointer-events: none;
}

.brand-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo { width: 150px; height: auto; }
.brand-meta, .eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-copy { margin: 56px 0 32px; }
.eyebrow { margin: 0 0 12px; }
.login-copy h1 {
  margin: 0;
  font-size: clamp(54px, 12vw, 88px);
  line-height: 0.86;
  letter-spacing: -0.075em;
  font-weight: 800;
}
.login-copy p:last-child { margin: 22px 0 0; color: var(--muted); font-weight: 600; line-height: 1.5; }

#login-form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field > span, .field > label { color: var(--muted); font-size: 13px; font-weight: 800; }
.field-control { position: relative; }
.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.field input:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 4px rgba(119, 185, 72, 0.15); transform: translateY(-1px); }
.field input[readonly] {
  padding-right: 102px;
  color: var(--muted);
  background: rgba(238, 241, 235, 0.82);
}
.switch-user {
  position: absolute;
  top: 50%;
  right: 16px;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(119, 185, 72, 0.14);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-50%);
}
.switch-user:hover { background: rgba(119, 185, 72, 0.24); }
.is-hidden { display: none; }

.login-error { min-height: 20px; color: var(--danger); font-size: 14px; font-weight: 700; }

#login-submit {
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(16, 22, 16, 0.2);
  transition: transform 160ms ease, opacity 160ms ease;
}
#login-submit:hover { transform: translateY(-2px); }
#login-submit:disabled { cursor: wait; opacity: 0.72; transform: none; }

.button-progress { display: none; width: 18px; height: 18px; margin: auto; border: 2px solid rgba(255, 255, 255, 0.32); border-top-color: white; border-radius: 50%; animation: spin 700ms linear infinite; }
#login-submit.is-busy .button-label { display: none; }
#login-submit.is-busy .button-progress { display: block; }

.security-note { margin: 24px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; }

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

@media (max-width: 560px) {
  .login-shell { padding: 14px; }
  .login-card { border-radius: 28px; }
  .brand-logo { width: 128px; }
  .brand-meta { display: none; }
  .login-copy { margin-top: 44px; }
}

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