:root {
  --primary-teal: #1a5f5a;
  --secondary-teal: #2d8b83;
  --light-teal: #e8f5f4;
  --accent-mint: #7dd3c0;
  --bg-primary: #f8fafb;
  --bg-white: #ffffff;
  --text-dark: #1e293b;
  --text-medium: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: "Outfit", sans-serif;
  background: var(--bg-primary);
  color: var(--text-dark);
  line-height: 1.6;
}

.container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--bg-white);
  border-right: 1px solid var(--border-color);
  padding: 24px 0;
  position: fixed;
  height: 120vh;
  overflow-y: auto;
}

.logo {
  padding: 0 24px 32px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}

.logo span {
  color: var(--primary-teal);
}

.nav-section {
  margin-bottom: 8px;
}

.nav-label {
  padding: 0 24px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.nav-item {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-medium);
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  font-size: 14px;
  font-weight: 500;
}

.nav-item:hover {
  background: var(--light-teal);
  color: var(--primary-teal);
}

.nav-item.active {
  background: var(--light-teal);
  color: var(--primary-teal);
  font-weight: 600;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-teal);
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.user-section {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  padding: 16px 24px;
  margin-top: 180px;
}

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

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-teal);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
}

.user-role {
  font-size: 12px;
  color: var(--text-light);
}

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

.user-action {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-medium);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-action:hover {
  background: var(--bg-primary);
  color: var(--primary-teal);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 32px;
}

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

.header-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
}

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

.company-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-white);
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  font-family: "JetBrains Mono", monospace;
}

.stat-label {
  font-size: 13px;
  color: var(--text-medium);
  font-weight: 500;
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: var(--light-teal);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-teal);
}

/* Chart Cards */
.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.chart-card {
  background: var(--bg-white);
  padding: 24px;
  height: 500px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

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

.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.chart-controls {
  display: flex;
  gap: 12px;
}

.select-dropdown {
  padding: 6px 32px 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-medium);
  background: var(--bg-white);
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.select-dropdown:hover {
  border-color: var(--primary-teal);
}

.chart-placeholder {
  width: 100%;
  height: 250px;
  position: relative;
}

.donut-chart {
  width: 100%;
  height: 150px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
#revenuChart {
  height: 200px;
}
.legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-label {
  font-size: 13px;
  color: var(--text-medium);
}

/* Gender Chart */
.gender-chart {
  margin-top: 24px;
}

.gender-bar {
  margin-bottom: 16px;
}

.gender-label {
  font-size: 13px;
  color: var(--text-medium);
  margin-bottom: 8px;
  font-weight: 500;
}

.progress-bar {
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-teal);
  border-radius: 4px;
  transition: width 1s ease;
}

/* Table */
.table-card {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--bg-primary);
}

th {
  padding: 12px 24px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-dark);
}

tr:hover {
  background: var(--bg-primary);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-fever {
  background: #fee;
  color: #c33;
}
.badge-cough {
  background: #ffefd5;
  color: #d97706;
}
.badge-malaria {
  background: #f0e8ff;
  color: #7c3aed;
}
.badge-typhoid {
  background: #dbeafe;
  color: #2563eb;
}
.badge-cholera {
  background: #d1fae5;
  color: #059669;
}
.badge-infection {
  background: #fce7f3;
  color: #db2777;
}

.action-button {
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  color: var(--text-medium);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.action-button:hover {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
  background: var(--light-teal);
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-medium);
}

.icon-button:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card,
.chart-card,
.table-card {
  animation: fadeIn 0.6s ease forwards;
}

.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.4s;
}

.chart-card:nth-child(1) {
  animation-delay: 0.5s;
}
.chart-card:nth-child(2) {
  animation-delay: 0.6s;
}
.chart-card:nth-child(3) {
  animation-delay: 0.7s;
}
.table-card {
  animation-delay: 0.8s;
}

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

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1000;
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
  }

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