:root {
  --ink: #17211c;
  --forest: #183f33;
  --forest-deep: #102e26;
  --mint: #b9f5d5;
  --paper: #f5f3ec;
  --white: #fffefa;
  --line: #d8d9d1;
  --muted: #69736d;
  --error: #b33a32;
  --shadow: 0 24px 70px rgba(19, 47, 38, 0.13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 1.1fr);
}

.context {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 72px);
  color: var(--white);
  background-color: var(--forest);
  background-image: linear-gradient(rgba(185, 245, 213, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(185, 245, 213, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.context::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: 9%;
  width: 54%;
  aspect-ratio: 1;
  border: 1px solid rgba(185, 245, 213, 0.28);
  transform: rotate(45deg);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--forest-deep);
  background: var(--mint);
  font-family: "Newsreader", serif;
  font-size: 22px;
}

.intro { position: relative; z-index: 1; max-width: 520px; }
.eyebrow, .step { margin: 0 0 20px; color: var(--mint); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.intro h1 { margin: 0; max-width: 500px; font-family: "Newsreader", serif; font-size: clamp(48px, 5.2vw, 78px); font-weight: 600; line-height: 0.98; letter-spacing: 0; }
.intro-copy { margin: 28px 0 0; max-width: 410px; color: rgba(255, 254, 250, 0.72); font-size: 17px; line-height: 1.65; }

.environment { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: rgba(255, 254, 250, 0.68); font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(185, 245, 213, 0.11); }

.login-area {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 48px 24px;
  background-color: var(--paper);
  background-image: radial-gradient(#c8cac1 0.65px, transparent 0.65px);
  background-size: 18px 18px;
}

.login-card {
  width: min(100%, 470px);
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid rgba(216, 217, 209, 0.85);
  border-radius: 6px;
  background: var(--white);
  box-shadow: var(--shadow);
  animation: arrive 500ms ease-out both;
}

.card-heading { margin-bottom: 34px; }
.card-heading .step, .success-panel .step { margin-bottom: 12px; color: #527065; }
.card-heading h2, .success-panel h2 { margin: 0; font-family: "Newsreader", serif; font-size: 38px; line-height: 1.1; letter-spacing: 0; }
.card-heading > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.field { margin-bottom: 22px; }
.field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.field input { width: 100%; height: 50px; padding: 0 15px; border: 1px solid var(--line); border-radius: 4px; outline: none; color: var(--ink); background: #fff; transition: border-color 160ms, box-shadow 160ms; }
.field input::placeholder { color: #9a9f9b; }
.field input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(24, 63, 51, 0.1); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-error { display: block; min-height: 18px; padding-top: 5px; color: var(--error); font-size: 12px; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.icon-button { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; }
.icon-button:hover, .icon-button:focus-visible { color: var(--forest); background: #edf2ef; outline: none; }
.icon-button svg { width: 19px; height: 19px; }

.form-message { margin: -2px 0 20px; padding: 12px 14px; border-left: 3px solid var(--error); color: #7c2822; background: #fff0ed; font-size: 13px; line-height: 1.45; }
.submit-button { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 52px; padding: 0 18px; border: 1px solid var(--forest); border-radius: 4px; color: var(--white); background: var(--forest); font-weight: 700; transition: background 160ms, transform 160ms; }
.submit-button:hover { background: var(--forest-deep); }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: 0.7; }
.submit-button svg { width: 19px; height: 19px; }
.test-note { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid #e8e8e2; color: var(--muted); font-size: 12px; line-height: 1.7; }
.test-note strong { color: var(--ink); font-weight: 600; }

.success-panel { width: min(100%, 470px); animation: arrive 400ms ease-out both; }
.success-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 28px; color: var(--forest); background: var(--mint); }
.success-icon svg { width: 25px; height: 25px; }
.success-panel > p:not(.step) { color: var(--muted); }
.text-button { margin-top: 24px; padding: 0 0 5px; border: 0; border-bottom: 1px solid var(--forest); color: var(--forest); background: transparent; font-weight: 700; }

[hidden] { display: none !important; }

@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .context { min-height: 360px; padding: 30px 24px; }
  .context::after { width: 34%; bottom: -20%; }
  .intro h1 { max-width: 600px; font-size: clamp(42px, 11vw, 62px); }
  .intro-copy { margin-top: 16px; }
  .environment { display: none; }
  .login-area { min-height: auto; padding: 42px 18px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}