.dataset-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
}

.dataset-panel-project-name {
  padding-top: 18px;
  padding-right: 16px;
  padding-bottom: 16px;
  padding-left: 16px;
  background: #f6f8fa;
  border-bottom: 1px solid #e1e4e8;
  font-size: 12px;
  font-weight: 600;
  color: #0969da;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.dataset-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e1e4e8;
  background: #ffffff;
}

.dataset-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #24292e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dataset-panel-title-icon {
  font-size: 16px;
}

.dataset-panel-toggle-btn {
  padding: 6px 10px;
  border: 1px solid #e1e4e8;
  background: #ffffff;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  color: #24292e;
}

.dataset-panel-toggle-btn:hover {
  background: #f6f8fa;
  border-color: #0969da;
  color: #0969da;
}

.dataset-panel-toggle-btn.expanded {
  background: #0969da;
  color: #ffffff;
  border-color: #0969da;
}

.available-datasets-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #f6f8fa;
  border-bottom: 0px solid #e1e4e8;
}

.available-datasets-panel.expanded {
  max-height: 400px;
  overflow-y: auto;
  border-bottom: 1px solid #e1e4e8;
}

.available-datasets-header {
  padding: 12px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #57606a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.available-datasets-table {
  padding: 8px;
  overflow-x: auto;
}

.available-datasets-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #ffffff;
}

.available-datasets-table thead {
  background: #f6f8fa;
  border-bottom: 2px solid #e1e4e8;
}

.available-datasets-table th {
  padding: 8px;
  text-align: left;
  font-weight: 600;
  color: #57606a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.available-datasets-table tbody tr {
  border-bottom: 1px solid #e1e4e8;
  transition: background 0.2s;
}

.available-datasets-table tbody tr:hover:not(.added) {
  background: #f6f8fa;
}

.available-datasets-table tbody tr.added {
  background: #f0f7ff;
  opacity: 0.7;
}

.available-datasets-table td {
  padding: 10px 8px;
  color: #24292e;
}

.available-datasets-table .name-cell {
  font-weight: 600;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.available-datasets-table .type-cell {
  color: #57606a;
  font-size: 11px;
}

.available-datasets-table .rows-cell,
.available-datasets-table .cols-cell {
  text-align: center;
  color: #57606a;
  font-size: 11px;
}

.available-datasets-table .action-cell {
  text-align: right;
  width: 40px;
}

.table-action-btn {
  padding: 4px 8px;
  border: 1px solid #e1e4e8;
  background: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 28px;
}

.table-action-btn.load:hover {
  background: #0969da;
  border-color: #0969da;
  transform: scale(1.1);
}

.table-action-btn.add:hover {
  background: #28a745;
  border-color: #28a745;
  transform: scale(1.1);
}

.added-badge {
  color: #28a745;
  font-size: 11px;
  font-weight: 600;
}

.available-datasets-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
  gap: 12px;
}

.available-datasets-empty-icon {
  font-size: 48px;
  color: #d0d7de;
}

.available-datasets-empty-text {
  font-size: 12px;
  color: #57606a;
}

.dataset-panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
}

.dataset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dataset-item {
  background: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.dataset-item:hover {
  border-color: #d0d7de;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dataset-item.active,
.dataset-item-compact.active {
  border-color: #0969da;
  background: #f0f7ff;
  box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.1);
}

.dataset-checkbox {
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.dataset-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #0969da;
}

.dataset-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dataset-name {
  font-size: 13px;
  font-weight: 600;
  color: #24292e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dataset-meta {
  font-size: 11px;
  color: #57606a;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dataset-sync {
  font-size: 11px;
  color: #57606a;
}

.dataset-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  color: #57606a;
  margin-top: 4px;
}

.dataset-source-badge.source-file {
  background: #e6f7ff;
  border-color: #91d5ff;
  color: #0969da;
}

.dataset-source-badge.source-api {
  background: #f0f9ff;
  border-color: #91d5ff;
  color: #0969da;
}

.dataset-source-badge.source-google-sheets {
  background: #d4edda;
  border-color: #28a745;
  color: #28a745;
}

.dataset-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dataset-action-btn {
  padding: 4px 6px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #57606a;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
}

.dataset-action-btn:hover {
  background: #e1e4e8;
  color: #24292e;
}

.dataset-action-btn.danger:hover {
  background: #fff1f0;
  color: #dc3545;
}

.dataset-panel-footer {
  border-top: 1px solid #e1e4e8;
  padding: 12px 16px;
}

.dataset-panel-footer-btn {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e1e4e8;
  background: #ffffff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #24292e;
}

.dataset-panel-footer-btn:hover {
  background: #f6f8fa;
  border-color: #0969da;
  color: #0969da;
}

.empty-datasets {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 16px;
}

.empty-datasets-icon {
  font-size: 64px;
  color: #d0d7de;
}

.empty-datasets-text {
  font-size: 14px;
  color: #57606a;
  line-height: 1.5;
}

.empty-datasets-btn {
  padding: 10px 16px;
  border: none;
  background: #0969da;
  color: #ffffff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.empty-datasets-btn:hover {
  background: #0860ca;
}

.dataset-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f6f8fa;
  border-top: 1px solid #e1e4e8;
  font-size: 12px;
  color: #57606a;
}

.dataset-stats-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dataset-stats-value {
  font-weight: 600;
  color: #24292e;
}

.chart-library-panel {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-top: 1px solid #e1e4e8;
  flex: 1;
}

.chart-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e1e4e8;
  background: #f6f8fa;
}

.chart-library-title {
  font-size: 14px;
  font-weight: 600;
  color: #24292e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-library-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.chart-library-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-library-item {
  background: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 10px;
  transition: all 0.2s;
  cursor: pointer;
}

.chart-library-item:hover {
  border-color: #0969da;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.chart-library-item-name {
  font-size: 12px;
  font-weight: 600;
  color: #24292e;
  margin-bottom: 4px;
}

.chart-library-item-meta {
  font-size: 11px;
  color: #57606a;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chart-library-item-btn {
  margin-top: 8px;
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #e1e4e8;
  background: #ffffff;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  color: #24292e;
}

.chart-library-item-btn:hover {
  background: #0969da;
  color: #ffffff;
  border-color: #0969da;
}

/* Chart library buttons */
.chart-library-view-all-btn,
.chart-library-create-btn {
  padding: 4px 8px;
  border: 1px solid #e1e4e8;
  background: #ffffff;
  color: #24292e;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-library-view-all-btn:hover,
.chart-library-create-btn:hover {
  background: #f6f8fa;
  border-color: #d0d7de;
}

.chart-library-view-all-btn {
  background: #f6f8fa;
}

.chart-library-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #57606a;
  font-style: italic;
}
