/*
 * Vivah — Unified Stylesheet
 * All styles for landing page and app shell, ported from vasu.html design.
 * Color scheme: Gold/Ivory/Rose Indian wedding palette on dark landing + light app.
 * Typography: Cormorant Garamond (serif display) + Outfit (body sans).
 */

/* ── CSS VARIABLES ── */
:root {
  --ivory: #FAF8F3;
  --cream: #F4EFE4;
  --sand: #E6D9C0;
  --gold: #C9943C;
  --gold-l: #E8B85A;
  --gold-d: #8C6320;
  --rose: #B85C4A;
  --rose-l: #D4846F;
  --deep: #160F04;
  --brown: #3A2210;
  --muted: #7A6A54;
  --green: #2D7A4F;
  --blue: #1A4A7A;
  --error: #EF4444;
  --border: rgba(201,148,60,.2);
  --radius: 14px;
  --font-serif: 'Cormorant Garamond', serif;
  --font-body: 'Outfit', sans-serif;
}

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--ivory); color: var(--deep); }
a { text-decoration: none; color: inherit; }

/* ── UTILITY ── */
.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════
   LANDING PAGE STYLES
   ══════════════════════════════════════════════════════ */

/* ── LANDING WRAPPER ── */
#landing {
  position: relative;
  min-height: 100vh;
  background: var(--deep);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Smooth exit animation when navigating to /app */
  transition: opacity .7s, transform .7s;
}
/* Added by v4: fade-out + scale-up when user clicks CTA */
#landing.gone {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}
.land-glow {
  position: fixed;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,148,60,.1), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}
.land-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.land-logo {
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 300;
  color: var(--ivory);
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.land-logo span { color: var(--gold-l); }
.land-tag {
  font-size: 12px;
  letter-spacing: .18em;
  color: rgba(250,248,243,.4);
  text-transform: uppercase;
  margin-bottom: 32px;
}

/* Landing Cards (style picker) */
.land-cards { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; justify-content: center; }
.land-card {
  width: 140px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,148,60,.22);
  border-radius: 16px;
  padding: 20px 14px;
  cursor: pointer;
  transition: all .3s;
  text-align: center;
  position: relative;
  z-index: 1;
}
.land-card:hover {
  background: rgba(201,148,60,.1);
  border-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(201,148,60,.2);
}
.land-card-em { font-size: 32px; margin-bottom: 8px; display: block; }
.land-card-t { font-size: 13px; font-weight: 600; color: var(--ivory); margin-bottom: 3px; }
.land-card-d { font-size: 11px; color: rgba(250,248,243,.38); line-height: 1.4; }

/* Landing Buttons */
.land-btns { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; position: relative; z-index: 1; }
.btn-land {
  padding: 13px 34px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  border: none;
  color: var(--deep);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s;
  letter-spacing: .02em;
}
.btn-land:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(201,148,60,.4); }
.btn-land-o {
  padding: 13px 26px;
  border-radius: 50px;
  border: 1px solid rgba(201,148,60,.32);
  background: transparent;
  color: rgba(250,248,243,.72);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.btn-land-o:hover { border-color: var(--gold); color: var(--gold-l); }
.land-note { font-size: 11px; color: rgba(250,248,243,.22); letter-spacing: .04em; position: relative; z-index: 1; }

/* ── FEATURE CARDS ── */
.feat-card { transition: all .3s; }
.feat-card:hover { transform: translateY(-3px); }

/* ── SCROLLING TEMPLATE ROWS ── */
.scroll-track { display: flex; gap: 14px; white-space: nowrap; }
.scroll-track:hover { animation-play-state: paused !important; }
@keyframes scrollL { 0% { transform: translateX(0) } 100% { transform: translateX(-50%) } }
@keyframes scrollR { 0% { transform: translateX(-50%) } 100% { transform: translateX(0) } }
.tmpl-preview-card {
  display: inline-flex;
  flex-direction: column;
  width: 185px; min-width: 185px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(201,148,60,.2);
  cursor: pointer;
  transition: all .3s;
  flex-shrink: 0;
}
.tmpl-preview-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 36px rgba(201,148,60,.2);
}
.tmpl-preview-card .tp-thumb { height: 200px; overflow: hidden; position: relative; }
.tmpl-preview-card .tp-info {
  padding: 10px 12px;
  background: rgba(255,255,255,.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tmpl-preview-card .tp-name { font-size: 12px; font-weight: 600; color: var(--ivory); }
.tmpl-preview-card .tp-cat { font-size: 10px; color: rgba(250,248,243,.3); margin-top: 1px; }
.tp-badge { font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 50px; flex-shrink: 0; }
.tp-badge-free { background: rgba(45,122,79,.3); color: #6ED9A0; }
.tp-badge-prem { background: linear-gradient(135deg, rgba(201,148,60,.4), rgba(184,92,74,.3)); color: var(--gold-l); }

/* ══════════════════════════════════════════════════════
   APP SHELL STYLES
   ══════════════════════════════════════════════════════ */

#app { display: none; height: 100vh; flex-direction: column; }
#app.show { display: flex; }

/* ── TOPBAR ── */
.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(250,248,243,.96);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-right: 1px solid var(--border);
  height: 100%;
  min-width: 220px;
  transition: opacity .2s;
  cursor: pointer;
}
.topbar-logo:hover { opacity: .75; }
.topbar-logo-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.topbar-logo-text { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--deep); }
.tab-nav { display: flex; height: 100%; flex: 1; overflow-x: auto; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab-btn:hover { color: var(--deep); background: rgba(201,148,60,.05); }
.tab-btn.active { color: var(--gold-d); border-bottom-color: var(--gold); background: rgba(201,148,60,.06); }
.tab-btn .tab-ico { font-size: 15px; }
.tab-btn .tab-badge { font-size: 10px; background: var(--gold); color: #fff; border-radius: 50px; padding: 1px 6px; font-weight: 700; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-left: 1px solid var(--border);
  height: 100%;
}
.lang-sel {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--deep);
  cursor: pointer;
  outline: none;
}
.btn-t {
  padding: 7px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--brown);
  cursor: pointer;
  transition: all .2s;
}
.btn-t:hover { border-color: var(--gold); color: var(--gold-d); }
.btn-p {
  padding: 7px 18px;
  border-radius: 50px;
  background: var(--deep);
  color: var(--ivory);
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-p:hover { background: var(--gold-d); }

/* ── CONTENT LAYOUT ── */
.content { display: flex; flex: 1; overflow: hidden; }

/* ── LEFT SIDEBAR ── */
.sidebar {
  width: 240px; min-width: 240px;
  border-right: 1px solid var(--border);
  background: var(--cream);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sand); }
.sb-head { padding: 16px 16px 10px; border-bottom: 1px solid var(--border); }
.sb-head-title { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.prog-bar { height: 5px; background: var(--sand); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--rose)); border-radius: 3px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.prog-pct { font-size: 11px; color: var(--gold-d); font-weight: 600; margin-top: 5px; }
.sec-list { padding: 8px 0; flex: 1; }
.sec-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all .2s;
  border-left: 3px solid transparent;
}
.sec-row:hover { background: rgba(201,148,60,.07); }
.sec-row.active { background: rgba(201,148,60,.12); border-left-color: var(--gold); }
.sec-row.done { opacity: .85; }
.sec-ico {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all .2s;
}
.sec-row.active .sec-ico { background: var(--deep); }
.sec-info { flex: 1; min-width: 0; }
.sec-name { font-size: 13px; font-weight: 500; color: var(--deep); }
.sec-sub { font-size: 10px; color: var(--muted); margin-top: 1px; }
.sec-ck {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
  flex-shrink: 0;
  transition: all .3s;
}
.sec-row.done .sec-ck { background: var(--gold); border-color: var(--gold); color: #fff; }

/* Sidebar AI & Score */
.sb-ai {
  margin: 10px 12px 14px;
  background: linear-gradient(135deg, var(--deep) 0%, #2C1A08 100%);
  border-radius: var(--radius);
  padding: 14px;
}
.sb-ai-lbl { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-l); font-weight: 700; margin-bottom: 5px; }
.sb-ai-txt { font-size: 12px; color: rgba(250,248,243,.8); line-height: 1.5; margin-bottom: 10px; }
.btn-ai-sb {
  width: 100%; padding: 9px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  border: none; border-radius: 9px;
  color: var(--deep);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.btn-ai-sb:hover { opacity: .9; transform: translateY(-1px); }
.sb-score { margin: 0 12px 12px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sb-score-h {
  padding: 10px 12px;
  background: var(--ivory);
  border-bottom: 1px solid var(--border);
  font-size: 10px; font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.score-num-sm { font-family: var(--font-serif); font-size: 18px; color: var(--gold-d); font-weight: 500; }
.sb-score-body { padding: 12px; }
.score-ring-wrap { display: flex; justify-content: center; margin-bottom: 10px; }
.score-ring-wrap svg { width: 70px; height: 70px; }
.score-tips-sm { display: flex; flex-direction: column; gap: 5px; }
.stip { font-size: 10.5px; color: var(--brown); display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; }
.stip-ico { flex-shrink: 0; font-size: 12px; }

/* ── MAIN FORM AREA ── */
.main { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.tab-page { display: none; flex: 1; overflow-y: auto; padding: 28px 36px; }
.tab-page::-webkit-scrollbar { width: 4px; }
.tab-page::-webkit-scrollbar-thumb { background: var(--sand); }
.tab-page.active { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) } }

.page-header { margin-bottom: 24px; }
.page-header h2 { font-family: var(--font-serif); font-size: 28px; font-weight: 400; color: var(--deep); margin-bottom: 4px; }
.page-header p { font-size: 13px; color: var(--muted); }

/* AI Tip Bar */
.ai-tip {
  display: flex; align-items: flex-start; gap: 10px;
  background: linear-gradient(135deg, rgba(201,148,60,.07), rgba(184,92,74,.05));
  border: 1px solid rgba(201,148,60,.25);
  border-radius: 11px;
  padding: 12px 14px;
  margin-bottom: 22px;
}
.ai-tip-ico { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.ai-tip-body { flex: 1; }
.ai-tip-lbl { font-size: 10px; font-weight: 700; color: var(--gold-d); letter-spacing: .07em; text-transform: uppercase; }
.ai-tip-txt { font-size: 12.5px; color: var(--brown); margin-top: 2px; line-height: 1.5; }
.ai-tip-acts { display: flex; gap: 7px; margin-top: 8px; }
.btn-tip { padding: 4px 12px; border-radius: 50px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all .2s; }
.btn-tip-a { background: var(--deep); color: var(--ivory); border: none; }
.btn-tip-d { background: transparent; color: var(--muted); border: 1px solid var(--border); }

/* ── FORM GRID ── */
.fg { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.fg3 { grid-template-columns: 1fr 1fr 1fr; }
.fg1 { grid-template-columns: 1fr; }
.fg-full { grid-column: 1/-1; }
.fgrp { display: flex; flex-direction: column; gap: 5px; }
label.lbl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fg input, .fg select, .fg textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--sand);
  border-radius: 9px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--deep);
  transition: all .2s;
  outline: none;
  width: 100%;
}
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,148,60,.1); }
.fg textarea { resize: vertical; min-height: 85px; }
.fg select { cursor: pointer; }
.fhint { font-size: 10.5px; color: var(--muted); margin-top: 3px; }

/* Photo Upload Zone */
.photo-zone {
  border: 2px dashed var(--sand);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  background: var(--cream);
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.photo-zone:hover { border-color: var(--gold); background: rgba(201,148,60,.04); }
.photo-zone-ico { font-size: 32px; }
.photo-zone-t { font-size: 13px; font-weight: 500; color: var(--brown); }
.photo-zone-s { font-size: 11px; color: var(--muted); }

/* Toggle Groups */
.tog-grp { display: flex; gap: 7px; flex-wrap: wrap; }
.tog {
  padding: 7px 15px;
  border-radius: 50px;
  border: 1.5px solid var(--sand);
  background: #fff;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--brown);
  cursor: pointer;
  transition: all .2s;
}
.tog:hover { border-color: var(--gold); }
.tog.sel { background: var(--deep); border-color: var(--deep); color: var(--ivory); }
.tog.sel-multi { background: rgba(201,148,60,.12); border-color: var(--gold); color: var(--gold-d); }

/* Form Navigation */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.btn-back {
  padding: 10px 22px; border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.btn-back:hover { border-color: var(--gold); }
.btn-next {
  padding: 10px 26px; border-radius: 50px;
  background: var(--deep);
  color: var(--ivory);
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.btn-next:hover { background: var(--gold-d); }
.divider-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.divider-label::before, .divider-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Language Row */
.lang-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
  background: var(--cream);
  border-radius: 11px;
  padding: 12px 16px;
  border: 1px solid var(--border);
}
.lang-row-ico { font-size: 18px; }
.lang-row-txt { font-size: 13px; color: var(--brown); flex: 1; }
.lang-row-sel {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  outline: none;
}

/* Community Fields */
.community-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.community-card-t { font-size: 12px; font-weight: 700; letter-spacing: .07em; color: var(--gold-d); text-transform: uppercase; margin-bottom: 12px; }

/* ── TEMPLATES TAB ── */
.tmpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tmpl-card {
  border: 2px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all .3s;
  background: #fff;
}
.tmpl-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(201,148,60,.15); }
.tmpl-card.selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,148,60,.2); }
.tmpl-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.tmpl-badge { position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 50px; font-size: 10px; font-weight: 700; }
.tmpl-badge.premium { background: linear-gradient(135deg, var(--gold), var(--rose)); color: #fff; }
.tmpl-badge.free { background: var(--green); color: #fff; }
.tmpl-info { padding: 12px 14px; border-top: 1px solid var(--border); }
.tmpl-name { font-size: 13px; font-weight: 600; color: var(--deep); }
.tmpl-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tmpl-sel-wrap { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.tmpl-sel-indicator {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  transition: all .2s;
}
.tmpl-card.selected .tmpl-sel-indicator { background: var(--gold); border-color: var(--gold); color: #fff; }
.cat-filter { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.cat-btn {
  padding: 6px 16px; border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.cat-btn:hover { border-color: var(--gold); color: var(--gold-d); }
.cat-btn.active { background: var(--deep); border-color: var(--deep); color: var(--ivory); }

/* ── MINI TEMPLATE PREVIEWS ── */
.mt-trad { background: linear-gradient(160deg, #1A1208, #3D2B1A); height: 100%; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; }
.mt-trad-om { font-size: 18px; color: var(--gold-l); }
.mt-trad-ph { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gold-l); background: rgba(201,148,60,.2); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--gold-l); }
.mt-trad-nm { font-family: var(--font-serif); font-size: 12px; color: var(--ivory); font-weight: 400; }
.mt-trad-ln { width: 50%; height: 1px; background: rgba(201,148,60,.4); }
.mt-trad-rows { display: flex; flex-direction: column; gap: 2px; width: 85%; font-size: 7.5px; color: rgba(250,248,243,.5); }
.mt-trad-row { display: flex; gap: 4px; }
.mt-trad-row-lbl { min-width: 32px; color: rgba(250,248,243,.3); }
.mt-trad-row-val { color: rgba(250,248,243,.5); }

.mt-mod { background: #F8F4EE; height: 100%; padding: 12px; }
.mt-mod-h { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.mt-mod-ph { width: 32px; height: 32px; border-radius: 8px; background: var(--deep); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--gold-l); }
.mt-mod-nm { font-size: 10px; font-weight: 700; color: var(--deep); }
.mt-mod-sub { font-size: 7.5px; color: var(--muted); }
.mt-mod-tags { display: flex; gap: 3px; margin-top: 2px; }
.mt-mod-tag { font-size: 6px; background: rgba(201,148,60,.15); color: var(--gold-d); padding: 1px 5px; border-radius: 50px; font-weight: 700; }
.mt-mod-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.mt-mod-chip { background: #fff; border-radius: 5px; padding: 4px 6px; }
.mt-mod-chip-l { font-size: 6px; color: var(--muted); }
.mt-mod-chip-v { font-size: 7.5px; font-weight: 600; color: var(--deep); }

.mt-min { background: #fff; height: 100%; display: flex; flex-direction: column; padding: 14px; border-left: 3px solid var(--deep); }
.mt-min-nm { font-family: var(--font-serif); font-size: 14px; color: var(--deep); margin-bottom: 6px; }
.mt-min-ln { width: 24px; height: 2px; background: var(--gold); margin-bottom: 10px; }
.mt-min-row { font-size: 7.5px; color: var(--muted); line-height: 2; }

.mt-floral { background: linear-gradient(160deg, #FFF8F0, #FDE8D8); height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px; }
.mt-floral-bdr { position: absolute; inset: 4px; border: 1px solid rgba(184,92,74,.3); border-radius: 6px; pointer-events: none; }
.mt-floral-ico { font-size: 22px; }
.mt-floral-nm { font-family: var(--font-serif); font-size: 13px; color: var(--rose); font-weight: 500; }
.mt-floral-rows { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.mt-floral-r { font-size: 7.5px; color: var(--brown); }

.mt-royal { background: linear-gradient(160deg, #0D1B2A, #1A3550); height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px; }
.mt-royal-cr { font-size: 20px; }
.mt-royal-nm { font-family: var(--font-serif); font-size: 13px; color: #C9D8E8; font-weight: 300; letter-spacing: .08em; }
.mt-royal-ln { width: 50%; height: 1px; background: rgba(100,160,220,.4); }
.mt-royal-row { font-size: 7.5px; color: rgba(201,216,232,.5); }

.mt-isl { background: linear-gradient(160deg, #0A1A0A, #1A3A1A); height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px; }
.mt-isl-ico { font-size: 22px; }
.mt-isl-nm { font-family: var(--font-serif); font-size: 12px; color: #C8E6C8; font-weight: 400; letter-spacing: .06em; }
.mt-isl-row { font-size: 7.5px; color: rgba(200,230,200,.5); }

.mt-jain { background: linear-gradient(160deg, #FFFAF0, #FFF3D0); height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px; }
.mt-jain-ico { font-size: 20px; }
.mt-jain-nm { font-family: var(--font-serif); font-size: 12px; color: #5A3A08; font-weight: 500; }
.mt-jain-row { font-size: 7.5px; color: #7A5A20; }

.mt-sikh { background: linear-gradient(160deg, #1A0A0A, #3A1A0A); height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px; }
.mt-sikh-ico { font-size: 22px; }
.mt-sikh-nm { font-family: var(--font-serif); font-size: 12px; color: #E8C87A; letter-spacing: .06em; }
.mt-sikh-row { font-size: 7.5px; color: rgba(232,200,122,.5); }

.mt-sth { background: linear-gradient(160deg, #FFF0F8, #FFE0EE); height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px; }
.mt-sth-ico { font-size: 22px; }
.mt-sth-nm { font-family: var(--font-serif); font-size: 12px; color: #7A1A4A; font-weight: 500; }
.mt-sth-row { font-size: 7.5px; color: #9A3A6A; }

/* ── PREVIEW TAB ── */
.preview-tab-layout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; height: 100%; }
.preview-left { overflow-y: auto; padding-right: 8px; }
.preview-left::-webkit-scrollbar { width: 3px; }
.preview-left::-webkit-scrollbar-thumb { background: var(--sand); }
.preview-right { overflow-y: auto; }
.preview-right::-webkit-scrollbar { display: none; }

/* Photo Carousel — hide scrollbar for clean horizontal swipe */
.photo-carousel-track { scrollbar-width: none; -ms-overflow-style: none; }
.photo-carousel-track::-webkit-scrollbar { display: none; }

/* Version Selector */
.version-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.ver-btn {
  padding: 8px 16px; border-radius: 50px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ver-btn:hover { border-color: var(--gold); }
.ver-btn.active { background: var(--deep); border-color: var(--deep); color: var(--ivory); }

/* ── BIODATA CARD RENDERS ── */
.bd-wrap { border-radius: 14px; overflow: hidden; box-shadow: 0 6px 32px rgba(26,16,4,.14); margin-bottom: 16px; }

/* Traditional */
.bd-trad .bd-header { background: linear-gradient(160deg, #160F04, #3A2210, #8C6320); padding: 28px 24px 22px; text-align: center; color: var(--ivory); }
.bd-trad .bd-om { font-size: 24px; margin-bottom: 6px; display: block; }
.bd-trad .bd-avatar { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--gold-l); margin: 0 auto 10px; background: rgba(201,148,60,.2); display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--gold-l); font-family: var(--font-serif); font-weight: 600; }
.bd-trad .bd-nm { font-family: var(--font-serif); font-size: 26px; font-weight: 500; letter-spacing: .03em; }
.bd-trad .bd-subt { font-size: 11px; letter-spacing: .1em; opacity: .65; margin-top: 3px; text-transform: uppercase; }
.bd-trad .bd-body { background: #fff; padding: 22px 24px; }
.bd-sec { margin-bottom: 18px; }
.bd-sec-title { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-d); padding-bottom: 6px; border-bottom: 1px solid rgba(201,148,60,.2); margin-bottom: 10px; }
.bd-row { display: flex; gap: 8px; margin-bottom: 5px; font-size: 13px; }
.bd-lbl { color: var(--muted); min-width: 100px; flex-shrink: 0; }
.bd-val { color: var(--deep); font-weight: 500; }
.bd-trad .bd-footer { background: linear-gradient(160deg, #160F04, #3A2210); padding: 14px 24px; text-align: center; }
.bd-trad .bd-footer-txt { font-size: 10px; color: rgba(250,248,243,.4); letter-spacing: .05em; }

/* Modern */
.bd-mod .bd-header { background: var(--deep); padding: 22px; display: flex; align-items: center; gap: 16px; }
.bd-mod .bd-avatar { width: 64px; height: 64px; border-radius: 14px; border: 2px solid var(--gold); flex-shrink: 0; background: rgba(201,148,60,.15); display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--gold-l); font-family: var(--font-serif); font-weight: 600; }
.bd-mod .bd-nm { font-family: var(--font-serif); font-size: 22px; font-weight: 500; color: var(--ivory); }
.bd-mod .bd-subt { font-size: 11px; color: var(--gold-l); margin-top: 2px; }
.bd-mod-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.bd-mod-tag { font-size: 9px; font-weight: 700; letter-spacing: .05em; background: rgba(201,148,60,.2); color: var(--gold-l); padding: 2px 8px; border-radius: 50px; }
.bd-mod .bd-body { background: #F8F5F0; padding: 18px 20px; }
.bd-mod .bd-about { font-size: 13px; color: var(--brown); line-height: 1.7; font-style: italic; background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 16px; border-left: 3px solid var(--gold); }
.bd-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.bd-chip { background: #fff; border-radius: 9px; padding: 9px 11px; }
.bd-chip-l { font-size: 9.5px; color: var(--muted); }
.bd-chip-v { font-size: 12.5px; font-weight: 600; color: var(--deep); margin-top: 2px; }

/* Minimal */
.bd-min { background: #fff; padding: 32px 28px; border-left: 4px solid var(--deep); }
.bd-min-nm { font-family: var(--font-serif); font-size: 30px; font-weight: 300; color: var(--deep); letter-spacing: .02em; }
.bd-min-line { width: 40px; height: 2px; background: var(--gold); margin: 10px 0 18px; }
.bd-min-sec-t { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.bd-min-row { font-size: 13px; color: var(--brown); padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,.05); display: flex; justify-content: space-between; }
.bd-min-k { color: var(--muted); }

/* WhatsApp */
.bd-wa { background: #0B1E10; padding: 20px; font-family: monospace; color: #E8FFE8; border-radius: 14px; }
.wa-preview { background: #0B1E10; border-radius: 14px; padding: 20px; font-family: monospace; margin-bottom: 16px; }
.wa-bubble { background: #1A3A1A; border-radius: 10px; padding: 14px; color: #E8FFE8; font-size: 12.5px; line-height: 1.7; }
.wa-line { margin-bottom: 3px; }
.wa-bold { font-weight: 700; color: #4CAF50; }
.wa-sep-line { border-top: 1px solid rgba(76,175,80,.2); margin: 10px 0; }
.wa-link { color: #81C784; text-decoration: underline; }
.wa-time { font-size: 10px; color: rgba(76,175,80,.4); text-align: right; margin-top: 6px; }

/* ── ANALYTICS TAB ── */
.analytics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-card-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 6px; }
.stat-card-num { font-family: var(--font-serif); font-size: 36px; font-weight: 400; color: var(--deep); line-height: 1; }
.stat-card-delta { font-size: 11px; color: var(--green); margin-top: 4px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.chart-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.chart-card-t { font-size: 13px; font-weight: 600; color: var(--deep); margin-bottom: 14px; }
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-size: 11px; color: var(--muted); min-width: 60px; text-align: right; }
.bar-track { flex: 1; height: 8px; background: var(--cream); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--rose)); transition: width 1s ease; }
.bar-val { font-size: 11px; color: var(--muted); min-width: 24px; }
.donut-wrap { display: flex; gap: 16px; align-items: center; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-leg-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--brown); }
.donut-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.insight-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.insight-card-t { font-size: 13px; font-weight: 600; color: var(--deep); margin-bottom: 14px; }
.insight-list { display: flex; flex-direction: column; gap: 10px; }
.insight-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--cream); border-radius: 9px; }
.insight-ico { font-size: 18px; flex-shrink: 0; }
.insight-txt { font-size: 12.5px; color: var(--brown); line-height: 1.5; }
.insight-action { font-size: 11px; font-weight: 600; color: var(--gold-d); cursor: pointer; margin-top: 3px; }
.analytics-live { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--green); font-weight: 500; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .5; transform: scale(.8) } }

/* ── SHARE TAB ── */
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.share-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: all .3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.share-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 10px 28px rgba(201,148,60,.12); }
.share-card-ico { font-size: 36px; }
.share-card-t { font-size: 15px; font-weight: 600; color: var(--deep); }
.share-card-d { font-size: 12px; color: var(--muted); line-height: 1.5; }
.share-card-btn {
  margin-top: 6px; padding: 8px 20px;
  border-radius: 50px;
  background: var(--deep);
  color: var(--ivory);
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.share-card-btn:hover { background: var(--gold-d); }
.share-link-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.share-link-t { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }
.share-link-row { display: flex; align-items: center; gap: 10px; }
.share-link-url {
  flex: 1; padding: 10px 14px;
  background: var(--cream);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--brown);
  font-family: monospace;
  border: 1px solid var(--border);
}
.share-qr-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; gap: 20px; align-items: center; }
.qr-placeholder { width: 100px; height: 100px; background: var(--cream); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 40px; border: 1px solid var(--border); }

/* ── MODAL ── */
.overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(22,15,4,.65);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overlay.open { display: flex; }
.modal {
  background: var(--ivory);
  border-radius: 20px;
  padding: 32px 36px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(22,15,4,.3);
  animation: popUp .3s cubic-bezier(.34,1.56,.64,1);
}
/* Auth modal needs scroll on small viewports — Descope widget can be taller than
   the visible area, hiding the Continue/Submit button. */
#authModal .modal { max-height: 85vh; overflow-y: auto; }
@keyframes popUp { from { transform: translateY(16px) scale(.97); opacity: 0 } to { transform: translateY(0) scale(1); opacity: 1 } }
.modal-t { font-family: var(--font-serif); font-size: 28px; font-weight: 400; color: var(--deep); margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.modal-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.tone-row { display: flex; gap: 8px; margin-bottom: 16px; }
.tone-btn {
  padding: 7px 16px; border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.tone-btn.active { background: var(--deep); border-color: var(--deep); color: var(--ivory); }
.ai-out-box {
  background: var(--cream);
  border-radius: 12px;
  padding: 18px;
  border-left: 3px solid var(--gold);
  font-size: 13px;
  color: var(--brown);
  line-height: 1.7;
  font-style: italic;
  min-height: 80px;
}
.ai-loading { display: none; text-align: center; padding: 20px; color: var(--muted); font-size: 13px; }
.ai-loading .dots::after { content: '...'; animation: dots 1.2s infinite; letter-spacing: .1em; }
@keyframes dots { 0% { content: '.' } 40% { content: '..' } 80%,100% { content: '...' } }

/* ── VOICE BUTTON ── */
.voice-btn {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all .3s;
  box-shadow: 0 4px 16px rgba(201,148,60,.35);
}
.voice-btn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(201,148,60,.5); }
.voice-btn.recording { animation: voicePulse 1.5s infinite; background: linear-gradient(135deg, #EF4444, #B85C4A); }
@keyframes voicePulse {
  0% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
  70% { box-shadow: 0 0 0 16px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ── CUSTOM FIELDS ── */
.custom-field-row {
  display: flex; gap: 8px; align-items: end; margin-bottom: 10px;
}
.custom-field-row input { flex: 1; }
.btn-remove-field {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--error);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.btn-add-field {
  padding: 6px 14px;
  border-radius: 50px;
  border: 1.5px dashed var(--gold);
  background: transparent;
  color: var(--gold-d);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  margin-top: 8px;
}
.btn-add-field:hover { background: rgba(201,148,60,.08); }

/* ── AUTH OVERLAY (optional sign-in) ── */
.auth-modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(22,15,4,.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
}
.auth-modal-overlay.open { display: flex; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .preview-tab-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar-logo { min-width: auto; border-right: none; }
  .tab-btn { padding: 0 12px; font-size: 12px; }
  .topbar-right { gap: 6px; }
  .fg { grid-template-columns: 1fr; }
  .share-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tab-page { padding: 16px; }
  .page-header h2 { font-size: 22px; }
  .land-logo { font-size: 48px; }
  .land-cards { gap: 8px; }
  .land-card { width: 120px; }
}

/* ── SECTION SEPARATOR ── */
.sec-sep { height: 1px; background: var(--border); margin: 24px 0; }

/* Toasts */
.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--gold-l);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    animation: slideInRight 0.3s ease forwards;
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (min-width: 1024px) {
  .live-preview-panel { display: block !important; }
}

/* Voice Button Styling */
.voice-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--gold-l));
    color: #1a1105;
    border: none; padding: 10px 24px; border-radius: 30px;
    font-weight: 600; font-size: 15px; cursor: pointer;
    box-shadow: 0 4px 15px rgba(220,185,110,0.3);
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.voice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220,185,110,0.4);
}
.voice-pulse {
    position: absolute; width: 100%; height: 100%; left: 0; top: 0;
    border-radius: 30px; background: rgba(255,255,255,0.4);
    opacity: 0;
}
.voice-btn.listening .voice-pulse {
    animation: voicePulsate 1.5s infinite ease-out;
}
@keyframes voicePulsate {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}
.voice-btn.listening { background: #b026ff; color:#fff; box-shadow: 0 0 15px #b026ff; }
.voice-icon { font-size: 18px; }
