/* Warm, romantic dating-app palette (2026-09-13 redesign) - replaces the
   previous neutral-gray/muted-maroon scheme, which read more like a
   generic SaaS admin tool than a relationship platform. Coral/rose is the
   established visual language of this category (Hinge, Bumble, Coffee
   Meets Bagel all skew warm pink/coral), applied here via CSS variables
   so every page sharing this stylesheet inherits it automatically -
   landing.html additionally mirrors the same hues in its own local
   --lp-* variables (it has a separate inline <style> block) so the
   marketing page and the app feel like one product, not two. */
:root {
  --bg: #fff9f7;
  --card: #ffffff;
  --border: #f3dee1;
  --text: #2b1620;
  --muted: #8a6b70;
  --accent: #ff4d6d;
  --accent-dark: #d6335a;
  --accent-soft: #ffe3ea;
  --danger: #d6455a;
  --ok: #2f9e6e;
  --shadow: 0 2px 14px rgba(120, 30, 60, 0.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 24px 10px 6px;
  background: #351421;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.nav-links { display: flex; align-items: center; gap: 18px; flex: 1; }
.nav-mobile-only { display: none; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

/* Mobile: links collapse behind the top-right hamburger into a pull-down
   panel, like most mobile apps - see app.js's renderNav for the toggle. */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #351421;
    padding: 10px;
    border-radius: 0 0 0 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-mobile-only { display: block; order: -1; }
  .nav-links a { padding: 10px 8px; border-radius: 6px; }
  .nav-links a:hover, .nav-links a.active { background: rgba(255, 255, 255, 0.08); }
  .nav-spacer { display: none; }
  .nav-cta, .nav-cta-disabled { text-align: center; }
  .nav-email { padding: 6px 8px; }
}

nav a {
  color: #cfcfcf;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}

nav a.active, nav a:hover { color: #fff; }

.nav-cta { background: var(--accent); color: #fff !important; padding: 8px 16px; border-radius: 6px; font-weight: 600; }
.nav-cta:hover { background: var(--accent-dark); color: #fff !important; }
.nav-cta-disabled { background: #565656; color: #cfcfcf !important; cursor: not-allowed; }
.nav-cta-disabled:hover { background: #565656; }

.nav-brand { font-weight: 700; color: var(--accent-dark); letter-spacing: 0.5px; }
.nav-text-logo { color: #fff; font-size: 17px; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; }

/* Standalone logo lockup for pages with no persistent nav bar (login,
   under-construction) - the logo image (saathiforever_logo.jpeg) is itself
   rendered on a dark backdrop, so this just gives it a seamless black
   frame instead of sitting oddly on the page's white background. */
.logo-block { display: inline-block; background: #2c2c2e; padding: 14px 20px; border-radius: 10px; }
.logo-block img { display: block; height: 52px; }
.nav-badge {
  display: inline-block; background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 999px; margin-left: 5px;
}
.nav-spacer { flex: 1; }
.nav-email { color: #9a9a9a; font-size: 13px; }

main {
  max-width: 720px;
  margin: 32px auto;
  padding: 0 20px;
}

.center-page {
  max-width: 380px;
  margin: 80px auto;
  padding: 0 20px;
}

h1 { font-size: 22px; margin-bottom: 4px; }
h2 { font-size: 17px; margin-top: 28px; }
p.subtitle { color: var(--muted); margin-top: 0; margin-bottom: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 4px;
}

input, textarea, select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

textarea { min-height: 70px; resize: vertical; }

.avatar {
  /* 4:5 rectangle (2026-09-12, was a 50% circle) - profile photos are now
     cropped by the user to a deliberate 4:5 frame at upload time (see
     profile-photo.html's crop step), and re-cropping that into a circle
     everywhere it's displayed would cut off part of a composition the
     user already chose - so every avatar spot keeps the same aspect
     ratio the source photo was actually cropped to. */
  width: 40px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  /* Black outline (2026-09-18, explicit product request - "stand out")
     so a photo doesn't blend into the page background next to other
     avatars, e.g. in a match list. box-sizing keeps this from pushing the
     rendered image size past the width/height above. */
  border: 2px solid #000;
  box-sizing: border-box;
}

.gallery-item { position: relative; width: 90px; height: 90px; border-radius: 8px; overflow: hidden; background: #eee; cursor: pointer; }
.gallery-item img, .gallery-item video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.lightbox-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  z-index: 1000; align-items: center; justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-content { max-width: 90vw; max-height: 90vh; }
.lightbox-content img, .lightbox-content video { max-width: 90vw; max-height: 90vh; border-radius: 6px; }
.lightbox-close {
  position: absolute; top: 16px; right: 24px; background: none; border: none;
  color: white; font-size: 32px; cursor: pointer; line-height: 1; padding: 4px 10px;
}

.preview-banner {
  background: #fff4d6; border: 1px solid #e8c874; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 14px;
}

/* Moved here from help.html's own <style> block (2026-09-13) - now also
   used by matches.html's "how to read these scores" note, so it needs to
   be a shared class rather than duplicated per-page. */
.help-note {
  background: #fbf3f5; border: 1px solid #edd; border-radius: 8px; padding: 12px 14px;
  font-size: 13px; color: var(--muted); margin-top: 10px;
}

.top-match-badge {
  display: inline-block; background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px;
  vertical-align: middle;
}

.top-match-card {
  border: 2px solid var(--ok); border-radius: 14px;
}

.gallery-item .remove-btn {
  position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,0.6); color: white;
  border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; line-height: 1;
  cursor: pointer; padding: 0;
}

/* Magnify button on the main profile photo (see view-profile.html and
   admin-view-profile.html) - opens the same lightbox the gallery uses
   (app.js's openImageLightbox), just for the single profile photo rather
   than a gallery media ID. */
.photo-magnify-btn {
  position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,0.55); color: white;
  border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 14px; line-height: 1;
  cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center;
}
.photo-magnify-btn:hover { background: rgba(0,0,0,0.75); }

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 18px;
}

button, .btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

button:hover, .btn:hover { background: var(--accent-dark); }
button.secondary { background: #efefef; color: var(--text); }
button.secondary:hover { background: #e2e2e2; }
button:disabled { opacity: 0.5; cursor: default; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.error { color: var(--danger); font-size: 13px; margin-top: 10px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.tag { display: inline-block; background: #f1e4e8; color: var(--accent-dark); font-size: 11px; padding: 2px 8px; border-radius: 999px; margin: 2px 4px 2px 0; }
/* "Who's online now" (2026-09-20) - a distinct green so it reads as a
   live-status signal, not another compatibility/verification badge, even
   though it reuses .tag's shape. The bullet is inline text (like the
   Verified checkmark above), not a ::before dot, so it survives being
   copied/read by a screen reader the same way. */
.tag-online { background: #e3f6e8; color: #1b8a3e; }

.match-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.match-card .scores { font-size: 13px; color: var(--muted); }
/* Photo + Message/View button stacked together (2026-09-18, same
   "buttons drifted away from the person they apply to" fix as
   .swipe-actions) - previously the button sat on the card as a whole,
   vertically centered against the whole card's height, which drifted far
   from the photo once the score-breakdown text grew past a few lines. */
.match-photo-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.match-photo-col .btn, .match-photo-col button { width: 200px; text-align: center; box-sizing: border-box; }
/* Matches the main profile page's photo size (view-profile.html, 200x250)
   (2026-09-18, explicit product request - list cards looked noticeably
   smaller than the profile page itself). font-size scaled up to match so
   a fallback initial still fills the larger box proportionally. */
.match-card .avatar, .match-card .avatar-fallback { width: 200px; height: 250px; font-size: 84px; }

/* Swipe gesture (2026-09-18) - see app.js's enableSwipeGesture. The stamp
   overlay fades in as the user drags past a small threshold; swipe-hint is
   a small always-visible label under the photo so the gesture is
   discoverable, not just something you stumble into. */
.swipe-photo-wrap { position: relative; }
.swipe-stamp {
  position: absolute; top: 14px; font-weight: 800; font-size: 20px;
  padding: 5px 12px; border-radius: 6px; border: 3px solid; opacity: 0;
  pointer-events: none; text-transform: uppercase; letter-spacing: 1px;
  background: rgba(255,255,255,0.85); z-index: 2;
}
.swipe-stamp-like { left: 12px; color: #2ecc71; border-color: #2ecc71; transform: rotate(-12deg); }
.swipe-stamp-dislike { right: 12px; color: var(--danger); border-color: var(--danger); transform: rotate(12deg); }
.swipe-hint {
  font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px;
  user-select: none;
}
/* Same 200px width as .match-card .avatar above it (2026-09-18, explicit
   product request - the buttons should line up with the photo's edges
   rather than being centered narrower than it). Buttons split that width
   evenly instead of sizing to their own text. */
.swipe-actions { display: flex; gap: 8px; width: 200px; margin: 8px auto 0; }
.swipe-actions button { flex: 1; padding: 6px 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0; }
.pagination button:disabled { opacity: 0.4; cursor: default; }
.pagination .page-info { font-size: 13px; color: var(--muted); }

.msg { max-width: 75%; padding: 8px 12px; border-radius: 10px; margin: 6px 0; font-size: 14px; }
.msg.mine { background: var(--accent); color: white; margin-left: auto; }
.msg.theirs { background: #eee; }

.insight-box { background: #fbf3f5; border: 1px solid #edd; border-radius: 8px; padding: 14px; margin-top: 10px; font-size: 14px; }
.insight-box .disclaimer { color: var(--danger); font-size: 12px; margin-bottom: 8px; }

.tabs { display: flex; gap: 4px; margin: 20px 0 8px; border-bottom: 1px solid var(--border); }
.tabs button { background: none; color: var(--muted); border-radius: 0; padding: 8px 14px; }
.tabs button.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.tabs button:hover { background: none; color: var(--accent); }

.other-input { margin-top: 6px; }

/* Profile-setup wizard step bar (see app.js's renderProfileSteps) */
#profile-steps { margin-bottom: 20px; }
.profile-steps-hub { display: inline-block; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.profile-steps-hub:hover { color: var(--accent); }
.profile-steps-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.profile-step { color: var(--muted); text-decoration: none; font-size: 13px; padding: 4px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.profile-step-num { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--border); color: var(--muted); font-size: 11px; font-weight: 700; flex: none; }
.profile-step.active .profile-step-num { background: rgba(255, 255, 255, .3); color: white; }
.profile-step:hover { color: var(--accent); }
.profile-step.active { color: white; background: var(--accent); font-weight: 600; }
.profile-step-sep { color: var(--border); font-size: 13px; }

/* "Rewrite with AI" button (see app.js's attachAiRewriteButton) - the row
   replaces the field's plain label with a label+button flex row; the
   status/undo line it also injects reuses .hint/.error as-is. */
.ai-rewrite-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 0; }
.ai-rewrite-row label { margin: 0; }
.ai-rewrite-btn { font-size: 12.5px; padding: 5px 11px; }

/* Shared site footer (see app.js's renderFooter) - the important-links menu
   used on public/utility pages. landing.html has its own premium-styled
   footer instead (see its .lp-footer block) rather than this plain one. */
.site-footer { margin-top: 48px; padding: 28px 20px 30px; border-top: 1px solid var(--border); text-align: center; }
.site-footer .footer-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-bottom: 12px; }
.site-footer .footer-menu a { color: var(--muted); text-decoration: none; font-size: 13px; }
.site-footer .footer-menu a:hover { color: var(--accent); }
.site-footer .footer-copy { color: var(--muted); font-size: 12px; }
.site-footer .footer-copy .brand { color: var(--accent-dark); font-weight: 700; }
.site-footer .footer-credit, .lp-footer-credit { color: var(--muted); font-size: 11px; margin-top: 8px; }

/* Profile-setup hub (profile.html) section cards */
.setup-section { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.setup-section:last-child { border-bottom: none; }
.setup-section-label { font-size: 15px; }
.setup-section-status { font-size: 12px; margin-left: 10px; }
.setup-section-status.done { color: var(--ok); }
.setup-section-status.pending { color: var(--muted); }
.status-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.status-badge.active { background: #e3f3e9; color: var(--ok); }
.status-badge.inactive { background: #f1e4e8; color: var(--accent-dark); }
