* {
  font-family: "Poppins", Joist, Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", Joist, Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f4f0;
  color: #2d3748;
}

input {
  font-family: "Poppins", Joist, Tahoma, Geneva, Verdana, sans-serif;
}

button {
  font-family: "Poppins", Joist, Tahoma, Geneva, Verdana, sans-serif;
}

/* AUTH PAGES */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a4731 0%, #2d7a4f 100%);
}

.auth-container {
  width: 100%;
  padding: 20px;
  margin: 5% 0;
}

.auth-logo {
  /*display: flex;
  justify-content: center;
  align-items: center;*/
  text-align: center;
  margin-bottom: 30px;
  color: white;
}

.auth-logo h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.auth-logo p {
  font-size: 1rem;
  opacity: 0.85;
}

.auth-box {
  width: 90%;
  max-width: 480px;
  height: auto;
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

.auth-box h2 {
  font-size: 1.6rem;
  margin-bottom: 24px;
  color: #1a4731;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #4a5568;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: #2d7a4f;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: #2d7a4f;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-primary:hover {
  background: #1a4731;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #718096;
}

.auth-switch a {
  color: #2d7a4f;
  font-weight: 600;
  text-decoration: none;
}

.error-message {
  background: #fff5f5;
  border: 1px solid #fc8181;
  color: #c53030;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

/* DASHBOARD LAYOUT */
.dashboard-page {
  display: flex;
  min-height: 100vh;
  background: #f0f4f0;
  overflow-x: clip;
}

.sidebar {
  width: 240px;
  background: #1a4731;
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  padding: 0;
}

.sidebar-logo {
  padding: 28px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: center;
}

.sidebar-logo h2 {
  font-size: 1.4rem;
  color: white;
  padding: 0 10px;
}

.sidebar-logo h2 a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
}

.sidebar-logo h2 a:hover {
  color: white;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}


.nav-item {
  display: flex;
  /*justify-content: center;*/
  align-items: center;
  padding: 14px 24px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.nav-item img {
  margin-right: 10px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}


.nav-item:hover,
.nav-item.active {
  background: #f0f4f0;
  color: #1a4731;
  border-radius: 12px 0 0 12px;
}

.sidebar-footer {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 32px;
  min-width: 0;
  width: calc(100% - 240px);
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.topbar h1 {
  font-size: 1.8rem;
  color: #1a4731;
  margin-bottom: 4px;
}

.topbar p {
  color: #718096;
  font-size: 0.95rem;
}

.topbar-greeting h1 {
  display: flex;
  /*justify-content: center;*/
  align-items: center;
  gap: 10px;
}

/* CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

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

@media (max-width: 600px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8 px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s;
  min-width: 0;
}

.card:hover {
  transform: translatey(-2px);
}

.card-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  background: #f0f4f0;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-label {
  font-size: 0.85rem;
  color: #718096;
  margin-bottom: 4px;
}

.card-value {
  font-size: 1.2rem;
  color: #1a4731;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SECTION */
.section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

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

.section-header h2 {
  font-size: 1.2rem;
  color: #1a4731;
}

.btn-add {
  padding: 8px 16px;
  background: #2d7a4f;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-add:hover {
  background: #1a4731;
}

/* TABLE */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #718096;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
}

.data-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0f4f0;
  color: #2d3748;
}

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

.loading,
.empty-state {
  text-align: center;
  color: #718096;
  padding: 32px;
  font-style: italic;
}

/* STATUS BADGE */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.growing {
  background: #c6f6d5;
  color: #276749;
}

.status-badge.harvested {
  background: #bee3f8;
  color: #2b6cb0;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-box {
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  height: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-box-sm {
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-box h2 {
  font-size: 1.4rem;
  color: #1a4731;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .btn-secondary,
.modal-actions .btn-primary {
  min-height: 44px;
}

/* FOCUS VISIBLE STYLES */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-add:focus-visible,
.btn-action:focus-visible,
.mobile-menu-btn:focus-visible,
.mobile-nav-toggle:focus-visible {
  outline: 2px solid #2d7a4f;
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2d7a4f;
  outline-offset: -1px;
}

.btn-secondary {
  flex: 1;
  padding: 12px;
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #cbd5e0;
}

.modal-actions .btn-primary {
  flex: 2;
  margin-top: 0;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn-action {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: opacity 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 5px 0;
  min-width: 60px;
}

.btn-action:hover {
  opacity: 0.8;
}

/* TOUCH OPTIMIZATION */
button,
.btn-primary,
.btn-secondary,
.btn-add,
.btn-action,
.mobile-menu-btn,
.mobile-nav-toggle {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

/* PREVENT IOS SAFARI ZOOM ON FOCUS */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px;
  }
}

/* TABLE HORIZONTAL SCROLL - NO WRAP */
.data-table th,
.data-table td {
  white-space: nowrap;
  min-width: 100px;
}

.data-table th:first-child,
.data-table td:first-child {
  min-width: 120px;
}

/* Action column - allow buttons to sit side by side */
.data-table th:last-child,
.data-table td:last-child {
  min-width: 160px;
  white-space: nowrap;
}

/* ISOLATE HOVER STYLES FOR TOUCH DEVICES */
@media (hover: hover) {
  .btn-primary:hover {
    background: #1a4731;
  }
  .btn-secondary:hover {
    background: #cbd5e0;
  }
  .btn-action:hover {
    opacity: 0.8;
  }
  .nav-item:hover,
  .nav-item.active {
    background: #f0f4f0;
    color: #1a4731;
    border-radius: 12px 0 0 12px;
  }
}

/* OVERSCROLL BEHAVIOR */
body {
  overscroll-behavior: none;
}

.sidebar {
  overscroll-behavior: contain;
}

.btn-harvest {
  background: #c6f6d5;
  color: #276749;
}

.btn-delete {
  background: #fff5f5;
  color: #c53030;
}

.dropdown {
  width: 100%;
  background: #f0f4f0;
  color: #1a4731;
  padding: 10px;
  border: 2px solid #1a4731;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* PROFILE */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.section-title {
  font-size: 1.1rem;
  color: #1a4731;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f4f0;
}

.profile-avatar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.avatar-circle {
  width: 72px;
  height: 72px;
  background: #2d7a4f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.6rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-meta h3 {
  font-size: 1.2rem;
  color: #1a4731;
  margin-bottom: 4px;
}

.profile-meta p {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.profile-since {
  font-size: 0.8rem;
  color: #a0aec0;
}

.success-message {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #276749;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* STATS PUBLIC PAGE */
.stats-page {
  background: #f0f4f0;
  min-height: 100vh;
}

.stats-header {
  background: #1a4731;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.stats-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.stats-header-left h1 {
  font-size: 1.4rem;
  color: white;
}

.stats-header-left h1 a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
}

.stats-header-left h1 a:hover {
  color: white;
}

.stats-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-secondary-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.stats-hero {
  background: linear-gradient(135deg, #1a4731 0%, #2d7a4f 100%);
  padding: 60px 40px;
  text-align: center;
  color: white;
}

.stats-hero h2 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.stats-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  background: #f0f4f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-label {
  font-size: 0.85rem;
  color: #718096;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.6rem;
  color: #1a4731;
  font-weight: 700;
}

.stats-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.stats-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
  text-align: left;
}

.stats-section h3 {
  font-size: 1.1rem;
  color: #1a4731;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f4f0;
  text-align: center;
}

.top-crop-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f4f0;
}

.top-crop-item:last-child {
  border-bottom: none;
}

.crop-medal {
  font-size: 1.5rem;
}

.crop-details {
  flex: 1;
}

.crop-details strong {
  font-size: 1rem;
  color: #2d3748;
  text-transform: capitalize;
}

.crop-details p {
  font-size: 0.85rem;
  color: #718096;
  margin-top: 2px;
}

.crop-price {
  font-size: 1rem;
  font-weight: 700;
  color: #2d7a4f;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.region-card {
  background: #f0f4f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.region-card h4 {
  color: #1a4731;
  margin-bottom: 8px;
}

.region-card p {
  font-size: 0.9rem;
  color: #718096;
}

.news-item {
  padding: 20px 0;
  border-bottom: 1px solid #f0f4f0;
}

.news-item:last-child {
  border-bottom: none;
}

.news-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.news-author {
  font-size: 0.85rem;
  color: #2d7a4f;
  font-weight: 600;
}

.news-date {
  font-size: 0.85rem;
  color: #a0aec0;
}

.news-title {
  font-size: 1.1rem;
  color: #2d3748;
  margin-bottom: 8px;
}

.news-content {
  font-size: 0.9rem;
  color: #718096;
  line-height: 1.6;
}

.stats-cta {
  background: linear-gradient(135deg, #1a4731 0%, #2d7a4f 100%);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  color: white;
  margin-top: 24px;
}

.stats-cta h3 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.stats-cta p {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* LANDING PAGE */
.landing-page {
  background: white;
  font-family: "Poppins", Joist, Tahoma, Geneva, Verdana, sans-serif;
}

.landing-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(26, 71, 49, 0.97);
  backdrop-filter: blur(10px);
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-brand a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-brand a:hover {
  color: white;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: white;
}

.nav-action-mobile {
  display: none;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-actions.logged-in .nav-signin,
.nav-actions.logged-in .nav-register,
.nav-actions.logged-in .mobile-nav-toggle {
  display: none;
}

.nav-actions .nav-signin-mobile-dashboard {
  display: none;
}

.nav-actions .nav-user-badge {
  display: none;
}

.nav-actions.logged-in .nav-user-badge {
  display: flex;
}

.nav-signin {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-register {
  background: white;
  color: #1a4731;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.nav-register:hover {
  background: #f0f4f0;
}

/* HERO */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a4731 0%, #2d7a4f 60%, #38a169 100%);
  display: flex;
  align-items: center;
  padding: 80px 80px 80px;
  gap: 60px;
}

.hero-content {
  flex: 1;
  color: white;
  padding-top: 24px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.15rem;
  opacity: 0.88;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.btn-hero-primary {
  background: white;
  color: #1a4731;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s;
  display: inline-block;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.2s;
  display: inline-block;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
}

.hero-stat span {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* HERO CARD */
.hero-image {
  flex: 0 0 380px;
}

.hero-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-weight: 600;
  color: #1a4731;
}

.live-badge {
  background: #f0fff4;
  color: #276749;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.hero-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-card-stat {
  background: #f0f4f0;
  border-radius: 12px;
  padding: 16px;
}

.hero-card-stat p {
  font-size: 0.8rem;
  color: #718096;
  margin-bottom: 4px;
}

.hero-card-stat h3 {
  font-size: 1.1rem;
  color: #1a4731;
  font-weight: 700;
}

.hero-card-crops {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-crop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8fdf8;
  border-radius: 8px;
  font-size: 0.9rem;
}

.crop-status-grow {
  background: #c6f6d5;
  color: #276749;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.crop-status-harv {
  background: #bee3f8;
  color: #2b6cb0;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* FEATURES */
.features-section {
  padding: 100px 0;
  background: #f8fdf8;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  text-align: center;
}

.section-container h2 {
  font-size: 2.2rem;
  color: #1a4731;
  margin-bottom: 12px;
  text-align: left;
  padding-left: 8px;
}

.section-subtitle {
  color: #718096;
  font-size: 1.05rem;
  margin-bottom: 56px;
}

.stat-info h2 {
  font-size: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}

.feature-card {
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  color: #1a4731;
  margin-bottom: 10px;
}

.feature-card p {
  color: #718096;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* LIVE STATS SECTION */
.live-stats-section {
  padding: 100px 0;
  background: white;
}

/* HOW IT WORKS */
.how-section {
  padding: 100px 0;
  background: #1a4731;
  color: white;
}

.how-section h2 {
  font-size: 2.2rem;
  margin-bottom: 56px;
  color: white;
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.step-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  flex: 1;
  max-width: 280px;
}

.step-number {
  width: 48px;
  height: 48px;
  background: white;
  color: #1a4731;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: white;
}

.step-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.6;
}

.step-arrow {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.4);
}

/* NEWS SECTION */
.news-section {
  padding: 80px 0;
  background: #f8fdf8;
}

.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  text-align: center;
}

.news-section h2 {
  font-size: 1.8rem;
  color: #1a4731;
  margin-bottom: 32px;
}

.news-card {
  display: flex;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
  transition: transform 0.2s;
}

.news-card:hover {
  transform: translateY(-2px);
}

.news-card-accent {
  width: 6px;
  background: #2d7a4f;
  flex-shrink: 0;
}

.news-card-body {
  padding: 20px 24px;
  flex: 1;
  text-align: left;
}

.news-content {
  font-size: 0.9rem;
  color: #718096;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.news-content.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.news-toggle-btn {
  background: none;
  border: none;
  color: #2d7a4f;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 8px;
  transition: color 0.2s;
}

.news-toggle-btn:hover {
  color: #1a4731;
}

/* CTA */
.cta-section {
  padding: 100px 48px;
  background: linear-gradient(135deg, #1a4731 0%, #2d7a4f 100%);
  text-align: center;
  color: white;
}

.cta-section h2 {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.news-card {
  flex-direction: column;
}

.news-card-accent {
  width: 100%;
  height: 4px;
}

/* FARM INTELLIGENCE */
.insight-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.insight-summary-card {
  background: #f0f4f0;
  border-radius: 12px;
  padding: 16px;
}

.insight-summary-card.warning {
  background: #fffbeb;
  border: 1px solid #f6e05e;
}

.insight-summary-card.success {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
}

.insight-summary-card p {
  font-size: 0.8rem;
  color: #718096;
  margin-bottom: 4px;
}

.insight-summary-card h3 {
  font-size: 1.2rem;
  color: #1a4731;
  font-weight: 700;
}

.insight-message {
  background: #f0fff4;
  border-left: 4px solid #2d7a4f;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  color: #276749;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.insight-header strong {
  font-size: 1rem;
  color: #1a4731;
  text-transform: capitalize;
}

.insight-region {
  font-size: 0.8rem;
  color: #718096;
  background: #f0f4f0;
  padding: 2px 8px;
  border-radius: 10px;
}

.insight-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.insight-metric p {
  font-size: 0.75rem;
  color: #718096;
  margin-bottom: 2px;
}

.insight-metric strong {
  font-size: 0.95rem;
  color: #2d3748;
}

.peer-insight {
  font-size: 0.85rem;
  color: #718096;
  padding: 8px 12px;
  background: #f8fdf8;
  border-radius: 8px;
  margin-bottom: 8px;
}

.lost-revenue-alert {
  font-size: 0.85rem;
  color: #c05621;
  background: #fffaf0;
  border: 1px solid #fbd38d;
  padding: 8px 12px;
  border-radius: 8px;
}

.surplus-alert {
  font-size: 0.85rem;
  color: #276749;
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  padding: 8px 12px;
  border-radius: 8px;
}

.insight-empty {
  text-align: center;
  padding: 32px;
  color: #718096;
}

/* FOOTER */
.landing-footer {
  background: #0f2a1d;
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 48px 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: white;
  font-size: 1.4rem;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4 {
  color: white;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

.nav-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px 6px 6px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-user-badge:hover {
  background: rgba(255, 255, 255, 0.25);
}

a.nav-user-badge {
  text-decoration: none;
}

.nav-avatar {
  width: 28px;
  height: 28px;
  background: white;
  color: #1a4731;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.nav-username {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
}

.mobile-header {
  display: none;
  background: #1a4731;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1002;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.mobile-brand a {
  text-decoration: none;
  color: inherit;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  border-radius: 8px;
  transition: background 0.2s;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ANALYTICS PUBLIC PAGE */
.analytics-headline-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-left: 6px solid #2d7a4f;
}

.analytics-headline {
  display: flex;
  align-items: center;
  gap: 32px;
}

.analytics-headline-number {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}

.analytics-headline-text h2 {
  font-size: 1.4rem;
  color: #1a4731;
  margin-bottom: 8px;
}

.analytics-headline-text p {
  color: #4a5568;
  line-height: 1.7;
  font-size: 0.95rem;
}

.analytics-loading {
  text-align: center;
  padding: 24px;
  color: #718096;
}

.analytics-explain-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.analytics-explain-card h4 {
  color: #1a4731;
  margin-bottom: 10px;
  font-size: 1rem;
}

.analytics-explain-card p {
  color: #718096;
  font-size: 0.88rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .analytics-headline {
    flex-direction: column;
    text-align: center;
  }

  .analytics-headline-number {
    font-size: 3rem;
  }

  .analytics-explain-card {
    grid-column: 1 / -1;
  }
}

/* =====================================
    RESPONSIVE DESIGN - MOBILE FIRST
   ===================================== */

/* TABLET LANDSCAPE - 1024px and below */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar {
    width: 220px;
  }

  .sidebar-logo {
    padding: 20px 16px;
  }

  .sidebar-logo h2 {
    font-size: 1.2rem;
  }

  .nav-item {
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  .nav-item img {
    width: 22px;
    height: 22px;
    margin-right: 8px;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .hero-section {
    padding: 100px 40px 60px;
    gap: 40px;
  }

  .hero-image {
    flex: 0 0 320px;
  }

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

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

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

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

/* TABLET - 768px and below */
@media (max-width: 768px) {
  /* AUTH PAGES */
  .auth-container {
    padding: 16px;
    margin: 2% 0;
  }

  .auth-logo {
    margin-bottom: 20px;
  }

  .auth-logo h1 {
    font-size: 1.6rem;
  }

  .auth-logo p {
    font-size: 0.9rem;
  }

  .auth-logo img {
    width: 80px !important;
    height: 80px !important;
  }

  .auth-box {
    padding: 24px;
  }

  .auth-box h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  /* LANDING PAGE */
  .landing-nav {
    padding: 12px 20px;
    justify-content: space-between;
  }

  .nav-brand {
    gap: 8px;
  }

  .nav-brand img {
    width: 32px;
    height: 32px;
  }

  .nav-brand a {
    font-size: 1.2rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a4731;
    flex-direction: column;
    padding: 16px 20px;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .nav-links .nav-action-mobile {
    display: block;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links .nav-action-mobile a {
    display: block;
    text-align: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-weight: 600;
  }

  .nav-links .nav-action-mobile .mobile-signin {
    background: rgba(255, 255, 255, 0.1);
    color: white;
  }

  .nav-links .nav-action-mobile .mobile-register {
    background: white;
    color: #1a4731;
  }

  .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .nav-actions.logged-in .nav-signin,
  .nav-actions.logged-in .nav-register {
    display: none;
  }

  .nav-actions.logged-in .nav-user-badge {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
    text-align: center;
    align-items: center;
  }

  .nav-actions.logged-in .nav-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    margin: 0;
  }

  .nav-actions.logged-in .nav-username {
    display: none;
  }

  .nav-actions.logged-in .mobile-nav-toggle {
    display: block !important;
  }

  .auth-logo {
    margin-bottom: 20px;
  }

  .auth-logo h1 {
    font-size: 1.6rem;
  }

  .auth-logo p {
    font-size: 0.9rem;
  }

  .auth-logo img {
    width: 80px !important;
    height: 80px !important;
  }

  .auth-box {
    padding: 24px;
  }

  .auth-box h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .stats-header {
    padding: 12px 20px;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }

  .stats-header-right {
    display: flex;
    gap: 8px;
  }

  .stats-header-right a {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .stats-hero {
    padding: 40px 24px;
  }

  .stats-hero h2 {
    font-size: 1.6rem;
  }

  .stats-hero p {
    font-size: 1rem;
  }

  .stats-container {
    padding: 24px 16px;
  }

  /* LANDING PAGE */
  .landing-nav {
    padding: 12px 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a4731;
    flex-direction: column;
    padding: 16px 20px;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .hero-section {
    flex-direction: column;
    padding: 100px 24px 60px;
    text-align: center;
    gap: 40px;
    min-height: auto;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  .hero-image {
    flex: none;
    width: 100%;
  }

  .hero-card {
    max-width: 380px;
    margin: 0 auto;
  }

  .hero-stats {
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

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

  .stats-grid-2 {
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
  }

  .stats-grid-2 .stats-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .stats-grid-2 canvas {
    width: 100% !important;
    max-width: 100%;
  }

  .steps-grid {
    flex-direction: column;
    align-items: center;
  }

  .step-arrow {
    transform: rotate(90deg);
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .section-container {
    padding: 0 20px;
  }

  .features-section,
  .live-stats-section,
  .how-section,
  .news-section {
    padding: 60px 0;
  }

  .cta-section {
    padding: 60px 24px;
  }

  .landing-footer {
    padding: 40px 24px 20px;
  }

  /* DASHBOARD */
  .sidebar {
    position: fixed;
    left: -220px;
    top: 0;
    width: 220px;
    height: 100vh;
    z-index: 1001;
    transition: left 0.3s ease;
    box-shadow: none;
  }

  .sidebar.mobile-open {
    left: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 16px;
    padding-top: 72px;
  }

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

  .topbar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-top: 24px;
  }

  .topbar h1 {
    font-size: 1.5rem;
  }

  .mobile-header {
    display: flex;
  }

  /* PROFILE */
  .profile-grid {
    grid-template-columns: 1fr;
  }

  /* TABLES */
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  /* MODALS */
  .modal-box {
    padding: 24px;
    max-width: 90%;
    max-height: 90vh;
  }

  .modal-box-sm {
    padding: 24px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-actions {
    flex-direction: column;
    gap: 8px;
  }

  .modal-actions .btn-primary {
    flex: none;
  }

  /* NAV ITEMS */
  .sidebar {
    width: 220px;
  }

  .sidebar-logo {
    padding: 16px 20px;
    gap: 10px;
  }

  .sidebar-logo img {
    width: 32px;
    height: 32px;
  }

  .sidebar-logo h2 {
    font-size: 1.2rem;
  }

  .sidebar-nav {
    padding: 12px 0;
  }

  .nav-item {
    padding: 12px 20px;
    font-size: 0.85rem;
  }

  .nav-item img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
  }

  .sidebar-footer {
    padding: 16px 20px;
  }

  .btn-logout {
    padding: 10px;
    font-size: 0.85rem;
  }
}

/* MOBILE - 480px and below */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-section {
    padding: 90px 16px 40px;
  }

  .stats-cards {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .nav-brand span {
    font-size: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }

  .modal-box {
    margin: 12px;
    padding: 20px;
  }

  .modal-box-sm {
    margin: 12px;
    padding: 20px;
  }

  .auth-box {
    padding: 20px;
  }

  .auth-logo h1 {
    font-size: 1.4rem;
  }

  .auth-logo img {
    width: 70px !important;
    height: 70px !important;
  }

  .form-group input,
  .form-group select {
    font-size: 0.9rem;
    padding: 10px 14px;
  }

  .btn-primary {
    padding: 12px;
    font-size: 0.95rem;
  }

  .card {
    padding: 16px;
  }

  .card-icon {
    width: 48px;
    height: 48px;
  }

  .card-icon img {
    width: 32px;
    height: 32px;
  }

  .card-value {
    font-size: 1.2rem;
  }

  .section {
    padding: 16px;
  }

  .section-header h2 {
    font-size: 1.1rem;
  }

  .topbar h1 {
    font-size: 1.3rem;
  }

  .btn-add {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.6rem;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .insight-summary {
    grid-template-columns: 1fr;
  }

  .insight-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }

  .cta-section p {
    font-size: 1rem;
  }

  .mobile-header {
    padding: 10px 12px;
  }

  .mobile-brand span {
    font-size: 1rem;
  }

  .mobile-brand a {
    color: white;
    text-decoration: none;
  }

  .sidebar {
    width: 200px;
  }

  .sidebar-logo {
    padding: 14px 16px;
  }

  .sidebar-logo img {
    width: 28px;
    height: 28px;
  }

  .sidebar-logo h2 {
    font-size: 1.1rem;
  }

  .nav-item {
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  .nav-item img {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }

  .btn-logout {
    padding: 8px;
    font-size: 0.8rem;
  }
}

/* VERY SMALL SCREENS - 360px and below */
@media (max-width: 360px) {
  .insight-metrics {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 1.1rem;
  }

  .card-value {
    font-size: 1rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .stats-cards {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 1.4rem;
  }

  .section-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .btn-add {
    width: 100%;
  }

  .mobile-header {
    padding: 8px 10px;
  }

  .modal-box,
  .modal-box-sm {
    padding: 16px;
    margin: 8px;
  }

  .data-table th,
  .data-table td {
    padding: 6px 8px;
    font-size: 0.75rem;
  }
}
