/* ── 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 ── */
.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: 700;
  color: #1e293b;
  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: #1d4ed8; }
.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; }

/* ── Auth card layout ── */
.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;
}

/* ── 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"] {
  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;
}
input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.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: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }

/* ── 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 #93c5fd; color: #1d4ed8; }

/* ── 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: 480px) {
  .auth-card { padding: 28px 20px; }
  .nav-links  { display: none; }
}
