* { box-sizing: border-box; }
body {
  margin: 0;
  background: #1a1a1a;
  color: #fff;
  font-family: 'Inter', sans-serif;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 28px 20px;
  background: #121212;
  border-right: 1px solid #333;
  overflow-y: auto;
}
.brand { text-align: center; padding-bottom: 20px; }
.brand img { width: 100px; }
label { display: block; font-size: 13px; color: #aaa; margin-bottom: 8px; letter-spacing: .5px; }
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #333;
  background: #262626;
  color: #ccc;
  font-family: inherit;
  outline: none;
}
select:focus { border-color: #d97706; }
.divider { height: 1px; background: #333; margin: 22px 0; }
#nav button {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid #333;
  background: #262626;
  color: #ccc;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
#nav button:hover { border-color: #d97706; }
#nav button.active {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
  font-weight: 700;
}
.export-title { font-family: 'Kanit', sans-serif; font-size: 16px; margin: 0 0 12px; }
.download {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: #d97706;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}
.download:hover { filter: brightness(1.1); }
.main { margin-left: 260px; padding: 28px 32px 48px; }
.header-card {
  border: 1px solid #333;
  border-radius: 25px;
  padding: 32px 40px;
  background: #161616;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
h1 {
  font-family: 'Kanit', sans-serif;
  text-align: center;
  font-size: 36px;
  margin: 0 0 28px;
}
h2 { font-family: 'Kanit', sans-serif; font-size: 19px; margin: 0 0 12px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi-card {
  display: flex;
  align-items: center;
  min-height: 120px;
  padding: 22px;
  background: #222;
  border-radius: 18px;
  border-bottom: 6px solid #d97706;
}
.kpi-card img { width: 45px; margin-right: 20px; }
.kpi-label { font-size: 13px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; }
.kpi-value { font-family: 'Kanit', sans-serif; font-size: 24px; font-weight: 700; color: #fff; }
.panel {
  border: 1px solid #333;
  border-radius: 16px;
  padding: 20px;
  background: #161616;
  margin-bottom: 28px;
}
.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.chart { width: 100%; height: 480px; }
.chart-short { height: 350px; }
.chart-tall { height: 600px; }
.details {
  border-top: 1px solid #333;
  padding-top: 20px;
  margin-top: 8px;
}
summary { cursor: pointer; font-family: 'Kanit', sans-serif; font-size: 18px; }
.table-wrap { overflow: auto; max-height: 420px; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #333; text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; background: #222; color: #d97706; }
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: 100%; }
  .main { margin-left: 0; padding: 20px; }
  .kpi-grid { grid-template-columns: 1fr; }
}
