/* ---- Market Card Image Slider ---- */
.market-card-slider {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #f0f0f0;
  margin-bottom: 6px;
}
.market-card-slider-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  height: 100%;
}
.market-card-img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f0f0f0;
  flex-shrink: 0;
  border-radius: 18px 18px 0 0;
  user-select: none;
  display: block;
  margin: 0 auto;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}
.market-card-slider-prev,
.market-card-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
}
.market-card-slider-prev { left: 10px; }
.market-card-slider-next { right: 10px; }
.market-card-slider-prev:active,
.market-card-slider-next:active { background: rgba(0,0,0,0.55); }
.market-card-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  border: 1.5px solid #2563eb;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
}
.slider-dot.active {
  background: #2563eb;
  border-color: #2563eb;
}
/* ============================================
   HADLAY KALAN VILLAGE WEBSITE - STYLES
   Mobile-first iOS-style bottom nav design
   ============================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #059669;
  --secondary-light: #d1fae5;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --bg: #f0f4f8;
  --card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 70px;
  --header-height: 56px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Splash Screen ---- */
.splash-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #1a5276, #2563eb, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s, transform 0.5s;
}
.splash-screen.hide {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}
.splash-content {
  text-align: center;
  color: white;
}
.splash-icon {
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.15);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 48px;
  animation: pulse-glow 2s infinite;
}
.splash-content h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}
.splash-content p {
  font-size: 16px;
  opacity: 0.85;
}
.splash-loader {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin: 24px auto 0;
  overflow: hidden;
  position: relative;
}
.splash-loader::after {
  content: '';
  position: absolute;
  left: -40px;
  width: 40px;
  height: 100%;
  background: white;
  border-radius: 2px;
  animation: loader-slide 1s infinite;
}

@keyframes loader-slide {
  to { left: 80px; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255,255,255,0.2); }
  50% { box-shadow: 0 0 40px rgba(255,255,255,0.4); }
}

/* ---- Top Header ---- */
.top-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.92);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-logo {
  font-size: 24px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.header-title {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-right {
  display: flex;
  gap: 4px;
  align-items: center;
}
.visitor-counter-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--primary-light), #e0f2fe);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(37,99,235,0.15);
  white-space: nowrap;
  cursor: default;
}
.visitor-counter-badge i {
  font-size: 11px;
  opacity: 0.8;
}
.header-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg);
  border-radius: 12px;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}
.header-btn:active {
  transform: scale(0.9);
}

#langToggle {
  position: relative;
  gap: 4px;
  padding: 0 8px;
  width: auto;
  min-width: 50px;
}
#langToggle .lang-text {
  font-size: 11px;
  font-weight: 600;
  margin-left: 2px;
  color: var(--primary);
}
#langToggle:hover {
  background: var(--primary-light);
}
.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ---- Search Overlay ---- */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: white;
  z-index: 2000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.search-overlay.active {
  transform: translateY(0);
}
.search-bar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.search-bar i {
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
}
.search-results {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
}

/* ---- Main Content ---- */
.main-content {
  padding-top: var(--header-height);
  padding-bottom: 76px;
  min-height: 100vh;
}
.page {
  display: none;
  animation: fadeInUp 0.4s ease;
}
.page.active {
  display: block;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Hero Slider ---- */
.hero-slider {
  position: relative;
  width: calc(100% - 24px);
  height: 200px;
  overflow: hidden;
  background: #1e293b;
  margin: 0 12px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: #2563eb;
}
.placeholder-slide {
  background: linear-gradient(135deg, #1a5276, #2563eb);
}
.slide-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
}
.slide-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent);
  color: #000;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.slide-overlay h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2px;
}
.slide-overlay p {
  font-size: 13px;
  opacity: 0.85;
}
.slider-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.slider-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
}
.slider-dots .dot.active {
  width: 24px;
  border-radius: 4px;
  background: white;
}
/* .slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
} */
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.slider-arrow:active { transform: translateY(-50%) scale(0.9); }

/* ---- Section Card ---- */
.section-card {
  background: var(--card);
  margin: 12px;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.section-header h3 i {
  color: var(--primary);
}
.see-all-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

/* ---- Quick Actions ---- */
.quick-actions {
  margin-top: -20px;
  position: relative;
  z-index: 10;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
/* 8-icon grid: 4 columns x 2 rows */
.quick-grid-6 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.quick-item:active {
  transform: scale(0.92);
}
.quick-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.quick-item span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
}

/* ---- Weather Card ---- */
.weather-card {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}
.weather-card .section-header h3 {
  color: white;
}
.weather-card .section-header h3 i {
  color: white;
}
.weather-location {
  font-size: 13px;
  opacity: 0.85;
}
.weather-body {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
}
.weather-main {
  display: flex;
  align-items: center;
  gap: 16px;
}
.weather-temp {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}
.weather-temp sup {
  font-size: 20px;
  font-weight: 400;
}
.weather-icon {
  font-size: 52px;
  opacity: 0.9;
}
.weather-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  opacity: 0.9;
}
.weather-details span {
  display: flex; align-items: center; gap: 6px;
}
.weather-forecast {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 4px;
  scrollbar-width: none;
}
.weather-forecast::-webkit-scrollbar { display: none; }
.forecast-day {
  flex-shrink: 0;
  text-align: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  min-width: 70px;
  backdrop-filter: blur(4px);
}
.forecast-day .day { font-size: 11px; font-weight: 600; opacity: 0.8; }
.forecast-day .temp { font-size: 15px; font-weight: 700; margin: 4px 0; }
.forecast-day .icon { font-size: 20px; }
.weather-loading { display: flex; align-items: center; gap: 16px; }

/* ---- Notice Cards ---- */
.notice-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border-left: 4px solid var(--primary);
  position: relative;
  overflow: hidden;
}
.notice-card:active {
  transform: scale(0.98);
}
.notice-card.pinned {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-light), white);
}
.notice-card.emergency {
  border-left-color: var(--danger);
  background: linear-gradient(135deg, var(--danger-light), white);
}
.notice-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}
.notice-card h4 {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  line-height: 1.4;
}
.notice-pin {
  color: var(--accent);
  font-size: 14px;
}
.notice-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.notice-meta i { color: var(--primary); }
.notice-category {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.category-event { background: #e0f2fe; color: #0369a1; }
.category-meeting { background: #f3e8ff; color: #7c3aed; }
.category-announcement { background: #fef3c7; color: #b45309; }
.category-emergency { background: #fee2e2; color: #dc2626; }
.category-general { background: #e2e8f0; color: #475569; }
.notice-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.notice-share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  background: #25d366;
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.notice-share-btn:active { transform: scale(0.95); }
.notice-read-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: none;
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ---- Notice Detail Modal ---- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: white;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  float: right;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-right: 40px;
}
.notice-detail-title {
  font-size: 20px;
  font-weight: 800;
  margin: 10px 0;
  line-height: 1.4;
}
.notice-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}
.notice-detail-meta span { display: flex; align-items: center; gap: 4px; }
.notice-detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}
.notice-detail-image {
  width: 100%;
  border-radius: 12px;
  margin: 12px 0;
}
.notice-detail-share {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ---- Contact Search & Filter Bar ---- */
.contacts-filter-bar {
  padding: 0 16px;
  margin-bottom: 12px;
}
.contacts-search-box {
  position: relative;
  margin-bottom: 10px;
}
.contacts-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 14px;
}
.contacts-search-box input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  background: var(--card);
  transition: var(--transition);
  box-sizing: border-box;
}
.contacts-search-box input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.contacts-dropdown-filters {
  display: flex;
  gap: 8px;
}
.filter-select {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.filter-select:focus {
  border-color: var(--primary);
  outline: none;
}

/* ---- Beautiful Contact Cards ---- */
.contact-card {
  background: var(--card);
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
}
.contact-card:active {
  transform: scale(0.98);
}
.contact-card.important {
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, #fff9e6, #ffffff);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}
.contact-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 16px 10px;
}
.contact-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.contact-info {
  flex: 1;
  min-width: 0;
}
.contact-name {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  line-height: 1.3;
}
.contact-name .important-star { color: var(--accent); font-size: 13px; }
.contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.contact-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.contact-role-badge i {
  font-size: 10px;
}
.contact-area-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.contact-area-badge i {
  font-size: 10px;
}
.contact-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.contact-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(0,0,0,0.04);
  margin-top: 2px;
}
.contact-phone {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.contact-phone i {
  color: var(--primary);
  margin-right: 4px;
  font-size: 11px;
}
.contact-actions {
  display: flex;
  gap: 6px;
}
.contact-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 20px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}
.contact-action-btn:active { transform: scale(0.92); }
.contact-call {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--primary);
}
.contact-whatsapp {
  background: linear-gradient(135deg, #ecfdf5, #dcfce7);
  color: #25d366;
}

/* ---- FAB Button ---- */
.fab-button {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 24px;
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 100;
}
.fab-button:active { transform: scale(0.9); }

/* ---- Forms ---- */
.form-styles .form-group {
  margin-bottom: 16px;
}
.form-styles label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-styles input,
.form-styles select,
.form-styles textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.form-styles input:focus,
.form-styles select:focus,
.form-styles textarea:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px var(--primary-light);
}
.form-styles textarea {
  min-height: 80px;
  resize: vertical;
}
.form-styles input[type="file"] {
  padding: 10px;
}
.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(37,99,235,0.3);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.form-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
}

/* ---- Mandi Rates Table ---- */
.mandi-table {
  width: 100%;
  border-collapse: collapse;
}
.mandi-table th {
  background: var(--bg);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: left;
  position: sticky;
  top: 0;
}
.mandi-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.mandi-table tr:last-child td { border-bottom: none; }
.trend-up { color: var(--secondary); }
.trend-down { color: var(--danger); }
.trend-stable { color: var(--text-secondary); }
.trend-icon { margin-right: 4px; }

/* ---- Farmer Tips ---- */
.tip-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.tip-card:active { transform: scale(0.98); }
.tip-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tip-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}
.tip-icon.crop { background: linear-gradient(135deg, #22c55e, #16a34a); }
.tip-icon.weather { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.tip-icon.scheme { background: linear-gradient(135deg, #f59e0b, #d97706); }
.tip-icon.tips { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.tip-icon.market { background: linear-gradient(135deg, #ef4444, #dc2626); }
.tip-card h4 { font-size: 15px; font-weight: 700; }
.tip-category-label {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 600;
}
.tip-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.tip-image {
  width: 100%;
  border-radius: 10px;
  margin-top: 10px;
}

/* ---- Filter Pills ---- */
.filter-pills {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.pill:active { transform: scale(0.95); }

/* ---- Page Header Bar ---- */
.page-header-bar {
  padding: 16px;
  background: white;
  margin: 0;
}
.page-header-bar h2 {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-header-bar h2 i {
  color: var(--primary);
}

/* ---- Lists containers ---- */
.notices-list,
.contacts-list,
.tips-list,
.notices-preview,
.mandi-preview {
  padding: 0 12px 12px;
}
.notices-preview,
.mandi-preview {
  padding: 0;
}

/* ---- Village Stats ---- */
.village-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat-item {
  text-align: center;
  padding: 12px 6px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.stat-icon {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ---- Bottom Navigation — Full Width Bar ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255,255,255,0.97);
  display: flex;
  align-items: center;
  justify-content: stretch;
  z-index: 1000;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  gap: 0;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 6px 8px;
  min-width: 56px;
  height: 56px;
  border-radius: 14px;
  flex: 1;
}
.nav-icon {
  font-size: 19px;
  color: var(--text-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-label {
  font-size: 10px;
  margin-top: 2px;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.nav-label-light {
  color: rgba(255,255,255,0.9);
}
.nav-item.active {
  background: var(--primary-light);
}
.nav-item.active .nav-icon {
  color: var(--primary);
  transform: none;
}
.nav-item.active .nav-label {
  color: var(--primary);
  font-weight: 700;
}
.nav-item.active::before {
  display: none;
}
.nav-item:active {
  transform: scale(0.92);
}

/* ---- Shimmer Loading ---- */
.shimmer-box {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
.shimmer-card {
  height: 80px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 5000;
  transition: transform 0.3s ease;
  white-space: nowrap;
  max-width: 90%;
  text-align: center;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}
.empty-state i {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.empty-state h4 {
  font-size: 16px;
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 13px;
}

/* ---- Farmer Weather Extended ---- */
.farmer-weather-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.farmer-weather-item {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.farmer-weather-item i {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 6px;
}
.farmer-weather-item .value {
  font-size: 20px;
  font-weight: 700;
}
.farmer-weather-item .label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---- Responsive ---- */
@media (min-width: 768px) {
  .main-content {
    max-width: 500px;
    margin: 0 auto;
  }
  .bottom-nav {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
  }
  .top-header {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
  }
  .hero-slider {
    height: 280px;
  }
  .village-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .modal-content {
    border-radius: 20px;
    margin: auto;
  }
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--text-light); border-radius: 2px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- Animation Utilities ---- */
.animate-in {
  animation: fadeInUp 0.4s ease forwards;
}
.animate-scale {
  animation: scaleIn 0.3s ease forwards;
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================
   CONTEST / PHOTO BATTLE STYLES
   ============================================ */

/* --- Enter Contest Banner --- */
.contest-enter-card {
  overflow: hidden;
}
.contest-enter-banner {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(135deg, #8e44ad, #9b59b6, #6c3483);
  border-radius: var(--radius);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.contest-enter-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: contestShimmer 4s linear infinite;
}
@keyframes contestShimmer {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.contest-enter-icon {
  font-size: 46px;
  margin-bottom: 10px;
  animation: bounceIcon 2s infinite ease-in-out;
}
@keyframes bounceIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.contest-enter-banner h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.contest-enter-banner p {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 16px;
}
.contest-enter-btn {
  background: #fff !important;
  color: #8e44ad !important;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 15px;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}
.contest-enter-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* --- Contest Battle Card --- */
.contest-battle-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  animation: fadeInUp 0.5s ease forwards;
}
.contest-battle-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contest-battle-header h4 {
  font-size: 14px;
  font-weight: 600;
}
.contest-timer {
  font-size: 12px;
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.contest-timer i {
  font-size: 11px;
}

/* Battle Arena */
.contest-arena {
  display: flex;
  align-items: stretch;
  position: relative;
}
.contest-fighter {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
}
.contest-fighter:hover {
  background: var(--primary-light);
}
.contest-fighter.voted-for {
  background: linear-gradient(180deg, rgba(37,99,235,0.08) 0%, rgba(37,99,235,0.02) 100%);
}
.contest-vs-divider {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.contest-vs-divider::before {
  content: '';
  position: absolute;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: var(--border);
}
.vs-badge {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  z-index: 1;
  box-shadow: 0 2px 10px rgba(238,90,36,0.3);
  animation: vsPulse 2s infinite ease-in-out;
}
@keyframes vsPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* Fighter photo */
.fighter-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 8px;
  transition: var(--transition);
}
.contest-fighter:hover .fighter-photo {
  border-color: var(--primary);
  transform: scale(1.05);
}
.fighter-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}
.fighter-info {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Vote Button */
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}
.vote-btn-a {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}
.vote-btn-b {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: #fff;
}
.vote-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.vote-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}
.vote-btn .vote-count {
  background: rgba(255,255,255,0.25);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
}

/* Vote Animation */
@keyframes voteSuccess {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.vote-animate {
  animation: voteSuccess 0.6s ease;
}

/* Vote progress bar */
.vote-progress-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg);
  margin: 0;
}
.vote-progress-a {
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.vote-progress-b {
  background: linear-gradient(90deg, #f093fb, #f5576c);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Already voted indicator */
.voted-check {
  color: var(--secondary);
  font-size: 13px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* --- Waiting Card --- */
.contest-waiting-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  padding: 20px;
  text-align: center;
  border: 2px dashed var(--accent);
  animation: fadeInUp 0.5s ease forwards;
}
.waiting-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin-bottom: 10px;
}
.waiting-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}
.waiting-message {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.waiting-message i {
  animation: bounceIcon 1.5s infinite ease-in-out;
}
.waiting-challenge-btn {
  margin-top: 12px;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--accent), #e67e22);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}
.waiting-challenge-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}

/* --- Winner Card --- */
.contest-winner-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
  position: relative;
  animation: fadeInUp 0.5s ease forwards;
}
.winner-crown {
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 30px;
  z-index: 5;
  animation: crownBounce 2s infinite ease-in-out;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
@keyframes crownBounce {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-5deg); }
  50% { transform: translateX(-50%) translateY(-6px) rotate(5deg); }
}
.winner-header {
  background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
  color: #fff;
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.winner-header::before {
  content: '🎊';
  position: absolute;
  font-size: 60px;
  top: -10px;
  left: 10px;
  opacity: 0.2;
  animation: floatConfetti 3s infinite ease-in-out;
}
.winner-header::after {
  content: '🎉';
  position: absolute;
  font-size: 60px;
  bottom: -10px;
  right: 10px;
  opacity: 0.2;
  animation: floatConfetti 3s 1.5s infinite ease-in-out;
}
@keyframes floatConfetti {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(15deg); }
}
.winner-header h4 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.winner-body {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.winner-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffd200;
  box-shadow: 0 4px 20px rgba(247,151,30,0.3);
  animation: winnerGlow 2s infinite alternate ease-in-out;
}
@keyframes winnerGlow {
  from { box-shadow: 0 4px 20px rgba(247,151,30,0.3); }
  to { box-shadow: 0 4px 35px rgba(247,151,30,0.6); }
}
.winner-details {
  flex: 1;
}
.winner-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.winner-votes {
  font-size: 14px;
  color: var(--secondary);
  font-weight: 600;
  margin-top: 2px;
}
.winner-vs-info {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.winner-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ffd200, #f7971e);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}
.tie-header {
  background: linear-gradient(135deg, #636e72 0%, #b2bec3 100%) !important;
}

/* --- Photo Upload Area --- */
.contest-photo-upload {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}
.contest-photo-upload:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.contest-photo-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}
.upload-placeholder i {
  font-size: 36px;
  color: var(--primary);
}
.upload-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* Confetti canvas */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Stars burst on vote */
.vote-stars {
  position: absolute;
  pointer-events: none;
  z-index: 100;
}
.vote-star {
  position: absolute;
  font-size: 14px;
  animation: starBurst 0.8s ease-out forwards;
}
@keyframes starBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); }
}

/* Responsive fix for nav items — show labels */
.bottom-nav {
  display: flex;
}
.bottom-nav .nav-item {
  flex: 1 1 0;
  min-width: 0;
}
.bottom-nav .nav-item span {
  display: block;
}

/* ============================================
   CENTER FAB NAV BUTTON (Post)
   ============================================ */
.nav-center-fab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 6px 8px;
  min-width: 0;
  height: 56px;
  border-radius: 14px;
  background: none;
  margin: 0;
  box-shadow: none;
  flex: 1 1 0;
}
.nav-fab-icon {
  font-size: 19px;
  color: var(--text-light);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #764ba2);
  color: #fff;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-center-fab .nav-label-light {
  color: var(--text-light);
  font-size: 10px;
  margin-top: 2px;
  font-weight: 500;
}
.nav-center-fab:active {
  transform: scale(0.92);
}
.nav-center-fab:active .nav-fab-icon {
  transform: none;
}
.nav-center-fab.active {
  background: var(--primary-light);
  box-shadow: none;
}
.nav-center-fab.active .nav-fab-icon {
  background: linear-gradient(135deg, var(--primary-dark), #764ba2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.35);
}
.nav-center-fab.active .nav-label-light {
  color: var(--primary);
  font-weight: 700;
}
.nav-center-fab.active::before {
  display: none;
}

/* ============================================
   POSTS STYLES
   ============================================ */

/* ---- Post Card ---- */
.post-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 0;
  margin: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 0;
  justify-content: space-between;
}
.post-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-avatar span {
  font-size: 18px;
  font-weight: 700;
}
.post-author-info {
  flex: 1;
  min-width: 0;
}
.post-author-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.post-time {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-title {
  font-size: 16px;
  font-weight: 700;
  padding: 10px 16px 0;
  line-height: 1.4;
  color: var(--text);
}

/* Post Topic Badge */
.post-topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.post-topic-badge.topic-message {
  background: #dbeafe;
  color: #0369a1;
}
.post-topic-badge.topic-issue {
  background: #fed7aa;
  color: #9a3412;
}
.post-topic-badge.topic-good_work {
  background: #dcfce7;
  color: #166534;
}
.post-topic-badge.topic-announcement {
  background: #fef3c7;
  color: #b45309;
}
.post-topic-badge.topic-feedback {
  background: #f3e8ff;
  color: #7c3aed;
}
.post-topic-badge.topic-thanks {
  background: #fce7f3;
  color: #be185d;
}
.post-topic-badge.topic-other {
  background: #f3f4f6;
  color: #374151;
}

.post-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 6px 16px;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-see-more {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 16px 4px;
  font-family: inherit;
}
.post-see-more:hover {
  text-decoration: underline;
}
.post-actions {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}
.post-like-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: var(--transition);
  border-right: 1px solid var(--border);
}
.post-like-btn:active {
  transform: scale(0.95);
}
.post-like-btn.liked {
  color: #e74c3c;
}
.post-like-btn.liked i {
  color: #e74c3c;
}
.post-like-btn i {
  font-size: 16px;
}
@keyframes likeHeartBeat {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.like-animate i {
  animation: likeHeartBeat 0.6s ease;
  color: #e74c3c !important;
}
.post-share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: none;
  background: none;
  font-size: 14px;
  color: #25d366;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: var(--transition);
}
.post-share-btn:active {
  transform: scale(0.95);
}

/* ---- Facebook-style Post Image (full-width, prominent) ---- */
.post-image-fb {
  width: 100%;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
  line-height: 0;
}
.post-image-fb img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 520px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.post-image-fb img:hover {
  opacity: 0.95;
}

/* Legacy post-image-container kept for detail modal */
.post-image-container {
  width: 100%;
  margin: 8px 0 0;
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
  max-height: 500px;
}
.post-image-container img {
  width: 100%;
  display: block;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.post-image-container img:hover {
  transform: scale(1.02);
}

/* Post Edit Button */
.post-edit-btn {
  border: none;
  background: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.post-edit-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Post Image Upload Area (Form) */
.post-image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.post-image-upload-area:hover {
  border-color: var(--primary);
}
.post-image-upload-area .upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
  gap: 8px;
  color: var(--text-light);
}
.post-image-upload-area .upload-placeholder i {
  font-size: 28px;
  color: var(--primary);
}
.post-image-upload-area .upload-placeholder small {
  font-size: 11px;
  opacity: 0.7;
}
.post-image-crop-container {
  padding: 12px;
  text-align: center;
}
.post-image-crop-container canvas {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.crop-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.crop-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: var(--transition);
}
.crop-btn:hover { opacity: 0.9; }
.crop-btn.crop-remove {
  background: #e74c3c;
}

/* Visitor Registration */
.visitor-reg-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 16px;
}

/* Post Detail */
.post-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.post-detail-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.4;
}
.post-detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 16px;
}
.post-detail-actions {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Post FAB */
.post-fab {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  box-shadow: 0 6px 20px rgba(102,126,234,0.4) !important;
}

/* ---- Posts Slider on Homepage ---- */
.posts-slider-container {
  overflow: hidden;
  border-radius: var(--radius-sm);
  position: relative;
}
.posts-slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.post-slide {
  min-width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #f8f9ff, #f0f2ff);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}
.post-slide-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.post-slide-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.post-slide-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-slide-avatar span {
  font-size: 14px;
}
.post-slide-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.post-slide-time {
  font-size: 10px;
  color: var(--text-light);
}
.post-slide-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}
.post-slide-content {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-slide-more {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}
.post-slide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.post-slide-likes {
  font-size: 12px;
  color: #e74c3c;
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-slide-share {
  border: none;
  background: #25d366;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-slide-empty {
  text-align: center;
  padding: 30px 20px;
}

/* Contest Share Button */
.contest-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: #25d366;
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  margin-top: 8px;
}
.contest-share-btn:active {
  transform: scale(0.95);
}

/* ============================================
   GREETING CARD (Home Page Hero)
   ============================================ */
.greeting-card {
  position: relative;
  margin: 12px;
  padding: 22px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1a5276 0%, #2563eb 50%, #059669 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(37,99,235,0.25);
}
.greeting-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 20px;
}
.greeting-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  background: #fff;
}
.greeting-shape.shape-1 {
  width: 120px; height: 120px;
  top: -30px; right: -20px;
  animation: floatBubble 6s ease-in-out infinite;
}
.greeting-shape.shape-2 {
  width: 80px; height: 80px;
  bottom: -20px; left: 20px;
  animation: floatBubble 8s ease-in-out infinite reverse;
}
.greeting-shape.shape-3 {
  width: 50px; height: 50px;
  top: 50%; right: 30%;
  animation: floatBubble 5s ease-in-out infinite 1s;
}
@keyframes floatBubble {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.08); }
}
.greeting-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.greeting-text {
  flex: 1;
}
.greeting-label {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.greeting-title {
  font-size: 20px;
  font-weight: 800;
  margin: 4px 0 2px;
  line-height: 1.3;
}
.greeting-subtitle {
  font-size: 12px;
  opacity: 0.8;
  font-weight: 400;
}
.greeting-weather {
  text-align: center;
  flex-shrink: 0;
  margin-left: 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 12px 14px;
  backdrop-filter: blur(6px);
}
.greeting-temp {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.greeting-weather-icon {
  font-size: 24px;
  margin-top: 2px;
}

/* ============================================
   IMPROVED VILLAGE STATS 
   ============================================ */
.stat-icon-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin: 0 auto 8px;
  color: var(--ring-color, var(--primary));
  background: color-mix(in srgb, var(--ring-color, var(--primary)) 12%, transparent);
  border: 2px solid color-mix(in srgb, var(--ring-color, var(--primary)) 25%, transparent);
  transition: var(--transition);
}
.stat-item:hover .stat-icon-ring {
  transform: scale(1.1);
}

/* ============================================
   CONTACTS HOME CARD 
   ============================================ */
.contacts-home-card {
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
}
.contacts-home-card:active {
  transform: scale(0.98);
}
.contacts-home-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.contacts-home-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4ecdc4, #2ed573);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(46,213,115,0.25);
}
.contacts-home-text {
  flex: 1;
}
.contacts-home-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.contacts-home-text p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}
.contacts-home-arrow {
  color: var(--text-light);
  font-size: 14px;
}

/* Hero slider rounded corners */

/* ============================================
   WORKER BOOKING STYLES
   ============================================ */

/* ---- Worker Auth Bar ---- */
.worker-auth-bar {
  margin: 0 0 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.worker-auth-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.worker-auth-prompt i {
  font-size: 36px;
  color: var(--primary);
}
.worker-auth-prompt p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.worker-auth-btns {
  display: flex;
  gap: 10px;
}
.btn-worker-login, .btn-worker-register {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-worker-login {
  background: var(--primary);
  color: white;
}
.btn-worker-login:active {
  transform: scale(0.96);
}
.btn-worker-register {
  background: var(--primary-light);
  color: var(--primary);
}
.btn-worker-register:active {
  transform: scale(0.96);
}

/* Logged in state */
.worker-logged-in {
  display: flex;
  align-items: center;
}
.worker-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.worker-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.worker-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.worker-user-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.worker-user-phone {
  font-size: 12px;
  color: var(--text-secondary);
}
.btn-worker-logout {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--danger-light);
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-worker-logout:active {
  transform: scale(0.9);
}

/* ---- Worker Filters ---- */
.worker-filters {
  margin-bottom: 12px;
}

/* ---- Code Notification Slider ---- */
.worker-code-notification {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: calc(100% - 24px);
  max-width: 420px;
}
.worker-code-notification.show {
  top: 12px;
}
.code-notif-content {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1a5276, #2563eb);
  color: white;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.35);
  animation: pulse-border 2s ease-in-out infinite;
}
@keyframes pulse-border {
  0%, 100% { box-shadow: 0 8px 32px rgba(37, 99, 235, 0.35); }
  50% { box-shadow: 0 8px 40px rgba(37, 99, 235, 0.55); }
}
.code-notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.code-notif-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  opacity: 0.9;
}
.code-notif-code {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 6px;
  opacity: 1;
}
.code-notif-copy {
  padding: 8px 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: var(--transition);
}
.code-notif-copy:active {
  background: rgba(255,255,255,0.3);
  transform: scale(0.95);
}
.code-notif-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

/* ---- OTP Input Group ---- */
.otp-input-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 16px 0;
}
.otp-input {
  width: 56px;
  height: 60px;
  border: 2px solid var(--border);
  border-radius: 14px;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  background: var(--bg);
  outline: none;
  transition: var(--transition);
  caret-color: var(--primary);
}
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  background: white;
}

/* ---- Work Post Card ---- */
.work-post-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.work-post-card:active {
  transform: scale(0.99);
}

/* Poster info on top of card */
.work-post-poster-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.work-post-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.work-post-type-label {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.post-type-employer {
  background: #dbeafe;
  color: #1d4ed8;
}
.post-type-worker {
  background: #dcfce7;
  color: #16a34a;
}
.work-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.work-post-type-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.wt-farming { background: #ecfdf5; color: #059669; }
.wt-construction { background: #fef3c7; color: #d97706; }
.wt-cleaning { background: #f0f9ff; color: #0284c7; }
.wt-painting { background: #fdf2f8; color: #db2777; }
.wt-plumbing { background: #eff6ff; color: #2563eb; }
.wt-electrical { background: #fffbeb; color: #b45309; }
.wt-loading { background: #f5f3ff; color: #7c3aed; }
.wt-cooking { background: #fff7ed; color: #ea580c; }
.wt-gardening { background: #f0fdf4; color: #16a34a; }
.wt-other { background: #f8fafc; color: #475569; }

.work-post-time {
  font-size: 11px;
  color: var(--text-light);
}
.work-post-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.work-post-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.4;
}
.work-post-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.work-detail-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.work-detail-item i {
  color: var(--primary);
  font-size: 11px;
}
.work-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.work-poster-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.work-poster-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.work-poster-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: block;
}
.work-poster-village {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 3px;
}
.work-poster-village i {
  font-size: 9px;
  color: var(--text-light);
}
.btn-accept-work {
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.3);
}
.btn-accept-work:active {
  transform: scale(0.95);
}
.own-post-badge {
  font-size: 12px;
  color: var(--text-light);
  background: var(--bg);
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Hire Button ---- */
.btn-hire-work {
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}
.btn-hire-work:active {
  transform: scale(0.95);
}

/* ---- Section Tabs ---- */
.worker-section-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px;
  border: 1px solid var(--border);
}
.worker-section-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: calc(var(--radius) - 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}
.worker-section-tab.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow);
}
.worker-section-tab i {
  font-size: 12px;
}

/* ---- User Type Selector (Register) ---- */
.worker-type-selector {
  display: flex;
  gap: 10px;
}
.worker-type-option {
  flex: 1;
  cursor: pointer;
}
.worker-type-option input[type="radio"] {
  display: none;
}
.worker-type-card {
  text-align: center;
  padding: 14px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  background: var(--bg);
}
.worker-type-card i {
  display: block;
  font-size: 28px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.worker-type-card span {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}
.worker-type-card small {
  display: block;
  font-size: 11px;
  color: var(--text-light);
}
.worker-type-option input[type="radio"]:checked + .worker-type-card {
  border-color: var(--primary);
  background: var(--primary-light);
}
.worker-type-option input[type="radio"]:checked + .worker-type-card i {
  color: var(--primary);
}

/* ---- Photo Preview ---- */
.worker-photo-preview {
  margin-top: 8px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 120px;
}
.worker-photo-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
}

/* ---- Confirmation Modal ---- */
.worker-confirm-modal-content {
  text-align: center;
  max-width: 360px;
}
.worker-confirm-body {
  padding: 10px 0;
}
.worker-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.worker-confirm-icon i {
  font-size: 32px;
  color: #d97706;
}
.worker-confirm-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.worker-confirm-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.worker-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-confirm-yes {
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-confirm-yes:active {
  transform: scale(0.96);
}
.btn-confirm-no {
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.btn-confirm-no:active {
  transform: scale(0.96);
}

/* ---- Accepted Worker Info (with photo) ---- */
.accepted-worker-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.accepted-worker-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.accepted-worker-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.accepted-worker-info div small {
  display: block;
  font-size: 11px;
  color: var(--text-light);
}
.accepted-worker-info div small i {
  font-size: 10px;
  margin-right: 2px;
}

/* ---- Worker Rates Display ---- */
.worker-rates-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.worker-rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0369a1;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.worker-rate-pill small {
  font-weight: 500;
  font-size: 11px;
  opacity: 0.8;
}

/* ---- Worker Rates Form ---- */
.worker-rates-form-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 12px;
  color: #1e40af;
}
.worker-rates-form-info i {
  font-size: 14px;
  color: #3b82f6;
}
.form-third {
  flex: 1;
  min-width: 0;
}
.form-row {
  display: flex;
  gap: 10px;
}

/* ---- Worker Contact Avatar Img ---- */
.worker-contact-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--primary-light);
}

/* ---- Poster Top Avatar Image ---- */
.work-poster-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---- Accepted Worker Name/Area ---- */
.accepted-worker-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.accepted-worker-area {
  display: block;
  font-size: 11px;
  color: var(--text-light);
}
.accepted-worker-area i {
  font-size: 10px;
  margin-right: 2px;
}

/* ---- My Work Accepted Workers Header ---- */
.my-work-accepted-workers h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ---- My Work Posts ---- */
.worker-my-posts-section {
  margin-top: 12px;
}
.my-work-post-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
.my-work-post-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.my-work-post-top h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.my-work-status {
  font-size: 12px;
}
.btn-close-work {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: var(--danger-light);
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.btn-close-work:active {
  transform: scale(0.95);
}
.my-work-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.my-work-post-meta span {
  background: white;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.my-work-accepted-workers {
  margin-top: 8px;
  background: white;
  border-radius: 10px;
  padding: 10px;
}
.accepted-worker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}
.accepted-worker-row:last-child {
  border-bottom: none;
}
.accepted-worker-actions {
  display: flex;
  gap: 8px;
}
.btn-mini-call, .btn-mini-whatsapp {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition);
}
.btn-mini-call {
  background: var(--primary-light);
  color: var(--primary);
}
.btn-mini-whatsapp {
  background: #dcfce7;
  color: #16a34a;
}
.btn-mini-call:active, .btn-mini-whatsapp:active {
  transform: scale(0.9);
}

/* ---- Worker Contact Modal ---- */
.worker-contact-modal-content {
  text-align: center;
}
.worker-contact-info {
  padding: 10px 0;
}
.worker-contact-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
}
.worker-contact-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.worker-contact-info > p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.worker-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}
.worker-contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
.worker-contact-details h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.worker-contact-details span {
  font-size: 12px;
  color: var(--text-secondary);
}
.worker-contact-actions {
  display: flex;
  gap: 12px;
}
.worker-contact-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--transition);
}
.worker-contact-btn.call-btn {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}
.worker-contact-btn.whatsapp-btn {
  background: #25d366;
  color: white;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}
.worker-contact-btn:active {
  transform: scale(0.96);
}

/* ---- Form Row (2 columns) ---- */
.form-row {
  display: flex;
  gap: 12px;
}
.form-half {
  flex: 1;
}

/* ---- Worker FAB ---- */
.worker-fab {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #764ba2);
  color: white;
  border: none;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 100;
}
.worker-fab:active {
  transform: scale(0.9);
}

/* ---- Worker Posts List ---- */
.worker-posts-list {
  margin-bottom: 16px;
}
/* ---- Post Type Filter Tabs (for guests) ---- */
.worker-post-type-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 3px;
  border: 1px solid var(--border);
}
.worker-post-type-tab {
  flex: 1;
  padding: 9px 8px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: calc(var(--radius) - 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition);
  white-space: nowrap;
}
.worker-post-type-tab.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow);
}
.worker-post-type-tab i {
  font-size: 11px;
}

/* ===== Beautiful Work Post Card (wpc) ===== */
.wpc-card {
  background: var(--card);
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.wpc-card:active {
  transform: scale(0.985);
}

.wpc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px 10px;
  gap: 8px;
}
.wpc-poster {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wpc-poster .work-poster-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary-light);
}
.wpc-poster .work-poster-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.wpc-poster-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.wpc-poster-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wpc-poster-loc {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 3px;
}
.wpc-poster-loc i {
  font-size: 9px;
  color: var(--text-light);
}

.wpc-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.wpc-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.wpc-type-badge.post-type-employer {
  background: #dbeafe;
  color: #1d4ed8;
}
.wpc-type-badge.post-type-worker {
  background: #dcfce7;
  color: #16a34a;
}
.wpc-time {
  font-size: 10px;
  color: var(--text-light);
}

.wpc-body {
  padding: 0 16px 12px;
}
.wpc-work-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  background: #f1f5f9;
  color: #475569;
}
.wpc-work-tag.wt-buayi { background: #ecfdf5; color: #059669; }
.wpc-work-tag.wt-katai { background: #fef9c3; color: #a16207; }
.wpc-work-tag.wt-pani { background: #e0f2fe; color: #0369a1; }
.wpc-work-tag.wt-ropai { background: #ecfdf5; color: #059669; }
.wpc-work-tag.wt-nirdan { background: #fef3c7; color: #d97706; }
.wpc-work-tag.wt-khad { background: #f3e8ff; color: #7c3aed; }
.wpc-work-tag.wt-jate { background: #fef9c3; color: #a16207; }
.wpc-work-tag.wt-construction { background: #fef3c7; color: #d97706; }
.wpc-work-tag.wt-painting { background: #fdf2f8; color: #db2777; }
.wpc-work-tag.wt-plumbing { background: #eff6ff; color: #2563eb; }
.wpc-work-tag.wt-electrical { background: #fffbeb; color: #b45309; }
.wpc-work-tag.wt-cleaning { background: #f0f9ff; color: #0284c7; }
.wpc-work-tag.wt-loading { background: #f5f3ff; color: #7c3aed; }
.wpc-work-tag.wt-farming { background: #ecfdf5; color: #059669; }
.wpc-work-tag.wt-other { background: #f8fafc; color: #475569; }

.wpc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.35;
}
.wpc-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Rate Chips */
.wpc-rates-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.wpc-rate-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.wpc-rate-chip i {
  font-size: 11px;
}
.wpc-rate-chip strong {
  font-size: 14px;
}
.wpc-rate-chip span {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 500;
}
.wpc-rate-daily {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #15803d;
}
.wpc-rate-monthly {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
}
.wpc-rate-yearly {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
}

/* Payment Badge (employer posts) */
.wpc-payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.wpc-payment-badge i {
  font-size: 14px;
}
.wpc-payment-badge strong {
  font-size: 16px;
}
.wpc-payment-badge span {
  font-weight: 500;
  opacity: 0.8;
}

/* Details Row */
.wpc-details-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.wpc-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 8px;
}
.wpc-detail i {
  font-size: 11px;
  color: var(--primary);
}

/* Location */
.wpc-location {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.wpc-location i {
  font-size: 10px;
}

.wpc-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
}

/* Login prompt button */
.btn-login-prompt {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3) !important;
}

/* Animation */
.animate-in {
  animation: wpcSlideIn 0.3s ease-out both;
}
@keyframes wpcSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MARKET PAGE STYLES
   ============================================================ */

/* Market modals — centered (not bottom sheet) so keyboard doesn't hide them */
#marketLoginModal,
#marketRegisterModal,
#marketVerifyModal,
#marketInterestModal,
#marketContactModal {
  align-items: center;
  padding: 16px;
}
#marketLoginModal .modal-content,
#marketRegisterModal .modal-content,
#marketVerifyModal .modal-content,
#marketInterestModal .modal-content,
#marketContactModal .modal-content {
  border-radius: 20px;
  transform: scale(0.9) translateY(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
  max-height: 90vh;
  width: 100%;
}
#marketLoginModal.active .modal-content,
#marketRegisterModal.active .modal-content,
#marketVerifyModal.active .modal-content,
#marketInterestModal.active .modal-content,
#marketContactModal.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.market-page-header {
  background: linear-gradient(135deg, #11998e, #38ef7d);
  color: #fff;
  padding: 16px 16px 14px;
}
.market-page-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 2px;
}
.page-header-sub {
  font-size: 13px;
  opacity: 0.9;
  margin: 0;
  color: rgba(255,255,255,0.85);
}

/* Market Post Type Tabs */
.market-type-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 12px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.market-type-tabs::-webkit-scrollbar { display: none; }
.market-type-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 99px;
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  font-family: inherit;
}
.market-type-tab.active {
  border-color: #11998e;
  color: #11998e;
  background: #e8faf4;
}

/* Category pills */
.market-category-pills {
  padding: 4px 8px 8px;
}

/* Market Posts Grid */
.market-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 4px 12px 12px;
}

/* Market Post Card */
.market-post-card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.market-post-card:active {
  transform: scale(0.97);
}
.market-card-image-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  flex-shrink: 0;
  background: var(--bg);
  overflow: hidden;
}
.market-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.market-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
}
.market-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.market-type-badge.sell { background: #ff6b6b; color: #fff; }
.market-type-badge.buy  { background: #1a73e8; color: #fff; }
.market-img-count {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 20px;
}
.market-card-body {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.market-card-cat {
  font-size: 10px;
  font-weight: 600;
  color: #11998e;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.market-card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.market-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.market-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.market-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.market-price.free { color: #11998e; }
.market-price small { font-size: 9px; font-weight: 400; color: var(--text-secondary); }
.market-qty {
  font-size: 10px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}
.market-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  gap: 4px;
}
.market-poster-info {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  flex: 1;
}
.market-poster-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #11998e, #38ef7d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.market-poster-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70px;
}
.market-poster-loc {
  font-size: 9px;
  color: var(--text-light);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.market-time {
  font-size: 9px;
  color: var(--text-light);
  flex-shrink: 0;
}
.market-interest-btn {
  width: 100%;
  padding: 9px 0;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #11998e, #38ef7d);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  transition: var(--transition);
}
.market-interest-btn:active { transform: scale(0.96); }

/* Market form: post type selector */
.market-post-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.market-type-option { cursor: pointer; }
.market-type-option input { display: none; }
.market-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  transition: var(--transition);
  text-align: center;
}
.market-type-card i { font-size: 22px; color: var(--text-secondary); }
.market-type-card span { font-size: 13px; font-weight: 700; }
.market-type-card small { font-size: 11px; color: var(--text-secondary); }
.market-type-option input:checked + .market-type-card {
  border-color: #11998e;
  background: #e8faf4;
}
.market-type-option input:checked + .market-type-card i,
.market-type-option input:checked + .market-type-card span { color: #11998e; }

/* Market image upload */
.market-image-upload-area {
  border: 2px dashed #11998e;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  color: #11998e;
  background: #e8faf4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.market-image-upload-area i { font-size: 28px; }
.market-image-upload-area small { font-size: 11px; font-weight: 400; color: var(--text-secondary); }
.market-image-upload-area:active { background: #d1f5eb; }
.market-image-previews {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.market-img-preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
}
.market-img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.market-img-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-error {
  background: #fee2e2;
  color: #dc2626;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}

/* My market post card */
.market-my-post-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.market-my-post-row {
  display: flex;
  gap: 10px;
  padding: 12px;
  align-items: flex-start;
}
.market-my-post-img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
}
.market-my-post-img img { width: 100%; height: 100%; object-fit: cover; }
.market-my-post-info { flex: 1; min-width: 0; }
.market-my-post-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.market-my-post-meta { font-size: 11px; color: var(--text-secondary); margin-bottom: 2px; }
.market-my-post-price { font-size: 15px; font-weight: 800; color: var(--primary); }
.market-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}
.market-status.active { background: #d1fae5; color: #065f46; }
.market-status.sold   { background: #fef3c7; color: #92400e; }
.market-status.closed { background: #f1f5f9; color: #475569; }
.market-my-post-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.market-interested-list {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.market-interested-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Market FAB */
.market-fab {
  background: linear-gradient(135deg, #11998e, #38ef7d) !important;
  box-shadow: 0 6px 20px rgba(17,153,142,0.4) !important;
}

/* ============================================================
   HOME PAGE — IMPROVED GREETING CARD
   ============================================================ */
.greeting-card {
  background: linear-gradient(135deg, #1a5276 0%, #2563eb 50%, #059669 100%);
  margin: 0;
  padding: 20px 16px 28px;
  position: relative;
  overflow: hidden;
}
.greeting-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.greeting-text { flex: 1; }
.greeting-label {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.95);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  backdrop-filter: blur(4px);
}
.greeting-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.greeting-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin: 0;
}
.greeting-weather {
  text-align: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 10px 14px;
  flex-shrink: 0;
  margin-left: 12px;
}
.greeting-temp {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.greeting-weather-icon { font-size: 22px; margin-top: 2px; }
.greeting-bg-shapes { position: absolute; inset: 0; overflow: hidden; }
.greeting-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.shape-1 { width: 140px; height: 140px; top: -40px; right: -30px; }
.shape-2 { width: 80px; height: 80px; bottom: -20px; left: -20px; }
.shape-3 { width: 60px; height: 60px; top: 30px; left: 40%; }