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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Nav (used on non-split pages) ── */
.site-nav {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
  gap: 2px;
}
.nav-logo .logo-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #2563EB;
  letter-spacing: -0.3px;
}
.nav-logo .logo-by {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  flex: 1;
}
.nav-links a {
  font-size: 0.9rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: #1e293b; }
.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
#nav-auth-guest,
#nav-auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-signin {
  font-size: 0.9rem;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.15s;
}
.nav-signin:hover { background: #f1f5f9; }
.nav-cta-btn {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: #2563EB;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 7px;
  transition: background 0.15s;
}
.nav-cta-btn:hover { background: #4f46e5; }
.nav-account {
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s;
}
.nav-account:hover { background: #f1f5f9; }
.nav-signout {
  font-size: 0.85rem;
  color: #64748b;
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-signout:hover { background: #f8fafc; color: #1e293b; }

/* ── Card layout (non-split pages: forgot-password, email-confirmed, etc.) ── */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
}
.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Split layout (login, register, complete-profile) ── */
body.auth-split {
  display: block;
  background: #f4f4f6;
}

.auth-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.auth-brand-panel {
  flex: 1;
  min-width: 0;
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #2563EB 100%);
  display: flex;
  flex-direction: column;
  padding: 48px 44px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.brand-logo {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.brand-logo .brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.brand-logo .brand-by {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
}

.brand-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 48px 0;
}
.brand-headline {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 28px;
}
.brand-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brand-bullets li {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}
.brand-bullets li::before {
  content: '✓';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
  text-align: center;
  line-height: 20px;
}
.brand-footnote {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  position: relative;
  z-index: 1;
}

.auth-form-panel {
  flex: none;
  width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 36px;
  background: #f4f4f6;
}

.auth-form-inner {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.auth-form-inner h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #18181b;
  margin-bottom: 6px;
}
.auth-form-inner .auth-sub {
  font-size: 0.875rem;
  color: #52525b;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Icon circle ── */
.auth-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.auth-icon--blue   { background: #EFF6FF; color: #2563EB; }
.auth-icon--green  { background: #f0fdf4; color: #16a34a; }
.auth-icon--red    { background: #fef2f2; color: #dc2626; }
.auth-icon--yellow { background: #fefce8; color: #ca8a04; }

/* ── OAuth buttons ── */
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 10px;
}
.oauth-btn:hover { background: #f8fafc; border-color: #cbd5e1; }

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #94a3b8;
  font-size: 0.8rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* ── Form ── */
.form-group { margin-bottom: 16px; }
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* ── Phone + country code group ── */
.phone-row {
  display: flex;
  gap: 8px;
}
.phone-country-select {
  width: auto;
  flex-shrink: 0;
  padding: 10px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
  cursor: pointer;
}
.phone-number-input {
  flex: 1;
}

/* ── Buttons ── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 12px;
  background: #2563EB;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
  margin-top: 4px;
}
.btn-primary:hover { background: #4f46e5; }
.btn-primary:disabled { background: #a5b4fc; cursor: not-allowed; }

.btn-secondary {
  display: block;
  width: 100%;
  padding: 11px;
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin-top: 8px;
}
.btn-secondary:hover { background: #f1f5f9; color: #1e293b; }

/* ── Messages ── */
.msg {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.5;
}
.msg--error   { background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626; }
.msg--success { background: #f0fdf4; border: 1px solid #86efac; color: #16a34a; }
.msg--info    { background: #EFF6FF; border: 1px solid #a5b4fc; color: #4f46e5; }

/* ── Footer links ── */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: #64748b;
}
.auth-footer a { color: #2563EB; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.auth-terms {
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}
.auth-terms a { color: #64748b; }

/* ── Responsive ── */
@media (max-width: 820px) {
  .auth-layout { flex-direction: column; }

  .auth-brand-panel {
    flex: none;
    min-width: unset;
    padding: 20px 24px;
  }
  .auth-brand-panel .brand-body,
  .auth-brand-panel .brand-footnote,
  .auth-brand-panel::before,
  .auth-brand-panel::after { display: none; }

  .auth-form-panel {
    flex: 1;
    width: 100%;
    padding: 32px 20px 48px;
    background: #f4f4f6;
  }
  .auth-form-inner { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .nav-links  { display: none; }
}
