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

:root {
  /* Typography */
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Theme Colors (Light Theme) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --border-color: #e2e8f0;
  
  /* Brand Specifics */
  --brand-orange: #ff6b00;
  --brand-orange-hover: #e05e00;
  --brand-dark-gray: #1e293b;
  --brand-gold: #fbbf24;
  --green-whatsapp: #25d366;
  
  /* Component Utilities */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: blur(12px);
  
  /* Animation Speed */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #131a2b;
  --bg-tertiary: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #64748b;
  --border-color: #2a354f;
  
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(19, 26, 43, 0.85);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* Core Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Base Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-orange);
}

/* Layout Utilities */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding-bottom: 80px; /* Space for sticky navigation on mobile */
}

@media(min-width: 769px) {
  .main-content {
    padding-bottom: 0;
  }
}

/* Header & Glassmorphism */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-normal), border var(--transition-normal);
}

.nav-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-orange);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.02);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-orange);
  color: white;
}

.btn-primary:hover {
  background-color: var(--brand-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
}

.btn-whatsapp {
  background-color: var(--green-whatsapp);
  color: white;
}

.btn-whatsapp:hover {
  background-color: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.btn-post {
  background: linear-gradient(135deg, var(--brand-orange) 0%, #ff8c3a 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
  font-family: var(--font-display);
}

.btn-post:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 0, 0.4);
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 40px;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,107,0,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media(min-width: 769px) {
  .hero h1 {
    font-size: 52px;
  }
}

.hero p {
  color: #94a3b8;
  font-size: 16px;
  margin-bottom: 30px;
}

/* Beautiful Search Bar Container */
.search-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

@media(min-width: 769px) {
  .search-container {
    flex-direction: row;
    height: 64px;
    padding: 6px;
    border-radius: 50px;
  }
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  flex: 1;
  background: transparent;
  color: white;
}

.search-field input {
  background: transparent;
  color: white;
  width: 100%;
  font-size: 15px;
}

.search-field input::placeholder {
  color: #64748b;
}

.search-field select {
  background: transparent;
  color: white;
  cursor: pointer;
  font-size: 14px;
  border: none;
  font-weight: 500;
}

.search-field select option {
  background-color: #0f172a;
  color: white;
}

.vertical-divider {
  width: 1px;
  background-color: rgba(255, 255, 255, 0.15);
  height: 32px;
  display: none;
}

@media(min-width: 769px) {
  .vertical-divider {
    display: block;
  }
}

.search-btn {
  background-color: var(--brand-orange);
  color: white;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

@media(min-width: 769px) {
  .search-btn {
    border-radius: 50px;
    padding: 0 32px;
  }
}

.search-btn:hover {
  background-color: var(--brand-orange-hover);
  transform: scale(1.02);
}

/* Category Grid & Cards */
.section-wrapper {
  max-width: 1280px;
  margin: 0 auto 50px auto;
  padding: 0 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media(min-width: 480px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media(min-width: 769px) {
  .category-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
}

@media(min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(11, 1fr);
  }
}

.category-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 16px 8px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--brand-orange);
  box-shadow: 0 10px 20px rgba(255, 107, 0, 0.08);
}

.category-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 107, 0, 0.08);
  color: var(--brand-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.category-card:hover .category-icon-wrapper {
  background-color: var(--brand-orange);
  color: white;
}

.category-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Listings Grid */
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media(min-width: 480px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(min-width: 769px) {
  .listings-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

@media(min-width: 1024px) {
  .listings-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Premium Ad Card */
.listing-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-fast);
}

.listing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--text-tertiary);
}

/* Sponsored/Featured Badges */
.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.badge-sponsored {
  background: linear-gradient(135deg, var(--brand-gold) 0%, #d97706 100%);
}

.badge-featured {
  background: linear-gradient(135deg, var(--brand-orange) 0%, #ea580c 100%);
}

.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.favorite-btn:hover {
  transform: scale(1.1);
  color: #ef4444;
  background-color: white;
}

.favorite-btn.active {
  color: #ef4444;
}

.card-img-wrapper {
  aspect-ratio: 4/3;
  width: 100%;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-tertiary);
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-orange);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
}

.card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  margin-bottom: 12px;
}

.card-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.negotiable-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-orange);
  background-color: rgba(255, 107, 0, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-tertiary);
}

.card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 70%;
}

/* Footer Section */
footer {
  background-color: var(--brand-dark-gray);
  color: #94a3b8;
  padding: 60px 20px 20px 20px;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto 40px auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media(min-width: 769px) {
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand .logo {
  color: white;
}

.footer-column h4 {
  color: white;
  margin-bottom: 20px;
  font-size: 16px;
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}

.footer-column ul a:hover {
  color: var(--brand-orange);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
}

/* Single Page Views Styles */
.page-view {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bottom Navigation Bar for Mobile */
.mobile-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  z-index: 99;
}

@media(min-width: 769px) {
  .mobile-nav-bar {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
}

.mobile-nav-item.active {
  color: var(--brand-orange);
}

.mobile-nav-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}

.mobile-nav-post-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-orange) 0%, #ff8c3a 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
  margin-top: -30px;
}

/* Floating Action Button (FAB) */
.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--brand-orange);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.4);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 90;
}

.fab:hover {
  transform: scale(1.08) rotate(90deg);
}

@media(min-width: 769px) {
  .fab {
    display: none;
  }
}

/* Details Page UI */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media(min-width: 1024px) {
  .detail-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.gallery-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.main-image-wrapper {
  aspect-ratio: 16/10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-tertiary);
  margin-bottom: 12px;
}

.main-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnails-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.thumbnail-img {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.thumbnail-img.active {
  border-color: var(--brand-orange);
}

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

.detail-main-info {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
}

.detail-seller-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.seller-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.seller-meta {
  flex: 1;
}

/* Modals Overlay (General Modal) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  color: var(--text-tertiary);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* Skeleton Loading Animation */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-color) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: loadingSkeleton 1.5s infinite;
  border-radius: 4px;
}

@keyframes loadingSkeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Dropdown Switcher Styling */
.switch-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  transform: rotate(45deg);
  background: var(--border-color);
}

.lang-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--text-primary);
}

.lang-btn:hover {
  background-color: var(--border-color);
}

/* Forms CSS */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--brand-orange);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

/* Post Ad Image Uploader Drag & Drop */
.drag-drop-uploader {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  background-color: var(--bg-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.drag-drop-uploader:hover, .drag-drop-uploader.dragover {
  border-color: var(--brand-orange);
  background-color: rgba(255, 107, 0, 0.04);
}

.preview-images-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.preview-image-item {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.preview-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-image-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: rgba(0,0,0,0.6);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}

/* Real-Time Chat Layout */
.chat-layout {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: calc(100vh - 180px);
  min-height: 500px;
}

@media(min-width: 769px) {
  .chat-layout {
    grid-template-columns: 320px 1fr;
  }
}

.chat-sidebar {
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.chat-inbox-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 18px;
}

.chat-threads-list {
  flex: 1;
  overflow-y: auto;
}

.chat-thread-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--bg-tertiary);
  transition: background-color var(--transition-fast);
}

.chat-thread-item:hover, .chat-thread-item.active {
  background-color: var(--bg-tertiary);
}

.chat-thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
}

.online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background-color: var(--green-whatsapp);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

.chat-thread-details {
  flex: 1;
  overflow: hidden;
}

.chat-thread-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.chat-thread-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.chat-thread-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

.chat-thread-last-msg {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Chat Main Pane */
.chat-pane {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
}

.chat-pane-header {
  padding: 16px 20px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-active-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-messages-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  position: relative;
}

.msg-bubble-received {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.msg-bubble-sent {
  background-color: var(--brand-orange);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.msg-meta {
  font-size: 10px;
  margin-top: 4px;
  text-align: right;
  opacity: 0.7;
}

.chat-input-bar {
  padding: 16px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-input-bar input {
  flex: 1;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 14px;
}

/* User Dashboard & Admin UI Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 30px;
}

@media(min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 240px 1fr;
  }
}

.dashboard-sidebar {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  height: fit-content;
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 8px;
}

@media(min-width: 1024px) {
  .dashboard-sidebar {
    flex-direction: column;
    overflow-x: visible;
  }
}

.dashboard-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.dashboard-menu-item:hover, .dashboard-menu-item.active {
  background-color: rgba(255, 107, 0, 0.08);
  color: var(--brand-orange);
}

.dashboard-content-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* Admin Dashboard Table */
.data-table-container {
  overflow-x: auto;
  margin-top: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-primary);
}

.data-table tr:hover {
  background-color: var(--bg-tertiary);
}

/* Analytics SVG Charts */
.analytics-chart-container {
  height: 200px;
  margin-top: 20px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 20px;
}

.chart-bar-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 60%;
  max-width: 40px;
  background: linear-gradient(to top, var(--brand-orange) 0%, #ff8c3a 100%);
  border-radius: 4px 4px 0 0;
  transition: height 0.6s ease;
  position: relative;
}

.chart-bar:hover {
  opacity: 0.85;
}

.chart-bar-val {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: bold;
  background-color: var(--brand-dark-gray);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.chart-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Search Sidebar and Grid */
.search-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 30px;
}

@media(min-width: 1024px) {
  .search-layout {
    grid-template-columns: 280px 1fr;
  }
}

.filter-sidebar {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  height: fit-content;
}

.filter-section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.filter-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.filter-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* Dark Mode, Language Switcher, and Sticky headers components animations */
.sticky-bar {
  position: sticky;
  top: 72px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.trending-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.trending-tag {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.trending-tag:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background-color: rgba(255,107,0,0.05);
}
