/* ═══════════════════════════════════════════════════════════════════════════
   gahoi-portal · style.css  ·  ROYAL THEME
   Drop-in replacement — preserves every class name and ID from the original.
   Just swap your existing style.css with this file.
   ═══════════════════════════════════════════════════════════════════════════
   Royal theme = the custom remix from the design canvas:
     · Maroon primary + gold accent + warm cream pages (the brand)
     · Editorial-style cream masthead with thin gold rule
     · Rich maroon → gold gradient heroes with floating sparkles + diya glow
     · Big Cormorant Garamond for display, Plus Jakarta Sans for UI, Mukta for हिन्दी
     · Count-up stats with radial halos, clean cards, refined shadows
     · Auto-scrolling marquee ticker, ornamental ◆ dividers, animated CTAs
   Includes: light + dark modes, all components, responsive breakpoints, and
   the Classic↔Royal toggle (search the bottom of the file for `.theme-toggle`).
   ═════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Mukta:wght@400;500;600;700&display=swap');

/* ─── 1. Design tokens (CSS custom properties) ───────────────────────────── */

:root {
  /* Brand */
  --primary:        #7a1f3d;
  --primary2:       #a01840;
  --primary-dark:   #3d0716;
  --accent:         #d4940a;
  --accent2:        #f0b429;

  /* Neutrals */
  --paper:          #fffefb;
  --light:          #faf3e3;        /* warm cream page background */
  --light-2:        #f5ecd4;
  --border:         #ebd9b8;        /* warm tan */
  --border-soft:    #f1e4c6;
  --text:           #1e1612;
  --muted:          #7a6e60;
  --muted-2:        #aa9d8c;

  /* Status */
  --success:        #2a6e48;
  --success-soft:   #e8f5ee;
  --error:          #b5312b;
  --error-soft:     #fcecea;
  --warning:        #7a5c00;
  --warning-soft:   #fff8e0;
  --info:           #1a73e8;
  --info-soft:      #e8f0fb;

  /* Type */
  --font-display:   'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-ui:        'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-hindi:     'Mukta', 'Plus Jakarta Sans', sans-serif;
  --font-mono:      'JetBrains Mono', ui-monospace, monospace;

  /* Geometry */
  --radius:         14px;
  --radius-sm:      10px;
  --radius-lg:      18px;
  --radius-pill:    999px;
  --btn-radius:     12px;

  /* Shadows */
  --shadow-xs:      0 1px 3px rgba(122, 31, 61, .06);
  --shadow-sm:      0 2px 10px rgba(122, 31, 61, .08);
  --shadow:         0 4px 20px rgba(122, 31, 61, .10);
  --shadow-lg:      0 12px 40px rgba(122, 31, 61, .18);
  --shadow-hover:   0 10px 30px rgba(122, 31, 61, .16);

  /* Motion */
  --transition:     all .22s cubic-bezier(.4, 0, .2, 1);
  --transition-fast: all .15s ease;

  /* Layout */
  --header-h:       88px;
  --nav-h:          54px;
  --ticker-h:       34px;

  /* Background gradient — animated for hero/CTAs */
  --grad-hero:      linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, var(--primary2) 100%);
  --grad-accent:    linear-gradient(135deg, var(--accent), var(--accent2));
  --grad-rule:      linear-gradient(90deg, transparent, var(--accent), transparent);
  --grad-strip:     linear-gradient(90deg, var(--primary), var(--accent), var(--primary));

  /* Ring focus */
  --ring:           0 0 0 3px rgba(212, 148, 10, .25);
}

/* ─── Dark mode ──────────────────────────────────────────────────────────── */

[data-theme="dark"] {
  --paper:        #1a0e14;
  --light:        #251820;
  --light-2:      #2e2028;
  --border:       #3a2632;
  --border-soft:  #2a1c24;
  --text:         #f4ecde;
  --muted:        #a89880;
  --muted-2:      #7a6a58;
  --primary:      #d4940a;
  --primary2:     #f0b429;
  --primary-dark: #7a4e00;
  --accent:       #e08fb5;
  --accent2:      #f0b429;
  --shadow-xs:    0 1px 3px rgba(0, 0, 0, .25);
  --shadow-sm:    0 2px 10px rgba(0, 0, 0, .35);
  --shadow:       0 4px 22px rgba(0, 0, 0, .45);
  --shadow-lg:    0 16px 48px rgba(0, 0, 0, .55);
  --shadow-hover: 0 10px 32px rgba(0, 0, 0, .55);
  --grad-hero:    linear-gradient(135deg, var(--light) 0%, var(--paper) 70%, var(--light) 100%);
  color-scheme:   dark;
}

/* ─── 2. Reset + base ────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-ui);
  background: var(--light);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Subtle paisley background — gold dots on cream */
  background-image:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4940a' fill-opacity='0.04'%3E%3Cpath d='M30 6 A24 24 0 0 1 30 54 A11 11 0 0 1 30 32 A13 13 0 0 0 30 6 Z' fill-rule='evenodd'/%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ─── 3. Animations ──────────────────────────────────────────────────────── */

@keyframes gpFadeUp {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes gpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gpGradShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes gpFloat {
  0%, 100% { transform: translateY(0) rotate(0); opacity: .7; }
  50%      { transform: translateY(-12px) rotate(180deg); opacity: 1; }
}
@keyframes gpShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes gpMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes gpRotateSlow {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}
@keyframes gpPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes gpGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(212, 148, 10, .35)); }
  50%      { filter: drop-shadow(0 0 14px rgba(212, 148, 10, .75)); }
}
@keyframes gpCountUp {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes gpSpin {
  to { transform: rotate(360deg); }
}

.fade-up      { animation: gpFadeUp .55s cubic-bezier(.2,.7,.3,1) both; }
.fade-up-d1   { animation-delay: .08s; }
.fade-up-d2   { animation-delay: .16s; }
.fade-up-d3   { animation-delay: .24s; }
.fade-up-d4   { animation-delay: .32s; }
.gp-glow      { animation: gpGlow 3.4s ease-in-out infinite; }
.gp-pulse     { animation: gpPulse 2.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── 4. Site Header ─────────────────────────────────────────────────────── */
/* Royal masthead — warm gold-gradient paper with maroon wordmark.
   Gives presence + color without the loud classic gold-shine. */

.site-header {
  background:
    linear-gradient(135deg,
      #f5dd9c 0%,
      #fbecc2 22%,
      #fffefb 50%,
      #fbecc2 78%,
      #f5dd9c 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg,
    var(--primary) 0%,
    var(--accent) 30%,
    var(--accent2) 50%,
    var(--accent) 70%,
    var(--primary) 100%);
  z-index: 2;
}
.site-header::after {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60%; max-width: 480px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, var(--accent2) 50%, var(--accent) 60%, transparent);
}
/* Subtle paisley/dot texture overlay */
.site-header-inner {
  position: relative;
  z-index: 1;
}
.site-header-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%237a1f3d' fill-opacity='0.04'%3E%3Cpath d='M20 4 Q15 14 20 24 Q25 14 20 4 Z'/%3E%3Ccircle cx='8' cy='8' r='1.5'/%3E%3Ccircle cx='32' cy='32' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: .55;
  z-index: -1;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 18px 18px;
  max-width: 920px;
  margin: 0 auto;
}
.header-logo {
  width: 78px; height: 78px;
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
  border: 3.5px solid var(--accent);
  box-shadow:
    0 5px 18px rgba(122, 31, 61, .32),
    0 0 0 2px var(--primary),
    inset 0 1px 0 rgba(255, 255, 255, .15);
  flex-shrink: 0;
}
.header-poet {
  width: 66px; height: 66px;
  object-fit: cover; object-position: top;
  border-radius: 50%;
  border: 3px solid var(--accent);
  flex-shrink: 0;
  box-shadow: 0 3px 14px rgba(122, 31, 61, .28);
}
.header-center { text-align: center; flex: 1; min-width: 0; padding: 0 6px; }
.header-title {
  font-family: var(--font-hindi);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .3px;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .55);
}
.header-sub {
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: .25em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: .85;
}
.header-marquee {
  font-size: .7rem;
  color: var(--primary-dark);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  opacity: .75;
}
.header-marquee span {
  display: inline-block;
  animation: gpMarquee 25s linear infinite;
}

/* ─── 5. Nav ─────────────────────────────────────────────────────────────── */

nav {
  background: var(--primary);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .15);
  border-bottom: 2px solid var(--accent);
}
.nav-logo {
  font-family: var(--font-display);
  color: var(--accent2);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-menu {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
  align-items: center;
  padding: 7px 0;
}
.nav-btn {
  background: none;
  border: 1.5px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .9);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: .76rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: .1px;
  transition: var(--transition);
}
.nav-btn:hover,
.nav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  /* keep font-weight same as normal (500) to prevent width shift; use text-shadow for bold appearance */
  text-shadow: 0 0 .5px currentColor, 0 1px 0 rgba(0,0,0,.05);
  box-shadow: 0 2px 12px rgba(212, 148, 10, .45);
  /* no transform — prevents layout shift */
}
.nav-btn.nlg {
  background: rgba(181, 49, 43, .2);
  border-color: rgba(181, 49, 43, .4);
}
.nav-btn.nlg:hover {
  background: var(--error);
  border-color: var(--error);
}
.nav-btn-auth {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  box-shadow: 0 2px 10px rgba(212, 148, 10, .35);
}
.nav-btn-auth:hover {
  background: var(--accent2);
  border-color: var(--accent2);
  color: var(--primary);
}
.nav-btn-profile {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
}
.nav-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad-accent);
  font-size: .74rem;
  font-weight: 800;
  color: #fff;
  border: 2px solid var(--accent2);
  flex-shrink: 0;
  overflow: hidden;
}
.nav-profile-label { font-size: .82rem; font-weight: 600; }
.nav-btn-messages {
  background: rgba(42, 110, 72, .2);
  border-color: rgba(42, 110, 72, .4);
  color: #b8e0c8;
  position: relative;
}
.nav-btn-messages:hover,
.nav-btn-messages.active {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.msg-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--error);
  color: #fff;
  border-radius: 10px;
  font-size: .62rem;
  font-weight: 800;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.notif-wrap { position: relative; display: inline-block; }
.notif-dot {
  position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px;
  background: var(--error);
  border-radius: 50%;
  border: 2px solid var(--primary);
  display: none;
}
.notif-dot.show {
  display: block;
  animation: gpPulse 1.5s ease infinite;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 600px) {
  .hamburger { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--primary);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px 20px;
    gap: 6px;
    border-top: 2px solid var(--accent);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
    z-index: 199;
  }
  .nav-menu.open { display: flex; }
  .nav-btn { text-align: center; font-size: .88rem; padding: 11px; }
}

/* ─── 6. Page layout ─────────────────────────────────────────────────────── */

.page-wrap {
  padding: 18px 16px 100px;
  max-width: 580px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  animation: gpFadeIn .35s ease;
}
.page-wrap.wide { max-width: 760px; }

/* ─── 7. Cards ───────────────────────────────────────────────────────────── */

.card {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 22px 20px;
  margin-bottom: 16px;
  position: relative;
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.38rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-sub {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 18px;
  line-height: 1.65;
}

/* ─── 8. Hero (rich maroon gradient with mandala) ────────────────────────── */

.hero,
.home-hero {
  background: var(--grad-hero);
  background-size: 200% 200%;
  animation: gpGradShift 18s ease-in-out infinite;
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(122, 31, 61, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.hero::before,
.home-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  background:
    radial-gradient(circle, rgba(212, 148, 10, .28) 0%, transparent 60%),
    repeating-conic-gradient(from 0deg, transparent 0deg 11.25deg, rgba(212, 148, 10, .08) 11.25deg 22.5deg);
  border-radius: 50%;
  animation: gpRotateSlow 60s linear infinite;
}
.hero::after,
.home-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(212, 148, 10, .15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1,
.home-hero h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  letter-spacing: .4px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.hero p,
.home-hero p {
  font-size: .9rem;
  opacity: .9;
  line-height: 1.65;
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, .92);
}
.hero-acc { color: var(--accent2); font-weight: 700; }

/* ─── 9. Section banners ─────────────────────────────────────────────────── */

.section-banner {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.section-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--grad-accent);
}
.section-banner.blue,
.section-banner.purple {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
}
.section-banner.gold {
  background: linear-gradient(135deg, #6e4800, #b87c08, var(--accent));
  color: #fff;
}
.section-banner.green {
  background: linear-gradient(135deg, #155235, #27735e);
  color: #fff;
}
.section-banner .sb-title {
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .1px;
}
.section-banner .sb-sub {
  color: rgba(255, 255, 255, .82);
  font-size: .76rem;
  margin-top: 2px;
}

/* ─── 10. Stat cards ─────────────────────────────────────────────────────── */

.stats-grid,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 480px) {
  .stats-grid, .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card,
.stat-card-home {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px 10px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.stat-card::before,
.stat-card-home::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-accent);
  border-radius: 0 0 2px 2px;
}
.stat-card::after,
.stat-card-home::after {
  content: '';
  position: absolute;
  top: -28px; right: -28px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 148, 10, .2), transparent 70%);
}
.stat-card:hover,
.stat-card-home:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.stat-card-home .stat-icon {
  font-size: 1.65rem;
  margin-bottom: 6px;
  position: relative;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -.01em;
  position: relative;
}
.stat-num-anim {
  display: inline-block;
  animation: gpCountUp .8s cubic-bezier(.34, 1.4, .64, 1) forwards;
}
.stat-label {
  font-family: var(--font-ui);
  font-size: .62rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 5px;
  position: relative;
}

/* ─── 11. Quick Actions (member home) ────────────────────────────────────── */

.qa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.qa-btn {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  font-family: var(--font-ui);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.qa-btn::after {
  content: '';
  position: absolute;
  top: -10px; right: -10px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 148, 10, .15), transparent 70%);
  transition: var(--transition);
}
.qa-btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.qa-btn:hover::after { transform: scale(1.4); }
.qa-btn .qa-icon { font-size: 1.6rem; margin-bottom: 5px; position: relative; }
.qa-btn .qa-label {
  font-size: .74rem;
  font-weight: 700;
  color: var(--primary);
  position: relative;
}
.ql-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 480px) {
  .ql-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── 12. Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: block;
  width: 100%;
  padding: 13px 18px;
  background: var(--primary);
  color: #fff;
  border: 1.5px solid var(--primary);
  border-radius: var(--btn-radius);
  font-family: var(--font-ui);
  font-size: .94rem;
  font-weight: 700;
  letter-spacing: .15px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(122, 31, 61, .35);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-accent {
  background: var(--grad-accent);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(212, 148, 10, .35);
}
.btn-accent:hover {
  background: var(--grad-accent);
  filter: brightness(1.06);
  box-shadow: 0 6px 22px rgba(212, 148, 10, .5);
}
.btn-success { background: var(--success); border-color: var(--success); }
.btn-success:hover { background: #1f5639; border-color: #1f5639; }
.btn-danger { background: var(--error); border-color: var(--error); }
.btn-danger:hover { background: #8e2520; border-color: #8e2520; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-sm {
  width: auto;
  display: inline-block;
  padding: 8px 16px;
  font-size: .82rem;
  border-radius: var(--radius-sm);
  min-height: 36px;
}
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.btn-wa {
  background: #25d366; color: #fff; border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: .82rem; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none;
  transition: var(--transition);
}
.btn-wa:hover { background: #1ebe5a; transform: translateY(-1px); }
.btn-call { background: var(--info); color: #fff; border: none; border-radius: var(--radius-sm); padding: 8px 16px; font-size: .82rem; font-weight: 700; cursor: pointer; display: inline-flex; gap: 5px; }
.btn-msg {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff; border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: .82rem; font-weight: 600;
  cursor: pointer;
  display: inline-flex; gap: 5px; align-items: center;
}
.btn-msg:hover { filter: brightness(1.08); }
.btn-digital-card {
  background: linear-gradient(135deg, #1b5e20, var(--success));
  color: #fff; font-weight: 700;
}

.link-btn {
  background: none; border: none;
  color: var(--primary);
  font-size: .88rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-ui);
  padding: 0;
}
.link-btn:hover { color: var(--accent); }

/* ─── 13. Forms ──────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; position: relative; }
.form-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.req { color: var(--error); }

input,
select,
textarea,
input[type="date"],
input[type="time"],
input[type="email"],
input[type="tel"],
input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"] {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: .92rem;
  background: var(--paper);
  color: var(--text);
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: var(--ring);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); opacity: .85; }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea { background: var(--light); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.section-hdr {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.dmy-wrap { display: flex; align-items: center; gap: 6px; }
.dmy-box {
  width: 58px !important;
  text-align: center;
  padding: 11px 6px !important;
  font-size: 1rem !important;
  font-weight: 600;
}
.dmy-sep { font-size: 1.1rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }

/* Radio buttons */
.radio-group { display: flex; gap: 8px; margin-top: 4px; }
.radio-opt { flex: 1; position: relative; }
.radio-opt input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  top: 0; left: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.radio-opt label {
  position: relative;
  display: block;
  text-align: center;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  transition: var(--transition);
  background: var(--paper);
  user-select: none;
  pointer-events: none;
}
.radio-opt input:checked + label {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(122, 31, 61, .22);
}

/* Akna autocomplete */
.akna-wrap { position: relative; }
.akna-dropdown {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  z-index: 500;
  box-shadow: var(--shadow);
  display: none;
}
.akna-dropdown.open { display: block; }
.akna-opt {
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--font-hindi);
  font-size: .92rem;
  border-bottom: 1px solid var(--border-soft);
  transition: var(--transition-fast);
}
.akna-opt:last-child { border-bottom: none; }
.akna-opt:hover,
.akna-opt.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.akna-opt mark { background: none; color: inherit; font-weight: 800; }

/* OTP boxes */
.otp-box { display: flex; gap: 8px; justify-content: center; margin: 14px 0; }
.otp-digit {
  width: 46px; height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--primary);
}
.otp-digit:focus { border-color: var(--accent); box-shadow: var(--ring); }

/* ─── 14. Alerts ─────────────────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .86rem;
  margin-bottom: 14px;
  line-height: 1.55;
  border-left: 4px solid transparent;
  display: none;
}
.alert.show { display: block; }
.alert-success { background: var(--success-soft); color: var(--success); border-left-color: var(--success); }
.alert-error   { background: var(--error-soft);   color: var(--error);   border-left-color: var(--error); }
.alert-info    { background: var(--info-soft);    color: var(--info);    border-left-color: var(--info); }
.alert-warn    { background: var(--warning-soft); color: var(--warning); border-left-color: var(--accent); }

/* ─── 15. Badges ─────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3px;
  vertical-align: middle;
}
.badge-pending  { background: #fff3cd; color: var(--warning); }
.badge-approved { background: #d1f0e0; color: var(--success); }
.badge-rejected { background: var(--error-soft); color: var(--error); }
.badge-admin    { background: #fff3cd; color: #7a5c00; }
.badge-approver { background: #e0e8ff; color: var(--primary); }
.badge-new      { background: #e8f5e9; color: var(--success); }

.blood-pill {
  display: inline-block;
  background: var(--error-soft);
  color: var(--error);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 11px;
  border-radius: var(--radius-pill);
}

/* ─── 16. Tabs ───────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--paper);
}
.tab-btn {
  flex: 1;
  padding: 12px 8px;
  background: var(--paper);
  border: none;
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  text-align: center;
  transition: var(--transition);
}
.tab-btn:last-child { border-right: none; }
.tab-btn:hover { background: var(--light); color: var(--primary); }
.tab-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
@media (max-width: 600px) {
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex: 0 0 auto; min-width: 90px; font-size: .76rem; padding: 11px 10px; }
}

.adm-tab {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.adm-tab:hover { border-color: var(--primary); color: var(--primary); background: var(--light); }
.adm-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

/* ─── 17. Modals ─────────────────────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 8, 18, .65);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 18px;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; animation: gpFadeIn .22s ease; }
.modal,
.modal-box {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  max-height: 92vh;
  overflow-y: auto;
  border-top: 4px solid var(--accent);
  animation: gpFadeUp .3s cubic-bezier(.2, .7, .3, 1);
}
@media (max-width: 480px) {
  .modal, .modal-box { padding: 22px 18px; border-radius: var(--radius); }
  .modal-overlay { padding: 10px; }
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 8px;
}
.modal-body {
  font-family: var(--font-ui);
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.65;
}

/* ─── 18. Loading + empty states ────────────────────────────────────────── */

.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(122, 31, 61, .18);
  border-top-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
  animation: gpSpin .7s linear infinite;
}
.loading-box {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: .92rem;
}
.empty-state { text-align: center; padding: 40px 24px; color: var(--muted); }
.empty-icon { font-size: 2.8rem; margin-bottom: 14px; opacity: .6; }
.empty-title { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 5px; }
.empty-sub { font-size: .85rem; line-height: 1.6; }

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--light) 8%, var(--border) 18%, var(--light) 33%);
  background-size: 800px 104px;
  animation: gpShimmer 1.4s linear infinite;
  border-radius: 6px;
}
.skel-avatar { width: 42px; height: 42px; border-radius: 50%; }
.skel-line { height: 10px; margin: 5px 0; }
.skel-line.w60 { width: 60%; }
.skel-line.w80 { width: 80%; }

/* ─── 19. Event cards ────────────────────────────────────────────────────── */

.event-card {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  overflow: hidden;
  display: flex;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.event-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--accent); }
.event-card.today-card { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(212, 148, 10, .2); }
.ev-date {
  width: 70px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ev-date::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, .15), transparent 60%);
}
.ev-date.bday { background: linear-gradient(160deg, #d4940a, #f57c00); }
.ev-date.anni { background: linear-gradient(160deg, #c2185b, #e91e8c); }
.ev-date.comm { background: linear-gradient(160deg, #27735e, #155235); }
.ev-day {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  position: relative;
}
.ev-mon {
  font-family: var(--font-ui);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  opacity: .95;
  margin-top: 3px;
  position: relative;
}
.ev-body { padding: 12px 16px; flex: 1; }
.ev-name { font-weight: 700; font-size: .94rem; color: var(--primary); margin-bottom: 3px; }
.ev-type { font-size: .76rem; color: var(--muted); }
.today-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .66rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  vertical-align: middle;
}
.ev-section {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .55px;
  margin: 18px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}

/* Home event auto-scroll */
.home-ev-scroll {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 6px 0;
}
.home-ev-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: gpMarquee 32s linear infinite;
}
.home-ev-track:hover { animation-play-state: paused; }
.home-ev-card {
  flex: 0 0 auto;
  width: 158px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
  position: relative;
}
.home-ev-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: var(--accent);
}
.home-ev-day {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.home-ev-mon {
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .45px;
}
.home-ev-name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.25;
}
.home-ev-sub { font-size: .66rem; color: var(--muted); margin-top: 3px; }
.home-ev-meta { font-size: .62rem; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.home-ev-empty { color: var(--muted); font-size: .8rem; padding: 8px; font-style: italic; }
.home-ev-loading { color: var(--muted); font-size: .8rem; padding: 8px; }

/* Birthday/Anniversary wish */
.wish-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 14px;
  font-family: var(--font-display);
  border: 3px solid var(--accent2);
  box-shadow: 0 4px 14px rgba(212, 148, 10, .4);
  animation: gpGlow 3.4s ease-in-out infinite;
}
.wish-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}
.wish-meta { font-size: .78rem; color: var(--muted); text-align: center; margin: 3px 0 14px; }
.wish-badge { display: inline-block; padding: 3px 14px; border-radius: var(--radius-pill); font-size: .7rem; font-weight: 700; margin-bottom: 12px; }
.wish-badge.bday { background: #fff3e0; color: #c87800; }
.wish-badge.anni { background: #fce4ec; color: #c2185b; }
.wish-actions { display: flex; gap: 8px; margin-top: 4px; }
.wish-btn {
  flex: 1;
  padding: 11px 8px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: .84rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: var(--transition);
  text-decoration: none;
}
.wish-btn span { font-size: 1.3rem; }
.wish-btn.call { background: var(--success-soft); color: var(--success); }
.wish-btn.call:hover { background: var(--success); color: #fff; }
.wish-btn.wa { background: #e8f8f0; color: #25d366; }
.wish-btn.wa:hover { background: #25d366; color: #fff; }
.wish-btn.no-mob { background: #f5f5f5; color: #aaa; cursor: default; }

/* ─── 20. Visit counter ──────────────────────────────────────────────────── */

.visit-counter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary2), var(--primary));
  background-size: 200% 200%;
  animation: gpGradShift 12s ease-in-out infinite;
  padding: 11px 22px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(122, 31, 61, .28);
  position: relative;
  overflow: hidden;
}
.visit-counter-icon { font-size: 1.4rem; animation: gpPulse 2.4s ease-in-out infinite; }
.visit-counter-text {
  color: rgba(255, 255, 255, .85);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .55px;
  text-transform: uppercase;
}
.visit-counter-num {
  color: var(--accent2);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1px;
}

/* ─── 21. Member directory cards ─────────────────────────────────────────── */

.member-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: var(--transition);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-xs);
}
.member-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.member-photo,
.member-photo-init {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--border);
  background: var(--light);
}
.member-photo-init {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
}
.member-body { flex: 1; min-width: 0; }
.member-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: .3px;
}
.member-info { font-size: .85rem; color: var(--muted); line-height: 1.85; }
.member-info b { color: var(--text); font-weight: 600; }
.result-count {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 8px 14px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.contact-btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.member-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.ml-item {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: .86rem;
  transition: var(--transition);
}
.ml-item:hover { background: var(--light-2); border-color: var(--accent); }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.page-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition);
}
.page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ─── 22. Profile ────────────────────────────────────────────────────────── */

.profile-header { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.profile-avatar {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem;
  font-family: var(--font-display);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.profile-info h2 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--primary);
  margin-bottom: 2px;
  letter-spacing: .3px;
}
.profile-info p { font-size: .85rem; color: var(--muted); }

.profile-pic-wrap { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.profile-pic-img {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--accent);
}
.profile-pic-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.85rem;
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
  border: 3px solid var(--accent);
}
.pic-edit-btn {
  position: absolute;
  bottom: 0; right: 0;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .82rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  transition: var(--transition);
}
.pic-edit-btn:hover { background: var(--accent2); transform: scale(1.08); }

/* ─── 23. Approvals (admin) ──────────────────────────────────────────────── */

.approval-item {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: var(--transition);
}
.approval-item:hover { border-color: var(--accent); box-shadow: var(--shadow-xs); }
.approval-item .a-name { font-weight: 700; font-size: .94rem; color: var(--primary); margin-bottom: 4px; }
.approval-item .a-meta { font-size: .82rem; color: var(--muted); line-height: 1.75; margin-bottom: 10px; }
.approval-item .a-meta b { color: var(--text); }

/* ─── 24. Notifications ──────────────────────────────────────────────────── */

.notif-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.notif-item:last-child { border: none; }
.notif-item.unread {
  background: rgba(212, 148, 10, .07);
  margin: 0 -20px;
  padding: 12px 20px;
}
.notif-icon { font-size: 1.35rem; flex-shrink: 0; margin-top: 1px; }
.notif-text { font-size: .88rem; color: var(--text); line-height: 1.5; }
.notif-text b { color: var(--primary); }
.notif-time { font-size: .74rem; color: var(--muted); margin-top: 3px; }

/* ─── 25. Space (community posts) ────────────────────────────────────────── */

.space-post {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.space-post:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.space-post-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--primary);
  margin-bottom: 6px;
  font-weight: 700;
  letter-spacing: .3px;
}
.space-post-body {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.75;
  white-space: pre-wrap;
}
.space-post-meta {
  font-size: .74rem;
  color: var(--muted);
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.space-expiry { font-size: .72rem; color: var(--warning); font-weight: 600; }

/* ─── 26. Matrimony ──────────────────────────────────────────────────────── */

.mat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 18px;
  margin-top: 8px;
}
.mat-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}
.mat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.mat-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary2) 100%);
  padding: 16px 16px 15px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.mat-card-header.boy {
  background: linear-gradient(135deg, #172554 0%, #4c1d95 100%);
}
.mat-card-header.girl {
  background: linear-gradient(135deg, #db2777 0%, #7e22ce 100%);
}
.mat-card-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
}
.mat-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid rgba(255, 255, 255, .55);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .22);
  flex-shrink: 0;
  cursor: pointer;
}
.mat-photo-init {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  border: 3px solid rgba(255, 255, 255, .3);
  flex-shrink: 0;
}
.mat-header-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.mat-name { font-size: 1.08rem; font-weight: 800; color: #fff; line-height: 1.25; word-break: break-word; }
.mat-age-city { font-size: .8rem; color: rgba(255, 255, 255, .88); margin-top: 3px; line-height: 1.35; }
.mat-pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.mat-badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .66rem;
  font-weight: 700;
}
.mat-badge.boy  { background: #dbeafe; color: #1e40af; }
.mat-badge.girl { background: #fce7f3; color: #9d174d; }
.mat-badge.pending      { background: #fef3c7; color: #92400e; }
.mat-badge.manglik-yes  { background: #fee2e2; color: #991b1b; }
.mat-badge.manglik-no   { background: #d1fae5; color: #065f46; }

.mat-tier-gold    { background: linear-gradient(135deg, #f57f17, #fbc02d); color: #fff; }
.mat-tier-plat    { background: linear-gradient(135deg, #546e7a, #90a4ae); color: #fff; }
.mat-tier-diamond { background: linear-gradient(135deg, #1565c0, #42a5f5); color: #fff; }

.mat-summary {
  padding: 12px 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--light);
}
.mat-chip {
  font-size: .72rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 11px;
  color: var(--text);
  font-weight: 600;
}
.mat-chip.edu { border-color: #93c5fd; color: #1e40af; background: #eff6ff; }
.mat-chip.occ { border-color: #86efac; color: #166534; background: #f0fdf4; }
.mat-chip.ht  { border-color: #d8b4fe; color: #6b21a8; background: #faf5ff; }
.mat-expand-btn {
  width: 100%;
  padding: 9px 16px;
  background: var(--light);
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition);
}
.mat-expand-btn:hover { background: var(--light-2); }
.mat-detail { display: none; padding: 0; }
.mat-detail.open { display: block; }
.mat-section { padding: 12px 16px 2px; }
.mat-section-title {
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--primary);
  margin-bottom: 7px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid rgba(212, 148, 10, .25);
}
.mat-row {
  font-size: .82rem;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.mat-row b {
  color: var(--muted);
  min-width: 96px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: .74rem;
}
.mat-row span {
  flex: 1;
  word-break: break-word;
  font-weight: 700;
  color: var(--primary);
}
.mat-pref-box {
  margin: 10px 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff8e1, #fffde7);
  border: 1.5px solid #ffe082;
  border-radius: var(--radius-sm);
  font-size: .8rem;
}
.mat-pref-box .pref-title { font-weight: 800; color: #7a5800; margin-bottom: 5px; font-size: .76rem; }
.mat-pref-box .pref-row { color: #7a5800; margin-bottom: 2px; }
.mat-about {
  margin: 0 16px 12px;
  font-size: .82rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.65;
  padding: 10px 12px;
  background: var(--light);
  border-radius: var(--radius-sm);
}

.mat-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--light);
  box-sizing: border-box;
}
.mat-actions.two-row { grid-template-columns: repeat(4, 1fr); }
.mat-btn {
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  transition: var(--transition);
}
.mat-btn.wa { background: #e8f8f0; color: #25d366; }
.mat-btn.wa:hover { background: #25d366; color: #fff; }
.mat-btn.call { background: var(--success-soft); color: var(--success); }
.mat-btn.call:hover { background: var(--success); color: #fff; }
.mat-btn.interest { background: #fff3e0; color: #c87800; }
.mat-btn.interest:hover { background: #c87800; color: #fff; }
.mat-btn.interested { background: #c87800; color: #fff; }
.mat-btn.msg { background: #e0f2fe; color: #0284c7; }
.mat-btn.msg:hover { background: #0ea5e9; color: #fff; }
.mat-btn.save { background: #f1f5f9; color: #475569; }
.mat-btn.save:hover { background: #64748b; color: #fff; }
.mat-btn.saved { background: #64748b; color: #fff; }

@media (min-width: 600px) {
  .mat-actions { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 600px) {
  .mat-grid { grid-template-columns: 1fr; padding: 0 4px; gap: 12px; }
  .mat-card { min-width: 0; width: 100%; box-sizing: border-box; overflow: hidden; }
  .mat-card * { max-width: 100%; word-break: break-word; overflow-wrap: break-word; }
  .mat-name, .mat-age, .mat-loc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mat-card { border-radius: var(--radius); }
  .mat-photo, .mat-photo-init { width: 70px; height: 70px; }
  .mat-photo-init { font-size: 1.55rem; }
  .mat-name { font-size: .92rem; }
  .mat-age-city { font-size: .76rem; }
  .mat-actions { grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 12px; }
  .mat-actions .mat-btn { font-size: .74rem; padding: 9px 4px; }
}

/* Matrimony hero + tabs */
.mat-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.mat-hero-text { flex: 1; min-width: 0; }
.mat-hero-actions { display: flex; gap: 8px; flex-shrink: 0; }
.mat-hero-btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 600px) {
  .mat-hero { flex-direction: column; align-items: stretch; }
  .mat-hero-actions { justify-content: center; width: 100%; margin-top: 12px; }
  .mat-hero-actions .mat-hero-btn { flex: 1 1 0; min-width: 0; }
}

.mat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding-bottom: 4px;
}
.mat-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--paper);
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
}
.mat-tab:hover { border-color: var(--primary); color: var(--primary); }
.mat-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.mat-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  align-items: flex-end;
}
.mat-filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 130px; }
.mat-form-step {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.mat-step-hdr {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 2px solid rgba(212, 148, 10, .25);
  display: flex;
  align-items: center;
  gap: 6px;
}
.mat-family-section-hdr {
  font-size: .76rem;
  font-weight: 700;
  color: #c2185b;
  margin: 14px 0 8px;
  padding: 4px 0;
  border-bottom: 1px dashed #f8bbd0;
}
.mat-three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 500px) { .mat-three-col { grid-template-columns: 1fr; } }
.gotra-warn {
  background: #fff3e0;
  color: #e65100;
  border: 1.5px solid #ffb74d;
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  font-size: .68rem;
  font-weight: 700;
}
.mat-valid-ok    { background: var(--success-soft); border-color: #a5d6a7; color: var(--success); }
.mat-valid-warn  { background: #fff3e0; border-color: #ffcc80; color: #e65100; }
.mat-valid-exp   { background: var(--error-soft); border-color: #ef9a9a; color: var(--error); }

/* ─── 27. Business directory ─────────────────────────────────────────────── */

.biz-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 12px;
}
.biz-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--accent); }
.biz-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.biz-card-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-accent);
}
.biz-photo {
  width: 62px; height: 62px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .35);
  flex-shrink: 0;
}
.biz-photo-init {
  width: 62px; height: 62px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.biz-firm { font-size: 1.05rem; font-weight: 700; color: #fff; }
.biz-person { font-size: .8rem; color: rgba(255, 255, 255, .82); margin-top: 2px; }
.biz-body { padding: 14px 18px; }
.biz-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.biz-tag {
  background: var(--light);
  color: var(--primary);
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

/* ─── 28. Jobs ───────────────────────────────────────────────────────────── */

.job-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.job-card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.job-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: .3px;
}
.job-company { font-size: .86rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .78rem;
  color: var(--muted);
}
.job-pill {
  background: var(--light);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}
.job-expiry { font-size: .72rem; font-weight: 600; }
.job-expiry.urgent { color: var(--error); }
.job-expiry.ok { color: var(--success); }

/* ─── 29. Dharmshala cards ──────────────────────────────────────────────── */

.dharm-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.dharm-card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.dharm-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 3px;
}
.dharm-meta { font-size: .82rem; color: var(--muted); line-height: 1.75; }
.dharm-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 8px;
  transition: var(--transition);
}
.dharm-map-btn:hover { background: var(--primary-dark); }

/* ─── 30. Disclaimer + dividers ──────────────────────────────────────────── */

.disclaimer {
  background: #fdf8ed;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 20px;
}
.disclaimer strong { color: var(--warning); }

.divider {
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  margin: 18px 0;
  position: relative;
}
.divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.divider span {
  background: var(--paper);
  padding: 0 14px;
  position: relative;
}

.ornamental-divider {
  text-align: center;
  margin: 24px 0;
  color: var(--accent);
  font-size: 1.2rem;
  letter-spacing: 12px;
  opacity: .65;
  position: relative;
}
.ornamental-divider::before,
.ornamental-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--grad-rule);
}
.ornamental-divider::before { left: 0; }
.ornamental-divider::after { right: 0; }

/* ─── 31. Bottom ticker (animated marquee) ──────────────────────────────── */

.ticker-wrap {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--primary);
  overflow: hidden;
  height: var(--ticker-h);
  z-index: 300;
  border-top: 2px solid var(--accent);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, .25);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: gpMarquee 50s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-segment {
  display: flex;
  align-items: center;
  height: var(--ticker-h);
  white-space: nowrap;
  padding: 0 55px;
}
.ticker-text { color: rgba(255, 255, 255, .85); font-size: .74rem; letter-spacing: .25px; }
.ticker-wa { color: var(--accent2); font-weight: 700; text-decoration: none; }

/* ─── 32. Chat / Messages ────────────────────────────────────────────────── */

.chat-page-wrap { padding: 0 !important; max-width: 100% !important; margin: 0 !important; }
.chat-app {
  display: flex;
  height: calc(100vh - var(--nav-h) - var(--ticker-h));
  background: var(--light);
}
.chat-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--paper);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.chat-sidebar-header {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  flex-shrink: 0;
}
.chat-sidebar-title { font-size: 1.12rem; font-weight: 800; color: #fff; }
.chat-sidebar-sub { font-size: .72rem; opacity: .85; color: #fff; margin-top: 3px; }
.chat-new-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 800;
  line-height: 1.1;
  min-height: 48px;
  transition: var(--transition);
}
.chat-new-btn:hover { background: var(--accent2); color: var(--primary); }
.chat-new-btn .nb-icon { font-size: 1.3rem; line-height: 1; }
.chat-new-btn .nb-label { font-size: .58rem; letter-spacing: .2px; }
.chat-search-bar { padding: 12px; border-bottom: 1px solid var(--border); }
.chat-search-bar input { font-size: .88rem; }
.chat-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.chat-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: var(--transition-fast);
}
.chat-list-item:hover { background: var(--light); }
.chat-list-item.active {
  background: linear-gradient(90deg, rgba(212, 148, 10, .14), rgba(212, 148, 10, .04));
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}
.chat-list-avatar { width: 44px; height: 44px; flex-shrink: 0; }
.chat-list-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chat-list-avatar-init {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .82rem;
}
.chat-list-body { flex: 1; min-width: 0; }
.chat-list-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.chat-list-name {
  font-weight: 700; font-size: .92rem; color: var(--primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-list-time { font-size: .68rem; color: var(--muted); white-space: nowrap; margin-left: 6px; }
.chat-list-bottom { display: flex; justify-content: space-between; align-items: center; }
.chat-list-preview {
  font-size: .78rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.chat-list-preview.unread { color: var(--text); font-weight: 600; }
.chat-list-unread {
  background: var(--accent); color: var(--primary);
  font-size: .65rem; font-weight: 800; border-radius: 10px;
  padding: 1px 7px; margin-left: 6px; min-width: 18px; text-align: center;
}
.chat-list-menu-btn {
  background: none; border: none; color: var(--muted);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
  padding: 4px 6px; border-radius: 8px; flex-shrink: 0;
  align-self: center;
}
.chat-list-menu-btn:hover { background: var(--light); color: var(--primary); }

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--light);
  position: relative;
}
.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px 20px;
}
.chat-welcome-icon { font-size: 4rem; margin-bottom: 16px; opacity: .5; }
.chat-welcome-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--primary); font-weight: 700; }
.chat-welcome-sub { font-size: .92rem; color: var(--muted); margin-top: 6px; }

.chat-thread { flex: 1; display: flex; flex-direction: column; }
.chat-thread-header {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  flex-shrink: 0;
}
.chat-back-btn {
  background: rgba(255, 255, 255, .15);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-back-btn:hover { background: rgba(255, 255, 255, .25); }
.chat-thread-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: .8rem;
  flex-shrink: 0;
}
.chat-thread-info { flex: 1; min-width: 0; }
.chat-thread-name { font-weight: 800; font-size: 1rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread-status { font-size: .72rem; opacity: .85; color: #fff; }
.chat-thread-menu {
  background: rgba(255, 255, 255, .15);
  border: none;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
}
.chat-thread-menu:hover { background: rgba(255, 255, 255, .25); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: var(--light);
  background-image:
    url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%237a1f3d' fill-opacity='0.03'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10S0 14.5 0 20s4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5 4.5-10 10-10s-10 4.5-10 10-4.5 10-10 10-10-4.5-10-10z'/%3E%3C/g%3E%3C/svg%3E");
}
.chat-bubble {
  padding: 10px 16px;
  border-radius: 18px;
  font-size: .9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
  max-width: 78%;
  position: relative;
}
.chat-bubble.me {
  background: linear-gradient(135deg, #fce4b9, #ffe9b3);
  color: var(--text);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.chat-bubble.them {
  background: var(--paper);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-soft);
  align-self: flex-start;
}
.chat-bubble-meta { font-size: .66rem; color: var(--muted); margin-top: 3px; padding: 0 4px; }
.chat-bubble-subject { font-size: .7rem; opacity: .7; margin-bottom: 4px; font-style: italic; }

.chat-bubble-delete {
  position: absolute;
  top: -8px; right: -8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--error);
  color: #fff;
  border: 2px solid #fff;
  font-size: .7rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.chat-bubble:hover .chat-bubble-delete { display: flex; }
.chat-bubble.them .chat-bubble-delete { right: auto; left: -8px; }
@media (max-width: 768px) {
  .chat-bubble-delete { display: flex; opacity: .55; }
}

.chat-reply-bar,
.thread-reply-bar {
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  background: var(--paper);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}
.thread-reply-input,
.chat-reply-input {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 11px 18px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--paper);
  max-height: 100px;
  overflow-y: auto;
}
.thread-reply-input:focus,
.chat-reply-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.thread-send-fab,
.chat-send-fab {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(212, 148, 10, .45);
  color: #fff;
  transition: var(--transition);
}
.thread-send-fab:hover { transform: scale(1.08); }

.conv-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.conv-list-item:hover { box-shadow: var(--shadow-xs); border-color: var(--accent); }
.conv-list-item.has-unread { border-left: 4px solid var(--accent); background: #fdf8ed; }
.conv-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.conv-body { flex: 1; min-width: 0; }
.conv-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.conv-name { font-weight: 700; font-size: .92rem; color: var(--primary); }
.conv-date { font-size: .72rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.conv-last {
  font-size: .82rem;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-unread-count {
  background: var(--error);
  color: #fff;
  border-radius: 10px;
  font-size: .66rem;
  font-weight: 800;
  min-width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ─── 33. Back to top + PWA banner ──────────────────────────────────────── */

#back-to-top {
  position: fixed;
  bottom: calc(var(--ticker-h) + 18px);
  right: 18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--grad-accent);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 6px 22px rgba(212, 148, 10, .5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 250;
  transition: var(--transition);
}
#back-to-top:hover { transform: translateY(-3px) scale(1.06); }
#back-to-top.show { display: flex; animation: gpFadeUp .3s ease; }

#pwa-install-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary2)) !important;
}

/* ─── 34. Theme toggle (Classic ⇄ Royal) ─────────────────────────────────── */
/* The button itself; pair with a small JS snippet that toggles
   `data-theme-mode="classic"` on <html>. Listed below the CSS. */

.theme-toggle {
  position: fixed;
  bottom: calc(var(--ticker-h) + 76px);
  right: 18px;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-pill);
  padding: 6px 14px 6px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: .76rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 250;
  transition: var(--transition);
}
.theme-toggle:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.theme-toggle::before {
  content: '✨';
  font-size: 1rem;
  background: var(--grad-accent);
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ─── 35. Photo modal ────────────────────────────────────────────────────── */

#photo-modal img { max-width: 100%; border-radius: var(--radius); }

/* ─── 36. Audit table (admin) ────────────────────────────────────────────── */

#audit-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#audit-table-wrap table { min-width: 720px; border-collapse: collapse; width: 100%; }
#audit-table-wrap th,
#audit-table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: .85rem; }
#audit-table-wrap th { background: var(--light); font-weight: 700; color: var(--primary); }

/* ─── 37. Misc + utility ─────────────────────────────────────────────────── */

img[loading="lazy"] {
  opacity: 0;
  transition: opacity .3s ease;
}
img[loading="lazy"].loaded { opacity: 1; }
@keyframes lazyReveal { to { opacity: 1; } }
img[loading="lazy"] { animation: lazyReveal .01s linear .6s forwards; }

/* Fallback safety net so the home page is never blank */
#home-guest, [data-orig-id="home-guest"] { display: block; }

@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-up-d1, .fade-up-d2, .fade-up-d3, .fade-up-d4,
  .gp-glow, .gp-pulse,
  .home-ev-track, .ticker-track,
  .home-hero, .hero, .visit-counter-bar, .wish-avatar { animation: none !important; }
}

/* ─── 38. Responsive site header ─────────────────────────────────────────── */

@media (max-width: 600px) {
  .site-header-inner { padding: 13px 14px 15px; gap: 11px; }
  .header-logo { width: 60px; height: 60px; }
  .header-poet { width: 52px; height: 52px; }
  .header-title { font-size: 1.35rem; }
  .header-sub { font-size: .64rem; letter-spacing: .2em; }
  .page-wrap { padding: 14px 12px 100px; }
  .hero, .home-hero { padding: 22px 18px; }
  .hero h1, .home-hero h1 { font-size: 1.32rem; }
}
@media (max-width: 380px) {
  .site-header-inner { padding: 11px 12px; gap: 8px; }
  .header-logo { width: 50px; height: 50px; }
  .header-poet { width: 44px; height: 44px; }
  .header-title { font-size: 1.15rem; }
  .header-sub { font-size: .6rem; }
  .page-wrap { padding: 10px 10px 100px; }
  .card { padding: 14px 14px; }
  .hero, .home-hero { padding: 18px 14px; }
  .btn { font-size: .88rem; padding: 12px 14px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   END · gahoi-portal style.css · Royal theme
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 39. Global Search (nav search overlay) ─────────────────────────────── */
/* Matches the classic CSS structure — sticky slide-down bar below nav,
   compact input, gold pill toggle, dropdown with sections. Polished for
   Royal palette + better mobile sizing. */

#global-search-toggle {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 1.5px solid rgba(255, 255, 255, .4);
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  vertical-align: middle;
  box-shadow: 0 3px 12px rgba(212, 148, 10, .35);
  transition: var(--transition);
}
#global-search-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 16px rgba(212, 148, 10, .5);
}

#global-search-bar {
  display: none;
  position: sticky;
  top: var(--nav-h);
  z-index: 195;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 12px 16px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .22);
  border-bottom: 2px solid var(--accent);
  animation: gsbSlideDown .28s cubic-bezier(.2, .7, .3, 1);
}
#global-search-bar.open { display: block; }
@keyframes gsbSlideDown {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.global-search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.global-search-input,
#global-search-input {
  flex: 1;
  height: 42px;
  padding: 0 14px 0 40px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .96);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: .94rem;
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.global-search-input::placeholder { color: var(--muted-2); }
.global-search-input:focus,
#global-search-input:focus {
  border-color: var(--accent2);
  background: #fff;
  box-shadow: 0 4px 18px rgba(212, 148, 10, .35);
}

.global-search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1.05rem;
  opacity: .6;
  transition: opacity .2s ease;
  z-index: 1;
}
.global-search-input:focus + .global-search-icon,
.global-search-input:not(:placeholder-shown) + .global-search-icon { opacity: 0; }
.global-search-input:focus,
.global-search-input:not(:placeholder-shown) { padding-left: 16px !important; }

#global-search-close {
  background: rgba(255, 255, 255, .15);
  border: 1.5px solid rgba(255, 255, 255, .28);
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
#global-search-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.global-search-results,
#global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .25);
  max-height: 60vh;
  overflow-y: auto;
  display: none;
  z-index: 250;
  padding: 6px;
}
#global-search-results.show {
  display: block;
  animation: gsrFade .22s ease;
}
@keyframes gsrFade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0);    }
}
#global-search-results::-webkit-scrollbar { width: 6px; }
#global-search-results::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.gsr-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 4px;
  font-family: var(--font-ui);
  font-size: .66rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .18em;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
}
.gsr-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.gsr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
  margin: 1px 0;
}
.gsr-item:hover,
.gsr-item:focus {
  background: linear-gradient(90deg, rgba(212, 148, 10, .12), rgba(212, 148, 10, .02));
  border-left-color: var(--accent);
  padding-left: 10px;
  outline: none;
}
.gsr-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(122, 31, 61, .25);
}
.gsr-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.gsr-body { flex: 1; min-width: 0; }
.gsr-title {
  font-family: var(--font-ui);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.gsr-sub {
  font-family: var(--font-ui);
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.gsr-empty {
  padding: 28px 16px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.65;
}
.gsr-empty b { color: var(--primary); }

/* Mobile-specific search adjustments */
@media (max-width: 600px) {
  #global-search-bar { padding: 10px 12px; }
  .global-search-wrap { max-width: none; gap: 6px; }
  .global-search-input { height: 40px; font-size: .88rem; padding: 0 12px 0 36px; }
  .global-search-icon { left: 12px; font-size: .95rem; }
  #global-search-close { width: 34px; height: 34px; font-size: .9rem; }
  .global-search-results,
  #global-search-results {
    left: 12px; right: 12px;
    max-width: none;
    max-height: calc(100vh - var(--nav-h) - 80px);
  }
  .gsr-icon { width: 32px; height: 32px; font-size: 1rem; }
  .gsr-item { gap: 10px; padding: 9px 10px; }
  .gsr-title { font-size: .86rem; }
  .gsr-sub { font-size: .7rem; }
  .gsr-section { padding: 8px 10px 4px; font-size: .62rem; }
}
@media (max-width: 380px) {
  #global-search-bar { padding: 8px 10px; }
  .global-search-input { font-size: .84rem; }
}

/* ─── 40. Smart color lines + decorative accents ─────────────────────────── */

/* Animated gradient border (use on .card.has-glow for a featured card) */
.has-glow {
  position: relative;
}
.has-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary2), var(--accent));
  background-size: 300% 300%;
  animation: gpGradShift 8s ease-in-out infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* Gold left rail accent — drop class .has-rail on any card */
.has-rail {
  position: relative;
  padding-left: 22px !important;
}
.has-rail::before {
  content: '';
  position: absolute;
  top: 16px; bottom: 16px;
  left: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--grad-accent);
  box-shadow: 0 0 8px rgba(212, 148, 10, .4);
}

/* Section dividers (small decorative line + dot — use on h2/h3 etc.) */
.deco-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
  font-family: var(--font-ui);
  font-size: .74rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.deco-rule::before { content: '◆'; color: var(--accent); font-size: 1rem; }
.deco-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--grad-rule);
}

/* Smart underline link */
.smart-link {
  color: var(--primary);
  font-weight: 700;
  position: relative;
  display: inline-block;
  text-decoration: none;
}
.smart-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.smart-link:hover::after { transform: scaleX(1); }

/* Pulse ring around a key element */
.has-ring {
  position: relative;
}
.has-ring::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: gpRing 2.4s cubic-bezier(.4, 0, .2, 1) infinite;
  pointer-events: none;
}
@keyframes gpRing {
  0%   { opacity: .8; transform: scale(.95); }
  100% { opacity: 0;  transform: scale(1.15); }
}

/* Confetti dots overlay (use on celebratory banners) */
.confetti-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, var(--accent2) 1.5px, transparent 2px),
    radial-gradient(circle at 70% 60%, var(--accent) 1.5px, transparent 2px),
    radial-gradient(circle at 40% 80%, var(--primary2) 1.5px, transparent 2px),
    radial-gradient(circle at 85% 20%, var(--accent2) 1.5px, transparent 2px);
  opacity: .25;
  pointer-events: none;
}

/* ─── 41. Scroll-reveal (intersection-observer hook) ─────────────────────── */
/* JS adds .in-view when element enters viewport (see royal-toggle.js) */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.2, .7, .3, 1), transform .6s cubic-bezier(.2, .7, .3, 1);
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="left"]  { transform: translateX(-24px); }
[data-reveal="right"] { transform: translateX(24px); }
[data-reveal="left"].in-view,
[data-reveal="right"].in-view { transform: translateX(0); }
[data-reveal-d="1"] { transition-delay: .08s; }
[data-reveal-d="2"] { transition-delay: .16s; }
[data-reveal-d="3"] { transition-delay: .24s; }
[data-reveal-d="4"] { transition-delay: .32s; }
[data-reveal-d="5"] { transition-delay: .4s;  }

/* ─── 42. Micro-interactions ─────────────────────────────────────────────── */

/* Buttons: subtle gold sheen on hover */
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  transition: left .55s ease;
  pointer-events: none;
}
.btn:hover::after { left: 100%; }

/* Akna chips bouncy hover */
.akna-opt {
  transition: background .18s, color .18s, transform .18s;
}
.akna-opt:hover { transform: translateX(3px); }

/* Stat number hover wiggle */
.stat-num { transition: transform .18s ease; }
.stat-card:hover .stat-num,
.stat-card-home:hover .stat-num { transform: scale(1.06); }

/* Avatar glow on hover */
.profile-avatar,
.wish-avatar,
.member-photo-init {
  transition: var(--transition);
}
.profile-avatar:hover,
.wish-avatar:hover,
.member-photo-init:hover {
  box-shadow: 0 0 0 4px var(--accent2), 0 8px 22px rgba(212, 148, 10, .4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   END · gahoi-portal style.css · Royal theme (v2 — global search + accents)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Matrimony Paid Tier styling (added) ── */
.mat-tier-badge{letter-spacing:.3px;display:inline-block}
.mat-card.tier-gold{border:1.5px solid #d4940a}
.mat-card.tier-platinum{border:1.5px solid #7a1f3d;box-shadow:0 4px 18px rgba(122,31,61,.16)}
#mp-photos-grid img{cursor:pointer}

/* ──────────────────────────────────────────────
   MOBILE BOTTOM TABS (#mobile-tabs) — ported from classic
   so the Home/Search/Matrimony/Messages/You bar also
   appears on mobile in ROYAL view.
   ────────────────────────────────────────────── */
#mobile-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  z-index: 1000;
  padding: 4px 0 max(4px, env(safe-area-inset-bottom));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255,254,251,.96);
}
#mobile-tabs .mt-row {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  max-width: 540px;
  margin: 0 auto;
}
.mt-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px 4px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .65rem;
  font-weight: 600;
  color: var(--muted);
  transition: color .2s ease, transform .15s ease;
  position: relative;
  min-height: 50px;
}
.mt-tab:active { transform: scale(0.92); }
.mt-tab .mt-icon {
  font-size: 1.35rem;
  margin-bottom: 2px;
  line-height: 1;
  transition: transform .25s ease;
}
.mt-tab.active { color: var(--accent); }
.mt-tab.active .mt-icon { transform: translateY(-2px); }
.mt-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30%;
  right: 30%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 0 0 3px 3px;
}
.mt-tab .mt-badge {
  position: absolute;
  top: 4px;
  right: 22%;
  background: #e74c3c;
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 14px;
  text-align: center;
}
@media(max-width: 768px) {
  #mobile-tabs { display: block; }
  body { padding-bottom: 64px; }
  #back-to-top { bottom: 80px; }
  #dark-mode-toggle { bottom: 80px; }
}

/* Matrimony INACTIVE profile (admin sees faded card + badge) */
.mat-card.mat-inactive { opacity: .6; position: relative; }
.mat-card.mat-inactive::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(120,120,120,.04) 0 10px, rgba(120,120,120,.08) 10px 20px);
  pointer-events: none; border-radius: inherit;
}
.mat-inactive-badge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  background: #c0392b; color: #fff;
  font-size: .62rem; font-weight: 800; letter-spacing: .5px;
  padding: 3px 9px; border-radius: 20px;
  box-shadow: 0 2px 8px rgba(192,57,43,.35);
}

/* ──────────────────────────────────────────────
   MATRIMONY FILTER + TOPBAR responsive grid
   (ported from Classic so Royal matches Classic exactly)
   ────────────────────────────────────────────── */
#mat-filter-bar-main > div:first-child {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
}
@media(max-width: 700px) {
  #mat-filter-bar-main > div:first-child { grid-template-columns: repeat(2, 1fr) !important; }
}
@media(max-width: 480px) {
  #mat-filter-bar-main > div:first-child { grid-template-columns: 1fr !important; }
}
#mat-filter-bar-main .form-group { margin: 0 !important; }
#mat-filter-bar-main label {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  margin-bottom: 4px; display: block;
}
#mat-filter-bar-main input,
#mat-filter-bar-main select { width: 100%; font-size: .85rem; }

/* Filter bar responsive grid (inner grid wrapper) */
#mfb .mat-filter-bar > div:first-child {
  grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 600px) {
  #mfb .mat-filter-bar > div:first-child { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 380px) {
  #mfb .mat-filter-bar > div:first-child { grid-template-columns: 1fr !important; }
}

/* Mat topbar layout (tabs + action row) */
.mat-topbar { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 4px; }
.mat-topbar .mat-tabs { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.mat-topbar .mat-action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media(min-width: 900px) {
  .mat-topbar { flex-direction: row; align-items: center; justify-content: space-between; }
  .mat-topbar .mat-tabs { flex: 1 1 auto; }
  .mat-topbar .mat-action-row { flex-shrink: 0; }
}
.chat-back-btn { display: flex !important; align-items: center; justify-content: center; }
/* ── Chat input bar (parent of textarea + send button) — missing in Royal CSS ── */
.chat-input-bar {
  padding: 10px;
  background: var(--light);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  margin-bottom: 38px;  /* Push above ticker (34px tall + 4px buffer) */
  position: relative;
  z-index: 5;
}
.chat-input-bar textarea {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: .92rem;
  resize: none;
  max-height: 120px;
  min-height: 40px;
  outline: none;
  background: var(--white);
  color: var(--text);
}
.chat-input-bar textarea:focus { border-color: var(--accent); }

/* ── Chat send button (copied from style-classic.css to fix Royal theme missing rule) ── */
.chat-send-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--primary);
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(212,148,10,.3);
  transition: transform .15s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-send-btn:hover { transform: scale(1.08); }
.chat-send-btn:disabled { opacity: .5; cursor: wait; }

/* ── Create Profile button fix (mat-hero-btn colors) ── */
.mat-hero-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary2) 100%);
  color: #fff;
  box-shadow: 0 3px 14px rgba(122, 31, 61, .28);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.mat-hero-btn:hover {
  background: linear-gradient(135deg, var(--primary2) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
.mat-hero-btn:active {
  transform: scale(.98);
  box-shadow: var(--shadow-sm);
}

/* Agar button pe outline/secondary style use ho raha ho */
.mat-hero-btn.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.mat-hero-btn.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ─── Current Offers cards ─── */
.offers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.offer-card { background: var(--surface, #fff); border: 1.5px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: transform .2s, box-shadow .2s; }
.offer-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(184,134,11,.18); }
.offer-img-wrap { width: 100%; height: 160px; overflow: hidden; background: linear-gradient(135deg, #fff8e1, #ffe9b0); display: flex; align-items: center; justify-content: center; }
.offer-img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.offer-img-placeholder { font-size: 3rem; }
.offer-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.offer-title { font-weight: 800; font-size: 1.02rem; color: var(--primary); line-height: 1.3; }
.offer-valid-badge { align-self: flex-start; background: linear-gradient(135deg, #b8860b, #e8a020); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.offer-details { font-size: .86rem; color: var(--text); line-height: 1.55; }
.offer-cities { display: flex; flex-wrap: wrap; gap: 5px; }
.offer-city-tag { background: var(--light); border: 1px solid var(--border); color: var(--muted); font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 14px; }
.offer-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.offer-poster { font-size: .7rem; color: var(--muted); margin-top: 4px; }

/* ───────────────────────────────────────────
   Matrimony Profile FULL-PAGE styling
   (applied only inside 

/* ─── Member Detail Modal: force flex-column scroll + sticky footer ─── */
#member-detail-modal .modal {
  padding: 0 !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#member-detail-modal #mdm-header { flex-shrink: 0; }
#member-detail-modal #mdm-contact {
  flex-shrink: 0;
  padding: 12px 18px !important;
  background: #fafaf7 !important;
  border-top: 1px solid #ece7dc;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* HOME page Member Detail Modal — force scroll + sticky footer */
#home-member-detail-modal .modal {
  padding: 0 !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#home-member-detail-modal #hmdm-contact {
  flex-shrink: 0;
  padding: 12px 18px !important;
  background: #fafaf7 !important;
  border-top: 1px solid #ece7dc;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ═════════════════════════════════════════════════════════
   MATRIMONY PROFILE FULL PAGE — Best in Class Design v2
   (overrides v1; remove v1 first)
   ═════════════════════════════════════════════════════════ */

.mat-profile-page-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background:
    radial-gradient(circle at 20% 10%, rgba(212,175,55,.10) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(122,31,61,.08) 0%, transparent 40%),
    linear-gradient(135deg, #fdf6e3 0%, #f8e9c4 50%, #fdf6e3 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.mat-profile-shell {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(122,31,61,.15);
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid #e8d8a8;
  border-right: 1px solid #e8d8a8;
  background:
    repeating-linear-gradient(45deg, rgba(212,175,55,.025) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #fffdf7 0%, #fdf6e3 100%);
  background-attachment: local;
}

/* ── Top Bar (sticky header) — Ganpati + Logo same as Gahoi Portal ── */
.mat-profile-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(135deg, #6e1d3a 0%, #931a4b 50%, #b41a5e 100%);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 14px rgba(0,0,0,.22);
  border-bottom: 3px solid #d4af37;
  min-height: 76px;
}
.mat-tb-back {
  background: rgba(255,255,255,.22);
  border: none;
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, transform .15s;
  display: flex; align-items: center; justify-content: center;
}
.mat-tb-back:hover { background: rgba(255,255,255,.35); transform: scale(1.05); }
.mat-tb-ganpati,
.mat-tb-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  border: 2.5px solid #d4af37;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.mat-tb-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  flex: 1;
  font-family: 'Playfair Display', serif;
  letter-spacing: .4px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.18);
}

/* ── Content area ── */
.mat-profile-content {
  flex: 1;
  padding: 18px 14px 24px;
  position: relative;
  z-index: 1;
}

/* ── Biodata Banner (top card with photo carousel + name) ── */
.mat-biodata-banner {
  background:
    radial-gradient(ellipse at top, #fff8e1 0%, #fdf2c7 60%, #fff8e1 100%);
  padding: 22px 22px 20px;
  border-radius: 16px;
  border: 2.5px solid #d4af37;
  box-shadow: 0 6px 24px rgba(212,175,55,.22);
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}
/* Decorative floral corners */
.mat-corner {
  position: absolute;
  width: 36px;
  height: 36px;
  pointer-events: none;
}
.mat-corner-tl {
  top: 6px; left: 6px;
  border-top: 3px solid #d4af37;
  border-left: 3px solid #d4af37;
  border-top-left-radius: 12px;
}
.mat-corner-tr {
  top: 6px; right: 6px;
  border-top: 3px solid #d4af37;
  border-right: 3px solid #d4af37;
  border-top-right-radius: 12px;
}
.mat-corner-bl {
  bottom: 6px; left: 6px;
  border-bottom: 3px solid #d4af37;
  border-left: 3px solid #d4af37;
  border-bottom-left-radius: 12px;
}
.mat-corner-br {
  bottom: 6px; right: 6px;
  border-bottom: 3px solid #d4af37;
  border-right: 3px solid #d4af37;
  border-bottom-right-radius: 12px;
}

.mat-banner-title {
  text-align: center;
  font-family: 'Playfair Display', serif;
  color: #7a1f3d;
  font-size: 1.15rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 2.5px;
  margin-bottom: 18px;
  text-shadow: 0 1px 0 rgba(212,175,55,.3);
}
.mat-banner-flex {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.mat-banner-photo-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ── Photo Carousel (swipe-able, in banner) ── */
.mat-carousel {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #d4af37;
  box-shadow: 0 6px 22px rgba(0,0,0,.25), inset 0 0 0 2px #fff;
  background: #fff;
}
.mat-carousel-track {
  display: flex;
  height: 100%;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  width: 100%;
}
.mat-carousel-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mat-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}
.mat-carousel-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d4af37, #f4e4a8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: #7a1f3d;
}
.mat-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 3;
  transition: background .15s;
}
.mat-carousel-arrow:hover { background: #7a1f3d; }
.mat-carousel-prev { left: 4px; }
.mat-carousel-next { right: 4px; }
.mat-carousel-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  z-index: 3;
}
.mat-carousel-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.mat-carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(122,31,61,.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .15s, transform .15s;
}
.mat-carousel-dot.active {
  background: #d4af37;
  transform: scale(1.3);
}

/* ── Banner Info ── */
.mat-banner-info {
  flex: 1;
  min-width: 220px;
}
.mat-banner-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #7a1f3d;
  line-height: 1.15;
  margin-bottom: 10px;
  text-shadow: 0 1px 0 rgba(212,175,55,.25);
}
.mat-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.mat-tier-pill, .mat-gender-pill, .mat-age-pill {
  font-size: .73rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 14px;
  color: #fff;
  letter-spacing: .3px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.mat-gender-pill {
  background: linear-gradient(135deg, #7a1f3d, #a01840);
}
.mat-age-pill {
  background: linear-gradient(135deg, #4338ca, #6366f1);
}
.mat-banner-loc {
  font-size: .9rem;
  color: #5a3a1a;
  font-weight: 600;
}

/* ── Section Cards ── */
.mat-profile-content .mat-section {
  margin: 0 0 14px 0;
  background: #fff;
  border: 1.5px solid #e8d8a8;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(122,31,61,.07);
  position: relative;
  z-index: 2;
}
.mat-profile-content .mat-section-title {
  background: linear-gradient(135deg, #6e1d3a 0%, #931a4b 60%, #a01840 100%);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .8px;
  padding: 11px 18px;
  margin: 0;
  border-bottom: 2.5px solid #d4af37;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mat-section-body { padding: 6px 0; }
.mat-profile-content .mat-row {
  padding: 10px 18px;
  margin: 0;
  border-bottom: 1px dashed #e8d8a8;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: .9rem;
}
.mat-profile-content .mat-row:last-child { border-bottom: none; }
.mat-profile-content .mat-row b {
  min-width: 130px;
  color: #7a1f3d;
  font-weight: 700;
  font-size: .82rem;
}
.mat-profile-content .mat-row span {
  flex: 1;
  color: #3a2818;
  font-weight: 600;
  word-break: break-word;
}

/* ── About card ── */
.mat-profile-content .mat-about {
  margin: 0 0 14px 0;
  padding: 18px 22px;
  background: linear-gradient(135deg, #fff8e1, #fffde7);
  border: 1.5px solid #d4af37;
  border-radius: 14px;
  font-style: italic;
  color: #5a3a1a;
  font-size: .95rem;
  line-height: 1.7;
  position: relative;
  z-index: 2;
  box-shadow: 0 3px 14px rgba(212,175,55,.15);
}
.mat-profile-content .mat-about::before {
  content: '"';
  position: absolute;
  top: -14px; left: 16px;
  font-size: 3.6rem;
  color: rgba(122,31,61,.28);
  font-family: 'Playfair Display', serif;
  line-height: 1;
}

/* ── Dates strip ── */
.mat-dates-strip {
  margin: 0;
  padding: 11px 16px;
  background: #fafaf2;
  border: 1px solid #e8d8a8;
  border-radius: 10px;
  font-size: .74rem;
  color: #7a5800;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
  z-index: 2;
  font-weight: 600;
}

/* ── Action Bar (sticky footer) ── */
.mat-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #fff;
  border-top: 2.5px solid #d4af37;
  padding: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 18px rgba(0,0,0,.10);
}
.mat-ab-btn {
  flex: 1;
  min-width: 90px;
  padding: 11px 8px;
  border-radius: 11px;
  font-size: .84rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform .12s, box-shadow .12s, filter .12s;
  letter-spacing: .2px;
}
.mat-ab-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(0,0,0,.18); filter: brightness(1.05); }
.mat-ab-btn span { font-size: .82rem; }
.mat-ab-wa { background: linear-gradient(135deg, #25d366, #1ebe5a); color: #fff; }
.mat-ab-call { background: linear-gradient(135deg, #1976d2, #1565c0); color: #fff; }
.mat-ab-share { background: #e8f0fb; color: #1976d2; border: 1.5px solid #c5d9f0; }
.mat-ab-pdf { background: linear-gradient(135deg, #d4940a, #f0b429); color: #3a2600; }

/* ── Responsive ── */
@media (max-width: 540px) {
  .mat-banner-name { font-size: 1.5rem; }
  .mat-tb-logo, .mat-tb-ganpati { width: 52px; height: 52px; }
  .mat-profile-topbar { min-height: 68px; padding: 8px 12px; gap: 8px; }
  .mat-tb-title { font-size: .96rem; }
  .mat-carousel { width: 160px; height: 160px; }
  .mat-ab-btn { font-size: .76rem; min-width: 80px; padding: 10px 4px; }
  .mat-profile-content .mat-row b { min-width: 105px; font-size: .76rem; }
  .mat-biodata-banner { padding: 18px 14px 16px; }
}
@media (max-width: 400px) {
  .mat-banner-flex { flex-direction: column; gap: 14px; text-align: center; }
  .mat-banner-meta { justify-content: center; }
  .mat-tb-title { font-size: .88rem; }
  .mat-tb-logo, .mat-tb-ganpati { width: 46px; height: 46px; }
}

/* Photo modal must sit above the matrimony profile overlay */
#photo-modal { z-index: 99999 !important; }

/* ═════════════════════════════════════════════════════════
   MATRIMONY PROFILE — v3 (overrides v2)
   Inspired by sample biodatas: Image 4 (gold floral cream)
   + Image 5 (blue-gold ornate frame). Best in class.
   ═════════════════════════════════════════════════════════ */

/* === OVERLAY (page background) — soft cream + radial accents === */
.mat-profile-page-overlay {
  background:
    radial-gradient(circle at 12% 8%, rgba(200,155,60,.12) 0%, transparent 35%),
    radial-gradient(circle at 88% 92%, rgba(44,74,124,.10) 0%, transparent 35%),
    radial-gradient(circle at 95% 5%, rgba(139,40,69,.08) 0%, transparent 30%),
    linear-gradient(135deg, #fdf6e3 0%, #f5e9c8 50%, #fdf6e3 100%) !important;
}

/* === SHELL — full height, decorative gold border, paper texture === */
.mat-profile-shell {
  min-height: 100vh !important;
  background:
    repeating-linear-gradient(45deg, rgba(200,155,60,.03) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-45deg, rgba(44,74,124,.015) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, #fffdf7 0%, #fdf6e3 100%) !important;
  background-attachment: local !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: 0 0 60px rgba(122,31,61,.18), inset 0 0 0 6px transparent !important;
  /* Decorative gold floral border via outline */
  position: relative;
}
/* Gold filigree border around the shell — using pseudo elements */
.mat-profile-shell::before {
  content: '';
  position: absolute;
  top: 76px; left: 6px; right: 6px; bottom: 60px;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #c89b3c, #f4d76a, #c89b3c, #f4d76a, #c89b3c) 1;
  pointer-events: none;
  z-index: 1;
}
.mat-profile-shell::after {
  content: '';
  position: absolute;
  top: 80px; left: 10px; right: 10px; bottom: 64px;
  border: 1px dashed rgba(200,155,60,.55);
  pointer-events: none;
  z-index: 1;
}

/* === HEADER — bigger, more ornate, bigger Ganpati + Logo === */
.mat-profile-topbar {
  min-height: 92px !important;
  padding: 12px 18px !important;
  background:
    linear-gradient(135deg, #6e1d3a 0%, #8b2845 40%, #a01840 100%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.05) 0%, transparent 70%) !important;
  border-bottom: 4px solid #c89b3c !important;
  box-shadow: 0 3px 18px rgba(0,0,0,.25) !important;
  gap: 14px !important;
  position: relative;
}
/* Decorative gold band under header */
.mat-profile-topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 4px;
  background: repeating-linear-gradient(90deg, #c89b3c 0 8px, #f4d76a 8px 16px);
  opacity: .85;
}
.mat-tb-back {
  width: 44px !important; height: 44px !important;
  font-size: 1.5rem !important;
  background: rgba(255,255,255,.25) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.mat-tb-ganpati,
.mat-tb-logo {
  width: 72px !important;
  height: 72px !important;
  padding: 6px !important;
  background: #fffdf7 !important;
  border: 3px solid #c89b3c !important;
  box-shadow: 0 3px 12px rgba(0,0,0,.28), inset 0 0 0 2px rgba(255,255,255,.5) !important;
}
.mat-tb-title {
  font-size: 1.18rem !important;
  font-weight: 700 !important;
  letter-spacing: .5px !important;
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0,0,0,.3) !important;
}

/* === CONTENT spacing === */
.mat-profile-content {
  padding: 28px 22px 28px !important;
  position: relative;
  z-index: 2;
}

/* === BIODATA BANNER (top hero card) === */
.mat-biodata-banner {
  background:
    radial-gradient(ellipse at 50% 0%, #fff9e3 0%, #fdf2c7 60%, #fffaeb 100%) !important;
  padding: 26px 26px 22px !important;
  border-radius: 18px !important;
  border: 3px double #c89b3c !important;
  box-shadow:
    0 8px 28px rgba(200,155,60,.28),
    inset 0 0 0 2px rgba(255,255,255,.6) !important;
  margin-bottom: 20px !important;
  position: relative;
}
/* Decorative floral corners with SVG-like vines */
.mat-biodata-banner::before,
.mat-biodata-banner::after {
  content: '❀';
  position: absolute;
  font-size: 1.6rem;
  color: #c89b3c;
  opacity: .85;
  font-family: serif;
}
.mat-biodata-banner::before { top: -8px; left: 50%; transform: translateX(-50%); background: #fffdf7; padding: 0 12px; }
.mat-biodata-banner::after { bottom: -10px; left: 50%; transform: translateX(-50%); background: #fffdf7; padding: 0 12px; }

/* Replace L-corners with subtler stylized ones */
.mat-corner {
  width: 32px !important; height: 32px !important;
  border-color: #c89b3c !important;
  border-width: 2.5px !important;
}
.mat-corner-tl { top: 10px !important; left: 10px !important; }
.mat-corner-tr { top: 10px !important; right: 10px !important; }
.mat-corner-bl { bottom: 10px !important; left: 10px !important; }
.mat-corner-br { bottom: 10px !important; right: 10px !important; }

.mat-banner-title {
  font-size: 1.3rem !important;
  color: #8b2845 !important;
  letter-spacing: 3px !important;
  margin-bottom: 22px !important;
  text-shadow: 0 1px 0 rgba(200,155,60,.4) !important;
}
.mat-banner-name {
  font-size: 2rem !important;
  color: #8b2845 !important;
  text-shadow: 0 1px 2px rgba(200,155,60,.35) !important;
  margin-bottom: 12px !important;
}

/* Tier/Gender/Age pills — softer */
.mat-tier-pill, .mat-gender-pill, .mat-age-pill {
  font-size: .76rem !important;
  padding: 5px 14px !important;
  letter-spacing: .4px !important;
}
.mat-gender-pill { background: linear-gradient(135deg, #8b2845, #a93860) !important; }
.mat-age-pill { background: linear-gradient(135deg, #2c4a7c, #3d5e94) !important; }

/* === PHOTO CAROUSEL — bigger, ornate gold border === */
.mat-carousel {
  width: 200px !important;
  height: 200px !important;
  border: 5px solid #c89b3c !important;
  box-shadow:
    0 8px 26px rgba(0,0,0,.28),
    0 0 0 2px #fffdf7,
    0 0 0 5px #c89b3c,
    inset 0 0 0 3px rgba(255,255,255,.55) !important;
}
.mat-carousel-slide img { cursor: zoom-in !important; }
.mat-carousel-arrow {
  background: rgba(139,40,69,.85) !important;
  width: 38px !important; height: 38px !important;
  font-size: 1.6rem !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.3) !important;
}
.mat-carousel-arrow:hover { background: #c89b3c !important; color: #fff !important; }
.mat-carousel-count {
  background: linear-gradient(135deg, #8b2845, #a93860) !important;
  font-size: .74rem !important;
  padding: 4px 11px !important;
}
.mat-carousel-dot.active { background: #c89b3c !important; }

/* === SECTION CARDS — softer, deep-blue titles (Image 4 inspired) === */
.mat-profile-content .mat-section {
  border: 1.5px solid #d8c690 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 18px rgba(139,40,69,.08), 0 0 0 1px rgba(200,155,60,.2) inset !important;
  margin-bottom: 16px !important;
}
.mat-profile-content .mat-section-title {
  background: linear-gradient(135deg, #2c4a7c 0%, #3d5e94 60%, #4d6ea8 100%) !important;
  border-bottom: 3px solid #c89b3c !important;
  font-size: 1.04rem !important;
  padding: 12px 20px !important;
  letter-spacing: 1px !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.2) !important;
}
.mat-profile-content .mat-row {
  padding: 11px 20px !important;
  border-bottom: 1px dashed #d8c690 !important;
  font-size: .92rem !important;
}
.mat-profile-content .mat-row b {
  color: #8b2845 !important;
  font-size: .83rem !important;
  min-width: 135px !important;
}
.mat-profile-content .mat-row span {
  color: #2a1a0a !important;
}

/* === ABOUT card === */
.mat-profile-content .mat-about {
  background: linear-gradient(135deg, #fff8e1, #fffde7) !important;
  border: 2px solid #c89b3c !important;
  border-radius: 14px !important;
  margin-bottom: 16px !important;
}
.mat-profile-content .mat-about::before {
  color: rgba(139,40,69,.3) !important;
  font-size: 4rem !important;
}

/* === Dates strip === */
.mat-dates-strip {
  background: linear-gradient(135deg, #fafaf2, #fff8e1) !important;
  border: 1.5px solid #d8c690 !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  color: #6b4d10 !important;
}

/* === ACTION BAR === */
.mat-action-bar {
  background: linear-gradient(180deg, #fffaeb, #fff) !important;
  border-top: 3px solid #c89b3c !important;
  padding: 12px 10px !important;
  box-shadow: 0 -5px 22px rgba(0,0,0,.10) !important;
}
.mat-ab-btn {
  padding: 12px 8px !important;
  border-radius: 12px !important;
  font-size: .86rem !important;
  letter-spacing: .3px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.mat-ab-wa { background: linear-gradient(135deg, #25d366, #1ebe5a) !important; }
.mat-ab-call { background: linear-gradient(135deg, #2c4a7c, #3d5e94) !important; }
.mat-ab-share { background: linear-gradient(135deg, #fffaeb, #f5e9c8) !important; color: #8b2845 !important; border: 1.5px solid #c89b3c !important; }
.mat-ab-pdf { background: linear-gradient(135deg, #c89b3c, #f4d76a) !important; color: #3a2400 !important; }

/* === Responsive (medium screens) === */
@media (max-width: 540px) {
  .mat-banner-name { font-size: 1.55rem !important; }
  .mat-tb-logo, .mat-tb-ganpati { width: 60px !important; height: 60px !important; padding: 4px !important; }
  .mat-profile-topbar { min-height: 80px !important; padding: 10px 12px !important; gap: 10px !important; }
  .mat-tb-title { font-size: 1rem !important; }
  .mat-carousel { width: 170px !important; height: 170px !important; }
  .mat-ab-btn { font-size: .78rem !important; min-width: 80px; padding: 11px 5px !important; }
  .mat-profile-content .mat-row b { min-width: 105px !important; font-size: .78rem !important; }
  .mat-biodata-banner { padding: 20px 16px 18px !important; }
  .mat-profile-content { padding: 22px 14px 22px !important; }
  .mat-profile-shell::before { top: 80px !important; left: 4px !important; right: 4px !important; bottom: 64px !important; }
  .mat-profile-shell::after { top: 84px !important; left: 8px !important; right: 8px !important; bottom: 68px !important; }
}
@media (max-width: 400px) {
  .mat-banner-flex { flex-direction: column !important; gap: 16px !important; text-align: center !important; }
  .mat-banner-meta { justify-content: center !important; }
  .mat-tb-title { font-size: .9rem !important; }
  .mat-tb-logo, .mat-tb-ganpati { width: 52px !important; height: 52px !important; }
  .mat-profile-topbar { min-height: 70px !important; }
}

/* ═════════════════════════════════════════════════════════
   MATRIMONY PROFILE — v4 final adjustments (overrides v3)
   ═════════════════════════════════════════════════════════ */

/* Remove decorative shell border that conflicts with section cards */
.mat-profile-shell::before,
.mat-profile-shell::after { display: none !important; }

/* Logo / Ganpati: bigger, NO white inner border (gold touches image) */
.mat-tb-ganpati,
.mat-tb-logo {
  width: 84px !important;
  height: 84px !important;
  padding: 0 !important;
  background: #fff !important;
  border: 3px solid #c89b3c !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.30), 0 0 0 1px rgba(255,255,255,.4) !important;
  object-fit: cover !important;
}

/* Header taller to accommodate bigger badges */
.mat-profile-topbar {
  min-height: 104px !important;
  padding: 10px 18px !important;
}

/* Ensure section cards fit cleanly within content padding (alignment fix) */
.mat-profile-content {
  padding: 22px 18px 26px !important;
  position: relative;
  z-index: 2;
}
.mat-profile-content .mat-section,
.mat-profile-content .mat-about,
.mat-dates-strip,
.mat-biodata-banner {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Responsive — proportionally smaller on small screens */
@media (max-width: 540px) {
  .mat-tb-logo, .mat-tb-ganpati {
    width: 68px !important;
    height: 68px !important;
    border-width: 2.5px !important;
  }
  .mat-profile-topbar {
    min-height: 88px !important;
    padding: 10px 12px !important;
    gap: 10px !important;
  }
  .mat-profile-content { padding: 18px 12px 22px !important; }
}
@media (max-width: 400px) {
  .mat-tb-logo, .mat-tb-ganpati {
    width: 56px !important;
    height: 56px !important;
  }
  .mat-profile-topbar { min-height: 78px !important; }
}

/* ─── Matrimony LIST card mini-carousel ─── */
.mat-lcar { position: relative; width: 80px; height: 80px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg,#fff8e1,#fdf2c7); border: 3px solid rgba(255,255,255,.55); box-shadow: 0 2px 14px rgba(0,0,0,.22); flex-shrink: 0; }
.mat-lcar-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform .32s cubic-bezier(.4,0,.2,1);
}
.mat-lcar-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}
.mat-lcar-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  cursor: pointer;
  display: block;
}
.mat-lcar-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(139,40,69,.78);
  color: #fff;
  border: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0;
  transition: opacity .15s, background .15s;
}
.mat-lcar:hover .mat-lcar-arrow,
.mat-lcar:focus-within .mat-lcar-arrow { opacity: 1; }
.mat-lcar-arrow:hover { background: #c89b3c; }
.mat-lcar-prev { left: 4px; }
.mat-lcar-next { right: 4px; }
.mat-lcar-count {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  z-index: 3;
  letter-spacing: .3px;
}
.mat-lcar-dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 3;
}
.mat-lcar-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.3);
  cursor: pointer;
  padding: 0;
  transition: background .15s, transform .15s;
}
.mat-lcar-dot.active {
  background: #c89b3c;
  border-color: #fff;
  transform: scale(1.3);
}
/* Mobile: show arrows always (no hover on touch) */
@media (hover: none) {
  .mat-lcar-arrow { opacity: 1; background: rgba(139,40,69,.55); }
}

/* Compact arrows/dots/count for tiny list carousel */
.mat-lcar .mat-lcar-arrow { width: 20px !important; height: 20px !important; font-size: 1rem !important; opacity: 0; }
.mat-lcar:hover .mat-lcar-arrow, .mat-lcar:focus-within .mat-lcar-arrow { opacity: .95; }
@media (hover: none) { .mat-lcar .mat-lcar-arrow { opacity: .8; } }
.mat-lcar-prev { left: 2px !important; }
.mat-lcar-next { right: 2px !important; }
.mat-lcar-count { display: none !important; }
.mat-lcar-dots { bottom: 3px !important; gap: 2px !important; }
.mat-lcar-dot { width: 4px !important; height: 4px !important; }

/* ─── Print: native browser "Save as PDF" mode ─── */
@media print {
  /* Hide everything using visibility (works regardless of DOM depth in SPA) */
  body.mat-printing * { visibility: hidden !important; }

  /* Show the matrimony profile overlay and ALL its children */
  body.mat-printing #mat-profile-page,
  body.mat-printing .mat-profile-page-overlay,
  body.mat-printing #mat-profile-page *,
  body.mat-printing .mat-profile-page-overlay * { visibility: visible !important; }

  /* Position the overlay to fill the print page */
  body.mat-printing #mat-profile-page,
  body.mat-printing .mat-profile-page-overlay {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    background: #fff !important;
    z-index: 99999 !important;
    --primary: #7a1f3d; --accent: #d4940a;
    --surface: #fff; --text: #111; --muted: #666; --border: #ddd;
  }
  body.mat-printing .mat-profile-shell {
    max-width: 100% !important;
    box-shadow: none !important;
    background: #fff !important;
    border: none !important;
  }
  body.mat-printing .mat-profile-topbar { position: static !important; }
  body.mat-printing .mat-tb-back { display: none !important; }
  body.mat-printing .mat-action-bar { display: none !important; }
  body.mat-printing .mat-carousel-arrow,
  body.mat-printing .mat-carousel-dots,
  body.mat-printing .mat-carousel-count { display: none !important; }
  body.mat-printing .mat-section,
  body.mat-printing .mat-biodata-banner,
  body.mat-printing .mat-about,
  body.mat-printing .mat-dates-strip {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* ─── Desktop wider shell + background to bottom ─── */
.mat-profile-shell {
  max-width: 960px !important;
  min-height: 100vh !important;
}
.mat-profile-page-overlay {
  /* Ensure background continues full scroll height */
  background-attachment: local !important;
}
/* Make sure the cream background covers full scrollable content */
.mat-profile-page-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 8%, rgba(200,155,60,.12) 0%, transparent 35%),
    radial-gradient(circle at 88% 92%, rgba(44,74,124,.10) 0%, transparent 35%),
    linear-gradient(135deg, #fdf6e3 0%, #f5e9c8 50%, #fdf6e3 100%);
  min-height: 100%;
  pointer-events: none;
}

/* ─── Flower decoration: keep only banner-top ❀, hide others ─── */
.mat-profile-topbar::after { display: none !important; }
.mat-biodata-banner::after { display: none !important; }
/* Banner top ❀ stays (the ::before of banner) */

/* ═════════════════════════════════════════════════════════
   GAHOI SPACE — Social Feed Module
   ═════════════════════════════════════════════════════════ */

.sp-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  transition: box-shadow .15s;
}
.sp-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }

.sp-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}
.sp-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.sp-avatar-init {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-author-info { flex: 1; min-width: 0; }
.sp-author-name {
  font-weight: 700;
  font-size: .92rem;
  color: var(--primary);
  line-height: 1.2;
}
.sp-author-meta {
  font-size: .73rem;
  color: var(--muted);
  margin-top: 2px;
}
.sp-menu-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 9px;
  border-radius: 6px;
  flex-shrink: 0;
}
.sp-menu-btn:hover { background: var(--light); color: var(--error); }

.sp-text {
  font-size: .94rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
}
.sp-text b { color: var(--primary); }

.sp-image {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: zoom-in;
  background: #f6f3ec;
  border: 1px solid var(--border);
  display: block;
}

.sp-actions {
  display: flex;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.sp-action {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .12s, color .12s;
}
.sp-action:hover { background: var(--light); color: var(--primary); }
.sp-action.liked { color: #e91e63; }
.sp-action.liked .sp-action-icon { transform: scale(1.15); }
.sp-action-icon { font-size: 1.05rem; }
.sp-action-label { font-size: .8rem; }

/* Comments thread */
.sp-comments {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.sp-no-comments {
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
  padding: 10px 0;
  font-style: italic;
}
.sp-cmt {
  display: flex;
  gap: 9px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.sp-cmt-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--accent);
  background: var(--light);
}
.sp-cmt-avatar-init {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  font-weight: 800;
  font-size: .76rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-cmt-body {
  flex: 1;
  min-width: 0;
  background: var(--light);
  border-radius: 12px;
  padding: 8px 12px;
}
.sp-cmt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .76rem;
}
.sp-cmt-head b {
  color: var(--primary);
  font-size: .82rem;
  font-weight: 700;
}
.sp-cmt-time {
  color: var(--muted);
  font-size: .7rem;
  flex: 1;
}
.sp-cmt-del {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 6px;
  margin-left: auto;
}
.sp-cmt-del:hover { color: var(--error); }
.sp-cmt-text {
  font-size: .86rem;
  color: var(--text);
  line-height: 1.4;
  margin-top: 2px;
  word-break: break-word;
}

.sp-add-comment {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}


/* ═══════════════════════════════════════════════════════════
   ONLINE BADGE + REFERRAL PAGE STYLES — added 2 Jun 2026
   ═══════════════════════════════════════════════════════════ */

/* Online users badge — home page */
.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border: 1.5px solid #66bb6a;
  border-radius: 24px;
  padding: 7px 16px;
  font-size: .82rem;
  font-weight: 700;
  color: #1b5e20;
  box-shadow: 0 2px 10px rgba(76, 175, 80, .18);
  transition: var(--transition);
}
.online-badge .online-dot {
  width: 9px;
  height: 9px;
  background: #4caf50;
  border-radius: 50%;
  animation: online-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes online-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, .7); transform: scale(1); }
  50%      { box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); transform: scale(1.1); }
}
.online-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(76, 175, 80, .28);
}

/* Referral page styles */
.referral-hero {
  background: linear-gradient(135deg, #7a5800, #c8900a, #e8a020);
  border-radius: 16px;
  padding: 26px 22px;
  text-align: center;
  color: #fff;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.referral-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 150px;
  height: 150px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.referral-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 6px;
  position: relative;
  z-index: 1;
}
.referral-hero p {
  color: rgba(255,255,255,.85);
  font-size: .92rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.referral-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.referral-stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  transition: var(--transition);
}
.referral-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.referral-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.referral-stat-label {
  font-size: .74rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 4px;
}

.referral-template-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.referral-template-card:hover {
  background: var(--light);
  border-color: var(--accent);
}
.referral-template-card.selected {
  background: linear-gradient(135deg, #fff8e1, #fffde7);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(232, 160, 32, .15);
}
.referral-template-card input[type=radio] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  appearance: auto;
  -webkit-appearance: radio;
  -moz-appearance: radio;
  flex: 0 0 18px;
  cursor: pointer;
}
.referral-template-card-text {
  flex: 1;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
}

.referral-link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-family: monospace;
  font-size: .82rem;
  color: var(--primary);
  word-break: break-all;
}
.referral-link-box .ref-link {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.referral-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  color: #fff;
}
.referral-share-btn-wa { background: #25d366; }
.referral-share-btn-wa:hover { background: #128c7e; transform: translateY(-1px); }
.referral-share-btn-sms { background: #1976d2; }
.referral-share-btn-sms:hover { background: #1565c0; transform: translateY(-1px); }
.referral-share-btn-copy { background: var(--primary); }
.referral-share-btn-copy:hover { background: var(--primary2); transform: translateY(-1px); }

.referral-list-section {
  margin-top: 18px;
}
.referral-list-header {
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--border);
}
.referral-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 6px;
}
.referral-member-row .ref-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--light);
  flex-shrink: 0;
}
.referral-member-row .ref-info {
  flex: 1;
  min-width: 0;
}
.referral-member-row .ref-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
}
.referral-member-row .ref-meta {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 1px;
}
.referral-member-row .ref-status {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  flex-shrink: 0;
}
.ref-status-approved {
  background: #c8e6c9;
  color: #1b5e20;
}
.ref-status-pending {
  background: #fff3e0;
  color: #e65100;
}

/* Home page invite CTA card */
.referral-cta-card {
  background: linear-gradient(135deg, #fff8e1, #fffde7);
  border: 1.5px solid #ffe082;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.referral-cta-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(232, 160, 32, .2);
  border-color: var(--accent);
}
.referral-cta-card .cta-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.referral-cta-card .cta-content {
  flex: 1;
}
.referral-cta-card .cta-title {
  font-weight: 700;
  color: var(--primary);
  font-size: .95rem;
  margin-bottom: 2px;
}
.referral-cta-card .cta-sub {
  font-size: .8rem;
  color: var(--muted);
}
.referral-cta-card .cta-arrow {
  font-size: 1.2rem;
  color: var(--accent);
}

/* Admin online users panel */
.online-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.online-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  position: relative;
}
.online-user-card::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: online-pulse 2s ease-in-out infinite;
}
.online-user-card .ou-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--light);
  object-fit: cover;
  flex-shrink: 0;
}
.online-user-card .ou-info {
  flex: 1;
  min-width: 0;
}
.online-user-card .ou-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.online-user-card .ou-meta {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 1px;
}


/* ═══════════════════════════════════════════════════════════
   UNIFIED SECTION HEADERS — Plan A
   ═══════════════════════════════════════════════════════════ */
.sug-section {
  border-top: 1px solid var(--border, #e5d9c5);
  padding-top: 4px;
  padding-bottom: 4px;
  transition: background .15s ease;
}

/* Hero parent: Recently Joined (ourmembers) is alone in its container — no border needed above */
.sug-section[data-section="ourmembers"] {
  border-top: none;
  border-bottom: 1px solid var(--border, #e5d9c5);
  padding-bottom: 6px;
  margin-bottom: 2px;
}

/* Sub-sections container: first-child (akna) needs explicit border-top since they have different parent */
.sug-section[data-section="akna"] {
  border-top: 1px solid var(--border, #e5d9c5) !important;
}

.sug-section:hover {
  background: rgba(232, 160, 32, 0.03);
}

.sug-section-hdr-unified {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 10px 6px;
  font-family: inherit;
  border-radius: 8px;
  transition: background .15s;
  margin-top: 4px;
}
.sug-section-hdr-unified:hover {
  background: rgba(0, 0, 0, .03);
}
.sug-hdr-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 7px;
}
.sug-hdr-count {
  font-size: .72rem;
  color: #888;
  font-weight: 600;
}
.sug-chev {
  font-size: .85rem;
  color: #888;
  transition: transform .2s;
}

/* Unified suggestion cards (match Recently Joined .ml-item design) */
.sug-card-unified {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e8e2d4);
  border-radius: 10px;
  padding: 8px 10px;
  transition: all .2s;
}
.sug-card-unified:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}
.sug-hide-btn:hover {
  transform: scale(1.1);
}

/* Stats strip — already on dark visit-counter-bar, refine */
.stats-strip .stat-pill {
  font-family: 'DM Sans', sans-serif;
}
@media (max-width: 600px) {
  .stats-strip {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 9px 12px !important;
  }
  .stats-strip .stat-visitors {
    justify-content: flex-start !important;
  }
  .stats-strip .stat-members {
    justify-content: flex-end !important;
  }
  .stats-strip .stat-pill {
    font-size: .78rem;
  }
  .stats-strip .stat-pill span:not([id*="count"]) {
    font-size: .72rem !important;
  }
  .stats-strip [id$="-count"] {
    font-size: .92rem !important;
  }
}
