/* Main Layout Architecture */
.app-container {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-page);
  width: 100%;
}

/* Full-Height Sticky Sidebar Navigation (Compact Sleek Theme) */
.sidebar {
  width: 215px;
  min-width: 215px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #063c22 0%, #0a4d2c 50%, #06331d 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px 12px;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 2px 0 16px rgba(6, 60, 34, 0.15);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 16px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 14px;
}

.brand-logo-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  padding: 3px;
}

.brand-wheat-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}

.brand-accent {
  color: #4ade80;
  font-weight: 800;
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 800;
  color: #86efac;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
  display: block;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-item.active {
  background: #ffffff;
  color: #064e3b;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

.nav-item.active .nav-icon {
  stroke: #064e3b;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

/* Red Grievance Module Navigation Styling */
.nav-item-grievance {
  color: #fca5a5 !important;
  background: rgba(220, 38, 38, 0.12) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.38) !important;
  margin-top: 6px !important;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
}

.nav-item-grievance .nav-icon {
  stroke: #ef4444 !important;
  filter: drop-shadow(0 1px 2px rgba(239, 68, 68, 0.4));
}

.nav-item-grievance:hover {
  background: rgba(220, 38, 38, 0.28) !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  transform: translateX(2px);
}

.nav-item-grievance.active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35) !important;
}

.nav-item-grievance.active .nav-icon {
  stroke: #ffffff !important;
}

.grv-badge-red {
  background: #dc2626;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.4);
}

.navbar-btn-grievance {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2;
  border: 1.5px solid #f87171;
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.navbar-btn-grievance:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25);
}

.navbar-btn-grievance:hover svg {
  stroke: #ffffff !important;
}

/* Sidebar Promotional Card */
.sidebar-promo-card {
  margin-top: 24px;
  background: linear-gradient(180deg, rgba(12, 90, 54, 0.9) 0%, rgba(6, 46, 27, 0.98) 100%),
              url('../assets/images/hero-field.jpg');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  padding: 14px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.promo-farmer-img {
  width: 100%;
  height: 115px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: block;
}

.promo-text {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.promo-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.promo-logo-mini {
  width: 20px;
  height: 20px;
}

.promo-subtext {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.15;
}

/* Main Content Wrapper */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  background: var(--bg-page);
}

/* Top Navbar (Spanning all the way to right side) */
.top-navbar {
  min-height: 62px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  gap: 16px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 580px;
  min-width: 0;
}

.navbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  flex: 1;
  min-width: 180px;
  transition: all 0.2s ease;
}

.navbar-search:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 90, 54, 0.12);
}

.navbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.86rem;
  color: var(--text-main);
  width: 100%;
}

.navbar-location-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0c5a36;
  background: #e8f5ed;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.navbar-btn-create {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.navbar-btn-create:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(12, 90, 54, 0.2);
  transform: translateY(-1px);
}

.btn-toggle-lite-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #15803d 0%, #0c5a36 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 2px solid #86efac;
  box-shadow: 0 4px 12px rgba(12, 90, 54, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-toggle-lite-mode:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(12, 90, 54, 0.35);
  filter: brightness(1.05);
}

.user-profile-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notif-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-default);
  transition: all 0.15s ease;
}

.notif-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
}

.profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.profile-widget:hover {
  background: #f1f5f9;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary-border);
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.profile-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.profile-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* Full-Width Dashboard Content Grid */
.dashboard-content {
  padding: 28px 36px 56px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 100%;
}

/* Hero Panoramic Banner (Full-Width) */
.hero-banner {
  background: linear-gradient(90deg, rgba(6, 46, 27, 0.95) 0%, rgba(12, 90, 54, 0.88) 40%, rgba(12, 90, 54, 0.35) 75%, transparent 100%),
              url('../assets/images/hero-field.jpg');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  padding: 28px 34px;
  color: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  width: 100%;
}

.hero-text-group {
  max-width: 100%;
  z-index: 2;
}

.hero-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  margin-bottom: 16px;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-location-change {
  color: #86efac;
  font-weight: 700;
  cursor: pointer;
  margin-left: 4px;
  text-decoration: underline;
}

.hero-slogan-badge {
  text-align: right;
  z-index: 2;
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fef08a;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  line-height: 1.25;
  padding-right: 15px;
}

/* Stat Cards Grid (4 Cards Spanning Full Width) */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

.stat-card {
  background: #ffffff;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.stat-card:hover::before {
  background: var(--primary);
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.stat-icon-wrapper.green {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.stat-icon-wrapper.blue {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.stat-icon-wrapper.purple {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.stat-icon-wrapper.orange {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
}

.stat-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.stat-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.stat-arrow-icon {
  width: 16px;
  height: 16px;
  color: var(--text-light);
  transition: var(--transition-fast);
}

.stat-card:hover .stat-arrow-icon {
  transform: translateX(3px);
  color: var(--primary);
}

/* Listings Table (Full Width Enterprise Design) */
.listings-table-container {
  overflow-x: auto;
  width: 100%;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

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

.data-table th {
  padding: 10px 8px;
  font-size: 0.74rem;
  font-weight: 800;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1.5px solid var(--border-default);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table td {
  padding: 10px 8px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  transition: background-color 0.15s ease;
  overflow: hidden;
}

.data-table th.col-crop,
.data-table td.col-crop {
  overflow: hidden;
}

.data-table th.col-grade,
.data-table td.col-grade {
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
}

.data-table th.col-qty,
.data-table td.col-qty {
  white-space: nowrap;
}

.data-table th.col-price,
.data-table td.col-price {
  white-space: nowrap;
}

.data-table th.col-buyer,
.data-table td.col-buyer {
  white-space: nowrap;
  text-overflow: ellipsis;
}

.data-table th.col-status,
.data-table td.col-status {
  text-align: center;
}

.data-table th.col-actions,
.data-table td.col-actions {
  text-align: right;
  white-space: nowrap;
}

.data-table tr:hover td {
  background-color: #f8fafc;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.crop-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.crop-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1.5px solid var(--border-default);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.crop-thumb:hover {
  transform: scale(1.05);
}

.crop-name {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-main);
  line-height: 1.25;
}

.price-main {
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.price-subtext {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Bottom Grid (Mandi + Forecast) */
.market-forecast-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  width: 100%;
}

/* Mandi Prices List */
.mandi-list {
  display: flex;
  flex-direction: column;
}

.mandi-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

.mandi-row:last-child {
  border-bottom: none;
}

.mandi-crop-name {
  font-weight: 700;
  color: var(--text-main);
}

.mandi-price {
  font-weight: 700;
  color: var(--text-main);
}

.mandi-trend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-weight: 700;
  font-size: 0.82rem;
}

.trend-up {
  color: #16a34a;
}

.trend-down {
  color: #dc2626;
}

.sparkline-svg {
  width: 75px;
  height: 26px;
  overflow: visible;
}

/* Price Forecast Card */
.forecast-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.forecast-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
}

.forecast-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.forecast-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-default);
}

.forecast-crop-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.forecast-duration {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.forecast-percentage {
  font-size: 1.35rem;
  font-weight: 800;
  color: #16a34a;
  text-align: right;
  line-height: 1.1;
}

.forecast-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.forecast-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  background: #f0fdf4;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #bbf7d0;
}

/* =========================================================================
   RESPONSIVE LAYOUT & MOBILE DRAWER RULES
   ========================================================================= */

/* Mobile Hamburger Toggle Button */
.mobile-sidebar-toggle {
  display: none;
  background: #e8f5ed;
  border: 1px solid #bbf7d0;
  color: #0c5a36;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.15s ease;
  margin-right: 8px;
}

.mobile-sidebar-toggle:hover {
  background: #bbf7d0;
  color: #064e3b;
}

/* Sidebar Backdrop Overlay on Mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  animation: backdropFadeIn 0.2s ease-out;
}

.sidebar-backdrop.active {
  display: block !important;
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1200px) {
  .stat-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .market-forecast-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet & Mobile Breakpoint (< 1024px) */
@media (max-width: 1024px) {
  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1100 !important;
    width: 270px !important;
    min-width: 270px !important;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25) !important;
    height: 100vh !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }
}

/* Mobile Screens (< 768px) */
@media (max-width: 768px) {
  .app-container {
    flex-direction: row;
  }

  .top-navbar {
    padding: 0 12px;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .navbar-left {
    max-width: 100%;
    flex: 1 1 auto;
    gap: 8px;
  }

  .navbar-search {
    padding: 6px 12px;
    min-width: 130px;
  }

  .navbar-right {
    gap: 6px !important;
    margin-left: auto;
  }

  .btn-toggle-lite-mode {
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
  }

  .btn-toggle-lite-mode span:last-child {
    display: none; /* Icon only on mobile */
  }

  .navbar-btn-create {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
  }

  .navbar-btn-create span {
    display: none; /* Icon only on small mobile */
  }

  .profile-widget .profile-info {
    display: none;
  }

  .profile-widget {
    padding: 2px !important;
  }

  .stat-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dashboard-content {
    padding: 14px;
  }

  .listings-grid,
  .fpo-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .seller-trust-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
  }

  .modal-card,
  .modal-box-lg {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 88vh !important;
    margin: 12px auto !important;
    border-radius: 12px !important;
  }
}

/* Extra Small Mobile (< 480px) */
@media (max-width: 480px) {
  .seller-trust-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ==========================================================================
   FARMER SIMPLE MODE (सरल शेतकरी मोड / सुलभ मोड) EXTENDED STYLES
   ========================================================================== */

/* Instant Zero-Delay Simple Mode Styles */
html.lite-mode-active body .sidebar,
body.lite-mode-active .sidebar,
html.lite-mode-active body .dashboard-content,
body.lite-mode-active .dashboard-content,
html.lite-mode-active body .seller-trust-bar,
body.lite-mode-active .seller-trust-bar,
html.lite-mode-active body .navbar-search,
body.lite-mode-active .navbar-search {
  display: none !important;
}

#lite-mode-container {
  display: none;
  width: 100%;
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

html.lite-mode-active body #lite-mode-container,
body.lite-mode-active #lite-mode-container {
  display: block !important;
}

html.lite-mode-active body #lite-floating-voice-mic,
body.lite-mode-active #lite-floating-voice-mic {
  display: flex !important;
}

/* Simple Mode Wrapper & Layout */
.lite-mode-wrapper {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
}

/* Font Scaler Variations */
.lite-mode-wrapper.lite-font-lg {
  font-size: 1.15rem;
}
.lite-mode-wrapper.lite-font-lg h2 { font-size: 1.85rem !important; }
.lite-mode-wrapper.lite-font-lg h3 { font-size: 1.45rem !important; }
.lite-mode-wrapper.lite-font-lg .lite-nav-tab { font-size: 1.15rem !important; padding: 18px 14px !important; }
.lite-mode-wrapper.lite-font-lg .lite-stepper-btn { font-size: 1.15rem !important; padding: 14px !important; }

.lite-mode-wrapper.lite-font-xl {
  font-size: 1.3rem;
}
.lite-mode-wrapper.lite-font-xl h2 { font-size: 2.1rem !important; }
.lite-mode-wrapper.lite-font-xl h3 { font-size: 1.65rem !important; }
.lite-mode-wrapper.lite-font-xl .lite-nav-tab { font-size: 1.3rem !important; padding: 20px 16px !important; }
.lite-mode-wrapper.lite-font-xl .lite-stepper-btn { font-size: 1.3rem !important; padding: 16px !important; }

/* Language & Accessibility Pills */
.lite-pill-btn {
  background: transparent;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.lite-pill-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.lite-pill-btn.active {
  background: #0c5a36 !important;
  color: #ffffff !important;
  border-color: #0c5a36 !important;
  box-shadow: 0 2px 6px rgba(12, 90, 54, 0.2);
}

/* Nav Tabs */
.lite-nav-tab {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.lite-nav-tab:hover {
  border-color: #86efac;
  background: #f0fdf4;
  transform: translateY(-2px);
}
.lite-nav-tab.active {
  background: linear-gradient(135deg, #0c5a36 0%, #064e3b 100%);
  color: #ffffff;
  border-color: #0c5a36;
  box-shadow: 0 6px 18px rgba(12, 90, 54, 0.3);
  transform: translateY(-2px);
}

/* Category Filter Pills */
.lite-cat-pill {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.lite-cat-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.lite-cat-pill.active {
  background: #0c5a36;
  color: #ffffff;
  border-color: #0c5a36;
  box-shadow: 0 3px 10px rgba(12, 90, 54, 0.25);
}

/* Audio Pulse Animation */
@keyframes audioPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(22, 163, 74, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.lite-audio-btn:hover {
  transform: scale(1.06);
}
.lite-audio-btn.speaking {
  animation: audioPulse 1.2s infinite ease-in-out;
  background: #16a34a !important;
  color: #ffffff !important;
}

/* Floating Voice Mic Widget */
.lite-floating-mic {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #0c5a36 0%, #15803d 100%);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  box-shadow: 0 12px 32px rgba(12, 90, 54, 0.45);
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.lite-floating-mic:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 38px rgba(12, 90, 54, 0.55);
}
.lite-floating-mic.listening {
  animation: audioPulse 1s infinite ease-in-out;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: #fef08a;
}

/* Visual Stepper Buttons */
.lite-stepper-btn {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  color: #0f172a;
  padding: 12px 8px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}
.lite-stepper-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: translateY(-1px);
}
.lite-stepper-btn:active {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}

/* Bargain Rate Buttons */
.lite-bargain-rate-btn {
  background: #f0f9ff;
  border: 2px solid #bae6fd;
  color: #0369a1;
  padding: 12px 8px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}
.lite-bargain-rate-btn:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
  transform: translateY(-1px);
}
.lite-bargain-rate-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* Crop Picker Buttons in 1-Tap Add Modal */
.lite-crop-pick-btn:hover {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
  transform: translateY(-2px);
}

/* Highway Milestone Progress Bar */
.lite-milestone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 16px 0 8px 0;
  padding: 0 10px;
}
.lite-milestone-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 30px;
  right: 30px;
  height: 4px;
  background: #e2e8f0;
  z-index: 1;
  transform: translateY(-50%);
}
.lite-milestone-progress {
  position: absolute;
  top: 50%;
  left: 30px;
  width: 55%;
  height: 4px;
  background: #16a34a;
  z-index: 2;
  transform: translateY(-50%);
}
.lite-milestone-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.lite-node-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #ffffff;
  border: 3px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.lite-node-icon.completed {
  border-color: #16a34a;
  background: #dcfce7;
}
.lite-node-icon.current {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
  animation: audioPulse 1.5s infinite;
}
.lite-node-text {
  font-size: 0.8rem;
  font-weight: 800;
  color: #475569;
  max-width: 90px;
}

/* 3-Step Visual Escrow Flow */
.lite-escrow-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 18px 0 0 0;
}
.lite-escrow-step {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px;
  position: relative;
  transition: all 0.2s;
}
.lite-escrow-step.active-step {
  background: #f0fdf4;
  border-color: #86efac;
}
.lite-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #0c5a36;
  color: #ffffff;
  font-weight: 900;
  font-size: 1rem;
  margin-bottom: 10px;
}

/* Mandi Sunlight High-Contrast Theme */
body.lite-sunlight-mode {
  background-color: #fefce8 !important;
}
body.lite-sunlight-mode .lite-mode-wrapper {
  color: #000000;
}
body.lite-sunlight-mode .lite-produce-card,
body.lite-sunlight-mode .lite-orders-card,
body.lite-sunlight-mode .lite-nav-tab,
body.lite-sunlight-mode .lite-modal-card {
  background: #ffffff !important;
  border: 3.5px solid #000000 !important;
  box-shadow: 0 6px 0 #000000 !important;
}
body.lite-sunlight-mode .lite-hero-card {
  background: #022c22 !important;
  border: 3.5px solid #000000 !important;
  box-shadow: 0 8px 0 #000000 !important;
}

/* ==========================================================================
   FARMER SIMPLE MODE - MARKET INSIGHTS & GRAPH STYLES
   ========================================================================== */
.insights-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) {
  .insights-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .insights-stats-grid {
    grid-template-columns: 1fr;
  }
}

.insight-stat-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.insight-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.stat-icon-square {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-green { background: #e8f5ed; color: #10b981; }
.stat-icon-purple { background: #f3e8ff; color: #a855f7; }
.stat-icon-orange { background: #ffedd5; color: #f97316; }
.stat-icon-blue { background: #e0f2fe; color: #0284c7; }

.graph-hero-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  margin-bottom: 22px;
}

.graph-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.unit-toggle-wrap {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 999px;
  gap: 4px;
}

.unit-toggle-btn {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.unit-toggle-btn.active {
  background: #064e3b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
}

.produce-chips-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px 2px;
  scrollbar-width: thin;
}

.produce-chip {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  user-select: none;
}
.produce-chip:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.produce-chip.active {
  border-color: #0c5a36;
  background: #f0fdf4;
  border-width: 2px;
  box-shadow: 0 4px 14px rgba(12, 90, 54, 0.12);
}

.produce-chip-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #cbd5e1;
}

.insights-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
@media (max-width: 900px) {
  .insights-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.insight-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
}

.card-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demand-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f8fafc;
}
.demand-thumb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}
.demand-track {
  background: #f1f5f9;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
}
.demand-fill {
  height: 100%;
  border-radius: 999px;
  background: #0c5a36;
}

.forecast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 14px;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.forecast-row:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.lite-sunlight-mode .graph-hero-card,
body.lite-sunlight-mode .insight-stat-card,
body.lite-sunlight-mode .insight-card {
  border: 3.5px solid #000000 !important;
  box-shadow: 0 6px 0 #000000 !important;
}
body.lite-sunlight-mode .produce-chip.active {
  border: 3.5px solid #000000 !important;
  background: #fef08a !important;
}

/* ==========================================================================
   AGRIFLEX KRISHI AI COPILOT SUITE STYLES
   ========================================================================== */

/* Floating AI Copilot Trigger Button */
.btn-floating-copilot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: linear-gradient(135deg, #0c5a36 0%, #166534 100%);
  color: #ffffff;
  border: 2px solid #86efac;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(12, 90, 54, 0.35);
  transition: all 0.22s ease-in-out;
}

.btn-floating-copilot:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px rgba(12, 90, 54, 0.45);
  background: linear-gradient(135deg, #084328 0%, #0f5132 100%);
}

html.lite-mode-active body .btn-floating-copilot,
body.lite-mode-active .btn-floating-copilot {
  display: none !important;
}

.copilot-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.copilot-chip:hover {
  background: #e8f5ed;
  border-color: #0c5a36;
  color: #0c5a36;
  transform: translateY(-1px);
}

.copilot-message-user {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.copilot-bubble-user {
  background: linear-gradient(135deg, #0c5a36 0%, #166534 100%);
  color: #ffffff;
  border-radius: 16px 16px 2px 16px;
  padding: 10px 16px;
  max-width: 82%;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(12, 90, 54, 0.15);
  font-weight: 600;
}

.copilot-message-ai {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 16px;
  width: 100%;
}

.copilot-card-ai {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  width: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.btn-mic-record {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0c5a36;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.btn-mic-record:hover {
  background: #f0fdf4;
  border-color: #86efac;
}

.btn-mic-record.recording {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  animation: micPulse 1.2s infinite;
}

@keyframes micPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   FARMER MESSAGING & BUYER NEGOTIATION ROOM STYLES
   ========================================================================== */

.chat-hero-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.chat-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  height: 720px;
  max-height: calc(100vh - 200px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.chat-sidebar {
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-sidebar-header {
  padding: 16px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.chat-search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 0.82rem;
  outline: none;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2364748b' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat 12px center;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.chat-search-input:focus {
  border-color: #0c5a36;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(12, 90, 54, 0.1);
}

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

.chat-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  background: #ffffff;
}

.chat-contact:hover {
  background: #f8fafc;
}

.chat-contact.active {
  background: linear-gradient(135deg, #f0fdf4 0%, #e8f5ed 100%);
  border-left: 4px solid #0c5a36;
}

.avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.avatar-online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}

.chat-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
}

.chat-header {
  padding: 14px 22px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  flex-shrink: 0;
}

.chat-offer-banner {
  background: linear-gradient(135deg, #fffbe6 0%, #fef3c7 100%);
  border-bottom: 1px solid #fde047;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.83rem;
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.02);
  flex-wrap: wrap;
  gap: 10px;
}

.chat-messages {
  padding: 22px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}

.chat-bubble-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 80%;
  animation: fadeInBubble 0.2s ease-out;
}

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

.chat-bubble-group.incoming {
  align-self: flex-start;
}

.chat-bubble-group.outgoing {
  align-self: flex-end;
}

.chat-bubble {
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}

.chat-bubble.incoming {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px 18px 18px 4px;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.chat-bubble.outgoing {
  background: linear-gradient(135deg, #0c5a36 0%, #064e3b 100%);
  color: #ffffff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 4px 12px rgba(12, 90, 54, 0.2);
}

.chat-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  margin-top: 6px;
  transition: all 0.15s ease;
}

.chat-audio-btn:hover {
  background: #dcfce7;
}

.chat-meta-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  margin-top: 2px;
  padding: 0 4px;
}

.chat-meta-bar.incoming {
  color: #94a3b8;
  justify-content: flex-start;
}

.chat-meta-bar.outgoing {
  color: #94a3b8;
  justify-content: flex-end;
}

.chat-quick-chips-bar {
  padding: 10px 18px;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-quick-chips-bar::-webkit-scrollbar {
  display: none;
}

.chat-quick-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.chat-quick-chip:hover {
  background: #e8f5ed;
  border-color: #0c5a36;
  color: #0c5a36;
  transform: translateY(-1px);
}

.chat-input-bar {
  padding: 12px 18px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
}

.chat-input-field-pill {
  flex: 1;
  padding: 11px 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-input-field-pill:focus {
  border-color: #0c5a36;
  box-shadow: 0 0 0 3.5px rgba(12, 90, 54, 0.12);
}

.chat-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.chat-icon-btn:hover {
  background: #e8f5ed;
  color: #0c5a36;
  border-color: #86efac;
}

.chat-icon-btn.recording {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  animation: micPulse 1.2s infinite;
}

.chat-send-btn-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0c5a36 0%, #064e3b 100%);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(12, 90, 54, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}

.chat-send-btn-circle:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(12, 90, 54, 0.4);
}

.pulse-live-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (max-width: 900px) {
  .chat-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .chat-sidebar {
    max-height: 280px;
  }
}
