body {
  margin: 0;
  font-family: "Manrope", sans-serif;
}

#showMetricsBtn {
  height: 51px;
  width: 211px;
  background-color: #277ad4;
  color: #ffffff;
  font-weight: 600;
  font-size: 18px;
  border-radius: 30px;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.sidebar {
  background-image: radial-gradient(#b5b5b5 1px, transparent 1px),
    linear-gradient(to bottom, #277ad4, #ffffff);
  background-size: 18px 18px, 100% 100%;
  background-position: 0 0, 0 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 700px;
  max-width: 100%;
  height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  transform: translateX(-110%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 100;
  border-radius: 26px;
}

.sidebar.open {
  transform: translateX(0);
  z-index: 10005;
}

.sidebar-inner {
  background: transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  margin-bottom: 16px;
  align-items: start;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  width: 100%;
}

.logo-img {
  width: 96px;
  height: auto;
}

.header-text .brand-subtitle {
  font-size: 13px;
  opacity: 0.9;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
 
.header-back-btn {
  display: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: black;
  border-radius: 20px;
  padding: 5px 10px 5px 6px;
  background: #fff;
}

.header-back-btn .back-icon{
  height: 10px;
  margin-right: 4px;
}

.sidebar-header.has-back .header-right {
  width: 100%;
}

.sidebar-header.has-back .header-back-btn {
  display: inline-flex;
  margin-right: auto;
}

.close-btn {
  background: #ffffff;
  color: #000000;
  border-radius: 50%;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 30px;
  line-height: normal;
  cursor: pointer;
}

.loader-container {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.custom-loader-image {
  width: 80px;
  height: 80px;
}

.metricSectionsContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.metrics-overview {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.overall-status-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  background: linear-gradient(to bottom, #feefcf, #ffffff);
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  color: #171717;
}

.overall-left {
  display: flex;
  gap: 8px;
}

.overall-left .critical-icon {
  height: 24px;
}

.overall-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 22px;
}

.overall-title-highlight {
  font-weight: 700;
}

.overall-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.4;
}

.overall-list li::marker {
  color: #d02020;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill--warning {
  background: #d02020;
  color: #ffffff;
}

.metric-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 16px;
}

.metric-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 14px 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.metric-card.metric-card--accessibility {
  margin-bottom: 16px;
}

.metric-card:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.metric-card-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-icon-box {
  width: 64px;
  height: 64px;
  background: #fcaf17;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
}

.metric-icon-box img {
  width: 32px;
  height: 32px;
}

.metric-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #2e2054;
  width: 50%;
  line-height: 22px;
}

.metric-card-subtitle {
  font-size: 12px;
  color: #7a6f90;
}

.metric-card-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #dbd3e7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}

.metric-card-arrow-image {
  width: 18px;
  height: 18px;
}

.metric-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 11px;
}

.metric-card-caption {
  color: #8a7fa8;
}

.metric-card-status {
  font-weight: 600;
}

.metric-card-status .dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border: 1px solid;
  border-radius: 50%;
  margin-right: 5px;
}

.metric-card-status--good {
  color: #0d9b40;
}

.metric-card-status--good .dot {
  background: #0d9b40;
}

.metric-card-status--bad {
  color: #d02020;
}

.metric-card-status--bad .dot {
  background: #d02020;
}

.metric-card-status--attention {
  color: #c47a07;
}

.metric-card-status--attention .dot {
  background: #c47a07;
}

.metric-detail {
  display: none;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  height: calc(94vh - 44px);
}

.metric-detail.active {
  display: block;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(345.4deg, #ffffff 25.9%, #feefcf 90.95%);
  border-radius: 22px;
  padding: 18px 20px;
  border-bottom: 2px solid #e8e8ef;
}

.detail-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.detail-title {
  font-size: 22px;
  font-weight: 600;
  color: #2e2054;
}

.detail-subtitle {
  font-size: 12px;
  color: #7a6f90;
}

.detail-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #7a6f90;
}

.detail-date {
  white-space: nowrap;
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: scroll;
  height: 100%;
  padding: 2px 18px 22px;
  height: 73vh;
}


.detail-body::-webkit-scrollbar {
  display: none;
}

.detail-section--engagement {
  background: #eeeaf380;
  border: solid 1px #ccc;
  padding: 16px;
  border-radius: 10px;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #5b22a8;
}

.detail-section--two-column {
  background: #eeeaf380;
  border: solid 1px #ccc;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  border-radius: 10px;
}

.detail-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

/* ---- Card wrapper (matches Figma white/soft-purple card) ---- */

.detail-section--performance {
  margin-top: 24px;
  padding: 24px 32px 28px;
  border-radius: 24px;
  border: 1px solid #e8e1ff;
  background: #eeeaf380;
}

.detail-section--performance h3 {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 700;
  color: #5b22a8;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* ---- Gauge ---- */

.performance-score-widget {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.gauge-container {
  position: relative;
  width: 280px;   /* overall size of the gauge */
  height: 140px;
}

.gauge {
  width: 100%;
  height: 100%;
}
.gauge-track {
  fill: none;
  stroke: #f1ecff;
  stroke-width: 18;
  stroke-linecap: round;
}

.gauge-violet {
  fill: none;
  stroke:#7c3aed50;
  stroke-width: 18;
  stroke-linecap: butt;

  stroke-dasharray: 204;
  stroke-dashoffset: 204;
}

.gauge-yellow {
  fill: none;
  stroke:#2FB465;
  stroke-width: 18;
  stroke-linecap: butt;

  stroke-dasharray: 204;
  stroke-dashoffset: 204;
}



.gauge-inner-dashed {
  fill: none;
  stroke: #c4b5fd; /* soft violet dots */
  stroke-width: 2;
  stroke-linecap: round;

  stroke-dasharray: 2 8; /* dot + gap */
}


.score-overlay {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.score-value {
  font-size: 32px;
  font-weight: 800;
  color: #5b22a8;
}

.score-value::after {
  content: "%";
  margin-left: 2px;
  font-size: 0.75em;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #12b76a;  /* green pill */
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.score-pill-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #12b76a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.score-label {
  font-size: 13px;
  font-weight: 600;
}

/* ---- Desktop / Mobile segmented control ---- */

.performance-toggle {
  display: flex;
  justify-content: center;
  width: 260px;
  margin: 0 auto;
  margin-top: 8px;
  padding: 4px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 12px 25px rgba(26, 8, 72, 0.08);
}

.performance-toggle .toggle-btn {
  flex: 1 1 0;
  border: none;
  background: transparent;
  color: #6b6b6b;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* active segment (matches Figma filled tab) */
.performance-toggle .toggle-btn.active {
  background: #f3ecff;
  color: #20114f;
  box-shadow: 0 8px 18px rgba(85, 46, 145, 0.18);
}

/* clear old fixed sizes / borders */
.desktop-toggle-btn,
.mobile-toggle-btn {
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  padding: 10px 24px;
}

/* accessibility focus */
.performance-toggle .toggle-btn:focus-visible {
  outline: 2px solid #5b22a8;
  outline-offset: 2px;
}

.detail-section--accessibility {
  margin-top: 20px;
  background: #eeeaf380;
  border: solid 1px #ccc;
  padding: 16px;
  border-radius: 10px;
}

.detail-section--accessibility h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #5b22a8;
}

/* change */
.compliance-coverage-list {
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 12px;
  overflow: hidden;               
}

.compliance-coverage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f1f1;
}

.compliance-coverage-item:last-child {
  border-bottom: none;
}

.compliance-coverage-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compliance-coverage-icon {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}

.compliance-coverage-icon.success {
  background: #27c281;         
}

.compliance-coverage-icon.neutral {
  background: #5b28a6;      
}

.compliance-coverage-text {
  font-size: 15px;
  color: #222;
}
.compliance-coverage-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 34px;    
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.compliance-coverage-badge::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
  border-radius: 50%;
  display: inline-block;
}

.compliance-coverage-badge.success {
  background: #27c281;         
  color: #ffffff;
}
.compliance-coverage-badge.success::before {
  background: #1fb573;         
}
.compliance-coverage-badge.success::after {
  content: "✔";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 12px;
  color: #ffffff;
}

.compliance-coverage-badge.neutral {
  background: #e6dbfa;            
  color: #4d2c93;                 
}
.compliance-coverage-badge.neutral::before {
  background: #5b28a6;           
}
.compliance-coverage-badge.neutral::after {
  content: "−";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 14px;
  color: #ffffff;
}



.wcag-compliance-metrics{
  margin-top:24px;
  background: #eeeaf380;
    border: solid 1px #ccc;
    padding: 16px;
    border-radius: 10px;
}

.metric-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: linear-gradient(to bottom, #dbd3e7, #ffffff);
  border-radius: 14px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  font-size: 12px;
  color: #2e2054;
}

.metric-box--large {
  min-height: 72px;
}

.metric-box-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.metric-label {
  font-weight: 600;
}

.metric-label.short {
  display: none;
}

.metric-value {
  font-weight: 700;
  font-size: 13px;
}

.metric-box-footer {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  font-size: 11px;
}

.metric-tag {
  height: 28px;
}

.metric-box .page-performance-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.metric-text {
  display: flex;
  flex-direction: column;
}

.metric-text .headings-page-performance {
  font-size: 12px;
  font-weight: 600;
  color: #7a6f90;
}

.metric-text .metric-value {
  font-size: 14px;
  font-weight: 600;
  color: #2e2054;
}

.detail-metrics-grid-engagement {
  width: 100%;
  border-radius: 16px;
  padding: 0;
  border: none;
}

.detail-metrics-grid-engagement .metric-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  min-height: 58px;
  border-bottom: 1px solid #eee;
  background: #ffffff;
  font-size: 14px;
}

.detail-metrics-grid-engagement .metric-row:first-child {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.detail-metrics-grid-engagement .metric-row:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* 3 equal flex columns */
.detail-metrics-grid-engagement .metric-left,
.detail-metrics-grid-engagement .metric-middle,
.detail-metrics-grid-engagement .metric-right {
  flex: 1 1 0;
  display: flex;
  align-items: center;
}

/* left: icon + label */
.detail-metrics-grid-engagement .metric-left {
  gap: 12px;
  min-width: 0;
}

.detail-metrics-grid-engagement .metric-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-metrics-grid-engagement .metric-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.detail-metrics-grid-engagement .metric-label {
  color: #3c3c43;
  font-weight: 600;
  line-height: 20px;
}

/* middle: value centered */
.detail-metrics-grid-engagement .metric-middle {
  justify-content: center;
}

.detail-metrics-grid-engagement .metric-value {
  color: #1d1d1f;
  font-weight: 800;
  letter-spacing: 0.1px;
}

/* right: pill aligned to end */
.detail-metrics-grid-engagement .metric-right {
  justify-content: flex-start;
}

/* optional hover */
.detail-metrics-grid-engagement .metric-row:hover {
  background: #f9f9f9;
}

/* mobile tweak */
@media (max-width: 480px) {
  .detail-metrics-grid-engagement .metric-row {
    padding: 10px 12px;
  }

  .detail-metrics-grid-engagement .metric-middle {
    justify-content: flex-start;
  }
}



.metric-divider {
  margin-top: 9px;
  width: 100%;
  height: 2px;
  background-color: #e0e0e0;
  border: none;
}

@media (max-width: 480px) {
  .metric-label.long {
    display: none;
  }
  .metric-label.short {
    display: inline-block;
  }
  .metric-rating .metric-status-icon {
    height: 20px;
  }
}

@media (max-width: 420px) {
  .behaviour-context .metric-icon {
    width: 36px;
    height: 36px;
  }

  .behaviour-context .metric-icon img {
    width: 20px;
    height: 20px;
  }

  .behaviour-context .metric-label {
    font-size: 14px;
  }

  .behaviour-context .metric-value {
    font-size: 22px;
  }
}

.peak-traffic-by-hr-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /* font-family: Arial, sans-serif; */
}

/* PAGE CONTENT */
.page-content {
  padding: 60px;
  background: #f7f7f7;
}

.block {
  height: 300px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

#showMetricsBtn.cta-card {
  position: fixed;
  right: 40px;
  top: 40%;
  transform: translateY(-50%);
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 4px 5px 10px;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: auto;
  transition: padding 180ms ease, gap 180ms ease;
  height: auto;
}

#showMetricsBtn.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #1479e9;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 121, 233, 0.35);
  z-index: -1;
}

/* Text */
#showMetricsBtn .cta-text {
  color: #fff;
  white-space: nowrap;
}

/* Icon */

#showMetricsBtn.is-collapsed {
  padding: 5px 4px 5px 6px;
  gap: 0;
}

#showMetricsBtn.is-collapsed::before {
  border-radius: 12px;
}

#showMetricsBtn.is-collapsed .cta-media img {
  width: 70px;
  height: 70px;
}

#showMetricsBtn.is-collapsed .cta-text {
  display: none;
}


#showMetricsBtn.is-collapsed:hover {
  padding: 12px 24px;
  padding: 5px 4px 5px 10px;
  gap: 4px;
}

#showMetricsBtn.is-collapsed:hover .cta-text {
  display: inline-block;
}
#showMetricsBtn .cta-media img {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  display: block;
  position: relative;
  z-index: 1;
  filter: contrast(2);
}

#showMetricsBtn:hover .cta-text {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

#showMetricsBtn:hover::before {
  opacity: 1;
}





.metric-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  font-weight: 600;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
}


.metric-good {
  
  color: #1A7F37;
}


.metric-moderate {
  
  color: #6941C6;
}

.metric-bad {
 
  color: #B42318;
}






#performanceDetail .detail-metrics-grid-engagement .metric-row,
#accessibilityDetail .detail-metrics-grid-engagement .metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto 140px; 
  column-gap: 16px;
  align-items: center;
}


#performanceDetail .detail-metrics-grid-engagement .metric-left,
#accessibilityDetail .detail-metrics-grid-engagement .metric-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

#performanceDetail .detail-metrics-grid-engagement .metric-label,
#accessibilityDetail .detail-metrics-grid-engagement .metric-label {
  white-space: nowrap;
}


#performanceDetail .detail-metrics-grid-engagement .metric-middle,
#accessibilityDetail .detail-metrics-grid-engagement .metric-middle {
  justify-self: center;
}

#performanceDetail .detail-metrics-grid-engagement .metric-right,
#accessibilityDetail .detail-metrics-grid-engagement .metric-right {
  justify-self: flex-start;   
  display: flex;
  align-items: center;
}


#performanceDetail .detail-metrics-grid-engagement .metric-rating,
#accessibilityDetail .detail-metrics-grid-engagement .metric-rating {
  white-space: nowrap;
}

.shimmer-card {
  height: 15px;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(to bottom, #f5e7ca66, #77101021);
  position: relative;
  overflow: hidden;
}

.shimmer-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.9) 50%,   /* brighter highlight */
    rgba(255, 255, 255, 0) 100%
  );
  box-shadow: 0 0 10px rgba(0,0,0,0.1); /* subtle shadow for contrast */
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(300%);
  }
}


/* 
   MOBILE LAYOUT  */

@media (max-width: 768px) {

 
  .sidebar {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    padding: 16px 16px 24px !important;
    border-radius: 0 !important;        
    box-sizing: border-box;
    transform: translateX(-100%) !important; 
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar-inner {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  
  .sidebar-header {
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 12px;
  }

  .header-left {
    width: auto;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .header-right {
    position: absolute;
    top: 0;
    right: 0;
  }

  .logo-img {
    width: 90px;
  }

  .header-text .brand-subtitle {
    font-size: 12px;
  }

  
  .metrics-overview {
    gap: 16px;
  }

  .overall-status-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 16px;
  }

  .overall-left {
    align-items: flex-start;
  }

  .overall-title {
    font-size: 18px;
    line-height: 1.3;
  }

  .overall-list {
    font-size: 13px;
  }

  .overall-right {
    align-self: flex-end;
  }

  .status-pill {
    font-size: 11px;
    padding: 4px 12px;
  }

  
  .metric-card-grid {
    grid-template-columns: 1fr !important;   
    gap: 12px;
  }

  .metric-card {
    width: 100%;
    padding: 14px 14px;
    border-radius: 18px;
  }

  .metric-card-left {
    gap: 12px;
  }

  .metric-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    flex: 0 0 56px;
  }

  .metric-icon-box img {
    width: 28px;
    height: 28px;
  }

  .metric-card-title {
    font-size: 16px;
    line-height: 20px;
    width: auto;
  }

  .metric-card-footer,
  .metric-card-caption {
    font-size: 12px;
  }

  /* --- CTA button position on mobile --- */
  #showMetricsBtn.cta-card {
    right: 16px !important;
    bottom: 16px !important;
    top: auto !important;
    transform: none !important;
    z-index: 50 !important;   /* lower than .sidebar (100) on mobile only */
  }

  #showMetricsBtn .cta-media img {
    width: 56px;
    height: 56px;
  }

  body {
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .overall-left .critical-icon {
    height: 20px;
  }
  .overall-title {
    font-size: 16px;
  }
}

/* page analytics tab */
@media (max-width: 768px) {

  
  .metric-detail {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: none;
    height: 100%;
    max-height: none;
    overflow: hidden;
  }

  .detail-body {
    min-height: calc(100vh - 225px);
    height: calc(100% - 130px);
    max-height: none;
    overflow-y: auto;
    padding: 14px 14px 20px;
    gap: 18px;
  }

  
  .detail-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 14px 16px;
    border-radius: 18px;
  }

  .detail-header-left {
    justify-content: flex-start;
  }

  .detail-title {
    font-size: 18px;
  }

  .detail-header-right {
    width: 100%;
    justify-content: center;
  }



}

@media (max-width: 768px) {
  .sidebar-header {
    background-size: 18px 18px, 100% 100%;
    background-position: 0 0, 0 0;

    margin-bottom: 0;          
    padding-top: 8px;
    padding-bottom: 12px;
  }
}

@media (max-width: 768px) {
  .overall-status-card {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 16px 18px;
  }

  .overall-left {
    align-items: flex-start;
    padding-right: 120px;
  }

  .overall-right {
    position: absolute;
    top: 18px;  
    right: 16px;
    align-self: auto;
  }
}
 
/* full width fix for text */
@media (max-width: 768px) {
  .overall-status-card {
    position: relative;
    display: block;                 /* override flex */
    padding: 18px 16px 18px;
  }

  .overall-left {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding-right: 0 !important;    /* kill any old padding-right */
  }

  /* make the text container expand to full width beside the icon */
  .overall-left > div:last-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* pill on same line as "Critical Metrics" */
  .overall-right {
    position: absolute;
    top: 18px;                      /* equals card padding-top */
    right: 16px;
    align-self: auto;
  }
}





/* =========================================================
   ACCESSIBILITY – BASE / DESKTOP STYLES
========================================================= */

.accessibility-metric-grid .group-section {
    margin-bottom: 25px;
}

.accessibility-metric-grid .group-section .group-title {
    display: inline-block;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 800;
}

/* =========================================================
   ACCORDION
========================================================= */

.accessibility-metric-grid .accordion {
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e2f0;
}

.accessibility-metric-grid .accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    cursor: pointer;
    padding: 12px;
    font-size: 16px;
    color: #3c3c43;
}

.accessibility-metric-grid .accordion-header span {
    display: inline-block;
}

.accessibility-metric-grid .accordion-arrow {
    font-size: 40px;
    line-height: 1;
    font-weight: normal;
    transition: all 0.2s ease;
}

.accessibility-metric-grid .accordion-arrow.open {
    padding: 0 11px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #000;
}

.accessibility-metric-grid .accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 10px;
    transition: max-height 0.3s ease;
}

.accessibility-metric-grid .accordion-content.open {
    padding: 10px;
    max-height: 1000px;
}

/* =========================================================
   ELEMENT CARD
========================================================= */

.accessibility-metric-grid .element-card {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
}

.accessibility-metric-grid .element-card h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.accessibility-metric-grid .element-card img {
    max-width: 100%;
    margin-top: 8px;
    border-radius: 4px;
}

/* =========================================================
   CODE / SEARCH PLACEHOLDER
========================================================= */

.accessibility-metric-grid .accordion-content pre.search-placeholder,
.accessibility-metric-grid .element-card pre.search-placeholder {
    margin: 6px 0;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    color: #1a73e8;
    white-space: pre-wrap;
}

/* =========================================================
   MOBILE STYLES (≤ 768px)
========================================================= */

@media (max-width: 768px) {

    /* ---------- Container & Header ---------- */

    #accessibilityDetail {
        background: #ffffff;
        border-radius: 18px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
        height: auto;
        max-height: none;
    }

    #accessibilityDetail .detail-body {
        min-height: calc(100vh - 180px);
        height: calc(100% - 130px);
        max-height: none;
        overflow-y: auto;
        padding: 14px 14px 20px;
        gap: 18px;
    }

    #accessibilityDetail .detail-header {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 14px 14px 16px;
        align-items: stretch;
        border-radius: 18px;
    }

    #accessibilityDetail .detail-header-left {
        justify-content: flex-start;
    }

    #accessibilityDetail .detail-title {
        font-size: 18px;
    }

    #accessibilityDetail .detail-header-right {
        display: none;
    }

    /* ---------- Accessibility Score (Gauge) ---------- */

    #accessibilityDetail .detail-section--accessibility {
        margin-top: 16px;
        padding: 16px 16px 18px;
        border-radius: 18px;
        border: 1px solid #e8e1ff;
        background: #f8f6ff;
    }

    #accessibilityDetail .detail-section--accessibility h3 {
        margin-bottom: 10px;
        font-size: 16px;
        font-weight: 700;
        color: #5b22a8;
    }

    #accessibilityDetail .performance-score-widget {
        justify-content: center;
        margin-bottom: 14px;
    }

    #accessibilityDetail .performance-score-widget .gauge-container {
        width: min(260px, 80vw);
        height: calc(min(260px, 80vw) * 0.5);
    }

    /* Device toggle */

    #accessibilityDetail .performance-toggle.accessibility-toggle {
        width: 100%;
        max-width: 260px;
        margin: 6px auto 0;
    }

    /* ---------- WCAG Compliance Metrics ---------- */

    #accessibilityDetail .wcag-compliance-metrics {
        margin-top: 18px;
        padding: 16px 16px 12px;
        border-radius: 18px;
        border: 1px solid #e8e1ff;
        background: #f8f6ff;
    }

    #accessibilityDetail .wcag-compliance-metrics h3 {
        margin-bottom: 12px;
        font-size: 16px;
        font-weight: 700;
        color: #5b22a8;
    }

    /* ---------- Grid & Accordion Overrides ---------- */

    #accessibilityDetail .accessibility-metric-grid .group-section {
        margin-bottom: 18px;
    }

    #accessibilityDetail .accessibility-metric-grid .group-section .group-title {
        margin-bottom: 6px;
        font-size: 12px;
    }

    #accessibilityDetail .accessibility-metric-grid .accordion-header {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Accordion behavior override for mobile */

    #accessibilityDetail .accessibility-metric-grid .accordion-content {
        display: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
    }

    #accessibilityDetail .accessibility-metric-grid .accordion-content.open {
        display: block;
        padding: 10px 12px 12px;
        max-height: none;
    }

    /* ---------- Element Card (Mobile) ---------- */

    #accessibilityDetail .accessibility-metric-grid .element-card {
        padding: 10px 12px;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    #accessibilityDetail .accessibility-metric-grid .element-card h4 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        font-size: 14px;
    }

    /* ---------- Code Blocks (Mobile) ---------- */

    #accessibilityDetail .accessibility-metric-grid .accordion-content pre.search-placeholder,
    #accessibilityDetail .accessibility-metric-grid .element-card pre.search-placeholder {
        font-size: 12px;
        line-height: 1.4;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

}
/* =====================================================
   1) BASE — ENGAGEMENT
===================================================== */

#pageAnalyticsDetail .detail-section--engagement .metric-divider {
    display: none;
}

#pageAnalyticsDetail .detail-section--engagement .metric-value {
    white-space: nowrap;
}

#pageAnalyticsDetail .detail-section--engagement .metric-right-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 32px;
    border-left: 1.3px solid #d0d0d0;
}


/* =====================================================
   2) BASE — LOADING STATE
===================================================== */

#pageAnalyticsDetail .detail-body.is-loading {
    filter: blur(3px);
    opacity: 0.6;
    pointer-events: none;
    transition: filter 0.2s ease, opacity 0.2s ease;
}


/* =====================================================
   3) DATE RANGE INPUT (TRIGGER)
===================================================== */

.detail-date-range {
    position: relative;
    display: inline-block;
}

.date-range-input {
    padding: 10px 25px 10px 16px;
    min-width: 206px;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    background: #ffffff;
    color: #2e2054;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.date-range-input:focus {
    outline: none;
    border-color: #512b8b;
    box-shadow: 0 0 0 2px rgba(81, 43, 139, 0.2);
}

.detail-date-range::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #7a6f90;
    pointer-events: none;
}


/* =====================================================
   4) DATE RANGE PICKER SKIN (bootstrap-daterangepicker)
===================================================== */

.daterangepicker {
    z-index: 3000; /* safe above sidebars/modals */
    font-family: "Manrope", sans-serif;
}

.daterangepicker td,
.daterangepicker th {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
}

/* keep hover neutral on available cells/headers */
.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
    background-color: transparent;
    color: inherit;
}

/* selected range */
.daterangepicker td.in-range {
    background-color: #dbd3e7;
    color: #2e2054;
}

.daterangepicker td.in-range:hover {
    background-color: #dbd3e7;
    color: #2e2054;
}

/* remove default solid active background; we use radial for ends */
.daterangepicker td.active,
.daterangepicker td.active:hover {
    background-color: transparent !important;
}

/* start / end caps */
.daterangepicker td.start-date,
.daterangepicker td.end-date {
    background: radial-gradient(circle, #512b8b 0 60%, #dbd3e7 62% 100%) !important;
    color: #ffffff !important;
}

.daterangepicker td.start-date:hover,
.daterangepicker td.end-date:hover {
    background: radial-gradient(circle, #512b8b 0 60%, #dbd3e7 62% 100%) !important;
    color: #ffffff !important;
}

/* Buttons */
.daterangepicker .applyBtn,
.daterangepicker .btn-primary {
    background: #512b8b;
    border-color: #512b8b;
    color: #ffffff;
    font-weight: 600;
    border-radius: 34px;
    padding: 8px 16px;
    min-width: 75px;
    cursor: pointer;
    outline: none;
    box-shadow: none;
}

.daterangepicker .applyBtn:hover,
.daterangepicker .btn-primary:hover {
    background: #512b8b;
    border-color: #512b8b;
}

.daterangepicker .cancelBtn {
    background: #e5e5e5;
    color: #1f1f1f;
    border-radius: 34px;
    padding: 8px 16px;
    min-width: 83px;
    border: 1px solid #d0d0d0;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    box-shadow: none;
}

.daterangepicker .cancelBtn:hover {
    background: #ffffff;
    border-color: #d0d0d0;
}


/* =====================================================
   5) DEVICE DISTRIBUTION
===================================================== */

.device-distribution {
    border-radius: 12px;
    /* font-family: Arial, sans-serif; */ /* preserved comment */
}

.device-distribution h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #5b22a8;
}

.device-distribution .detail-metrics-grid-two-column {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    border-radius: 12px;
}

.device-distribution .detail-metrics-grid-two-column .metric-row {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-top: none;
    background: #fff;
    border-radius: 12px;
}

.device-distribution .detail-metrics-grid-two-column .metric-row + .metric-row {
    /* border-left: 1px solid #e5e5e5; */ /* preserved comment from source */
    border-top: none;
}

.device-distribution .detail-metrics-grid-two-column .metric-row:first-child {
    border-radius: 12px;
}

.device-distribution .detail-metrics-grid-two-column .metric-row:last-child {
    border-radius: 12px;
}

/* Hover */
.device-distribution .detail-metrics-grid-two-column .metric-row:hover {
    background: #f9f9f9;
}

/* Image inside icon */
.device-distribution .metric-icon img {
    height: 18px;
    display: block;
}

.device-distribution .metric-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.device-distribution .metric-value {
    font-size: 18px;
    font-weight: 800;
    color: #333;
}

/* (legacy vertical list support) */
.device-distribution .metric-row + .metric-row {
    border-top: 1px solid #e5e5e5;
}


/* =====================================================
   6) BEHAVIOUR CONTEXT
===================================================== */

/* Section title */
.behaviour-context h3 {
    font-weight: 700;
    color: #6a1b9a;
    margin: 0 0 12px;
    font-size: 16px;
}

/* Wrapper grid (single metric) */
.behaviour-context .detail-metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Card styling */
.behaviour-context .metric-box {
    background: linear-gradient(
        345.4deg,
        rgba(255, 255, 255, 0.2) 25.9%,
        rgba(219, 211, 231, 0.2) 90.95%
    );
    border-radius: 16px;
    padding: 28px 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    background-image: linear-gradient(
        180deg,
        rgba(103, 80, 164, 0.06),
        rgba(103, 80, 164, 0)
    );
}

.behaviour-context .metric-box-header {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon label"
        "icon value";
    column-gap: 14px;
    align-items: center;
}

/* Icon wrapper: purple circular badge */
.behaviour-context .metric-icon {
    grid-area: icon;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #6a1b9a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.behaviour-context .metric-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

/* Label (top right) */
.behaviour-context .metric-label {
    grid-area: label;
    font-size: 14px;
    font-weight: 600;
    color: #3c3c43;
}

/* Value (bottom right, bold emphasis) */
.behaviour-context .metric-value {
    grid-area: value;
    font-size: 24px;
    font-weight: 800;
    color: #1d1d1f;
    margin-top: 0;
}


/* =====================================================
   7) TV CARDS
===================================================== */

.tv-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Individual card */
.tv-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #e8e8ef;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow:
        0 2px 6px rgba(28, 24, 88, 0.04),
        0 8px 24px rgba(28, 24, 88, 0.06);
}

/* Small polish for hover */
.tv-card:hover {
    background: #f9f9f9;
    border-color: #d9d7ee;
    box-shadow:
        0 4px 10px rgba(28, 24, 88, 0.06),
        0 10px 28px rgba(28, 24, 88, 0.08);
    transition: box-shadow 160ms ease, border-color 160ms ease;
}

/* Icon block (soft purple tile) */
.tv-card__icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #efe8ff; /* light purple */
    display: grid;
    place-items: center;
}

.tv-card__icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* Title + value */
.tv-card__title {
    font-size: 18px;
    color: #2b1b4f; /* darker purple text */
    font-weight: 600;
}

.tv-card__value {
    font-weight: 700;
    color: #1d1d1f; /* accent purple (text) */
    margin-left: 6px;
}

/* Divider line */
.tv-card__divider {
    border: none;
    border-top: 1px solid #e8e8ef;
    margin: 8px 0;
}

/* Badge row: green pill + caption */
.tv-card__badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.tv-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
    color: #ffffff;
    background: #2bb673; /* green */
}

.tv-badge img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.tv-badge strong {
    font-weight: 700;
}

.tv-badge__caption {
    font-size: 13px;
    color: #6b6a75; /* muted */
}


/* =====================================================
   8) TRAFFIC VOLUME SECTION
===================================================== */

.traffic-volume-section {
    margin-top: 24px;
}

.traffic-volume-section h3 {
    line-height: 1.2;
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #5b22a8;
}


/* =====================================================
   9) MEDIA QUERIES
===================================================== */

/* -- ≤ 768px (TABLET/MOBILE) -- */
@media (max-width: 768px) {

    /* Traffic & cards spacing */
    #pageAnalyticsDetail .traffic-volume-section {
        margin-top: 12px;
    }

    #pageAnalyticsDetail .tv-cards {
        gap: 12px;
    }

    #pageAnalyticsDetail .tv-card {
        grid-template-columns: 52px 1fr;
        padding: 12px 14px;
    }

    #pageAnalyticsDetail .tv-card__title {
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #pageAnalyticsDetail .tv-card__value {
        margin-left: auto;
        white-space: nowrap;
    }

    /* Engagement section padding */
    #pageAnalyticsDetail .detail-section--engagement {
        padding: 12px;
    }

    /* Engagement metric rows — ONE LAYOUT (GRID) */
    #pageAnalyticsDetail .detail-metrics-grid-engagement .metric-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) max-content; /* title | (value+score group) */
        column-gap: 16px;
        align-items: center;
        padding: 10px 16px;
    }

    #pageAnalyticsDetail .detail-metrics-grid-engagement .metric-left {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    #pageAnalyticsDetail .detail-metrics-grid-engagement .metric-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    #pageAnalyticsDetail .detail-metrics-grid-engagement .metric-right-group {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        gap: 8px;
        padding-left: 16px;
        border-left: 1.3px solid #d0d0d0;
        white-space: nowrap;
    }

    #pageAnalyticsDetail .detail-metrics-grid-engagement .metric-value {
        white-space: nowrap;
    }

    /* Two column section stacks */
    #pageAnalyticsDetail .detail-section--two-column {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    /* Device distribution compact padding */
    #pageAnalyticsDetail .device-distribution .metric-row {
        padding: 12px 14px;
    }

    /* Behaviour card tighter padding */
    #pageAnalyticsDetail .behaviour-context .metric-box {
        padding: 18px 16px;
    }

    /* Date range full-width on small screens */
    .detail-date-range,
    .date-range-input {
        max-width: 100%;
        display: block;
        width: 100%;
    }

    /* Daterangepicker footer – better mobile layout */
    .daterangepicker .drp-buttons {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 16px 12px;
        border-top: 1px solid #f0f0f5;
        background: #f7f7fb;
    }

    .daterangepicker .drp-selected {
        flex: 1 1 auto;
        font-size: 12px;
        font-weight: 500;
        color: #4b4b4b;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-right: 8px;
        margin-bottom: 7px;
    }

    .daterangepicker .cancelBtn,
    .daterangepicker .applyBtn {
        flex: 0 0 auto;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* TV cards to single column */
    .tv-cards {
        grid-template-columns: 1fr;
    }
}


/* -- ≤ 480px (MOBILE COMPACT) -- */
@media (max-width: 480px) {
    .device-distribution .detail-metrics-grid-two-column {
        gap: 6px;
    }

    #pageAnalyticsDetail .device-distribution .detail-metrics-grid-two-column .metric-row {
        padding: 8px 6px;
        gap: 5px;
    }

    .device-distribution .metric-icon img {
        height: 14px;
    }

    .device-distribution .metric-label {
        font-size: 12px;
        white-space: normal;
    }

    .device-distribution .metric-value {
        font-size: 14px;
        white-space: nowrap;
    }
}


/* -- very small, short screens -- */
@media (max-width: 380px) and (max-height: 700px) {
    .daterangepicker {
        transform: scale(0.85);
        transform-origin: top center;
    }
}

@media (max-width: 768px) {

    .metricSectionsContainer {
        overflow-y: auto;
    }

    /* ---------- Container & header card ---------- */

    #performanceDetail {
        background: #ffffff;
        border-radius: 18px;
        box-shadow: none;
        height: auto;
        max-height: none;
    }

    #performanceDetail .detail-body {
        min-height: calc(100vh - 180px);
        height: calc(100% - 130px);
        max-height: none;
        overflow-y: auto;
        padding: 14px 14px 20px;
        gap: 18px;
    }

    #performanceDetail .detail-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px 14px 16px;
        border-radius: 18px;
    }

    #performanceDetail .detail-header-left {
        justify-content: flex-start;
    }

    #performanceDetail .detail-title {
        font-size: 18px;
    }


    #performanceDetail .detail-header-right {
        display: none;
    }


    #performanceDetail .detail-section--performance:first-of-type {
        margin-top: 16px;
        padding: 16px 16px 18px;
        border-radius: 18px;
        border: 1px solid #e8e1ff;
        background: #f8f6ff;
    }

    #performanceDetail .detail-section--performance:first-of-type h3 {
        margin: 0 0 10px;
        font-size: 16px;
        font-weight: 700;
        color: #5b22a8;
    }

    #performanceDetail .performance-score-widget {
        justify-content: center;
        margin-bottom: 14px;
    }

    #performanceDetail .performance-score-widget .gauge-container {
        width: min(260px, 80vw);
        height: calc(min(260px, 80vw) * 0.5);
    }


    #performanceDetail .performance-toggle {
        width: 100%;
        max-width: 260px;
        margin: 6px auto 0;
    }



    #performanceDetail .detail-section--performance:nth-of-type(2) {
        margin-top: 18px;
        padding: 16px 16px 12px;
        border-radius: 18px;
        border: 1px solid #e8e1ff;
        background: #f8f6ff;
    }

    #performanceDetail .detail-section--performance:nth-of-type(2) h3 {
        margin: 0 0 12px;
        font-size: 16px;
        font-weight: 700;
        color: #5b22a8;
    }



    #performanceDetail .detail-metrics-grid,
    #performanceDetail .detail-metrics-grid-engagement {
        border-radius: 14px;
        overflow: hidden;
        background: #ffffff;
    }

    #performanceDetail .detail-metrics-grid .metric-row,
    #performanceDetail .detail-metrics-grid-engagement .metric-row {
        display: grid;
        grid-template-columns: minmax(0, 2fr) auto auto;
        column-gap: 10px;
        align-items: center;
        padding: 10px 14px;
        border-bottom: 1px solid #f1f1f5;
    }

    #performanceDetail .detail-metrics-grid .metric-row:last-child,
    #performanceDetail .detail-metrics-grid-engagement .metric-row:last-child {
        border-bottom: none;
    }

    #performanceDetail .detail-metrics-grid .metric-left,
    #performanceDetail .detail-metrics-grid-engagement .metric-left {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    #performanceDetail .detail-metrics-grid .metric-label,
    #performanceDetail .detail-metrics-grid-engagement .metric-label {
        white-space: normal;
        line-height: 1.3;
    }

    #performanceDetail .detail-metrics-grid .metric-middle,
    #performanceDetail .detail-metrics-grid-engagement .metric-middle {
        justify-self: center;
        white-space: nowrap;
        font-weight: 700;
    }

    #performanceDetail .detail-metrics-grid .metric-right,
    #performanceDetail .detail-metrics-grid-engagement .metric-right {
        justify-self: flex-end;
        display: flex;
        align-items: center;
    }

    #performanceDetail .detail-metrics-grid .metric-rating,
    #performanceDetail .detail-metrics-grid-engagement .metric-rating {
        white-space: nowrap;
    }
}

/* 3 col view for the metrics inside the ta */
@media (max-width: 480px) {

    #performanceDetail .detail-metrics-grid .metric-row,
    #performanceDetail .detail-metrics-grid-engagement .metric-row {
        display: grid !important;
        grid-template-columns: minmax(0, 0.75fr) minmax(0, 0.5fr) minmax(0, 1fr);
        column-gap: 7px;
        padding: 8px 12px;
    }

    #performanceDetail .detail-metrics-grid .metric-left,
    #performanceDetail .detail-metrics-grid-engagement .metric-left {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #performanceDetail .detail-metrics-grid .metric-middle,
    #performanceDetail .detail-metrics-grid-engagement .metric-middle {
        justify-self: center;
        white-space: nowrap;
        font-weight: 700;
    }

    #performanceDetail .detail-metrics-grid .metric-right,
    #performanceDetail .detail-metrics-grid-engagement .metric-right {
        justify-self: flex-end;
        margin-left: 0;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 430px) {


    #performanceDetail .detail-metrics-grid .metric-row,
    #performanceDetail .detail-metrics-grid-engagement .metric-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        row-gap: 4px;
        column-gap: 8px;
    }


    #performanceDetail .detail-metrics-grid .metric-left,
    #performanceDetail .detail-metrics-grid-engagement .metric-left {
        flex: 1 1 100%;
        min-width: 0;
    }


    #performanceDetail .detail-metrics-grid .metric-middle,
    #performanceDetail .detail-metrics-grid-engagement .metric-middle {
        flex: 0 0 auto;
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
    }

    #performanceDetail .detail-metrics-grid .metric-right,
    #performanceDetail .detail-metrics-grid-engagement .metric-right {
        flex: 0 0 auto;
        margin-left: auto;
        display: flex;
        align-items: center;
    }

    #performanceDetail .detail-metrics-grid .metric-label,
    #performanceDetail .detail-metrics-grid-engagement .metric-label {
        font-size: 13px;
    }

    #performanceDetail .detail-metrics-grid .metric-rating,
    #performanceDetail .detail-metrics-grid-engagement .metric-rating {
        font-size: 12px;
        white-space: nowrap;
    }
}
