:root {
  --bg: #0A1628;
  --surface: #0F1E35;
  --surface-raised: #152540;
  --accent: #00C9A7;
  --accent-dark: #009E84;
  --text: #FFFFFF;
  --muted: #8A9BB0;
  --subtle: #4A5A6B;
  --display: 'Clash Display', system-ui, sans-serif;
  --body: 'Satoshi', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; -webkit-user-drag: none; user-select: none; pointer-events: none; }
a img, button img { pointer-events: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
::selection { background: var(--accent); color: var(--bg); }

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* LEFT — visual */
.auth-visual {
  position: relative;
  overflow: hidden;
  background-image: url('images/hero.png');
  background-size: cover;
  background-position: center;
}
.auth-visual::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(160deg, rgba(10,22,40,0.55) 0%, rgba(10,22,40,0.85) 100%),
    radial-gradient(ellipse at 30% 70%, rgba(0,201,167,0.18), transparent 60%);
}
.auth-visual-inner {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 48px;
}
.auth-logo img { width: 130px; }
.auth-quote { max-width: 440px; }
.auth-quote .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.auth-quote .eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--accent); }
.auth-quote h2 {
  font-size: clamp(32px, 3.4vw, 48px);
  margin-bottom: 16px;
}
.auth-quote p { color: rgba(255,255,255,0.7); font-size: 16px; }

/* RIGHT — form */
.auth-panel {
  display: flex; flex-direction: column;
  padding: 48px 56px;
  background: var(--bg);
  position: relative;
}
.auth-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 80px;
}
.auth-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color 0.3s ease;
}
.auth-back:hover { color: var(--text); }
.auth-back svg { width: 14px; height: 14px; }
.auth-switch {
  font-size: 14px; color: var(--muted);
}
.auth-switch a { color: var(--accent); font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

.auth-form-wrap {
  width: 100%; max-width: 440px;
  margin: auto 0;
}
.auth-form-wrap h1 {
  font-size: clamp(36px, 3.6vw, 52px);
  margin-bottom: 14px;
}
.auth-form-wrap > p.auth-sub {
  color: var(--muted); font-size: 16px; margin-bottom: 40px;
}

/* Role toggle */
.role-toggle {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 6px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  margin-bottom: 32px;
}
.role-toggle button {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  color: var(--muted);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.role-toggle button.is-active {
  background: var(--surface-raised);
  color: var(--text);
}
.role-toggle button .role-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--subtle);
  margin-right: 8px; vertical-align: middle;
  transition: background-color 0.3s ease;
}
.role-toggle button.is-active .role-dot { background: var(--accent); }

/* fields */
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.field { position: relative; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field input {
  width: 100%; padding: 22px 18px 12px;
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.field input:focus { border-color: var(--accent); background: var(--surface-raised); }
.field label {
  position: absolute; left: 19px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
  transition: top 0.25s ease, font-size 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: 10px; font-size: 11px; transform: translateY(0);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
}

.field-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); border-radius: 8px;
  transition: color 0.3s ease, background-color 0.3s ease;
}
.field-toggle:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.field-toggle svg { width: 18px; height: 18px; }

.row-between {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
}
.checkbox { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); cursor: pointer; user-select: none; }
.checkbox input { display: none; }
.checkbox .box {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid rgba(255,255,255,0.18);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.checkbox .box svg { width: 12px; height: 12px; color: var(--bg); opacity: 0; transition: opacity 0.2s ease; }
.checkbox input:checked + .box { background: var(--accent); border-color: var(--accent); }
.checkbox input:checked + .box svg { opacity: 1; }
.row-between a { color: var(--accent); font-weight: 500; }
.row-between a:hover { text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 16px 24px;
  border-radius: 12px;
  font-weight: 600; font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #00DDB8; box-shadow: 0 12px 32px -12px rgba(0,201,167,0.6); }
.btn-primary:active { transform: scale(0.985); }

.divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--subtle); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  margin: 8px 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.06);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-raised); border-color: rgba(255,255,255,0.16); }
.btn-ghost svg { width: 18px; height: 18px; margin-right: 10px; }

.terms {
  font-size: 12px; color: var(--subtle); text-align: center;
  margin-top: 24px; line-height: 1.6;
}
.terms a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(138,155,176,0.3); }
.terms a:hover { color: var(--text); }

/* responsive */
@media (max-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { padding: 32px 24px; }
  .auth-top { margin-bottom: 48px; }
  .auth-form-wrap { margin: 0 auto; }
}
