/* Focused tab-level normalization for Dashboard, Care Ads, and Product Info. */
.pi-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.pi-mode-toggle {
  width: fit-content;
  margin-bottom: 20px;
}

.pi-filter-section,
.pi-stock-section {
  margin-bottom: 24px;
}

#pi-date-presets {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.pi-date-presets {
  margin-bottom: 20px;
  align-items: center;
}

.pi-date-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

#pi-date-presets > div {
  flex: 0 1 auto;
}

.pi-account-header,
.pi-stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pi-stock-header {
  margin-bottom: 16px;
}

.pi-stock-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

#pi-accounts-list {
  max-height: 152px !important;
  overflow-y: auto !important;
  padding: 8px !important;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card) !important;
}

#tab-product-info .section-card,
#tab-care-ads .section-card,
#tab-care-ads-realtime .section-card,
#tab-creative-studio .section-card {
  background: var(--bg-card) !important;
}

@media (max-width: 768px) {
  .pi-tab-header,
  .pi-account-header,
  .pi-stock-header {
    align-items: flex-start;
  }

  .pi-mode-toggle,
  .pi-stock-actions {
    width: 100%;
  }

  #pi-date-presets {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 6px;
  }

  #pi-date-presets > span {
    display: none;
  }
}
