/* ── Reset & Tokens ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Premium Dark Amber / Charcoal Palette — matches the landing page */
  --bg:        #0E0C0B;
  --surface-1: #161210;
  --surface-2: #1E1A17;
  --surface-3: #2A2420;
  --surface-4: #3A322C;
  --text-primary:  #F5F0EB;
  --text-secondary:#B8AFA8;
  --text-muted:    #7A6F68;
  --amber:  #C4956A;
  --amber-dim: rgba(196,149,106,0.12);
  --amber-glow: rgba(196,149,106,0.06);
  --white: #F2EDE8;
  --border: rgba(196,149,106,0.15);
  --border-soft: rgba(242,237,232,0.07);

  --font-heading: 'Instrument Serif', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius: 14px;
  --radius-lg: 24px;
}

/* ── Page ───────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* Noise Texture overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none; z-index: 9999;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  /* Premium amber grid background — matches landing page */
  background-color: #0E0C0B;
  background-image:
    /* Amber-tinted grid lines */
    linear-gradient(rgba(196,149,106,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,149,106,0.10) 1px, transparent 1px),
    /* Radial warm glow in top-left */
    radial-gradient(ellipse 55% 50% at 0% 0%, rgba(196,149,106,0.07) 0%, transparent 70%),
    /* Radial warm glow in bottom-right */
    radial-gradient(ellipse 50% 45% at 100% 100%, rgba(196,149,106,0.05) 0%, transparent 70%);
  background-size: 72px 72px, 72px 72px, 100% 100%, 100% 100%;
}

/* Ambient glowing orbs (Page level) */
.page-dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: dotPulse 3s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* ── Card ───────────────────────────────────────────── */
.card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1000px;
  width: 100%;
  min-height: 640px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  position: relative;
  z-index: 10;
  transition: transform 0.1s ease-out;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ── Left Panel ─────────────────────────────────────── */
.left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.5rem 3rem 3rem;
  background: var(--surface-1);
  overflow: hidden;
  color: var(--text-primary);
}

.grid-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(196,149,106,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,149,106,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black, transparent 90%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 0;
}
.glow-orb-1 {
  width: 300px; height: 300px;
  background: rgba(196,149,106,0.08);
  bottom: -50px; left: -50px;
}
.glow-orb-2 {
  width: 250px; height: 250px;
  background: rgba(196,149,106,0.04);
  top: -50px; right: -50px;
}

.left-top, .left-bottom { position: relative; z-index: 2; }

.logo-img {
  width: 160px;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 10px rgba(196,149,106,0.2));
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 1rem;
}

.headline {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.headline em {
  font-style: italic;
  color: var(--amber);
}

.subtext {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 320px;
}

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2rem; }
.pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--surface-3);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pill-accent {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber);
}

.left-footer {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2rem;
}

/* ── Right Panel (Professional White) ────────────────── */
.right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
  background: #FFFFFF;
  color: #0E0C0B;
  position: relative;
}

.tabs {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #EAEAEA;
}
.tab {
  all: unset;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: #999999;
  padding-bottom: 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.3s ease;
}
.tab.active {
  color: #0E0C0B;
  border-bottom-color: var(--amber);
}

.panel { display: none; }
.panel.active { display: block; animation: panelFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes panelFadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.field-group { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 1.5rem; }
.field label, .label-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #555555;
  margin-bottom: 0;
}

/* Label row: label on left, forgot link on right */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.label-row label { margin-bottom: 0; }

.forgot-link {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.forgot-link:hover { opacity: 0.7; text-decoration: underline; }

.field input {
  width: 100%;
  height: 48px;
  border: 1px solid #EAEAEA;
  border-radius: 10px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #0E0C0B;
  background: #F9F9F9;
  outline: none;
  transition: all 0.25s ease;
}
.field input:focus {
  border-color: var(--amber);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(196,149,106,0.1);
}
.field input.error {
  border-color: #FF4D4D;
  background: #FFF5F5;
}

.field-error {
  font-size: 11px;
  color: #FF4D4D;
  margin-top: 5px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #666666;
  margin: 1.5rem 0;
  cursor: pointer;
}
.checkbox-label input { accent-color: var(--amber); width: 16px; height: 16px; }

.btn-primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn-primary .arrow { transition: transform 0.3s ease; }
.btn-primary:hover .arrow { transform: translateX(5px); }

.btn-dark {
  background: #0E0C0B;
  color: #FFFFFF;
}
.btn-dark:hover {
  background: #2A2420;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-purple {
  background: var(--amber);
  color: #0E0C0B;
}
.btn-purple:hover {
  background: #D4A57A;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(196,149,106,0.3);
}

.divider {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 1.5rem 0;
  color: #CCCCCC;
  font-size: 12px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #EAEAEA; }

.btn-google {
  width: 100%;
  height: 48px;
  border: 1px solid #EAEAEA;
  border-radius: 10px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: #0E0C0B;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-google:hover {
  background: #F9F9F9;
  border-color: #DDDDDD;
  transform: translateY(-1px);
}

.switch-prompt {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 13px;
  color: #666666;
}
.switch-prompt a { color: var(--amber); font-weight: 600; text-decoration: none; }
.switch-prompt a:hover { text-decoration: underline; }

/* ── Toast Notifications ────────────────────────────── */
.toast-container {
  position: fixed; top: 2rem; right: 2rem; z-index: 10000;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px; border-radius: 12px;
  background: #0E0C0B; color: #FFFFFF;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border: 1px solid rgba(196,149,106,0.2);
  animation: toastIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }

/* ── Modal Overlay ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card {
  background: #FFFFFF; padding: 3rem; border-radius: var(--radius-lg);
  max-width: 440px; width: 100%; position: relative;
  transform: translateY(30px); transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal-card { transform: translateY(0); }
.modal-title { font-family: var(--font-heading); font-size: 24px; color: #0E0C0B; margin-bottom: 10px; }
.modal-desc { font-size: 14px; color: #666666; line-height: 1.6; margin-bottom: 2rem; }
.modal-close { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 24px; cursor: pointer; color: #999999; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 850px) {
  .card { grid-template-columns: 1fr; max-width: 480px; min-height: auto; }
  .left { padding: 3rem 2rem; }
  .right { padding: 3rem 2rem; }
  .headline { font-size: 2.8rem; }
}

/* ── Professional Effects ── */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateY(-50%) skewX(-25deg);
  transition: 0.5s;
}
.btn-primary:hover::before { left: 200%; }

.field input:hover { border-color: #CCCCCC; }

/* Success State */
.success-view { text-align: center; padding: 2rem 0; }
.success-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--amber-dim); color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem; border: 1px solid var(--amber);
}
.success-heading { font-family: var(--font-heading); font-size: 26px; color: #0E0C0B; margin-bottom: 8px; }
