/**
 * MaxulaHouse Laravel v1.0
 * AbodyStudio Limited - https://abodystudio.com
 * Support@abodystudio.com | WhatsApp +212663033383
 * Main Application Stylesheet
 */

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

/* ── CSS Design System Variables ─────────────────────────────────────────────── */
:root {
  --primary:        #1B4FD8;
  --primary-dark:   #1438A8;
  --primary-light:  #EFF3FF;
  --primary-mid:    #3B6EF0;
  --orange:         #F59E0B;
  --orange-dark:    #D97706;
  --orange-light:   #FEF3C7;
  --green:          #10B981;
  --green-light:    #D1FAE5;
  --red:            #EF4444;
  --red-light:      #FEE2E2;
  --purple:         #8B5CF6;
  --gray-50:        #F8FAFC;
  --gray-100:       #F1F5F9;
  --gray-200:       #E2E8F0;
  --gray-300:       #CBD5E1;
  --gray-400:       #94A3B8;
  --gray-500:       #64748B;
  --gray-600:       #475569;
  --gray-700:       #334155;
  --gray-800:       #1E293B;
  --gray-900:       #0F172A;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
  --shadow:         0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.14);
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;
  --transition:     0.2s ease;
  --font:           'Inter', sans-serif;
  --font-ar:        'Cairo', sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[lang="ar"], .rtl, .arabic {
  font-family: var(--font-ar);
  direction: rtl;
  text-align: right;
}

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

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

ul, ol { list-style: none; }

input, textarea, select, button { font-family: inherit; }

/* ── Typography ───────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { color: var(--gray-600); line-height: 1.7; }

/* ── Layout ───────────────────────────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.container-lg { max-width: 1440px; margin: 0 auto; padding: 0 24px; }

.section { padding: 72px 0; }
.section-sm { padding: 40px 0; }
.section-lg { padding: 96px 0; }

.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--gray-500);
  font-size: 1.0625rem;
  margin-bottom: 40px;
}

/* ── Flex / Grid Helpers ──────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* ── Navbar ───────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 24px;
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.navbar-logo span { color: var(--orange); }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  margin-left: 24px;
}

.navbar-nav a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all var(--transition);
}

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

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.navbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 1rem;
  position: relative;
}

.navbar-icon-btn:hover { background: var(--gray-200); color: var(--gray-900); }

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid #fff;
}

.lang-select {
  background: var(--gray-100);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
}

/* Avatar dropdown */
.avatar-menu { position: relative; }

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-light);
  cursor: pointer;
  background: var(--gray-200);
}

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

.avatar-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 200px;
  padding: 8px 0;
  z-index: 200;
}

.avatar-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: background var(--transition);
}

.avatar-dropdown a:hover { background: var(--gray-50); color: var(--gray-900); }
.avatar-dropdown .divider { height: 1px; background: var(--gray-200); margin: 4px 0; }
.avatar-dropdown .logout { color: var(--red); }
.avatar-dropdown .logout:hover { background: var(--red-light); }

/* Mobile nav */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--gray-700);
  font-size: 1.5rem;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 12px 0;
  border-top: 1px solid var(--gray-200);
  background: #fff;
}

.mobile-nav a {
  padding: 12px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

/* ── Buttons ──────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border-color: var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-200); color: var(--gray-900); }

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

.btn-orange {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.btn-orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }

.btn-green {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-green:hover { background: #0da572; border-color: #0da572; color: #fff; }

.btn-red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-red:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }

.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 32px; font-size: 1.0625rem; }
.btn-xl { padding: 18px 40px; font-size: 1.125rem; border-radius: var(--radius); }
.btn-block { display: flex; width: 100%; }

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Cards ────────────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title { font-size: 1.0625rem; font-weight: 700; color: var(--gray-900); }

.card-body { padding: 24px; }

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ── Property Cards ───────────────────────────────────────────────────────────── */
.prop-card {
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.prop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.prop-card-img {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: var(--gray-100);
}

.prop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.prop-card:hover .prop-card-img img { transform: scale(1.05); }

.prop-card-img .badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.prop-card-img .fav {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gray-500);
  transition: all var(--transition);
}

.prop-card-img .fav:hover { color: var(--red); background: #fff; }
.prop-card-img .fav.active { color: var(--red); }

.prop-card-body { padding: 16px; }

.prop-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.prop-price span { font-size: 0.875rem; font-weight: 500; color: var(--gray-500); }

.prop-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prop-location {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.prop-specs {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 12px;
}

.prop-spec {
  font-size: 0.8125rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 4px;
}

.prop-agent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.prop-agent img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray-200);
}

.prop-agent-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-800);
}

.prop-agent-type {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* Transaction type tags on card */
.prop-transaction {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.prop-transaction.vente { background: var(--primary); color: #fff; }
.prop-transaction.location { background: var(--orange); color: #fff; }

/* ── Badges ───────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary   { background: var(--primary-light); color: var(--primary); }
.badge-orange    { background: var(--orange-light); color: var(--orange-dark); }
.badge-green     { background: var(--green-light); color: var(--green); }
.badge-red       { background: var(--red-light); color: var(--red); }
.badge-gray      { background: var(--gray-100); color: var(--gray-600); }
.badge-featured  { background: var(--orange); color: #fff; }
.badge-verified  { background: var(--green-light); color: var(--green); }
.badge-new       { background: var(--primary); color: #fff; }
.badge-boosted   { background: var(--purple); color: #fff; }

/* ── Stat Cards ───────────────────────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon-primary { background: var(--primary-light); color: var(--primary); }
.stat-icon-orange  { background: var(--orange-light); color: var(--orange-dark); }
.stat-icon-green   { background: var(--green-light); color: var(--green); }
.stat-icon-red     { background: var(--red-light); color: var(--red); }
.stat-icon-purple  { background: #F3F0FF; color: var(--purple); }

.stat-info {}
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.875rem; color: var(--gray-500); font-weight: 500; }
.stat-trend { font-size: 0.75rem; margin-top: 4px; font-weight: 600; }
.stat-trend.up   { color: var(--green); }
.stat-trend.down { color: var(--red); }

/* ── Forms ────────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-label .required { color: var(--red); margin-left: 3px; }

.input, .form-control, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--gray-800);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.input:focus, .form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,79,216,.12);
}

.input::placeholder { color: var(--gray-400); }

.input.error, .form-control.error { border-color: var(--red); }

.form-error { font-size: 0.8125rem; color: var(--red); margin-top: 4px; }
.form-hint  { font-size: 0.8125rem; color: var(--gray-500); margin-top: 4px; }

textarea.input { resize: vertical; min-height: 100px; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
}

.input-group { display: flex; gap: 0; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn   { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; flex-shrink: 0; }

.input-with-icon { position: relative; }
.input-with-icon .input { padding-left: 42px; }
.input-with-icon .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1rem;
}

/* Checkbox / Radio */
.checkbox-label, .radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--gray-700);
  font-weight: 500;
}

.checkbox-label input[type="checkbox"],
.radio-label    input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Tags ─────────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.tag.active, .tag.selected {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.tag-close {
  cursor: pointer;
  color: var(--gray-400);
  font-size: 1rem;
  line-height: 1;
}
.tag-close:hover { color: var(--red); }

/* ── Avatar ───────────────────────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray-200);
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 88px; height: 88px; }
.avatar-2xl{ width: 120px; height: 120px; }

.avatar-placeholder {
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

/* ── Plan Cards ───────────────────────────────────────────────────────────────── */
.plan-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

.plan-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,79,216,.12);
}

.plan-card.featured::before {
  content: "Recommandé";
  position: absolute;
  top: 16px;
  right: -24px;
  background: var(--orange);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 32px;
  transform: rotate(45deg) translateY(-8px);
}

.plan-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.plan-desc {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.plan-price {
  margin-bottom: 24px;
}

.plan-price .amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.plan-price .period {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-left: 4px;
}

.plan-price .yearly-note {
  font-size: 0.8125rem;
  color: var(--green);
  margin-top: 4px;
}

.plan-features {
  list-style: none;
  flex: 1;
  margin-bottom: 28px;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.9rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.plan-features li:last-child { border: none; }

.plan-features .check { color: var(--green); font-size: 1rem; flex-shrink: 0; }
.plan-features .cross { color: var(--gray-400); font-size: 1rem; flex-shrink: 0; }

/* ── Hero Section ─────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #0f2e7a 100%);
  color: #fff;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.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.03'%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");
  opacity: 0.4;
}

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

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.15;
}

.hero-title span { color: var(--orange); }

.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 40px;
  max-width: 560px;
}

/* Search Box */
.search-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  max-width: 760px;
}

.search-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.search-tab {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.search-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.search-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

@media (max-width: 640px) {
  .search-fields { grid-template-columns: 1fr; }
}

/* ── Stats Bar ────────────────────────────────────────────────────────────────── */
.stats-bar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 24px 0;
}

.stats-bar-inner {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stats-bar-item {
  text-align: center;
}

.stats-bar-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stats-bar-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ── City Cards ───────────────────────────────────────────────────────────────── */
.city-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  height: 180px;
  transition: transform var(--transition);
}

.city-card:hover { transform: scale(1.02); }

.city-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.city-card:hover img { transform: scale(1.08); }

.city-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.city-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

.city-card-count {
  font-size: 0.8125rem;
  color: rgba(255,255,255,.8);
}

/* ── Agent Cards ──────────────────────────────────────────────────────────────── */
.agent-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 24px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.agent-card .agent-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
  border: 3px solid var(--primary-light);
}

.agent-card .agent-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.agent-card .agent-city {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.agent-card .agent-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 12px 0 16px;
}

.agent-card .agent-stat-val { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); }
.agent-card .agent-stat-lbl { font-size: 0.75rem; color: var(--gray-500); }

/* Rating stars */
.stars { color: var(--orange); font-size: 0.875rem; letter-spacing: 1px; }

/* ── Footer ───────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.7);
  padding: 64px 0 32px;
}

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

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.footer-logo span { color: var(--orange); }

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social { display: flex; gap: 10px; }

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background var(--transition);
}

.footer-social a:hover { background: var(--primary); }

.footer-col-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: #fff; }

/* ── WhatsApp Float ───────────────────────────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

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

/* ── Alerts ───────────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: var(--green-light); color: #065f46; border-left: 4px solid var(--green); }
.alert-error   { background: var(--red-light); color: #991b1b; border-left: 4px solid var(--red); }
.alert-warning { background: var(--orange-light); color: #92400e; border-left: 4px solid var(--orange); }
.alert-info    { background: var(--primary-light); color: var(--primary-dark); border-left: 4px solid var(--primary); }

/* ── Pagination ───────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
}

.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  background: #fff;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Breadcrumb ───────────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--gray-400); }
.breadcrumb .current { color: var(--gray-800); font-weight: 500; }

/* ── Map container ────────────────────────────────────────────────────────────── */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

/* ── Loading spinner ──────────────────────────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

.spinner-sm { width: 20px; height: 20px; border-width: 2px; }

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  flex-direction: column;
  gap: 16px;
  color: var(--gray-500);
}

/* ── Empty State ──────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 1.125rem; font-weight: 700; color: var(--gray-700); margin-bottom: 8px; }
.empty-state-desc  { font-size: 0.9rem; max-width: 340px; margin: 0 auto 24px; }

/* ── Toast Notification ───────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: var(--gray-900);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.3s ease;
}

.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.warning { background: var(--orange-dark); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Modal ────────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 1.125rem; font-weight: 700; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
}

.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .hamburger  { display: block; }
  .mobile-nav { display: flex; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero-title { font-size: 2rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .stats-bar-inner { gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .search-box { padding: 16px; }
  .plan-card  { padding: 24px; }
}

/* ── Utility Classes ──────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.text-primary{ color: var(--primary); }
.text-orange { color: var(--orange); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-gray   { color: var(--gray-500); }
.text-muted  { color: var(--gray-400); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.text-lg     { font-size: 1.125rem; }
.text-xl     { font-size: 1.25rem; }
.font-bold   { font-weight: 700; }
.font-semibold{ font-weight: 600; }
.font-medium { font-weight: 500; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.p-16  { padding: 16px; }
.p-24  { padding: 24px; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-full { border-radius: 9999px; }
.divider { height: 1px; background: var(--gray-200); margin: 16px 0; }
.shadow { box-shadow: var(--shadow); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.bg-white { background: #fff; }
.bg-gray { background: var(--gray-50); }


/* ===== AUTH LAYOUT ===== */
.auth-layout{display:grid;grid-template-columns:1fr 1fr;min-height:100vh;}
.auth-brand{background:linear-gradient(135deg,var(--primary) 0%,var(--primary-mid) 100%);color:#fff;display:flex;flex-direction:column;justify-content:center;padding:60px 48px;}
.auth-brand-logo{font-size:28px;font-weight:800;margin-bottom:32px;letter-spacing:-.5px;}
.auth-brand-logo span{color:var(--orange);}
.auth-brand h2{font-size:32px;font-weight:800;line-height:1.3;margin-bottom:16px;}
.auth-brand p{font-size:16px;opacity:.85;margin-bottom:40px;line-height:1.6;}
.auth-stats{display:flex;gap:32px;flex-wrap:wrap;}
.auth-stat-val{font-size:28px;font-weight:800;line-height:1.1;}
.auth-stat-lbl{font-size:12px;opacity:.7;margin-top:2px;}
.auth-form-wrap{display:flex;flex-direction:column;justify-content:center;padding:60px 48px;background:#fff;overflow-y:auto;}
.auth-form-wrap h1{font-size:28px;font-weight:800;color:var(--gray-900);margin-bottom:8px;}
.auth-form-wrap > p{font-size:15px;color:var(--gray-500);margin-bottom:32px;}
.btn-google{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:11px;border:1.5px solid var(--gray-200);border-radius:var(--radius-sm);font-size:14px;font-weight:600;color:var(--gray-700);background:#fff;cursor:pointer;transition:.2s;font-family:inherit;}
.btn-google:hover{border-color:var(--gray-300);background:var(--gray-50);}
.divider.auth-divider,.auth-form-wrap .divider{display:flex;align-items:center;gap:12px;margin:20px 0;color:var(--gray-400);font-size:13px;height:auto;background:transparent;}
.auth-form-wrap .divider::before,.auth-form-wrap .divider::after{content:'';flex:1;height:1px;background:var(--gray-200);}
.form-error{color:var(--red);font-size:13px;margin-top:4px;}
.alert{padding:12px 16px;border-radius:var(--radius-sm);font-size:14px;margin-bottom:16px;line-height:1.5;}
.alert-error{background:var(--red-light);color:#991B1B;border:1px solid #FECACA;}
.alert-success{background:var(--green-light);color:#065F46;border:1px solid #A7F3D0;}
.alert-info{background:var(--primary-light);color:var(--primary-dark);border:1px solid #BFDBFE;}

/* Auth layout responsive */
@media(max-width:900px){
  .auth-layout{grid-template-columns:1fr;}
  .auth-brand{display:none;}
  .auth-form-wrap{padding:40px 24px;}
}
@media(max-width:480px){
  .auth-form-wrap{padding:32px 20px;}
  .auth-form-wrap h1{font-size:22px;}
}

/* ===== PROFILE TABS ===== */
.profile-tabs{display:flex;gap:4px;border-bottom:2px solid var(--gray-200);margin-bottom:32px;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.profile-tabs::-webkit-scrollbar{display:none;}
.profile-tab{padding:10px 20px;font-size:14px;font-weight:600;color:var(--gray-500);border-bottom:2px solid transparent;margin-bottom:-2px;cursor:pointer;transition:.2s;white-space:nowrap;background:none;border-top:none;border-left:none;border-right:none;font-family:inherit;}
.profile-tab:hover{color:var(--gray-700);}
.profile-tab.active,button.profile-tab.active{color:var(--primary);border-bottom-color:var(--primary);}

/* ===== FORM ELEMENTS ===== */
.form-label{display:block;font-size:13px;font-weight:600;color:var(--gray-700);margin-bottom:6px;}
.form-input{width:100%;padding:10px 14px;border:1.5px solid var(--gray-200);border-radius:var(--radius-sm);font-size:14px;color:var(--gray-800);background:#fff;transition:.2s;font-family:inherit;box-sizing:border-box;}
.form-input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(27,79,216,.1);}
.form-input::placeholder{color:var(--gray-400);}
.form-input[readonly]{background:var(--gray-50);cursor:not-allowed;color:var(--gray-500);}
select.form-input{cursor:pointer;}
textarea.form-input{resize:vertical;min-height:90px;}

/* ===== BUTTONS ===== */
.btn{display:inline-flex;align-items:center;gap:8px;padding:10px 20px;border-radius:var(--radius-sm);font-size:14px;font-weight:600;cursor:pointer;transition:.2s;text-decoration:none;border:1.5px solid transparent;font-family:inherit;}
.btn-primary{background:var(--primary);color:#fff;border-color:var(--primary);}
.btn-primary:hover{background:var(--primary-dark);border-color:var(--primary-dark);}
.btn-primary:disabled{opacity:.6;cursor:not-allowed;}
.btn-outline{background:#fff;color:var(--primary);border-color:var(--primary);}
.btn-outline:hover{background:var(--primary-light);}

/* ===== UTILITY ===== */
[x-cloak]{display:none!important;}
