:root {
  --bg: #f5f4f0; --bg2: #edecea; --ink: #1a1916; --ink2: #6b6860; --ink3: #a8a59f;
  --accent: #2d5be3; --accent-light: #eef1fd; --accent-dark: #1a3db8;
  --green: #16a34a; --green-light: #dcfce7;
  --border: #dddbd6; --border2: #e8e6e1; --white: #ffffff;
  --red: #dc2626; --red-light: #fee2e2;
  --shadow: 0 1px 3px rgba(26,25,22,0.06), 0 4px 16px rgba(26,25,22,0.04);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Instrument Sans', sans-serif;
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  -webkit-font-smoothing: antialiased;
}

/* LEFT PANEL */
.left-panel {
  background: var(--ink); color: var(--bg);
  padding: 48px; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden;
}
.left-panel::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(45,91,227,0.25) 0%, transparent 60%);
  pointer-events: none;
}
.left-logo { display: flex; align-items: center; gap: 10px; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 20px; position: relative; z-index: 1; }
.left-logo-mark { width: 32px; height: 32px; background: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; }

.left-content { position: relative; z-index: 1; }
.left-content h2 { font-family: 'Syne', sans-serif; font-size: 38px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 20px; }
.left-content p { font-size: 15px; color: rgba(245,244,240,0.6); line-height: 1.7; max-width: 360px; margin-bottom: 40px; }

.left-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-box { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 20px; }
.stat-val { font-family: 'Syne', sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -1px; margin-bottom: 4px; }
.stat-val span { color: var(--accent); }
.stat-lbl { font-size: 12px; color: rgba(245,244,240,0.5); font-family: 'JetBrains Mono', monospace; }

.left-quote { position: relative; z-index: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 20px 24px; }
.quote-text { font-size: 14px; color: rgba(245,244,240,0.8); line-height: 1.6; font-style: italic; margin-bottom: 14px; }
.quote-author { font-size: 12px; color: rgba(245,244,240,0.4); font-family: 'JetBrains Mono', monospace; }

/* RIGHT PANEL */
.right-panel {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px;
}
.auth-box { width: 100%; max-width: 400px; }

.auth-tabs { display: flex; background: var(--bg2); border-radius: 10px; padding: 4px; margin-bottom: 32px; }
.tab-btn {
  flex: 1; padding: 10px; border: none; background: transparent;
  font-family: 'Instrument Sans', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--ink2); border-radius: 7px; cursor: pointer; transition: all 0.15s;
}
.tab-btn.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-title { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -0.8px; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: var(--ink2); margin-bottom: 28px; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--white);
  font-family: 'Instrument Sans', sans-serif; font-size: 14px; color: var(--ink);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,91,227,0.1); }
.form-input::placeholder { color: var(--ink3); }
.form-input.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,0.08); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-submit {
  width: 100%; padding: 13px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  font-family: 'Instrument Sans', sans-serif; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.15s; margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-submit:hover { background: #2d2b27; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(26,25,22,0.2); }
.btn-submit:disabled { opacity: 0.5; transform: none; box-shadow: none; cursor: not-allowed; }

.btn-google {
  width: 100%; padding: 11px; border-radius: 10px;
  background: var(--white); color: var(--ink);
  font-family: 'Instrument Sans', sans-serif; font-size: 14px; font-weight: 500;
  border: 1px solid var(--border); cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 20px;
}
.btn-google:hover { background: var(--bg2); border-color: var(--ink2); }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 12px; color: var(--ink3); font-family: 'JetBrains Mono', monospace; }

.error-msg {
  background: var(--red-light); border: 1px solid rgba(220,38,38,0.2);
  color: var(--red); border-radius: 8px; padding: 10px 14px;
  font-size: 13px; margin-bottom: 16px; display: none;
}
.error-msg.show { display: block; }

.success-msg {
  background: var(--green-light); border: 1px solid rgba(22,163,74,0.2);
  color: var(--green); border-radius: 8px; padding: 10px 14px;
  font-size: 13px; margin-bottom: 16px; display: none;
  align-items: center; gap: 8px;
}
.success-msg.show { display: flex; }

.form-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--ink3); }
.form-footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
.form-footer a:hover { text-decoration: underline; }

.password-hint { font-size: 11px; color: var(--ink3); margin-top: 5px; font-family: 'JetBrains Mono', monospace; }

.spinner-sm {
  width: 16px; height: 16px;
  border: 2px solid rgba(245,244,240,0.3);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-submit.loading .spinner-sm { display: block; }
.btn-submit.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.back-link { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink3); text-decoration: none; margin-bottom: 32px; transition: color 0.15s; }
.back-link:hover { color: var(--ink); }

@media (max-width: 768px) {
  body { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .right-panel { padding: 32px 24px; }
}