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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f4f6f8;
  color: #1a1a1a;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3e6a00 0%, #6FA234 100%);
}

.login-card {
  background: white;
  padding: 2.5rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.login-card h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
  color: #3e6a00;
}

.login-card p {
  color: #666;
  margin-bottom: 1.5rem;
}

.login-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.login-card button {
  width: 100%;
  padding: 0.75rem;
  background: #3e6a00;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.login-card button:hover {
  opacity: 0.9;
}

.error-text {
  color: #e11d48;
  font-size: 0.875rem;
  margin-top: 0.75rem;
  text-align: center;
}

/* Dashboard */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dashboard-header h1 {
  font-size: 1.5rem;
  color: #3e6a00;
}

.filters {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  background: white;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  font-weight: 600;
}

.filter-group input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
}

.btn-primary {
  padding: 0.5rem 1rem;
  background: #3e6a00;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: white;
  color: #3e6a00;
  border: 1px solid #3e6a00;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.2s;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: white;
  padding: 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stat-card h3 {
  font-size: 0.875rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #3e6a00;
}

.charts-section {
  background: white;
  padding: 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
}

.chart-container {
  max-width: 400px;
  margin: 0 auto;
}

.chart-container h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.table-section {
  background: white;
  padding: 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.table-header h3 {
  font-size: 1rem;
  margin: 0;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th, td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
}

th {
  font-weight: 600;
  color: #666;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tr:hover td {
  background: #f9fafb;
}

@media (max-width: 640px) {
  .dashboard-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group input {
    width: 100%;
  }
}
