:root {
  --primary-color: #5a7c2b; /* Deep Olive Green */
  --primary-hover: #4a6723;
  --secondary-color: #d4a017; /* Warm earthy yellow */
  --secondary-hover: #b88a14;
  --bg-color: #faf6eb; /* Soft warm cream */
  --text-dark: #2d3a1f; /* Dark olive for text */
  --text-muted: #657059;
  --white: #ffffff;
  --card-shadow: 0 10px 40px rgba(90, 124, 43, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px rgba(90, 124, 43, 0.1);
  --sidebar-width: 280px;
  --border-radius: 24px;
}

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

body {
  font-family: "Outfit", sans-serif;
  background: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Utilities */
.primary-btn {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 16px;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(90, 124, 43, 0.2);
}
.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.secondary-btn {
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 16px;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(212, 160, 23, 0.2);
}
.secondary-btn:hover {
  background: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}
.small-btn {
  padding: 8px 16px;
  font-size: 13px;
}
.full-width {
  width: 100%;
}

.lang-btn {
  background: var(--glass-bg);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 14px;
}
.lang-btn:hover {
  background: var(--primary-color);
  color: white;
}

.badge {
  background: #e53e3e;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  position: absolute;
  top: -5px;
  right: -5px;
}

/* Typography */
.small-title {
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
}
.section-heading {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
}
.section-heading p {
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}
.section-heading h2 {
  font-size: 36px;
  margin-top: 8px;
  font-weight: 700;
  color: var(--text-dark);
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--glass-shadow);
}

/* Navbar */
.glass-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 15px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-dark);
}
.logo span {
  color: var(--primary-color);
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-dark);
}
.nav-links {
  display: flex;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  margin: 0 20px;
  font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--primary-color);
}
.nav-btn {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.3s;
}
.nav-btn:hover {
  background: var(--primary-hover);
}
.logout-nav-btn {
  background: #ef4444;
  margin-right: 10px;
  font-family: inherit;
  border: none;
  cursor: pointer;
}
.logout-nav-btn:hover {
  background: #dc2626;
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 10%;
  background: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat;
  position: relative;
  gap: 40px;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(250, 246, 235, 1) 0%, rgba(250, 246, 235, 0.7) 30%, rgba(250, 246, 235, 0) 100%);
  z-index: 0;
}
.hero-content {
  flex: 1;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 64px;
  line-height: 1.1;
  margin: 15px 0 25px;
  color: var(--text-dark);
  font-weight: 800;
}
.hero h1 span {
  color: var(--primary-color);
}
.hero p {
  font-size: 18px;
  color: var(--text-dark);
  font-weight: 500;
  max-width: 500px;
  margin-bottom: 35px;
}
.hero-buttons {
  display: flex;
  gap: 15px;
}

.dynamic-hero-card {
  flex: 0.8;
  padding: 40px;
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
.hot-crop-header {
  color: #d97706;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.crop-title-large {
  font-size: 32px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress-bar-container {
  background: #eee;
  height: 8px;
  border-radius: 4px;
  margin: 8px 0 20px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #10b981);
  border-radius: 4px;
}
.price-tag {
  font-size: 24px;
  color: var(--primary-color);
  font-weight: 700;
  margin-top: 10px;
}
.trending-up {
  color: #10b981;
  font-weight: 500;
  margin-top: 15px;
  display: inline-block;
  background: #ecfdf5;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  padding: 40px 10%;
  text-align: center;
}
.stats h2 {
  font-size: 36px;
  margin-bottom: 5px;
}
.stats p {
  font-size: 14px;
  opacity: 0.9;
}

/* How it works */
.how {
  padding: 80px 10%;
  background: white;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.step {
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  background: var(--bg-color);
  transition: transform 0.3s;
}
.step:hover {
  transform: translateY(-5px);
}
.step span {
  position: absolute;
  top: 15px;
  left: 20px;
  font-weight: 700;
  color: var(--primary-color);
  opacity: 0.5;
  font-size: 18px;
}
.step-icon {
  font-size: 40px;
  margin: 15px 0;
}
.step p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Login Page */
.login-body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
  padding: 20px;
}
.login-container {
  display: flex;
  background: white;
  width: 100%;
  max-width: 1000px;
  min-height: 600px;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.1);
  overflow: hidden;
}
.login-left {
  flex: 1;
  background: url('https://images.unsplash.com/photo-1589923188900-85dae523342b?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat;
  color: white;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(90, 124, 43, 0.85) 0%, rgba(90, 124, 43, 0.6) 100%);
  z-index: 0;
}
@keyframes rotate {
  100% { transform: rotate(360deg); }
}

/* News & Market Updates */
.news-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  border-left: 5px solid var(--primary-color);
  transition: transform 0.3s ease;
}
.news-card:hover {
  transform: translateY(-5px);
}
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.news-title {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 15px;
  font-weight: 700;
}
.news-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
  background: var(--bg-color);
  padding: 15px;
  border-radius: 12px;
}
.meta-item {
  display: flex;
  flex-direction: column;
}
.meta-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.meta-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}
.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }
.news-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 15px;
}
.news-alert {
  border-left-color: #f59e0b;
}
.news-weather {
  border-left-color: #3b82f6;
}
.login-branding {
  position: relative;
  z-index: 1;
}
.login-branding .logo {
  color: white;
  margin-bottom: 20px;
  display: inline-block;
}
.login-branding .logo span {
  color: #a7f3d0;
}
.login-branding h2 {
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 15px;
}
.login-branding p {
  opacity: 0.8;
}
.glass-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 20px;
  border-radius: 15px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}
.glass-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.login-right {
  flex: 1;
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  width: 100%;
  max-width: 380px;
}
.login-box h2 {
  font-size: 28px;
}
.login-subtitle {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 14px;
}
.role-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}
.role-option {
  flex: 1;
  cursor: pointer;
}
.role-option input {
  display: none;
}
.role-card {
  border: 2px solid #eee;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.role-option input:checked + .role-card {
  border-color: var(--primary-color);
  background: #f0fdf4;
  color: var(--primary-color);
}
.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
}
.input-group input, .input-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
}
.input-group input:focus, .input-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}
.password-wrapper {
  position: relative;
}
.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
}
.login-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 25px;
}
.forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}
.demo-login {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
}
.demo-login p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.demo-login button {
  margin: 0 5px;
}
.signup-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.signup-link a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

/* Dashboard Layout */
.dashboard-body {
  background: var(--bg-color);
  height: 100vh;
  overflow: hidden;
}
.dashboard-layout {
  display: flex;
  height: 100%;
}
.sidebar {
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
}
.user-profile {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #eee;
}
.avatar {
  width: 45px;
  height: 45px;
  background: #e8f5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.user-info h4 {
  font-size: 15px;
  color: var(--text-dark);
}
.user-info p {
  font-size: 12px;
  color: var(--primary-color);
  background: #f0fdf4;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 2px;
}
.sidebar-nav {
  padding: 20px 15px;
  flex: 1;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 5px;
}
.nav-item:hover, .nav-item.active {
  background: #f0fdf4;
  color: var(--primary-color);
}
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid #eee;
}
.logout-btn {
  width: 100%;
  padding: 10px;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.logout-btn:hover {
  background: #fca5a5;
}

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dashboard-header {
  height: 70px;
  background: white;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}
.header-search input {
  padding: 10px 15px;
  border: 1px solid #eee;
  border-radius: 20px;
  width: 250px;
  outline: none;
  background: #f9fafb;
}
.header-actions {
  display: flex;
  gap: 15px;
}
.icon-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  position: relative;
}
.sidebar-toggle-btn {
  display: none;
  font-size: 24px;
}
.close-sidebar-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}
.mobile-header-logout {
  display: none;
}
.dashboard-content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

/* Dashboard Views */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  display: flex;
  align-items: center;
  gap: 15px;
}
.stat-icon {
  width: 50px;
  height: 50px;
  background: #e8f5e9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.stat-details h3 {
  font-size: 22px;
}
.stat-details p {
  font-size: 13px;
  color: var(--text-muted);
}

.section-title {
  font-size: 20px;
  margin-bottom: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-card, .list-card {
  background: white;
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

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

/* Business Cards (Matching) */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.business-card {
  background: white;
  border: 1px solid #eee;
  border-radius: var(--border-radius);
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
}
.business-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow);
  border-color: #a7f3d0;
}
.business-header {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}
.business-icon {
  font-size: 35px;
}
.business-info h4 {
  font-size: 16px;
  color: var(--text-dark);
}
.business-type {
  font-size: 12px;
  color: var(--text-muted);
}
.business-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 13px;
  background: #f9fafb;
  padding: 10px;
  border-radius: 8px;
}
.ai-match-score {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #10b981;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.ai-reasoning {
  font-size: 12px;
  color: #047857;
  background: #d1fae5;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
}
.card-actions {
  display: flex;
  gap: 10px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}
.modal-overlay.active {
  display: flex;
}
.modal {
  background: white;
  width: 100%;
  max-width: 450px;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-title {
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}
.deal-summary {
  background: #f9fafb;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.deal-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}
.deal-total {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #ccc;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-color);
}
.modal-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--primary-color);
  animation: slideInRight 0.3s ease forwards;
  min-width: 250px;
}
.toast.success { border-color: #10b981; }
.toast.error { border-color: #ef4444; }
.toast.info { border-color: #3b82f6; }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(10px); }
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger-menu { display: block; }
  .close-sidebar-btn { display: block; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: none;
    align-items: stretch;
    text-align: center;
  }
  .nav-menu.active { display: flex; }
  .nav-links { flex-direction: column; }
  .nav-links a { margin: 15px 0; display: block; font-size: 18px; }
  .nav-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; }
  
  .logout-nav-btn, .dashboard-nav-btn {
    width: 100%;
    margin: 0 !important;
  }
  
  .sidebar-toggle-btn { display: block; }
  .mobile-header-logout { display: block; margin-left: auto; }
  
  .hero { flex-direction: column; padding: 60px 5%; text-align: center; }
  .login-container { flex-direction: column; }
  .login-left { padding: 30px; text-align: center; }
  .dashboard-grid, .form-grid { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -100%; height: 100vh; z-index: 1000; transition: left 0.3s; }
  .sidebar.active { left: 0; box-shadow: 20px 0 50px rgba(0,0,0,0.5); }
  .stats, .steps { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .stats, .steps, .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; padding: 60px 5%; text-align: center; }
}