/* ========================================
   PRONTO — Design System
   ======================================== */

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

:root {
  --primary: #16a34a;
  --primary-hover: #15803d;
  --primary-light: #dcfce7;
  --primary-50: #f0fdf4;
  --accent: #0ea5e9;
  --accent-light: #e0f2fe;
  --warning: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;

  --text-900: #0f172a;
  --text-700: #334155;
  --text-500: #64748b;
  --text-400: #94a3b8;
  --text-200: #e2e8f0;

  --bg: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.08), 0 10px 10px -5px rgba(0,0,0,.03);

  --nav-h: 68px;
  --font: 'Inter', -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; }

/* ========================================
   LAYOUT UTILITIES
   ======================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

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

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow .2s;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
}
.navbar-logo svg { width: 32px; height: 32px; }

.navbar-search {
  flex: 1;
  max-width: 400px;
}
.navbar-search-input {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 16px 0 40px;
  font-size: .875rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-900);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}
.navbar-search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }

.navbar-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-500);
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text-900); background: var(--bg); }
.nav-link.active { color: var(--primary); }

.navbar-user { display: flex; align-items: center; gap: 10px; }
.navbar-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary-light);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  border: none;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,.35); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover:not(:disabled) { background: var(--primary-50); }

.btn-ghost {
  background: transparent;
  color: var(--text-700);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg); border-color: var(--border-hover); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-xl { padding: 16px 36px; font-size: 1.05rem; border-radius: var(--radius); }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ========================================
   FORMS
   ======================================== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .875rem; font-weight: 500; color: var(--text-700); }
.form-label span { color: var(--danger); margin-left: 2px; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  color: var(--text-900);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-400); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: .8rem; color: var(--text-400); }
.form-error { font-size: .8rem; color: var(--danger); }

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 20px; }
.card-footer { padding: 16px 20px; border-top: 1px solid var(--border); background: var(--bg); }

/* ========================================
   PROVIDER CARD
   ======================================== */
.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
}
.provider-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--border-hover); }

.provider-card-header { padding: 20px 20px 16px; }
.provider-card-identity { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.provider-avatar {
  width: 54px; height: 54px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary-light);
  flex-shrink: 0;
}
.provider-name { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.provider-city { font-size: .8rem; color: var(--text-500); display: flex; align-items: center; gap: 4px; }
.provider-bio { font-size: .85rem; color: var(--text-500); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.provider-card-meta { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg); }
.provider-cats { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.cat-chip { font-size: .75rem; padding: 3px 10px; border-radius: var(--radius-full); background: var(--primary-50); color: var(--primary); font-weight: 500; border: 1px solid var(--primary-light); }

.provider-distance { font-size: .8rem; color: var(--text-400); display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* ========================================
   STAR RATING
   ======================================== */
.stars { display: flex; align-items: center; gap: 2px; }
.star { font-size: 14px; color: var(--warning); }
.star.empty { color: var(--text-200); }
.rating-text { font-size: .8rem; color: var(--text-500); margin-left: 6px; }
.rating-score { font-size: .9rem; font-weight: 700; color: var(--text-900); margin-right: 4px; }

.stars-interactive { display: flex; gap: 4px; }
.stars-interactive .star-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  transition: transform .1s;
  color: var(--text-200);
  padding: 0 2px;
}
.stars-interactive .star-btn.active,
.stars-interactive .star-btn:hover { color: var(--warning); transform: scale(1.1); }

/* ========================================
   BADGES
   ======================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
}
.badge-green { background: var(--primary-light); color: var(--primary-hover); }
.badge-blue { background: var(--accent-light); color: #0369a1; }
.badge-gray { background: var(--bg); color: var(--text-500); border: 1px solid var(--border); }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* ========================================
   PAGE HERO
   ======================================== */
.page-hero {
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 60px;
  background: linear-gradient(160deg, var(--primary) 0%, #15803d 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero-content { position: relative; z-index: 1; text-align: center; }
.page-hero h1 { color: #fff; margin-bottom: 16px; }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.1rem; max-width: 560px; margin: 0 auto 32px; }

/* Search box in hero */
.hero-search-box {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 8px;
  display: flex;
  gap: 8px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
.hero-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  min-width: 0;
}
.hero-search-field:focus-within { border-color: var(--primary); }
.hero-search-field svg { color: var(--text-400); flex-shrink: 0; }
.hero-search-field input {
  border: none;
  outline: none;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text-900);
  width: 100%;
  background: transparent;
}
.hero-search-field input::placeholder { color: var(--text-400); }
.hero-divider { width: 1px; background: var(--border); align-self: stretch; margin: 6px 0; }

/* ========================================
   CATEGORIES GRID
   ======================================== */
.categories-section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header p { color: var(--text-500); margin-top: 8px; font-size: 1rem; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-700);
}
.category-card:hover { border-color: var(--primary); background: var(--primary-50); color: var(--primary); box-shadow: var(--shadow); }
.category-card:hover .cat-icon-wrap { background: var(--primary-light); }
.category-card .cat-icon-wrap {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background .2s;
}
.category-card .cat-name { font-size: .85rem; font-weight: 600; }

/* ========================================
   PROVIDERS GRID
   ======================================== */
.providers-section { padding: 60px 0; background: var(--bg); }
.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ========================================
   SEARCH PAGE
   ======================================== */
.search-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding-top: calc(var(--nav-h) + 24px);
  padding-bottom: 48px;
  min-height: 100vh;
}

.search-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  height: fit-content;
}
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.filter-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-400); margin-bottom: 12px; }
.filter-options { display: flex; flex-direction: column; gap: 4px; }
.filter-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
  font-size: .875rem;
  color: var(--text-700);
}
.filter-opt:hover { background: var(--bg); }
.filter-opt.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.filter-opt input[type="radio"] { display: none; }

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.results-count { font-size: .9rem; color: var(--text-500); }
.results-count strong { color: var(--text-900); }

.sort-select {
  padding: 7px 32px 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-family: inherit;
  color: var(--text-700);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  outline: none;
  cursor: pointer;
}

/* ========================================
   PROFILE PAGE
   ======================================== */
.profile-layout {
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.profile-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 24px;
}
.profile-cover {
  height: 160px;
  background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
  position: relative;
}
.profile-header-body { padding: 0 28px 28px; }
.profile-avatar-wrap {
  margin-top: -40px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.profile-avatar-lg {
  width: 80px; height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
}
.profile-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profile-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.profile-location { color: var(--text-500); font-size: .875rem; display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.profile-bio { color: var(--text-700); font-size: .95rem; line-height: 1.65; margin-top: 14px; }

.profile-stats {
  display: flex;
  gap: 0;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}
.stat {
  text-align: center;
  flex: 1;
  padding: 0 16px;
  border-right: 1px solid var(--border);
}
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: none; }
.stat-value { font-size: 1.4rem; font-weight: 800; color: var(--text-900); display: block; }
.stat-label { font-size: .75rem; color: var(--text-500); font-weight: 500; }

.services-list { display: flex; flex-direction: column; gap: 12px; }
.service-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.service-item:hover { border-color: var(--border-hover); box-shadow: var(--shadow-sm); }
.service-item-icon { font-size: 1.5rem; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--primary-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service-item-info { flex: 1; min-width: 0; }
.service-item-title { font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.service-item-desc { font-size: .82rem; color: var(--text-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.service-item-price { text-align: right; flex-shrink: 0; }
.price-amount { font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.price-unit { font-size: .75rem; color: var(--text-400); display: block; }

.service-unavailable { opacity: .5; }

/* Contact card */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

/* Rating breakdown */
.rating-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.rating-big { text-align: center; flex-shrink: 0; }
.rating-big .score { font-size: 3.5rem; font-weight: 800; line-height: 1; color: var(--text-900); }
.rating-big .stars { justify-content: center; margin: 6px 0; }
.rating-big .count { font-size: .8rem; color: var(--text-500); }

.rating-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.rating-bar-row { display: flex; align-items: center; gap: 10px; }
.rating-bar-label { font-size: .8rem; color: var(--text-500); width: 20px; flex-shrink: 0; text-align: right; }
.rating-bar-track { flex: 1; height: 6px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.rating-bar-fill { height: 100%; background: var(--warning); border-radius: var(--radius-full); transition: width .4s; }
.rating-bar-count { font-size: .75rem; color: var(--text-400); width: 24px; }

.reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-item { padding: 18px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.reviewer-info { display: flex; align-items: center; gap: 10px; }
.reviewer-avatar { width: 36px; height: 36px; border-radius: var(--radius-full); object-fit: cover; }
.reviewer-name { font-size: .875rem; font-weight: 600; }
.reviewer-date { font-size: .75rem; color: var(--text-400); }
.review-text { font-size: .875rem; color: var(--text-700); line-height: 1.6; }

/* ========================================
   DASHBOARD
   ======================================== */
.dashboard-layout {
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 60px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  min-height: 100vh;
  align-items: start;
}

.dashboard-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.dash-user { padding: 20px; border-bottom: 1px solid var(--border); text-align: center; }
.avatar-upload-wrap { position: relative; width: 72px; height: 72px; margin: 0 auto 10px; cursor: pointer; }
.avatar-upload-wrap:hover .avatar-upload-overlay { opacity: 1; }
.dash-user-avatar { width: 72px; height: 72px; border-radius: var(--radius-full); border: 3px solid var(--primary-light); object-fit: cover; display: block; transition: opacity .2s; }
.avatar-upload-overlay { position: absolute; inset: 0; border-radius: var(--radius-full); background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; color: #fff; }
.dash-user-name { font-size: .95rem; font-weight: 700; }
.dash-user-role { font-size: .78rem; color: var(--text-500); margin-top: 2px; }

.dash-nav { padding: 10px 8px; }
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-500);
  cursor: pointer;
  transition: all .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dash-nav-item:hover { background: var(--bg); color: var(--text-900); }
.dash-nav-item.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.dash-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.dash-panel { display: none; }
.dash-panel.active { display: block; }

.dash-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.dash-section-subtitle { font-size: .875rem; color: var(--text-500); margin-bottom: 24px; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-card-icon { font-size: 1.5rem; margin-bottom: 10px; }
.stat-card-value { font-size: 1.75rem; font-weight: 800; color: var(--text-900); }
.stat-card-label { font-size: .78rem; color: var(--text-500); margin-top: 2px; font-weight: 500; }

.service-manage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow .15s;
}
.service-manage-card:hover { box-shadow: var(--shadow-sm); }
.service-manage-actions { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 8px; }
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  transition: background .2s;
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ========================================
   AUTH PAGES
   ======================================== */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-visual {
  background: linear-gradient(160deg, var(--primary) 0%, #15803d 60%, #0ea5e9 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='40' cy='40' r='20'/%3E%3C/g%3E%3C/svg%3E");
}
.auth-visual-content { position: relative; z-index: 1; }
.auth-visual .logo { font-size: 1.5rem; font-weight: 800; margin-bottom: 48px; display: flex; align-items: center; gap: 10px; }
.auth-visual h2 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.02em; }
.auth-visual p { opacity: .85; font-size: 1rem; line-height: 1.65; max-width: 360px; }
.auth-features { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.auth-feature { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.auth-feature-icon { width: 36px; height: 36px; background: rgba(255,255,255,.15); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }

.auth-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background: #fff;
}
.auth-form { max-width: 420px; width: 100%; margin: 0 auto; }
.auth-form-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-form-sub { color: var(--text-500); margin-bottom: 32px; font-size: .9rem; }
.auth-form-fields { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: .8rem; color: var(--text-400); }

.auth-footer { margin-top: 24px; text-align: center; font-size: .875rem; color: var(--text-500); }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform .2s;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-size: 1.25rem; font-weight: 700; }
.modal-close { width: 32px; height: 32px; border: none; background: var(--bg); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-500); transition: background .15s; }
.modal-close:hover { background: var(--border); }
.modal-fields { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ========================================
   GEOCODE AUTOCOMPLETE
   ======================================== */
.geocode-suggestions {
  position: fixed; /* JS calcule top/left/width dynamiquement */
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 99999;
  max-height: 220px;
  overflow-y: auto;
}
.geocode-suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: .875rem;
  color: var(--text-700);
  transition: background .1s;
}
.geocode-suggestion:hover { background: var(--primary-50); }
.geocode-suggestion + .geocode-suggestion { border-top: 1px solid var(--border); }

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--text-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp .3s ease;
  max-width: 320px;
}
.toast.success { background: var(--primary); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ========================================
   MISC
   ======================================== */
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.text-muted { color: var(--text-500); }
.text-primary { color: var(--primary); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .78rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-400);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--text-700); margin-bottom: 8px; }
.empty-state p { font-size: .9rem; }

.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loading { display: flex; align-items: center; justify-content: center; min-height: 300px; }

/* ========================================
   FOOTER
   ======================================== */
/* Scroll animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-section.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  background: var(--text-900);
  color: var(--text-400);
  padding: 60px 0 32px;
  margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .logo { font-size: 1.35rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand p { font-size: .875rem; line-height: 1.65; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: .875rem; font-weight: 600; margin-bottom: 14px; }
.footer-col a { display: block; font-size: .875rem; margin-bottom: 8px; color: var(--text-400); transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }

/* ========================================
   BOOKING CARDS & TABS
   ======================================== */
.booking-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: none; background: transparent;
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: .85rem; font-weight: 500; color: var(--text-500);
  transition: all .15s;
}
.booking-tab.active { background: #fff; color: var(--text-900); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.booking-tab:hover:not(.active) { color: var(--text-700); }
.tab-msg-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #1d4ed8; color: #fff;
  border-radius: 8px; font-size: .68rem; font-weight: 700; margin-left: 5px;
}

.booking-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 12px;
}
.booking-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.booking-card-body { padding: 14px 16px; }
.booking-card-actions {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--bg);
  border-top: 1px solid var(--border);
}

/* Nav badge (notification dot) */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff;
  border-radius: 9px; font-size: .7rem; font-weight: 700;
  margin-left: auto;
}

/* ========================================
   CHAT
   ======================================== */
.chat-bubble {
  max-width: 75%; padding: 9px 14px;
  border-radius: 18px; font-size: .875rem; line-height: 1.45;
  word-break: break-word;
}
.chat-bubble-mine {
  background: var(--primary); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble-other {
  background: #fff; color: var(--text-900);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .profile-layout { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .providers-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Navbar */
  .navbar-search { display: none; }
  .navbar-nav { display: none; }
  .navbar-inner { padding: 0 16px; }

  /* Auth */
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }

  /* Hero */
  .hero-search-box { flex-direction: column; border-radius: var(--radius-lg); }
  .hero-divider { display: none; }
  .hero-search-field { border-radius: var(--radius-sm); }
  .page-hero { padding-left: 16px; padding-right: 16px; }

  /* Homepage stats */
  .homepage-stats-grid { grid-template-columns: 1fr !important; gap: 12px !important; }

  /* Categories */
  .categories-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px; }
  .category-card { padding: 16px 8px; }
  .cat-icon-wrap { font-size: 1.5rem; }
  .cat-name { font-size: .75rem; }

  /* Providers */
  .providers-grid { grid-template-columns: 1fr; }

  /* Search */
  .search-layout { grid-template-columns: 1fr; }
  .search-sidebar { position: static; }

  /* Dashboard */
  .dashboard-layout { grid-template-columns: 1fr; gap: 0; }
  .dashboard-sidebar {
    position: sticky;
    top: var(--nav-h);
    z-index: 100;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    background: #fff;
  }
  .dash-user { display: none; }
  .dash-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav-item {
    flex-shrink: 0;
    font-size: .78rem;
    padding: 7px 12px;
    border-radius: 20px;
    white-space: nowrap;
  }
  .dash-nav .dash-nav-item[style*="color:var(--danger)"] { display: none; }
  .dash-nav a[href="/"] { display: none; }
  .dash-nav hr, .dash-nav div[style*="height:1px"] { display: none; }
  .stats-row { grid-template-columns: 1fr 1fr; }

  /* Profile cover */
  .profile-cover { height: 100px; }
  .profile-header-body { padding: 0 16px 20px; }

  /* Provider cards — plus compactes sur mobile */
  .provider-card { padding: 14px; }
  .provider-avatar { width: 44px; height: 44px; }
  .provider-name { font-size: .9rem; }
  .provider-bio { font-size: .8rem; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .provider-card-header { gap: 8px; }
  .cat-chip { font-size: .72rem; padding: 2px 8px; }

  /* Booking cards */
  .booking-card-header { flex-wrap: wrap; gap: 8px; }
  .booking-card-actions { flex-wrap: wrap; }

  /* Profile page */
  .profile-layout { grid-template-columns: 1fr; }
  .contact-card { position: static; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-col { display: none; }

  /* Modal plein écran sur mobile */
  .modal-overlay { align-items: flex-end; }
  .modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .container, .container-sm { padding: 0 12px; }
  .stats-row { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .section-header h2 { font-size: 1.4rem; }
}
