/* ========================================
   JamiiSafe - Kikundi cha Kusaidiana
   Tovuti Rasmi
   ======================================== */

/* CSS Variables / Design Tokens */
:root {
  --primary: #0E6B35;
  --primary-light: #2E9B5A;
  --primary-dark: #074D24;
  --primary-glow: rgba(14,107,53,0.12);
  --accent: #D4880F;
  --accent-light: #F5A623;
  --accent-dark: #B87308;
  --background: #FAFBF7;
  --surface: #FFFFFF;
  --surface-alt: #F0F4EA;
  --surface-warm: #FFF8EE;
  --text: #1B2215;
  --text-secondary: #4A5240;
  --text-light: #7D8573;
  --border: #D6DDCC;
  --border-light: #E8ECDF;
  --danger: #C23030;
  --danger-light: #FFF0F0;
  --success: #1A7A3A;
  --success-light: #E5F6EC;
  --warning: #C07800;
  --warning-light: #FFF6E0;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --transition: 0.25s ease;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--primary-light); }

img { max-width: 100%; display: block; }

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

h1, h2, h3, h4, h5 {
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}

/* Utility */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-secondary { color: var(--text-secondary); }
.hidden { display: none !important; }

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.navbar-brand .brand-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-glow);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text);
  transition: all var(--transition);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    gap: 4px;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { display: block; padding: 12px 16px; width: 100%; }
  .nav-auth { display: none; }
  .nav-links .mobile-auth {
    display: block;
    border-top: 1px solid var(--border);
    margin-top: 8px; padding-top: 12px;
  }
}

@media (min-width: 769px) {
  .nav-links .mobile-auth { display: none; }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(14,107,53,0.3); }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

.btn-outline-white { background: transparent; color: white; border-color: rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: white; color: var(--primary); }

.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #a12020; color: white; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: var(--primary-dark); color: white; }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 34px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--background) 100%);
  z-index: -1;
}

/* Hero with Background Image */
.hero.hero-with-image {
  padding-top: calc(var(--nav-height) + 100px);
  padding-bottom: 100px;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero.hero-with-image::before { display: none; }

.hero-bg-image {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(7,40,18,0.82) 0%, rgba(14,80,40,0.88) 50%, rgba(11,50,25,0.92) 100%);
  z-index: -1;
}

.hero-content-wrapper {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: -1.5px;
}

.hero.hero-with-image h1 { color: white; }

.hero h1 span { color: var(--primary); }
.hero.hero-with-image h1 span { color: var(--accent-light); }

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 660px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero.hero-with-image p { color: rgba(255,255,255,0.85); }

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.hero-stats-dark { border-top-color: rgba(255,255,255,0.15); }

.hero-stat { text-align: center; }

.hero-stat .stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stats-dark .stat-number { color: var(--accent-light); }

.hero-stat .stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
}

.hero-stats-dark .stat-label { color: rgba(255,255,255,0.6); }

@media (max-width: 600px) {
  .hero-stats { flex-direction: column; gap: 24px; }
  .hero.hero-with-image { min-height: auto; padding-top: calc(var(--nav-height) + 60px); padding-bottom: 60px; }
}

/* ========================================
   SECTIONS
   ======================================== */
.section { padding: 90px 0; }

.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-header .badge {
  display: inline-block;
  background: var(--primary-glow);
  color: var(--primary);
  padding: 6px 18px;
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 14px;
  border: 1px solid rgba(14,107,53,0.15);
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  background: var(--primary-glow);
  color: var(--primary);
}

.card h3 { font-size: 1.15rem; margin-bottom: 10px; }

.card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ========================================
   PRICING CARDS
   ======================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: all var(--transition);
}

.pricing-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(14,107,53,0.15);
}

.pricing-card.featured::before {
  content: 'Inashauriwa';
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 5px 22px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Tier Badges */
.tier-badge {
  display: inline-block;
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.tier-msingi { background: #E5F6EC; color: #1A7A3A; }
.tier-wastani { background: #E8F0FE; color: #1A5BB5; }
.tier-juu { background: #FFF3E0; color: #C07800; }

.pricing-card .tier-name {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.pricing-card .tier-price {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.pricing-card .tier-price span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-light);
}

.pricing-card .tier-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Benefit Boxes */
.benefit-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  text-align: left;
}

.benefit-health {
  background: #E5F6EC;
  border: 1px solid #B8E0C7;
}

.benefit-funeral {
  background: #FFF6E0;
  border: 1px solid #FFE0A0;
}

.benefit-icon {
  width: 42px; height: 42px; min-width: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: white;
}

.benefit-health .benefit-icon { color: var(--success); }
.benefit-funeral .benefit-icon { color: var(--accent); }

.benefit-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.benefit-amount {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.pricing-card .tier-features {
  list-style: none;
  text-align: left;
  margin: 20px 0 28px;
}

.pricing-card .tier-features li {
  padding: 7px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pricing-card .tier-features li::before {
  content: '';
  width: 20px; height: 20px; min-width: 20px;
  border-radius: 50%;
  background: var(--success-light);
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231A7A3A' width='14' height='14'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
}

/* Comparison Table */
.comparison-table .data-table td,
.comparison-table .data-table th {
  text-align: center;
}

.comparison-table .data-table td:first-child,
.comparison-table .data-table th:first-child {
  text-align: left;
}

/* ========================================
   FORMS
   ======================================== */
.form-container {
  max-width: 500px;
  margin: 0 auto;
  padding-top: calc(var(--nav-height) + 40px);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: var(--shadow-sm);
}

.form-card h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  text-align: center;
}

.form-card .form-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 0.92rem;
}

.form-tabs {
  display: flex;
  background: var(--surface-alt);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}

.form-tab {
  flex: 1; padding: 11px; text-align: center;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-secondary);
  border-radius: 8px; cursor: pointer;
  transition: all var(--transition);
}

.form-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder { color: var(--text-light); }

.form-group .input-help { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }
.form-group .input-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.form-footer a { font-weight: 600; }

/* Photo Upload */
.photo-upload { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.photo-preview {
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 3px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--surface-alt);
  color: var(--text-light);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color var(--transition);
}

.photo-preview:hover { border-color: var(--primary); }

.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ========================================
   MEMBER LIST & PROFILE
   ======================================== */
.page-header {
  padding-top: calc(var(--nav-height) + 36px);
  padding-bottom: 36px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.page-header h1 { font-size: 1.8rem; margin-bottom: 6px; }
.page-header p { color: var(--text-secondary); font-size: 0.95rem; }

.dashboard-layout {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  min-height: calc(100vh - var(--nav-height) - 160px);
}

.sidebar { width: 300px; min-width: 300px; }
.main-content { flex: 1; min-width: 0; }

@media (max-width: 900px) {
  .dashboard-layout { flex-direction: column; gap: 24px; }
  .sidebar { width: 100%; min-width: 100%; }
}

/* Profile Card */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}

.profile-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 4px solid var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-avatar .avatar-placeholder {
  width: 100%; height: 100%;
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700;
  color: var(--primary);
}

.profile-card .profile-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }

.profile-card .profile-role {
  font-size: 0.82rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.profile-card .profile-tier {
  display: inline-block;
  background: var(--success-light);
  color: var(--success);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Deposit Display */
.deposit-summary {
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 22px;
  margin-top: 16px;
}

.deposit-summary .deposit-label {
  font-size: 0.82rem; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.deposit-summary .deposit-amount {
  font-size: 2rem; font-weight: 800;
  color: var(--primary); margin-top: 4px;
}

.deposit-summary .deposit-currency {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary);
}

/* Deposit History */
.deposit-history { margin-top: 20px; }
.deposit-history h4 { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px; text-align: left; }

.deposit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
}

.deposit-item:last-child { border-bottom: none; }
.deposit-item .dep-amount { font-weight: 600; color: var(--success); }
.deposit-item .dep-date { color: var(--text-light); font-size: 0.82rem; }

/* Member Grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.member-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.member-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.member-card .new-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--accent);
  color: white;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.member-card .member-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 2px solid var(--border);
}

.member-card .member-avatar img { width: 100%; height: 100%; object-fit: cover; }

.member-card .member-avatar .avatar-placeholder {
  width: 100%; height: 100%;
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700;
  color: var(--primary);
}

.member-card .member-name { font-weight: 600; font-size: 0.92rem; margin-bottom: 3px; }
.member-card .member-tier { font-size: 0.78rem; color: var(--text-light); }

/* ========================================
   ADMIN PANEL
   ======================================== */
.admin-tabs {
  display: flex; gap: 4px;
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 28px;
  overflow-x: auto;
}

.admin-tab {
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}

.admin-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.admin-tab:hover:not(.active) { color: var(--text); }

/* Admin Table */
.table-wrapper {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 18px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-alt); }

.data-table .user-cell { display: flex; align-items: center; gap: 12px; }
.data-table .user-cell img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }

.data-table .user-cell .avatar-small {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  color: var(--primary);
}

.status-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-badge.pending { background: var(--warning-light); color: var(--warning); }
.status-badge.approved { background: var(--success-light); color: var(--success); }
.status-badge.admin { background: #E8EAF6; color: #283593; }
.status-badge.superadmin { background: #FCE4EC; color: #AD1457; }

.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.deposit-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.deposit-btns .btn { padding: 6px 12px; font-size: 0.78rem; }

/* ========================================
   ALERTS
   ======================================== */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-success { background: var(--success-light); color: var(--success); border: 1px solid #a5d6a7; }
.alert-danger { background: var(--danger-light); color: var(--danger); border: 1px solid #ef9a9a; }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid #FFE082; }
.alert-info { background: #E3F2FD; color: #1565C0; border: 1px solid #90CAF9; }

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--text);
  color: #ccc;
  padding: 56px 0 24px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 36px;
}

.footer-brand { color: white; font-size: 1.3rem; font-weight: 800; margin-bottom: 12px; }
.footer-desc { font-size: 0.88rem; line-height: 1.7; color: #999; }
.footer h4 { color: white; font-size: 0.9rem; margin-bottom: 16px; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #999; font-size: 0.88rem; }
.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #666;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: all var(--transition);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 500px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal { transform: translateY(0); }
.modal h3 { font-size: 1.2rem; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ========================================
   SPINNER & LOADING
   ======================================== */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-container {
  display: flex;
  align-items: center; justify-content: center;
  padding: 60px 20px;
  flex-direction: column;
  gap: 12px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.loading-container .spinner { width: 32px; height: 32px; }

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
}

.empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; }

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast-container {
  position: fixed;
  top: 84px; right: 24px;
  z-index: 3000;
  display: flex; flex-direction: column; gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.3s ease;
  display: flex; align-items: center; gap: 10px;
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-info { border-left: 4px solid #1565C0; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========================================
   ABOUT PAGE
   ======================================== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-content img { border-radius: var(--radius-lg); }
.about-content h2 { font-size: 2rem; margin-bottom: 16px; }
.about-content p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px; }

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.value-item { display: flex; gap: 12px; align-items: flex-start; }

.value-icon {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: 12px;
  background: var(--primary-glow);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}

@media (max-width: 768px) {
  .about-content { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
}

/* ========================================
   SEARCH / FILTER
   ======================================== */
.search-bar { display: flex; gap: 12px; margin-bottom: 24px; }

.search-bar input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  background: var(--surface);
}

.search-bar input:focus { outline: none; border-color: var(--primary); }

/* Stat Cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 22px;
}

.stat-card .stat-label {
  font-size: 0.8rem; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 1.5rem; font-weight: 800;
  color: var(--text); margin-top: 4px;
}

@media (max-width: 768px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-cards { grid-template-columns: 1fr; } }

/* ========================================
   PAGE TOP
   ======================================== */
.page-top { padding-top: calc(var(--nav-height) + 40px); }

/* CTA Section */
.cta-section {
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section h2 { font-size: 2rem; margin-bottom: 14px; color: white; }
.cta-section p { color: rgba(255,255,255,0.85); max-width: 520px; margin: 0 auto 28px; font-size: 1rem; line-height: 1.7; }
.cta-section .btn { background: white; color: var(--primary); font-weight: 700; }
.cta-section .btn:hover { background: var(--surface-alt); color: var(--primary); }

/* CTA with image */
.cta-with-image {
  position: relative;
  background: transparent;
}

.cta-bg-img {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.cta-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7,77,36,0.85);
  z-index: 1;
}

.cta-content {
  position: relative;
  z-index: 2;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step-card {
  text-align: center;
  padding: 28px 18px;
  counter-increment: step;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.step-card::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 auto 16px;
}

.step-card h3 { font-size: 1rem; margin-bottom: 8px; }
.step-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

@media (max-width: 768px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps-grid { grid-template-columns: 1fr; } }

/* ========================================
   IMAGE SECTIONS
   ======================================== */
.section-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.section-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}

.section-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .section-with-image { grid-template-columns: 1fr; }
}

/* ========================================
   TESTIMONIALS
   ======================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: all var(--transition);
}

.testimonial-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  left: 24px;
  font-size: 4rem;
  font-weight: 900;
  color: var(--primary-glow);
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-content {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
  padding-top: 24px;
}

.testimonial-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-light);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-author-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.testimonial-author-info span {
  font-size: 0.82rem;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ========================================
   BENEFITS HIGHLIGHT SECTION
   ======================================== */
.benefits-highlight {
  background: linear-gradient(180deg, var(--surface-warm) 0%, var(--background) 100%);
  border-top: 1px solid var(--border-light);
}

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* ========================================
   SOCIAL MEDIA LINKS
   ======================================== */
.social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: #999;
}

.social-link:hover svg {
  fill: white;
}

/* ========================================
   MISSING FEATURES INDICATOR
   ======================================== */
.tier-features li.missing {
  opacity: 0.5;
  text-decoration: line-through;
}

.tier-features li.missing::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999' width='14' height='14'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
  background-color: #f0f0f0;
}

/* ========================================
   ID PHOTO UPLOAD
   ======================================== */
.id-photo-upload {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.id-photo-upload:hover {
  border-color: var(--primary);
  background: var(--surface-alt);
}

.id-photo-upload img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
  border-radius: 8px;
}

.id-photo-upload .upload-placeholder {
  color: var(--text-light);
  font-size: 0.88rem;
}

.id-photo-upload .upload-placeholder svg {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* Admin member actions */
.member-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.member-actions .btn {
  flex: 1;
  padding: 8px;
  font-size: 0.75rem;
}

/* Tier Missing Box */
.tier-missing {
  background: var(--danger-light);
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--danger);
}

.tier-missing strong {
  display: block;
  margin-bottom: 6px;
}

.tier-missing ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tier-missing ul li {
  background: rgba(220, 53, 69, 0.15);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.tier-missing ul li::before {
  content: none;
}

/* Suspended member */
.member-card.suspended {
  opacity: 0.6;
  border-color: var(--danger);
}

.member-card .suspended-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--danger);
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}
