* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.login-container {
  display: flex;
  width: 100%;
  max-width: 900px;
  height: 550px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: white;
  text-align: center;
}

.login-left .circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 80px;
}

.login-left h1 {
  font-size: 28px;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.login-left p {
  font-size: 14px;
  opacity: 0.8;
}

.login-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px;
}

.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo h2 {
  color: #1e3c72;
  font-size: 24px;
}

.login-logo p {
  color: #888;
  font-size: 12px;
  margin-top: 5px;
}

.input-group {
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 20px;
  transition: border-color 0.3s;
}

.input-group:focus-within {
  border-color: #1e3c72;
}

.input-group span {
  margin-right: 10px;
  font-size: 18px;
}

.input-group input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 15px;
  color: #333;
}

.input-group input::placeholder {
  color: #aaa;
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 13px;
  color: #666;
}

.options label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.options label input {
  margin-right: 6px;
}

.options a {
  color: #1e3c72;
  text-decoration: none;
}

.login-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s;
}

.login-btn:hover {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    height: auto;
  }
  .login-left {
    padding: 30px;
  }
  .login-left .circle {
    width: 120px;
    height: 120px;
    font-size: 50px;
  }
  .login-right {
    padding: 30px;
  }
}
/* ============================================
   DASHBOARD STYLES
   ============================================ */

.app {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #f5f6fa;
}

.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.brand span {
  font-size: 30px;
}

.brand h2 {
  font-size: 18px;
  letter-spacing: 1px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.sidebar nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.3s;
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar nav a.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: bold;
}

.logout {
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

.content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.topbar h1 {
  color: #1e3c72;
  font-size: 28px;
}

.user-info {
  background: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #1e3c72;
}

.kpi-card h3 {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.kpi-card p {
  font-size: 28px;
  font-weight: bold;
  color: #1e3c72;
}

.panel {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.panel h2 {
  color: #1e3c72;
  margin-bottom: 10px;
}

.panel p {
  color: #666;
  font-size: 14px;
}
/* ============================================
   USERS PAGE
   ============================================ */

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.form-box {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 1px solid #e0e0e0;
}

.form-box h3 {
  color: #1e3c72;
  margin-bottom: 20px;
  font-size: 18px;
}

.form-box .input-group {
  background: white;
}

.form-box select {
  border: none;
  outline: none;
  flex: 1;
  font-size: 15px;
  color: #333;
  background: transparent;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 12px 15px;
  background: #f5f6fa;
  color: #1e3c72;
  font-weight: bold;
  border-bottom: 2px solid #e0e0e0;
}

.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}

.data-table tr:hover {
  background: #f9f9f9;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.badge.admin {
  background: #ffeaa7;
  color: #d63031;
}

.badge.user {
  background: #dfe6e9;
  color: #2d3436;
}

.badge.active {
  background: #55efc4;
  color: #00b894;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin-right: 5px;
}
/* ============================================
   OPERATIONS PAGE
   ============================================ */

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.tab {
  background: none;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
}

.tab:hover {
  color: #1e3c72;
}

.tab.active {
  color: #1e3c72;
  font-weight: bold;
  border-bottom-color: #1e3c72;
}

.muted {
  color: #999;
  font-size: 14px;
  font-style: italic;
}
/* ============================================
   SETTINGS PAGE
   ============================================ */

.checkbox-row {
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

.checkbox-row label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.checkbox-row input {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}
/* ============================================
   DASHBOARD QUICK ACTIONS
   ============================================ */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.qa-btn {
  display: block;
  padding: 18px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  transition: transform 0.3s, box-shadow 0.3s;
}

.qa-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(30, 60, 114, 0.3);
}
/* ============================================
   DASHBOARD EXTRA — SUMMARY, ALERTS, COMPARISON
   ============================================ */

.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.summary-list {
  margin-top: 15px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item span {
  color: #666;
}

.summary-item strong {
  color: #1e3c72;
  font-size: 16px;
}

.alerts-box {
  margin-top: 15px;
}

.alert-item {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-item.warning {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

.alert-item.danger {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.alert-item.info {
  background: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

.alert-item.success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.comparison-card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.comparison-card h3 {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.comparison-card p {
  font-size: 22px;
  font-weight: bold;
  color: #1e3c72;
}
/* ============================================
   DASHBOARD EXTRA — SUMMARY, ALERTS, COMPARISON, CHARTS
   ============================================ */

.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.summary-list {
  margin-top: 15px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item span {
  color: #666;
}

.summary-item strong {
  color: #1e3c72;
  font-size: 16px;
}

.alerts-box {
  margin-top: 15px;
}

.alert-item {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-item.warning {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

.alert-item.danger {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.alert-item.info {
  background: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

.alert-item.success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.comparison-card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.comparison-card h3 {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.comparison-card p {
  font-size: 22px;
  font-weight: bold;
  color: #1e3c72;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-top: 20px;
}
/* ============================================
   LOGIN — FARM SCENE WITH ANIMALS
   ============================================ */

.login-left {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #87CEEB 0%, #B0E0E6 40%, #90EE90 70%, #228B22 100%);
}

/* SKY */
.sky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.sun {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, #FFD700 0%, #FFA500 70%);
  border-radius: 50%;
  box-shadow: 0 0 60px #FFD700, 0 0 100px rgba(255, 215, 0, 0.5);
  animation: sunPulse 4s infinite ease-in-out;
}

@keyframes sunPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 60px #FFD700, 0 0 100px rgba(255, 215, 0, 0.5); }
  50% { transform: scale(1.1); box-shadow: 0 0 80px #FFD700, 0 0 140px rgba(255, 215, 0, 0.7); }
}

.cloud {
  position: absolute;
  font-size: 35px;
  opacity: 0.8;
  animation: floatCloud 25s infinite linear;
}

.cloud-1 { top: 15%; animation-duration: 30s; }
.cloud-2 { top: 30%; animation-duration: 40s; animation-delay: -15s; }
.cloud-3 { top: 45%; animation-duration: 35s; animation-delay: -8s; }

@keyframes floatCloud {
  0% { left: -80px; }
  100% { left: 110%; }
}

/* FARM SCENE */
.farm-scene {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  z-index: 1;
}

/* Trees */
.tree {
  position: absolute;
  font-size: 55px;
  bottom: 40%;
  opacity: 0.85;
}

.tree-1 { left: 8%; }
.tree-2 { left: 45%; font-size: 65px; }
.tree-3 { right: 10%; }

/* Large animals (background) */
.animal-large {
  position: absolute;
  font-size: 50px;
  bottom: 35%;
  opacity: 0.9;
  animation: walkLarge 15s infinite ease-in-out;
}

.animal-1 { left: 15%; animation-delay: 0s; }
.animal-2 { left: 55%; animation-delay: -5s; }
.animal-3 { left: 75%; animation-delay: -10s; }

@keyframes walkLarge {
  0%, 100% { transform: translateX(0) scaleX(1); }
  50% { transform: translateX(20px) scaleX(1); }
}

/* Small animals (foreground) */
.animal-small {
  position: absolute;
  font-size: 35px;
  bottom: 10%;
  animation: walkSmall 8s infinite ease-in-out;
}

.animal-4 { left: 5%; animation-delay: 0s; }
.animal-5 { left: 18%; animation-delay: -1s; }
.animal-6 { left: 30%; animation-delay: -2s; font-size: 40px; }
.animal-7 { left: 45%; animation-delay: -3s; }
.animal-8 { left: 58%; animation-delay: -4s; font-size: 40px; }
.animal-9 { left: 70%; animation-delay: -5s; }
.animal-10 { left: 80%; animation-delay: -6s; font-size: 30px; }
.animal-11 { left: 90%; animation-delay: -7s; }

@keyframes walkSmall {
  0%, 100% { transform: translateY(0) scaleX(1); }
  50% { transform: translateY(-8px) scaleX(1); }
}

/* LOGIN OVERLAY (text juu ya scene) */
.login-overlay {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  color: white;
}

.circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 70px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  animation: pulseCircle 3s infinite ease-in-out;
  margin-bottom: 20px;
}

@keyframes pulseCircle {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
  50% { box-shadow: 0 0 0 25px rgba(255, 255, 255, 0); }
}

.login-overlay h1 {
  font-size: 32px;
  letter-spacing: 3px;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  margin-bottom: 8px;
}

.login-overlay p {
  font-size: 14px;
  opacity: 0.95;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}