/* Farrmer / KrishiConnect Design System & Stylesheet */

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

/* Color Variables and Tokens */
:root {
  --primary: #059669;        /* Emerald Green */
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --accent: #d97706;         /* Golden Amber */
  --accent-hover: #b45309;
  --accent-light: #fef3c7;
  
  --dark: #0f172a;           /* Slate 900 */
  --text-main: #334155;      /* Slate 700 */
  --text-muted: #64748b;     /* Slate 500 */
  --light: #f8fafc;          /* Slate 50 */
  --border-color: #e2e8f0;   /* Slate 200 */
  --white: #ffffff;
  
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 8px -1px rgba(15, 23, 42, 0.04);
  --hover-shadow: 0 20px 25px -5px rgba(5, 150, 105, 0.1), 0 10px 10px -5px rgba(5, 150, 105, 0.04);
  --modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-en: 'Outfit', sans-serif;
  --font-bn: 'Hind Siliguri', 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-bn);
  color: var(--text-main);
  background-color: var(--light);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  font-weight: 700;
  line-height: 1.25;
}

/* Utility Layouts */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2.5rem; }
.mt-3 { margin-top: 1rem; }
.ml-4 { margin-left: 1.5rem; }
.mr-2 { margin-right: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }
.rounded { border-radius: var(--radius-md); }
.rounded-circle { border-radius: 50%; }
.bg-white { background-color: var(--white); }
.bg-light { background-color: var(--light); }
.bg-dark { background-color: var(--dark); }
.text-white { color: var(--white); }
.text-dark { color: var(--dark); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-bold-2xl { font-weight: 700; font-size: 1.5rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.lead { font-size: 1.15rem; }
.block { display: block; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-center { justify-content: center; }
.justify-start { justify-content: start; }
.justify-end { justify-content: end; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.position-relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }
.card-shadow { box-shadow: var(--card-shadow); }
.cursor-pointer { cursor: pointer; }
.hover-bg-light:hover { background-color: var(--light); }

.grid-1 { display: grid; grid-template-columns: 1fr; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }

.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.border-right { border-right: 1px solid var(--border-color); }
.border { border: 1px solid var(--border-color); }
.border-left-green { border-left: 4px solid var(--primary); }
.border-left-amber { border-left: 4px solid var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.95rem;
}
.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}
.btn-accent {
  background-color: var(--accent);
  color: var(--white);
}
.btn-accent:hover {
  background-color: var(--accent-hover);
}
.btn-outline {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}
.btn-outline-danger {
  background-color: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-outline-danger:hover {
  background-color: var(--danger);
  color: var(--white);
}
.btn-outline-white {
  background-color: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.75rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; display: flex; }
.btn-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
}
.btn-clear:hover { color: var(--primary); }

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--dark);
}
.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--white);
  color: var(--dark);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}
.form-control-sm { padding: 0.4rem 0.6rem; font-size: 0.85rem; }

/* Custom Badge System */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}
.badge-organic {
  background-color: #d1fae5;
  color: #065f46;
}
.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}
.badge-light {
  background-color: var(--light);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}
.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}
.badge-notif {
  background-color: var(--danger);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.65rem;
  width: 16px;
  height: 16px;
  padding: 0;
  justify-content: center;
  position: absolute;
  top: 5px;
  right: -5px;
}

/* Order Status Badges */
.badge-status-pending { background-color: #fef3c7; color: #92400e; }
.badge-status-accepted { background-color: #e0f2fe; color: #0369a1; }
.badge-status-in_progress { background-color: #fae8ff; color: #86198f; }
.badge-status-ready { background-color: #ecfdf5; color: #047857; }
.badge-status-delivered { background-color: #e0f2fe; color: #0369a1; }
.badge-status-completed { background-color: #d1fae5; color: #065f46; }
.badge-status-cancelled { background-color: #fee2e2; color: #991b1b; }

/* Header & Navigation */
.header-wrapper {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 70px;
  display: flex;
  align-items: center;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-img {
  height: 38px;
  width: 38px;
  object-fit: cover;
  border-radius: 8px;
}
.logo-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.nav-search-bar {
  display: flex;
  max-width: 400px;
  width: 100%;
  position: relative;
}
.nav-search-bar .search-input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.875rem;
  background-color: var(--light);
}
.search-submit-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
  position: relative;
}
.nav-link:hover {
  color: var(--primary);
}
.lang-switch-btn {
  background: none;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.35rem 0.75rem;
  border-radius: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}
.lang-switch-btn:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* User profile Dropdown menu */
.user-profile-menu {
  position: relative;
  cursor: pointer;
}
.user-info-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}
.user-text-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dark);
}
.user-balance {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}
.profile-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 40px;
  background-color: var(--white);
  min-width: 200px;
  box-shadow: var(--modal-shadow);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 10px 0;
  z-index: 110;
}
.user-profile-menu:hover .profile-dropdown-content {
  display: block;
}
.dropdown-header {
  padding: 8px 16px;
  font-size: 0.85rem;
}
.dropdown-header strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.role-badge {
  display: inline-block;
  font-size: 0.7rem;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 3px;
}
.dropdown-item {
  width: 100%;
  background: none;
  border: none;
  padding: 8px 16px;
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
}
.dropdown-item:hover {
  background-color: var(--light);
  color: var(--primary);
}
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 5px 0;
}

/* Footer Section */
.footer-wrapper {
  background-color: var(--dark);
  color: #94a3b8;
  padding-top: 4rem;
  padding-bottom: 2rem;
  border-top: 4px solid var(--primary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
}
.footer-desc {
  margin-top: 15px;
  line-height: 1.6;
}
.footer-title {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: #94a3b8;
}
.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}
.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #1e293b;
  color: var(--white);
}
.social-icons a:hover {
  background-color: var(--primary);
}
.footer-divider {
  border-color: #1e293b;
  margin: 40px 0 20px 0;
}
.footer-copy {
  text-align: center;
  font-size: 0.85rem;
}

/* Hero Section */
.hero-section {
  background-size: cover;
  background-position: center;
  padding: 7rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}
.hero-content {
  color: var(--white);
}
.hero-title-main {
  font-size: 3rem;
  color: var(--white);
  margin-bottom: 15px;
  letter-spacing: -1px;
}
.hero-subtitle-sub {
  font-size: 1.25rem;
  color: #cbd5e1;
  max-width: 700px;
  margin: 0 auto 30px auto;
}
.hero-search-wrapper {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--white);
  padding: 6px;
  border-radius: 40px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}
.hero-search-input {
  flex-grow: 1;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  outline: none;
  border-radius: 40px;
  font-family: inherit;
}
.hero-search-btn {
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 1rem;
}

/* Categories Section */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}
.category-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 10px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--card-shadow);
}
.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--hover-shadow);
}
.category-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}
.category-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
}

/* Gig Card Styles */
.gigs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.gig-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
}
.gig-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary-light);
}
.gig-img-container {
  height: 180px;
  position: relative;
  overflow: hidden;
}
.gig-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.gig-card:hover .gig-img {
  transform: scale(1.05);
}
.badge-organic {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
}
.gig-body {
  padding: 18px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.farmer-summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.farmer-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}
.farmer-details-mini {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.farmer-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 4px;
}
.farmer-name i {
  font-size: 0.75rem;
}
.farmer-loc {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.gig-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 12px;
  height: 44px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.gig-card:hover .gig-title {
  color: var(--primary);
}
.gig-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}
.gig-rating {
  font-weight: 700;
  color: var(--dark);
}
.card-divider {
  border-color: var(--border-color);
  margin: auto 0 12px 0;
}
.gig-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gig-stock {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.gig-price-tag {
  text-align: right;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.price-prefix {
  font-size: 0.65rem;
  color: var(--text-muted);
}
.price-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

/* Explore Page layout */
.explore-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  align-items: start;
}
.explore-sidebar {
  border: 1px solid var(--border-color);
  position: sticky;
  top: 90px;
}
.filter-title-main {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-group-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  margin-bottom: 8px;
  cursor: pointer;
  color: var(--text-main);
}
.filter-option input {
  cursor: pointer;
}
.filter-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--dark);
}

/* Gig Details Page */
.details-layout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  align-items: start;
}
.gig-detail-title {
  font-size: 1.85rem;
}
.farmer-avatar-md {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
}
.gig-gallery-main-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}
.gig-full-description {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Farmer Profile Detailed Card */
.farmer-profile-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: start;
}
.farmer-profile-avatar {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}
.farmer-facts-row {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

/* Order Panel Sidebar */
.order-checkout-card {
  border: 1px solid var(--border-color);
  position: sticky;
  top: 90px;
}
.order-price-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qty-spinner-input {
  display: inline-flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  background-color: var(--light);
  border: none;
  padding: 5px 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}
.qty-btn:hover { background-color: var(--border-color); }
.qty-val-input {
  width: 60px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-weight: bold;
}
.qty-val-input:focus { outline: none; }
.delivery-badge {
  background-color: var(--light);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Checkout payment selections */
.payment-method-box {
  cursor: pointer;
  transition: var(--transition);
}
.payment-method-box.active, .payment-method-box:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

/* bKash Custom simulated Gateway Modal */
.bkash-checkout-container {
  max-width: 360px;
  width: 95%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--modal-shadow);
  animation: slideIn 0.3s ease-out;
}
.bkash-header {
  background-color: var(--white);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e2136e;
}
.bkash-logo {
  height: 38px;
}
.bkash-close-btn {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}
.bg-bkash-purple {
  background-color: #e2136e; /* Official bKash logo crimson */
}
.text-bkash-pink {
  color: #fce7f3;
}
.bkash-field {
  background-color: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  border: none;
}
.form-label-white {
  color: var(--white);
}
.btn-bkash {
  background-color: #ffffff;
  color: #e2136e;
}
.btn-bkash:hover {
  background-color: #f3f4f6;
}

/* Metrics stats boxes */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.metric-card {
  display: flex;
  align-items: center;
  gap: 20px;
}
.metric-icon {
  font-size: 2.2rem;
  background-color: var(--light);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.metric-meta {
  display: flex;
  flex-direction: column;
}
.metric-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Table styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.table th, .table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}
.table th {
  background-color: var(--light);
  color: var(--dark);
  font-weight: 700;
}
.table-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

/* Escrow Timeline / Trackers */
.timeline-wrapper {
  margin: 20px 0;
}
.timeline-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 600px;
  position: relative;
  padding: 10px 0;
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}
.timeline-node {
  width: 32px;
  height: 32px;
  background-color: var(--border-color);
  color: var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
}
.timeline-node.active {
  background-color: var(--primary);
  color: var(--white);
}
.timeline-node.current {
  background-color: var(--accent);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.3);
}
.timeline-label {
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 8px;
  color: var(--text-muted);
  white-space: nowrap;
}
.timeline-label.active {
  color: var(--dark);
}
.timeline-line {
  flex-grow: 1;
  height: 3px;
  background-color: var(--border-color);
  position: relative;
  top: -8px;
  z-index: 1;
}

/* Modals Framework */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.auth-modal-content, .order-details-content, .create-gig-content, .review-modal-content {
  background-color: var(--white);
  width: 95%;
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-modal-content { max-width: 420px; }
.max-width-md { max-width: 680px; }
.max-width-sm { max-width: 480px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.auth-modal-header, .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-tabs {
  display: flex;
}
.auth-tab-btn {
  background: none;
  border: none;
  padding: 15px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.auth-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.close-btn {
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 15px;
}
.close-btn:hover { color: var(--danger); }

/* Chat Center Layout */
.inbox-sidebar {
  border-right: 1px solid var(--border-color);
}
.inbox-thread-item {
  transition: var(--transition);
}
.inbox-thread-item:hover {
  background-color: var(--light);
}
.inbox-thread-item.active {
  background-color: var(--primary-light);
  border-left: 4px solid var(--primary);
}
.chat-messages-area {
  flex-grow: 1;
}
.message-bubble {
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.msg-sender {
  border-bottom-right-radius: 2px;
}
.msg-receiver {
  border-bottom-left-radius: 2px;
  border: 1px solid var(--border-color);
}
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Toast Notifications Container */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
}
.toast-banner {
  background-color: var(--white);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 15px;
  width: 320px;
  position: relative;
}
.toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.toast-title {
  color: var(--dark);
}
.toast-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}
.toast-close:hover { color: var(--danger); }

/* Animations */
@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }
.animate-slide-in { animation: slideIn 0.3s ease-out forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

.animate-pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

/* Hide helper */
.d-none { display: none !important; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .details-layout-grid {
    grid-template-columns: 1fr;
  }
  .order-checkout-card {
    position: relative;
    top: 0;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .explore-layout-grid {
    grid-template-columns: 1fr;
  }
  .explore-sidebar {
    position: relative;
    top: 0;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .inbox-layout-grid {
    flex-direction: column;
    height: auto !important;
  }
  .inbox-sidebar {
    width: 100% !important;
    height: 180px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-menu {
    gap: 10px;
  }
  .logo-title {
    font-size: 1.1rem;
  }
  .nav-search-bar {
    display: none; /* Hide top search bar on small viewports, let users search from explorer */
  }
  .hero-title-main {
    font-size: 2.2rem;
  }
  .hero-subtitle-sub {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .farmer-profile-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}
