body {
  min-height: 100vh;
}

.trend-chart {
  width: 100%;
  height: auto;
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.08), rgba(13, 110, 253, 0));
  border-radius: 1rem;
}

.area-chart {
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

.area-chart--green {
  background: linear-gradient(180deg, rgba(25, 135, 84, 0.06), rgba(25, 135, 84, 0));
}

.chart-tooltip {
  position: absolute;
  background: #1e293b;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  pointer-events: none;
  z-index: 1050;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: none;
}

.chart-tooltip-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
}

.chart-tooltip-value {
  font-weight: 600;
}

.chart-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.chart-tooltip-key {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
}

.chart-tooltip-val {
  font-weight: 600;
}

.cost-progress {
  height: 0.85rem;
  border-radius: 999px;
}

.cost-progress .progress-bar {
  border-radius: 999px;
}

/* Cost Management: keep the add-filter actions inside the viewport even when
   Azure returns long resource, product, or meter names. */
.acm-add-filter-panel {
  width: 560px;
  max-width: calc(100vw - 1rem);
}

.acm-add-filter-body {
  min-height: 280px;
  min-width: 0;
  overflow: hidden;
}

.acm-add-filter-fields {
  flex: 0 0 215px;
  min-width: 0;
}

.acm-add-filter-values {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.acm-add-filter-value-list {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 290px;
  overflow-x: hidden;
  overflow-y: auto;
}

.acm-add-filter-value-list .af-value-item {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.acm-add-filter-value-list .af-value-item.af-value-item--hidden {
  display: none !important;
}

.acm-add-filter-value-list .af-value-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acm-add-filter-footer,
.acm-add-filter-actions {
  flex-shrink: 0;
}

.ov2-date-picker .min-w-0 {
  min-width: 0;
}

.ov2-date-menu {
  min-width: 360px;
}

.ov2-date-menu-heading {
  color: #555;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ov2-date-range-label {
  font-size: 0.75rem;
  white-space: nowrap;
}

.ov2-date-menu .btn-link:disabled {
  color: var(--bs-secondary-color);
  text-decoration: none;
}

/* Cost Management smart view: Resources */
.smart-resources-search {
  width: min(320px, 100%);
}

.smart-resources-scroll {
  max-height: 650px;
  overflow: auto;
}

.smart-resources-table {
  width: 100%;
  min-width: 1240px;
  table-layout: fixed;
  font-size: 0.8rem;
}

.smart-resource-col-name { width: 250px; }
.smart-resource-col-type { width: 155px; }
.smart-resource-col-group { width: 205px; }
.smart-resource-col-location { width: 115px; }
.smart-resource-col-subscription { width: 235px; }
.smart-resource-col-tags { width: 170px; }
.smart-resource-col-total { width: 110px; }

.smart-resources-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.65rem 0.55rem;
  color: #495057;
  background: #fff;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.smart-resources-table > tbody > tr.smart-resource-row > td {
  max-width: 260px;
  padding: 0.42rem 0.55rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-resources-table > thead > tr > th:last-child {
  right: 0;
  z-index: 5;
  background: #fff;
  box-shadow: -5px 0 7px -7px rgba(0, 0, 0, 0.65);
}

.smart-resources-table > tbody > tr.smart-resource-row > td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -5px 0 7px -7px rgba(0, 0, 0, 0.65);
}

.smart-resource-name-cell {
  min-width: 285px;
}

.smart-resource-toggle {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 0.15rem;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: #0878d1;
  text-decoration: none;
  vertical-align: middle;
}

.smart-resource-toggle-symbol {
  display: inline-flex;
  width: 0.85rem;
  height: 0.85rem;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.smart-resource-icon {
  margin-right: 0.35rem;
  color: #249be8;
}

.smart-resource-name {
  color: #0878d1;
}

.smart-resource-tags {
  display: flex;
  width: 100%;
  max-width: 155px;
  gap: 0.22rem;
  overflow: hidden;
  white-space: nowrap;
}

.smart-resource-tag {
  display: inline-block;
  max-width: 170px;
  padding: 0.08rem 0.3rem;
  overflow: hidden;
  color: #24435a;
  background: #d8ecfa;
  border-radius: 0.12rem;
  text-overflow: ellipsis;
}

.smart-resource-detail-row > td {
  padding: 0.7rem 1.75rem !important;
  background: #fafbfc;
}

.smart-resource-inner-table {
  min-width: 1000px;
  font-size: 0.78rem;
  border: 1px solid #dfe4e8;
}

.smart-resource-inner-table thead th {
  padding: 0.5rem;
  color: #495057;
  background: #f4f5f6;
  white-space: nowrap;
}

.smart-resource-inner-table tbody td {
  padding: 0.42rem 0.5rem;
}

.smart-resource-selected-chip {
  color: #17384d;
  background: #e5f2fa;
}

.smart-resource-services-table {
  width: 100%;
  min-width: 1050px;
  table-layout: fixed;
  font-size: 0.82rem;
}

.smart-resource-services-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.65rem 0.55rem;
  color: #343a40;
  background: #fff;
  white-space: nowrap;
}

.smart-resource-services-table > thead > tr > th:first-child { width: 28%; }
.smart-resource-services-table > thead > tr > th:nth-child(2) { width: 25%; }
.smart-resource-services-table > thead > tr > th:nth-child(3) { width: 20%; }
.smart-resource-services-table > thead > tr > th:nth-child(4) { width: 19%; }
.smart-resource-services-table > thead > tr > th:last-child { width: 8%; }

.smart-resource-services-table > tbody > tr.smart-resource-service-row > td {
  padding: 0.46rem 0.55rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-resource-services-table > thead > tr > th:last-child,
.smart-resource-services-table > tbody > tr.smart-resource-service-row > td:last-child {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #fff;
  box-shadow: -5px 0 7px -7px rgba(0, 0, 0, 0.65);
}

.smart-resource-service-detail-table {
  min-width: 900px;
}

.smart-resource-final-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  font-size: 0.82rem;
}

.smart-resource-final-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.65rem 0.55rem;
  color: #343a40;
  background: #fff;
  white-space: nowrap;
}

.smart-resource-final-table > thead > tr > th:last-child {
  width: 120px;
}

.smart-resource-final-table > tbody > tr.smart-resource-level-row > td {
  padding: 0.46rem 0.55rem;
}

.smart-resource-final-table > thead > tr > th:last-child,
.smart-resource-final-table > tbody > tr.smart-resource-level-row > td:last-child {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #fff;
  box-shadow: -5px 0 7px -7px rgba(0, 0, 0, 0.65);
}

.smart-resource-final-detail-table {
  min-width: 980px;
}

.local-tags-heading-copy {
  position: relative;
  padding-left: 1.5rem;
}

.local-tags-heading-copy > .bi {
  position: absolute;
  top: 0.45rem;
  left: 0;
}

.local-tags-aligned-copy {
  position: relative;
  padding-left: 1.5rem;
}

.local-tags-aligned-copy > .bi:first-child {
  position: absolute;
  top: 50%;
  left: 0.5rem;
  transform: translateY(-50%);
}

@media (max-width: 575.98px) {
  .acm-add-filter-fields {
    flex-basis: 40%;
  }

  .acm-add-filter-footer {
    flex-wrap: wrap;
  }

  .acm-add-filter-actions {
    margin-left: auto;
  }

  .ov2-date-menu {
    min-width: min(360px, calc(100vw - 2rem));
  }
}
