/* ================= GLOBAL RESET ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
}

body {
  background: #f2f5f9;
  color: #333;
  min-height: 100vh;
}

/* ================= SIDEBAR ================= */
.sidebar {
  position: fixed;
  left: 20px;
  top: 20px;
  width: 240px;
  height: calc(100vh - 40px);
  background: linear-gradient(180deg, #0b3c68, #1e5fa3);
  color: white;
  padding: 25px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sidebar-header h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.2;
}

.sidebar-header .role {
  font-size: 12px;
  opacity: 0.85;
  color: rgba(255,255,255,0.8);
}

.sidebar-nav {
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-radius: 10px;
  transition: all 0.3s;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255,255,255,0.15);
  transform: translateX(5px);
}

.nav-item.active {
  background: rgba(255,255,255,0.2);
  font-weight: 500;
}

.nav-icon {
  font-size: 18px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

.nav-text {
  font-size: 14px;
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.logout-btn {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  padding: 12px 15px;
  background: rgba(231, 76, 60, 0.9);
  border-radius: 10px;
  transition: all 0.3s;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(231, 76, 60, 1);
  transform: translateY(-2px);
}

/* ================= MAIN CONTENT ================= */
.main {
  margin-left: 280px;
  padding: 30px;
  min-height: 100vh;
}

.topbar {
  background: white;
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.topbar h1 {
  color: #0b3c68;
  font-size: 28px;
  margin-bottom: 5px;
}

.topbar span {
  color: #666;
  font-size: 15px;
}

/* ================= CARDS ================= */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.summary-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: all 0.3s;
  text-align: center;
}

.summary-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.card-icon {
  font-size: 40px;
  margin-bottom: 15px;
  color: #0b3c68;
}

.summary-card h3 {
  color: #0b3c68;
  margin-bottom: 10px;
  font-size: 18px;
}

.summary-card p {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.summary-card a {
  display: inline-block;
  background: linear-gradient(135deg, #0b3c68, #1e5fa3);
  color: white;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
}

.summary-card a:hover {
  background: linear-gradient(135deg, #1e5fa3, #0b3c68);
  box-shadow: 0 4px 12px rgba(11, 60, 104, 0.3);
}

/* ================= GENERAL CARD ================= */
.card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  margin-bottom: 25px;
}

.card:last-child {
  margin-bottom: 0;
}

.card h3 {
  color: #0b3c68;
  margin-bottom: 20px;
  font-size: 20px;
}

/* ================= FILTER CARD ================= */
.filter-card {
  margin-bottom: 25px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  align-items: end;
}

.filter-grid select,
.filter-grid input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.filter-grid select:focus,
.filter-grid input:focus {
  outline: none;
  border-color: #0b3c68;
}

.filter-grid button {
  background: linear-gradient(135deg, #0b3c68, #1e5fa3);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  height: 40px;
}

.filter-grid button:hover {
  background: linear-gradient(135deg, #1e5fa3, #0b3c68);
  transform: translateY(-2px);
}

/* ================= CARD GRID ================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
}

.card-grid .card {
  margin: 0;
}

/* ================= CHART CONTAINER ================= */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* ================= STATS ================= */
.stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
}

.stat-value {
  font-size: 32px;
  font-weight: bold;
  color: #0b3c68;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: #666;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px) {
  .sidebar {
      width: 220px;
  }
  .main {
      margin-left: 260px;
  }
}

@media (max-width: 992px) {
  .sidebar {
      position: relative;
      width: 100%;
      height: auto;
      top: 0;
      left: 0;
      margin-bottom: 20px;
      border-radius: 0 0 16px 16px;
  }
  .main {
      margin-left: 0;
      padding: 20px;
  }
  .card-container {
      grid-template-columns: repeat(2, 1fr);
  }
  .card-grid {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .card-container {
      grid-template-columns: 1fr;
  }
  .filter-grid {
      grid-template-columns: 1fr;
  }
  .stats-container {
      grid-template-columns: 1fr;
  }
}