:root {
  --paper: #FDF8F6;
  --paper-2: #FCF5F2;
  --ink: #35141A;
  --body: #59585E;
  --muted: #9B9795;
  --red: #D75C70;
  --red-deep: #C44A5E;
  --gold: #D8BE78;
  --jade: #6E966E;
  --line: rgba(53, 20, 26, 0.10);
  --serif: Georgia, "Times New Roman", "Noto Serif SC", serif;
  --sans: "Avenir Next", "Helvetica Neue", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 20% 18%, rgba(215, 92, 112, 0.16), transparent 34%),
    radial-gradient(ellipse at 76% 80%, rgba(216, 190, 120, 0.20), transparent 44%),
    radial-gradient(ellipse at 88% 18%, rgba(110, 150, 110, 0.13), transparent 30%),
    linear-gradient(145deg, var(--paper) 0%, var(--paper-2) 70%, #F9ECEE 100%);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -18vh -10vw;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 34%, rgba(215, 92, 112, 0.13) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 62%, rgba(110, 150, 110, 0.12) 0 1px, transparent 2px),
    repeating-linear-gradient(90deg, rgba(53,20,26,0.040) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(53,20,26,0.028) 0 1px, transparent 1px 42px);
  background-size: 132px 132px, 156px 156px, auto, auto;
  transform: rotate(-3deg);
}

body::after {
  content: "DATA  SCIENCE  MODEL  VECTOR  SIGNAL  DDDD";
  position: fixed;
  left: -8vw;
  right: -8vw;
  bottom: 12vh;
  z-index: -1;
  color: rgba(53, 20, 26, 0.10);
  font-size: 10px;
  letter-spacing: 0.28em;
  white-space: nowrap;
  transform: rotate(-8deg);
}

a { color: inherit; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 34px clamp(22px, 4vw, 58px);
}

.auth-head,
.auth-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--red-deep);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-mark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  font-weight: 700;
}

.auth-mark::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1px solid var(--ink);
  background: var(--red);
  box-shadow: 6px 6px 0 var(--gold);
}

.brand-inline {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.lab-inline {
  color: var(--red-deep);
  letter-spacing: 0.04em;
  text-transform: none;
}

.auth-main {
  align-self: center;
  width: min(100%, 980px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(34px, 7vw, 96px);
  align-items: center;
  padding: 8vh 0;
}

.auth-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 500;
}

.auth-subtitle {
  margin: 20px 0 0;
  max-width: 520px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.9;
}

.auth-creed {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.auth-creed span {
  padding: 6px 11px;
  border: 1px solid rgba(215, 92, 112, 0.18);
  background: rgba(255, 255, 255, 0.52);
}

.auth-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 32px 94px rgba(215, 92, 112, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  padding: clamp(22px, 4vw, 34px);
}

.auth-panel h2 {
  margin: 0;
  font-size: 22px;
  color: var(--ink);
}

.auth-panel p {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.field span {
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(53, 20, 26, 0.14);
  background: rgba(253, 248, 246, 0.72);
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
  outline: none;
}

.field input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(215, 92, 112, 0.12);
}

.submit {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--red-deep);
  border-radius: 999px;
  background: var(--red-deep);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(215, 92, 112, 0.22);
}

.switch {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.switch a {
  color: var(--red-deep);
  font-weight: 700;
  text-decoration: none;
}

.message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.message[data-tone="success"] { color: var(--jade); }
.message[data-tone="error"] { color: var(--red-deep); }

.back {
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 820px) {
  .auth-shell { padding: 24px 18px; }
  .auth-head { flex-wrap: wrap; }
  .auth-main {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 7vh 0 5vh;
  }
  .auth-foot { flex-direction: column; font-size: 10px; }
}
