/* ============================================================
   DHARKAR SAMAJ COMMUNITY - DESIGN SYSTEM
   ============================================================ */

:root {
  --primary: #195293;
  --primary-dark: #103a6b;
  --secondary: #3A7BFF;
  --bg: #F5F8FC;
  --surface: #FFFFFF;
  --text: #1C2733;
  --text-muted: #6B7A8D;
  --border: rgba(25, 82, 147, 0.10);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-soft: 0 8px 30px rgba(16, 58, 107, 0.08);
  --shadow-hover: 0 14px 40px rgba(16, 58, 107, 0.14);
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.35);
  --header-height: 72px;
  --sidebar-width: 260px;
}

[data-theme="dark"] {
  --bg: #0E1620;
  --surface: #16202C;
  --text: #EAF1F8;
  --text-muted: #93A3B5;
  --border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(22, 32, 44, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 14px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  transition: background .3s ease, color .3s ease;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -0.01em; }
a { text-decoration: none; }

/* ---------------- Glass Card ---------------- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease;
}
.glass-card:hover { box-shadow: var(--shadow-hover); }

.card-soft {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

/* ---------------- Buttons ---------------- */
.btn-gradient {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.5rem;
  font-weight: 500;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-gradient:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(58, 123, 255, 0.35);
}
.btn-outline-brand {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 0.6rem 1.4rem;
  transition: all .2s ease;
}
.btn-outline-brand:hover { background: var(--primary); color: #fff; }

/* ---------------- Sticky Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .navbar-brand {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.25rem;
}
.site-header .nav-link {
  color: var(--text);
  font-weight: 500;
  margin: 0 .4rem;
  position: relative;
}
.site-header .nav-link.active,
.site-header .nav-link:hover { color: var(--secondary); }

/* ---------------- Sticky Sidebar (Dashboard) ---------------- */
.dashboard-layout { display: flex; min-height: calc(100vh - var(--header-height)); }
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.75rem;
}
.sidebar .nav-link {
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 500;
}
.sidebar .nav-link i { font-size: 1.1rem; }
.sidebar .nav-link.active,
.sidebar .nav-link:hover {
  background: var(--gradient-primary);
  color: #fff;
}
.main-content { flex: 1; padding: 1.75rem; min-width: 0; }

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--surface);
    padding: 1rem 1.25rem 1.25rem;
    border-radius: var(--radius-md);
    margin-top: .5rem;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border);
  }
  .navbar-collapse .navbar-nav { margin-bottom: .5rem; }
  .navbar-collapse .nav-link { padding: .6rem .25rem; border-bottom: 1px solid var(--border); }
  .navbar-collapse .nav-link:last-child { border-bottom: none; }
  .navbar-collapse > div.d-flex { flex-wrap: wrap; justify-content: flex-start !important; }
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: var(--header-height);
    z-index: 1040;
    width: 260px;
    transition: left .25s ease;
    box-shadow: var(--shadow-hover);
  }
  .sidebar.show { left: 0; }
  .main-content { padding: 1.1rem; }
}

/* ---------------- Hero ---------------- */
.hero-section {
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 0 0 40px 40px;
  overflow: hidden;
  position: relative;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12), transparent 60%);
}

/* ---------------- Stat Card ---------------- */
.stat-card { border-radius: var(--radius-md); padding: 1.4rem; background: var(--surface); border: 1px solid var(--border); }
.stat-card .stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-primary); color: #fff; font-size: 1.3rem;
}

/* ---------------- Skeleton Loader ---------------- */
.skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.10) 37%, rgba(0,0,0,0.06) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 37%, rgba(255,255,255,0.06) 63%);
  background-size: 400% 100%;
}
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- Page Loader ---------------- */
#page-loader {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; transition: opacity .3s ease;
}
.loader-ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Badges ---------------- */
.badge-membership-free { background: #E7ECF3; color: var(--text-muted); }
.badge-membership-premium { background: linear-gradient(135deg,#3A7BFF,#195293); color: #fff; }
.badge-membership-gold { background: linear-gradient(135deg,#F4B400,#C98A00); color: #fff; }

/* ---------------- Utility ---------------- */
.text-primary-brand { color: var(--primary); }
.section-title { position: relative; padding-bottom: .5rem; }
.section-title::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 48px; height: 4px; border-radius: 4px; background: var(--gradient-primary);
}
.rounded-xl { border-radius: var(--radius-lg) !important; }
.avatar-circle {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--border);
}
.theme-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.icon-btn:hover { color: var(--secondary); }

/* Matrimonial privacy blur */
.locked-field { filter: blur(4px); user-select: none; }

@media (max-width: 480px) {
  .dropdown-menu { max-width: 92vw; }
  .site-header .navbar-brand { font-size: 1.05rem; }
}
