@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design Tokens — Matched to Landing Page (index.css) ── */
:root {
  --background:         #EEF0F7;
  --foreground:         #1E1B4B;
  --muted:              #FFFFFF;
  --muted-foreground:   #64748B;
  --border:             #DDE1EE;
  --brand-start:        #4F46E5;
  --brand-end:          #0EA5E9;
  --input-bg:           #F8F9FF;
  --input-hover:        #FFFFFF;
  --border-focus:       #4F46E5;
  --error-bg:           #FEF2F2;
  --error-color:        #DC2626;
  --success-bg:         #F0FDF4;
  --success-color:      #16A34A;
  --font-sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── ANIMATED BACKGROUND ── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}


.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 12s ease-in-out infinite;
}

.orb-1 {
  width: 40rem; height: 40rem;
  top: -10rem; left: -5rem;
  background: radial-gradient(circle, rgba(155, 153, 254, 0.18) 0%, transparent 70%);
  animation-delay: 0s;
}

.orb-2 {
  width: 45rem; height: 45rem;
  bottom: -15rem; right: -10rem;
  background: radial-gradient(circle, rgba(43, 200, 183, 0.15) 0%, transparent 70%);
  animation-delay: -6s;
  animation-direction: reverse;
}

.orb-3 {
  width: 30rem; height: 30rem;
  top: 40%; left: 50%;
  background: radial-gradient(circle, rgba(155, 153, 254, 0.10) 0%, rgba(43, 200, 183, 0.06) 50%, transparent 70%);
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-30px) scale(1.04); }
}

/* ── PAGE LAYOUT ── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* ── MAIN SPLIT CARD ── */
.card {
  width: 100%;
  max-width: 900px;
  display: flex;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 0 0 1px var(--border) inset,
    0 32px 64px rgba(0,0,0,0.4);
  animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── LEFT PANEL (MAP) ── */
.map-panel {
  display: none;
  width: 50%;
  position: relative;
  background: var(--border);
  border-right: 1px solid var(--border);
  overflow: hidden;
  min-height: 580px;
}

.map-canvas-wrap {
  position: absolute;
  inset: 0;
}

.map-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.map-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 2;
  animation: fadeSlideIn 0.6s 0.5s ease both;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.map-logo-circle {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(155, 153, 254, 0.15);
  border: 1px solid rgba(155, 153, 254, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(155,153,254,0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(155,153,254,0); }
}

.map-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.map-title {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  color: var(--foreground);
}

.map-subtitle {
  font-size: 14px;
  color: var(--muted-foreground);
  text-align: center;
  max-width: 260px;
  line-height: 1.5;
}

/* ── MOBILE LOGO (hidden on desktop, shown on mobile) ── */
.mobile-logo {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.mobile-logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(155, 153, 254, 0.15);
  border: 1px solid rgba(155, 153, 254, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
  animation: pulse 3s ease-in-out infinite;
}

.mobile-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.mobile-logo h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--foreground);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.mobile-logo p {
  font-size: 12px;
  color: var(--muted-foreground);
}

/* ── RIGHT PANEL (FORM) ── */
.form-panel {
  width: 100%;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 5px;
  letter-spacing: -0.5px;
}

.form-header p {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

/* ── GOOGLE SIGN-IN BUTTON ── */
.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--foreground);
  font-size: 14px;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.google-btn:hover {
  background: var(--input-hover);
  border-color: var(--border);
}

.google-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── DIVIDER ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  font-size: 12px;
  color: var(--muted-foreground);
  letter-spacing: 0.5px;
}

/* ── FLASH MESSAGES ── */
.flash {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13.5px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.flash.error   { background: var(--error-bg);   color: var(--error-color);   border: 1px solid rgba(239,68,68,0.2); }
.flash.success { background: var(--success-bg); color: var(--success-color); border: 1px solid rgba(52,211,153,0.2); }

/* ── FORM ── */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 8px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

label .req {
  color: var(--brand-start);
  margin-left: 2px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  font-size: 16px;
  pointer-events: none;
  transition: color 0.2s;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 13px 14px 13px 42px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--foreground);
  outline: none;
  transition: all 0.25s ease;
  caret-color: var(--brand-start);
}

input::placeholder {
  color: var(--muted-foreground);
}

input:hover {
  background: var(--input-hover);
  border-color: var(--border);
}

input:focus {
  background: rgba(155, 153, 254, 0.06);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(155,153,254,0.1);
}

input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--brand-start);
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color 0.2s;
  width: auto;
}

.toggle-password:hover {
  color: var(--brand-start);
  background: none;
  box-shadow: none;
}

/* ── SUBMIT BUTTON ── */
button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: var(--foreground);
  color: var(--background);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-family: var(--font-sans);
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button[type="submit"]:hover {
  background: var(--brand-start);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(155,153,254,0.15);
}

button[type="submit"]:active {
  transform: translateY(0);
}

/* loading state */
button[type="submit"].loading {
  pointer-events: none;
  opacity: 0.8;
}

/* ── FORGOT PASSWORD ── */
.forgot-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--brand-start);
}

/* ── FOOTER SECTION ── */
.register-section {
  margin-top: 16px;
}

.register-section .divider {
  margin: 16px 0 14px;
}

.footer-text {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted-foreground);
}

.footer-text a {
  color: var(--brand-start);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-text a:hover {
  color: #b8b6ff;
}

/* ── RESPONSIVE ── */
@media (min-width: 768px) {
  .map-panel {
    display: block;
  }

  .form-panel {
    width: 50%;
    padding: 44px 40px;
  }
}

@media (max-width: 767px) {
  html, body {
    overflow: auto;
  }

  .page {
    padding: 24px 16px;
    min-height: 100vh;
  }

  .mobile-logo {
    display: flex;
  }

  .card {
    max-width: 100%;
    border-radius: 20px;
  }

  .form-panel {
    padding: 28px 22px;
  }

  .form-header {
    text-align: center;
  }

  .form-header h1 {
    font-size: 22px;
  }

  .form-header p {
    margin-bottom: 20px;
  }

  .google-btn {
    padding: 11px;
    font-size: 13px;
  }

  .divider {
    margin: 16px 0;
  }

  .form-group {
    margin-bottom: 14px;
  }

  .register-section {
    margin-top: 12px;
  }

  .forgot-link {
    margin-top: 12px;
  }
}

/* ── Global SVG Sizing & Alignment ── */
svg:not([width="0"]):not([height="0"]) {
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
}

/* ─────────────────────────────────────────────────────────────
   DARK MODE OVERRIDES
───────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --background:         #121212;
  --foreground:         #F8F9FA;
  --muted:              #1e1e1e;
  --muted-foreground:   #A1A1AA;
  --border:             rgba(255, 255, 255, 0.1);
  --input-bg:           #1a1a1a;
  --input-hover:        #252525;
}

[data-theme="dark"] .orb-1 { background: radial-gradient(circle, rgba(79, 70, 229, 0.18) 0%, transparent 70%); }
[data-theme="dark"] .orb-2 { background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, transparent 70%); }
[data-theme="dark"] .orb-3 { background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%); }

[data-theme="dark"] .dot-map-bg {
  background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
}

[data-theme="dark"] .google-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--foreground);
}
[data-theme="dark"] .google-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .input-icon { color: var(--muted-foreground); }
[data-theme="dark"] .btn-toggle-password { color: var(--muted-foreground); }
[data-theme="dark"] .btn-toggle-password:hover { color: var(--foreground); }

[data-theme="dark"] .right-panel {
  background: var(--muted);
  box-shadow: 0 0 24px rgba(0,0,0,0.5);
}
