:root {
  --bg: #080808;
  --panel: #0f0f0f;
  --surface: #161616;
  --surface-2: #1c1c1c;
  --border: rgba(255, 255, 255, 0.08);
  --border-md: rgba(255, 255, 255, 0.13);
  --border-hover: rgba(255, 255, 255, 0.22);
  --accent: #ffffff;
  --accent-inv: #000000;
  --blue: #3b7eff;
  --blue-dim: rgba(59, 126, 255, 0.12);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.12);
  --text-primary: #f5f5f5;
  --text-secondary: #737373;
  --text-muted: #404040;
  --font: "Geist", -apple-system, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --mono: "Geist Mono", monospace;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --r: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
}
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

/* Subtle scan-line texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.012) 2px,
    rgba(255, 255, 255, 0.012) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Layout ── */
.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100vw;
  height: 100vh;
}

/* ── Left panel ── */
.left-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  background: #080808;
}

.left-panel__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  filter: grayscale(100%) contrast(1.1);
}
.left-panel__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(8, 8, 8, 0.5) 0%,
    rgba(8, 8, 8, 0.7) 40%,
    rgba(8, 8, 8, 0.95) 100%
  );
}

/* Grid pattern on left */
.left-panel__grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 1) 1px, transparent 1px);
  background-size: 60px 60px;
}
/* Corner accent lines */
.left-panel__corner {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  z-index: 4;
  width: 40px;
  height: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}
.left-panel__corner-bl {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  z-index: 4;
  width: 40px;
  height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Logo */
.left-logo {
  position: absolute;
  top: 2.5rem;
  left: 2.5rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  animation: fade-up 0.7s var(--ease) 0.1s both;
}
.left-logo__mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.left-logo__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* Slider content */
.slider-content {
  position: relative;
  z-index: 4;
}
.slider-track {
  overflow: hidden;
  height: 90px;
  margin-bottom: 1.5rem;
}
.slide {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
  position: absolute;
  width: 100%;
}
.slide.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}
.slide h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.02em;
}
.slide h2 span {
  color: rgba(255, 255, 255, 0.45);
}
.slide p {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.65;
  max-width: 360px;
}

.slider-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dot {
  height: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition:
    width 0.4s var(--ease),
    background 0.3s;
  width: 18px;
}
.dot.active {
  width: 32px;
  background: #fff;
}

/* Stats row */
.left-stats {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.left-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.left-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  font-family: var(--mono);
}
.left-stat-label {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
}

/* ── Right panel ── */
.right-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--panel);
  overflow-y: auto;
  overflow-x: hidden;
}
.right-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  );
}

.form-container {
  width: 100%;
  max-width: 380px;
  animation: fade-up 0.6s var(--ease) 0.15s both;
}

/* Brand in right */
.form-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2rem;
}
.form-brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.form-brand__mark svg {
  color: #000;
}
.form-brand__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Tabs */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 0.75rem 0.5rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}
.tab-btn.active {
  color: var(--text-primary);
}
.tab-btn::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: #fff;
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
  transform-origin: left;
}
.tab-btn.active::after {
  transform: scaleX(1);
}

/* Tab panels */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
  animation: fade-up 0.35s var(--ease);
}

/* Heading */
.form-heading {
  margin-bottom: 1.75rem;
}
.form-heading h1 {
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}
.form-heading p {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0.78rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s var(--spring);
  margin-bottom: 1.25rem;
}
.btn-google:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.btn-google:active {
  transform: translateY(0);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Field */
.field {
  margin-bottom: 1rem;
  position: relative;
}
.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}
.field:focus-within label {
  color: var(--text-primary);
}
.field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.78rem 1rem;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--text-primary);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  outline: none;
  appearance: none;
}
.field input::placeholder {
  color: var(--text-muted);
}
.field input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.field-pw {
  position: relative;
}
.field-pw input {
  padding-right: 3rem;
}
.pw-toggle {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  padding: 4px;
}
.pw-toggle:hover {
  color: var(--text-secondary);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.field-row .field {
  margin-bottom: 0;
}

/* Meta */
.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  margin-top: -0.15rem;
}
.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}
.checkbox-wrap input[type="checkbox"] {
  display: none;
}
.checkbox-box {
  width: 15px;
  height: 15px;
  border: 1px solid var(--border-md);
  border-radius: 4px;
  background: var(--surface);
  transition:
    border-color 0.2s,
    background 0.2s;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.checkbox-box svg {
  opacity: 0;
  transition: opacity 0.15s;
}
.checkbox-wrap input:checked + .checkbox-box {
  background: #fff;
  border-color: #fff;
}
.checkbox-wrap input:checked + .checkbox-box svg {
  opacity: 1;
}
.checkbox-wrap span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.forgot-link {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-link:hover {
  color: var(--text-primary);
}

/* CTA */
.btn-cta {
  width: 100%;
  padding: 0.85rem 1rem;
  background: #fff;
  border: none;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  cursor: pointer;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s var(--spring),
    box-shadow 0.2s,
    background 0.2s;
  margin-bottom: 1.25rem;
}
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.15);
  background: #f0f0f0;
}
.btn-cta:active {
  transform: translateY(0);
}
.btn-cta svg {
  transition: transform 0.25s var(--spring);
}
.btn-cta:hover svg {
  transform: translateX(3px);
}

/* Footer */
.form-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.form-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.form-footer a:hover {
  color: var(--text-primary);
}

/* Animations */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .left-panel {
    display: none;
  }
  .right-panel {
    padding: 2rem 1.25rem;
  }
}
.right-panel::-webkit-scrollbar {
  width: 4px;
}
.right-panel::-webkit-scrollbar-track {
  background: transparent;
}
.right-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
