:root {
  --primary-color: #2e7d32;
  --secondary-color: #81c784;
  --accent-color: #ff9800;
  --background-dark: #121212;
  --surface-dark: #1e1e1e;
  --surface-light: rgba(255, 255, 255, 0.05);
  --text-main: #ffffff;
  --text-muted: #b0bec5;
  --danger: #e53935;
  --success: #43a047;
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background-color: var(--background-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Glassmorphism utilities */
.glass-panel {
  background: var(--surface-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.btn-primary:hover {
  background: #1b5e20;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: rgba(46, 125, 50, 0.1);
}

main {
  flex: 1;
  padding: 2rem 5%;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-muted);
}

form input, form select, form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 1rem;
  transition: var(--transition);
}

form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.3);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Auth Cards */
.auth-container {
  max-width: 400px;
  margin: 4rem auto;
}

/* Planner Specifics */
.planner-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Loading Spinner */
.loader {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Farm Grid Visualization */
.farm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(0,0,0,0.3);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255,255,255,0.1);
}

.farm-plot {
  aspect-ratio: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: #000;
  text-align: center;
  transition: transform 0.2s;
  cursor: pointer;
  position: relative;
}

.farm-plot:hover {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Tooltip for hovering over plots */
.farm-plot .tooltip {
  visibility: hidden;
  width: 120px;
  background-color: var(--surface-dark);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%; 
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
}

.farm-plot:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* Report Styles */
.report-section {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.report-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.stat-card h4 {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4rem;
}

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
