/* ===== SERVICE MARKETPLACE - DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Primary Palette */
  --green-50: #ecfdf5; --green-100: #d1fae5; --green-200: #a7f3d0;
  --green-400: #34d399; --green-500: #10b981; --green-600: #059669; --green-700: #047857; --green-800: #065f46;
  --orange-50: #fff7ed; --orange-100: #ffedd5; --orange-200: #fed7aa;
  --orange-400: #fb923c; --orange-500: #f97316; --orange-600: #ea580c; --orange-700: #c2410c;
  --blue-50: #eff6ff; --blue-100: #dbeafe; --blue-200: #bfdbfe;
  --blue-400: #60a5fa; --blue-500: #3b82f6; --blue-600: #2563eb; --blue-700: #1d4ed8;
  --red-50: #fef2f2; --red-100: #fee2e2; --red-200: #fecaca;
  --red-400: #f87171; --red-500: #ef4444; --red-600: #dc2626; --red-700: #b91c1c;
  /* Neutrals */
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db;
  --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151;
  --gray-800: #1f2937; --gray-900: #111827; --gray-950: #030712;
  /* Semantic */
  --primary: var(--green-600); --primary-hover: var(--green-700); --primary-light: var(--green-50);
  --accent: var(--orange-500); --accent-hover: var(--orange-600); --accent-light: var(--orange-50);
  --info: var(--blue-500); --info-hover: var(--blue-600); --info-light: var(--blue-50);
  --danger: var(--red-500); --danger-hover: var(--red-600); --danger-light: var(--red-50);
  /* Layout */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 24px; --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
  --transition: all .2s cubic-bezier(.4,0,.2,1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }
@media (min-width: 768px) { html { font-size: 16px; } }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-800); background: var(--gray-50);
  margin: 0; padding: 0; min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main.site-main { flex: 1; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

/* ===== NAVBAR ===== */
.site-navbar {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  border-bottom: 3px solid var(--green-500);
  padding: .6rem 0; position: sticky; top: 0; z-index: 1030;
  box-shadow: var(--shadow-lg);
}
.site-navbar .navbar-brand {
  font-weight: 800; font-size: 1.35rem; color: #fff !important;
  letter-spacing: -.5px; display: flex; align-items: center; gap: .5rem;
}
.site-navbar .navbar-brand .brand-icon {
  width: 32px; height: 32px; background: linear-gradient(135deg, var(--green-500), var(--green-400));
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: #fff;
}
.site-navbar .nav-link {
  color: rgba(255,255,255,.75) !important; font-weight: 500; font-size: .9rem;
  padding: .5rem .85rem !important; border-radius: var(--radius-sm); transition: var(--transition);
}
.site-navbar .nav-link:hover, .site-navbar .nav-link.active {
  color: #fff !important; background: rgba(255,255,255,.1);
}
.site-navbar .navbar-toggler { border-color: rgba(255,255,255,.2); }
.site-navbar .navbar-toggler-icon { filter: invert(1); }
.nav-btn { padding: .45rem 1.1rem !important; border-radius: var(--radius-full) !important; font-weight: 600 !important; font-size: .85rem !important; }
.nav-btn-outline { border: 1.5px solid rgba(255,255,255,.3) !important; color: #fff !important; }
.nav-btn-outline:hover { background: rgba(255,255,255,.1) !important; border-color: rgba(255,255,255,.6) !important; }
.nav-btn-primary { background: var(--green-500) !important; color: #fff !important; border: none !important; }
.nav-btn-primary:hover { background: var(--green-600) !important; }
.nav-user-badge { color: var(--green-400) !important; font-weight: 600; font-size: .85rem; }

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, var(--gray-900) 0%, #0c2a1a 50%, var(--gray-950) 100%);
  padding: 5rem 0 4rem; position: relative; overflow: hidden;
}
.hero-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(16,185,129,.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(59,130,246,.1) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(249,115,22,.08) 0%, transparent 50%);
}
.hero-section * { position: relative; z-index: 1; }
.hero-title { font-size: 3rem; font-weight: 900; color: #fff; line-height: 1.1; letter-spacing: -1px; }
.hero-title .text-gradient {
  background: linear-gradient(135deg, var(--green-400), var(--orange-400));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 1.15rem; color: rgba(255,255,255,.65); max-width: 540px; line-height: 1.7; }

/* Hero search bar */
.hero-search { background: rgba(255,255,255,.08); backdrop-filter: blur(12px); border-radius: var(--radius-lg); padding: .5rem; border: 1px solid rgba(255,255,255,.1); max-width: 680px; }
.hero-search .form-control { background: rgba(255,255,255,.1); border: none; color: #fff; padding: .75rem 1rem; border-radius: var(--radius-md); font-size: .95rem; }
.hero-search .form-control::placeholder { color: rgba(255,255,255,.4); }
.hero-search .form-control:focus { background: rgba(255,255,255,.15); box-shadow: none; color: #fff; }
.hero-search .btn-search { background: var(--green-500); color: #fff; border: none; padding: .75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; }
.hero-search .btn-search:hover { background: var(--green-600); }

/* Hero stats */
.hero-stats { display: flex; gap: 2.5rem; margin-top: 2rem; }
.hero-stat-number { font-size: 1.5rem; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 1px; }

/* ===== SECTION ===== */
.section { padding: 4rem 0; }
.section-title { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); letter-spacing: -.5px; }
.section-subtitle { color: var(--gray-500); font-size: 1rem; max-width: 520px; }
.section-badge {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem;
  background: var(--primary-light); color: var(--primary); border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: .5rem;
}

/* ===== CARDS ===== */
.card-modern {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: var(--transition); overflow: hidden;
}
.card-modern:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--gray-300); }

/* Service Card */
.service-card { display: flex; flex-direction: column; height: 100%; }
.service-card .card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.service-card .service-category {
  display: inline-flex; padding: .2rem .6rem; border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; width: fit-content;
}
.service-card .service-title { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin: .5rem 0 .4rem; }
.service-card .service-desc { font-size: .85rem; color: var(--gray-500); line-height: 1.6; flex: 1; }
.service-card .service-meta { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--gray-400); margin-top: .5rem; }
.service-card .service-price { font-size: 1.2rem; font-weight: 800; color: var(--green-600); }
.service-card .service-footer {
  padding: .85rem 1.25rem; border-top: 1px solid var(--gray-100);
  display: flex; justify-content: space-between; align-items: center; background: var(--gray-50);
}

/* Category Colors */
.cat-green { background: var(--green-100); color: var(--green-700); }
.cat-orange { background: var(--orange-100); color: var(--orange-700); }
.cat-blue { background: var(--blue-100); color: var(--blue-700); }
.cat-red { background: var(--red-100); color: var(--red-700); }

/* Request Card */
.request-card { padding: 1.25rem; border-left: 4px solid var(--orange-500); }
.request-card:hover { border-left-color: var(--orange-600); }

/* ===== CATEGORY CARD ===== */
.category-card {
  padding: 1.5rem; text-align: center; cursor: pointer;
  border: 2px solid transparent;
}
.category-card:hover { border-color: var(--green-500); }
.category-card .cat-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin: 0 auto .75rem;
}
.category-card .cat-name { font-weight: 700; font-size: .9rem; color: var(--gray-800); }
.category-card .cat-count { font-size: .8rem; color: var(--gray-400); }

/* ===== BUTTONS ===== */
.btn { font-family: 'Inter', sans-serif; font-weight: 600; border-radius: var(--radius-md); padding: .55rem 1.2rem; font-size: .9rem; transition: var(--transition); border: none; }
.btn:focus { box-shadow: none; }
.btn-green { background: var(--green-500); color: #fff; }
.btn-green:hover { background: var(--green-600); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.btn-orange { background: var(--orange-500); color: #fff; }
.btn-orange:hover { background: var(--orange-600); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249,115,22,.3); }
.btn-blue { background: var(--blue-500); color: #fff; }
.btn-blue:hover { background: var(--blue-600); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,.3); }
.btn-red { background: var(--red-500); color: #fff; }
.btn-red:hover { background: var(--red-600); color: #fff; }
.btn-outline-green { border: 1.5px solid var(--green-500); color: var(--green-600); background: transparent; }
.btn-outline-green:hover { background: var(--green-500); color: #fff; }
.btn-outline-orange { border: 1.5px solid var(--orange-500); color: var(--orange-600); background: transparent; }
.btn-outline-orange:hover { background: var(--orange-500); color: #fff; }
.btn-outline-blue { border: 1.5px solid var(--blue-500); color: var(--blue-600); background: transparent; }
.btn-outline-blue:hover { background: var(--blue-500); color: #fff; }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.8rem; font-size: 1rem; }

/* ===== FORMS ===== */
.form-modern .form-label { font-weight: 600; font-size: .85rem; color: var(--gray-700); margin-bottom: .3rem; }
.form-modern .form-control, .form-modern .form-select {
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); padding: .65rem .9rem;
  font-size: .9rem; transition: var(--transition); background: #fff;
}
.form-modern .form-control:focus, .form-modern .form-select:focus {
  border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(16,185,129,.1);
}

/* ===== AUTH PAGES ===== */
.auth-page { min-height: calc(100vh - 70px); display: flex; align-items: center; padding: 2rem 0; }
.auth-card {
  background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
  overflow: hidden; max-width: 480px; width: 100%; margin: 0 auto;
}
.auth-header {
  background: linear-gradient(135deg, var(--gray-900), #0c2a1a);
  padding: 2rem; text-align: center;
}
.auth-header h2 { color: #fff; font-weight: 800; font-size: 1.4rem; margin-bottom: .3rem; }
.auth-header p { color: rgba(255,255,255,.6); font-size: .85rem; margin: 0; }
.auth-body { padding: 2rem; }
.auth-footer { text-align: center; padding: 0 2rem 1.5rem; font-size: .85rem; color: var(--gray-500); }

/* ===== FILTER SIDEBAR ===== */
.filter-sidebar { position: sticky; top: 90px; }
.filter-card { border-radius: var(--radius-lg); overflow: hidden; }
.filter-card .filter-header {
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
  padding: 1rem 1.25rem; color: #fff; font-weight: 700; font-size: .95rem;
}

/* ===== CHAT ===== */
.chat-container { height: calc(100vh - 140px); display: flex; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xl); background: #fff; border: 1px solid var(--gray-200); }
.chat-sidebar { width: 320px; border-right: 1px solid var(--gray-200); display: flex; flex-direction: column; background: var(--gray-50); }
.chat-sidebar-header { padding: 1.25rem; border-bottom: 1px solid var(--gray-200); background: #fff; }
.chat-sidebar-header h5 { font-weight: 700; font-size: 1rem; margin: 0; }
.chat-contact { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.25rem; cursor: pointer; transition: var(--transition); border-bottom: 1px solid var(--gray-100); }
.chat-contact:hover, .chat-contact.active { background: var(--green-50); }
.chat-contact .contact-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--green-400), var(--blue-400)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.chat-contact .contact-name { font-weight: 600; font-size: .9rem; color: var(--gray-800); }
.chat-contact .contact-preview { font-size: .8rem; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-200); background: #fff; display: flex; align-items: center; gap: .75rem; }
.chat-messages { flex: 1; padding: 1.5rem; overflow-y: auto; background: var(--gray-50); }
.chat-bubble { max-width: 70%; padding: .65rem 1rem; border-radius: var(--radius-lg); margin-bottom: .75rem; font-size: .9rem; line-height: 1.5; }
.chat-bubble.sent { background: var(--green-500); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble.received { background: #fff; color: var(--gray-800); border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; }
.chat-bubble .bubble-time { font-size: .7rem; margin-top: .25rem; display: block; }
.chat-bubble.sent .bubble-time { color: rgba(255,255,255,.6); text-align: right; }
.chat-bubble.received .bubble-time { color: var(--gray-400); }
.chat-input-area { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); background: #fff; display: flex; gap: .5rem; }
.chat-input-area .form-control { border-radius: var(--radius-full); border: 1.5px solid var(--gray-200); padding: .6rem 1.2rem; }
.chat-input-area .btn { border-radius: var(--radius-full); padding: .6rem 1.2rem; }

/* ===== DETAILS PAGE ===== */
.detail-header { background: linear-gradient(135deg, var(--gray-900) 0%, #0c2a1a 100%); padding: 3rem 0; }
.detail-title { font-size: 2rem; font-weight: 800; color: #fff; }
.provider-card { border: 2px solid var(--green-200); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--gray-900); color: rgba(255,255,255,.6); padding: 3rem 0 1.5rem;
}
.site-footer h6 { color: #fff; font-weight: 700; font-size: .9rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .5px; }
.site-footer a { color: rgba(255,255,255,.5); font-size: .85rem; }
.site-footer a:hover { color: var(--green-400); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; margin-top: 2rem; font-size: .8rem; }
.footer-brand { font-weight: 800; font-size: 1.2rem; color: #fff; }

/* ===== BADGES ===== */
.badge-green { background: var(--green-100); color: var(--green-700); font-weight: 600; padding: .3rem .7rem; border-radius: var(--radius-full); font-size: .75rem; }
.badge-orange { background: var(--orange-100); color: var(--orange-700); font-weight: 600; padding: .3rem .7rem; border-radius: var(--radius-full); font-size: .75rem; }
.badge-blue { background: var(--blue-100); color: var(--blue-700); font-weight: 600; padding: .3rem .7rem; border-radius: var(--radius-full); font-size: .75rem; }
.badge-red { background: var(--red-100); color: var(--red-700); font-weight: 600; padding: .3rem .7rem; border-radius: var(--radius-full); font-size: .75rem; }

/* ===== PAGE HEADER ===== */
.page-header { background: linear-gradient(135deg, var(--gray-900), #0c2a1a); padding: 2.5rem 0; margin-bottom: 2rem; }
.page-header h1 { color: #fff; font-weight: 800; font-size: 1.75rem; margin: 0; }
.page-header p { color: rgba(255,255,255,.6); margin: .3rem 0 0; font-size: .95rem; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h4 { font-weight: 700; color: var(--gray-700); }
.empty-state p { color: var(--gray-400); max-width: 360px; margin: 0 auto; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .hero-stats { gap: 1.5rem; }
  .chat-container { flex-direction: column; height: auto; }
  .chat-sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--gray-200); max-height: 250px; overflow-y: auto; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeInUp .5s ease-out forwards; }
.delay-1 { animation-delay: .1s; opacity: 0; }
.delay-2 { animation-delay: .2s; opacity: 0; }
.delay-3 { animation-delay: .3s; opacity: 0; }