.login-page,
.register-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

/* Auth Card -- overlaps hero */
.card {
  background: white;
  border: 1px solid #eef0f4;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card-body {
  padding: 32px;
}

.card-body form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 2px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-family: inherit;
  color: #111827;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(193, 86, 50, 0.12);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.error-message {
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 2px;
}

/* Alert messages */
.alert-error {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: var(--font-base);
  font-weight: 500;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  margin-bottom: 16px;
}

.alert-success {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: var(--font-base);
  font-weight: 500;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  margin-bottom: 16px;
}

/* Auth links */
.links {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 16px;
}

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

.links a:hover {
  color: #c05432;
  text-decoration: underline;
}

/* Password requirements */
.password-requirements {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.password-requirements ul {
  margin: 0;
  padding-left: 18px;
}

.password-requirements li {
  margin-bottom: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .login-page,
  .register-page {
    padding: 0 16px 40px;
  }

  .card-body {
    padding: 24px 20px;
  }
}
.page-hero {
  position: relative;
  text-align: center;
  padding: 64px 20px;
  color: white;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--brand-dark);
  z-index: 0;
}
.page-hero-content {
  position: relative;
  z-index: 2;
}
.page-hero-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.page-hero-content p {
  font-size: var(--font-lg);
  opacity: 0.75;
  max-width: 450px;
  margin: 0 auto;
}
.page-hero-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .page-hero {
    padding: 40px 16px;
  }
  .page-hero-content h1 {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }
  .page-hero-content p {
    font-size: 0.95rem;
  }
}
@media (max-width: 480px) {
  .page-hero {
    padding: 32px 12px;
  }
  .page-hero-content h1 {
    font-size: 1.3rem;
  }
}

.header {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  z-index: 160;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  row-gap: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.header-logo:hover {
  opacity: 0.85;
}

.header-logo:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

.header-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.header-site-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: var(--font-lg);
}

.header-nav {
  display: flex;
  gap: 24px;
}

.header-nav a {
  color: #666;
  text-decoration: none;
  font-weight: 500;
}

.header-nav a:hover {
  color: var(--brand-primary);
}

/* ===== Nav Online Link ===== */
.nav-link-online {
  position: relative;
}

.nav-online-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  animation: pulse-green 2s infinite;
}

.nav-online-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  background: #22c55e;
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

@keyframes pulse-green {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* ===== Unread Badge ===== */
.nav-conversations {
  position: relative;
}

.unread-badge {
  display: none;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  border-radius: var(--radius-lg);
  vertical-align: super;
  margin-left: 2px;
  animation: badgePopIn 0.3s ease;
}

.unread-badge.has-unread {
  display: inline-block;
}

@keyframes badgePopIn {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
/* ===== Fav / Admin Badges ===== */
.fav-badge {
  display: none;
  position: absolute;
  top: -6px;
  right: -10px;
  background: #e53935;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: var(--radius-md);
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(229, 57, 53, 0.3);
}

.fav-badge.has-fav {
  display: block;
  animation: pulse-badge 2s infinite;
}

.admin-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #e53935;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: var(--radius-md);
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(229, 57, 53, 0.3);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
/* ===== Header Search ===== */
.header-search {
  display: flex;
  align-items: center;
  margin: 0 1rem;
  flex: 1;
  max-width: 420px;
}

.header-search-form {
  display: flex;
  width: 100%;
}

.header-search-input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1.5px solid #e2e5ea;
  border-radius: 10px 0 0 10px;
  font-size: 0.95rem;
  background: #f4f5f7;
  transition: var(--transition-normal);
  min-width: 0;
  font-family: 'Inter', sans-serif;
}

.header-search-input::placeholder {
  color: #aab0bc;
  font-weight: 400;
}

.header-search-input:focus {
  border-color: var(--brand-primary);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 96, 58, 0.12);
}

.header-search-btn {
  padding: 0.6rem 1rem;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition: var(--transition-fast);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.header-search-btn:hover {
  background: var(--brand-secondary);
}

/* ===== Nav Dropdown ===== */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  color: #666;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-toggle:hover {
  color: var(--brand-primary);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 6px;
  min-width: 170px;
  z-index: 1000;
  white-space: nowrap;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu .nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  text-decoration: none;
  color: #444;
  transition: background 0.12s;
}

.dropdown-menu .nav-link:hover {
  background: #f0f2ff;
  color: var(--brand-primary);
}

.dropdown-menu .nav-link .fav-badge {
  display: none;
  position: static;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  font-size: 0.65rem;
  line-height: 18px;
  vertical-align: middle;
}

.dropdown-menu .nav-link .fav-badge.has-fav {
  display: inline-flex;
}

.dropdown-menu .nav-link .admin-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  font-size: 0.65rem;
  line-height: 18px;
  vertical-align: middle;
  animation: none;
}

.dropdown-menu .nav-link .unread-badge.has-unread {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  font-size: 0.65rem;
  line-height: 18px;
  vertical-align: middle;
}

.nav-admin {
  position: relative;
}

/* ===== Hamburger Menu Button ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.2s;
  z-index: 210;
  position: relative;
}

.hamburger:hover {
  background: rgba(0, 0, 0, 0.05);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #666;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger span + span {
  margin-top: 5px;
}

/* Hamburger -> X animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Mobile Nav Drawer & Backdrop ===== */
.nav-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   Responsive: Tablet & Mobile
   ============================================ */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .header-container {
    row-gap: var(--gap-md);
  }

  .header-search {
    max-width: 100%;
    margin: 0.5rem 0;
    width: 100%;
    order: 3;
  }

  .header-search-input {
    font-size: 1rem;
    padding: 0.65rem 0.85rem;
  }

  .header-search-btn {
    font-size: 1rem;
    padding: 0.65rem 0.85rem;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: white;
    flex-direction: column;
    padding: 80px 24px 32px;
    gap: 4px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .header-nav.mobile-open {
    right: 0;
  }

  .header-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: #444;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
  }

  .header-nav .nav-link:hover {
    background: #f0f2ff;
    color: var(--brand-primary);
  }

  .header-nav .nav-link:active {
    background: #e0e3ff;
  }

  /* Badges inside mobile nav links */
  .header-nav .nav-link .fav-badge {
    display: none;
    position: static;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    min-width: 22px;
    height: 22px;
    font-size: 0.7rem;
    line-height: 22px;
    vertical-align: middle;
  }

  .header-nav .nav-link .fav-badge.has-fav {
    display: inline-flex;
  }

  .header-nav .nav-link .admin-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    min-width: 22px;
    height: 22px;
    font-size: 0.7rem;
    line-height: 22px;
    vertical-align: middle;
  }

  .header-nav .nav-link .unread-badge.has-unread {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    min-width: 22px;
    height: 22px;
    font-size: 0.7rem;
    line-height: 22px;
    vertical-align: middle;
  }

  /* Flatten dropdowns on mobile */
  .nav-dropdown {
    border-top: 1px solid #f0f0f0;
    margin-top: 6px;
    padding-top: 4px;
  }

  .nav-dropdown > .dropdown-toggle {
    padding: 10px 16px 6px;
    font-size: var(--font-xs);
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: default;
    pointer-events: none;
    border-radius: 0;
  }

  .nav-dropdown > .dropdown-menu {
    display: block !important;
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 0 0 16px !important;
    min-width: auto !important;
    background: transparent !important;
    white-space: normal !important;
  }

  .dropdown-menu .nav-link {
    padding: 10px 16px;
    font-size: var(--font-base);
  }
}
@media (max-width: 480px) {
  .header-container {
    padding: 10px 12px;
    gap: 4px;
  }

  .header-logo {
    font-size: 1rem;
    gap: 4px;
    max-width: 60%;
  }

  .header-logo img {
    height: 22px;
  }

  .header-site-name {
    max-width: 80px;
    font-size: 1rem;
  }

  .hamburger {
    width: 32px;
    height: 32px;
    padding: 5px;
  }

  .hamburger span {
    width: 18px;
  }

  .hamburger span + span {
    margin-top: 4px;
  }

  /* Hamburger -> X animation */
  .hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .header-search {
    margin: 0.3rem 0;
  }

  .header-search-input {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-base);
  }

  .header-search-btn {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-base);
  }

  .header-nav {
    width: 100vw;
    max-width: 100%;
    right: -100%;
    padding: 60px 12px 20px;
    gap: 2px;
  }

  .header-nav.mobile-open {
    right: 0;
  }

  .header-nav .nav-link {
    padding: 10px 12px;
    font-size: var(--font-base);
  }
}
.verify-banner {
  background: #fff3cd;
  border-bottom: 1px solid #ffc107;
  padding: 0.5rem 1rem;
}

.verify-banner-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.verify-banner-content span {
  font-size: var(--font-sm);
  color: #856404;
}

.verify-banner-content a {
  color: #856404;
  font-weight: 600;
  text-decoration: underline;
}

.verify-banner-close {
  background: none;
  border: none;
  color: #856404;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  opacity: 0.6;
}

.verify-banner-close:hover {
  opacity: 1;
}

.footer {
  background: var(--gray-900);
  color: #e5e7eb;
  padding: 0;
  flex-shrink: 0;
  width: 100%;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: var(--font-base);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: #d1d5db;
  text-decoration: none;
  font-size: var(--font-base);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.footer-bottom p {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.footer-trust {
  display: flex;
  gap: var(--gap-lg);
}

.footer-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-xs);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 40px 0 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--gap-lg);
    text-align: center;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
