/* =====================================================
   XAZTA EquiShare — Main Stylesheet
   Theme: Clean White & Warm Brown, Minimal Professional
   Fonts: Playfair Display + DM Sans via Google Fonts
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── CSS Variables ── */
:root {
  --brown-900: #2C1A0E;
  --brown-800: #3E2412;
  --brown-700: #5C3317;
  --brown-600: #7A4522;
  --brown-500: #9B5E30;
  --brown-400: #B8773F;
  --brown-300: #D4A574;
  --brown-200: #E8C9A0;
  --brown-100: #F5E6D3;
  --brown-50:  #FDF6EE;

  --white:    #FFFFFF;
  --gray-50:  #FAFAF9;
  --gray-100: #F5F4F2;
  --gray-200: #E8E5E0;
  --gray-300: #D4CFC8;
  --gray-400: #ADA89F;
  --gray-500: #857F76;
  --gray-600: #5E5852;
  --gray-700: #3D3830;
  --gray-800: #2A2520;
  --gray-900: #1A1610;

  --success: #2D7A4A;
  --warning: #C97A1A;
  --danger:  #B83232;
  --info:    #1A5C8A;

   --font-display: 'Instrument Sans', 'DM Sans', sans-serif;
   --font-body:    'DM Sans', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(44,26,14,0.08), 0 1px 2px rgba(44,26,14,0.06);
  --shadow-md: 0 4px 12px rgba(44,26,14,0.10), 0 2px 4px rgba(44,26,14,0.06);
  --shadow-lg: 0 10px 30px rgba(44,26,14,0.12), 0 4px 8px rgba(44,26,14,0.08);
  --shadow-xl: 0 20px 50px rgba(44,26,14,0.15);

  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--brown-600); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brown-800); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; color: var(--gray-900); }
h4, h5, h6 { font-family: var(--font-body); font-weight: 600; color: var(--gray-800); }
ul { list-style: none; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--brown-300); border-radius: 3px; }

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brown-800);
  white-space: nowrap;
  text-decoration: none;
}
.navbar-brand strong { color: var(--brown-500); }
.brand-icon {
  width: 36px; height: 36px;
  background: var(--brown-700);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1rem;
  flex-shrink: 0;
}
.brand-icon-sm {
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.15);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  color: var(--white);
  flex-shrink: 0;
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--brown-700);
  background: var(--brown-50);
}
.navbar-actions { display: flex; align-items: center; gap: 0.6rem; }
.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brown-600);
  color: var(--white);
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  margin-left: 3px;
}
.hamburger {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray-700);
  line-height: 1;
  transition: var(--transition);
  display: none;
}
.hamburger:hover { background: var(--brown-50); border-color: var(--brown-300); }
.mobile-menu {
  display: none;
  border-top: 1px solid var(--gray-100);
  background: var(--white);
  padding: 0.5rem 0 1rem;
}
.mobile-menu.open { display: block; }
.mobile-nav { padding: 0; margin: 0; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}
.mobile-nav-link:hover { background: var(--brown-50); color: var(--brown-800); }
.mobile-nav-link i { font-size: 1rem; color: var(--brown-500); width: 18px; }
li.mobile-divider { height: 1px; background: var(--gray-100); margin: 0.5rem 0; }

/* ══════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 72px; right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 340px;
  width: calc(100vw - 2rem);
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid transparent;
  animation: fadeInUp 0.3s ease forwards;
}
.toast i { font-size: 1rem; flex-shrink: 0; }
.toast-success { background: #D1FAE5; border-color: #6EE7B7; color: #065F46; }
.toast-error   { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
.toast-warning { background: #FEF3C7; border-color: #FCD34D; color: #92400E; }
.toast-info    { background: #DBEAFE; border-color: #93C5FD; color: #1E40AF; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}
.btn-primary   { background: var(--brown-700); color: var(--white); border-color: var(--brown-700); }
.btn-primary:hover { background: var(--brown-800); border-color: var(--brown-800); color: var(--white); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-secondary { background: var(--white); color: var(--brown-700); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--brown-50); border-color: var(--brown-300); color: var(--brown-800); }
.btn-outline   { background: transparent; color: var(--brown-600); border-color: var(--gray-200); }
.btn-outline:hover { background: var(--brown-50); border-color: var(--brown-300); color: var(--brown-700); }
.btn-danger    { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover { background: #9a2828; color: var(--white); }
.btn-success   { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-success:hover { background: #236040; color: var(--white); }
.btn-sm  { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-lg  { padding: 0.75rem 1.75rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ══════════════════════════════════════════
   FORMS
══════════════════════════════════════════ */
.form-group { margin-bottom: 1.2rem; }
.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
  outline: none;
  appearance: none;
}
.form-control:focus { border-color: var(--brown-400); box-shadow: 0 0 0 3px rgba(155,94,48,0.12); }
.form-control::placeholder { color: var(--gray-400); }
.form-control.is-invalid { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23857F76' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brown-600); cursor: pointer; flex-shrink: 0; }
.form-error { color: var(--danger); font-size: 0.78rem; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.form-hint  { color: var(--gray-500); font-size: 0.78rem; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.required-star { color: var(--danger); }

/* Input with leading icon */
.input-with-icon { position: relative; }
.input-with-icon > i {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: 0.9rem; pointer-events: none; z-index: 1;
}
.form-control.has-icon { padding-left: 2.25rem; }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white);
}
.card-header h4 { font-size: 0.95rem; margin: 0; display: flex; align-items: center; gap: 6px; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ══════════════════════════════════════════
   LISTING CARD
══════════════════════════════════════════ */
.listing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.listing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--brown-200); }
.listing-card-img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  background: var(--brown-50);
}
.listing-card-img-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--brown-50) 0%, var(--brown-100) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--brown-300); font-size: 2.5rem;
}
.listing-card-body { padding: 0.9rem 1rem; flex: 1; display: flex; flex-direction: column; }
.listing-card-category {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--brown-500); margin-bottom: 0.3rem;
}
.listing-card-title {
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
  color: var(--gray-900); margin-bottom: 0.4rem; line-height: 1.35; flex: 1;
}
.listing-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--gray-100);
}
.listing-price {
  font-size: 1.1rem; font-weight: 700; color: var(--brown-700);
  font-family: var(--font-display);
}
.negotiable-tag { font-size: 0.65rem; font-weight: 500; color: var(--brown-400); font-family: var(--font-body); margin-left: 3px; }

/* Condition badges */
.condition-badge {
  font-size: 0.68rem; font-weight: 600; padding: 3px 8px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
}
.condition-like_new { background: #D1FAE5; color: #065F46; }
.condition-good     { background: #DBEAFE; color: #1E40AF; }
.condition-fair     { background: #FEF3C7; color: #92400E; }

/* Wishlist button on card */
.wishlist-btn {
  position: absolute; top: 10px; right: 10px;
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: 50%; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
  font-size: 0.9rem; color: var(--gray-400); box-shadow: var(--shadow-sm);
}
.wishlist-btn:hover, .wishlist-btn.active { color: #E53E3E; border-color: #FEB2B2; background: #FFF5F5; }

/* ══════════════════════════════════════════
   GRID LAYOUTS
══════════════════════════════════════════ */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 960px;  margin: 0 auto; padding: 0 1.5rem; }
.container-xs { max-width: 520px;  margin: 0 auto; padding: 0 1.5rem; }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* ══════════════════════════════════════════
   STAT CARD
══════════════════════════════════════════ */
.stat-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200); padding: 1.25rem;
  display: flex; align-items: flex-start; gap: 1rem;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.stat-icon.brown  { background: var(--brown-100); color: var(--brown-700); }
.stat-icon.green  { background: #D1FAE5; color: #065F46; }
.stat-icon.blue   { background: #DBEAFE; color: #1E40AF; }
.stat-icon.orange { background: #FEF3C7; color: #92400E; }
.stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--gray-900); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.78rem; color: var(--gray-500); font-weight: 500; }

/* ══════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════ */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.75rem 0 1.5rem;
  margin-bottom: 0;
}
.page-header h1 { font-size: 1.7rem; }
.page-header p  { color: var(--gray-500); margin-top: 0.25rem; font-size: 0.9rem; }
.page-header-flex {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

/* ══════════════════════════════════════════
   SECTION TITLE
══════════════════════════════════════════ */
.section-title {
  font-family: var(--font-display); font-size: 1.1rem; color: var(--gray-800);
  margin-bottom: 1.1rem; padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--brown-100);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.section-title-row { flex-wrap: wrap; }

/* ══════════════════════════════════════════
   ALERTS / BANNERS
══════════════════════════════════════════ */
.alert {
  padding: 0.85rem 1rem; border-radius: var(--radius-md); font-size: 0.875rem;
  margin-bottom: 1rem; border: 1px solid transparent;
  display: flex; align-items: flex-start; gap: 0.6rem;
}
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #D1FAE5; border-color: #6EE7B7; color: #065F46; }
.alert-error,
.alert-danger  { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
.alert-warning { background: #FEF3C7; border-color: #FCD34D; color: #92400E; }
.alert-info    { background: #DBEAFE; border-color: #93C5FD; color: #1E40AF; }

/* ══════════════════════════════════════════
   TAGS & BADGES
══════════════════════════════════════════ */
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 0.71rem; font-weight: 600;
}
.tag-brown  { background: var(--brown-100); color: var(--brown-700); }
.tag-green  { background: #D1FAE5; color: #065F46; }
.tag-red    { background: #FEE2E2; color: #991B1B; }
.tag-blue   { background: #DBEAFE; color: #1E40AF; }
.tag-yellow { background: #FEF3C7; color: #92400E; }
.tag-gray   { background: var(--gray-100); color: var(--gray-600); }

/* ══════════════════════════════════════════
   AUTH PAGES
══════════════════════════════════════════ */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-visual {
  background: linear-gradient(145deg, var(--brown-800) 0%, var(--brown-600) 60%, var(--brown-400) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem; position: relative; overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.04) 0%, transparent 50%);
}
.auth-visual-content { position: relative; color: var(--white); max-width: 380px; }
.auth-visual-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  color: rgba(255,255,255,0.9); margin-bottom: 2rem;
}
.auth-visual-logo i { background: rgba(255,255,255,0.15); padding: 7px 10px; border-radius: 8px; }
.auth-visual-content h2 {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  color: var(--white); margin-bottom: 1rem; line-height: 1.2;
}
.auth-visual-content p { color: rgba(255,255,255,0.75); font-size: 0.95rem; line-height: 1.65; }
.auth-visual-features { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.85rem; }
.auth-feature { display: flex; align-items: center; gap: 0.75rem; color: rgba(255,255,255,0.9); font-size: 0.875rem; }
.auth-feature-icon {
  width: 32px; height: 32px; background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.auth-form-panel {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 3rem 2.5rem; overflow-y: auto; background: var(--white);
}
.auth-form-inner { width: 100%; max-width: 420px; padding-top: 2rem; }
.auth-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--gray-500); margin-bottom: 1.75rem;
  transition: var(--transition);
}
.auth-back-link:hover { color: var(--brown-600); }
.auth-title    { font-size: 1.6rem; margin-bottom: 0.4rem; }
.auth-subtitle { color: var(--gray-500); font-size: 0.875rem; margin-bottom: 1.75rem; }

/* ══════════════════════════════════════════
   HERO — LANDING PAGE
══════════════════════════════════════════ */
.hero {
  background: linear-gradient(160deg, var(--brown-900) 0%, var(--brown-700) 55%, var(--brown-500) 100%);
  color: var(--white); padding: 5.5rem 0 4.5rem; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,0.05) 0%, transparent 60%);
}
.hero-content { position: relative; max-width: 600px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2);
  color: var(--brown-200); padding: 5px 14px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--font-display); font-size: 3rem; font-weight: 700;
  color: var(--white); line-height: 1.15; margin-bottom: 1.25rem;
}
.hero h1 span { color: var(--brown-200); }
.hero p { font-size: 1.05rem; color: rgba(255,255,255,0.8); margin-bottom: 2rem; line-height: 1.7; max-width: 480px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 2.5rem; margin-top: 3rem; padding-top: 2.25rem;
  border-top: 1px solid rgba(255,255,255,0.15); flex-wrap: wrap;
}
.hero-stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--white); line-height: 1; }
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 3px; }
.hero-stat-divider { width: 1px; background: rgba(255,255,255,0.2); align-self: stretch; }

/* ══════════════════════════════════════════
   SECTION / HOW IT WORKS
══════════════════════════════════════════ */
.section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-family: var(--font-display); font-size: 1.9rem; color: var(--gray-900); margin-bottom: 0.6rem; }
.section-header p { color: var(--gray-500); max-width: 500px; margin: 0 auto; font-size: 0.95rem; }
.how-it-works { padding: 4.5rem 0; background: var(--white); }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.step-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 2rem 1.75rem; position: relative;
}
.step-icon {
  width: 50px; height: 50px; background: var(--brown-100); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--brown-700); margin-bottom: 1rem;
}
.step-number {
  font-family: var(--font-display); font-size: 2.25rem; font-weight: 700;
  color: var(--brown-100); position: absolute; top: 1.25rem; right: 1.5rem; line-height: 1;
}
.step-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.step-card p  { color: var(--gray-500); font-size: 0.875rem; line-height: 1.65; }

/* ══════════════════════════════════════════
   SIDEBAR LAYOUT (browse page)
══════════════════════════════════════════ */
.layout-sidebar {
  display: grid; grid-template-columns: 270px 1fr; gap: 2rem; align-items: start;
  padding-top: 2rem;
}
.sidebar { position: sticky; top: 80px; }
.filter-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200); padding: 1.4rem;
}
.filter-title {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gray-500); margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: 6px;
}

/* ══════════════════════════════════════════
   LISTING DETAIL PAGE
══════════════════════════════════════════ */
.listing-detail-layout { display: grid; grid-template-columns: 1fr 370px; gap: 2.5rem; align-items: start; }
.listing-detail-sticky { position: sticky; top: 80px; }
.listing-detail-images { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-200); }
.listing-main-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.listing-thumbnails { display: flex; gap: 0.5rem; padding: 0.75rem; background: var(--gray-50); flex-wrap: wrap; }
.listing-thumb {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: var(--radius-sm); cursor: pointer;
  border: 2px solid transparent; transition: var(--transition);
}
.listing-thumb:hover, .listing-thumb.active { border-color: var(--brown-500); }
.listing-detail-meta {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin: 1rem 0; padding: 1rem 0;
  border-top: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100);
}
.meta-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--gray-600); }
.meta-item strong { color: var(--gray-800); }
.seller-card {
  background: var(--brown-50); border: 1px solid var(--brown-200);
  border-radius: var(--radius-lg); padding: 1.1rem;
  display: flex; align-items: center; gap: 1rem;
}
.seller-avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--brown-200);
  display: flex; align-items: center; justify-content: center;
  color: var(--brown-700); font-size: 1rem; font-weight: 700; flex-shrink: 0;
  font-family: var(--font-display);
}

/* ══════════════════════════════════════════
   PROFILE HERO
══════════════════════════════════════════ */
.profile-hero {
  background: linear-gradient(135deg, var(--brown-800) 0%, var(--brown-600) 100%);
  padding: 2.5rem 0; color: var(--white);
}
.profile-header-flex { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.profile-avatar-lg {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 700;
  color: var(--white); border: 3px solid rgba(255,255,255,0.3); flex-shrink: 0;
}
.profile-avatar-img {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,0.3); flex-shrink: 0;
}
.profile-info h2 { color: var(--white); font-size: 1.5rem; }
.profile-info p  { color: rgba(255,255,255,0.7); font-size: 0.875rem; margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.profile-stats-row {
  display: flex; align-items: center; gap: 2rem; margin-top: 1.5rem;
  padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.15); flex-wrap: wrap;
}
.profile-stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1; }
.profile-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 3px; }
.profile-stat-divider { width: 1px; height: 32px; background: rgba(255,255,255,0.2); }

/* ══════════════════════════════════════════
   TABLES
══════════════════════════════════════════ */
.offers-table { width: 100%; border-collapse: collapse; }
.offers-table th {
  font-size: 0.73rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--gray-500);
  padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--gray-200); text-align: left; white-space: nowrap;
}
.offers-table td {
  padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--gray-100);
  font-size: 0.875rem; color: var(--gray-700);
}
.offers-table tr:last-child td { border-bottom: none; }
.offers-table tr:hover td { background: var(--gray-50); }

/* ══════════════════════════════════════════
   MESSAGING
══════════════════════════════════════════ */
.messaging-layout {
  display: grid; grid-template-columns: 300px 1fr;
  height: calc(100vh - 64px); overflow: hidden;
}
.conversations-list {
  border-right: 1px solid var(--gray-200); overflow-y: auto; background: var(--white);
}
.conv-list-header {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.conv-list-header h3 { font-size: 0.975rem; margin: 0; display: flex; align-items: center; gap: 6px; }
.conversation-item {
  padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: var(--transition);
  display: flex; gap: 0.85rem; align-items: flex-start;
}
.conversation-item:hover, .conversation-item.active { background: var(--brown-50); }
.conv-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--brown-200);
  display: flex; align-items: center; justify-content: center;
  color: var(--brown-700); font-size: 0.875rem; font-weight: 700;
  flex-shrink: 0; font-family: var(--font-display); overflow: hidden;
}
.conv-body { flex: 1; min-width: 0; }
.conv-top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.conv-name { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); }
.conv-preview { font-size: 0.78rem; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-listing-ref { font-size: 0.7rem; color: var(--brown-400); margin-top: 3px; display: flex; align-items: center; gap: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-area { display: flex; flex-direction: column; background: var(--gray-50); overflow: hidden; }
.chat-header {
  background: var(--white); padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; gap: 0.9rem;
  flex-shrink: 0;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.msg-row { display: flex; flex-direction: column; }
.msg-mine   { align-items: flex-end; }
.msg-theirs { align-items: flex-start; }
.msg-sender-name { font-size: 0.7rem; color: var(--gray-400); margin-bottom: 3px; padding-left: 4px; }
.message-bubble {
  max-width: 68%; padding: 0.6rem 0.95rem;
  border-radius: 16px; font-size: 0.875rem; line-height: 1.5;
}
.message-bubble.mine   { background: var(--brown-700); color: var(--white); border-bottom-right-radius: 4px; }
.message-bubble.theirs { background: var(--white); color: var(--gray-800); border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; }
.message-time { font-size: 0.67rem; opacity: 0.65; margin-top: 4px; }
.chat-input-area {
  background: var(--white); padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200); display: flex; gap: 0.75rem; align-items: flex-end;
  flex-shrink: 0;
}
.chat-input {
  flex: 1; padding: 0.65rem 1rem; border: 1.5px solid var(--gray-200);
  border-radius: 24px; font-family: var(--font-body); font-size: 0.875rem;
  outline: none; resize: none; max-height: 120px; background: var(--gray-50);
}
.chat-input:focus { border-color: var(--brown-400); background: var(--white); }

/* ══════════════════════════════════════════
   ADMIN PANEL
══════════════════════════════════════════ */
.admin-layout {
  display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 64px);
}
.admin-sidebar { background: var(--brown-900); }
.admin-sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 0.25rem;
}
.admin-sidebar-brand i { font-size: 1.1rem; color: var(--brown-300); }
.admin-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1.5rem; color: rgba(255,255,255,0.6);
  font-size: 0.875rem; font-weight: 500; transition: var(--transition); cursor: pointer;
}
.admin-nav-item i { width: 16px; text-align: center; }
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(255,255,255,0.08); color: var(--white); }
.admin-nav-item.active { border-left: 3px solid var(--brown-300); }
.admin-content { padding: 2rem; background: var(--gray-50); }

/* ══════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════ */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--gray-500); }
.empty-icon  { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.35; display: block; }
.empty-state h3 { font-size: 1.05rem; color: var(--gray-700); margin-bottom: 0.5rem; }
.empty-state p  { font-size: 0.875rem; margin-bottom: 1.5rem; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer { background: var(--brown-900); color: rgba(255,255,255,0.6); padding: 1.5rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.8); }
.footer-copy  { color: rgba(255,255,255,0.45); font-size: 0.78rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: rgba(255,255,255,0.45); font-size: 0.8rem; }
.footer-links a:hover { color: var(--brown-200); }

/* ══════════════════════════════════════════
   UTILITY
══════════════════════════════════════════ */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--gray-500); }
.text-small   { font-size: 0.8rem; }
.text-brown   { color: var(--brown-600); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.divider { height: 1px; background: var(--gray-200); margin: 1.5rem 0; }
.d-desktop { display: flex; }
.d-mobile  { display: none; }

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fade-up { animation: fadeInUp 0.4s ease forwards; }
.stagger-1 { animation-delay: 0.05s; opacity: 0; }
.stagger-2 { animation-delay: 0.10s; opacity: 0; }
.stagger-3 { animation-delay: 0.15s; opacity: 0; }
.stagger-4 { animation-delay: 0.20s; opacity: 0; }

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET (max 1024px)
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .admin-stat-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.5rem; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE (max 768px)
══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Navbar */
  .d-desktop { display: none !important; }
  .d-mobile  { display: flex !important; }
  .hamburger { display: flex; }

  /* Layout */
  .container, .container-sm { padding: 0 1rem; }
  .layout-sidebar { grid-template-columns: 1fr; padding-top: 1rem; }
  .sidebar { position: static; }
  .form-row { grid-template-columns: 1fr; }
  .page-header-flex { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  /* Hero */
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 1.85rem; }
  .hero p  { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 1.25rem; }
  .hero-stat-divider { display: none; }
  .steps-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* Auth */
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-visual  { display: none; }
  .auth-form-panel { padding: 2rem 1.25rem; }
  .auth-form-inner { max-width: 100%; padding-top: 1rem; }

  /* Listings */
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .listing-detail-layout { grid-template-columns: 1fr; }
  .listing-detail-sticky { position: static; }

  /* Dashboard */
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }

  /* Messaging */
  .messaging-layout { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 64px); }
  .conversations-list { height: 220px; border-right: none; border-bottom: 1px solid var(--gray-200); overflow-y: auto; }
  .chat-area { height: calc(100vh - 64px - 220px); min-height: 380px; }

  /* Admin */
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-content { padding: 1.25rem 1rem; }
  .admin-stat-grid { grid-template-columns: 1fr 1fr; }

  /* Profile */
  .profile-header-flex { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .profile-stats-row { gap: 1.25rem; }
  .profile-stat-divider { display: none; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }

  /* Tables */
  .offers-table th, .offers-table td { padding: 0.5rem 0.65rem; font-size: 0.8rem; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (max 480px)
══════════════════════════════════════════ */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.55rem; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .listings-grid  { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .listing-card-title { font-size: 0.83rem; }
  .listing-price      { font-size: 0.95rem; }
  .stat-value         { font-size: 1.4rem; }
  .admin-stat-grid    { grid-template-columns: 1fr 1fr; }
  .auth-form-panel    { padding: 1.5rem 1rem; }
  .card-body          { padding: 1.1rem; }
  .chat-header        { padding: 0.75rem 1rem; }
  .chat-messages      { padding: 1rem; }
  .chat-input-area    { padding: 0.75rem 1rem; }
}