/* ========================================
   DATASET FOLLOW BUTTON
   ======================================== */
.dataset-follow-btn {
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dataset-follow-btn:hover {
  transform: scale(1.1);
}

.dataset-follow-btn svg {
  width: 20px;
  height: 20px;
}

.dataset-follow-btn svg path {
  stroke: #000F9F;
  transition: fill 0.2s ease;
}

.dataset-follow-btn.following svg path {
  fill: #000F9F;
}

/* ========================================
   HISTORY TAB - FILTER
   ======================================== */
.history-filter-container {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  gap: 8px !important;
  margin-bottom: 24px !important;
}

.history-filter-title {
  width: fit-content !important;
  height: 20px !important;
 
  font-weight: 700 !important;
  font-size: 16px !important;
  line-height: 20px !important;
  letter-spacing: 0 !important;
}

.history-filter-controls {
 position: relative !important;  
  display: flex !important;        
  flex-direction: row !important;
  width: 493px !important;          
  height: auto !important;      
  gap: 32px !important;
  padding-right: 120px !important; 
}

.history-date-inputs {
  display: flex !important;
  flex-direction: row !important;
  width: fit-content !important;
  height: 36px !important;
  gap: 20px !important;
  align-items: center !important;
}

.history-date-input-wrapper {
  display: flex !important;
  flex-direction: row !important;
  width: fit-content !important;
  height: 36px !important;
  border-radius: 4px !important;
  padding: 4px 12px !important;
  gap: 12px !important;
  align-items: center !important;
  background: #FFFFFF !important;
  box-shadow: 1.5px 1px 4px 0 rgba(22, 35, 152, 0.25) !important;
  border: none !important;
}

.history-date-input {
  background: transparent !important;
  color: #333 !important;

  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 28px !important;
  letter-spacing: 0.4444px !important;
  border: none !important;
  outline: none !important;
  width: 110px !important;
  min-width: 110px !important;
  overflow: visible !important;
}

.history-date-separator {

  font-size: 14px !important;
  color: #666 !important;
}

.history-filter-btn {
  
 position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;

  display: flex !important;
  flex-direction: column !important;
  width: 94px !important;
  height: 24px !important;
  border-radius: 4px !important;
  padding: 3px 12px 3px 8px !important;
  gap: 8px !important;
  background: #E3E6FF !important;
  border: none !important;
  cursor: pointer !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s ease !important;
}

.history-filter-btn span {
  width: 64px !important;
  height: 14px !important;

  font-weight: 700 !important;
  font-size: 12px !important;
  line-height: 120% !important;
  letter-spacing: 0 !important;
  color: #FFFFFF !important;
  white-space: nowrap !important;
}

.history-filter-btn.is-active {
  background: #000F9F !important;
}

.history-filter-btn:hover {
  background: #000B7A !important;
}

/* ========================================
   ESTRUTURA DE DADOS
   ======================================== */
#data-structure-content {
  padding: 12px 0 4px 0;
}

.ds-loading {
  color: #9CA3AF;
  font-size: 13px;
  padding: 8px 0;
  margin: 0;
}

.ds-empty {
  color: #6B7280;
  font-size: 14px;
  font-style: italic;
  padding: 8px 0;
  margin: 0;
  text-align: center;
}

.ds-resource-name {
  font-size: 13px;
  font-weight: 700;
  color: #000F9F;
  margin: 12px 0 6px 0;
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 12px;
}

.ds-table thead th {
  text-align: left;
  padding: 7px 12px;
  background: #F3F4F6;
  color: #374151;
  font-weight: 600;
  border-bottom: 2px solid #E5E7EB;
  white-space: nowrap;
}

.ds-table tbody td {
  padding: 7px 12px;
  border-bottom: 1px solid #F3F4F6;
  color: #374151;
  vertical-align: top;
}

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

.ds-table tbody tr:hover td {
  background: #F9FAFB;
}

.ds-col-name {
  font-weight: 600;
  width: 30%;
}

.ds-col-desc {
  width: 50%;
}

.ds-col-type {
  width: 20%;
}

.ds-type-badge {
  display: inline-block;
  background: #EEF2FF;
  color: #000F9F;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ========================================
   API TAB
   ======================================== */
.api-info-banner {
  margin-bottom: 24px;

  
}

.api-banner-main {
  margin: 0 0 10px 0;
  color: #333;
  
  font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 20px;
}

.api-banner-sub {
  margin: 0;

  color: #666;
  font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 20px;
}

.api-info-banner p {
  margin: 0 0 10px 0;
  color: #333;
 font-size: 16px;
}

.api-info-banner p:last-child {
  margin: 0;
 font-size: 16px;
  color: #666;
}

.api-info-banner a {
  color: #000F9F;
}

.api-explorer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.api-section-title {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.api-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.api-field-label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.api-input,
.api-input-readonly {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  background: #f5f5f5;
}

.api-input-readonly {
  background: #f5f5f5;
  color: #666;
}

.api-field-help {
  margin-top: 4px;
  font-size: 11px;
  color: #999;
}

.api-field-help a {
  color: #000F9F;
  text-decoration: none;
}

.api-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.api-submit-btn {
  padding: 10px 24px;
  background: #000F9F;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.api-submit-btn:hover {
  background: #000B7A;
}

.api-results-box {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 16px;
  min-height: 500px;
  max-height: 600px;
  overflow: auto;
}

.api-results-box pre {
  margin: 0;
  font-size: 12px;
  color: #666;
  font-family: monospace;
}

.api-results-box .api-result-data {
  font-size: 11px;
  color: #333;
  line-height: 1.5;
  white-space: pre-wrap;
}

.api-results-box .api-result-error {
  font-size: 12px;
  color: #d32f2f;
}

.api-results-box .api-result-loading {
  font-size: 12px;
  color: #666;
}

/* Dataset Map Visualization */
.dataset-map {
  display: none;
}

.dataset-map.active {
  display: block;
}

.dataset-map-tile {
  position: relative;
}

.dataset-map-tile.tile-1 {
  flex: 26.7;
  background: #DDE3F3;
}

.dataset-map-tile.tile-2 {
  flex: 8.1;
  background: #B9C5DF;
}

.dataset-map-tile.tile-3 {
  flex: 26.7;
  background: #6AA7D8;
}

.dataset-map-tile.tile-3 .dataset-map-value,
.dataset-map-tile.tile-3 .dataset-map-label {
  color: #FFF;
}

.dataset-map-tile.tile-4 {
  flex: 25.1;
  background: #2584B6;
}

.dataset-map-tile.tile-4 .dataset-map-value,
.dataset-map-tile.tile-4 .dataset-map-label {
  color: #FFF;
}

.dataset-map-tile.tile-5 {
  flex: 28.7;
  background: #006CB3;
}

.dataset-map-tile.tile-5 .dataset-map-value,
.dataset-map-tile.tile-5 .dataset-map-label {
  color: #FFF;
}

.dataset-map-tile.tile-6 {
  flex: 26.4;
  background: #004F85;
}

.dataset-map-tile.tile-6 .dataset-map-value,
.dataset-map-tile.tile-6 .dataset-map-label {
  color: #FFF;
}

.dataset-map-tile.tile-7 {
  flex: 26.3;
  background: #E9E5F0;
}

/* Chart Loader */
.chart-loader {
  display: none;
}

.chart-loader.active {
  display: block;
}


.resources-table-wrapper {
  width: 100%;
}

.resources-table-header,
.resource-row {
  display: grid;
  grid-template-columns: 1fr 160px 160px 100px;
  align-items: center;
  padding: 12px 16px;
}

.resources-table-header .res-col.res-format,
.resources-table-header .res-col.res-download,
.resources-table-header .res-col.res-actions,
.resource-row .res-col.res-format,
.resource-row .res-col.res-download,
.resource-row .res-col.res-actions {
  text-align: center;
  justify-content: center;
  display: flex;
  align-items: center;
}

.resources-table-header {
  font-weight: 600;
  background: #EEF2FF;
  color: #111827;
  margin-bottom: 6px;
  padding: 12px 16px;
}

.resource-row {
  border-bottom: 1px solid #E5E7EB;
}

.res-col {
  align-self: center;
}

.res-col.res-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.res-col strong {
  font-size: 15px;
  color: #111827;
}


.res-ver-mais-btn {
  width: auto;
  justify-content: flex-start;
  text-align: left;
}


.resource-meta {
  grid-column: 1 / -1;
  display: none;
  background: #f4f6ff;
  border-left: 3px solid #000F9F;
  padding: 16px 24px;
  margin-top: 0;
}

.resource-meta.open {
  display: block;
}

.res-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px 24px;
  margin-bottom: 20px;
}

.res-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.res-meta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6B7280;
}

.res-meta-value {
  font-size: 13px;
  color: #111827;
  word-break: break-word;
}

.res-meta-link {
  color: #000F9F;
  text-decoration: none;
  font-size: 13px;
  word-break: break-all;
}

.res-meta-link:hover {
  text-decoration: underline;
}

.res-meta-structure {
  border-top: 1px solid #D1D5DB;
  padding-top: 14px;
  margin-top: 4px;
}

.res-meta-structure-title {
  font-size: 13px;
  font-weight: 700;
  color: #000F9F;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}


.resource-details {
  grid-column: 1 / -1;
  display: none;
  background: #f9f9f9;
  border-left: 2px solid #000F9F;
  padding: 0;
  margin-top: 0;
}

.resource-details.open {
  display: block;
}

.res-vtabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #E5E7EB;
  padding: 0 16px;
  background: #FAFAFA;
}

.res-vtab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s ease;
}

.res-vtab:hover {
  color: #000F9F;
}

.res-vtab--active {
  color: #000F9F;
  border-bottom-color: #000F9F;
  font-weight: 600;
}

.res-vtab-content {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.res-vtab-content--main {
  padding: 0 24px;
  box-sizing: border-box;
  display: block;
}

.resource-details .dataset-details-bottom {
  display: none !important;
}


.res-eye-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.res-eye-btn:hover {
  color: #000F9F;
  background: #EEF2FF;
}

.res-eye-btn.open {
  color: #000F9F;
  background: #EEF2FF;
}

.res-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.res-download-btn:hover {
  color: #000F9F;
  background: #EEF2FF;
}

.format-pill {
  background: #000F9F;
  color: #FFFFFF;
  padding: 4px 12px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .resources-table-header,
  .resource-row {
    grid-template-columns: 1fr 80px 80px 80px;
  }
  .res-meta-grid {
    grid-template-columns: 1fr;
  }
}

