/* LankaAds CSS Design System */

:root {
  /* Common Tokens */
  --font-primary: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.15s ease-in-out;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-pill: 9999px;
  
  /* Light Mode Palette */
  --primary-gradient: linear-gradient(135deg, #0e9f90 0%, #00b4d8 100%);
  --primary-color: #0e9f90;
  --primary-hover: #0a7f73;
  --secondary-color: #ffd166;
  --accent-color: #ff5a5f;
  --bg-color: #f8f9fa;
  --surface-color: #ffffff;
  --surface-hover: #f1f3f5;
  --text-main: #212529;
  --text-muted: #6c757d;
  --text-light: #adb5bd;
  --border-color: #dee2e6;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(12px);
  --input-bg: #f1f3f5;
  --input-border: #e9ecef;
}

body.dark-mode {
  /* Dark Mode Palette */
  --bg-color: #0b0f17;
  --surface-color: #151c2c;
  --surface-hover: #1f293d;
  --text-main: #f8f9fa;
  --text-muted: #a0aec0;
  --text-light: #4a5568;
  --border-color: #2d3748;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(21, 28, 44, 0.75);
  --glass-border: rgba(255, 255, 255, 0.05);
  --input-bg: #1f293d;
  --input-border: #2d3748;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
}

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

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

/* Screen Loader */
.screen-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
  background-color: var(--bg-color);
  color: var(--text-main);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Global App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: var(--transition-smooth);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo i {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  font-size: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.menu-toggle:hover {
  background-color: var(--surface-hover);
}

.nav-link {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.nav-link:hover {
  background-color: var(--surface-hover);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  font-size: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.theme-toggle:hover {
  background-color: var(--surface-hover);
}

.btn-post-ad {
  background: var(--primary-gradient);
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(14, 159, 144, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-post-ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 159, 144, 0.4);
}

/* Hero Section */
.hero-section {
  background: radial-gradient(circle at 10% 20%, rgba(14, 159, 144, 0.05) 0%, rgba(0, 180, 216, 0.05) 90%);
  padding: 60px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.hero-title {
  font-size: 40px;
  margin-bottom: 12px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Search Bar Component */
.search-container {
  max-width: 850px;
  margin: 0 auto;
  background: var(--surface-color);
  border-radius: var(--border-radius-pill);
  padding: 8px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 16px;
  border-right: 1px solid var(--border-color);
}

.search-field:last-of-type {
  border-right: none;
}

.search-field i {
  color: var(--text-muted);
  margin-right: 12px;
}

.search-field input, .search-field select {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 15px;
  padding: 12px 0;
}

.search-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.btn-search {
  background: var(--primary-gradient);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition-smooth);
}

.btn-search:hover {
  transform: scale(1.05);
}

/* Browse Categories Section */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

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

.section-title {
  font-size: 28px;
}

.section-link {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 15px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.category-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(14, 159, 144, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  transition: var(--transition-smooth);
}

.category-card:hover .category-icon-wrapper {
  background: var(--primary-gradient);
}

.category-card:hover .category-icon-wrapper i {
  color: white;
}

.category-icon-wrapper i {
  font-size: 24px;
  color: var(--primary-color);
  transition: var(--transition-smooth);
}

.category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* Listings Grid Section */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.listing-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.listing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 159, 144, 0.2);
}

.listing-img-container {
  height: 180px;
  position: relative;
  background-color: #e9ecef;
}

.listing-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.listing-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-gradient);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
}

.listing-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.listing-category {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 6px;
}

.listing-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 12px;
}

.listing-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* Listings Page & Sidebar Layout */
.listings-page-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Sidebar Filters */
.filters-sidebar {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  align-self: start;
}

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

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

.filter-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.filter-list {
  list-style: none;
}

.filter-item {
  margin-bottom: 10px;
}

.filter-link {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
  transition: var(--transition-fast);
}

.filter-link:hover, .filter-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

.price-inputs {
  display: flex;
  gap: 10px;
}

.price-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 14px;
}

.btn-apply-price {
  margin-top: 12px;
  width: 100%;
  padding: 8px;
  border: none;
  background: var(--primary-gradient);
  color: white;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
}

/* Search Header */
.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.results-count {
  font-size: 18px;
  color: var(--text-muted);
}

.results-count strong {
  color: var(--text-main);
}

.sort-select {
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--surface-color);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.empty-state i {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
}

/* Listing Details Page Layout */
.details-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 30px;
}

.details-main {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.gallery-container {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  background-color: #e9ecef;
  height: 450px;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.details-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.details-category-location {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 8px;
}

.details-title {
  font-size: 28px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.details-price {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--accent-color);
}

.details-meta-info {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
}

.details-description-section h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

.details-description {
  white-space: pre-wrap;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
}

/* Sidebar Contact Card */
.details-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.seller-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.seller-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 700;
}

.seller-name {
  font-size: 16px;
  font-weight: 700;
}

.seller-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.contact-button-container {
  margin-bottom: 16px;
}

.btn-reveal-phone {
  width: 100%;
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 14px;
  border-radius: var(--border-radius-pill);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(14, 159, 144, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.btn-reveal-phone:hover {
  transform: translateY(-2px);
}

.btn-reveal-phone.revealed {
  background: var(--surface-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.safety-tips h4 {
  font-size: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
}

.safety-tips ul {
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
}

.safety-tips li {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.safety-tips li i {
  color: var(--accent-color);
  margin-top: 3px;
}

/* Authentication Page CSS */
.auth-page-container {
  max-width: 450px;
  margin: 60px auto;
  padding: 0 24px;
}

.auth-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius-lg);
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 15px;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 159, 144, 0.15);
}

.btn-auth-submit {
  width: 100%;
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 14px;
  border-radius: var(--border-radius-pill);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(14, 159, 144, 0.3);
  margin-top: 10px;
  transition: var(--transition-smooth);
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 159, 144, 0.4);
}

.auth-toggle-text {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-toggle-link {
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
}

/* Post Ad View CSS */
.post-ad-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 24px;
}

.post-ad-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.post-ad-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.post-ad-header h2 {
  font-size: 26px;
}

.post-ad-header p {
  color: var(--text-muted);
}

.post-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Image Upload Widget */
.image-upload-wrapper {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
  margin-bottom: 24px;
}

.image-upload-wrapper:hover {
  border-color: var(--primary-color);
  background-color: var(--surface-hover);
}

.image-upload-wrapper input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.image-upload-icon {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.image-upload-text h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.image-upload-text p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Preview uploaded images */
.preview-images-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.preview-img-card {
  height: 100px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

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

.btn-remove-preview-img {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255, 90, 95, 0.9);
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: var(--transition-fast);
}

.btn-remove-preview-img:hover {
  transform: scale(1.1);
}

/* Dashboard View CSS */
.dashboard-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

.dashboard-sidebar {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  align-self: start;
}

.dashboard-menu {
  list-style: none;
}

.dashboard-menu-item {
  margin-bottom: 8px;
}

.dashboard-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.dashboard-menu-link:hover, .dashboard-menu-link.active {
  background-color: var(--surface-hover);
  color: var(--primary-color);
}

.dashboard-content {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.dashboard-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h2 {
  font-size: 24px;
}

/* Dashboard ads list */
.dash-ads-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-ad-card {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: var(--surface-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

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

.dash-ad-img {
  width: 140px;
  height: 110px;
  object-fit: cover;
  background-color: #e9ecef;
}

.dash-ad-details {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dash-ad-title {
  font-size: 16px;
  font-weight: 700;
}

.dash-ad-price {
  font-weight: 800;
  color: var(--accent-color);
  font-size: 15px;
}

.dash-ad-status-date {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

.dash-ad-status {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 11px;
}

.dash-ad-status.active {
  color: var(--primary-color);
}

.dash-ad-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px;
  border-left: 1px solid var(--border-color);
  gap: 10px;
}

.btn-dash-delete {
  background: rgba(255, 90, 95, 0.1);
  color: var(--accent-color);
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-dash-delete:hover {
  background: var(--accent-color);
  color: white;
}

.btn-dash-edit {
  background: rgba(14, 159, 144, 0.1);
  color: var(--primary-color);
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-dash-edit:hover {
  background: var(--primary-color);
  color: white;
}

.btn-dash-sold {
  background: rgba(255, 209, 102, 0.15);
  color: #c48f22;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

body.dark-mode .btn-dash-sold {
  color: #ffd166;
}

.btn-dash-sold:hover {
  background: #ffd166;
  color: #212529;
}

.dash-ad-status.sold {
  color: var(--accent-color);
}

.dash-ad-analytics {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.dash-ad-analytics span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-badge.sold {
  background: #ff5a5f;
}


/* User Profile Info Card */
.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.profile-info-item {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
}

.profile-info-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.profile-info-value {
  font-size: 16px;
  font-weight: 700;
}

/* Alerts / Toast Messages */
.notification-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 16px 24px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
  min-width: 280px;
  max-width: 400px;
  animation: slideInRight 0.3s ease-out;
}

.toast.success {
  border-left: 4px solid var(--primary-color);
}

.toast.success i {
  color: var(--primary-color);
}

.toast.error {
  border-left: 4px solid var(--accent-color);
}

.toast.error i {
  color: var(--accent-color);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer Styling */
.app-footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 40px 24px;
  margin-top: 60px;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-text {
  font-size: 13px;
  color: var(--text-light);
}

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

.skeleton-text {
  height: 16px;
  margin-bottom: 10px;
}

.skeleton-title {
  height: 24px;
  margin-bottom: 12px;
}

.skeleton-img {
  height: 180px;
}

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .listings-page-container {
    grid-template-columns: 1fr;
  }
  .details-container {
    grid-template-columns: 1fr;
  }
  .dashboard-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }
  .search-container {
    flex-direction: column;
    border-radius: var(--border-radius-md);
    padding: 16px;
    gap: 12px;
  }
  .search-field {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
  }
  .btn-search {
    width: 100%;
    border-radius: var(--border-radius-sm);
    height: 48px;
  }
  .post-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .preview-images-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .header-container {
    padding: 12px 16px;
  }
  .menu-toggle {
    display: flex;
  }
  .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 24px;
    gap: 12px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 99;
  }
  body.dark-mode .nav-menu {
    background: var(--surface-color);
  }
  .nav-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }
  .nav-link {
    width: 100%;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    border-radius: var(--border-radius-sm);
  }
  .btn-post-ad {
    width: 100%;
    justify-content: center;
    padding: 12px;
    margin-top: 8px;
    font-size: 14px;
  }
  .gallery-container {
    height: 300px;
  }
}

/* --- Admin Panel Dashboard Styling --- */
.admin-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
}
.admin-badge.admin {
  background-color: rgba(14, 159, 144, 0.15);
  color: var(--primary-color);
}
.admin-badge.user {
  background-color: rgba(108, 117, 125, 0.15);
  color: var(--text-muted);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.admin-stat-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.admin-stat-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(14, 159, 144, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 20px;
}

.admin-stat-info {
  display: flex;
  flex-direction: column;
}

.admin-stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.admin-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Data Tables */
.admin-table-container {
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--surface-color);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.admin-table th, .admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background-color: var(--surface-hover);
  font-weight: 700;
  color: var(--text-main);
}

.admin-table tbody tr:hover {
  background-color: var(--surface-hover);
}

/* Mod buttons */
.btn-admin-action {
  border: none;
  background: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--border-radius-pill);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-admin-action.demote {
  background: rgba(255, 90, 95, 0.1);
  color: var(--accent-color);
}
.btn-admin-action.demote:hover {
  background: var(--accent-color);
  color: white;
}

.btn-admin-action.promote {
  background: rgba(14, 159, 144, 0.1);
  color: var(--primary-color);
}
.btn-admin-action.promote:hover {
  background: var(--primary-color);
  color: white;
}

.btn-admin-action.delete {
  background: rgba(255, 90, 95, 0.1);
  color: var(--accent-color);
}
.btn-admin-action.delete:hover {
  background: var(--accent-color);
  color: white;
}

/* Insights lists */
.admin-insights-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-insight-item {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-insight-name {
  font-weight: 700;
  font-size: 15px;
}

.admin-insight-stats {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.admin-insight-stats span strong {
  color: var(--text-main);
}

/* Layout Split */
.admin-dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}

@media (max-width: 1024px) {
  .admin-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

/* Admin Dashboard Custom Enhancements */
.btn-admin-action.featured-active {
  background: rgba(255, 209, 102, 0.2);
  color: #c48f22;
}
body.dark-mode .btn-admin-action.featured-active {
  color: #ffd166;
}
.btn-admin-action.featured-active:hover {
  background: #ffd166;
  color: #212529;
}

.btn-admin-action.featured-inactive {
  background: rgba(108, 117, 125, 0.1);
  color: var(--text-muted);
}
.btn-admin-action.featured-inactive:hover {
  background: var(--surface-hover);
  color: var(--primary-color);
}

.admin-search-wrapper {
  margin-bottom: 20px;
  position: relative;
  display: flex;
  align-items: center;
  max-width: 360px;
}
.admin-search-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}
.admin-search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border-radius: var(--border-radius-pill);
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 14px;
  transition: var(--transition-fast);
}
.admin-search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 159, 144, 0.15);
}

/* --- Mobile Responsiveness Enhancements --- */
.admin-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 1024px) {
  .admin-two-col-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  /* Dashboard layout and menu items as horizontal tabs on mobile */
  .dashboard-container, .admin-dashboard-layout {
    grid-template-columns: 1fr;
    margin: 20px auto;
    padding: 0 16px;
    gap: 20px;
  }
  
  .dashboard-sidebar {
    padding: 12px;
    width: 100%;
    align-self: stretch;
  }
  
  .dashboard-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }
  
  .dashboard-menu-item {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 120px;
  }
  
  .dashboard-menu-link {
    padding: 8px 12px;
    font-size: 13px;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }

  .dashboard-content {
    padding: 20px 16px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }

  .dashboard-header h2 {
    font-size: 20px;
  }

  .admin-search-wrapper {
    max-width: 100%;
  }

  /* Admin tables optimization */
  .admin-table th, .admin-table td {
    padding: 8px 10px;
    font-size: 13px;
  }

  .admin-table td strong {
    font-size: 13px;
  }

  /* Force stack action buttons inside tables */
  .admin-table td div[style*="display:flex"], 
  .admin-table td[style*="display:flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    width: 100%;
  }

  .btn-admin-action {
    padding: 6px 10px;
    font-size: 12px;
    justify-content: center;
    width: 100%;
  }

  /* Card metrics optimization on mobile */
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .admin-stat-card {
    padding: 16px 12px;
    gap: 10px;
  }

  .admin-stat-icon-wrapper {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .admin-stat-value {
    font-size: 20px;
  }

  .admin-stat-label {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet Screen Header Menu Adjustments */
@media (max-width: 1024px) {
  .header-container {
    padding: 12px 16px;
  }
  .nav-menu {
    gap: 10px;
  }
  .nav-link {
    font-size: 13px;
    padding: 6px 8px;
  }
  .btn-post-ad {
    padding: 8px 14px;
    font-size: 13px;
  }
  .logo {
    font-size: 20px;
  }
}

/* Keywords Tag Badges */
.ad-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ad-tag-badge {
  display: inline-block;
  background-color: var(--surface-hover);
  color: var(--text-main);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--border-radius-pill);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
}

.ad-tag-badge:hover {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Watchlist Toggle Button and States */
.btn-watchlist-toggle {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.btn-watchlist-toggle:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent-color);
}

.btn-watchlist-toggle.active {
  border-color: var(--accent-color);
  background: rgba(255, 90, 95, 0.05);
}

.btn-watchlist-toggle.active i {
  animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Dashboard listing status pending state */
.dash-ad-status.pending {
  color: #c48f22;
}

body.dark-mode .dash-ad-status.pending {
  color: #ffd166;
}

/* Admin account status badges */
.admin-badge.active {
  background-color: rgba(14, 159, 144, 0.15);
  color: var(--primary-color);
}

.admin-badge.suspended {
  background-color: rgba(255, 90, 95, 0.15);
  color: var(--accent-color);
}

