:root {
  --ink: #14213a;
  --ink-soft: #2b3a5a;
  --accent: #1d9e75;
  --accent-press: #167a5b;
  --paper: #f6f7f9;
  --surface: #ffffff;
  --text: #1a2230;
  --muted: #5a6472;
  --border: #e4e7ec;
  --danger: #a32d2d;
  --danger-bg: #fcebeb;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ---------- Brand panel ---------- */
.brand {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #eaf0fb;
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-head { display: flex; align-items: center; gap: 12px; }

.mark {
  font-size: 30px;
  line-height: 1;
  color: var(--accent);
}

.wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.06em;
}

.brand-body { max-width: 30ch; }

.brand-body h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1.04;
  margin: 0 0 18px;
}

.brand-body p {
  font-size: 16px;
  line-height: 1.65;
  color: #b8c4dc;
  margin: 0;
}

.brand-foot {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #8595b5;
}

/* Signature: a quiet orbit motif evoking the lab, kept low-key. */
.orbit {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  pointer-events: none;
}
.ring {
  position: absolute;
  border: 1px solid rgba(157, 178, 219, 0.18);
  border-radius: 50%;
  inset: 0;
  margin: auto;
}
.r1 { width: 360px; height: 360px; }
.r2 { width: 250px; height: 250px; border-color: rgba(157, 178, 219, 0.24); }
.r3 { width: 150px; height: 150px; border-color: rgba(29, 158, 117, 0.4); }
.node {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(75px, -75px);
}

/* ---------- Auth panel ---------- */
.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.card {
  width: 100%;
  max-width: 380px;
}

.card h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 6px;
  color: var(--ink);
}

.sub { font-size: 14px; color: var(--muted); margin: 0 0 24px; }

.field { display: block; margin-bottom: 16px; }

.lbl {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder { color: #9aa3b2; }

input:hover { border-color: #cbd2dc; }

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.16);
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.captcha-img {
  height: 56px;
  width: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f4f3f0;
}

.icon-btn {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  font-size: 19px;
  line-height: 1;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.4s ease;
}
.icon-btn:hover { background: var(--paper); }
.icon-btn:active { transform: rotate(180deg); }
.icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.16);
}

.btn-primary {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-primary:hover { background: var(--accent-press); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.3);
}
.btn-primary:disabled { opacity: 0.6; cursor: progress; }

.foot { font-size: 13px; color: var(--muted); text-align: center; margin: 16px 0 0; }

.alert {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #f1c9c9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 18px;
}
.alert.success {
  color: #0f6e56;
  background: #e1f5ee;
  border-color: #b7e4d5;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .page { grid-template-columns: 1fr; }
  .brand { padding: 32px 28px; min-height: 230px; }
  .brand-body h1 { font-size: 32px; }
  .orbit { right: -150px; top: -150px; }
}

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