/* ================================================================
   RAKET_HUB v4.5 — MASTER RESPONSIVE MODERN DESIGN SYSTEM
   "May raket? Hanap dito. May kailangan? Raket dito."
   ================================================================ */

/* ── 1. CSS Variables & Design Tokens ───────────────────────── */
:root {
  /* Brand Palette */
  --rh-primary:         #7C3AED;
  --rh-primary-dark:    #5B21B6;
  --rh-primary-hover:   #6D28D9;
  --rh-primary-light:   #8B5CF6;
  --rh-primary-soft:    #EDE9FE;
  --rh-primary-subtle:  #F5F3FF;
  
  --rh-amber:           #F59E0B;
  --rh-amber-dark:      #D97706;
  --rh-amber-soft:      #FEF3C7;
  
  --rh-success:         #10B981;
  --rh-success-dark:    #059669;
  --rh-success-soft:    #D1FAE5;
  
  --rh-danger:          #EF4444;
  --rh-danger-dark:     #DC2626;
  --rh-danger-soft:     #FEE2E2;
  
  --rh-info:            #3B82F6;
  --rh-info-dark:       #2563EB;
  --rh-info-soft:       #DBEAFE;
  
  --rh-accent:          #F59E0B;
  --rh-gradient-primary: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 45%, #F59E0B 100%);
  --rh-gradient-hero: linear-gradient(135deg, #0B081E 0%, #171044 35%, #2E1065 100%);

  /* Neutrals */
  --rh-bg:              #F8FAFC;
  --rh-surface:         #FFFFFF;
  --rh-surface-alt:     #F1F5F9;
  --rh-border:          #E2E8F0;
  --rh-border-light:    #F1F5F9;
  --rh-border-focus:    #C4B5FD;
  
  --rh-text-heading:    #0F172A;
  --rh-text-body:       #334155;
  --rh-text-muted:      #64748B;
  --rh-text-light:      #64748B;
  
  /* Radii */
  --rh-radius-xs:       4px;
  --rh-radius-sm:       8px;
  --rh-radius-md:       12px;
  --rh-radius-lg:       16px;
  --rh-radius-xl:       22px;
  --rh-radius-pill:     9999px;
  
  /* Shadows */
  --rh-shadow-xs:       0 1px 2px rgba(15, 23, 42, 0.04);
  --rh-shadow-sm:       0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --rh-shadow-md:       0 4px 16px -2px rgba(124, 58, 237, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --rh-shadow-lg:       0 12px 32px -4px rgba(124, 58, 237, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --rh-shadow-xl:       0 20px 48px -6px rgba(124, 58, 237, 0.18), 0 8px 20px -3px rgba(15, 23, 42, 0.08);

  /* Layout Dimensions */
  --rh-navbar-h:        64px;
  --rh-bottomnav-h:     64px;
  --rh-sidebar-w:       260px;
}

/* ── 2. Global Resets & Base ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.09), transparent 25%),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.08), transparent 30%),
    var(--rh-bg);
  color: var(--rh-text-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--rh-bottomnav-h) + 12px);
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-x: hidden;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.18); }
  50% { box-shadow: 0 0 0 12px rgba(124, 58, 237, 0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  transition-delay: var(--delay, 0ms);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

a {
  color: var(--rh-primary);
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

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

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

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ── 3. Typography & Utility ────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: var(--rh-text-heading);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.text-gradient {
  background: linear-gradient(135deg, var(--rh-primary), var(--rh-amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-amber {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted { color: var(--rh-text-muted) !important; }
.fw-medium  { font-weight: 500 !important; }
.fw-semibold{ font-weight: 600 !important; }
.fw-bold    { font-weight: 700 !important; }
.fw-black   { font-weight: 900 !important; }

.user-type-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.user-type-btn {
  appearance: none;
  border: 1.5px solid var(--rh-border);
  border-radius: var(--rh-radius-md);
  background: var(--rh-surface);
  color: var(--rh-text-body);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: .85rem 1rem;
  text-align: left;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  min-height: 76px;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.user-type-btn i { color: var(--rh-primary); }
.user-type-btn small { color: var(--rh-text-muted); font-size: .72rem; font-weight: 500; margin-top: .35rem; }
.user-type-btn:hover { border-color: var(--rh-border-focus); background: var(--rh-primary-subtle); transform: translateY(-1px); }
.user-type-btn.active { background: var(--rh-primary-subtle); border-color: var(--rh-primary); color: var(--rh-primary-dark); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }
.user-type-btn.active small { color: var(--rh-primary-dark); }
@media (max-width: 420px) {
  .user-type-tabs { grid-template-columns: 1fr; }
}

.gamification-hero {
  background: linear-gradient(135deg, #171044 0%, #31206d 100%);
  color: #E2E8F0;
  border-radius: var(--rh-radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 10px 24px rgba(49, 32, 109, .18);
}
.gamification-hero h4 { color: #ffffff; }
.gamification-eyebrow { color: #FCD34D; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .55rem; }
.gamification-level { color: #FCD34D; font-size: 1.35rem; font-weight: 900; }
.gamification-progress { height: 9px; background: rgba(255,255,255,.18); border-radius: var(--rh-radius-pill); }
.gamification-progress .progress-bar { background: linear-gradient(90deg, #FBBF24, #F97316); border-radius: inherit; }
.gamification-stat, .gamification-challenge { background: var(--rh-surface); border: 1px solid var(--rh-border); border-radius: var(--rh-radius-lg); padding: 1rem; display: flex; flex-direction: column; justify-content: center; }
.gamification-stat { text-align: center; }
.gamification-stat i { color: var(--rh-amber-dark); font-size: 1.2rem; margin-bottom: .35rem; }
.gamification-stat strong { color: var(--rh-text-heading); font-size: 1.2rem; }
.gamification-stat span, .gamification-challenge span { color: var(--rh-text-muted); font-size: .72rem; }
.gamification-challenge { border-top: 3px solid var(--rh-amber); }
.gamification-challenge .small { color: var(--rh-amber-dark); }
.gamification-challenge strong { color: var(--rh-text-heading); font-size: .84rem; margin: .25rem 0; }
.journey-badge { min-height: 142px; padding: .8rem; border: 1px solid var(--rh-border); border-radius: var(--rh-radius-md); display: flex; flex-direction: column; gap: .18rem; }
.journey-badge > i { color: var(--rh-amber-dark); font-size: 1.35rem; }
.journey-badge strong { color: var(--rh-text-heading); font-size: .8rem; }
.journey-badge span { color: var(--rh-text-muted); font-size: .7rem; line-height: 1.35; }
.journey-badge small { color: var(--rh-success-dark); font-size: .65rem; margin-top: auto; }
.journey-badge.is-locked { background: var(--rh-surface-alt); opacity: .72; }
.journey-badge.is-locked > i, .journey-badge.is-locked small { color: var(--rh-text-muted); }
.journey-challenge { padding: .75rem; border: 1px solid var(--rh-border); border-radius: var(--rh-radius-md); }
.transaction-row { display: flex; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--rh-border-light); }
.transaction-row:last-child { border-bottom: 0; }
.transaction-row > strong { min-width: 68px; color: var(--rh-success-dark); font-size: .82rem; }
.transaction-row > span { color: var(--rh-text-body); font-size: .78rem; }
.transaction-row small { display: block; color: var(--rh-text-muted); font-size: .68rem; margin-top: .1rem; }
.journey-coin-total { display: flex; align-items: baseline; gap: .45rem; }
.journey-coin-total strong { color: var(--rh-amber-dark); font-size: 1.8rem; }
.journey-coin-total span { color: var(--rh-text-muted); font-size: .78rem; }

/* ── 4. Buttons ─────────────────────────────────────────────── */
.btn {
  font-family: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--rh-radius-md);
  font-size: 0.875rem;
  padding: 0.5625rem 1.125rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.98rem;
  border-radius: var(--rh-radius-lg);
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8125rem;
  border-radius: var(--rh-radius-sm);
}

.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--rh-radius-xs);
}

.btn-primary {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 60%, #6D28D9 100%);
  border: none;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 60%, #5B21B6 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
  transform: translateY(-1.5px);
}

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

.btn-outline-primary:hover {
  background: var(--rh-primary-subtle);
  border-color: var(--rh-primary);
  color: var(--rh-primary-dark);
  transform: translateY(-1.5px);
}

.btn-warning {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border: none;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
  transform: translateY(-1.5px);
}

.btn-light {
  background: #ffffff;
  border-color: var(--rh-border);
  color: var(--rh-text-body);
  box-shadow: var(--rh-shadow-xs);
}

.btn-light:hover {
  background: var(--rh-primary-subtle);
  border-color: var(--rh-border-focus);
  color: var(--rh-primary);
  transform: translateY(-1.5px);
}

.btn-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: none;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff !important;
  transform: translateY(-1.5px);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  border: none;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #ffffff !important;
  transform: translateY(-1.5px);
}

.btn-outline-secondary {
  color: var(--rh-text-muted);
  border-color: var(--rh-border);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--rh-border-light);
  color: var(--rh-text-heading);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--rh-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  padding: 0;
  border: 1.5px solid var(--rh-border);
  color: var(--rh-text-muted);
  background: #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--rh-primary-subtle);
  color: var(--rh-primary);
  border-color: var(--rh-border-focus);
  transform: translateY(-1.5px);
  box-shadow: var(--rh-shadow-sm);
}

.btn-icon.favorited {
  background: #FEE2E2;
  border-color: #FECACA;
  color: #EF4444;
}

/* ── 5. Forms & Inputs ──────────────────────────────────────── */
.form-control, .form-select {
  font-family: inherit;
  font-size: 0.875rem;
  border: 1.5px solid var(--rh-border);
  border-radius: var(--rh-radius-md);
  padding: 0.625rem 0.875rem;
  color: var(--rh-text-heading);
  background-color: #ffffff;
  min-height: 42px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--rh-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.form-control::placeholder {
  color: var(--rh-text-light);
}

.form-label {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--rh-text-heading);
  margin-bottom: 0.375rem;
}

.input-group-text {
  border: 1.5px solid var(--rh-border);
  background: #ffffff;
  color: var(--rh-text-muted);
  border-radius: var(--rh-radius-md);
}

.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.input-group > :not(:last-child):not(.dropdown-toggle) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.form-check-input:checked {
  background-color: var(--rh-primary);
  border-color: var(--rh-primary);
}

/* ── 6. Header & Top Navbar ─────────────────────────────────── */
.rh-navbar {
  height: var(--rh-navbar-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rh-border);
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex !important;
  align-items: center !important;
  padding: 0 1rem !important;
  gap: 0.75rem !important;
  box-shadow: var(--rh-shadow-xs);
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.brand-logo-sm {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.brand-name {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--rh-text-heading);
  letter-spacing: -0.04em;
  margin: 0;
  line-height: 1;
}

.brand-name-sm {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--rh-text-heading);
  letter-spacing: -0.03em;
}

.brand-name span, .brand-name-sm span {
  background: linear-gradient(135deg, var(--rh-primary), var(--rh-amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--rh-text-muted);
  padding: 0.45rem 0.75rem;
  border-radius: var(--rh-radius-sm);
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--rh-primary);
  background: var(--rh-primary-subtle);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.section-link {
  color: var(--rh-primary);
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.section-link:hover {
  color: var(--rh-primary-dark);
}

.badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--rh-danger);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: var(--rh-radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
  box-shadow: var(--rh-shadow-xs);
}

/* ── 7. Mobile Bottom Navigation ────────────────────────────── */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--rh-bottomnav-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--rh-border);
  display: flex !important;
  align-items: stretch;
  z-index: 500;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.07);
}

.mobile-nav-item {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--rh-text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0.1rem;
  transition: color 0.18s ease;
}

.mobile-nav-item i {
  font-size: 1.15rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-item.active {
  color: var(--rh-primary);
}

.mobile-nav-item.active i {
  transform: scale(1.1);
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  background: var(--rh-primary);
  border-radius: 0 0 4px 4px;
}

.mobile-nav-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4), 0 0 0 3px rgba(124, 58, 237, 0.15);
  margin-top: -18px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-fab:active {
  transform: scale(0.92);
}

@media (min-width: 992px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

/* ── 8. Cards & Surfaces ────────────────────────────────────── */
.rh-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.95));
  border-radius: var(--rh-radius-lg);
  border: 1px solid var(--rh-border);
  overflow: hidden;
  box-shadow: var(--rh-shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ── 9. Unified Stat Cards ──────────────────────────────────── */
.stat-card {
  background: #ffffff;
  border-radius: var(--rh-radius-lg);
  border: 1px solid var(--rh-border);
  padding: 1.125rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.22s ease;
  box-shadow: var(--rh-shadow-xs);
  height: 100%;
}

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

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--rh-text-heading);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rh-text-muted);
  margin-top: 0.25rem;
}

.stat-icon {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.stat-blue   { border-top: 3.5px solid var(--rh-info); }
.stat-blue .stat-icon { color: var(--rh-info); }

.stat-purple { border-top: 3.5px solid var(--rh-primary); }
.stat-purple .stat-icon { color: var(--rh-primary); }

.stat-green  { border-top: 3.5px solid var(--rh-success); }
.stat-green .stat-icon { color: var(--rh-success); }

.stat-amber  { border-top: 3.5px solid var(--rh-amber); }
.stat-amber .stat-icon { color: var(--rh-amber); }

.stat-orange { border-top: 3.5px solid #EA580C; }
.stat-orange .stat-icon { color: #EA580C; }

.stat-red    { border-top: 3.5px solid var(--rh-danger); }
.stat-red .stat-icon { color: var(--rh-danger); }

/* ── 10. Hero Section ───────────────────────────────────────── */
.hero-section {
  background: var(--rh-gradient-hero);
  position: relative;
  overflow: hidden;
  padding: 3.5rem 1rem 4rem;
}

.hero-section h1 {
  color: #ffffff;
  animation: fadeUp 0.8s ease both;
}

.rewards-preview {
  background: linear-gradient(180deg, #fffaf4 0%, #fff7ed 100%);
  border-bottom: 1px solid #FED7AA;
  padding: 1rem 0;
}
.rewards-preview-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #FED7AA;
  border-left: 4px solid var(--rh-amber);
  border-radius: var(--rh-radius-lg);
  box-shadow: var(--rh-shadow-sm);
  animation: fadeUp 0.75s ease both;
}
.rewards-preview h2 { color: var(--rh-text-heading); font-size: 1.15rem; }
.rewards-preview p { color: var(--rh-text-body); font-size: .86rem; }
@media (max-width: 575.98px) {
  .rewards-preview-inner { align-items: flex-start; flex-direction: column; }
  .rewards-preview .btn { width: 100%; }
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle 450px at 15% 30%, rgba(124, 58, 237, 0.42), transparent 70%),
    radial-gradient(circle 400px at 85% 20%, rgba(245, 158, 11, 0.22), transparent 60%),
    radial-gradient(circle 500px at 50% 100%, rgba(16, 185, 129, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-search-box {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--rh-radius-pill);
  padding: 0.3rem 0.3rem 0.3rem 1.1rem;
  display: flex;
  align-items: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  animation: fadeUp 0.8s ease 0.1s both;
}

.hero-search-box:focus-within {
  border-color: var(--rh-primary-light);
  box-shadow: 0 16px 48px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.hero-search-box input {
  flex-grow: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.92rem;
  color: var(--rh-text-heading);
  padding: 0.4rem 0.5rem;
  min-width: 0;
}

.hs-icon {
  color: var(--rh-primary);
  font-size: 1rem;
  margin-right: 0.35rem;
  flex-shrink: 0;
}

.hs-btn {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--rh-radius-pill);
  padding: 0.6rem 1.25rem;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.hs-btn:hover {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  transform: translateY(-1px);
}

.hero-chip {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--rh-radius-pill);
  padding: 0.22rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 500;
  transition: all 0.18s ease;
}

.hero-chip:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.hero-stats-bar {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--rh-radius-xl);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 1.5rem;
  animation: fadeUp 0.9s ease 0.2s both;
}

.hero-stat:hover {
  transform: translateY(-2px);
}

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

.hero-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-stat-div {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
}

/* ── 11. Categories & Provider Cards ────────────────────────── */
.category-card {
  background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius-lg);
  padding: 1rem 0.65rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--rh-border-focus);
  box-shadow: var(--rh-shadow-md);
}

.cat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--rh-radius-md);
  background: var(--rh-primary-subtle);
  color: var(--rh-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.category-card:hover .cat-icon-wrap {
  background: var(--rh-primary);
  color: #ffffff;
  transform: scale(1.06);
}

.cat-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--rh-text-heading);
  line-height: 1.25;
}

.provider-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  animation: fadeUp 0.7s ease both;
}

.provider-card:hover {
  box-shadow: var(--rh-shadow-md);
}

.provider-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.provider-avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--rh-radius-md);
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: var(--rh-shadow-sm);
}

.profile-avatar-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  flex: 0 0 128px;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid #ffffff;
  border-radius: 50%;
  box-shadow: var(--rh-shadow-lg);
}

.profile-verified-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--rh-success);
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: var(--rh-shadow-sm);
}

@media (max-width: 575.98px) {
  .profile-avatar-wrap {
    width: 96px;
    height: 96px;
    flex-basis: 96px;
  }

  .profile-verified-badge {
    width: 26px;
    height: 26px;
  }
}

.verified-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--rh-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.52rem;
  border: 2px solid #ffffff;
  box-shadow: var(--rh-shadow-xs);
}

.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.availability-dot.online  { background-color: var(--rh-success); box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
.availability-dot.offline { background-color: var(--rh-text-light); }

.price-tag {
  font-weight: 800;
  color: var(--rh-primary);
  font-size: 1.05rem;
}

/* ── 12. Requests Feed & Cards ──────────────────────────────── */
.request-card {
  border-left: 4px solid var(--rh-primary);
}

/* ── 13. Responsive Messaging & Real-Time Chat UI ───────────── */
.chat-layout {
  height: calc(100vh - var(--rh-navbar-h) - var(--rh-bottomnav-h));
  min-height: 480px;
  display: flex;
  background: #ffffff;
  border-radius: var(--rh-radius-xl);
  border: 1px solid var(--rh-border);
  box-shadow: var(--rh-shadow-md);
  overflow: hidden;
  position: relative;
}

@media (min-width: 992px) {
  .chat-layout {
    height: calc(100vh - var(--rh-navbar-h) - 40px);
    margin-bottom: 1.5rem;
  }
}

.chat-sidebar {
  width: 100%;
  border-right: 1px solid var(--rh-border);
  display: flex;
  flex-direction: column;
  background: #F8FAFC;
  overflow-y: auto;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .chat-sidebar {
    width: 320px;
  }
}

.chat-conversation-item {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--rh-border-light);
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-conversation-item:hover, .chat-conversation-item.active {
  background: #ffffff;
  border-left: 3px solid var(--rh-primary);
}

.chat-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  min-width: 0;
}

.chat-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rh-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.chat-messages {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #F8FAFC;
}

.chat-bubble {
  max-width: 82%;
  padding: 0.65rem 0.95rem;
  border-radius: var(--rh-radius-lg);
  font-size: 0.85rem;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
}

.chat-bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: #ffffff;
  border-bottom-right-radius: var(--rh-radius-xs);
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.25);
}

.chat-bubble.them {
  align-self: flex-start;
  background: #ffffff;
  color: var(--rh-text-heading);
  border: 1px solid var(--rh-border);
  border-bottom-left-radius: var(--rh-radius-xs);
  box-shadow: var(--rh-shadow-xs);
}

.chat-input-bar {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--rh-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
}

/* ── 14. Responsive Admin Panel Layout ──────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #F1F5F9;
  position: relative;
}

.admin-sidebar {
  width: var(--rh-sidebar-w);
  background: #0F172A;
  color: #F8FAFC;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1040;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-nav-section {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  margin: 0.1rem 0.5rem;
  border-radius: var(--rh-radius-md);
  color: #94A3B8;
  font-weight: 600;
  font-size: 0.825rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.admin-nav-link i {
  font-size: 0.95rem;
  width: 20px;
  text-align: center;
  color: #64748B;
  transition: color 0.15s ease;
}

.admin-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}
.admin-nav-link:hover i {
  color: #ffffff;
}

.admin-nav-link.active {
  background: var(--rh-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}
.admin-nav-link.active i {
  color: #ffffff;
}

.admin-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.admin-topbar {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--rh-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 300;
}

.admin-page {
  flex-grow: 1;
  padding: 1.25rem;
}

@media (min-width: 992px) {
  .admin-page {
    padding: 1.75rem 2rem;
  }
}

/* Admin Mobile Sidebar Drawer */
@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  }

  .admin-sidebar.show {
    transform: translateX(0);
  }

  .admin-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1030;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .admin-backdrop.show {
    display: block;
    opacity: 1;
  }
}

/* ── 15. Auth Pages Layout ──────────────────────────────────── */
.auth-page {
  background: #0B081E;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  position: relative;
  overflow-x: hidden;
}

.auth-wrapper {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 2;
  margin: auto;
}

.auth-card {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--rh-radius-xl);
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

@media (max-width: 575.98px) {
  .auth-card {
    padding: 1.5rem 1.15rem;
    border-radius: var(--rh-radius-lg);
  }
}

.auth-flow-page {
  background:
    linear-gradient(125deg, rgba(13, 64, 68, .96), rgba(27, 47, 63, .97) 58%, rgba(126, 78, 28, .94)),
    #153b43;
  position: relative;
  isolation: isolate;
}

.auth-flow-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .2;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(135deg, #000, transparent 78%);
}

.auth-flow-wrapper { max-width: 460px; }

.auth-flow-card {
  padding: 2.1rem;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(8,22,31,.3);
}

.auth-flow-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  margin-bottom: 1.8rem;
  text-decoration: none;
}

.auth-flow-brand .brand-logo-icon { width: 34px; height: 34px; }
.auth-flow-brand .brand-name { font-size: 1.25rem; }

.auth-flow-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: #E7F5EF;
  color: #13795B;
  font-size: 1.25rem;
}

.auth-flow-eyebrow {
  margin-bottom: .35rem;
  color: #13795B;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-flow-title {
  margin-bottom: .55rem;
  color: #172331;
  font-size: 1.55rem;
  font-weight: 800;
}

.auth-flow-copy {
  margin-bottom: 1rem;
  color: #5B6878;
  font-size: .88rem;
  line-height: 1.6;
}

.auth-flow-code {
  min-height: 58px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-flow-back {
  display: block;
  margin-top: 1.2rem;
  color: #5B6878;
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.auth-flow-back:hover { color: var(--rh-primary-dark); }

@media (max-width: 575.98px) {
  .auth-flow-card { padding: 1.6rem 1.25rem; }
}

/* ── 16. Toasts & Modals ────────────────────────────────────── */
#toastContainer {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 380px;
  width: calc(100% - 2.5rem);
}

.rh-toast {
  pointer-events: auto;
  background: #ffffff;
  border-radius: var(--rh-radius-lg);
  padding: 0.8rem 1rem;
  box-shadow: var(--rh-shadow-xl);
  border: 1px solid var(--rh-border);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.rh-toast.toast-success { border-left: 4px solid var(--rh-success); }
.rh-toast.toast-error   { border-left: 4px solid var(--rh-danger); }
.rh-toast.toast-warning { border-left: 4px solid var(--rh-amber); }
.rh-toast.toast-info    { border-left: 4px solid var(--rh-primary); }

.rh-toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-success .rh-toast-icon { color: var(--rh-success); }
.toast-error .rh-toast-icon   { color: var(--rh-danger); }
.toast-warning .rh-toast-icon { color: var(--rh-amber); }
.toast-info .rh-toast-icon    { color: var(--rh-primary); }

.rh-toast-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--rh-text-light);
  cursor: pointer;
  padding: 0 0.2rem;
  transition: color 0.15s ease;
}
.rh-toast-close:hover { color: var(--rh-text-heading); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ── 17. Skeletons & Empty States ───────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s infinite ease-in-out;
  border-radius: var(--rh-radius-sm);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--rh-radius-md);
}

@keyframes skeletonPulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
}

.empty-state i {
  font-size: 2.75rem;
  color: var(--rh-text-light);
  margin-bottom: 0.85rem;
}

.empty-state h5 {
  font-weight: 700;
  margin-bottom: 0.4rem;
}

/* ── 18. Page Layout & Footer ───────────────────────────────── */
.page-main {
  flex-grow: 1;
  padding: 1.25rem 0 2rem;
}

.rh-footer {
  background: #0B081E;
  color: #F8FAFC;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  line-height: 2;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ── Homepage polish ───────────────────────────────────────── */
.homepage .hero-section {
  isolation: isolate;
  padding: 4.5rem 1rem 4rem;
  background: linear-gradient(112deg, #17142b 0%, #34234e 58%, #14514e 100%);
}

.homepage .hero-section::before {
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(115deg, transparent 35%, rgba(245,158,11,.12) 100%);
  background-size: 44px 44px, 44px 44px, auto;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.homepage .hero-title {
  max-width: 720px;
  margin: 0 auto 1rem;
  color: #fff;
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.08;
}

.homepage .hero-title span {
  background-image: linear-gradient(105deg, #FDE68A, #FDBA74);
}

.hero-availability {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.2);
  color: #F8FAFC;
  font-size: .78rem;
  font-weight: 600;
}

.homepage .hero-description {
  max-width: 470px;
  margin: 0 auto 1.75rem;
  color: rgba(255,255,255,.78);
  font-size: 1rem;
  line-height: 1.65;
}

.homepage .hero-search-box {
  min-height: 62px;
  padding: .35rem .4rem .35rem 1.15rem;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(8,12,24,.28);
}

.homepage .hero-search-box input {
  padding: .6rem .65rem;
  font-size: .95rem;
}

.homepage .hero-search-box input::placeholder {
  color: #7B8493;
  opacity: 1;
}

.homepage .hero-search-box select {
  max-width: 118px;
  min-height: 40px;
  padding: 0 .45rem;
  border: 0;
  border-left: 1px solid #E2E8F0;
  background: #fff;
  color: #475569;
  font-size: .78rem;
  outline-offset: 2px;
}

.homepage .hs-btn {
  min-height: 46px;
  padding: .65rem 1.2rem;
  border-radius: 9px;
  background: #6D28D9;
}

.homepage .hs-btn:hover { background: #5B21B6; }

.homepage .hero-chip {
  padding: .35rem .8rem;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
}

.homepage .hero-stats-bar {
  max-width: 660px;
  margin: 1.75rem auto 0;
  border-radius: 12px;
  background: rgba(10,16,28,.24);
}

.homepage .page-main { padding-top: 2rem; }

.homepage .category-card {
  min-height: 146px;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(15,23,42,.035);
}

.homepage .category-card:hover {
  box-shadow: 0 10px 24px rgba(15,23,42,.09);
}

.homepage .provider-card { min-height: 220px; }

.rh-navbar a:focus-visible,
.rh-navbar button:focus-visible,
.mobile-nav-item:focus-visible,
.homepage .hero-chip:focus-visible,
.homepage a:focus-visible .category-card,
.homepage .hs-btn:focus-visible {
  outline: 3px solid #F59E0B;
  outline-offset: 3px;
}

.rh-navbar .nav-link.active { background: #F0FDF4; color: #15803D; }

@media (max-width: 767.98px) {
  .homepage .hero-section { padding: 3.25rem .75rem 2.75rem; }
  .homepage .hero-title { font-size: 2.35rem; }
  .homepage .hero-description { font-size: .94rem; }
  .homepage .hero-search-box {
    min-height: 58px;
    padding-left: .85rem;
    border-radius: 10px;
  }
  .homepage .hero-search-box input { font-size: .84rem; }
  .homepage .hero-search-box select {
    max-width: 84px;
    padding: 0 .25rem;
    font-size: .7rem;
  }
  .homepage .hs-btn { min-height: 42px; padding: .55rem .8rem; }
  .homepage .hero-stats-bar { padding: .75rem .4rem; }
  .homepage .hero-stat-val { font-size: 1.05rem; }
  .homepage .hero-stat-label { font-size: .58rem; }
  .homepage .hero-stat-div { height: 20px; }
  .homepage .category-card { min-height: 136px; }
}

@media (max-width: 380px) {
  .homepage .hero-search-box { padding-left: .65rem; }
  .homepage .hero-search-box input { padding-inline: .35rem; }
  .homepage .hero-search-box select { max-width: 72px; }
  .homepage .hs-btn { padding-inline: .65rem; }
  .homepage .hero-stats-bar { border-radius: 8px; }
}

/* ── Floating Messenger ────────────────────────────────────── */
.rh-floating-messenger {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: inherit;
}

.rh-fm-heads { display: flex; flex-direction: column-reverse; gap: 9px; }
.rh-fm-head-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.rh-fm-message-preview {
  width: min(224px, calc(100vw - 104px));
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 11px;
  border: 1px solid #DDE5E8;
  border-radius: 11px 11px 4px 11px;
  background: #fff;
  color: #263735;
  box-shadow: 0 4px 14px rgba(15,23,42,.16);
  text-align: left;
  cursor: pointer;
  animation: rhFmOpen .18s ease-out;
}

.rh-fm-message-preview:hover { background: #F8FBFA; border-color: #BFD8CE; }
.rh-fm-message-preview strong { overflow: hidden; color: #13795B; font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.rh-fm-message-preview > span { overflow: hidden; color: #344442; font-size: .76rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }

.rh-fm-launcher,
.rh-fm-head,
.rh-fm-close,
.rh-fm-back,
.rh-fm-all,
.rh-fm-send,
.rh-fm-attach {
  border: 0;
  cursor: pointer;
}

.rh-fm-launcher {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #13795B;
  color: #fff;
  box-shadow: 0 8px 24px rgba(19,121,91,.3);
  font-size: 1.35rem;
  transition: transform .18s ease, background .18s ease;
}

.rh-fm-launcher:hover { transform: translateY(-2px); background: #0F654B; }
.rh-fm-launcher-count,
.rh-fm-count {
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #E5484D;
  color: #fff;
  font-size: .63rem;
  font-weight: 800;
  line-height: 1;
}

.rh-fm-launcher-count { position: absolute; top: -2px; right: -3px; }

.rh-fm-head {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15,23,42,.22);
  transition: transform .18s ease;
}

.rh-fm-head:hover { transform: scale(1.08); }
.rh-fm-head > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.rh-fm-head .rh-fm-count { position: absolute; top: -5px; right: -7px; }
.rh-fm-online { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: #20A779; }

.rh-fm-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(360px, calc(100vw - 32px));
  height: min(540px, calc(100dvh - 115px));
  min-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #DDE5E8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(15,23,42,.24);
  animation: rhFmOpen .18s ease-out;
}

.rh-fm-panel[hidden],
.rh-fm-inbox[hidden],
.rh-fm-chat[hidden],
.rh-fm-header-avatar[hidden],
.rh-fm-back[hidden],
.rh-fm-launcher-count[hidden] { display: none !important; }

@keyframes rhFmOpen {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.rh-fm-panel-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #E8EEF0;
  background: #fff;
}

.rh-fm-panel-title-wrap { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.rh-fm-panel-title-wrap strong { overflow: hidden; color: #182B2A; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.rh-fm-panel-title-wrap > span { color: #71817F; font-size: .7rem; }
.rh-fm-panel-title-wrap > span.is-online { color: #13795B; }
.rh-fm-header-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.rh-fm-close, .rh-fm-back, .rh-fm-all { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border-radius: 50%; background: transparent; color: #60706E; text-decoration: none; }
.rh-fm-close:hover, .rh-fm-back:hover, .rh-fm-all:hover { background: #F0F5F3; color: #13795B; }

.rh-fm-inbox, .rh-fm-chat { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.rh-fm-search { height: 42px; display: flex; align-items: center; gap: 9px; margin: 10px 12px 4px; padding: 0 12px; border-radius: 8px; background: #F1F5F4; color: #788784; }
.rh-fm-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #182B2A; font: inherit; font-size: .82rem; }
.rh-fm-list { flex: 1; overflow-y: auto; padding: 3px 8px 8px; }
.rh-fm-conversation { width: 100%; min-height: 66px; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.rh-fm-conversation:hover, .rh-fm-conversation:focus-visible { background: #F2F7F5; outline: 0; }
.rh-fm-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; object-fit: cover; }
.rh-fm-conversation-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.rh-fm-conversation-copy strong { overflow: hidden; color: #182B2A; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.rh-fm-conversation-copy > span { overflow: hidden; color: #71817F; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.rh-fm-empty { margin: auto; padding: 22px; color: #7B8987; font-size: .82rem; text-align: center; }

.rh-fm-messages { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 14px 12px; background: #F5F8F7; }
.rh-fm-message { max-width: 82%; display: flex; flex-direction: column; align-self: flex-start; gap: 4px; padding: 8px 11px; border: 1px solid #E3EBE8; border-radius: 12px 12px 12px 4px; background: #fff; color: #263735; font-size: .82rem; line-height: 1.4; overflow-wrap: anywhere; }
.rh-fm-message.is-mine { align-self: flex-end; border-color: #13795B; border-radius: 12px 12px 4px 12px; background: #13795B; color: #fff; }
.rh-fm-message small { align-self: flex-end; opacity: .72; font-size: .63rem; }
.rh-fm-attachment-image { max-width: 190px; max-height: 160px; border-radius: 8px; object-fit: cover; cursor: zoom-in; }
.rh-fm-file { color: inherit; font-weight: 700; }
.rh-fm-form { display: flex; align-items: center; gap: 8px; padding: 10px; border-top: 1px solid #E8EEF0; background: #fff; }
.rh-fm-form input[type="text"] { min-width: 0; flex: 1; height: 38px; padding: 0 12px; border: 1px solid #E1E9E6; border-radius: 999px; background: #F5F8F7; color: #182B2A; font: inherit; font-size: .82rem; outline: 0; }
.rh-fm-form input[type="text"]:focus { border-color: #76B6A0; box-shadow: 0 0 0 3px rgba(19,121,91,.12); }
.rh-fm-attach, .rh-fm-form button[type="submit"] { width: 36px; height: 36px; display: grid; flex: 0 0 36px; place-items: center; border-radius: 50%; }
.rh-fm-attach { background: #F1F5F4; color: #62716E; }
.rh-fm-attach input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.rh-fm-form button[type="submit"] { border: 0; background: #13795B; color: #fff; cursor: pointer; }
.rh-fm-form button[type="submit"]:disabled { opacity: .55; cursor: wait; }

.rh-fm-launcher:focus-visible, .rh-fm-head:focus-visible, .rh-fm-close:focus-visible, .rh-fm-back:focus-visible, .rh-fm-all:focus-visible, .rh-fm-attach:focus-within, .rh-fm-form button:focus-visible { outline: 3px solid #F4B740; outline-offset: 3px; }
.rh-fm-message-preview:focus-visible { outline: 3px solid #F4B740; outline-offset: 2px; }

/* ── Shared Image Viewer ───────────────────────────────────── */
.rh-image-viewer .modal-dialog { min-height: calc(100% - 1rem); display: flex; align-items: center; max-width: min(1240px, calc(100vw - 32px)); }
.rh-image-viewer.show .modal-dialog { transform: none; }
.rh-image-viewer .modal-content { max-height: calc(100dvh - 32px); overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: radial-gradient(ellipse at 50% 42%, #202d2a 0, #111918 65%); color: #F8FAFC; box-shadow: 0 28px 100px rgba(0,0,0,.58); }
.rh-image-viewer .modal-header { min-height: 70px; display: flex; align-items: center; gap: 12px; padding: .8rem 1.1rem; border: 0; background: linear-gradient(180deg, rgba(255,255,255,.045), transparent); }
.rh-image-viewer-heading { min-width: 0; flex: 1; }
.rh-image-viewer-eyebrow { display: block; margin-bottom: 3px; color: #83d7b7; font-size: .58rem; font-weight: 800; letter-spacing: .14em; }
.rh-image-viewer .modal-title { max-width: 100%; overflow: hidden; font-size: .94rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rh-image-viewer-zoom { width: 36px; height: 36px; display: grid; flex: 0 0 36px; place-items: center; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; transition: background .18s ease, transform .18s ease; }
.rh-image-viewer-zoom:hover { transform: scale(1.06); background: rgba(255,255,255,.16); }
.rh-image-viewer .btn-close { margin: 0; }
.rh-image-viewer .modal-body { position: relative; min-height: 220px; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 10px 22px 26px; }
.rh-image-viewer-image { position: relative; z-index: 1; display: block; max-width: 100%; max-height: calc(100dvh - 132px); border-radius: 8px; object-fit: contain; box-shadow: 0 18px 48px rgba(0,0,0,.3); cursor: zoom-in; transition: transform .22s ease, opacity .18s ease; }
.rh-image-viewer.is-loading .rh-image-viewer-image { opacity: 0; }
.rh-image-viewer-loading { position: absolute; display: none; align-items: center; gap: 10px; color: #b9cbc5; font-size: .82rem; }
.rh-image-viewer.is-loading .rh-image-viewer-loading { display: flex; }
.rh-image-viewer-error { margin: 0; color: #ffc2c2; font-size: .9rem; }
.rh-image-viewer.has-error .rh-image-viewer-error { display: block; }
.rh-image-viewer.has-error .rh-image-viewer-image { display: none; }
.rh-image-viewer.is-zoomed .modal-body { cursor: zoom-out; }
.rh-image-viewer.is-zoomed .rh-image-viewer-image { max-width: none; max-height: none; cursor: zoom-out; transform: scale(1.7); transform-origin: center; }
@media (max-width: 575.98px) {
  .rh-image-viewer .modal-dialog { width: 100%; height: 100%; min-height: 100%; max-width: none; margin: 0; align-items: stretch; }
  .rh-image-viewer .modal-content { height: 100dvh; min-height: 0; max-height: 100dvh; justify-content: flex-start; border: 0; border-radius: 0; }
  .rh-image-viewer .modal-header { min-height: 64px; padding: .7rem .85rem; }
  .rh-image-viewer .modal-body { min-height: 0; flex: 1; padding: 8px 10px 18px; }
  .rh-image-viewer-image { max-height: calc(100dvh - 88px); }
}

@media (max-width: 991.98px) {
  .rh-floating-messenger { right: 14px; bottom: calc(var(--rh-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 12px); }
  .rh-fm-panel { bottom: 68px; height: min(540px, calc(100dvh - var(--rh-bottomnav-h) - env(safe-area-inset-bottom, 0px) - 105px)); }
}

@media (max-width: 420px) {
  .rh-floating-messenger { right: 12px; }
  .rh-fm-panel { width: calc(100vw - 24px); max-height: calc(100dvh - var(--rh-bottomnav-h) - env(safe-area-inset-bottom, 0px) - 95px); }
}

@media (prefers-reduced-motion: reduce) {
  .rh-fm-panel { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── 20. Status Badges & Tags ───────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--rh-radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.status-pending     { background: var(--rh-amber-soft); color: var(--rh-amber-dark); }
.status-viewed      { background: var(--rh-info-soft); color: var(--rh-info-dark); }
.status-accepted    { background: #E0E7FF; color: #4338CA; }
.status-on_the_way  { background: var(--rh-primary-soft); color: var(--rh-primary-dark); }
.status-in_progress { background: var(--rh-primary-soft); color: var(--rh-primary-dark); }
.status-completed   { background: var(--rh-success-soft); color: var(--rh-success-dark); }
.status-cancelled   { background: #F1F5F9; color: var(--rh-text-muted); }
.status-disputed    { background: var(--rh-danger-soft); color: var(--rh-danger-dark); }

.badge-tag, .tag-pill {
  background: var(--rh-primary-subtle);
  color: var(--rh-primary);
  border: 1px solid var(--rh-primary-soft);
  border-radius: var(--rh-radius-pill);
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── 21. Notification Items ─────────────────────────────────── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rh-border-light);
  transition: background 0.15s ease;
}

.notif-item:hover {
  background: var(--rh-primary-subtle);
}

.notif-item.unread {
  background: #F5F3FF;
  border-left: 3.5px solid var(--rh-primary);
}

.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--rh-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.15rem;
}

.notif-text {
  font-size: 0.8rem;
  color: var(--rh-text-muted);
  line-height: 1.4;
}

.notif-time {
  font-size: 0.7rem;
  color: var(--rh-text-light);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 22. Conversation Items (Messages Sidebar) ──────────────── */
.conv-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--rh-border-light);
  cursor: pointer;
  transition: all 0.15s ease;
}

.conv-item:hover {
  background: #ffffff;
}

.conv-item.active {
  background: #ffffff;
  border-left: 3px solid var(--rh-primary);
}

.conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--rh-radius-md);
  object-fit: cover;
}

.conv-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--rh-text-heading);
}

.conv-time {
  font-size: 0.7rem;
  color: var(--rh-text-light);
}

.conv-preview {
  font-size: 0.78rem;
  color: var(--rh-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

/* ── 23. Star Rating Widget ─────────────────────────────────── */
.star-rating {
  color: #F59E0B;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.star-rating .count {
  color: var(--rh-text-muted);
  font-size: 0.75rem;
  margin-left: 4px;
  font-weight: 600;
}

/* ── 24. Full Chat System ───────────────────────────────────── */
.chat-layout {
  display: flex;
  height: calc(100vh - var(--rh-nav-h));
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.chat-sidebar {
  width: 330px;
  border-right: 1px solid var(--rh-border);
  display: flex;
  flex-direction: column;
  background: #FAFAFB;
  flex-shrink: 0;
  height: 100%;
}

.chat-sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rh-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

#convList {
  overflow-y: auto;
  flex: 1;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #F8FAFC;
  min-width: 0;
  position: relative;
}

.chat-header {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--rh-border);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 10;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chat-bubble {
  max-width: 72%;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
  position: relative;
  animation: messagePop 0.2s ease-out;
}

@keyframes messagePop {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-bubble.me {
  align-self: flex-end;
  background: var(--rh-primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.chat-bubble.them {
  align-self: flex-start;
  background: #ffffff;
  color: var(--rh-text-heading);
  border: 1px solid var(--rh-border-light);
  border-bottom-left-radius: 4px;
  box-shadow: var(--rh-shadow-xs);
}

.chat-bubble-time {
  font-size: 0.68rem;
  opacity: 0.75;
  margin-top: 4px;
}

.chat-bubble.me .chat-bubble-time {
  text-align: right;
  color: rgba(255, 255, 255, 0.85);
}

.chat-bubble.them .chat-bubble-time {
  text-align: left;
  color: var(--rh-text-light);
}

.chat-input-bar {
  background: #ffffff;
  border-top: 1px solid var(--rh-border);
  padding: 0.75rem 1.25rem;
  position: relative;
  z-index: 10;
}

.chat-attachment-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--rh-primary-subtle);
  border-radius: var(--rh-radius-md);
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

@media (max-width: 767.98px) {
  .chat-layout {
    height: calc(100vh - var(--rh-nav-h) - var(--rh-bottomnav-h));
  }
  .chat-sidebar {
    width: 100%;
  }
  .chat-bubble {
    max-width: 85%;
  }
}


