
:root {
  --green: #2e7d32;
  --green-dark: #1b5e20;
  --orange: #f9a825;
  --red: #e53935;
  --blue: #1565c0;
  --bg: #f4f6f5;
  --card-bg: #ffffff;
  --border: #e0e0e0;
  --text: #263238;
  --muted: #78909c;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg); color: var(--text); direction: rtl;
}
a { text-decoration: none; color: var(--green-dark); }

.login-page { display:flex; align-items:center; justify-content:center; height:100vh; background: linear-gradient(135deg,#2e7d32,#1b5e20); }
.login-box { background:#fff; padding:40px; border-radius:16px; width:360px; box-shadow:0 10px 40px rgba(0,0,0,.2); }
.login-box h2 { text-align:center; margin-bottom:24px; color:var(--green-dark); }
.login-box label { display:block; margin:12px 0 4px; font-size:14px; }
.login-box input { width:100%; padding:10px; border:1px solid var(--border); border-radius:8px; }

.app-shell { display:flex; min-height:100vh; }
.sidebar { width:250px; background:var(--green-dark); color:#fff; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.sidebar .brand { padding:20px; font-size:18px; font-weight:bold; border-bottom:1px solid rgba(255,255,255,.15); }
.sidebar nav { flex:1; display:flex; flex-direction:column; padding:12px 0; overflow-y:auto; }
.sidebar nav a { color:#e8f5e9; padding:12px 20px; font-size:15px; border-right:3px solid transparent; }
.sidebar nav a:hover { background:rgba(255,255,255,.08); border-right-color:var(--orange); }
.sidebar-footer { padding:16px 20px; border-top:1px solid rgba(255,255,255,.15); }
.user-info { margin-bottom:8px; font-size:14px; }
.btn-logout { color:#ffcdd2; font-size:13px; }

.content { flex:1; padding:28px; max-width:1400px; }
h1 { color:var(--green-dark); margin-bottom:18px; }
h3 { color:var(--green-dark); }

.panel { background:var(--card-bg); border:1px solid var(--border); border-radius:12px; padding:20px; margin-bottom:20px; }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media (max-width: 900px) { .two-col { grid-template-columns:1fr; } }

.cards-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:20px; }
@media (max-width: 1100px) { .cards-grid { grid-template-columns:repeat(2,1fr); } }
.stat-card { border-radius:12px; padding:20px; color:#fff; }
.stat-card.green { background:linear-gradient(135deg,#43a047,#2e7d32); }
.stat-card.orange { background:linear-gradient(135deg,#fb8c00,#ef6c00); }
.stat-card.red { background:linear-gradient(135deg,#e53935,#c62828); }
.stat-card.blue { background:linear-gradient(135deg,#1e88e5,#1565c0); }
.stat-value { font-size:28px; font-weight:bold; }
.stat-label { font-size:13px; opacity:.9; margin-top:4px; }

.table { width:100%; border-collapse:collapse; margin-top:10px; }
.table th, .table td { padding:10px 12px; text-align:right; border-bottom:1px solid var(--border); font-size:14px; }
.table th { background:#f1f8f1; color:var(--green-dark); }
.table tr.row-warning { background:#fff8e1; }
.detail-table td { padding:8px; border-bottom:1px solid var(--border); font-size:14px; }
.detail-table td:first-child { color:var(--muted); width:160px; }

.badge { display:inline-block; padding:4px 10px; border-radius:20px; font-size:12px; background:#eceff1; }
.badge-healthy { background:#e8f5e9; color:#2e7d32; }
.badge-sick { background:#ffebee; color:#c62828; }
.badge-under_treatment { background:#fff8e1; color:#f9a825; }
.badge-weak { background:#fff3e0; color:#fb8c00; }
.badge-dead, .badge-removed { background:#eceff1; color:#616161; }

.btn { display:inline-block; padding:9px 16px; border-radius:8px; border:none; cursor:pointer; font-size:14px; }
.btn-primary { background:var(--green); color:#fff; }
.btn-secondary { background:#eceff1; color:var(--text); }
.btn-sm { padding:5px 10px; font-size:12px; background:#eceff1; }
.btn-block { width:100%; margin-top:12px; }
.btn-logout { display:inline-block; }

form label { display:block; margin:10px 0 4px; font-size:14px; color:var(--muted); }
form input, form select, form textarea {
  width:100%; padding:9px; border:1px solid var(--border); border-radius:8px; font-size:14px; font-family:inherit;
}
.form-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; }
.filter-bar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }

.alert { padding:12px 16px; border-radius:8px; margin-bottom:14px; font-size:14px; }
.alert-danger { background:#ffebee; color:#c62828; }
.alert-success { background:#e8f5e9; color:#2e7d32; }

.muted { color:var(--muted); font-size:13px; }
.map-toolbar { display:flex; gap:10px; align-items:center; margin-bottom:14px; flex-wrap:wrap; }
.legend { display:flex; gap:14px; margin-top:12px; font-size:13px; flex-wrap:wrap; }
.legend .dot { display:inline-block; width:12px; height:12px; border-radius:50%; margin-left:4px; vertical-align:middle; }
.legend .dot.healthy { background:#2e7d32; }
.legend .dot.sick { background:#e53935; }
.legend .dot.under_treatment { background:#f9a825; }
.legend .dot.weak { background:#fb8c00; }
.legend .dot.dead { background:#616161; }

.reminder-list { list-style:none; padding:0; margin:0; }
.reminder-list li { display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--border); font-size:14px; }

.permissions-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px; }
.perm-check { display:flex; align-items:center; gap:8px; background:#f8f9fa; padding:8px 12px; border-radius:8px; font-size:13px; }
.perm-check input { width:auto; }
