/* ============================================================
   बड़ा नागदा समाज — Advanced Responsive Stylesheet
   Desktop => Full Website | Mobile (<=900px) => App-style UI
   ============================================================ */

:root{
  --gold:#4f46e5; --gold-dark:#3730a3; --gold-light:#c7d2fe; --gold-soft:#eef2ff;
  --maroon:#0f172a; --maroon-dark:#1e1b4b; --dark:#0f172a;
  --bg:#FFFFFF; --card:#ffffff; --text:#1A1A1A; --muted:#6B6B6B;
  --shadow:0 6px 18px rgba(0,0,0,.10); --shadow-lg:0 18px 42px rgba(0,0,0,.18);
  --radius:16px; --radius-lg:22px;
  --safe-top:env(safe-area-inset-top,0px); --safe-bottom:env(safe-area-inset-bottom,0px);
  --font-display:'Poppins','Noto Sans Devanagari',system-ui,sans-serif;
  --font-accent:'Poppins','Noto Sans Devanagari',system-ui,sans-serif;
  --font-body:'Poppins','Noto Sans Devanagari',system-ui,sans-serif;
  --font-ui:'Poppins','Noto Sans Devanagari',system-ui,sans-serif;
}
*{box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent;}
html{scroll-behavior:smooth;}
body{font-family:var(--font-body); background:var(--bg); color:var(--text); line-height:1.65; overflow-x:hidden;}
a{text-decoration:none; color:inherit;}
img{max-width:100%; display:block;}
h1,h2,h3,h4{font-family:var(--font-display); font-weight:700; color:var(--maroon); line-height:1.25;}
.accent{font-family:var(--font-accent); font-style:italic;}
::selection{background:var(--gold-light);}
button{font-family:inherit;}

/* ===================== TOP TICKER ===================== */
.top-ticker{background:var(--dark); color:var(--gold-light); padding:5px 0; overflow:hidden; white-space:nowrap; font-size:11.5px; position:relative; transition:max-height .3s ease, padding .3s ease, opacity .3s ease; max-height:30px;}
.top-ticker.ticker-hidden{max-height:0; padding:0; opacity:0;}
.ticker-track{display:inline-flex;}
.ticker-track span{display:inline-block; padding-right:60px; animation:ticker 24s linear infinite;}
@keyframes ticker{ 0%{transform:translateX(0);} 100%{transform:translateX(-100%);} }

/* ===================== DESKTOP HEADER ===================== */
.site-header{
  background:var(--maroon);
  color:#fff; padding:10px 5%; display:flex; justify-content:space-between; align-items:center;
  box-shadow:0 4px 18px rgba(0,0,0,.16); position:sticky; top:0; z-index:200; flex-wrap:wrap; gap:8px;
  transition:padding .25s ease, box-shadow .25s ease; backdrop-filter:blur(6px);
}
.site-header.scrolled{padding:6px 5%; box-shadow:0 6px 22px rgba(0,0,0,.28);}
.site-header .logo{font-size:19px; font-weight:800; letter-spacing:.2px; display:flex; align-items:center; gap:9px; transition:.25s;}
.site-header .mark{width:36px; height:36px; border-radius:50%; background:var(--gold); display:flex; align-items:center; justify-content:center; font-size:17px; box-shadow:0 0 0 2.5px rgba(255,255,255,.25); flex-shrink:0; transition:.25s;}
.site-header.scrolled .mark{width:30px; height:30px; font-size:14px;}
.site-header .logo-text{font-family:var(--font-display); display:block; line-height:1.15;}
.site-header .logo-text small{display:block; font-size:9px; font-weight:400; opacity:.8; letter-spacing:1.4px; font-family:var(--font-ui); transition:.25s;}
.site-header.scrolled .logo-text small{max-height:0; opacity:0; overflow:hidden;}
.site-header nav{display:flex; align-items:center; gap:1px; flex-wrap:wrap;}
.site-header nav > a{color:#fff; margin-left:1px; font-weight:600; font-size:13px; padding:7px 12px; border-radius:20px; transition:.2s; white-space:nowrap;}
.site-header nav > a:hover, .site-header nav > a.active{background:rgba(255,255,255,.2); transform:translateY(-1px);}
.nav-cta{background:var(--gold) !important; color:#000000 !important; font-weight:700 !important; padding:8px 16px !important;}
.nav-cta:hover{background:var(--gold-dark) !important;}
.nav-toggle{display:none; background:none; border:none; color:#fff; font-size:24px; cursor:pointer;}

.nav-dropdown{position:relative;}
.dd-trigger{display:inline-block; color:#fff; font-weight:600; font-size:13px; padding:7px 12px; border-radius:20px; cursor:pointer; transition:.2s;}
.dd-trigger:hover{background:rgba(255,255,255,.2);}
.dd-menu{position:absolute; top:112%; left:0; background:#fff; border-radius:14px; box-shadow:var(--shadow-lg); padding:7px; min-width:200px; opacity:0; visibility:hidden; transform:translateY(8px); transition:.22s; z-index:50;}
.nav-dropdown:hover .dd-menu{opacity:1; visibility:visible; transform:translateY(0);}
.dd-menu a{display:block; color:var(--text); padding:9px 13px; border-radius:9px; font-size:13px; font-weight:600; white-space:nowrap;}
.dd-menu a:hover{background:var(--gold-soft); color:var(--maroon);}

/* Desktop search toggle + expandable box */
.nav-search-toggle{background:rgba(255,255,255,.16); border:none; color:#fff; width:34px; height:34px; border-radius:50%; font-size:14px; cursor:pointer; margin-left:6px; flex-shrink:0; transition:.2s;}
.nav-search-toggle:hover{background:rgba(255,255,255,.3);}
.nav-search-box{display:none; position:absolute; top:100%; left:0; right:0; background:var(--card); box-shadow:var(--shadow-lg); padding:14px 5%; align-items:center; gap:10px; z-index:150;}
.nav-search-box.show{display:flex;}
.nav-search-box input{flex:1; padding:12px 18px; border-radius:30px; border:1.5px solid var(--gold-light); font-size:14px;}
.nav-search-box input:focus{outline:none; border-color:var(--gold);}
.nav-search-box button[type=submit]{background:var(--gold); color:#0f172a; border:none; width:42px; height:42px; border-radius:50%; font-size:15px; cursor:pointer; flex-shrink:0;}
.nav-search-close{background:var(--gold-soft); border:none; width:36px; height:36px; border-radius:50%; font-size:14px; color:var(--muted); cursor:pointer; flex-shrink:0;}

/* ===================== MOBILE APP BAR (hidden on desktop) ===================== */
.mobile-appbar{display:none;}
.mob-menu-overlay{display:none;}
.bottom-nav{display:none;}
.fab-whatsapp{display:none;}

/* ===================== HERO ===================== */
.hero{position:relative; height:600px; overflow:hidden;}
.hero .slide{width:100%; height:600px; object-fit:cover; position:absolute; inset:0; opacity:0; transition:opacity 1.6s ease-in-out; filter:brightness(.55) saturate(1.15);}
.hero .slide.active{opacity:1;}
.hero::after{content:''; position:absolute; inset:0; background:rgba(0,0,0,.6); z-index:1;}
.hero-content{position:absolute; inset:0; z-index:2; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:20px; color:#fff;}
.hero-content .badge{background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.4); padding:7px 22px; border-radius:30px; font-size:13px; letter-spacing:3px; margin-bottom:20px; backdrop-filter:blur(6px);}
.hero-content h1{color:#fff; font-size:60px; margin-bottom:8px; text-shadow:0 6px 24px rgba(0,0,0,.5); letter-spacing:.5px;}
.hero-content .sub{font-family:var(--font-ui); font-size:15px; letter-spacing:4px; opacity:.85; text-transform:uppercase; margin-bottom:22px;}
.hero-content p{max-width:640px; font-size:17px; opacity:.95; margin-bottom:32px; font-family:var(--font-accent); font-style:italic;}
.hero-btns{display:flex; gap:16px; flex-wrap:wrap; justify-content:center;}
.hero-btn{padding:15px 34px; border-radius:30px; font-weight:700; font-size:14px; letter-spacing:.3px; transition:.25s; display:inline-block;}
.hero-btn.primary{background:var(--gold); color:#0f172a; box-shadow:0 10px 26px rgba(2,132,199,.5);}
.hero-btn.primary:hover{background:var(--gold-dark); transform:translateY(-3px);}
.hero-btn.ghost{border:2px solid rgba(255,255,255,.8); color:#fff;}
.hero-btn.ghost:hover{background:#fff; color:var(--maroon);}
.hero-anim{opacity:0; transform:translateY(24px); animation:heroFadeUp .9s ease forwards;}
@keyframes heroFadeUp{ to{opacity:1; transform:translateY(0);} }
.hero-dots{position:absolute; bottom:26px; left:0; right:0; z-index:3; display:flex; justify-content:center; gap:9px;}
.hero-dots span{width:9px; height:9px; border-radius:50%; background:rgba(255,255,255,.4); cursor:pointer; transition:.25s;}
.hero-dots span.active{background:#fff; width:28px; border-radius:5px;}

/* ===================== STATS STRIP ===================== */
.stats-strip{display:flex; flex-wrap:wrap; justify-content:center; background:var(--card); margin:-50px 6% 0; position:relative; z-index:5; border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); overflow:hidden;}
.stats-strip .stat{flex:1; min-width:150px; text-align:center; padding:34px 15px; border-right:1px solid #c7d2fe; transition:.25s;}
.stats-strip .stat:hover{background:var(--gold-soft);}
.stats-strip .stat:last-child{border-right:none;}
.stats-strip .stat .num{font-size:38px; font-weight:800; color:var(--gold-dark); font-family:var(--font-display);}
.stats-strip .stat .lbl{font-size:13px; color:var(--muted); margin-top:6px; font-weight:600;}

/* ===================== SECTIONS ===================== */
.section{padding:84px 6%; position:relative; overflow:hidden;}
.section-head{text-align:center; max-width:680px; margin:0 auto 50px;}
.section-head .deco-divider{text-align:center; color:var(--gold); font-size:20px; letter-spacing:14px; opacity:.55; margin-bottom:8px;}
.section-head .eyebrow{color:var(--gold-dark); font-weight:700; letter-spacing:3px; font-size:12px; text-transform:uppercase;}
.section-head h2{font-size:36px; margin:10px 0 12px; position:relative; display:inline-block;}
.section-head h2::after{content:''; display:block; width:64px; height:3px; background:var(--gold); margin:16px auto 0; border-radius:3px;}
.section-head p{color:var(--muted); font-size:15.5px; font-family:var(--font-accent); font-style:italic;}
.section.alt{background:var(--gold-soft);}

/* Quick tiles */
.quick-tiles{display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:20px; max-width:1100px; margin:0 auto;}
.quick-tile{background:#fff; border-radius:18px; padding:28px 14px; text-align:center; box-shadow:var(--shadow); transition:.3s; border:1px solid #E0F2FE;}
.quick-tile:hover{transform:translateY(-6px) scale(1.02); box-shadow:var(--shadow-lg); border-color:var(--gold);}
.quick-tile .emoji{font-size:32px; margin-bottom:10px; display:block; transition:.3s;}
.quick-tile:hover .emoji{transform:scale(1.2) rotate(-6deg);}
.quick-tile .lbl{font-size:13.5px; font-weight:700; color:var(--maroon);}

/* About */
.about-grid{display:grid; grid-template-columns:1.1fr 1fr; gap:60px; align-items:center; max-width:1180px; margin:0 auto;}
.about-grid .imgwrap{position:relative; border-radius:22px; overflow:hidden; box-shadow:var(--shadow-lg);}
.about-grid .imgwrap img{width:100%; height:440px; object-fit:cover;}
.about-grid .badge-float{position:absolute; bottom:-24px; right:-24px; background:var(--maroon); color:#fff; padding:24px 28px; border-radius:18px; box-shadow:var(--shadow-lg); text-align:center;}
.about-grid .badge-float .n{font-size:28px; font-weight:800; font-family:var(--font-display);}
.about-grid .badge-float .l{font-size:11px; opacity:.85;}
.about-text p{color:var(--muted); font-size:16px; line-height:2; margin-bottom:18px;}
.about-text .eyebrow{color:var(--gold-dark); font-weight:700; letter-spacing:3px; font-size:12px; text-transform:uppercase;}
.about-text h2{font-size:34px; margin:8px 0 20px;}
.value-row{display:flex; gap:14px; margin-top:26px; flex-wrap:wrap;}
.value-chip{background:var(--gold-soft); border:1px solid var(--gold-light); padding:10px 20px; border-radius:30px; font-size:13.5px; font-weight:700; color:var(--maroon);}
@media(max-width:900px){ .about-grid{grid-template-columns:1fr; gap:34px;} .about-grid .imgwrap img{height:280px;} }

/* Timeline (history) */
.timeline{max-width:760px; margin:0 auto; position:relative;}
.tl-item{display:flex; gap:22px; padding-bottom:34px; position:relative;}
.tl-item::before{content:''; position:absolute; left:24px; top:52px; bottom:0; width:2px; background:var(--gold-light);}
.tl-item:last-child::before{display:none;}
.tl-dot{width:50px; height:50px; border-radius:50%; background:var(--maroon); color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:800; flex-shrink:0; z-index:1; box-shadow:var(--shadow);}
.tl-body h4{font-size:17px; color:var(--text); margin-bottom:5px;}
.tl-body p{font-size:14px; color:var(--muted); line-height:1.7;}

/* Card grid (people) */
.card-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:28px; max-width:1200px; margin:0 auto;}
.people-card{background:#fff; border-radius:var(--radius); padding:30px 18px; text-align:center; box-shadow:var(--shadow); transition:.3s; position:relative; overflow:hidden; border:1px solid #E0F2FE;}
.people-card:hover{transform:translateY(-8px); box-shadow:var(--shadow-lg);}
.people-card::after{content:''; position:absolute; top:-2px; left:50%; transform:translateX(-50%); width:0; height:3px; background:var(--gold); transition:width .3s ease; border-radius:3px;}
.people-card:hover::after{width:60%;}
.people-card img{width:104px; height:104px; border-radius:50%; object-fit:cover; margin:0 auto 16px; border:4px solid var(--gold-soft); box-shadow:0 0 0 2.5px var(--gold);}
.people-card h3{font-size:17px; margin-bottom:3px;}
.people-card .role{color:var(--gold-dark); font-weight:700; font-size:13px; margin-bottom:6px;}
.people-card .meta{color:var(--muted); font-size:12px;}

/* वंशावली खोज - एडवांस फ़िल्टर बार */
.vk-filter-row{display:flex; gap:10px; flex-wrap:wrap; align-items:center;}
.vk-input{flex:2; min-width:200px; padding:13px 16px; border-radius:12px; border:1.5px solid var(--gold-light); font-size:14px;}
.vk-select{flex:1; min-width:140px; padding:13px 14px; border-radius:12px; border:1.5px solid var(--gold-light); font-size:13.5px; background:#fff; color:var(--text);}
.vk-clear{font-size:12.5px; color:var(--maroon); font-weight:700; text-decoration:underline; cursor:pointer;}
.vk-phone-hint{text-align:center; font-size:11.5px; color:var(--muted); margin-top:10px;}
.vk-count{text-align:center; color:var(--muted); font-size:13px; margin:-10px 0 24px;}
.vk-pagination{display:flex; justify-content:center; gap:8px; flex-wrap:wrap; margin-top:36px;}
.vk-page-btn{padding:8px 14px; border-radius:10px; border:1.5px solid var(--gold-light); font-size:13px; font-weight:700; color:var(--gold-dark); background:#fff; transition:.2s;}
.vk-page-btn:hover{border-color:var(--gold); background:var(--gold-soft);}
.vk-page-btn.active{background:var(--gold); color:#0f172a; border-color:var(--gold);}
@media(max-width:700px){
  .vk-filter-row{flex-direction:column; align-items:stretch;}
  .vk-input, .vk-select{flex:none; width:100%;}
}

/* News/Events info cards */
.info-card{background:#fff; border-radius:var(--radius); padding:28px; box-shadow:var(--shadow); transition:.3s; border:1px solid #E0F2FE; position:relative;}
.info-card:hover{transform:translateY(-6px); box-shadow:var(--shadow-lg);}
.info-card::before{content:''; position:absolute; top:0; left:0; right:0; height:3px; background:var(--gold); transform:scaleX(0); transform-origin:left; transition:transform .35s ease; border-radius:var(--radius) var(--radius) 0 0;}
.info-card:hover::before{transform:scaleX(1);}
.info-card img{width:100%; height:170px; object-fit:cover; border-radius:12px; margin-bottom:16px;}
.icon-badge{width:54px; height:54px; border-radius:14px; background:var(--gold-soft); display:flex; align-items:center; justify-content:center; font-size:24px; margin-bottom:16px; box-shadow:inset 0 0 0 1.5px var(--gold-light);}
.info-card h3{color:var(--maroon); margin-bottom:8px; font-size:18px;}
.info-card .date{font-size:12.5px; color:var(--gold-dark); margin-bottom:10px; font-weight:700;}
.info-card p{font-size:14.5px; color:var(--text);}

/* Gallery */
.gallery-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:20px; max-width:1200px; margin:0 auto;}
.gallery-grid figure{margin:0; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); position:relative; aspect-ratio:4/3; cursor:pointer;}
.gallery-grid img{width:100%; height:100%; object-fit:cover; transition:.5s;}
.gallery-grid figure:hover img{transform:scale(1.08);}
.gallery-grid figcaption{position:absolute; bottom:0; left:0; right:0; background:rgba(0,0,0,.6); color:#fff; padding:18px 14px 10px; font-size:13px; font-weight:600;}

/* Lightbox */
.lightbox-overlay{position:fixed; inset:0; background:rgba(0,0,0,.92); z-index:900; display:flex; align-items:center; justify-content:center; opacity:0; visibility:hidden; transition:.25s;}
.lightbox-overlay.show{opacity:1; visibility:visible;}
.lightbox-overlay img{max-width:88%; max-height:82%; border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,.5);}
.lightbox-overlay .close{position:absolute; top:26px; right:26px; width:42px; height:42px; border-radius:50%; background:rgba(255,255,255,.15); color:#fff; border:none; font-size:20px;}
.lightbox-overlay .cap{position:absolute; bottom:40px; left:0; right:0; text-align:center; color:#fff; font-size:14px;}

/* Donors */
.donor-strip{display:flex; flex-wrap:wrap; gap:14px; max-width:1100px; margin:0 auto;}
.donor-chip{background:#fff; border:1px solid var(--gold-soft); border-left:4px solid var(--gold); border-radius:12px; padding:15px 22px; box-shadow:var(--shadow); display:flex; justify-content:space-between; gap:20px; min-width:240px; flex:1; transition:.25s;}
.donor-chip:hover{transform:translateY(-3px); box-shadow:var(--shadow-lg);}
.donor-chip .amt{color:var(--gold-dark); font-weight:800;}

/* Testimonials */
.testi-carousel{overflow:hidden; position:relative; max-width:840px; margin:0 auto;}
.testi-track{display:flex; transition:transform .6s ease;}
.testi-slide{flex:0 0 100%; padding:10px 40px; text-align:center;}
.testi-slide img{width:80px; height:80px; border-radius:50%; object-fit:cover; margin:0 auto 18px; border:4px solid var(--gold-soft); box-shadow:0 0 0 2.5px var(--gold);}
.testi-slide p{font-family:var(--font-accent); font-style:italic; font-size:19px; color:var(--text); max-width:640px; margin:0 auto 16px; line-height:1.7;}
.testi-slide .who{font-weight:700; color:var(--gold-dark); font-family:var(--font-ui);}
.testi-dots{display:flex; justify-content:center; gap:8px; margin-top:24px;}
.testi-dots span{width:9px; height:9px; border-radius:50%; background:#a5b4fc; cursor:pointer; transition:.2s;}
.testi-dots span.active{background:var(--gold-dark); width:24px; border-radius:5px;}

/* CTA */
.cta-banner{background:var(--maroon); border-radius:var(--radius-lg); padding:58px 6%; text-align:center; color:#fff; margin:0 6%; box-shadow:var(--shadow-lg); position:relative; overflow:hidden;}
.cta-banner::before{content:'✦'; position:absolute; top:18px; left:26px; font-size:20px; color:rgba(255,255,255,.35);}
.cta-banner::after{content:'✦'; position:absolute; bottom:18px; right:26px; font-size:20px; color:rgba(255,255,255,.35);}
.cta-banner h2{color:#fff; margin-bottom:10px; font-size:30px;}
.cta-banner p{opacity:.9; margin-bottom:26px; max-width:580px; margin-left:auto; margin-right:auto;}

/* ===================== FOOTER ===================== */
.site-footer{background:var(--dark); color:#E0F2FE; padding:0 0 22px; margin-top:0; position:relative;}
.site-footer::before{content:''; display:block; height:4px; background:var(--gold);}

.footer-cta{max-width:1200px; margin:0 auto; display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; padding:38px 6% 34px; border-bottom:1px solid rgba(255,255,255,.08);}
.footer-cta-text h3{color:#fff; font-size:20px; margin-bottom:6px;}
.footer-cta-text p{color:#CFCFCF; font-size:13px; margin:0;}
.footer-cta-actions{display:flex; gap:12px; flex-wrap:wrap;}
.btn-outline-light{background:transparent; border:1.5px solid rgba(255,255,255,.5); color:#fff;}
.btn-outline-light:hover{background:rgba(255,255,255,.12);}

.footer-grid{display:grid; grid-template-columns:1.5fr 1fr 1fr 1fr 1.2fr; gap:30px; padding:38px 6% 30px; max-width:1200px; margin:0 auto;}
.footer-grid h4{color:var(--gold-light); font-size:14px; margin-bottom:16px; font-family:var(--font-ui); text-transform:uppercase; letter-spacing:.5px; position:relative; padding-bottom:10px;}
.footer-grid h4::after{content:''; position:absolute; bottom:0; left:0; width:28px; height:2px; background:var(--gold);}
.footer-grid p, .footer-grid a{display:block; color:#CFCFCF; font-size:13.5px; margin-bottom:11px; transition:.2s;}
.footer-grid a:hover{color:var(--gold-light); transform:translateX(3px);}
.footer-grid a[href^="tel:"], .footer-grid a[href^="mailto:"]{display:inline; margin:0;}
.footer-brand{font-family:var(--font-display); font-size:21px; color:#fff; margin-bottom:14px; display:flex; align-items:center; gap:10px;}
.footer-brand-mark{width:38px; height:38px; border-radius:50%; background:var(--gold); display:flex; align-items:center; justify-content:center; font-size:17px; flex-shrink:0;}
.footer-brand-col p{color:#BDBDBD; line-height:1.75;}
.footer-social{display:flex; gap:10px; margin-top:16px;}
.footer-social a{width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); display:flex; align-items:center; justify-content:center; font-size:16px; margin:0; transition:.25s;}
.footer-social a:hover{background:var(--gold); border-color:var(--gold); transform:translateY(-3px);}

.footer-bottom{border-top:1px solid rgba(255,255,255,.08); padding:20px 6% 0; text-align:center; font-size:12.5px; color:#A8A8A8; max-width:1200px; margin:0 auto; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px;}
.back-to-top{background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); color:#c7d2fe; padding:8px 16px; border-radius:20px; font-size:11.5px; font-weight:700; cursor:pointer; transition:.25s;}
.back-to-top:hover{background:var(--gold); border-color:var(--gold); color:#0f172a;}

@media(max-width:1080px){ .footer-grid{grid-template-columns:1fr 1fr 1fr;} .footer-brand-col{grid-column:1/-1;} }
@media(max-width:860px){ .footer-grid{grid-template-columns:1fr 1fr; gap:24px;} .footer-cta{flex-direction:column; align-items:flex-start; text-align:left;} }

/* ===================== FORMS (auth pages) ===================== */
.auth-wrap{min-height:70vh; display:flex; align-items:center; justify-content:center; padding:60px 20px; background:var(--gold-soft);}
.auth-card{background:#fff; border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); padding:44px 38px; max-width:440px; width:100%;}
.auth-card .mark{width:60px; height:60px; border-radius:50%; background:var(--gold); display:flex; align-items:center; justify-content:center; font-size:26px; margin:0 auto 16px;}
.auth-card h2{text-align:center; font-size:26px; margin-bottom:6px;}
.auth-card .sub{text-align:center; color:var(--muted); font-size:13.5px; margin-bottom:28px;}
.field{margin-bottom:18px;}
.field label{font-size:12.5px; font-weight:700; color:var(--muted); display:block; margin-bottom:7px;}
.field input, .field select, .field textarea{width:100%; padding:13px 16px; border-radius:12px; border:1.5px solid var(--gold-light); background:#FFFFFF; color:var(--text); font-size:14px; font-family:inherit;}
.field input:focus, .field select:focus, .field textarea:focus{outline:none; border-color:var(--gold);}

/* Photo upload widget (file upload + URL paste fallback) */
.photo-input-group{display:flex; align-items:center; gap:10px; flex-wrap:wrap; border:1.5px dashed var(--gold-light); border-radius:12px; padding:12px; background:var(--gold-soft);}
.photo-input-group input[type=file]{flex:1; min-width:170px; font-size:12px; color:var(--muted);}
.photo-input-group input[type=file]::file-selector-button{background:var(--gold); color:#0f172a; border:none; padding:9px 16px; border-radius:20px; font-weight:700; font-size:11.5px; margin-right:10px; cursor:pointer; transition:.2s;}
.photo-input-group input[type=file]::file-selector-button:hover{background:var(--gold-dark);}
.photo-input-group .or-divider{font-size:11px; color:var(--muted); font-weight:700; flex-shrink:0;}
.photo-input-group input[type=text]{flex:1.4; min-width:170px; padding:10px 14px; font-size:13px;}
.upload-hint{display:block; font-size:10.5px; color:var(--muted); margin-top:6px;}
.current-photo-preview{display:flex; align-items:center; gap:10px; margin-bottom:10px; font-size:12px; color:var(--muted);}
.current-photo-preview img{width:44px; height:44px; border-radius:10px; object-fit:cover; border:1.5px solid var(--gold-light);}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:13px 28px; border-radius:30px; font-weight:700; font-size:14px; border:none; transition:.2s; cursor:pointer;}
.btn:active{transform:scale(.97);}
.btn-primary{background:var(--gold); color:#0f172a; box-shadow:0 8px 20px rgba(2,132,199,.4);}
.btn-primary:hover{background:var(--gold-dark);}
.btn-block{width:100%;}
.btn-outline{background:transparent; border:1.5px solid var(--gold); color:var(--gold-dark);}
.btn-danger{background:#DC2626; color:#fff;}
.btn-sm{padding:9px 18px; font-size:12.5px;}
.auth-foot{text-align:center; margin-top:22px; font-size:13px; color:var(--muted);}
.auth-foot a{color:var(--gold-dark); font-weight:700;}
.alert{padding:13px 16px; border-radius:12px; font-size:13.5px; margin-bottom:18px; font-weight:600;}
.alert-error{background:#FEE2E2; color:#DC2626; border:1px solid #FECACA;}
.alert-success{background:#eef2ff; color:#312e81; border:1px solid #a5b4fc;}

/* ===================== REVEAL ANIMATION ===================== */
.reveal{opacity:0; transform:translateY(30px); transition:opacity .8s ease, transform .8s ease;}
.reveal.show{opacity:1; transform:translateY(0);}

/* ===================== FAMILY TREE / वंशावली (3D) ===================== */
.tree-scroll{
  position:relative; overflow:hidden; height:70vh; min-height:380px; padding:0;
  perspective:1400px; perspective-origin:50% 20%;
  touch-action:none; user-select:none; -webkit-user-select:none; cursor:grab;
  border:1.5px solid var(--gold-light); border-radius:14px; background:rgba(255,255,255,.4);
}
.tree-scroll.dragging{cursor:grabbing;}
.tree-container{
  position:absolute; top:0; left:0; width:max-content; margin:0; display:flex; flex-direction:column; align-items:center;
  transform-style:preserve-3d; transform-origin:50% 0;
  transition:transform .12s ease-out;
}
.tree-container.dragging{transition:none;}
.tree-row{
  display:flex; justify-content:center; gap:36px; position:relative; padding-top:40px; margin-bottom:10px;
  transform-style:preserve-3d;
  transition:transform .5s ease;
}
.tree-row.gen-first{padding-top:0;}
.tree-row:not(.gen-first)::before{content:''; position:absolute; top:0; left:60px; right:60px; height:2px; background:var(--gold-light);}
.tree-gen-label{position:absolute; top:8px; left:50%; transform:translateX(-50%) translateZ(1px); background:var(--gold-soft); color:var(--gold-dark); font-size:10.5px; font-weight:700; padding:3px 14px; border-radius:20px; white-space:nowrap;}
.tree-card{
  position:relative; background:#fff; border-radius:16px; padding:16px 14px; text-align:center;
  box-shadow:0 10px 20px -8px rgba(0,0,0,.18), var(--shadow);
  border:1.5px solid #E0F2FE; width:130px; flex-shrink:0;
  transform-style:preserve-3d;
  transform:rotateX(6deg) translateZ(0px);
  transition:transform .35s cubic-bezier(.22,.85,.32,1.15), box-shadow .35s;
  will-change:transform;
}
.tree-card:hover{
  transform:rotateX(0deg) translateY(-8px) translateZ(30px) scale(1.05);
  box-shadow:0 26px 42px -14px rgba(0,0,0,.28), var(--shadow-lg);
  border-color:var(--gold);
  z-index:5;
}
.tree-row:not(.gen-first) .tree-card::before{content:''; position:absolute; top:-40px; left:50%; width:2px; height:40px; background:var(--gold-light);}
.tree-card.self-node{border-color:var(--maroon); box-shadow:0 0 0 3px rgba(220,38,38,.12), 0 12px 24px -8px rgba(220,38,38,.3);}
.tree-card.self-node:hover{box-shadow:0 0 0 3px rgba(220,38,38,.16), 0 26px 42px -14px rgba(220,38,38,.4);}
.tree-card .avatar{width:56px; height:56px; border-radius:50%; object-fit:cover; margin:0 auto 8px; border:3px solid var(--gold-soft); box-shadow:0 0 0 2px var(--gold); transform:translateZ(6px);}
.tree-card .avatar-emoji{width:56px; height:56px; border-radius:50%; margin:0 auto 8px; background:var(--gold-soft); display:flex; align-items:center; justify-content:center; font-size:26px; transform:translateZ(6px);}
.tree-card h4{font-size:12px; color:var(--text); margin-bottom:3px; line-height:1.3;}
.tree-card .rel{font-size:10px; color:var(--gold-dark); font-weight:700;}
.tree-card .yr{font-size:9.5px; color:var(--muted); margin-top:2px;}
.tree-legend{display:flex; gap:16px; flex-wrap:wrap; justify-content:center; margin-top:24px; font-size:11.5px; color:var(--muted); align-items:center;}
.tree-3d-toggle{border:1.5px solid var(--gold); background:#fff; color:var(--gold-dark); font-size:11px; font-weight:700; padding:4px 12px; border-radius:20px; cursor:pointer;}
.tree-3d-toggle.on{background:var(--gold); color:#0f172a;}
.tree-toolbar{display:flex; gap:8px; flex-wrap:wrap; justify-content:center; align-items:center; margin-top:14px;}
.tree-toolbar button:not(.tree-3d-toggle){border:1.5px solid var(--gold); background:#fff; color:var(--gold-dark); font-size:12px; font-weight:700; padding:5px 12px; border-radius:20px; cursor:pointer;}
.tree-toolbar button:not(.tree-3d-toggle):hover{background:var(--gold-soft);}
.tree-toolbar #zoomLabel{font-size:12px; font-weight:700; min-width:44px; text-align:center; color:var(--gold-dark);}
.tree-card.rel-hit{border-color:#1a7f37 !important; box-shadow:0 0 0 4px rgba(26,127,55,.22), var(--shadow-lg) !important;}
.tree-3d-hint{font-size:10.5px; color:var(--muted); opacity:.8;}
/* जब 3D बंद हो: सामान्य फ्लैट व्यू */
.tree-scroll.no3d{perspective:none;}
.tree-scroll.no3d .tree-row{transform:none !important;}
.tree-scroll.no3d .tree-card{transform:none !important;}
.tree-scroll.no3d .tree-card:hover{transform:translateY(-4px) !important; box-shadow:var(--shadow-lg);}
.tree-scroll.no3d .tree-card .avatar, .tree-scroll.no3d .tree-card .avatar-emoji{transform:none;}

/* 📞 मोबाइल नंबर ट्रेस हाइलाइट */
.phone-trace-banner{margin-top:10px; display:inline-block; background:#eef2ff; color:#312e81; border:1.5px solid #a5b4fc; padding:8px 18px; border-radius:20px; font-size:12.5px; font-weight:600;}
.tree-card.phone-match{border-color:#312e81 !important; box-shadow:0 0 0 4px rgba(2,132,199,.25), var(--shadow-lg) !important; animation:phonePulse 1.6s ease-in-out 3;}
.phone-match-badge{position:absolute; top:-10px; right:-10px; background:#312e81; color:#fff; width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; box-shadow:var(--shadow); z-index:2;}
@keyframes phonePulse{
  0%, 100% { box-shadow:0 0 0 4px rgba(2,132,199,.25), var(--shadow-lg); }
  50% { box-shadow:0 0 0 9px rgba(2,132,199,.12), var(--shadow-lg); }
}
@media(max-width:900px){
  .tree-row{gap:18px;}
  .tree-card{width:100px; padding:12px 8px;}
  .tree-card .avatar, .tree-card .avatar-emoji{width:44px; height:44px;}
  .tree-card h4{font-size:10.5px;}
}
.admin-shell{display:flex; min-height:100vh; background:#F7F7F7;}
.admin-sidebar{width:250px; background:var(--dark); color:#fff; flex-shrink:0; padding:26px 16px; position:sticky; top:0; height:100vh; overflow-y:auto;}
.admin-sidebar .brand{font-family:var(--font-display); font-size:18px; margin-bottom:30px; display:flex; align-items:center; gap:10px;}
.admin-sidebar a{display:flex; align-items:center; gap:12px; color:#E0E0E0; padding:12px 14px; border-radius:12px; font-size:13.5px; font-weight:600; margin-bottom:4px; transition:.2s;}
.admin-sidebar a:hover, .admin-sidebar a.active{background:rgba(255,255,255,.1); color:#fff;}
.admin-sidebar .grp{font-size:10.5px; text-transform:uppercase; letter-spacing:1.5px; color:#4f46e5; margin:22px 0 8px 14px;}
.admin-main{flex:1; min-width:0;}
.admin-topbar{background:#fff; padding:18px 30px; display:flex; justify-content:space-between; align-items:center; box-shadow:0 2px 10px rgba(0,0,0,.04); position:sticky; top:0; z-index:20;}
.admin-topbar h1{font-size:20px;}
.admin-content{padding:28px 30px;}
.admin-stat-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:20px; margin-bottom:28px;}
.admin-stat-card{background:#fff; border-radius:16px; padding:22px; box-shadow:var(--shadow); display:flex; align-items:center; gap:16px;}
.admin-stat-card .ic{width:52px; height:52px; border-radius:14px; background:var(--gold-soft); display:flex; align-items:center; justify-content:center; font-size:24px;}
.admin-stat-card .num{font-size:26px; font-weight:800; color:var(--maroon); font-family:var(--font-display);}
.admin-stat-card .lbl{font-size:12px; color:var(--muted); font-weight:600;}
.admin-panel{background:#fff; border-radius:18px; box-shadow:var(--shadow); padding:24px; margin-bottom:24px;}
.admin-panel h3{font-size:16px; margin-bottom:16px;}
.admin-table{width:100%; border-collapse:collapse;}
.admin-table th{text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); padding:10px 12px; border-bottom:2px solid var(--gold-soft);}
.admin-table td{padding:12px; border-bottom:1px solid #E0F2FE; font-size:13.5px;}
.admin-table tr:hover{background:var(--gold-soft);}
.pill{display:inline-block; padding:4px 12px; border-radius:20px; font-size:11px; font-weight:700;}
.pill-green{background:#eef2ff; color:#312e81;}
.pill-gold{background:var(--gold-soft); color:var(--gold-dark);}
.pill-red{background:#FEE2E2; color:#DC2626;}
.admin-mobtoggle{display:none;}

@media(max-width:900px){
  .admin-sidebar{position:fixed; left:-260px; top:0; z-index:300; transition:.3s; box-shadow:8px 0 30px rgba(0,0,0,.3);}
  .admin-sidebar.open{left:0;}
  .admin-mobtoggle{display:flex;}
  .admin-content{padding:18px 14px;}
  .admin-topbar{padding:14px 16px;}
}

/* ============================================================
   RESPONSIVE BREAKPOINT — MOBILE = APP UI, DESKTOP = FULL SITE
   ============================================================ */
@media(max-width:900px){
  /* Hide desktop chrome, show app chrome */
  .site-header{display:none;}
  .site-footer .footer-grid, .site-footer .footer-bottom, .site-footer .footer-cta{display:none;}
  .site-footer::before{display:none;}
  .site-footer{padding:0;}

  body{padding-bottom:calc(64px + var(--safe-bottom));}

  .mobile-appbar{
    display:flex; align-items:center; gap:10px; position:sticky; top:0; z-index:150;
    background:var(--maroon);
    color:#fff; padding:calc(9px + var(--safe-top)) 14px 10px; box-shadow:0 4px 14px rgba(0,0,0,.18);
    transition:padding .2s ease;
  }
  .mobile-appbar .icon-btn{width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,.16); border:none; color:#fff; font-size:14px; display:flex; align-items:center; justify-content:center; flex-shrink:0; position:relative;}
  .mobile-appbar .icon-btn .dot-badge{position:absolute; top:5px; right:5px; width:6px; height:6px; background:#DC2626; border-radius:50%;}
  .mobile-appbar .mob-title{flex:1; font-family:var(--font-display); font-size:14.5px; font-weight:700; line-height:1.2;}
  .mobile-appbar .mob-title small{display:block; font-size:8px; font-weight:400; letter-spacing:1.2px; opacity:.8; font-family:var(--font-ui);}
  .mobile-appbar .avatar{width:29px; height:29px; border-radius:50%; background:var(--gold); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:11px; border:2px solid rgba(255,255,255,.5); color:#fff; flex-shrink:0;}

  .mob-menu-overlay{display:block; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:400; opacity:0; visibility:hidden; transition:.25s;}
  .mob-menu-overlay.show{opacity:1; visibility:visible;}
  .mob-menu-sheet{position:absolute; left:0; right:0; top:0; background:var(--bg); border-radius:0 0 22px 22px; padding:14px 16px 18px; transform:translateY(-100%); transition:transform .35s cubic-bezier(.22,.9,.3,1); max-height:82%; overflow-y:auto;}
  .mob-menu-overlay.show .mob-menu-sheet{transform:translateY(0);}
  .mob-menu-sheet .handle{width:38px; height:4px; background:var(--gold-light); border-radius:4px; margin:4px auto 14px;}
  .mob-menu-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:9px;}
  .mob-tile{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; background:var(--card); border:1px solid var(--gold-soft); border-radius:14px; padding:12px 4px; font-size:10.5px; font-weight:700; color:var(--text); text-align:center; box-shadow:var(--shadow); transition:.2s;}
  .mob-tile span{font-size:19px;}
  .mob-tile:active{transform:scale(.94); background:var(--gold-soft);}
  .mob-menu-cta{display:block; text-align:center; margin-top:14px; padding:12px; border-radius:30px; background:var(--maroon); color:#fff; font-weight:700; font-size:13px;}

  .bottom-nav{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:200;
    background:var(--card); border-top:1px solid rgba(0,0,0,.06); padding:8px 4px calc(8px + var(--safe-bottom));
    box-shadow:0 -4px 16px rgba(0,0,0,.08);
  }
  .bottom-nav .nav-btn{flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 2px; color:var(--muted); font-size:9.5px; font-weight:700;}
  .bottom-nav .nav-btn .ic{font-size:20px; transition:.2s;}
  .bottom-nav .nav-btn.active{color:var(--maroon);}
  .bottom-nav .nav-btn.active .ic{transform:translateY(-2px);}

  .fab-whatsapp{display:flex; align-items:center; justify-content:center; position:fixed; right:16px; bottom:calc(80px + var(--safe-bottom)); width:52px; height:52px; border-radius:50%; background:#25D366; color:#fff; font-size:22px; box-shadow:0 10px 22px rgba(0,0,0,.3); z-index:150;}

  /* Hero compact on mobile */
  .hero{height:440px;}
  .hero .slide{height:440px;}
  .hero-content h1{font-size:34px;}
  .hero-content p{font-size:14px;}
  .hero-btns{gap:10px;}
  .hero-btn{padding:12px 22px; font-size:12.5px;}

  .stats-strip{margin:-36px 4% 0; border-radius:16px;}
  .stats-strip .stat{padding:18px 6px;}
  .stats-strip .stat .num{font-size:24px;}
  .stats-strip .stat .lbl{font-size:10px;}

  .section{padding:48px 4%;}
  .section-head{margin-bottom:30px;}
  .section-head h2{font-size:24px;}

  .quick-tiles{grid-template-columns:repeat(3,1fr); gap:12px;}
  .quick-tile{padding:16px 6px; border-radius:14px;}
  .quick-tile .emoji{font-size:24px;}
  .quick-tile .lbl{font-size:10.5px;}

  .card-grid{grid-template-columns:repeat(2,1fr); gap:12px;}
  .people-card{padding:16px 8px;}
  .people-card img{width:64px; height:64px;}
  .people-card h3{font-size:12.5px;}
  .people-card .role{font-size:10.5px;}

  .info-card{padding:16px;}
  .info-card img{height:130px;}

  .gallery-grid{grid-template-columns:repeat(3,1fr); gap:8px;}

  .donor-chip{min-width:0; padding:11px 14px; font-size:12px;}

  .testi-slide{padding:6px 12px;}
  .testi-slide p{font-size:14px;}

  .cta-banner{margin:0 4%; padding:34px 5%;}
  .cta-banner h2{font-size:19px;}

  .about-grid .badge-float{right:auto; left:16px; bottom:-18px; padding:14px 18px;}
  .about-grid .badge-float .n{font-size:20px;}

  .auth-wrap{padding:30px 16px; min-height:auto;}
  .auth-card{padding:30px 22px;}

  .admin-sidebar{width:250px;}
}

/* ==========================================================
   USER DASHBOARD (advanced) — White / Black / Red / Golden
   ========================================================== */
.dash{max-width:1240px; margin:0 auto; padding:34px 5% 70px;}
.pill-pending{background:#F1F1F1; color:#444;}

/* ---- Hero ---- */
.dash-hero{background:var(--dark); color:#fff; border-radius:22px; padding:30px 34px; display:flex; align-items:center; justify-content:space-between; gap:28px; border-bottom:5px solid var(--gold); margin-bottom:22px;}
.dash-hero-main{display:flex; align-items:center; gap:24px; min-width:0;}
.dash-avatar{width:104px; height:104px; border-radius:50%; border:4px solid var(--gold); background:var(--maroon); color:#fff; display:flex; align-items:center; justify-content:center; font-size:42px; font-weight:800; overflow:hidden; flex-shrink:0;}
.dash-avatar img{width:100%; height:100%; object-fit:cover;}
.dash-avatar.sm{width:78px; height:78px; font-size:30px; border-width:3px;}
.dash-greet{color:var(--gold); font-weight:700; font-size:14px; letter-spacing:.5px;}
.dash-hero h1{font-size:30px; margin:4px 0 12px; color:#fff; line-height:1.25;}
.dash-meta{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:16px;}
.dash-chip{background:rgba(255,255,255,.12); padding:4px 12px; border-radius:20px; font-size:12px; font-weight:600;}
.dash-hero-actions{display:flex; flex-wrap:wrap; gap:10px;}
.dash-btn-gold{background:var(--gold); color:#0f172a;}
.dash-btn-gold:hover{background:var(--gold-light);}
.dash-btn-ghost{background:transparent; color:#fff; border:1.5px solid rgba(255,255,255,.45);}
.dash-btn-ghost:hover{border-color:var(--gold); color:var(--gold);}
.dash-btn-red{background:var(--maroon); color:#fff;}
.dash-btn-red:hover{background:var(--maroon-dark);}
.dash-btn-ghost-dark{background:#fff; color:var(--dark); border:1.5px solid #D9D9D9;}
.dash-btn-ghost-dark:hover{border-color:var(--maroon); color:var(--maroon);}

/* progress ring */
.dash-ring-wrap{text-align:center; flex-shrink:0;}
.dash-ring{position:relative; width:128px; height:128px; margin:0 auto;}
.dash-ring svg{width:100%; height:100%; transform:rotate(-90deg);}
.dash-ring circle{fill:none; stroke-width:9;}
.dash-ring .bg{stroke:rgba(255,255,255,.15);}
.dash-ring .fg{stroke:var(--gold); stroke-linecap:round; transition:stroke-dashoffset 1.2s ease;}
.dash-ring-num{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:800; color:#fff;}
.dash-ring-num small{font-size:14px; margin-left:1px; color:var(--gold);}
.dash-ring-label{font-size:12px; margin-top:8px; color:rgba(255,255,255,.75); font-weight:600;}

.dash-flash{margin-bottom:18px;}

/* birthday banner */
.dash-bday-banner{display:flex; align-items:center; gap:16px; background:var(--gold-soft); border:2px solid var(--gold); border-radius:16px; padding:14px 20px; margin-bottom:18px; flex-wrap:wrap;}
.dash-bday-banner .cake{font-size:34px;}
.dash-bday-banner .txt{flex:1; min-width:200px; display:flex; flex-direction:column; gap:2px;}
.dash-bday-banner .txt b{color:var(--dark); font-size:15px;}
.dash-bday-banner .txt span{color:var(--muted); font-size:13px;}

/* ---- Stats ---- */
.dash-stats{display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:22px;}
.dash-stat{background:#fff; border-radius:16px; padding:20px; display:flex; align-items:center; gap:14px; box-shadow:var(--shadow); border-left:4px solid var(--gold);}
.dash-stat:nth-child(even){border-left-color:var(--maroon);}
.dash-stat .ic{width:50px; height:50px; border-radius:14px; background:var(--gold-soft); display:flex; align-items:center; justify-content:center; font-size:24px; flex-shrink:0;}
.dash-stat .num{font-size:28px; font-weight:800; color:var(--dark); line-height:1;}
.dash-stat .lbl{font-size:12.5px; color:var(--muted); font-weight:600; margin-top:4px;}

/* ---- Tabs ---- */
.dash-tabs{display:flex; gap:8px; overflow-x:auto; background:#fff; padding:8px; border-radius:16px; box-shadow:var(--shadow); margin-bottom:22px; position:sticky; top:8px; z-index:20; scrollbar-width:none;}
.dash-tabs::-webkit-scrollbar{display:none;}
.dash-tab{flex:1; min-width:max-content; display:flex; align-items:center; justify-content:center; gap:7px; padding:12px 18px; border:none; border-radius:11px; background:transparent; font-weight:700; font-size:13.5px; color:var(--text); cursor:pointer; position:relative; transition:.2s; font-family:inherit;}
.dash-tab:hover{background:var(--gold-soft);}
.dash-tab.on{background:var(--dark); color:var(--gold);}
.dash-badge{background:var(--maroon); color:#fff; font-style:normal; font-size:10.5px; min-width:18px; height:18px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; padding:0 5px;}
.dash.js .dash-panel{display:none;}
.dash.js .dash-panel.on{display:block; animation:dashFade .35s ease;}
@keyframes dashFade{from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:none;}}

/* ---- Cards & grid ---- */
.dash-grid{display:grid; grid-template-columns:1.15fr 1fr; gap:20px; align-items:start;}
.dash-col{display:flex; flex-direction:column; gap:20px; min-width:0;}
.dash-card{background:#fff; border-radius:18px; padding:22px; box-shadow:var(--shadow); margin-bottom:20px; min-width:0;}
.dash-col .dash-card, .dash-grid .dash-card{margin-bottom:0;}
.dash-card-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; flex-wrap:wrap;}
.dash-card-head h3{font-size:16.5px; color:var(--dark); margin:0;}
.dash-head-actions{display:flex; gap:8px; flex-wrap:wrap;}
.dash-link{color:var(--maroon); font-weight:700; font-size:12.5px;}
.dash-link:hover{color:var(--gold-dark);}
.dash-muted{color:var(--muted); font-size:12.5px; font-weight:600;}
.dash-empty{text-align:center; color:var(--muted); font-size:13.5px; padding:22px 10px; line-height:1.8;}
.dash-empty.big{padding:44px 16px;}
.dash-empty.big .em{font-size:52px; margin-bottom:8px;}
.dash-empty.big b{display:block; color:var(--dark); font-size:16px; margin-bottom:6px;}
.dash-empty.big p{margin-bottom:18px;}

/* quick actions */
.dash-quick{display:grid; grid-template-columns:repeat(4,1fr); gap:12px;}
.dash-quick-item{display:flex; flex-direction:column; gap:3px; padding:16px; border-radius:14px; border:1.5px solid #EEE; background:#fff; transition:.2s;}
.dash-quick-item .qi{font-size:26px; margin-bottom:4px;}
.dash-quick-item b{font-size:13.5px; color:var(--dark);}
.dash-quick-item small{font-size:11.5px; color:var(--muted);}
.dash-quick-item:hover{border-color:var(--gold); background:var(--gold-soft); transform:translateY(-3px);}

/* checklist */
.dash-progress{height:8px; background:#EEE; border-radius:8px; overflow:hidden; margin-bottom:14px;}
.dash-progress .bar{height:100%; background:var(--gold); border-radius:8px; transition:width 1s;}
.dash-checklist{list-style:none; margin:0; padding:0;}
.dash-checklist li{display:flex; align-items:center; gap:12px; padding:9px 0; border-bottom:1px dashed #EEE; font-size:13.5px;}
.dash-checklist li:last-child{border-bottom:none;}
.dash-checklist .tick{width:22px; height:22px; border-radius:50%; border:2px solid #CFCFCF; display:flex; align-items:center; justify-content:center; font-size:12px; color:#fff; flex-shrink:0;}
.dash-checklist li.done .tick{background:var(--gold); border-color:var(--gold); color:#0f172a;}
.dash-checklist li.done .lbl{color:var(--muted); text-decoration:line-through;}
.dash-checklist .lbl{flex:1; font-weight:600;}
.dash-checklist .go{background:none; border:none; color:var(--maroon); font-weight:700; font-size:12.5px; cursor:pointer; font-family:inherit;}

/* events / countdown */
.dash-event, .dash-bday, .dash-sch, .dash-news{display:flex; align-items:center; gap:14px; padding:12px 0; border-bottom:1px solid #F0F0F0;}
.dash-event:last-child, .dash-bday:last-child, .dash-sch:last-child, .dash-news:last-child{border-bottom:none;}
.dash-event .date{width:56px; height:60px; border-radius:12px; background:var(--dark); color:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; flex-shrink:0;}
.dash-event .date b{font-size:21px; line-height:1; color:var(--gold);}
.dash-event .date small{font-size:10.5px; margin-top:3px;}
.dash-event .info, .dash-bday .info, .dash-sch .info{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px;}
.dash-event .info b, .dash-bday .info b, .dash-sch .info b, .dash-news b{font-size:13.5px; color:var(--dark); line-height:1.5;}
.dash-event .info span, .dash-bday .info span, .dash-sch .info span, .dash-news small{font-size:12px; color:var(--muted);}
.dash-countdown{background:var(--gold-soft); color:var(--gold-dark); font-weight:800; font-size:12px; padding:6px 12px; border-radius:20px; white-space:nowrap; border:1px solid var(--gold-light);}
.dash-countdown.soon{background:var(--maroon); color:#fff; border-color:var(--maroon);}
.dash-bday .em{font-size:30px; width:44px; text-align:center;}
.dash-sch{flex-wrap:wrap;}
.dash-sch .right{display:flex; flex-direction:column; align-items:flex-end; gap:8px;}
.dash-sch .right small{font-size:11.5px; color:var(--muted); font-weight:600;}
.dash-sch .right small.urgent{color:var(--maroon);}
.dash-news img{width:62px; height:50px; border-radius:10px; object-fit:cover; flex-shrink:0;}
.dash-news div{display:flex; flex-direction:column; gap:3px;}

/* donor */
.dash-donor{border-top:4px solid var(--gold);}
.dash-donor.wait{border-top-color:var(--maroon);}
.dash-donor-body{display:flex; align-items:center; gap:16px;}
.dash-donor-body .grp{width:64px; height:64px; border-radius:50%; background:var(--maroon); color:#fff; font-size:21px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.dash-donor-body b{display:block; color:var(--dark); font-size:14px; margin-bottom:4px;}
.dash-donor-body span{font-size:12.5px; color:var(--muted);}

/* timeline */
.dash-timeline{list-style:none; margin:0; padding:0 0 0 6px; position:relative;}
.dash-timeline::before{content:''; position:absolute; left:23px; top:8px; bottom:8px; width:2px; background:var(--gold-light);}
.dash-timeline li{display:flex; gap:14px; padding:9px 0; position:relative;}
.dash-timeline .dot{width:36px; height:36px; border-radius:50%; background:#fff; border:2px solid var(--gold); display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; z-index:1;}
.dash-timeline b{display:block; font-size:13px; color:var(--dark); line-height:1.5;}
.dash-timeline small{font-size:11.5px; color:var(--muted);}

/* family */
.dash-family-meta{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px;}
.dash-chip-dark{background:var(--dark); color:#fff; padding:5px 14px; border-radius:20px; font-size:12px; font-weight:600;}
.dash-members{display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:14px;}
.dash-member{border:1.5px solid #EEE; border-radius:16px; padding:18px 12px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:4px; background:#fff; transition:.2s;}
.dash-member:hover{border-color:var(--gold); box-shadow:var(--shadow);}
.dash-member .pic{width:66px; height:66px; border-radius:50%; object-fit:cover; border:3px solid var(--gold); margin-bottom:6px; display:flex; align-items:center; justify-content:center; background:var(--gold-soft); font-size:30px;}
.dash-member b{font-size:14px; color:var(--dark);}
.dash-member small{font-size:12px; color:var(--muted);}
.dash-member .tags{display:flex; flex-wrap:wrap; gap:5px; justify-content:center; margin-top:6px;}
.dash-member .tag{font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:12px; background:#F1F1F1; color:#444;}
.dash-member .tag.red{background:#FEE2E2; color:var(--maroon);}
.dash-member.add{border:2px dashed var(--gold); justify-content:center; color:var(--gold-dark); background:var(--gold-soft);}
.dash-member.add .pic{border:none; background:var(--gold); color:#0f172a; font-size:28px; font-weight:700;}
.dash-blood{margin-top:26px; padding-top:20px; border-top:1px dashed #E0E0E0; max-width:520px;}
.dash-blood h4{font-size:14px; margin-bottom:12px; color:var(--dark);}
.dash-blood .row{display:flex; align-items:center; gap:12px; margin-bottom:9px;}
.dash-blood .g{width:36px; font-weight:800; color:var(--maroon); font-size:13px;}
.dash-blood .track{flex:1; height:10px; background:#F0F0F0; border-radius:6px; overflow:hidden;}
.dash-blood .fill{height:100%; background:var(--maroon); border-radius:6px;}
.dash-blood .c{width:20px; font-weight:700; font-size:13px; text-align:right;}

/* applications */
.dash-filters{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px;}
.dash-filters button{border:1.5px solid #E0E0E0; background:#fff; padding:8px 16px; border-radius:20px; font-size:12.5px; font-weight:700; cursor:pointer; font-family:inherit; color:var(--text); transition:.2s;}
.dash-filters button:hover{border-color:var(--gold);}
.dash-filters button.on{background:var(--dark); color:var(--gold); border-color:var(--dark);}
.dash-sub{display:flex; align-items:center; gap:16px; padding:16px 0; border-bottom:1px solid #F0F0F0;}
.dash-sub:last-child{border-bottom:none;}
.dash-sub .ic{width:48px; height:48px; border-radius:14px; background:var(--gold-soft); display:flex; align-items:center; justify-content:center; font-size:23px; flex-shrink:0;}
.dash-sub .info{flex:1; min-width:0;}
.dash-sub .info b{display:block; font-size:14px; color:var(--dark);}
.dash-sub .info small{font-size:12px; color:var(--muted);}
.steps{display:flex; gap:6px; margin-top:10px; max-width:320px;}
.steps span{flex:1; font-size:10.5px; font-weight:700; text-align:center; padding-top:8px; color:#AAA; position:relative;}
.steps span::before{content:''; position:absolute; top:0; left:0; right:0; height:4px; border-radius:3px; background:#E8E8E8;}
.steps.s2 span:nth-child(-n+2)::before, .steps.s3 span::before{background:var(--gold);}
.steps.s2 span:nth-child(-n+2), .steps.s3 span{color:var(--dark);}
.steps.rej span:last-child::before{background:var(--maroon);}
.steps.rej span:last-child{color:var(--maroon);}

/* profile forms */
.dash-form .btn{margin-top:4px;}
.dash-photo-edit{display:flex; align-items:center; gap:16px; margin-bottom:18px;}
.dash-info{list-style:none; margin:0; padding:0;}
.dash-info li{display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px dashed #E8E8E8; font-size:13.5px;}
.dash-info li:last-child{border-bottom:none;}
.dash-info span{color:var(--muted); font-weight:600;}

/* ID card */
.dash-idcard-wrap{display:flex; justify-content:center; padding:10px 0 4px;}
.dash-idcard{width:100%; max-width:440px; background:#fff; border:2px solid var(--dark); border-radius:20px; overflow:hidden; box-shadow:0 14px 34px rgba(0,0,0,.18);}
.dash-idcard .top{background:var(--dark); color:#fff; padding:16px 22px; border-bottom:4px solid var(--gold);}
.dash-idcard .brand{font-weight:800; font-size:16px; color:var(--gold);}
.dash-idcard .top small{font-size:11.5px; letter-spacing:1px; color:rgba(255,255,255,.75);}
.dash-idcard .body{display:flex; gap:18px; padding:22px; align-items:center;}
.dash-idcard .photo{width:96px; height:116px; border-radius:12px; overflow:hidden; border:3px solid var(--maroon); background:var(--gold-soft); display:flex; align-items:center; justify-content:center; font-size:38px; font-weight:800; color:var(--maroon); flex-shrink:0;}
.dash-idcard .photo img{width:100%; height:100%; object-fit:cover;}
.dash-idcard h4{font-size:19px; color:var(--maroon); margin-bottom:8px;}
.dash-idcard p{font-size:13px; margin:3px 0; color:var(--text);}
.dash-idcard .foot{background:var(--maroon); color:#fff; display:flex; justify-content:space-between; gap:10px; padding:10px 22px; font-size:11.5px; font-weight:700;}

/* print only the card */
@media print{
  body.printing-card *{visibility:hidden;}
  body.printing-card #idCard, body.printing-card #idCard *{visibility:visible;}
  body.printing-card #idCard{position:fixed; left:50%; top:40px; transform:translateX(-50%); box-shadow:none;}
}

/* ---- Responsive ---- */
@media (max-width:980px){
  .dash-grid{grid-template-columns:1fr;}
  .dash-quick{grid-template-columns:repeat(2,1fr);}
  .dash-stats{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:680px){
  .dash{padding:20px 4% 60px;}
  .dash-hero{flex-direction:column; align-items:flex-start; padding:22px 20px;}
  .dash-hero-main{flex-direction:column; align-items:flex-start; gap:14px;}
  .dash-hero h1{font-size:24px;}
  .dash-ring-wrap{align-self:center;}
  .dash-avatar{width:84px; height:84px; font-size:34px;}
  .dash-tab{padding:11px 14px; font-size:12.5px;}
  .dash-sch .right{align-items:flex-start; width:100%;}
  .dash-idcard .body{flex-direction:column; text-align:center;}
}
/* ================= ADVANCED: PWA / notifications / countdown ================= */
.scroll-progress{position:fixed; top:0; left:0; height:3px; width:0; background:linear-gradient(90deg,var(--gold),var(--maroon)); z-index:9999; transition:width .1s;}
.notif-panel{position:fixed; top:calc(var(--safe-top) + 62px); right:16px; width:min(340px,calc(100vw - 32px)); background:#fff; border-radius:18px; box-shadow:var(--shadow-lg); border:1px solid var(--gold-light); z-index:1500; opacity:0; visibility:hidden; transform:translateY(-10px); transition:.25s; overflow:hidden;}
.notif-panel.show{opacity:1; visibility:visible; transform:none;}
.np-head{display:flex; justify-content:space-between; align-items:center; padding:14px 18px; background:var(--dark); color:var(--gold-light); font-size:14px;}
.np-head button{background:none; border:none; color:#fff; font-size:15px; cursor:pointer;}
.np-item{display:flex; gap:12px; padding:13px 18px; border-bottom:1px solid #E0F2FE; color:inherit;}
.np-item:hover{background:var(--gold-soft);} .np-item>span{font-size:20px;}
.np-item b{display:block; font-size:13px; line-height:1.35;} .np-item small{font-size:11.5px; color:var(--gold-dark); font-weight:600;}
.np-empty{padding:22px; text-align:center; color:var(--muted); font-size:13px;}
.nb-dot{position:absolute; top:2px; right:2px; width:8px; height:8px; background:var(--maroon); border-radius:50%;}
.install-banner{position:fixed; left:12px; right:12px; bottom:calc(var(--safe-bottom) + 78px); max-width:420px; margin:0 auto; background:var(--dark); color:#fff; border-radius:16px; padding:12px 14px; display:flex; align-items:center; gap:10px; z-index:1400; box-shadow:var(--shadow-lg); transform:translateY(160%); transition:.4s; font-size:13px; font-weight:600;}
.install-banner.show{transform:none;} .install-banner span{flex:1;}
.install-banner #installBtn{background:var(--gold); color:#0f172a; border:none; padding:8px 16px; border-radius:20px; font-weight:700; cursor:pointer;}
.install-banner #installX{background:none; border:none; color:#fff; opacity:.7; cursor:pointer; font-size:15px;}
.countdown-card{max-width:1100px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; background:linear-gradient(120deg,#000000,#2a0a10 65%,var(--maroon-dark)); color:#fff; border-radius:var(--radius-lg); padding:28px 32px; border-bottom:4px solid var(--gold); box-shadow:var(--shadow-lg);}
.countdown-card .eyebrow{color:var(--gold-light); font-weight:700; font-size:12px;}
.countdown-card h3{font-family:var(--font-display); font-size:22px; margin:6px 0 4px;} .countdown-card p{opacity:.8; font-size:13px; margin-bottom:14px;}
.cd-boxes{display:flex; gap:10px;}
.cd-boxes div{background:rgba(255,255,255,.1); border:1px solid rgba(2,132,199,.5); border-radius:14px; min-width:68px; padding:12px 6px; text-align:center; font-size:11px;}
.cd-boxes b{display:block; font-size:26px; color:var(--gold-light); font-family:var(--font-display); font-variant-numeric:tabular-nums;}
@media(max-width:700px){.countdown-card{padding:22px 18px; margin:0 14px;} .cd-boxes{width:100%; justify-content:space-between;} .cd-boxes div{min-width:0; flex:1;} .notif-panel{top:calc(var(--safe-top) + 58px);}}

/* ================= सूचना bell (DB आधारित) ================= */
.bell-count{position:absolute; top:-5px; right:-5px; min-width:17px; height:17px; padding:0 4px; border-radius:9px; background:#DC2626; color:#fff; font:700 10px/17px Poppins,sans-serif; text-align:center; pointer-events:none;}
.np-head span{display:flex; gap:10px; align-items:center;}
.np-readall{background:rgba(255,255,255,.14)!important; border-radius:10px; padding:3px 9px; font-size:11.5px!important;}
.np-item.unread{background:#FFF8E1; border-left:3px solid #DC2626;}
.np-foot{display:block; text-align:center; padding:12px; font-size:13px; font-weight:700; color:var(--gold-dark); background:var(--gold-soft);}
.np-list{max-width:760px; margin:0 auto; background:#fff; border-radius:18px; border:1px solid var(--gold-light); overflow:hidden;}
.np-list .np-item small{display:block; margin-top:2px;} .np-list .np-msg{display:block; font-size:12.5px; color:var(--muted); margin-top:3px; white-space:pre-line;}

/* ===================================================
   वंशावली ग्राफ़ / रिश्ता खोजक (v3)
   ========================================================== */
.vg-toolbar{display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:center; max-width:980px; margin:0 auto 20px;}
.vg-toolbar select{min-width:260px; padding:9px 12px; border-radius:10px; border:1px solid var(--gold-light); font:inherit; background:#fff;}
.vg-layout{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:18px; max-width:1200px; margin:0 auto;}
@media (max-width: 900px){ .vg-layout{grid-template-columns:1fr;} }
.vg-stage{position:relative; background:#fff; border-radius:18px; box-shadow:var(--shadow); overflow:hidden; min-height:480px;}
#vgSvg{display:block; width:100%; height:min(70vh,640px); touch-action:none; cursor:grab;}
#vgSvg:active{cursor:grabbing;}
.vg-status{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; text-align:center; padding:20px; color:var(--muted); font-weight:600; background:rgba(255,255,255,.85);}
.vg-link{stroke:var(--gold); stroke-width:2; stroke-opacity:.7;}
.vg-link.vg-spouse{stroke:#B91C1C; stroke-dasharray:6 5;}
.vg-node circle{stroke:#fff; stroke-width:2.5; filter:drop-shadow(0 2px 4px rgba(0,0,0,.2));}
.vg-node.is-root circle{stroke:var(--gold); stroke-width:4;}
.vg-node.is-selected circle{stroke:#1d1a14; stroke-width:3;}
.vg-node:focus{outline:none;}
.vg-node:focus circle{stroke:var(--gold); stroke-width:4;}
.vg-label{font-size:12px; font-weight:700; fill:#1d1a14; paint-order:stroke; stroke:#fff; stroke-width:3px;}
.vg-legend{position:absolute; left:12px; bottom:10px; display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:var(--muted); background:rgba(255,255,255,.9); padding:6px 10px; border-radius:10px;}
.vg-legend i{display:inline-block; width:22px; height:0; vertical-align:middle; margin-right:4px; border-top:2px solid var(--gold);}
.vg-legend .lg-dashed{border-top-style:dashed; border-color:#B91C1C;}
.vg-legend .lg-root{height:12px; width:12px; border:3px solid var(--gold); border-radius:50%; border-top:3px solid var(--gold);}
.vg-panel{background:#fff; border-radius:18px; box-shadow:var(--shadow); padding:20px; min-height:200px;}
.vg-panel-head{display:flex; gap:12px; align-items:center; margin-bottom:14px;}
.vg-panel-head h3{font-size:18px; margin:0;}
.vg-avatar{width:56px; height:56px; border-radius:50%; object-fit:cover; background:var(--gold-soft);}
.vg-dl{display:grid; grid-template-columns:auto 1fr; gap:6px 12px; font-size:13.5px; margin:0 0 14px;}
.vg-dl dt{color:var(--muted); font-weight:600;}
.vg-dl dd{margin:0; font-weight:600;}
.vg-actions{display:flex; gap:8px; flex-wrap:wrap;}
.vg-muted{color:var(--muted); font-size:13px;}
.vg-finder{display:grid; grid-template-columns:1fr 1fr auto; gap:14px; align-items:end; max-width:900px; margin:0 auto;}
.vg-finder label{display:flex; flex-direction:column; gap:6px; font-weight:600; font-size:13.5px;}
.vg-finder select{padding:10px 12px; border-radius:10px; border:1px solid var(--gold-light); font:inherit; background:#fff;}
@media (max-width: 700px){ .vg-finder{grid-template-columns:1fr;} }
.vg-result{background:#fff; border-radius:18px; box-shadow:var(--shadow); padding:26px; max-width:720px; margin:28px auto;}
.vg-result-head h3{font-size:24px; color:var(--maroon); margin:4px 0 8px;}
.vg-chain{list-style:none; padding:0; margin:18px 0 0;}
.vg-chain li{padding:10px 14px; background:var(--gold-soft); border-radius:12px; margin-bottom:6px;}
.vg-chain li.vg-step{background:none; padding:2px 14px; color:var(--gold-dark); font-size:12.5px; font-weight:700;}
.vg-chain small{display:block;}
/* ===================== AI + REAL-TIME ===================== */
.ai-fab{position:fixed; right:16px; bottom:calc(88px + var(--safe-bottom)); z-index:300; width:54px; height:54px; border-radius:50%; border:none; background:var(--maroon); color:#fff; font-size:26px; box-shadow:0 8px 22px rgba(0,0,0,.3); cursor:pointer;}
.ai-box{position:fixed; right:16px; bottom:calc(152px + var(--safe-bottom)); z-index:301; width:min(370px, calc(100vw - 24px)); height:min(520px, 68vh); background:#fff; border-radius:18px; box-shadow:var(--shadow-lg); display:none; flex-direction:column; overflow:hidden; border:1px solid var(--gold-light);}
.ai-box.open{display:flex;}
.ai-head{background:var(--maroon); color:#fff; padding:12px 16px; display:flex; justify-content:space-between; align-items:center;}
.ai-x{background:none; border:none; color:#fff; font-size:16px; cursor:pointer;}
.ai-msgs{flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; background:#F8FCFF;}
.ai-m{max-width:88%; padding:9px 13px; border-radius:14px; font-size:13.5px; line-height:1.6; word-wrap:break-word;}
.ai-m.bot{background:#fff; border:1px solid #E0F2FE; align-self:flex-start;}
.ai-m.me{background:var(--gold); color:#0f172a; align-self:flex-end;}
.ai-m a{color:var(--maroon); text-decoration:underline; font-weight:700;}
.ai-chips{padding:0 12px 8px; display:flex; flex-wrap:wrap; gap:6px;}
.ai-chips button{background:var(--gold-soft); border:1px solid var(--gold-light); border-radius:16px; padding:5px 11px; font-size:12px; cursor:pointer;}
.ai-in{display:flex; gap:8px; padding:10px; border-top:1px solid #E0F2FE;}
.ai-in input{flex:1; border:1.5px solid var(--gold-light); border-radius:20px; padding:9px 14px; font-size:13.5px; font-family:inherit;}
.ai-in button{border:none; background:var(--maroon); color:#fff; border-radius:50%; width:38px; height:38px; cursor:pointer;}
@media (min-width:901px){ .ai-fab{bottom:24px;} .ai-box{bottom:90px;} }

.push-ask{position:fixed; left:50%; transform:translateX(-50%); bottom:calc(90px + var(--safe-bottom)); z-index:310; background:#0f172a; color:var(--gold-light); padding:10px 14px; border-radius:30px; display:flex; gap:10px; align-items:center; font-size:12.5px; box-shadow:var(--shadow-lg); max-width:94vw;}
.push-ask .y{background:var(--gold); color:#0f172a; border:none; border-radius:20px; padding:6px 12px; font-weight:700; cursor:pointer;}
.push-ask .n{background:none; border:none; color:#fff; cursor:pointer;}

.match-badge{display:inline-flex; align-items:center; gap:8px; background:var(--mc,#312e81); color:#fff; border-radius:20px; padding:4px 12px; font-size:12px; margin-top:8px;}
.match-badge b{font-size:15px;}
.match-warn-chip{display:inline-block; margin:8px 0 0 6px; background:#FEE2E2; color:#DC2626; border:1px solid #FECACA; border-radius:20px; padding:3px 10px; font-size:11.5px; font-weight:700;}
.match-panel{background:#fff; border-radius:18px; box-shadow:var(--shadow); padding:22px; margin-bottom:24px; border-left:5px solid var(--mc,#312e81);}
.match-panel .big{font-size:38px; font-weight:800; color:var(--mc); font-family:var(--font-display);}
.match-bars div{display:flex; align-items:center; gap:10px; font-size:12.5px; margin-top:8px;}
.match-bars .bar{flex:1; height:8px; background:#E0F2FE; border-radius:6px; overflow:hidden;}
.match-bars .bar i{display:block; height:100%; background:var(--mc,#3730a3);}

.ai-bio-row{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px;}
.smart-note{max-width:720px; margin:-20px auto 30px; background:var(--gold-soft); border:1px solid var(--gold-light); border-radius:14px; padding:12px 16px; font-size:13.5px; text-align:center;}

.chat-shell{display:grid; grid-template-columns:300px 1fr; gap:0; max-width:1000px; margin:0 auto; background:#fff; border-radius:18px; box-shadow:var(--shadow); overflow:hidden; border:1px solid #E0F2FE; height:min(640px, 74vh);}
.chat-list{border-right:1px solid #E0F2FE; overflow-y:auto; background:#F8FCFF;}
.chat-empty{padding:20px; font-size:13px; color:var(--muted);}
.chat-item{display:flex; align-items:center; gap:10px; padding:13px 14px; border-bottom:1px solid #F3EAC8;}
.chat-item.on, .chat-item:hover{background:var(--gold-soft);}
.ci-ic{font-size:22px;} .ci-tx{flex:1; min-width:0;} .ci-tx b{display:block; font-size:14px; color:var(--maroon);} .ci-tx small{display:block; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.ci-badge,.chat-unread{background:var(--maroon); color:#fff; border-radius:12px; font-size:11px; padding:2px 8px; font-weight:700;}
.chat-unread{margin-left:4px;}
.chat-pane{display:flex; flex-direction:column; min-width:0; min-height:0;}
.chat-placeholder{margin:auto; color:var(--muted);}
.chat-head{display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid #E0F2FE;}
.chat-head .ch-title{flex:1;} .ch-title b{display:block; color:var(--maroon);} .ch-title small{color:var(--muted);}
.chat-back{display:none; font-size:20px;}
.chat-msgs{flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:8px; background:#F8FCFF;}
.cm{max-width:78%; display:flex; flex-direction:column;} .cm.mine{align-self:flex-end; align-items:flex-end;} .cm.theirs{align-self:flex-start;}
.cm-b{padding:9px 14px; border-radius:16px; font-size:14px; line-height:1.55; white-space:pre-wrap; word-wrap:break-word;}
.cm.mine .cm-b{background:var(--gold); color:#0f172a; border-bottom-right-radius:4px;} .cm.theirs .cm-b{background:#fff; border:1px solid #E0F2FE; border-bottom-left-radius:4px;}
.cm small{font-size:10.5px; color:var(--muted); margin-top:2px;}
.chat-input{display:flex; gap:10px; padding:12px; border-top:1px solid #E0F2FE; align-items:flex-end;}
.chat-input textarea{flex:1; border:1.5px solid var(--gold-light); border-radius:18px; padding:10px 14px; font-family:inherit; font-size:14px; resize:none;}
.chat-blocked{padding:14px; text-align:center; color:#DC2626; background:#FEE2E2; font-size:13px;}
@media (max-width:900px){
  .chat-shell{grid-template-columns:1fr; height:calc(100vh - 230px);}
  .chat-shell.has-active .chat-list{display:none;} .chat-shell:not(.has-active) .chat-pane{display:none;}
  .chat-back{display:block;}
}
