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

body {
  font-family: 'Noto Sans Thai', sans-serif;
  background-color: #FFFFFF;
  color: #000000;
  padding: 20px;
  line-height: 1.6;
}

#app {
  max-width: 1600px;
  margin: 0 auto;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #000000;
}

.controls {
  margin-bottom: 30px;
  padding: 15px;
  border: 3px solid #000000;
  background-color: #FFFFFF;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  align-items: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

label {
  font-weight: 700;
  font-size: 16px;
}

select {
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 16px;
  padding: 8px 12px;
  border: 2px solid #000000;
  background-color: #FFFFFF;
  color: #000000;
  cursor: pointer;
  min-width: 200px;
}

select:focus {
  outline: 3px solid #000000;
  outline-offset: 2px;
}

.perspective-group {
  display: flex;
  gap: 20px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #000000;
}

.radio-option label {
  cursor: pointer;
  font-size: 16px;
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  border: 3px solid #000000;
}

.error {
  background-color: #F5F5F5;
  border: 3px solid #000000;
  padding: 20px;
  margin: 20px 0;
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 40px;
  border: 3px solid #000000;
  background-color: #F5F5F5;
}

.empty-state h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

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

.partner-card {
  border: 3px solid #000000;
  background-color: #FFFFFF;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.partner-header {
  background-color: #E0E0E0;
  padding: 15px;
  border-bottom: 3px solid #000000;
}

.partner-name {
  font-size: 18px;
  font-weight: 700;
}

.partner-table-container {
  overflow-x: auto;
  flex: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: none;
}

th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  border: 2px solid #000000;
  border-left: none;
  border-right: none;
  font-size: 14px;
  background-color: #F5F5F5;
}

th:first-child {
  border-left: none;
}

th:last-child {
  border-right: none;
}

th.text-right,
td.text-right {
  text-align: right;
}

td {
  padding: 8px 12px;
  border: 2px solid #000000;
  border-left: none;
  border-right: none;
}

td:first-child {
  border-left: none;
}

td:last-child {
  border-right: none;
}

thead tr:first-child th {
  border-top: none;
}

tbody tr:last-child td {
  border-bottom: none;
}

tr.data-row {
  background-color: #FFFFFF;
}

tr.data-row:hover {
  background-color: #FAFAFA;
}

tr.total-row {
  background-color: #E0E0E0;
  font-weight: 700;
}

tr.total-row td {
  border-top: 3px solid #000000;
  padding: 10px 12px;
}

.grand-total {
  margin-top: 20px;
  padding: 20px;
  border: 3px solid #000000;
  background-color: #E0E0E0;
}

.grand-total-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
}

.grand-total-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  font-size: 16px;
}

.grand-total-item {
  display: flex;
  gap: 10px;
}

.grand-total-label {
  font-weight: 700;
}

.grand-total-value {
  font-weight: 400;
}

.stats {
  margin-bottom: 20px;
  padding: 15px;
  border: 3px solid #000000;
  background-color: #F5F5F5;
  font-size: 14px;
}

.stats-row {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  gap: 8px;
}

.stat-label {
  font-weight: 700;
}
