:root {
  --ink: #1b2a4a;
  --muted: #5b6b86;
  --paper: #f3f7fb;
  --card: #fff;
  --line: #d7e2ef;
  --accent: #4f5eff;
  --accent-dark: #3a48e6;
  --ok: #1f7a54;
  --error: #b42318;
  --shadow: 0 24px 60px rgba(27, 42, 74, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Instrument Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.auth-showcase {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0b1f4a 0%, #1a4d9c 52%, #2f9dff 140%);
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 64px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
}
.orb-one {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #7ce7ff 0%, transparent 70%);
  top: -80px;
  right: -40px;
  opacity: 0.7;
}
.orb-two {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #4f5eff 0%, transparent 70%);
  bottom: 80px;
  left: -60px;
  opacity: 0.55;
}

.showcase-copy { position: relative; max-width: 440px; }
.showcase-copy h1 { font-size: 2.4rem; line-height: 1.15; margin: 18px 0 12px; }
.showcase-copy p { color: rgba(255,255,255,0.82); font-size: 1.05rem; }

.brand-lockup, .mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.2rem;
}
.brand-lockup .brand,
.mobile-brand .brand {
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: block;
  height: 32px;
  width: auto;
}
.brand-logo {
  display: block;
  height: 36px;
  width: auto;
}
.brand-word {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
  line-height: 1;
}
.brand-joo { color: var(--ink); }
.brand-meet { color: var(--accent); }
.brand-on-dark .brand-joo { color: #fff; }
.brand-on-dark .brand-meet { color: #c5d2ff; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: min(100%, 420px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.mobile-brand { display: none; margin-bottom: 18px; }
.auth-card h2 { margin: 0 0 6px; font-size: 1.7rem; }
.lead { color: var(--muted); margin: 0 0 24px; }

.auth-form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
input:focus {
  outline: 2px solid rgba(224, 90, 60, 0.35);
  border-color: var(--accent);
}

.password-field { position: relative; }
.password-field input { padding-right: 72px; }
.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.form-row { display: flex; justify-content: flex-end; }
.text-link, .switch-auth a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.switch-auth { text-align: center; color: var(--muted); margin: 20px 0 0; }
.auth-legal {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.auth-legal a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.auth-legal a:hover { color: var(--ink); }

.submit-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #2f9dff, #4f5eff);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.submit-btn:hover { background: linear-gradient(135deg, #1f8aee, #3a48e6); }
.submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.google-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.google-btn:hover {
  background: #f4f8fc;
  border-color: #c9d8ea;
}
.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.form-error {
  margin: 0;
  color: var(--error);
  background: #fdecea;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.required {
  color: var(--error);
  font-weight: 800;
  margin-left: 2px;
}

.field-error {
  margin: 0;
  color: var(--error);
  font-size: 0.8rem;
  font-weight: 500;
}

label.has-error input {
  border-color: var(--error);
}

.form-error.form-ok {
  color: #1f7a54;
  background: #e8f6ee;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  min-height: 68px;
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-showcase { min-height: 220px; padding: 28px 24px; align-items: flex-end; }
  .showcase-copy h1 { font-size: 1.6rem; }
  .mobile-brand { display: flex; }
  .showcase-copy .brand-lockup { display: none; }
}
