body { font-family: Arial, Helvetica, sans-serif; margin: 0; background: #f6f7f9; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #b30000; color: #fff; z-index: 1000; position: relative; }
.brand { font-weight: 600; }
.nav a { color: #fff; margin-right: 12px; text-decoration: none; }
.menu { display: inline-block; position: relative; margin-right: 12px; }
.menu .submenu { position: absolute; top: 24px; left: 0; background: #fff; color: #333; padding: 8px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: none; }
.menu:hover .submenu { display: block; }
.submenu a { display: block; color: #333; text-decoration: none; margin: 4px 0; }
.submenu .disabled { color: #aaa; }
.content { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.card { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.links { list-style: none; padding: 0; }
.links li { margin: 8px 0; }
.disabled { color: #999; }
.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-card { width: 360px; background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.login-card h1 { margin-top: 0; }
.login-card form { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 14px; color: #333; }
input[type="password"], input[type="date"] { padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
button { padding: 8px 12px; border: none; border-radius: 6px; background: #b30000; color: #fff; cursor: pointer; }
.filters { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; }
.actions { display: flex; gap: 8px; margin-bottom: 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { position: sticky; top: 0; background: #fff; }
th, td { border: 1px solid #eee; padding: 8px; font-size: 13px; }
.error { color: #b30000; font-size: 13px; }

/* Dashboard Styles */
.dashboard-container {
  display: flex;
  min-height: calc(100vh - 50px); /* Adjust based on topbar height */
}

.sidebar {
  width: 250px;
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 20px 0;
  flex-shrink: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li a {
  display: block;
  padding: 15px 20px;
  color: #ecf0f1;
  text-decoration: none;
  transition: background 0.3s;
  border-bottom: 1px solid #34495e;
}

.sidebar-menu li a:hover {
  background-color: #34495e;
  padding-left: 25px;
}

.sidebar-header {
  padding: 20px 20px 10px 20px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #bdc3c7;
  font-weight: bold;
  letter-spacing: 1px;
  border-bottom: 1px solid #34495e;
  background-color: #233342;
}

.main-content {
  flex-grow: 1;
  padding: 24px;
  background-color: #f6f7f9;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Force 2 columns */
  gap: 16px;
  margin-top: 16px;
}

.chart-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  min-height: 300px;
}

.chart-card.full-width {
  grid-column: 1 / -1; /* Span all columns */
}

@media (max-width: 900px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card h3 {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.chart-container {
  width: 100%;
  height: 250px;
}
