/* ════════════════════════════════════════════════════════════════
   سوق الكل — Unified Platform CSS
   ════════════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --primary:      #e63946;
  --primary-dark: #c1121f;
  --primary-light:#fce4e6;
  --cars-color:   #e63946;
  --re-color:     #2563eb;
  --gen-color:    #059669;
  --dark:         #1a1a2e;
  --dark2:        #16213e;
  --text:         #222;
  --text-muted:   #777;
  --border:       #e8e8e8;
  --bg:           #f8f9fa;
  --white:        #fff;
  --shadow:       0 2px 12px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,.15);
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    16px;
  --font:         'Cairo', 'Segoe UI', sans-serif;
  --transition:   all .2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

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

/* ════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════ */
.site-header {
  background: var(--dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo-icon {
  width: 38px; height: 38px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.site-logo-text { display: flex; flex-direction: column; }
.site-logo-main { font-size: 16px; font-weight: 800; color: #fff; line-height: 1; }
.site-logo-sub  { font-size: 10px; color: #aaa; line-height: 1; margin-top: 2px; }

/* Section Tabs */
.header-sections {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,.07);
  padding: 4px;
  border-radius: 8px;
}
.header-section-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  text-decoration: none;
}
.header-section-btn:hover,
.header-section-btn.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.header-section-btn.active-cars  { background: var(--cars-color); color: #fff; }
.header-section-btn.active-re    { background: var(--re-color);   color: #fff; }
.header-section-btn.active-gen   { background: var(--gen-color);  color: #fff; }

/* Nav */
.header-nav { display: flex; align-items: center; gap: 8px; }
.btn-login {
  padding: 7px 18px;
  border-radius: 7px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.2);
  transition: var(--transition);
}
.btn-login:hover { background: rgba(255,255,255,.2); }
.btn-post-ad {
  padding: 7px 18px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.btn-post-ad:hover { background: var(--primary-dark); }

/* User Menu */
.user-menu-wrap { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: #fff;
  cursor: pointer;
  border: none;
  font-size: 13px;
}
.user-avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 13px;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
  min-width: 200px;
  display: none;
  z-index: 999;
  overflow: hidden;
  border: 1px solid var(--border);
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  font-size: 13px;
  color: var(--text);
  transition: background .15s;
}
.user-dropdown a:hover { background: var(--bg); color: var(--primary); }
.user-dropdown a i { width: 16px; color: var(--text-muted); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* Notification Badge */
.notif-badge {
  position: relative;
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
}
.notif-badge .badge {
  position: absolute;
  top: -5px; left: -5px;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* Mobile Menu */
.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.hamburger-btn span {
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  display: block;
  transition: var(--transition);
}

/* ════════════════════════════════════════════════════════════════
   SECTION BANNER (sub-header for section pages)
   ════════════════════════════════════════════════════════════════ */
.section-banner {
  padding: 16px 0;
  color: #fff;
  display: flex; align-items: center;
}
.section-banner.cars     { background: linear-gradient(135deg, #c1121f, #e63946); }
.section-banner.re       { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.section-banner.gen      { background: linear-gradient(135deg, #047857, #059669); }
.section-banner-inner    { display: flex; align-items: center; justify-content: space-between; }
.section-banner-title    { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; }
.section-banner-subtitle { font-size: 13px; opacity: .85; margin-top: 3px; }

/* ════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  padding: 72px 0 56px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(230,57,70,.3) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(230,57,70,.2);
  border: 1px solid rgba(230,57,70,.4);
  color: #ff8a8a;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(26px, 5vw, 42px); font-weight: 900; margin-bottom: 12px; }
.hero p  { font-size: 16px; opacity: .75; margin-bottom: 32px; }

/* Section Cards in Hero */
.hero-sections {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-section-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 28px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  transition: var(--transition);
  cursor: pointer;
  min-width: 140px;
}
.hero-section-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.13); }
.hero-section-card.cars:hover  { border-color: var(--cars-color); background: rgba(230,57,70,.2); }
.hero-section-card.re:hover    { border-color: var(--re-color);   background: rgba(37,99,235,.2); }
.hero-section-card.gen:hover   { border-color: var(--gen-color);  background: rgba(5,150,105,.2); }
.hero-section-card i    { font-size: 28px; }
.hero-section-card strong { font-size: 15px; font-weight: 700; }
.hero-section-card span   { font-size: 12px; opacity: .7; }

/* Search Bar */
.hero-search {
  max-width: 640px;
  margin: 0 auto;
}
.search-bar {
  display: flex;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.search-bar input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
  background: transparent;
  direction: rtl;
}
.search-bar button {
  padding: 14px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.search-bar button:hover { background: var(--primary-dark); }

/* ════════════════════════════════════════════════════════════════
   STATS BAR
   ════════════════════════════════════════════════════════════════ */
.stats-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.stats-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.stat-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-muted);
}
.stat-item strong { color: var(--text); font-size: 16px; font-weight: 700; }

/* ════════════════════════════════════════════════════════════════
   AD CARDS
   ════════════════════════════════════════════════════════════════ */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.ad-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.ad-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.ad-card-img-wrap {
  position: relative;
  padding-top: 66%;
  overflow: hidden;
  background: #f0f0f0;
}
.ad-card-img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.ad-card:hover .ad-card-img-wrap img { transform: scale(1.05); }
.ad-card-badge {
  position: absolute;
  top: 10px; right: 10px;
  display: flex; gap: 5px;
  flex-wrap: wrap;
}
.badge-featured {
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.badge-urgent {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.badge-section {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
}
.badge-section.cars { background: var(--cars-color); }
.badge-section.real_estate { background: var(--re-color); }
.badge-section.general { background: var(--gen-color); }
.fav-btn {
  position: absolute;
  bottom: 10px; left: 10px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}
.fav-btn:hover, .fav-btn.active { color: var(--primary); background: #fff; }
.ad-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ad-card-cat {
  font-size: 11px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.ad-card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-card-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  margin-top: auto;
}
.ad-card-price.negotiable { color: var(--gen-color); }
.ad-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.ad-card-meta span { display: flex; align-items: center; gap: 4px; }
/* Car-specific tags */
.car-tags {
  display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px;
}
.car-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════════════
   AD DETAIL PAGE
   ════════════════════════════════════════════════════════════════ */
.ad-detail-page { padding: 30px 0 60px; }
.ad-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}
@media(max-width: 900px) { .ad-detail-grid { grid-template-columns: 1fr; } }

/* Gallery */
.ad-gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  position: relative;
  padding-top: 60%;
}
.ad-gallery-main img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}
.ad-gallery-thumbs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.thumb {
  width: 72px; height: 54px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: .7;
  transition: var(--transition);
  border: 2px solid transparent;
}
.thumb:hover, .thumb.active { opacity: 1; border-color: var(--primary); }

/* Specs Grid */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
}
.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.spec-item .label { font-size: 11px; color: var(--text-muted); }
.spec-item .value { font-size: 14px; font-weight: 600; }

/* Contact Card */
.contact-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: sticky;
  top: 80px;
}
.contact-card-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 16px;
}
.seller-info {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 14px 0;
}
.seller-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
}
.seller-name { font-weight: 700; font-size: 15px; }
.seller-since { font-size: 12px; color: var(--text-muted); }
.btn-show-phone {
  width: 100%;
  padding: 12px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 8px;
  transition: var(--transition);
}
.btn-show-phone:hover { background: #15803d; }
.btn-send-msg {
  width: 100%;
  padding: 12px;
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition);
}
.btn-send-msg:hover { background: var(--primary-light); }

/* ════════════════════════════════════════════════════════════════
   CATEGORIES PAGE
   ════════════════════════════════════════════════════════════════ */
.categories-section { padding: 40px 0; }
.section-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.section-title span { color: var(--primary); }
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.cat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.cat-card.cars:hover   { border-color: var(--cars-color); }
.cat-card.re:hover     { border-color: var(--re-color); }
.cat-card.gen:hover    { border-color: var(--gen-color); }
.cat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin: 0 auto;
}
.cat-icon.cars { background: #fce4e6; color: var(--cars-color); }
.cat-icon.re   { background: #dbeafe; color: var(--re-color); }
.cat-icon.gen  { background: #d1fae5; color: var(--gen-color); }
.cat-name  { font-size: 13px; font-weight: 700; }
.cat-count { font-size: 11px; color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════
   SEARCH / FILTERS
   ════════════════════════════════════════════════════════════════ */
.search-page { padding: 24px 0 60px; }
.search-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
@media(max-width: 900px) { .search-layout { grid-template-columns: 1fr; } }

.filters-panel {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}
.filter-group { margin-bottom: 18px; }
.filter-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.filter-group select,
.filter-group input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--primary); }
.price-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-filter {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
}
.btn-filter:hover { background: var(--primary-dark); }
.btn-reset {
  width: 100%;
  padding: 9px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  margin-top: 6px;
}

/* Results Header */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.results-count { font-size: 14px; color: var(--text-muted); }
.results-count strong { color: var(--text); font-weight: 700; }
.sort-select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  outline: none;
}

/* ════════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════════ */
.form-page { padding: 40px 0 80px; }
.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-title { font-size: 22px; font-weight: 800; margin-bottom: 24px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-color: var(--primary); background: #fff; }
.form-row textarea { min-height: 100px; resize: vertical; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width: 600px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* Image Upload */
.img-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}
.img-upload-slot {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 11px;
  color: var(--text-muted);
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.img-upload-slot:hover { border-color: var(--primary); color: var(--primary); }
.img-upload-slot img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.img-upload-slot .remove-img {
  position: absolute;
  top: 4px; left: 4px;
  width: 20px; height: 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  z-index: 2;
  cursor: pointer;
}

/* Checkboxes */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.checkbox-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.checkbox-item input { width: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 22px; border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; transition: var(--transition); border: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-lg { padding: 13px 30px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }

/* ════════════════════════════════════════════════════════════════
   AUTH PAGES
   ════════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
}
.auth-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .logo-icon {
  width: 56px; height: 56px;
  background: var(--primary);
  border-radius: 14px;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff;
}
.auth-title { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-switch a { color: var(--primary); font-weight: 600; }

/* ════════════════════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════════════════════ */
.dashboard-page { padding: 30px 0 60px; }
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
@media(max-width: 900px) { .dashboard-layout { grid-template-columns: 1fr; } }

.sidebar {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}
.sidebar-user {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  background: var(--bg);
}
.sidebar-name   { font-weight: 700; font-size: 15px; }
.sidebar-email  { font-size: 12px; color: var(--text-muted); }
.sidebar-nav    { display: flex; flex-direction: column; gap: 3px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  transition: var(--transition);
}
.sidebar-link:hover  { background: var(--bg); color: var(--primary); }
.sidebar-link.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.sidebar-link i      { width: 16px; }

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px;
}
.stat-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 4px;
}
.stat-card .value { font-size: 22px; font-weight: 800; }
.stat-card .label { font-size: 12px; color: var(--text-muted); }

/* Data Table */
.data-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: var(--bg);
  padding: 11px 14px;
  text-align: right;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }

/* Badges / Status */
.status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
}
.status-active   { background: #d1fae5; color: #065f46; }
.status-pending  { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-sold     { background: #e0e7ff; color: #3730a3; }
.status-expired  { background: #f3f4f6; color: #4b5563; }

/* ════════════════════════════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════════════════════════════ */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: var(--dark);
  color: #fff;
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar-logo {
  padding: 10px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 10px;
  font-weight: 800;
  font-size: 16px;
  display: flex; align-items: center; gap: 8px;
}
.admin-nav-section { padding: 16px 20px 6px; font-size: 10px; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: 1px; }
.admin-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  color: #aaa;
  transition: var(--transition);
}
.admin-nav-link:hover  { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav-link.active { background: var(--primary); color: #fff; }
.admin-nav-link i      { width: 16px; }
.admin-content { background: var(--bg); padding: 28px; }
.admin-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 10px; }
.admin-title   { font-size: 22px; font-weight: 800; }

/* ════════════════════════════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════════════════════════════ */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ════════════════════════════════════════════════════════════════
   PAGINATION
   ════════════════════════════════════════════════════════════════ */
.pagination-nav { display: flex; justify-content: center; margin-top: 32px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination li a, .pagination li span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  color: var(--text);
  transition: var(--transition);
}
.pagination li.active a, .pagination li a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--dark);
  color: #aaa;
  padding: 50px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
@media(max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .footer-logo-name { color: #fff; font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; line-height: 1.7; }
.footer-section h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: #aaa; transition: var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
  flex-wrap: wrap; gap: 10px;
}
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #aaa;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: var(--transition);
}
.social-links a:hover { background: var(--primary); color: #fff; }

/* ════════════════════════════════════════════════════════════════
   CHAT / MESSAGES
   ════════════════════════════════════════════════════════════════ */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 130px);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.chat-sidebar { border-left: 1px solid var(--border); overflow-y: auto; }
.chat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--border);
}
.chat-item:hover, .chat-item.active { background: var(--bg); }
.chat-item-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--border); }
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-name { font-size: 13px; font-weight: 700; }
.chat-item-preview { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg-bubble { max-width: 70%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.msg-sent     { background: var(--primary); color: #fff; align-self: flex-start; border-radius: 12px 12px 4px 12px; }
.msg-received { background: var(--bg); color: var(--text); align-self: flex-end; border-radius: 12px 12px 12px 4px; }
.chat-input   { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 50px; outline: none; font-size: 14px; }
.chat-input button { padding: 10px 18px; background: var(--primary); color: #fff; border: none; border-radius: 50px; cursor: pointer; }

/* ════════════════════════════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i    { font-size: 48px; margin-bottom: 16px; opacity: .4; }
.empty-state h3   { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.empty-state p    { font-size: 14px; }
.breadcrumb       { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a     { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep  { opacity: .5; }
.section-divider  { height: 1px; background: var(--border); margin: 32px 0; }
.text-center      { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .header-sections     { display: none; }
  .hamburger-btn       { display: flex; }
  .header-nav .btn-login,
  .header-nav .btn-post-ad { font-size: 12px; padding: 6px 12px; }
  .ads-grid            { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .hero                { padding: 48px 0 36px; }
  .hero h1             { font-size: 24px; }
  .hero-section-card   { min-width: 100px; padding: 14px 16px; }
  .chat-layout         { grid-template-columns: 1fr; }
  .chat-sidebar        { display: none; }
  .form-card           { padding: 20px; }
}

@media (max-width: 480px) {
  .stats-bar-inner     { gap: 20px; }
  .cats-grid           { grid-template-columns: repeat(3, 1fr); }
  .footer-grid         { grid-template-columns: 1fr; }
}
