/* =============================================
   ELAWALU MARKET - Frontend Styles
   Mobile App + Desktop Responsive
   ============================================= */

:root {
  --em-green: #2d7a22;
  --em-green-dark: #1e5a17;
  --em-green-light: #4caf50;
  --em-green-pale: #e8f5e9;
  --em-orange: #e65100;
  --em-orange-light: #ff8f00;
  --em-yellow: #ffc107;
  --em-white: #ffffff;
  --em-gray-50: #fafafa;
  --em-gray-100: #f5f5f5;
  --em-gray-200: #eeeeee;
  --em-gray-300: #e0e0e0;
  --em-gray-500: #9e9e9e;
  --em-gray-700: #616161;
  --em-gray-900: #212121;
  --em-shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --em-shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --em-shadow-lg: 0 8px 32px rgba(0,0,0,0.18);
  --em-radius: 12px;
  --em-radius-sm: 8px;
  --em-radius-lg: 20px;
  --em-font: 'Noto Sans Sinhala', 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --em-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   BASE RESET
   ============================================= */
.em-app * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.em-app {
  font-family: var(--em-font);
  color: var(--em-gray-900);
  line-height: 1.6;
  background: var(--em-gray-50);
  min-height: 100vh;
}

/* =============================================
   LOADING SPINNER
   ============================================= */
.em-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: em-spin 0.7s linear infinite;
}

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

.em-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.em-loading-overlay .em-spinner {
  width: 48px; height: 48px;
  border-color: var(--em-green-light);
  border-top-color: var(--em-green);
}

/* =============================================
   BUTTONS
   ============================================= */
.em-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--em-radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--em-transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--em-font);
}

.em-btn-primary {
  background: var(--em-green);
  color: white;
  box-shadow: 0 2px 8px rgba(45,122,34,0.35);
}
.em-btn-primary:hover { background: var(--em-green-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(45,122,34,0.4); }

.em-btn-secondary {
  background: white;
  color: var(--em-green);
  border: 2px solid var(--em-green);
}
.em-btn-secondary:hover { background: var(--em-green-pale); }

.em-btn-orange {
  background: var(--em-orange);
  color: white;
  box-shadow: 0 2px 8px rgba(230,81,0,0.35);
}
.em-btn-orange:hover { background: #bf360c; transform: translateY(-1px); }

.em-btn-sm { padding: 8px 16px; font-size: 13px; }
.em-btn-lg { padding: 16px 36px; font-size: 17px; }
.em-btn-full { width: 100%; }

.em-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* =============================================
   HERO SECTION
   ============================================= */
.em-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 40%, #388e3c 100%);
  overflow: hidden;
}

.em-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.35;
}

.em-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27,94,32,0.85) 0%, rgba(46,125,50,0.75) 100%);
}

.em-hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 60px 24px;
}

.em-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  color: white;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.3);
}

.em-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: white;
  line-height: 1.25;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.em-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 8px;
  line-height: 1.6;
}

.em-hero p.en { font-size: 0.95rem; color: rgba(255,255,255,0.75); font-style: italic; margin-bottom: 32px; }

.em-hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.em-hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 48px;
}

.em-hero-stat {
  text-align: center;
  color: white;
}
.em-hero-stat .num { font-size: 2rem; font-weight: 800; display: block; }
.em-hero-stat .lbl { font-size: 0.8rem; color: rgba(255,255,255,0.75); }

/* =============================================
   SEARCH BAR
   ============================================= */
.em-search-bar {
  background: white;
  padding: 20px 24px;
  box-shadow: var(--em-shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.em-search-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.em-search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--em-gray-100);
  border-radius: var(--em-radius);
  padding: 10px 16px;
  border: 2px solid transparent;
  transition: var(--em-transition);
}

.em-search-input:focus-within {
  border-color: var(--em-green);
  background: white;
  box-shadow: 0 0 0 3px rgba(45,122,34,0.12);
}

.em-search-input input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 15px;
  font-family: var(--em-font);
  color: var(--em-gray-900);
}

.em-search-input svg { color: var(--em-gray-500); flex-shrink: 0; }

/* =============================================
   SECTION
   ============================================= */
.em-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

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

.em-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--em-gray-900);
  display: flex;
  align-items: center;
  gap: 10px;
}

.em-section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background: var(--em-green);
  border-radius: 4px;
}

/* =============================================
   CATEGORIES GRID
   ============================================= */
.em-categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.em-cat-card {
  background: white;
  border-radius: var(--em-radius);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--em-transition);
  box-shadow: var(--em-shadow-sm);
  border: 2px solid transparent;
  text-decoration: none;
  color: inherit;
}

.em-cat-card:hover, .em-cat-card.active {
  border-color: var(--em-green);
  background: var(--em-green-pale);
  transform: translateY(-3px);
  box-shadow: var(--em-shadow-md);
}

.em-cat-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--em-green-pale);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: var(--em-transition);
}

.em-cat-card:hover .em-cat-icon, .em-cat-card.active .em-cat-icon {
  background: var(--em-green);
}

.em-cat-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.em-cat-icon-emoji { font-size: 28px; line-height: 1; }

.em-cat-name-si { font-size: 13px; font-weight: 700; color: var(--em-gray-900); display: block; }
.em-cat-name-en { font-size: 11px; color: var(--em-gray-500); display: block; margin-top: 2px; }

/* =============================================
   LISTINGS GRID
   ============================================= */
.em-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.em-listing-card {
  background: white;
  border-radius: var(--em-radius);
  overflow: hidden;
  box-shadow: var(--em-shadow-sm);
  transition: var(--em-transition);
  cursor: pointer;
  border: 1px solid var(--em-gray-200);
}

.em-listing-card:hover {
  box-shadow: var(--em-shadow-lg);
  transform: translateY(-4px);
  border-color: var(--em-green-light);
}

.em-listing-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--em-green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
}

.em-listing-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.em-listing-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--em-orange);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
}

.em-listing-badge.featured { background: var(--em-yellow); color: var(--em-gray-900); }
.em-listing-badge.ended { background: var(--em-gray-500); }

.em-listing-body { padding: 16px; }

.em-listing-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--em-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.em-listing-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--em-gray-900);
  margin-bottom: 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.em-listing-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--em-gray-500);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.em-listing-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.em-listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--em-gray-200);
}

.em-price-group {}
.em-price-label { font-size: 11px; color: var(--em-gray-500); display: block; }
.em-price { font-size: 18px; font-weight: 800; color: var(--em-orange); }
.em-price-unit { font-size: 12px; color: var(--em-gray-500); }

.em-bid-btn {
  background: var(--em-green);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--em-radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--em-transition);
  font-family: var(--em-font);
}

.em-bid-btn:hover { background: var(--em-green-dark); }

/* =============================================
   MODAL
   ============================================= */
.em-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: em-fade-in 0.2s ease;
}

@keyframes em-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes em-slide-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.em-modal {
  background: white;
  border-radius: var(--em-radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--em-shadow-lg);
  animation: em-slide-up 0.3s ease;
}

.em-modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.em-modal-title { font-size: 1.2rem; font-weight: 700; }
.em-modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--em-gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--em-gray-700);
  transition: var(--em-transition);
}
.em-modal-close:hover { background: var(--em-gray-200); }

.em-modal-body { padding: 24px; }

/* =============================================
   AUTH FORMS
   ============================================= */
.em-auth-container {
  max-width: 480px;
  margin: 40px auto;
  padding: 0 20px;
}

.em-auth-card {
  background: white;
  border-radius: var(--em-radius-lg);
  padding: 40px;
  box-shadow: var(--em-shadow-md);
}

.em-auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.em-auth-logo h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--em-green-dark);
}

.em-auth-logo p { color: var(--em-gray-500); margin-top: 4px; }

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

.em-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--em-radius-sm);
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--em-gray-500);
  transition: var(--em-transition);
  font-family: var(--em-font);
}

.em-tab.active {
  background: white;
  color: var(--em-green);
  box-shadow: var(--em-shadow-sm);
}

.em-role-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.em-role-option {
  flex: 1;
  border: 2px solid var(--em-gray-300);
  border-radius: var(--em-radius);
  padding: 16px;
  cursor: pointer;
  text-align: center;
  transition: var(--em-transition);
}

.em-role-option.selected {
  border-color: var(--em-green);
  background: var(--em-green-pale);
}

.em-role-option .role-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.em-role-option .role-name { font-size: 13px; font-weight: 700; color: var(--em-gray-900); }
.em-role-option .role-desc { font-size: 11px; color: var(--em-gray-500); margin-top: 3px; }

/* =============================================
   FORMS
   ============================================= */
.em-form-group {
  margin-bottom: 18px;
}

.em-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--em-gray-700);
  margin-bottom: 6px;
}

.em-form-label .req { color: #f44336; margin-left: 3px; }

.em-form-control {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--em-gray-300);
  border-radius: var(--em-radius-sm);
  font-size: 15px;
  font-family: var(--em-font);
  color: var(--em-gray-900);
  background: white;
  transition: var(--em-transition);
  outline: none;
  appearance: none;
}

.em-form-control:focus {
  border-color: var(--em-green);
  box-shadow: 0 0 0 3px rgba(45,122,34,0.12);
}

.em-form-control::placeholder { color: var(--em-gray-500); }
textarea.em-form-control { resize: vertical; min-height: 100px; }
select.em-form-control { cursor: pointer; }

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

.em-form-error { color: #f44336; font-size: 12px; margin-top: 4px; }
.em-form-hint { color: var(--em-gray-500); font-size: 12px; margin-top: 4px; }

/* =============================================
   ALERTS
   ============================================= */
.em-alert {
  padding: 12px 16px;
  border-radius: var(--em-radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.em-alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.em-alert-error { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.em-alert-info { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }
.em-alert-warning { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }

/* =============================================
   DASHBOARD
   ============================================= */
.em-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.em-sidebar {
  background: white;
  border-radius: var(--em-radius);
  box-shadow: var(--em-shadow-sm);
  padding: 24px;
  position: sticky;
  top: 80px;
}

.em-sidebar-profile {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--em-gray-200);
  margin-bottom: 20px;
}

.em-sidebar-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--em-green-pale);
  margin-bottom: 12px;
}

.em-sidebar-name { font-size: 15px; font-weight: 700; }
.em-sidebar-role {
  font-size: 12px;
  color: white;
  background: var(--em-green);
  padding: 2px 10px;
  border-radius: 100px;
  display: inline-block;
  margin-top: 4px;
}

.em-nav-menu { list-style: none; }
.em-nav-item { margin-bottom: 4px; }
.em-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--em-radius-sm);
  color: var(--em-gray-700);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--em-transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--em-font);
}

.em-nav-link:hover { background: var(--em-green-pale); color: var(--em-green); }
.em-nav-link.active { background: var(--em-green); color: white; }

.em-nav-badge {
  margin-left: auto;
  background: var(--em-orange);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
}

.em-dash-content { min-width: 0; }

.em-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.em-stat-card {
  background: white;
  border-radius: var(--em-radius);
  padding: 20px;
  box-shadow: var(--em-shadow-sm);
  text-align: center;
  border-top: 3px solid var(--em-green);
}

.em-stat-card.orange { border-top-color: var(--em-orange); }
.em-stat-card.yellow { border-top-color: var(--em-yellow); }
.em-stat-card.blue { border-top-color: #1976d2; }

.em-stat-number { font-size: 1.8rem; font-weight: 800; color: var(--em-gray-900); display: block; }
.em-stat-label { font-size: 12px; color: var(--em-gray-500); margin-top: 4px; }

.em-content-card {
  background: white;
  border-radius: var(--em-radius);
  box-shadow: var(--em-shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.em-content-card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--em-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.em-content-card-body { padding: 20px; }

/* =============================================
   LISTING TABLE
   ============================================= */
.em-table {
  width: 100%;
  border-collapse: collapse;
}

.em-table th {
  font-size: 12px;
  font-weight: 700;
  color: var(--em-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--em-gray-200);
  text-align: left;
}

.em-table td {
  padding: 14px;
  border-bottom: 1px solid var(--em-gray-100);
  font-size: 14px;
  vertical-align: middle;
}

.em-table tr:hover td { background: var(--em-gray-50); }

.em-status-badge {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}

.em-status-active { background: #e8f5e9; color: #1b5e20; }
.em-status-pending { background: #fff8e1; color: #e65100; }
.em-status-sold { background: #e3f2fd; color: #0d47a1; }
.em-status-closed { background: var(--em-gray-200); color: var(--em-gray-700); }

/* =============================================
   BID FORM
   ============================================= */
.em-bid-form {
  background: var(--em-green-pale);
  border-radius: var(--em-radius);
  padding: 24px;
  border: 1px solid #a5d6a7;
}

.em-bid-form h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--em-green-dark);
}

.em-current-bid {
  background: white;
  border-radius: var(--em-radius-sm);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
  border: 2px solid var(--em-green-light);
}

.em-current-bid .label { font-size: 12px; color: var(--em-gray-500); }
.em-current-bid .amount { font-size: 2rem; font-weight: 800; color: var(--em-orange); display: block; }

.em-bids-list { margin-top: 16px; }
.em-bid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--em-gray-200);
  font-size: 14px;
}

.em-bid-row:first-child { font-weight: 700; }
.em-bid-row .bidder { color: var(--em-gray-700); }
.em-bid-row .amount { font-weight: 700; color: var(--em-orange); }

/* =============================================
   LISTING DETAIL
   ============================================= */
.em-listing-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.em-gallery {
  border-radius: var(--em-radius);
  overflow: hidden;
  background: var(--em-green-pale);
  margin-bottom: 20px;
}

.em-gallery-main {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: var(--em-green-pale);
}

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

.em-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--em-gray-100);
  overflow-x: auto;
}

.em-gallery-thumb {
  width: 70px; height: 60px;
  border-radius: var(--em-radius-sm);
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  flex-shrink: 0;
  transition: var(--em-transition);
  border: 2px solid transparent;
}

.em-gallery-thumb.active, .em-gallery-thumb:hover {
  opacity: 1;
  border-color: var(--em-green);
}

/* =============================================
   ADD LISTING
   ============================================= */
.em-add-listing {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.em-listing-form-card {
  background: white;
  border-radius: var(--em-radius-lg);
  box-shadow: var(--em-shadow-md);
  padding: 36px;
}

.em-image-upload-area {
  border: 2px dashed var(--em-gray-300);
  border-radius: var(--em-radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--em-transition);
}

.em-image-upload-area:hover, .em-image-upload-area.drag-over {
  border-color: var(--em-green);
  background: var(--em-green-pale);
}

.em-image-upload-area input { display: none; }
.em-image-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.em-preview-img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--em-radius-sm);
  position: relative;
}

/* =============================================
   NOTIFICATIONS
   ============================================= */
.em-notif-list { list-style: none; }
.em-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--em-gray-200);
  transition: var(--em-transition);
}
.em-notif-item.unread { background: #f1f8e9; }
.em-notif-item:hover { background: var(--em-gray-50); }
.em-notif-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--em-green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.em-notif-body { flex: 1; }
.em-notif-msg { font-size: 14px; color: var(--em-gray-900); }
.em-notif-time { font-size: 11px; color: var(--em-gray-500); margin-top: 4px; }

/* =============================================
   EMPTY STATE
   ============================================= */
.em-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--em-gray-500);
}
.em-empty-icon { font-size: 64px; display: block; margin-bottom: 16px; opacity: 0.5; }
.em-empty h3 { font-size: 1.1rem; font-weight: 700; color: var(--em-gray-700); margin-bottom: 8px; }
.em-empty p { font-size: 14px; }

/* =============================================
   FLOATING NAV (mobile bottom bar)
   ============================================= */
.em-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--em-gray-200);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 200;
  padding: 0 0 env(safe-area-inset-bottom, 0);
}

.em-bottom-nav-inner {
  display: flex;
  align-items: center;
}

.em-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--em-gray-500);
  font-size: 10px;
  font-family: var(--em-font);
  gap: 3px;
  transition: var(--em-transition);
  text-decoration: none;
}

.em-bottom-nav-item.active, .em-bottom-nav-item:hover { color: var(--em-green); }

.em-bottom-nav-item svg { width: 22px; height: 22px; }

.em-bottom-nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -20px;
}

.em-bottom-nav-fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--em-green);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(45,122,34,0.45);
  transition: var(--em-transition);
  color: white;
  text-decoration: none;
}

.em-bottom-nav-fab:hover { background: var(--em-green-dark); transform: scale(1.08); }

/* =============================================
   DISTRICT FILTER CHIPS
   ============================================= */
.em-filter-chips {
  display: flex;
  gap: 8px;
  padding: 0 24px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.em-filter-chips::-webkit-scrollbar { display: none; }

.em-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--em-gray-300);
  background: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--em-transition);
  font-family: var(--em-font);
  color: var(--em-gray-700);
}

.em-chip:hover, .em-chip.active {
  border-color: var(--em-green);
  background: var(--em-green-pale);
  color: var(--em-green-dark);
}

/* =============================================
   COUNTDOWN TIMER
   ============================================= */
.em-countdown {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.em-countdown-unit {
  text-align: center;
  background: var(--em-gray-900);
  color: white;
  border-radius: var(--em-radius-sm);
  padding: 8px 12px;
  min-width: 52px;
}

.em-countdown-unit .num { font-size: 1.4rem; font-weight: 800; display: block; }
.em-countdown-unit .lbl { font-size: 9px; text-transform: uppercase; opacity: 0.7; }
.em-countdown-sep { font-size: 1.4rem; font-weight: 800; color: var(--em-gray-700); }

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.em-toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.em-toast {
  background: var(--em-gray-900);
  color: white;
  padding: 14px 20px;
  border-radius: var(--em-radius);
  box-shadow: var(--em-shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  max-width: 360px;
  animation: em-slide-up 0.3s ease;
}

.em-toast.success { background: #1b5e20; }
.em-toast.error { background: #b71c1c; }
.em-toast.info { background: #0d47a1; }
