@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink: #153d32;
  --green: #226952;
  --muted: #607269;
  --line: #d6dfd5;
  --paper: #f8f9f2;
  --lime: #daf598;
  --white: #fff;
  --error: #9f1239;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, #e7f3cd 0, transparent 28rem),
    linear-gradient(145deg, #f8f9f2, #eef3e9);
  font: 16px/1.5 'DM Sans', system-ui, sans-serif;
}

a { color: inherit; }
.auth-header {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.065em;
  text-decoration: none;
}
.wordmark b { color: var(--green); }
.mark {
  position: relative;
  width: 36px;
  height: 36px;
  margin-right: 9px;
  display: grid;
  place-items: center;
  border-radius: 10px 10px 10px 3px;
  color: var(--lime);
  background: var(--ink);
  letter-spacing: 0;
}
.mark i { position: absolute; top: -1px; right: 6px; font-size: 11px; font-style: normal; }
.home-link { color: var(--muted); font-size: 14px; font-weight: 600; text-underline-offset: 4px; }
.home-link:hover { color: var(--ink); }

.auth-main { display: grid; place-items: center; padding: 28px 20px 54px; }
.auth-card {
  width: min(100%, 470px);
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fffffff2;
  box-shadow: 0 24px 70px #173c3020;
}
.auth-intro { margin-bottom: 30px; }
.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(32px, 6vw, 43px); line-height: 1.04; letter-spacing: -.06em; }
.auth-intro p { margin: 14px 0 0; color: var(--muted); }
.alert {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  color: var(--error);
  background: #fff1f2;
  font-size: 14px;
}
.auth-form { display: grid; }
.auth-form label { margin: 17px 0 7px; font-size: 14px; font-weight: 700; }
.auth-form label:first-of-type { margin-top: 0; }
.auth-form label span { float: right; color: var(--muted); font-size: 11px; font-weight: 500; }
.auth-form input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid #bcc9bf;
  border-radius: 11px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.auth-form input:focus { border-color: var(--green); box-shadow: 0 0 0 4px #dceccd; }
.auth-form button {
  min-height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: 100px;
  background: var(--ink);
  color: white;
  font: 700 15px 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: transform .18s, background .18s;
}
.auth-form button:hover { transform: translateY(-1px); background: #265b49; }
.auth-switch { margin: 24px 0 0; color: var(--muted); text-align: center; font-size: 14px; }
.auth-switch a { color: var(--green); font-weight: 700; text-underline-offset: 3px; }
.auth-footer { padding: 0 20px 24px; color: var(--muted); text-align: center; font-size: 12px; }
:focus-visible { outline: 3px solid #83a96d; outline-offset: 3px; }

@media (max-width: 520px) {
  .auth-header { width: calc(100% - 30px); padding-top: 17px; }
  .home-link { font-size: 12px; }
  .auth-main { align-items: start; padding: 18px 15px 38px; }
  .auth-card { padding: 27px 21px; border-radius: 18px; }
  .auth-form label span { display: block; float: none; margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
