/* Mud styles adjustments */
.mud-popover .mud-list-extended {
  margin: 0 4px;
  padding: 4px 0;
}

/* Browser autofill backgrounds (Chrome's yellow, Firefox's pale yellow) bleed
   over the input outline and visually crash into the label sitting above the
   field. Override to the design-system surface colour and freeze the
   transition so the autofill never animates back to its native colour. */
.mud-input input:-webkit-autofill,
.mud-input input:-webkit-autofill:hover,
.mud-input input:-webkit-autofill:focus,
.mud-input input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--color-white) inset !important;
  -webkit-text-fill-color: var(--color-gray-900) !important;
  caret-color: var(--color-gray-900);
  transition: background-color 0s 600000s, color 0s 600000s !important;
}

/* Firefox's :-moz-autofill doesn't accept box-shadow override, so we use the
   filter trick — invert + invert restores original colours while neutralising
   the yellow tint. */
.mud-input input:-moz-autofill,
.mud-input input:-moz-autofill:focus {
  filter: none;
  background-color: var(--color-white) !important;
  color: var(--color-gray-900) !important;
}

.mud-tooltip.mud-popover-open {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
  background: var(--color-white) !important;
  box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.08);
  border-radius: 5px;
  font-size: 13px;
  line-height: 150%;
  color: var(--color-gray-800) !important;
}


.mud-select .mud-select-input .mud-input-slot > img {
  align-self: center;
}

.mud-list-item-text img {
  align-self: center;
}

.mud-list-item-gutters {
  padding-left: 12px;
  padding-right: 12px;
}

.main-menu-popover .mud-list {
  max-height: 700px;
  width: 230px;
}

.main-menu-popover .mud-paper {
  max-height: 435px;
  overflow-y: auto;
}

.main-menu-popover .mud-menu-item {
  padding-top: 4px;
  padding-bottom: 4px;
}

.mud-popover .mud-menu-item {
  min-height: 32px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.main-menu-popover .mud-menu-item-text {
  margin: 0;
  display: flex;
  align-items: center;
}

.domain-search-container {
  padding: 8px 10px 4px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--mud-palette-surface);
}

.mud-drawer {
  position: fixed !important;
  background: linear-gradient(180deg, rgba(11, 29, 47, 0.8) 0%, rgba(16, 48, 107, 0.8) 100%), #0B1D2F;
}

.mud-list {
  margin: 6px 0;
  max-height: 800px;
}

.mud-popover .mud-list {
  max-height: none;
  overflow-y: visible;
}

.mud-list .mud-list-item {
  margin: 0 4px;
  width: auto;
  border-radius: 4px;
  height: 36px;
  overflow: hidden;
}

.mud-popover .mud-list-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mud-list .mud-list-item:hover {
  background: var(--color-gray-300) !important;
}

.mud-list .mud-list-icon {
  display: none;
}

.mud-list-icon {
  vertical-align: middle;
}

.mud-drawer .mud-nav-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 12px 2px !important;
  margin: 2px 16px;
  border-radius: 8px;
}

.mud-drawer div.mud-nav-link {
  padding: 8px 0 !important;
  margin: 0 16px;
}

.mud-drawer .mud-nav-link:hover img {
  filter: brightness(2);
}

.mud-drawer .mud-nav-link .mud-nav-link-text {
  display: flex;
  align-items: center;
  white-space: nowrap;
  margin-inline-start: 0;
  margin-left: 6px;
}

.mud-drawer-content .mud-list {
  padding: 8px 1px;
  background: var(--color-gray-200);
  border: 1px solid var(--color-gray-500);
  box-shadow: 0 2px 8px rgba(12, 12, 13, 0.12);
  border-radius: 6px;
}

.mud-drawer-content .mud-list-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 6px 8px;
  margin: 0 4px;
  gap: 10px;
  border-radius: 4px;
  width: auto;
}

.mud-drawer-content .mud-list-item .mud-typography {
  color: var(--color-gray-800);
  font-weight: var(--font-weight-13-medium);
  font-size: var(--font-size-13);
}

.mud-drawer-content .mud-list .mud-primary-hover {
  background: var(--color-blue-100) !important;
}

.mud-drawer-content .mud-list .mud-list-item:hover {
  background: var(--color-blue-100) !important;
}

.mud-popover-open .mud-list .mud-primary-hover {
  background: var(--color-blue-100) !important;
}

.mud-popover-open .mud-list .mud-list-item:hover {
  background: var(--color-blue-100) !important;
}

.domain-menu-item {
  font-weight: 500;
  font-size: 13px;
  color: var(--color-gray-800) !important;
  margin: 0 6px;
  width: auto;
  border-radius: 6px;
}

.domain-menu-item.domain-active {
  background: var(--color-blue-100) !important;
}

.mud-drawer-content .mud-nav-link-text {
  color: var(--color-navy-300) !important;
  font-weight: var(--font-weight-14-medium);
}

.mud-drawer-content .mud-nav-item:hover .mud-nav-link-text {
  color: var(--color-white) !important;
}

.mud-list-extended .mud-list-item {
  border-radius: 4px;
}

.mud-list-extended .mud-primary-hover {
  background: var(--color-blue-100) !important;
}

.mud-list-extended .mud-list-item:hover {
  background: var(--color-blue-100) !important;
}

.mud-drawer .mud-nav-link.active,
.mud-drawer .mud-nav-link:hover {
  background: rgba(115, 166, 255, 0.3) !important;
}

.mud-drawer .mud-nav-link.active .mud-nav-link-text,
.mud-drawer .mud-nav-link:hover .mud-nav-link-text {
  color: white !important;
}

.mud-drawer .mud-nav-link.active img {
  filter: brightness(2);
}

.mud-drawer .mud-nav-item.active .mud-nav-link-text {
  color: white !important;
}

.mud-drawer .mud-nav-item.active img {
  filter: brightness(2);
}

.mud-nav-item.active .mud-nav-link {
  background: rgba(115, 166, 255, 0.3) !important;
  color: white;
}

.mud-nav-link .mud-image {
  width: 20px;
  margin-right: 12px;
}

.mud-nav-link span {
  font-weight: var(--font-weight-14-semibold);
}

.mud-avatar-small {
  background: var(--color-blue-500);
  color: white;
}

.mud-drawer .mud-input-label {
  font-weight: var(--font-weight-16-semibold) !important;
  font-size: var(--font-size-16) !important;
  line-height: var(--line-height) !important;
  color: var(--color-white) !important;
}

.mud-drawer .mud-input-slot {
  font-weight: var(--font-weight-13-medium) !important;
  font-size: var(--font-size-13) !important;
  line-height: var(--line-height) !important;
  color: var(--color-navy-300) !important;
}

.mud-drawer .mud-select-input .mud-icon-root {
  margin-top: -40px;
}

.mud-input-slot::placeholder {
  color: var(--color-gray-700) !important;
  opacity: 1 !important;
}

.mud-drawer .mud-input.mud-input-underline:after,
.mud-drawer .mud-input.mud-input-underline:before {
  display: none;
}

.mud-drawer .logo {
  display: flex;
  flex-direction: row;
  padding: 0 20px 12px;
  gap: 12px;
  align-items: start;
}

.mud-drawer.mud-drawer--closed .logo {
  padding: 0 16px 12px;
}

.mud-breadcrumbs {
  padding: 4px 0;
  font-weight: var(--font-weight-12-medium);
  font-size: var(--font-size-12);
}

.mud-breadcrumbs .mud-breadcrumb-item a {
  font-weight: var(--font-weight-12-medium);
  font-size: var(--font-size-12);
  line-height: var(--line-height);
  color: var(--color-gray-700);
}

.mud-breadcrumbs .mud-breadcrumb-item a:hover {
  color: var(--color-gray-700);
}

.mud-breadcrumbs .mud-breadcrumb-separator > span {
  color: var(--color-gray-700);
  opacity: 1;
}

.mud-breadcrumbs .mud-breadcrumb-item.mud-disabled a {
  color: var(--color-gray-800);
}

.mud-icon-size-small {
  height: 16px !important;
  width: 16px !important;
}

.mud-list-extended .mud-list-item-extended.mud-list-item-clickable-extended {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 3px 8px 4px;
  gap: 10px;
  border-radius: 4px;
  margin: 2px 0;
}

.mud-list-item-extended .mud-input-control {
  margin: 0px 4px !important;
}

.mud-input.mud-input-outlined .mud-input-outlined-border {
  border-radius: 7px;
  border: none;
  box-shadow: inset 0 0 0 1px var(--color-gray-500);
}

.mud-input.mud-input-outlined.mud-input-error .mud-input-outlined-border {
  box-shadow: inset 0 0 0 1px var(--color-red-500);
}

.mud-list-extended .mud-list-subheader-extended {
  padding-bottom: 0;
}

.mud-list-extended .mud-list-subheader-gutters-extended {
  padding: 0px !important;
  margin: 0px !important;
}

.mud-list-extended .mud-list-item-text-extended {
  padding-inline: 0;
}

.mud-list-extended .mud-list-item-extended p {
  color: var(--color-gray-800) !important;
}

.mud-input > input.mud-input-root-outlined.mud-input-root-margin-dense,
div.mud-input-slot.mud-input-root-outlined.mud-input-root-margin-dense {
  padding-top: 6px;
  padding-bottom: 6px;
  color: var(--color-gray-700);
}

.mud-input-control > .mud-input-control-input-container > .mud-input-label-filled {
  font-family: var(--font-family-inter);
  font-weight: var(--font-weight-13-semibold);
  font-size: var(--font-size-13);
  line-height: var(--line-height);
  color: var(--color-black) !important;
  max-width: 100% !important;
  transform: none !important;
  display: inline-flex;
  align-items: center;
  transition: 0.4s ease all;
}

.mud-input > input.mud-input-root-filled,
div.mud-input-slot.mud-input-root-filled {
  font-family: var(--font-family-inter);
  font-weight: var(--font-weight-13-regular);
  font-size: var(--font-size-13);
  line-height: var(--line-height);
  color: var(--color-blue-500);
  transition: 0.4s ease all;
}

.mud-icon-root {
  color: var(--color-gray-700);
}

.mud-icon-root.mud-svg-icon {
  width: 20px;
  height: 20px;
}

.mud-input.mud-input-filled.mud-input-adorned-end {
  padding: 2px 7px 2px 12px !important;
}

.mud-input-adornment-end-extended:not(.mud-input-text-extended) {
  margin-inline-end: 4px;
}

.mud-input-filled-with-label {
  /*background: var(--color-gray-300) !important;*/
  border-radius: 6px;
  transition: 0.4s ease all;
}

.mud-input-filled-with-label:before,
.mud-input-filled-with-label:after {
  border-bottom: none !important;
}

.mud-input-filled-with-label .mud-input.mud-input-filled {
  order: 2;
}

.mud-input-filled-with-label .mud-input-label {
  order: 1;
  display: flex;
  font-weight: var(--font-weight-16-semibold) !important;
  color: var(--color-blue-500) !important;
  transform: none !important;
}

.mud-input-filled-with-label .mud-input-label-inputcontrol {
  position: relative;
}

.mud-input-filled-with-label.select-default-value {
  background: var(--color-gray-300) !important;
  box-shadow: 0 0 0 1px var(--color-gray-500);
}

.mud-input-control.select-default-value > .mud-input-control-input-container > .mud-input-label-filled {
  color: var(--color-gray-900) !important;
}

.mud-input > input.mud-input-root.mud-input-root-filled,
div.mud-input-slot.mud-input-root.mud-input-root-filled {
  padding: 0px 0px 0px 5px !important;
}

.mud-select-extended .mud-select-input-extended {
  border-radius: 6px;
  transition: 0.4s ease all;
}

.mud-input.mud-input-filled {
  background: transparent !important;
}

.mud-input.mud-input-filled.mud-input-underline:before {
  display: none;
}

.mud-select-extended > .mud-input-filled-with-label {
  box-shadow: 0 0 0 1px var(--color-gray-500);
  cursor: pointer;
}

.mud-chip-content {
  font-family: var(--font-family-inter);
  line-height: var(--line-height);
}

.mud-chip {
  padding: 2px 8px !important;
  margin: 0 !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.mud-chip.mud-chip-size-small {
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-medium);
  padding: 1px 8px;
  height: 19px !important;
}

.mud-chip.mud-chip-size-medium {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-medium);
  padding: 2px 8px;
  height: 26px !important;
}

.mud-chip.mud-chip-size-large {
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-16-semibold);
  padding: 3px 8px;
  height: 29px !important;
}

.mud-chip-filled.mud-chip-color-error {
  background-color: var(--color-red-100);
}

.mud-chip-filled.mud-chip-color-warning {
  background-color: var(--color-yellow-100);
}

.mud-chip-filled.mud-chip-color-success {
  background-color: var(--color-green-100);
}

.mud-chip-filled.mud-chip-color-error .mud-chip-content {
  color: var(--color-red-500);
}

.mud-chip-filled.mud-chip-color-warning .mud-chip-content {
  color: var(--color-yellow-700);
}

.mud-chip-filled.mud-chip-color-success .mud-chip-content {
  color: var(--color-green-500);
}

.mud-toggle-group {
  border-radius: 6px;
}

.mud-paper-outlined .mud-toggle-group {
  height: 32px;
}

.mud-toggle-item {
  padding: 5px 10px;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-regular);
  color: var(--color-gray-700) !important;
  background-color: var(--color-white) !important;
}

.mud-toggle-group.mud-toggle-group-size-small {
  height: 28px;
}
.mud-toggle-item.mud-toggle-item-size-small {
  padding: 2px 8px;
  font-size: var(--font-size-12);
  height: 28px;
}

.mud-toggle-group.mud-toggle-group-size-medium {
  height: 32px;
}
.mud-toggle-item.mud-toggle-item-size-medium {
  padding: 4px 10px;
  font-size: var(--font-size-13);
  height: 32px;
}

.mud-toggle-group.mud-toggle-group-size-large {
  height: 36px;
}
.mud-toggle-item.mud-toggle-item-size-large {
  padding: 0 10px;
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-regular);
  height: 36px;
}

.mud-toggle-item-selected {
  color: var(--color-gray-900) !important;
  background-color: var(--color-gray-400) !important;
  font-weight: var(--font-weight-13-semibold) !important;
}

.mud-toggle-item-selected.mud-toggle-item-size-small {
  font-weight: var(--font-weight-12-semibold) !important;
}
.mud-toggle-item-selected.mud-toggle-item-size-medium {
  font-weight: var(--font-weight-13-semibold) !important;
}
.mud-toggle-item-selected.mud-toggle-item-size-large {
  font-weight: var(--font-weight-14-semibold) !important;
}

.mud-toggle-group > .mud-toggle-item:not(.mud-toggle-item-selected):hover {
  color: var(--color-gray-700) !important;
  background-color: var(--color-gray-300) !important;
}

.mud-table-head {
  background: var(--color-gray-300);
  height: 40px;
}

.mud-table-head th {
  background: var(--color-gray-300) !important;
}

/* Tables below a MudPaper toolbar (identified by rounded-b-lg) */
.mud-table.rounded-b-lg {
  border-top: none !important;
}

.mud-table.rounded-b-lg > .mud-table-container,
.mud-table.rounded-b-lg .mud-table-root,
.mud-table.rounded-b-lg .mud-table-head,
.mud-table.rounded-b-lg .mud-table-head th:first-child,
.mud-table.rounded-b-lg .mud-table-head th:last-child {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.mud-table.rounded-lg > .mud-table-container {
  border-radius: 8px !important;
  overflow: hidden;
}


.mud-table-head th > span {
  font-weight: 600 !important;
  font-size: 11px;
  line-height: 150%;
  text-transform: uppercase;
  color: var(--color-gray-700) !important;
}

.mud-table-head th:not(:first-child) {
  text-align: end;
}

.mud-table-body > .mud-table-row {
  height: 48px;
}

.mud-table-body > .mud-table-row td:not(:first-child) {
  text-align: end;
}


.mud-table-cell {
  font-size: var(--font-size-12);
  line-height: 150%;
  color: var(--color-gray-800) !important;
  font-variant-numeric: tabular-nums;
}

/* First column carries the primary identifier — render slightly larger. */
.mud-table-body > .mud-table-row > td:first-child {
  font-size: var(--font-size-14);
}

.mud-table-cell .mud-badge-root {
  margin-left: 16px;
}

.mud-table-sort-label > .mud-icon-root {
  transform: scale(0.8) !important;
}

.mud-table-sort-label .mud-table-sort-label-icon.mud-direction-desc {
  transform: scale(0.8) rotate(180deg) !important;
}

.mud-tooltip.mud-tooltip-arrow::after {
  color: #fff;
}

.mud-input.mud-input-filled.mud-input-underline:after {
  display: none !important;
}

.mud-input-filled-with-label .mud-input-control-input-container {
  flex-direction: row !important;
  border-radius: 6px;
  font-size: var(--font-size-13);
}

.mud-select-extended > .mud-input-control-input-container {
  padding-left: 12px;
  height: 34px;
  box-shadow: 0 0 0 1px var(--color-gray-500);
  transition: 0.4s ease all;
  border-radius: 6px;
  cursor: pointer;
}

.mud-toolbar .mud-select-extended > .mud-input-control-input-container {
  padding: 3.5px 0 4px 7px !important;
  height: 27px;
}

.mud-input > input.mud-input-root,
div.mud-input-slot.mud-input-root {
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-regular);
}

.select-specific-value.mud-list-extended .mud-list-item-extended.mud-list-item-clickable-extended {
  background: var(--color-gray-400) !important;
}

.select-specific-value.mud-select-extended > .mud-input-control-input-container {
  box-shadow: 0 0 0 1px var(--color-gray-400) !important;
  background: var(--color-gray-400) !important;
}

.select-specific-value.mud-select-extended .mud-input > input.mud-input-root.mud-input-root-filled,
.select-specific-value.mud-select-extended div.mud-input-slot.mud-input-root.mud-input-root-filled {
  background: var(--color-gray-400) !important;
}

.select-specific-value.mud-select-extended .mud-select-input-extended {
  background: var(--color-gray-400) !important;
}

.mud-select-extended > .select-specific-value.mud-input-filled-with-label {
  box-shadow: 0 0 0 1px var(--color-gray-400) !important;
}

.mud-list-extended .mud-list-item-extended.mud-list-item-clickable-extended:hover {
  background: var(--color-gray-300) !important;
}

.mud-select-extended:hover > .mud-input-control-input-container {
  box-shadow: 0 0 0 1px var(--color-gray-500) !important;
  background-color: var(--color-gray-300) !important;
}

.mud-select-extended:hover .mud-input > input.mud-input-root.mud-input-root-filled,
.mud-select-extended:hover div.mud-input-slot.mud-input-root.mud-input-root-filled {
  background: var(--color-gray-300) !important;
}

.mud-select-extended:hover .mud-select-input-extended {
  background: var(--color-gray-300) !important;
}

.mud-input-outlined-with-label div.mud-input-slot.mud-input-root-outlined {
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-medium);
  line-height: var(--line-height);
  color: var(--color-gray-700);
}

.mud-input.mud-input-outlined.mud-select-input-extended .mud-input-outlined-border {
  box-shadow: inset 0 0 0 1px var(--color-white) !important;
  transition: 0.4s ease all;
}

.mud-input > input.mud-input-root-outlined.mud-select-input-extended,
div.mud-input-slot.mud-input-root-outlined.mud-select-input-extended {
  padding: 0 !important;
  white-space: nowrap;
}

.mud-select-extended.mud-input-outlined-with-label > .mud-input-control-input-container {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  background: var(--color-white);
  transition: 0.4s ease all;
}

.mud-shrink ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-label-outlined,
.mud-input:focus-within ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-label-outlined {
  position: relative;
  max-width: 100%;
  width: 100%;
  order: 1;
  transform-origin: unset;
  transform: none;
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-semibold);
  line-height: var(--line-height);
  padding: 7.5px 5px 7.5px 14px !important;
}

.mud-select-extended .mud-input-outlined-with-label.mud-select-input-extended {
  order: 2;
  height: 34px;
}

.mud-input-control.mud-input-outlined-with-label {
  margin: 1px !important;
}

.mud-select-extended:hover > .mud-input-outlined-with-label {
  background: var(--color-gray-300);
}

.mud-select-extended:hover .mud-select-input-extended .mud-input-outlined-border {
  box-shadow: inset 0 0 0 1px var(--color-gray-300) !important;
}

.mud-select .mud-input.mud-input-outlined.mud-select-input {
  border-radius: 6px;
  transition: background-color 250ms ease;
  cursor: pointer;
}
.mud-select:hover .mud-input.mud-input-outlined.mud-select-input {
  background: var(--color-gray-300);
}

div.mud-input-slot.mud-input-root-outlined {
  font-size: var(--font-size-14) !important;
  font-weight: var(--font-weight-14-semibold) !important;
  line-height: var(--line-height) !important;
  padding: 7.5px 5px 7.5px 14px !important;
}

.mud-input-outlined {
  padding: 3.5px 5px 4px 0px !important;
}

.mud-input-adornment-start {
  margin-left: 12px;
}

.mud-input-adornment-start-extended:not(.mud-input-text-extended) {
  margin-inline-start: 4px;
  margin-inline-end: 8px;
}

.mud-input-adornment-start-extended:not(.mud-input-text-extended) .mud-icon-root.mud-svg-icon {
  width: 16px;
  height: 16px;
}

.mud-card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--color-gray-500);
}

.mud-card-header {
  box-shadow: 0 1px 0 0 var(--color-gray-400);
}

.mud-card-header-content .mud-typography-h6 {
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-16-semibold);
  line-height: var(--line-height);
  color: var(--color-gray-900);
  letter-spacing: -0.5%;
}

.mud-card-content .mud-typography-h3 {
  font-family: var(--font-family-inter);
  font-size: var(--font-size-28);
  font-weight: var(--font-weight-28-semibold);
  line-height: var(--line-height);
  letter-spacing: 0;
  color: var(--color-gray-900);
}

.mud-badge.mud-badge-dot {
  width: 8px;
  height: 8px;
}

.mud-badge.mud-badge-dot.mud-theme-success {
  background: var(--color-green-500);
}

.mud-badge.mud-badge-dot.mud-theme-warning {
  background: var(--color-yellow-500);
}

.mud-badge.mud-badge-dot.mud-theme-error {
  background: var(--color-red-500);
}

.mud-badge.mud-badge-dot.mud-badge-bordered {
  width: 6px;
  height: 6px;
  border: none;
}

.mud-badge.mud-badge-dot.mud-badge-bordered.badge-border-success {
  box-shadow: 0 0 0 3px var(--color-green-100);
}

.mud-badge.mud-badge-dot.mud-badge-bordered.badge-border-warning {
  box-shadow: 0 0 0 3px var(--color-yellow-100);
}

.mud-badge.mud-badge-dot.mud-badge-bordered.badge-border-error {
  box-shadow: 0 0 0 3px var(--color-red-100);
}

.mud-card-actions {
  padding: 0 !important;
}

.mud-card-actions .mud-button {
  padding: 12px;
  width: 100%;
  background-color: var(--color-gray-300);
}

.mud-card-actions .mud-button-text-primary {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-regular);
  line-height: var(--line-height);
  color: var(--color-blue-500);
  letter-spacing: 0;
}

.mud-progress-circular {
  color: #716ac4;
}

.mud-progress-linear {
  background-color: var(--color-gray-500);
}

.mud-progress-linear-bar {
  background-color: #5082E5 !important;
}

.mud-progress-linear.mud-progress-linear-small.mud-progress-linear-color-default::before {
  background-color: var(--mud-palette-white) !important;
  opacity: 1;
}

.loader {
  width: 40px;
  height: 40px;
  border: 5px solid var(--color-gray-400);
  border-bottom-color: #716ac4;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.apexcharts-canvas text.mud-typography-caption {
  font-family: var(--font-family-inter);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-12-regular);
  line-height: 130%;
  letter-spacing: 0;
  fill: var(--color-gray-700);
}

.mud-popover {
  background: var(--color-white) !important;
  box-shadow: 0px 1px 3px 0px #00000014, 0px 4px 8px 3px #00000014 !important;
}

.mud-popover:not(.mud-popover-relative-width) {
  max-width: fit-content !important;
  max-height: fit-content !important;
}

.mud-popover .mud-typography-body2 {
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-regular);
  line-height: var(--line-height);
  letter-spacing: 0;
  color: var(--color-gray-800);
}

.mud-popover .mud-typography-body2 b,
.mud-popover .mud-typography-body2 strong {
  font-weight: var(--font-weight-13-semibold);
}

.mud-input-input-control .mud-input-control-input-container .mud-input-outlined {
  border-radius: 6px;
}

.mud-input-input-control:hover .mud-input-control-input-container .mud-input-outlined {
  background: var(--color-gray-300);
}

.mud-input-input-control .mud-input-control-input-container .mud-input-outlined:focus-within {
  background: var(--color-gray-200);
}

.cm-map-header .mud-typography-body2 {
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-12-regular);
  color: var(--color-gray-700);
}

.apexcharts-tooltip {
  padding: 0 !important;
  pointer-events: none;
  transform: translate(15px, -105%);
}

.cm-apex-tooltip {
  position: relative;
  background: var(--color-white);
  padding: 8px 12px;
  min-width: 200px;
  font-family: var(--font-family-inter);
  border-radius: 6px;
  box-shadow: 0px 1px 3px 0px #00000014, 0px 4px 8px 0px #00000014;
}

.tooltip-date {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-regular);
  line-height: var(--line-height);
  color: var(--color-gray-700);
  margin-bottom: 8px;
}

.tooltip-divider {
  border: none;
  border-top: 1px solid var(--color-gray-400);
  margin: 0 -12px;
}

.tooltip-body {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.series-name {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-semibold);
  line-height: var(--line-height);
  color: var(--color-gray-800);
}

.series-chip {
  background-color: var(--color-gray-400);
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-semibold);
  line-height: var(--line-height);
  color: var(--color-gray-700);
  padding: 2px 4px;
  border-radius: 5px;
}

.spacer {
  flex-grow: 1;
}

.series-value {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-regular);
  line-height: var(--line-height);
  color: var(--color-gray-700);
}

.series-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-sizing: content-box;
}

.series-dot.dot-success {
  background-color: var(--color-green-500);
}

.series-dot.dot-warning {
  background-color: var(--color-yellow-500);
}

.series-dot.dot-error {
  background-color: var(--color-red-500);
}

.mud-snackbar {
  height: 32px;
  opacity: 1 !important;
  ;
}

.mud-alert-filled-normal {
  background-color: var(--color-white);
}

.mud-alert-filled-error {
  background-color: var(--color-red-500);
}

.mud-alert-filled-success {
  background-color: var(--color-green-400);
}


.mud-snackbar .mud-snackbar-content-message {
  color: var(--color-white);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-medium);
}

.mud-snackbar .mud-svg-icon {
  justify-self: center;
  fill: var(--color-white);
}

.jvm-tooltip {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.map-tooltip {
  background: var(--color-white);
  font-family: var(--font-family-inter);
  border-radius: 6px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-gray-400);
}

.map-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-gray-400);
  gap: 10px;
}

.country-name {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-regular);
  line-height: var(--line-height);
  color: var(--color-gray-700);
}

.status-chip {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-medium);
}

.status-chip.mud-success-text {
  background-color: var(--color-green-100);
  color: var(--color-green-500);
}

.status-chip.mud-warning-text {
  background-color: var(--color-yellow-100);
  color: var(--color-yellow-700);
}

.status-chip.mud-error-text {
  background-color: var(--color-red-100);
  color: var(--color-red-500);
}

.status-chip.mud-no-data-text {
  background-color: var(--color-gray-400);
  color: var(--color-gray-700);
}

.map-tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px;
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-row > span:first-child {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-semibold);
  color: var(--color-gray-800);
}

.metric-stat {
  background-color: var(--color-gray-400);
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-medium);
  color: var(--color-gray-700);
  line-height: var(--line-height);
  padding: 2px 4px;
  border-radius: 5px;
}

.metric-spacer {
  flex-grow: 1;
}

.metric-value {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-regular);
  color: var(--color-gray-700);
  line-height: var(--line-height);
}

.metric-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  color: transparent;
}

.metric-dot.dot-success {
  background-color: var(--color-green-300);
  box-shadow: 0 0 0 3px var(--color-green-100);
}

.metric-dot.dot-warning {
  background-color: var(--color-yellow-500);
  box-shadow: 0 0 0 3px var(--color-yellow-100);
}

.metric-dot.dot-error {
  background-color: var(--color-red-500);
  box-shadow: 0 0 0 3px var(--color-red-100);
}

.mud-drawer .select-domain {
  margin: 0 8px;
  border-top: 1px solid #2A4F91;
  padding: 12px 8px;
}

.mud-drawer .select-domain:hover {
  background: rgba(115, 166, 255, 0.15);
  border-radius: 8px;
}

.mud-drawer .select-domain .mud-select {
  margin: 0 8px;
}

.select-domain .mud-menu {
  display: block;
  width: 100%;
}

.domain-selector-trigger {
  cursor: pointer;
  padding: 4px 8px;
}

.domain-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.domain-selector-label {
  font-weight: 600;
  font-size: 12px;
  line-height: var(--line-height);
  color: var(--color-white);
}

.domain-selector-value {
  display: flex;
  align-items: center;
  margin-top: 6px;
}

.domain-selector-value .menu-domain {
  width: 124px;
  color: var(--color-navy-300);
}

.mud-drawer .select-domain-collapsed {
  display: flex;
  justify-content: center;
  border-top: 1px solid #2A4F91;
  padding: 8px 0;
  margin: 0 8px;
}

.mud-drawer .select-domain-collapsed .collapsed-domain-btn {
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
}

.mud-drawer .select-domain-collapsed .collapsed-domain-btn:hover {
  background: rgba(115, 166, 255, 0.3);
}

.mud-drawer .select-domain-collapsed .favicon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.mud-drawer .mud-progress-circular {
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(115, 166, 255, 0.25);
}

.mud-main-content {
  min-width: 0;
}

.mud-main-content .mud-select .mud-icon-root {
  margin-right: 8px;
  margin-left: -2px;
}

.auth-page {
  display: flex;
  height: 100%;
  justify-content: center;
  background: linear-gradient(238.86deg, rgba(0, 0, 0, 0.4) 3.11%, rgba(0, 0, 0, 0) 16.56%, rgba(0, 0, 0, 0) 29.74%, rgba(0, 0, 0, 0.4) 65.45%), linear-gradient(180deg, rgba(0, 0, 0, 0.4) -0.71%, rgba(0, 0, 0, 0) 21.59%, rgba(0, 0, 0, 0) 50.47%, rgba(0, 0, 0, 0.4) 100%), linear-gradient(296.44deg, #091B2F -0.2%, #163166 44.63%, #0B254D 99.43%);
}

.auth-page a {
  color: var(--color-navy-300);
}

.auth-page ul > li {
  color: var(--color-navy-300);
  line-height: 30px;
  margin-left: 10px;
  padding-left: 7px;
  list-style-image: url('data:image/svg+xml,<svg width="9" height="9" viewBox="0 0 9 9" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="4.5" cy="4.5" r="4" fill="%23446CB2"/></svg>')
}

.auth-page .mud-form {
  padding: 32px;
  width: 400px;
  background: rgba(11, 30, 60, 0.5);
  border-radius: 24px;
}

.auth-page .mud-form .mud-paper {
  align-items: center;
  padding: 16px;
  gap: 12px;
  background: rgba(115, 166, 255, 0.3);
  color: var(--color-blue-200);
}

.auth-page .mud-button-filled-secondary:disabled {
  color: var(--color-white) !important;
}

.auth-page .mud-button-filled-secondary {
  padding: 8px 12px;
  gap: 4px;
  background: var(--color-blue-500);
  color: var(--color-white);
  border-radius: 6px;
}

.auth-page .mud-button-filled-default {
  padding: 8px 16px;
  gap: 8px;
  background: var(--color-gray-200);
  color: var(--color-black);
  border-radius: 6px;
}

.auth-page .mud-form .mud-input-label {
  font-weight: 600;
  font-size: 14px;
  line-height: 150%;
  color: var(--color-navy-300) !important;
}

.auth-page .mud-form .mud-input-slot {
  padding: 10px !important;
  color: var(--color-navy-300) !important;
  background: transparent !important;
}

.auth-page .mud-form .mud-input-text {
  border: 1px solid var(--color-navy-500) !important;
  border-radius: 6px;
  height: 40px;
  background: transparent !important;
}

.auth-page input:-webkit-autofill,
.auth-page input:-webkit-autofill:focus {
  transition: background-color 0s 600000s, color 0s 600000s !important;
}

.auth-page .mud-form .mud-input.mud-input-underline:before,
.auth-page .mud-form .mud-input.mud-input-underline:after {
  border: 0 !important;
}

.auth-page .mud-form .mud-input .mud-icon-button-label {
  margin: 6px 10px 0 0;
}

.auth-page .mud-typography-body2 {
  color: var(--color-blue-300);
}

.auth-page .mud-typography-h2 {
  color: var(--color-navy-300);
}

.color-white {
  color: var(--color-white) !important;
}

.color-black {
  color: var(--color-black) !important;
}

.color-blue {
  color: var(--color-blue-500) !important;
}

.icon-white svg {
  color: var(--color-white) !important;
}

.icon-black svg {
  color: var(--color-black) !important;
}

.icon-blue svg {
  color: var(--color-blue-500) !important;
}

.auth-page .mud-typography-subtitle2 {
  color: var(--color-navy-300) !important;
}

.auth-page .mud-typography-subtitle2 a {
  text-decoration-line: underline;
  text-underline-offset: 2px;
}

.cm-chart-dialog-yaxis {
  font-family: var(--font-family-inter) !important;
  font-size: var(--font-size-14) !important;
  font-weight: var(--font-weight-14-regular) !important;
  line-height: var(--line-height) !important;
  letter-spacing: 0 !important;
  color: var(--color-gray-900) !important;
}

.cm-metric-chart-dialog {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.cm-metric-chart-dialog .mud-dialog-title {
  box-shadow: 0 0 0 1px var(--color-gray-400);
}

.cm-metric-chart-dialog .mud-dialog-title strong {
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-20-semibold);
  line-height: var(--line-height);
  letter-spacing: -0.5px;
  color: var(--color-gray-900);
}

.cm-metric-chart-dialog .mud-dialog-title span {
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-16-semibold);
  line-height: var(--line-height);
  letter-spacing: -0.5px;
  color: var(--color-gray-700);
}

.cm-metric-chart-dialog .mud-dialog-content .mud-typography-h3 {
  font-size: var(--font-size-28);
  font-weight: var(--font-weight-28-semibold);
  line-height: var(--line-height);
  letter-spacing: -3px;
  color: var(--color-gray-900);
}

.cm-metric-chart-dialog .mud-dialog-content .mud-typography-body2 {
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-regular);
  line-height: var(--line-height);
  letter-spacing: 0;
  color: var(--color-gray-700);
}

.cm-metric-chart-dialog .cm-metric-chart-status {
  box-shadow: 0 0 0 1px var(--color-gray-400);
}

.setup-wizard .mud-card-actions .mud-button {
  padding: 12px;
  width: auto;
  color: var(--color-white);
  background-color: var(--color-blue-500);
}

.setup-wizard .mud-card-actions .mud-button.mud-button-text {
  color: var(--color-gray-900);
  background-color: var(--color-gray-400);
}

.setup-wizard .mud-typography-h4.active {
  color: var(--color-gray-800) !important;
}

.setup-wizard .mud-typography-h4 {
  color: var(--color-gray-700) !important;
  padding: 0;
}

.banner,
.annotation-example code,
.setup-wizard code {
  display: block;
  padding: 16px 24px;
  margin: 24px 0 !important;
  background: #F3F4F6;
  border-left: 4px solid #D6E4FF;
  border-radius: 4px;
  color: var(--color-gray-800);
  font-family: var(--font-family-inter);
  font-size: var(--font-size-13);
  overflow-wrap: break-word;
  overflow: auto;
}

.annotation-example .snippet-block,
.setup-wizard .snippet-block {
  margin: 24px 0;
  padding: 0;
}

.annotation-example .snippet-block code,
.setup-wizard .snippet-block code {
  white-space: pre;
}

.mud-input.mud-input-outlined {
  padding: 0 !important;
  height: 36px;
}

.mud-select-extended .mud-select-input-extended.mud-no-start-adornment {
  padding-left: 2px !important;
}

.mud-input > .mud-input-adornment {
  padding-left: 2px !important;
}

.mud-input-control-input-container:has(>.mud-disabled) {
  background-color: var(--color-gray-300) !important;
}

.mud-toggle-group.mud-disabled button {
  background-color: var(--color-gray-300) !important;
}

.setup-wizard .mud-typography-body1 {
  color: var(--color-gray-800);
}

.setup-wizard .mud-input-adornment-start {
  margin-right: 0;
  margin-inline-end: 0;
}

.setup-wizard .mud-input-adornment .mud-input-adornment-text {
  font-weight: 600;
}

.setup-wizard .mud-button {
  font-weight: 500;
  font-size: 13px;
  line-height: 16px;
  height: 40px;
}

.setup-wizard .mud-dialog-content {
  border-top: 1px solid var(--color-gray-500);
  border-bottom: 1px solid var(--color-gray-500);
  border-radius: 0;
  margin: 0;
  padding: 16px 16px 0 16px;
}

.setup-wizard .mud-input-helper-text.mud-input-error div::before {
  content: url("../img/error.svg");
  margin-right: 5px;
  top: 3px;
  position: relative;
}

.setup-wizard .mud-input-helper-text {
  padding-top: 3px;
  font-size: 12px;
  line-height: 150%;
  color: var(--color-red-500);
}


.setup-wizard .mud-error-text {
  color: var(--color-red-500);
}

.setup-wizard .mud-error-text::before {
  content: url("../img/error.svg");
  margin-right: 5px;
  top: 3px;
  position: relative;
}

.centered {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.favicon {
  width: 14px;
  height: 14px;
}

.menu-domain {
  width: 140px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  font-weight: 500;
  font-size: 13px;
  line-height: 150%;
  color: var(--color-gray-800);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mud-input-slot .menu-domain {
  width: 124px;
  color: var(--color-navy-300);
  vertical-align: text-bottom;
}

.mud-link {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-regular);
  line-height: var(--line-height);
  color: var(--color-blue-500) !important;
}

.mud-link:hover {
  color: var(--color-blue-300) !important;
}

.no-data {
  background-color: var(--color-gray-300);
  height: 100%;
  display: flex;
  justify-content: center;
}

.mud-grid-item .mud-input-control.mud-input-control-margin-dense {
  margin: 0;
}

.mud-alert .mud-alert-message {
  width: 100%;
}

.mud-alert-filled-error .mud-alert-message {
  color: var(--color-white);
}

.mud-alert .mud-typography {
  color: var(--color-gray-800);
}

.mud-alert.mud-alert-text-info {
  background-color: var(--color-blue-200) !important;
}

.w-fit {
  width: fit-content;
}

.w-100 {
  width: 100%;
}

.mud-chip-size-small {
  height: 19px;
  font-weight: var(--font-weight-11-medium);
  font-size: var(--font-size-11);
  text-transform: uppercase;
}

.mud-chip.mud-chip-color-default {
  background: var(--color-gray-400);
  color: var(--color-gray-700);
}

.mud-chip.mud-chip-color-secondary {
  background: var(--color-blue-200);
  color: var(--color-navy-500);
}

.cm-expansion-panels {
}

.cm-expansion-panels .mud-simple-table {
  box-shadow: none;
}

.cm-expansion-panels .mud-simple-table table {
  table-layout: fixed;
}

.cm-expansion-panels .mud-simple-table * tr {
  vertical-align: top;
}

.cm-expansion-panels .mud-simple-table * tr td {
  font-family: var(--font-family-inter);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-medium);
  line-height: var(--line-height);
  color: var(--color-gray-700);
  border: none;
  padding: 0;
}

.cm-expansion-panels .mud-simple-table * tr td:nth-child(2n) {
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.cm-expansion-panels .mud-simple-table * tr td.metric-highlight-poor {
  background-color: var(--mud-palette-error-lighten);
  border-radius: 5px;
}

.cm-expansion-panels .mud-simple-table * tr td > span:not(.mud-badge-root) {
  font-family: var(--font-family-jetbrains-mono);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-regular);
  line-height: var(--line-height);
  color: var(--color-gray-800);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-expansion-panels .mud-simple-table * tr.cm-tr-double td > span:not(.mud-badge-root) {
  font-weight: var(--font-weight-13-medium);
}

.cm-expansion-panels .mud-simple-table * tr.cm-tr-double.metric-highlight-poor td > span:not(.mud-badge-root) {
  color: var(--color-red-500);
}

.cm-expansion-panels .mud-simple-table * tr.cm-tr-double {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-radius: 5px;
  padding: 4px 8px;
}

.cm-expansion-panels .mud-simple-table * tr.cm-tr-double.metric-highlight-poor {
  background-color: var(--mud-palette-error-lighten);
}

.cm-expansion-panels .mud-simple-table * tr.cm-tr-double td {
  font-family: var(--font-family-inter);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-regular);
  line-height: var(--line-height);
  color: var(--color-gray-800);
}

.cm-expansion-panels .mud-simple-table * tr.cm-tr-double td:nth-child(2n) {
  display: inline-flex;
  align-items: center;
}

.cm-expansion-panels .mud-simple-table * tr.cm-tr-double td > strong {
  font-family: var(--font-family-inter);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-medium);
  line-height: var(--line-height);
  color: var(--color-gray-800);
}

.cm-expansion-panels .mud-expand-panel .mud-expand-panel-header .mud-expand-panel-text,
.cm-expansion-panels .mud-expand-panel .mud-expand-panel-header .mud-expand-panel-text .mud-typography-h4 {
  font-family: var(--font-family-inter);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-semibold);
  line-height: var(--line-height);
  color: var(--color-gray-900);
}

.cm-expansion-panels .mud-expand-panel.mud-expand-panel-border {
  border-bottom: 1px solid var(--color-gray-400) !important;
  border-radius: 0;
}

.cm-expansion-panels .mud-expand-panel.mud-expand-panel-border:last-child {
  border-bottom: none !important;
}

.cm-expansion-panels .mud-expand-panel.mud-panel-expanded {
  border-bottom: 1px solid var(--color-gray-400) !important;
  margin: 0;
}

.cm-page-alert {
  color: var(--color-gray-800);
}

.cm-page-alert.mud-alert-text-warning {
  background-color: var(--color-yellow-300);
}

.cm-page-alert.mud-alert-text-warning .mud-icon-root {
  color: var(--color-yellow-700);
}

.cm-page-alert.mud-alert-text-error {
  background-color: var(--color-red-100);
}

.cm-page-alert.mud-alert-text-error .mud-icon-root {
  color: var(--color-red-500);
}

.cm-page-alert.mud-alert-text-success {
  background-color: var(--color-green-100);
}

.cm-page-alert.mud-alert-text-success .mud-icon-root {
  color: var(--color-green-500);
}

.cm-page-alert .mud-alert-close .mud-icon-root {
  color: var(--color-gray-800);
}

.cm-page-alert .mud-alert-position {
  display: flex;
  align-items: center;
}

.cm-performance-tip-box {
  padding: 16px;
  border: 1px solid #D5DBE0;
  box-shadow: 0px 1px 3px 0px #0000000D;
  border-radius: 6px;
}

.cm-performance-tip-box .mud-typography-body1 {
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-semibold);
  line-height: var(--line-height);
  color: var(--color-gray-900);
}

.cm-performance-tip-box .mud-typography-body2 {
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-regular);
  line-height: var(--line-height);
  color: var(--color-gray-800);
}

.cm-performance-tip-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.cm-performance-tip-icon-container img {
  width: 24px;
  height: 24px;
}

.mud-message-box .mud-dialog-actions {
  padding: 24px;
}

.mud-message-box .mud-dialog-actions .mud-button {
  padding: 0 12px;
  height: 40px;
  font-weight: var(--font-weight-14-regular);
}

.mud-message-box .mud-dialog-actions .mud-button.mud-button-filled-default {
  color: var(--color-gray-900);
  background: var(--color-gray-400);
}

.mud-message-box .mud-dialog-actions .mud-button.mud-button-filled-error {
  color: var(--color-white);
  background: var(--color-red-500);
}

.mud-message-box .mud-dialog-actions .mud-button.mud-button-filled-error .mud-svg-icon {
  fill: var(--color-white);
}

.mud-message-box .mud-dialog-content {
  color: var(--color-gray-900);
}

.filter-builder-dialog-content {
  overflow-y: visible !important;
}

.filter-builder-group {
  border-radius: 8px;
  background-color: var(--color-gray-300);
}

.filter-builder-condition {
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-500);
  border-radius: 4px;
}

.filter-builder-preview {
  background-color: var(--color-blue-100);
  border-radius: 4px;
}

.filter-builder-preview .filter-preview-text {
  font-family: var(--font-family-jetbrains-mono);
  color: var(--color-blue-700);
}

.filter-builder-preview .mud-typography-subtitle2 {
  color: var(--color-blue-700);
  font-weight: var(--font-weight-14-semibold);
}

.filter-builder-add-condition {
  align-self: flex-start;
  color: var(--color-gray-700);
}

.filter-condition-field {
  width: 160px;
  flex-shrink: 0;
}

.filter-condition-operator {
  width: 80px;
  flex-shrink: 0;
}

.filter-condition-value {
  flex: 1;
  min-width: 0;
}

.filter-group-operator {
  width: 100px;
}

.user-profile > div {
  max-width: 600px;
}

.user-profile .mud-typography-h2 {
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-semibold);
  line-height: var(--line-height);
}

.user-profile .mud-button-label {
  font-weight: var(--font-weight-14-medium);
  padding: 4px 0;
}

.user-profile .mud-button-filled-secondary {
  background-color: var(--color-blue-500);
}

.user-profile .mud-button-filled-error {
  background-color: var(--color-red-500);
}

.user-profile .mud-button-filled-default {
  background-color: var(--color-gray-400);
}

/* API Keys (Settings page) */
.api-key-monospace {
  font-family: var(--font-family-mono, monospace);
}

.api-key-token-box {
  flex-grow: 1;
  overflow-wrap: anywhere;
}

.api-keys-col-actions {
  width: 80px;
}

.subscription-plan-name {
  font-size: var(--font-size-16);
  color: var(--color-gray-700);
}

.suggest-categories-col-action {
  width: 100px;
  text-align: center;
}

.journey-drop-zone {
  min-height: 200px;
}

.text-secondary {
  color: var(--mud-palette-text-secondary);
}

.mud-dialog-title > h6 {
  font-size: var(--font-size-24);
  font-weight: var(--font-weight-24-semibold);
  line-height: var(--line-height);
  color: var(--color-gray-900);
}

.mud-overlay-dark {
  background-color: var(--color-gray-900) !important;
  opacity: 0.75;
}

.mud-dialog {
  box-shadow: none;
}

.mud-dialog .mud-dialog-actions {
  padding: 8px 24px 16px;
}

.mud-button-root.mud-icon-button {
  padding: 6px;
}

.mud-button-root.mud-icon-button.mud-icon-button-size-small {
  padding: 4px;
}

.mud-button-root.mud-icon-button.mud-icon-button-size-large {
  padding: 10px;
}

.metric-picker-list {
  height: 400px;
  overflow-y: auto;
}

.metric-picker-group-header {
  padding: 12px 8px 4px;
  color: var(--color-gray-700);
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
}

.metric-picker-item:hover {
  background: var(--color-gray-300);
}

.metric-picker-item.selected {
  background: var(--color-blue-100);
}

.metric-picker-favorite {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  border: none;
  background: transparent;
  padding: 0;
  color: var(--color-gray-700);
}

.metric-picker-favorite:hover {
  background: var(--color-gray-400);
}

.metric-picker-favorite.is-favorite {
  color: var(--color-yellow-500);
}

.metric-picker-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-size-14);
  color: var(--color-gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-picker-item-source {
  color: var(--color-gray-700);
  font-weight: var(--font-weight-14-regular);
  font-size: var(--font-size-13);
}

.metric-picker-item-stats {
  font-size: var(--font-size-12);
  color: var(--color-gray-700);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.metric-picker-no-results {
  padding: 24px;
  text-align: center;
  color: var(--color-gray-700);
}

.m-auto {
  margin: auto;
}

.faq-accordion-list {
  border: 1px solid var(--color-gray-400);
  border-radius: 6px;
  overflow: hidden;
}

.faq-accordion-item {
  border-bottom: 1px solid var(--color-gray-400);
}

.faq-accordion-item:last-child {
  border-bottom: none;
}

.faq-accordion-trigger {
  width: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-semibold);
  color: var(--color-gray-800);
  line-height: var(--line-height);
  text-align: left;
  transition: background 0.15s;
}

.faq-accordion-trigger:hover {
  background: var(--color-gray-300);
}

.faq-accordion-question {
  flex: 1;
}

.faq-accordion-chevron {
  transition: transform 0.2s;
  color: var(--color-gray-600);
  flex-shrink: 0;
}

.faq-accordion-item.open .faq-accordion-chevron {
  transform: rotate(180deg);
}

.faq-accordion-panel {
  display: none;
  border-top: 1px solid var(--color-gray-400);
}

.faq-accordion-item.open .faq-accordion-panel {
  display: block;
}

.faq-accordion-content {
  padding: 16px;
  font-weight: var(--font-weight-14-regular);
  font-size: var(--font-size-14);
  line-height: var(--line-height);
  color: var(--color-gray-800);
}

/* Customisation section */
.cm-feature-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-feature-card-item {
  border: 1px solid var(--color-gray-400);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.cm-feature-card-item:hover {
  box-shadow: 0 0 0 1px var(--color-blue-300);
}

.cm-feature-card-item.expanded {
  box-shadow: 0 0 0 1px var(--color-blue-300);
}

.cm-feature-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  transition: background 0.15s;
}

.cm-feature-card-item:hover .cm-feature-card-header {
  background: var(--color-gray-300);
}

.cm-feature-card-info {
  flex: 1;
  min-width: 0;
}

.cm-feature-card-info .mud-typography-body1 {
  color: var(--color-gray-700);
}

.cm-feature-card-chevron {
  transition: transform 0.2s;
  color: var(--color-gray-600);
  flex-shrink: 0;
}

.cm-feature-card-item.expanded .cm-feature-card-chevron {
  transform: rotate(180deg);
}

.cm-feature-card-detail {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--color-gray-400);
  padding-top: 20px;
}

.cm-feature-card-item.expanded .cm-feature-card-detail {
  display: block;
}

.cm-feature-card-detail code {
  display: inline;
  padding: 2px 6px;
  margin: 0;
  background: var(--color-gray-300);
  border-radius: 4px;
  font-family: var(--font-family-jetbrains-mono);
  font-size: var(--font-size-12);
  color: var(--color-gray-900);
  border-left: none;
}

.cm-code-block {
  display: block;
  padding: 16px 20px;
  margin: 0 0 12px 0;
  background: var(--color-gray-300);
  border-left: 4px solid #D6E4FF;
  border-radius: 4px;
  font-family: var(--font-family-jetbrains-mono);
  font-size: var(--font-size-12);
  line-height: 1.6;
  color: var(--color-gray-800);
  overflow-x: auto;
  white-space: pre;
}

.cm-feature-note {
  display: flex;
  align-items: flex-start;
  padding: 12px 16px;
  background: var(--color-blue-200);
  border-radius: 6px;
}

.cm-feature-note .mud-typography {
  font-size: var(--font-size-13);
  color: var(--color-gray-800);
}

.cm-param-table {
  margin-bottom: 12px;
}

.cm-param-table thead th {
  font-weight: 600;
  font-size: var(--font-size-11);
  text-transform: uppercase;
  color: var(--color-gray-700);
  background: var(--color-gray-300);
}

/* Setup wizard banner */
.cm-setup-banner {
    margin: 0 0 16px 0 !important;
}

.cm-setup-banner-btn {
    font-size: var(--font-size-13);
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    padding: 6px 16px;
    background: #1976d2;
    border: none;
    border-radius: 5px;
    white-space: nowrap;
}

.cm-setup-banner-btn:hover {
    background: #1565c0;
    color: #fff;
}

.cm-setup-banner-close {
    background: none;
    border: none;
    color: var(--color-gray-600);
    font-size: 16px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
}

.cm-setup-banner-close:hover {
    color: var(--color-gray-900);
}

/* Setup wizard page */
.cm-setup-page {
    max-width: 900px;
}

.cm-setup-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-green-500);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cm-setup-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-blue-500);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
}

.cm-setup-step-title-done {
    text-decoration: line-through;
    color: var(--color-gray-600);
}

.cm-setup-action-btn {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-blue-500);
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid var(--color-gray-500);
    border-radius: 5px;
    white-space: nowrap;
}

.cm-setup-action-btn:hover {
    border-color: var(--color-blue-500);
    background: var(--color-blue-100);
}

.cm-param-table tbody td {
  font-size: var(--font-size-13);
  color: var(--color-gray-800);
}

.pw-tooltip {
  max-width: 500px !important;
}

.pw-resource-tooltip {
  max-width: none !important;
}

.pw-tooltip-content {
  text-align: left;
  word-break: break-all;
  max-width: 900px;
}

.mud-list-item-text p {
  display: flex;
}

/* Script Impact page layout – override fixed height on small screens
   so the stacked (column) layout can size naturally. */
@media (max-width: 959.98px) {
  .scripts-page-layout {
    height: auto !important;
  }
}

/* Script Impact table sizing toolkit.
   Change ratios and paddings here to tune all table columns. */
.scripts-impact-table {
  --scripts-col-vendor-width: 43%;
  --scripts-col-metric-width: 25%;
  --scripts-col-pv-width: 20%;
  --scripts-col-pageviews-width: 12%;
  --scripts-col-padding-x: 10px;
  --scripts-header-font-size: var(--font-size-12);
  --scripts-body-font-size: var(--font-size-12);
  --scripts-metric-gap: 8px;
  width: 100%;
  border-top: none;
}

.scripts-impact-table .mud-table-root {
  width: 100%;
  min-width: 680px;
  table-layout: fixed;
}

.scripts-impact-table col.scripts-col-metric-width {
  width: 230px;
}
.scripts-impact-table col.scripts-col-pv-width {
  width: 170px;
}
.scripts-impact-table col.scripts-col-pageviews-width {
  width: 145px;
}
.scripts-impact-table col.scripts-col-action-width {
  width: 36px;
}

    .scripts-impact-table .mud-table-container {
        overflow-x: auto;
    }

.scripts-impact-table .mud-table-cell {
  min-width: 0;
  padding-left: var(--scripts-col-padding-x);
  padding-right: var(--scripts-col-padding-x);
  white-space: nowrap;
}

.scripts-impact-table th .mud-table-sort-label {
  width: 100%;
  min-width: 0;
}

.scripts-impact-table th .mud-table-sort-label-content {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-size: var(--scripts-header-font-size);
}

.scripts-impact-table td {
  font-size: var(--scripts-body-font-size);
}

.scripts-impact-table .scripts-col-vendor {
  width: var(--scripts-col-vendor-width);
  text-align: left !important;
}

.scripts-impact-table .scripts-col-vendor .mud-tooltip-root,
.scripts-impact-table .scripts-col-vendor .mud-stack,
.scripts-impact-table .scripts-col-vendor .mud-typography {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scripts-impact-table .scripts-col-vendor .mud-tooltip-root {
  display: block;
  width: 100%;
  max-width: 100%;
}

.scripts-impact-table .scripts-col-metric {
  width: var(--scripts-col-metric-width);
  min-width: 190px;
  max-width: 230px;
}

.scripts-impact-table th.scripts-col-metric {
  text-align: left !important;
}

.scripts-impact-table th.scripts-col-metric .mud-table-sort-label {
  justify-content: flex-start;
}

.scripts-impact-table td.scripts-col-metric {
  text-align: left !important;
}

.scripts-impact-table .scripts-col-pv-impacted {
  width: var(--scripts-col-pv-width);
  text-align: left !important;
}

.scripts-impact-table th.scripts-col-pv-impacted .mud-table-sort-label {
  justify-content: flex-start;
}

.scripts-impact-table .scripts-col-pageviews-impacted {
  width: var(--scripts-col-pageviews-width);
  text-align: left !important;
}

.scripts-impact-table th.scripts-col-pageviews-impacted .mud-table-sort-label {
  justify-content: flex-start;
}

.scripts-impact-table .scripts-table-header-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scripts-impact-table .scripts-metric-header-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.scripts-impact-table .scripts-metric-header-label .mud-tooltip-root {
  flex: 0 0 auto;
  width: auto !important;
  overflow: visible !important;
}

.scripts-impact-table .scripts-metric-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--scripts-metric-gap);
  width: 100%;
  min-width: 0;
}

.scripts-impact-table .scripts-metric-progress {
  flex: 1 1 auto;
  min-width: 0;
}

.scripts-impact-table .scripts-metric-value {
  flex: 0 0 50px;
  width: 50px;
  text-align: right;
  white-space: nowrap;
}


/* Page Weight widgets */
.pw-widget-card {
  height: 100%;
}

.pw-view-toggle.mud-toggle-group {
  margin-bottom: 0 !important;
  height: 34px !important;
  min-height: 34px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
}

.pw-view-toggle.mud-toggle-group > .mud-toggle-item {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pw-widget-card-small {
  height: 100%;
}

.pw-widget-card-small .mud-card-content {
  padding: 20px 24px;
  min-height: 120px;
}

.pw-widget-card .mud-card-content {
  min-height: 168px;
}

.pw-widget-loading {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-widget-card-small .pw-widget-loading {
  min-height: 88px;
}

.pw-widget-value-emphasis {
  font-size: 22px !important;
  line-height: 1.2;
}

.pw-page-label {
  font-weight: 600;
  color: var(--color-gray-900);
}

.pw-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pw-clickable:hover {
  border-color: var(--color-blue-500);
  box-shadow: 0 0 0 1px var(--color-blue-500);
}

.pw-donut-container {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  height: 220px;
  min-width: 0;
}

.pw-donut-container > div {
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
}

.pw-donut-container .apexcharts-canvas,
.pw-donut-container .apexcharts-svg {
  width: 100% !important;
  height: 100% !important;
}

.pw-donut-container .apexcharts-legend {
  display: none !important;
}

.pw-donut-container .apexcharts-tooltip {
  transform: translate(12px, -12px) !important;
  background: #fff !important;
  border: 1px solid var(--color-gray-500);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(12, 12, 13, 0.12);
}

.pw-donut-container .apexcharts-tooltip-title {
  margin: 0;
  padding: 6px 10px 0;
  background: transparent !important;
  border: 0;
  color: var(--color-gray-700);
  font-weight: 600;
}

.pw-donut-container .apexcharts-tooltip-series-group {
  padding: 4px 10px 8px;
  align-items: center;
}

.pw-donut-container .apexcharts-tooltip-text,
.pw-donut-container .apexcharts-tooltip-text span {
  color: var(--color-gray-900) !important;
  font-weight: 500;
}

.pw-type-breakdown-layout {
  display: flex;
  align-items: stretch;
  gap: 16px;
  min-height: 220px;
}

.pw-type-breakdown-side {
  flex: 0 0 clamp(180px, 34%, 240px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-type-breakdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pw-type-breakdown-hint {
  color: var(--color-gray-700);
  font-weight: 500;
  line-height: 1.3;
}

.pw-type-breakdown-clear {
  border: none;
  background: transparent;
  color: #366CD9;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 0;
  cursor: pointer;
}

.pw-type-breakdown-clear:hover {
  text-decoration: underline;
}

.pw-type-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 188px;
  overflow-y: auto;
  padding-right: 2px;
  padding-bottom: 2px;
}

.pw-type-breakdown-item {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  background: #fff;
  color: var(--color-gray-900);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
}

.pw-type-breakdown-item:hover {
  border-color: #B9C8F2;
  background: #F8FAFF;
}

.pw-type-breakdown-item.is-active {
  border-color: #366CD9;
  background: #EEF4FF;
}

.pw-type-breakdown-item-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pw-type-breakdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.pw-type-breakdown-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pw-type-breakdown-item-right {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 0 auto;
}

.pw-type-breakdown-size {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gray-900);
}

.pw-type-breakdown-percent {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-gray-500);
}

.pw-widget-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-gray-600);
  letter-spacing: 0.01em;
}

.pw-widget-value {
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}

.pw-widget-url {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw-widget-subtext {
  font-size: 13px;
  color: var(--color-gray-500);
  line-height: 1.4;
}

.pw-widget-variants-panel {
  border-radius: 8px;
}

.pw-widget-variants-hint {
  color: var(--color-gray-700);
}

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

.pw-topop-list-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 110px 90px;
  gap: 10px;
  align-items: center;
  padding: 0 10px;
}

.pw-topop-list-head span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-gray-600);
}

.pw-topop-head-save,
.pw-topop-head-traffic {
  text-align: right;
}

.pw-topop-row {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 110px 90px;
  gap: 10px;
  align-items: center;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.pw-topop-row:hover {
  border-color: #b9c8f2;
  background: #f8faff;
}

.pw-topop-rank {
  font-size: 12px;
  color: var(--color-gray-700);
  font-weight: 600;
}

.pw-topop-path {
  font-size: 13px;
  color: var(--color-gray-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

.pw-topop-save {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-700);
  text-align: right;
  white-space: nowrap;
}

.pw-topop-traffic {
  font-size: 12px;
  color: var(--color-gray-600);
  white-space: nowrap;
  text-align: right;
}

.pw-topop-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-topop-hero-value {
  line-height: 1.1;
}

.pw-topop-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pw-topop-pill {
  border: 1px solid #cad6f8;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: #f3f7ff;
  color: #2c4da8;
  cursor: pointer;
}

.pw-topop-pill:hover {
  background: #e9f1ff;
}

.pw-topop-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.pw-topop-split-main {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.pw-topop-split-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pw-topop-split-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  color: var(--color-gray-800);
  font-size: 12px;
  cursor: pointer;
}

.pw-topop-split-row:hover {
  border-color: #b9c8f2;
  background: #f8faff;
}

.pw-topop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pw-topop-table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-gray-700);
  padding: 4px 0;
}

.pw-topop-table td {
  border-top: 1px solid var(--color-gray-200);
  padding: 8px 0;
  color: var(--color-gray-800);
}

.pw-topop-table-link {
  border: none;
  background: transparent;
  color: #366cd9;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font: inherit;
}

.pw-topop-table-link:hover {
  text-decoration: underline;
}

.pw-topop-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-topop-bar-row {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.pw-topop-bar-row:hover {
  border-color: #b9c8f2;
  background: #f8faff;
}

.pw-topop-bar-title {
  color: var(--color-gray-900);
  font-size: 13px;
  font-weight: 500;
}

.pw-topop-bar-meta {
  color: var(--color-gray-600);
  font-size: 12px;
}

.pw-topop-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--color-gray-200);
  overflow: hidden;
}

.pw-topop-bar-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e2382d 0%, #ff9318 100%);
}

.pw-type-chip-side,
.pw-type-table-side {
  flex: 0 0 clamp(180px, 34%, 260px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-type-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pw-type-chip {
  border: 1px solid var(--color-gray-200);
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-gray-800);
  cursor: pointer;
  font: inherit;
}

.pw-type-chip:hover {
  border-color: #b9c8f2;
  background: #f8faff;
}

.pw-type-chip.is-active {
  border-color: #366cd9;
  background: #eef4ff;
}

.pw-type-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pw-type-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pw-type-mini-table th {
  text-align: left;
  color: var(--color-gray-700);
  font-weight: 600;
  padding-bottom: 4px;
}

.pw-type-mini-table td {
  border-top: 1px solid var(--color-gray-200);
  padding: 6px 0;
}

.pw-type-mini-table tr.is-active td {
  background: #eef4ff;
}

.pw-type-table-link {
  border: none;
  background: transparent;
  color: var(--color-gray-800);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
}

.pw-type-bars-side {
  flex: 0 0 clamp(180px, 34%, 260px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.pw-type-bar-item {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 6px 8px;
  width: 100%;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(56px, auto) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.pw-type-bar-item:hover {
  border-color: #b9c8f2;
  background: #f8faff;
}

.pw-type-bar-item.is-active {
  border-color: #366cd9;
  background: #eef4ff;
}

.pw-type-bar-label {
  font-size: 12px;
  color: var(--color-gray-800);
  font-weight: 500;
}

.pw-type-bar-track {
  height: 6px;
  border-radius: 999px;
  background: var(--color-gray-200);
  overflow: hidden;
}

.pw-type-bar-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.pw-type-bar-value {
  font-size: 12px;
  color: var(--color-gray-600);
  white-space: nowrap;
}

.pw-type-cards-side {
  flex: 0 0 clamp(180px, 34%, 260px);
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pw-type-card {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.pw-type-card:hover {
  border-color: #b9c8f2;
  background: #f8faff;
}

.pw-type-card.is-active {
  border-color: #366cd9;
  background: #eef4ff;
}

.pw-type-card-label {
  font-size: 12px;
  color: var(--color-gray-800);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pw-type-card-size {
  font-size: 13px;
  color: var(--color-gray-900);
  font-weight: 600;
}

.pw-type-card-percent {
  font-size: 12px;
  color: var(--color-gray-600);
}

.pw-small-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pw-inline-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.pw-inline-badge-error {
  background: #fdeceb;
  color: #cc3b30;
}

.pw-detail-variant-panel {
  border-radius: 8px;
}

.pw-detail-variant-hint {
  color: var(--color-gray-800);
  font-weight: 500;
}

.pw-detail-layout {
  border-radius: 8px;
}

.pw-detail-kpi-card {
  min-height: 126px;
  height: 100%;
  border-radius: 8px;
  background: #f8f9fa;
}

.pw-detail-step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pw-detail-step-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--color-gray-200);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.pw-detail-step-index {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--color-gray-200);
  color: var(--color-gray-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.pw-detail-step-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pw-detail-step-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  background: #edf2ff;
  color: #2f57b5;
}

.pw-detail-step-why {
  color: var(--color-gray-800);
}

.pw-detail-step-action {
  color: var(--color-gray-900);
}

.pw-detail-step-link {
  color: #366cd9;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.pw-detail-step-link:hover {
  text-decoration: underline;
}

.pw-step-critical {
  border-color: #f4b7b3;
  background: #fff7f7;
}

.pw-step-warning {
  border-color: #f6d5a3;
  background: #fffaf3;
}

.pw-step-improve {
  border-color: #c6d8ff;
  background: #f7faff;
}

.pw-step-verify {
  border-color: #cdd5e1;
  background: #f8fafc;
}

.pw-action-card {
  border-left: 3px solid transparent;
}

.pw-action-card.pw-step-critical {
  border-left-color: #ef4444;
  background: #fff7f7;
}

.pw-action-card.pw-step-warning {
  border-left-color: #f59e0b;
  background: #fffaf3;
}

.pw-action-card.pw-step-improve {
  border-left-color: #3b82f6;
  background: #f7faff;
}

.pw-action-card.pw-step-verify {
  border-left-color: #94a3b8;
  background: #f8fafc;
}

.pw-action-title {
  font-weight: 600;
  color: var(--color-gray-900);
}

.pw-action-resources {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pw-action-resource-link {
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: block;
}

.pw-action-card .pw-widget-subtext {
  color: var(--color-gray-700);
}

.pw-detail-three-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pw-detail-column {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-detail-column-title {
  color: var(--color-gray-900);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pw-detail-column-card {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 8px;
  background: #f9fbff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pw-detail-action-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pw-detail-action-table th {
  text-align: left;
  color: var(--color-gray-700);
  font-weight: 700;
  padding: 6px 8px;
  border-bottom: 1px solid var(--color-gray-200);
}

.pw-detail-action-table td {
  vertical-align: top;
  padding: 10px 8px;
  border-top: 1px solid var(--color-gray-200);
  color: var(--color-gray-900);
}

.pw-detail-story-card {
  min-height: 148px;
  height: 100%;
}

.pw-detail-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pw-detail-board-lane {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-detail-board-card {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pw-detail-step-resource-label {
  color: var(--color-gray-800);
  font-weight: 600;
}

.pw-detail-step-resource-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--color-gray-900);
  font-size: 12px;
  line-height: 1.35;
}

.pw-detail-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pw-detail-timeline-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.pw-detail-timeline-dot {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--color-gray-300);
}

.pw-detail-timeline-content {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pw-layout-variant-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c6d8ff;
  border-radius: 999px;
  background: #f5f8ff;
  color: #2f57b5;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.pw-detail-layout-slider {
  margin-top: 2px;
}

.pw-detail-layout-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pw-detail-layout-chip {
  border: 1px solid var(--color-gray-300);
  border-radius: 999px;
  background: #fff;
  color: var(--color-gray-800);
  min-width: 30px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pw-detail-layout-chip:hover {
  border-color: #b9c8f2;
  background: #f8faff;
}

.pw-detail-layout-chip.is-active {
  border-color: #366cd9;
  background: #eef4ff;
  color: #2f57b5;
}

.pw-detail-layout-v2 .pw-detail-kpi-grid,
.pw-detail-layout-v5 .pw-detail-kpi-grid,
.pw-detail-layout-v9 .pw-detail-kpi-grid {
  row-gap: 12px;
}

.pw-detail-layout-v3 .pw-detail-kpi-card,
.pw-detail-layout-v10 .pw-detail-kpi-card {
  min-height: 96px;
}

.pw-detail-layout-v4 .pw-detail-kpi-card,
.pw-detail-layout-v8 .pw-detail-kpi-card {
  border-width: 2px;
}

.pw-detail-layout-v7 .pw-detail-kpi-card {
  border-color: #cad6f8;
  background: #f8faff;
}

.pw-detail-layout-v10 .pw-detail-step-link {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pw-detail-page-title {
  line-height: 1.1;
}

.pw-detail-page-subtitle {
  color: var(--color-gray-700);
  font-size: 15px;
}

.pw-detail-section-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-gray-900);
}

.pw-detail-block-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-gray-900) !important;
}

.pw-detail-section-caption {
  font-size: 14px;
  color: var(--color-gray-800);
}

.pw-detail-layout-a {
  --pw-a-title-size: 23px;
  --pw-a-subtitle-size: 14px;
  --pw-a-kpi-label-size: 13px;
  --pw-a-kpi-value-size: 26px;
  --pw-a-step-title-size: 17px;
  --pw-a-step-body-size: 14px;
  --pw-a-link-size: 14px;
  --pw-a-link-weight: 700;
  --pw-a-link-color: #366cd9;
  --pw-a-link-decoration: none;
  --pw-a-step-shadow: none;
  --pw-a-step-radius: 10px;
  --pw-a-step-border-width: 1px;
  --pw-a-summary-bg: #ffffff;
  --pw-a-breakdown-bg: #ffffff;
  --pw-a-resource-header-bg: #ffffff;
  --pw-a-kpi-bg: #ffffff;
  background: var(--pw-a-summary-bg);
}

.pw-detail-layout-a .pw-detail-summary-title {
  font-size: var(--pw-a-title-size);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-gray-900);
}

.pw-detail-layout-a .pw-detail-summary-path {
  font-size: var(--pw-a-subtitle-size);
  line-height: 1.35;
}

.pw-detail-layout-a .pw-detail-kpi-card {
  background: var(--pw-a-kpi-bg);
}

.pw-detail-layout-a .pw-detail-kpi-label {
  font-size: var(--pw-a-kpi-label-size);
}

.pw-detail-layout-a .pw-detail-kpi-value {
  font-size: var(--pw-a-kpi-value-size);
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-gray-900);
}

.pw-detail-kpi-help {
  display: block;
  margin-top: 4px;
  color: var(--color-gray-600);
  font-size: 12px;
  line-height: 1.35;
}

.pw-detail-layout-a .pw-detail-step-card {
  border-width: var(--pw-a-step-border-width);
  border-radius: var(--pw-a-step-radius);
  box-shadow: var(--pw-a-step-shadow);
}

.pw-detail-layout-a .pw-detail-step-title {
  font-size: var(--pw-a-step-title-size);
  font-weight: 700;
  line-height: 1.25;
}

.pw-detail-layout-a .pw-detail-step-why,
.pw-detail-layout-a .pw-detail-step-action {
  font-size: var(--pw-a-step-body-size);
  line-height: 1.45;
}

.pw-detail-layout .pw-widget-subtext {
  color: var(--color-gray-700);
}

.pw-detail-layout-a .pw-detail-step-link {
  color: var(--pw-a-link-color);
  font-size: var(--pw-a-link-size);
  font-weight: var(--pw-a-link-weight);
  text-decoration: var(--pw-a-link-decoration);
}

.pw-detail-layout-a .pw-detail-step-link:hover {
  text-decoration: underline;
}

.pw-detail-breakdown-panel {
  background: var(--pw-a-breakdown-bg);
}

.pw-detail-resource-header-panel {
  background: var(--pw-a-resource-header-bg);
}

.pw-detail-breakdown-v4,
.pw-detail-breakdown-v8 {
  border-left: 3px solid #366cd9;
}

.pw-detail-breakdown-v9 {
  border-left: 3px solid #ff9318;
}

.pw-detail-breakdown-v10 {
  border-top: 2px solid #2f57b5;
}

.pw-detail-resource-header-v7,
.pw-detail-resource-header-v8 {
  border-left: 3px solid #39bf7b;
}

.pw-detail-resource-header-v9 {
  border-left: 3px solid #ff9318;
}

.pw-detail-resource-header-v10 {
  border-top: 2px solid #2f57b5;
}

.pw-detail-a-style-1 {
  --pw-a-title-size: 24px;
  --pw-a-kpi-value-size: 28px;
}

.pw-detail-a-style-2 {
  --pw-a-title-size: 26px;
  --pw-a-subtitle-size: 15px;
  --pw-a-step-title-size: 18px;
  --pw-a-step-body-size: 15px;
  --pw-a-kpi-value-size: 30px;
}

.pw-detail-a-style-3 {
  --pw-a-step-radius: 12px;
  --pw-a-step-border-width: 2px;
  --pw-a-link-size: 15px;
}

.pw-detail-a-style-4 {
  --pw-a-summary-bg: #f7fbff;
  --pw-a-kpi-bg: #f0f6ff;
  --pw-a-breakdown-bg: #f7fbff;
  --pw-a-resource-header-bg: #f7fbff;
  --pw-a-link-color: #2f57b5;
}

.pw-detail-a-style-5 {
  --pw-a-title-size: 25px;
  --pw-a-kpi-label-size: 14px;
  --pw-a-kpi-value-size: 24px;
  --pw-a-step-shadow: 0 4px 12px rgba(25, 56, 114, 0.08);
}

.pw-detail-layout-v5 .pw-detail-kpi-label {
  color: var(--color-gray-800);
  font-weight: 600;
}

.pw-detail-layout-v5 .pw-detail-board-lane {
  border-width: 1px;
}

.pw-detail-layout-v5 .pw-detail-board-lane:nth-child(1) {
  background: #fff6f6;
  border-color: #f5cdca;
}

.pw-detail-layout-v5 .pw-detail-board-lane:nth-child(2) {
  background: #f5f9ff;
  border-color: #cfe0fd;
}

.pw-detail-layout-v5 .pw-detail-board-lane:nth-child(3) {
  background: #f5fbf6;
  border-color: #cde8d3;
}

.pw-detail-layout-v5 .pw-detail-board-card {
  background: #ffffff;
  border-color: #d7dee8;
  border-width: 1px;
}

.pw-detail-layout-v5 .pw-detail-board-card .mud-typography-body2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-900);
}

.pw-detail-layout-v5 .pw-detail-board-card .mud-typography-caption {
  font-size: 13px;
  color: var(--color-gray-800);
}

.pw-detail-a-style-6 {
  --pw-a-subtitle-size: 16px;
  --pw-a-step-title-size: 19px;
  --pw-a-step-body-size: 16px;
  --pw-a-link-size: 15px;
}

.pw-detail-a-style-7 {
  --pw-a-title-size: 22px;
  --pw-a-subtitle-size: 13px;
  --pw-a-kpi-label-size: 12px;
  --pw-a-kpi-value-size: 24px;
  --pw-a-step-title-size: 16px;
  --pw-a-step-body-size: 13px;
  --pw-a-link-size: 13px;
}

.pw-detail-a-style-8 {
  --pw-a-link-color: #1f4ac9;
  --pw-a-link-weight: 800;
  --pw-a-link-decoration: underline;
  --pw-a-step-border-width: 2px;
}

.pw-detail-a-style-9 {
  --pw-a-summary-bg: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  --pw-a-kpi-bg: #ffffff;
  --pw-a-step-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  --pw-a-step-radius: 14px;
}

.pw-detail-a-style-10 {
  --pw-a-title-size: 27px;
  --pw-a-subtitle-size: 15px;
  --pw-a-step-title-size: 18px;
  --pw-a-step-body-size: 14px;
  --pw-a-link-size: 15px;
  --pw-a-link-color: #274fa6;
  --pw-a-step-border-width: 1px;
}

.pw-detail-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: start;
}

.pw-detail-hero-card {
  border-radius: 12px;
  border-color: #cad6f8;
  background: #f8faff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-detail-queue-card {
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-detail-queue-row {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.pw-detail-playbook-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
}

.pw-detail-playbook-rail {
  border: 1px solid var(--color-gray-200);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-detail-playbook-item {
  width: 100%;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: var(--color-gray-900);
  cursor: pointer;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  text-align: left;
  font: inherit;
}

.pw-detail-playbook-item:hover {
  border-color: #b9c8f2;
  background: #f8faff;
}

.pw-detail-playbook-main {
  display: grid;
  gap: 10px;
}

.pw-detail-playbook-card {
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-detail-matrix-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pw-detail-matrix-card {
  border: 1px solid var(--color-gray-200);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-detail-matrix-meta {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #edf2ff;
  color: #2f57b5;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.pw-detail-exec-layout {
  display: grid;
  gap: 10px;
}

.pw-detail-exec-summary {
  border-radius: 10px;
  border-color: #cad6f8;
  background: #f8faff;
}

.pw-detail-exec-list {
  display: grid;
  gap: 8px;
}

.pw-detail-exec-item {
  border: 1px solid var(--color-gray-200);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.pw-detail-exec-order {
  color: #2f57b5;
  font-size: 13px;
  font-weight: 800;
}

.pw-detail-exec-body {
  min-width: 0;
}

.pw-resource-details {
  --pw-r-title-size: 27px;
  --pw-r-subtitle-size: 14px;
  --pw-r-label-size: 16px;
  --pw-r-value-size: 15px;
  --pw-r-hint-size: 13px;
  --pw-r-chip-size: 12px;
  --pw-r-header-bg: #ffffff;
  --pw-r-card-bg: #ffffff;
  --pw-r-panel-bg: #ffffff;
  --pw-r-border-color: var(--color-gray-200);
  --pw-r-accent: #366cd9;
  --pw-r-accent-bg: #edf2ff;
  --pw-r-table-font-size: 13px;
  --pw-r-row-gap: 1px;
  --pw-r-table-height: calc(100vh - 680px);
}

.pw-resource-details .mud-card-header {
  background: var(--pw-r-header-bg);
  border-bottom: 1px solid var(--pw-r-border-color);
}

.pw-resource-header {
  padding-bottom: 8px !important;
}

.pw-resource-title {
  font-size: var(--pw-r-title-size) !important;
  line-height: 1.15;
}

.pw-resource-subtitle {
  font-size: var(--pw-r-subtitle-size);
  color: var(--color-gray-800);
  line-height: 1.45;
}

.pw-resource-content {
  background: var(--pw-r-card-bg);
  padding-top: 6px;
}

.pw-resource-loading-shell {
  min-height: 220px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-resource-context {
  background: var(--pw-r-panel-bg);
  border-radius: 10px;
}

.pw-resource-context-grid {
  gap: 14px;
}

.pw-resource-context-label {
  font-size: var(--pw-r-label-size) !important;
  line-height: 1.2 !important;
  color: var(--color-gray-900) !important;
}

.pw-resource-context-value {
  font-size: var(--pw-r-value-size) !important;
  color: var(--color-gray-900) !important;
  line-height: 1.3 !important;
}

.pw-resource-view-toggle {
  margin-top: 4px !important;
  margin-bottom: 6px !important;
}

.pw-resource-view-toggle .mud-toggle-item {
  min-height: 34px;
  font-size: 13px;
}

.pw-resource-view-hint {
  font-size: var(--pw-r-hint-size);
  color: var(--color-gray-800);
  line-height: 1.4;
}

.pw-resource-table-state {
  min-height: 180px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-resource-trends-shell {
  background: var(--pw-r-panel-bg);
  border-radius: 10px;
  padding: 8px 10px 2px;
}

.pw-resource-trend-meta {
  padding-top: 6px;
}

.pw-resource-stat-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--pw-r-accent-bg);
  color: var(--pw-r-accent);
  font-size: var(--pw-r-chip-size);
  font-weight: 700;
  padding: 3px 10px;
  line-height: 1.2;
}

.pw-resource-stat-pill-neutral {
  background: #f4f6fa;
  color: var(--color-gray-700);
}

.pw-resource-table .mud-table-cell {
  font-size: var(--pw-r-table-font-size);
}

.pw-resource-table .pw-resource-col-url {
  width: 48%;
  max-width: 220px;
}

.pw-resource-table .pw-resource-col-url .color-blue {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw-resource-table .pw-resource-col-metrics {
  width: 36%;
}

.pw-resource-table .pw-resource-col-traffic {
  width: 110px;
}

.pw-resource-table .mud-table-container {
  max-height: var(--pw-r-table-height);
}

.pw-resource-details-style-1 {
  --pw-r-title-size: 28px;
  --pw-r-label-size: 17px;
}

.pw-resource-details-style-2 {
  --pw-r-title-size: 30px;
  --pw-r-subtitle-size: 15px;
  --pw-r-value-size: 16px;
  --pw-r-chip-size: 13px;
  --pw-r-table-font-size: 14px;
}

.pw-resource-details-style-3 {
  --pw-r-header-bg: #f8fbff;
  --pw-r-panel-bg: #f8fbff;
  --pw-r-accent: #2f57b5;
  --pw-r-accent-bg: #e6efff;
}

.pw-resource-details-style-4 {
  --pw-r-header-bg: #fff9f3;
  --pw-r-panel-bg: #fff9f3;
  --pw-r-accent: #c85d00;
  --pw-r-accent-bg: #ffe9cf;
}

.pw-resource-details-style-5 {
  --pw-r-title-size: 26px;
  --pw-r-subtitle-size: 14px;
  --pw-r-label-size: 15px;
  --pw-r-value-size: 14px;
  --pw-r-table-font-size: 12px;
}

.pw-resource-details-style-6 {
  --pw-r-title-size: 29px;
  --pw-r-label-size: 17px;
  --pw-r-value-size: 16px;
  --pw-r-hint-size: 14px;
  --pw-r-table-height: calc(100vh - 640px);
}

.pw-resource-details-style-7 {
  --pw-r-border-color: #cad6f8;
  --pw-r-accent: #2449aa;
  --pw-r-accent-bg: #e8efff;
}

.pw-resource-details-style-8 {
  --pw-r-header-bg: #f6f7f9;
  --pw-r-panel-bg: #f6f7f9;
  --pw-r-accent: #46536a;
  --pw-r-accent-bg: #e5e9f0;
}

.pw-resource-details-style-9 {
  --pw-r-title-size: 31px;
  --pw-r-subtitle-size: 15px;
  --pw-r-label-size: 18px;
  --pw-r-value-size: 16px;
  --pw-r-hint-size: 14px;
  --pw-r-table-font-size: 14px;
}

.pw-resource-details-style-10 {
  --pw-r-title-size: 27px;
  --pw-r-subtitle-size: 14px;
  --pw-r-label-size: 16px;
  --pw-r-value-size: 15px;
  --pw-r-accent: #1f4ac9;
  --pw-r-accent-bg: #dfe9ff;
  --pw-r-table-height: calc(100vh - 700px);
}

@media (max-width: 960px) {
  .pw-detail-three-columns,
  .pw-detail-board,
  .pw-detail-matrix-layout {
    grid-template-columns: 1fr;
  }

  .pw-detail-action-table {
    display: block;
    overflow-x: auto;
  }

  .pw-detail-step-card,
  .pw-detail-timeline-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .pw-detail-layout-a .pw-detail-kpi-value {
    font-size: 22px;
  }

  .pw-resource-title {
    font-size: 24px !important;
  }

  .pw-resource-context-label {
    font-size: 14px !important;
  }

  .pw-resource-context-value {
    font-size: 13px !important;
  }

  .pw-resource-table .mud-table-container {
    max-height: calc(100vh - 580px);
  }

  .pw-detail-hero-layout,
  .pw-detail-playbook-layout {
    grid-template-columns: 1fr;
  }

  .pw-detail-exec-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}

/* Page Weight table */

.pw-overview-breakdown {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--color-gray-200);
}

.page-weight-table {
  --pw-col-padding-x: 10px;
  --pw-col-type-width: 90px;
  --pw-col-transfer-width: 200px;
  --pw-col-duration-width: 100px;
  --pw-col-pages-width: 80px;
  --pw-col-pvs-width: 80px;
  --pw-metric-gap: 8px;
  --pw-metric-progress-max: 100px;
  --pw-metric-progress-min: 40px;
  --pw-metric-value-min: 50px;
}

.page-weight-table .mud-table-head .mud-table-cell {
  padding-left: var(--pw-col-padding-x);
  padding-right: var(--pw-col-padding-x);
  white-space: nowrap;
}

.page-weight-table .mud-table-cell {
  padding-left: var(--pw-col-padding-x);
  padding-right: var(--pw-col-padding-x);
}

.page-weight-table .pw-col-resource {
  max-width: 0;
  text-align: left !important;
}

.page-weight-table .pw-col-resource .mud-tooltip-root,
.page-weight-table .pw-col-resource .mud-typography {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.page-weight-table .pw-col-resource .pw-resource-domain {
  font-weight: 600;
}

.page-weight-table .pw-col-type {
  width: var(--pw-col-type-width);
  text-align: center !important;
}

.page-weight-table .pw-header-text {
  font-size: var(--pw-r-table-font-size, 12px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pw-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

/* Resource type badges (new categories) */
.pw-type-stylesheet {
  background-color: #FFF0DD;
  color: #B36B00;
}

.pw-type-script {
  background-color: #EAF0FF;
  color: #2952A3;
}

.pw-type-document {
  background-color: #EDEAFF;
  color: #4840B0;
}

.pw-type-image {
  background-color: #E8F8EF;
  color: #1A7A42;
}

.pw-type-font {
  background-color: #F0EAFF;
  color: #6840B0;
}

.pw-type-audio {
  background-color: #E0F5F8;
  color: #1A7A88;
}

.pw-type-video {
  background-color: #F0EAFF;
  color: #6850C0;
}

.pw-type-data {
  background-color: #FFF3E0;
  color: #BF360C;
}

.pw-type-text {
  background-color: #EFEBE9;
  color: #4E342E;
}

.pw-type-fetch {
  background-color: #EAF0FF;
  color: #4A6AC0;
}

.pw-type-manifest {
  background-color: #FCE4EC;
  color: #AD1457;
}

.pw-type-wasm {
  background-color: #E8EAF6;
  color: #283593;
}

.pw-type-other {
  background-color: #EEF2F7;
  color: #5A6A80;
}

/* Legacy initiatorType fallbacks (for old data without ResourceType) */
.pw-type-img {
  background-color: #FDECEC;
  color: #C62828;
}

.pw-type-css {
  background-color: #E8F5E9;
  color: #2E7D32;
}

.pw-type-link {
  background-color: #E3F2FD;
  color: #1565C0;
}

.pw-type-xmlhttprequest {
  background-color: #FFF8E1;
  color: #F57F17;
}

.pw-type-beacon,
.pw-type-iframe,
.pw-type-navigation,
.pw-type-track,
.pw-type-embed,
.pw-type-object {
  background-color: #F5F5F5;
  color: #616161;
}

.page-weight-table .pw-col-transfer {
  width: var(--pw-col-transfer-width);
}

.page-weight-table th.pw-col-transfer {
  text-align: left !important;
}

.page-weight-table td.pw-col-transfer {
  text-align: right !important;
}

.page-weight-table .pw-metric-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pw-metric-gap);
  width: 100%;
  min-width: 0;
}

.page-weight-table .pw-metric-progress {
  flex: 1 1 auto;
  min-width: var(--pw-metric-progress-min);
  max-width: var(--pw-metric-progress-max);
}

.page-weight-table .pw-metric-value {
  flex: 0 0 auto;
  min-width: var(--pw-metric-value-min);
  text-align: right;
  white-space: nowrap;
}

.page-weight-table .pw-col-duration {
  width: var(--pw-col-duration-width);
  text-align: right !important;
  white-space: nowrap;
}

.page-weight-table .pw-col-pages {
  width: var(--pw-col-pages-width);
  text-align: center !important;
}

.page-weight-table .pw-col-pvs {
  width: var(--pw-col-pvs-width);
}

.page-weight-table .pw-col-traffic {
  width: 80px;
  text-align: center !important;
}

.page-weight-table .pw-col-page {
  max-width: 0;
  text-align: left !important;
}

.page-weight-table .pw-col-page > .mud-tooltip-root {
  display: flex !important;
  overflow: visible !important;
  min-width: 0;
}

.page-weight-table .pw-col-page .pw-page-link {
  min-width: 0;
  vertical-align: middle;
}

.page-weight-table .pw-col-weight {
  width: 190px;
}

.pw-page-link {
  display: inline-block;
}

.page-weight-table .pw-col-breakdown {
  width: 150px;
  vertical-align: middle !important;
}

.page-weight-table .pw-col-trend {
  width: 100px;
  text-align: center !important;
}

.pw-sparkline-container {
  display: inline-block;
  width: 80px;
  height: 30px;
  vertical-align: middle;
}

.pw-blocking-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  background: #FFDCD9;
  color: #E2382D;
}

.pw-party-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.pw-party-1st {
  background: #E8F8EF;
  color: #39BF7B;
}

.pw-party-3rd {
  background: #EAF0FF;
  color: #366CD9;
}

.pw-cache-badge-cached {
  background: #E8F8EF;
  color: #39BF7B;
}

.pw-cache-badge-uncached {
  background: #FFDCD9;
  color: #E2382D;
}

.pw-no-compression-badge {
  background: #FFF0DD;
  color: #FF9318;
}

.pw-timing-bar {
  display: flex;
  width: 100%;
  max-width: 380px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--color-gray-200);
}

.pw-timing-bar > span {
  height: 100%;
  display: block;
}

.pw-timing-dns {
  background: rgba(54, 108, 217, 0.8);
}

.pw-timing-connect {
  background: rgba(57, 191, 123, 0.8);
}

.pw-timing-tls {
  background: rgba(255, 147, 24, 0.8);
}

.pw-timing-ttfb {
  background: rgba(226, 56, 45, 0.8);
}

.pw-timing-download {
  background: rgba(122, 138, 160, 0.8);
}

.pw-timing-legend {
  max-width: 150px;
  min-width: 150px;
}

.pw-timing-legend .pw-timing-dns,
.pw-timing-legend .pw-timing-connect,
.pw-timing-legend .pw-timing-tls,
.pw-timing-legend .pw-timing-ttfb,
.pw-timing-legend .pw-timing-download {
  width: 20%;
}

.pw-weight-breakdown {
  display: flex;
  width: 100%;
  max-width: 140px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--color-gray-200);
}

.pw-weight-breakdown > span {
  height: 100%;
  display: block;
}

.pw-weight-script {
  background: #366CD9;
}

.pw-weight-css {
  background: #FF9318;
}

.pw-weight-img {
  background: #39BF7B;
}

.pw-weight-font {
  background: #8B5CF6;
}

.pw-weight-other {
  background: #BBC4CC;
}

.pw-trend-pill,
.pw-cache-pill,
.pw-compression-pill,
.pw-budget-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.pw-trend-up {
  background: #FFDCD9;
  color: #E2382D;
}

.pw-trend-down {
  background: #E8F8EF;
  color: #39BF7B;
}

.pw-trend-stable {
  background: #EEF2F7;
  color: #7A8AA0;
}

.pw-cache-good {
  background: #E8F8EF;
  color: #39BF7B;
}

.pw-cache-mid {
  background: #FFF0DD;
  color: #FF9318;
}

.pw-cache-bad {
  background: #FFDCD9;
  color: #E2382D;
}

.pw-compression-high {
  background: #FFDCD9;
  color: #E2382D;
}

.pw-compression-mid {
  background: #FFF0DD;
  color: #FF9318;
}

.pw-compression-low {
  background: #E8F8EF;
  color: #39BF7B;
}

.pw-budget-over {
  background: #FFDCD9;
  color: #E2382D;
}

.pw-budget-ok {
  background: #E8F8EF;
  color: #39BF7B;
}

.pw-coverage-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.pw-coverage-good {
  background: #E8F8EF;
  color: #39BF7B;
}

.pw-coverage-mid {
  background: #FFF0DD;
  color: #FF9318;
}

.pw-coverage-low {
  background: #FFDCD9;
  color: #E2382D;
}


.pw-issues-count {
  font-size: 13px;
  color: var(--color-gray-700);
}

.pw-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pw-legend-item::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.pw-legend-script::before {
  background: #366CD9;
}

.pw-legend-css::before {
  background: #FF9318;
}

.pw-legend-img::before {
  background: #39BF7B;
}

.pw-legend-font::before {
  background: #8B5CF6;
}

.pw-legend-other::before {
  background: #BBC4CC;
}

.page-weight-table .pw-col-issues {
  width: 80px;
}

.pw-resource-recommendation {
  color: var(--color-gray-700);
  line-height: 1.2;
}

.pw-resource-meta-line {
  color: var(--color-gray-700);
  line-height: 1.2;
}

/* ── Page Weight Detail: two-column layout ── */

.pw-twocol {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.pw-left-rail {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pw-rail-section {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--color-gray-500);
  overflow: hidden;
}

.pw-rail-section-title {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--color-gray-400);
}

/* Stats 2x2 grid */
.pw-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pw-stat-cell {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-gray-400);
  border-right: 1px solid var(--color-gray-400);
}

.pw-stat-cell:nth-child(2n) {
  border-right: none;
}

.pw-stat-cell:nth-child(n+3) {
  border-bottom: none;
}

.pw-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-gray-700);
  margin-bottom: 4px;
}

.pw-stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gray-900);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pw-stat-sub {
  font-size: 10px;
  color: var(--color-gray-700);
  margin-top: 1px;
}

.pw-stat-sub.pw-stat-sub-error {
  color: var(--color-red-500);
}

.pw-stat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.pw-stat-dot-red {
  background: var(--color-red-500);
}

.pw-stat-dot-green {
  background: #008642;
}

.pw-stat-dot-yellow {
  background: #FF9318;
}

/* Rail breakdown */
.pw-rail-breakdown-body {
  padding: 14px 16px;
}

.pw-rail-breakdown-bar {
  height: 10px;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  margin-bottom: 8px;
}

.pw-rail-breakdown-bar span {
  height: 100%;
}

.pw-rail-breakdown-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.pw-rail-legend-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--color-gray-700);
}

.pw-rail-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Rail action steps */
.pw-rail-action-list {
  padding: 0;
}

.pw-rail-action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-gray-400);
}

.pw-rail-action-item:last-child {
  border-bottom: none;
}

.pw-rail-action-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.pw-rail-action-dot-critical {
  background: var(--color-red-500);
}

.pw-rail-action-dot-warning {
  background: #FF9318;
}

.pw-rail-action-dot-improve {
  background: #366CD9;
}

.pw-rail-action-dot-verify {
  background: var(--color-gray-600);
}

.pw-rail-action-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 1px;
}

.pw-rail-action-desc {
  font-size: 11px;
  color: var(--color-gray-700);
}

.pw-rail-action-resources {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pw-rail-action-resource {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--color-gray-700);
  line-height: 1.5;
  cursor: pointer;
}

.pw-rail-action-resource:hover {
  color: var(--color-blue-500);
}

.pw-rail-action-resource svg {
  flex-shrink: 0;
  color: var(--color-gray-600);
}

/* ResourceDetails variant 11: compact table-only card */
.pw-resource-details-style-11 {
  --pw-r-title-size: 14px;
  --pw-r-subtitle-size: 12px;
  --pw-r-table-font-size: 12px;
  --pw-r-table-height: calc(100vh - 260px);
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--color-gray-500);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pw-resource-details-style-11 .mud-card-header {
  border-bottom: none;
  background: var(--color-white);
}

.pw-resource-details-style-11 .pw-resource-header {
  padding: 16px 0 12px 16px !important;
}

.pw-resource-details-style-11 .pw-resource-title {
  font-size: 16px !important;
  font-weight: 600;
  color: var(--color-gray-900) !important;
  line-height: 1.3;
}

.pw-resource-details-style-11 .pw-resource-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-gray-700);
}

.pw-resource-details-style-11 .pw-resource-subtitle strong {
  font-weight: 500;
  color: var(--color-gray-700);
}

.pw-resource-details-style-11 .pw-resource-content {
  padding: 0;
}

.pw-resource-details-style-11 .pw-resource-table .mud-table-container {
  max-height: var(--pw-r-table-height);
}

.pw-resource-details-style-11 .pw-resource-table .mud-table-head .mud-table-cell {
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--color-gray-700) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 14px;
  background: var(--color-gray-300);
  border-bottom: 1px solid var(--color-gray-400);
}

.pw-resource-details-style-11 .pw-resource-table .mud-table-head .mud-table-cell * {
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--color-gray-700) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Search input sizing */
.pw-resource-details-style-11 .mud-card-header-actions .mud-input-outlined-border {
  border-color: var(--color-gray-500);
}

.pw-resource-details-style-11 .mud-card-header-actions .mud-input-control {
  margin: 0 !important;
}

.pw-resource-details-style-11 .mud-card-header-actions .mud-input.mud-input-outlined > input.mud-input-slot,
.pw-resource-details-style-11 .mud-card-header-actions div.mud-input-slot.mud-input-root-outlined.mud-input-root-margin-dense {
  height: 30px !important;
  min-height: 30px !important;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  font-size: 13px !important;
}

.pw-resource-details-style-11 .mud-card-header-actions .mud-input > .mud-input-adornment {
  margin: 0 4px 0 6px !important;
  height: 30px !important;
  padding-right: 0 !important;
}

.pw-resource-details-style-11 .mud-card-header-actions {
  margin-top: 0;
  margin-right: 0;
  padding-right: 16px;
  align-self: center;
}

.pw-resource-details-style-11 .pw-resource-table .mud-table-body .mud-table-cell {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-gray-400);
  vertical-align: top;
}

.pw-resource-details-style-11 .pw-resource-col-url {
  width: 28% !important;
  max-width: none !important;
  padding-left: 14px !important;
}

/* Resource URL: dark text, not link-blue */
.pw-resource-details-style-11 .pw-resource-col-url .color-blue {
  color: var(--color-gray-800) !important;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
}

/* Subtle gray badges for variant 11 (matching design) */
.pw-resource-details-style-11 .pw-party-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
  background: var(--color-gray-300);
  color: var(--color-gray-700);
}

.pw-resource-details-style-11 .pw-party-1st {
  background: var(--color-gray-300);
  color: var(--color-gray-700);
}

.pw-resource-details-style-11 .pw-party-3rd {
  background: var(--color-gray-300);
  color: var(--color-gray-700);
}

.pw-resource-details-style-11 .pw-cache-badge-cached {
  background: var(--color-gray-300);
  color: var(--color-gray-700);
}

.pw-resource-details-style-11 .pw-cache-badge-uncached {
  background: var(--color-gray-300);
  color: var(--color-gray-700);
}

.pw-resource-details-style-11 .pw-no-compression-badge {
  background: var(--color-gray-300);
  color: var(--color-gray-700);
}

.pw-resource-details-style-11 .pw-blocking-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
  background: var(--color-red-100);
  color: var(--color-red-500);
}

.pw-resource-details-style-11 .pw-resource-col-timing {
  width: 40%;
}

.pw-resource-details-style-11 .pw-resource-col-metrics {
  width: 130px;
}

.pw-resource-details-style-11 .pw-resource-col-traffic {
  width: 60px;
}

/* Blue-themed timing colors for variant 11 */
.pw-resource-details-style-11 .pw-timing-dns {
  background: #A1BAE6;
}

.pw-resource-details-style-11 .pw-timing-connect {
  background: #73A6FF;
}

.pw-resource-details-style-11 .pw-timing-tls {
  background: #366CD9;
}

.pw-resource-details-style-11 .pw-timing-ttfb {
  background: #2C5FC7;
}

.pw-resource-details-style-11 .pw-timing-download {
  background: #DADFE5;
}

/* Timing tooltip for variant 11 */
.pw-timing-tooltip-wrap {
  position: relative;
}

.pw-timing-tooltip-wrap:hover .pw-timing-tooltip {
  display: flex;
}

.pw-timing-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--color-gray-900);
  border-radius: 6px;
  padding: 8px 10px;
  z-index: 10;
  gap: 6px;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 140px;
}

.pw-timing-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-gray-900);
}

.pw-timing-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  white-space: nowrap;
}

.pw-timing-tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.pw-timing-tooltip-label {
  color: var(--color-gray-600);
}

.pw-timing-tooltip-value {
  color: var(--color-white);
  font-weight: 500;
  margin-left: auto;
}

/* Timing bar taller in variant 11 */
.pw-resource-details-style-11 .pw-timing-bar {
  height: 28px;
  border-radius: 3px;
  max-width: none;
}

/* Traffic mini-bar for variant 11 */
.pw-traffic-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--color-gray-400);
  overflow: hidden;
  margin-bottom: 2px;
  width: 60px;
  margin-left: auto;
}

.pw-traffic-bar-fill {
  height: 100%;
  background: #366CD9;
  border-radius: 2px;
}

.pw-traffic-label {
  font-size: 10px;
  color: var(--color-gray-700);
  text-align: right;
}

.pw-res-hint {
  font-size: 10px;
  color: var(--color-gray-700);
  font-style: italic;
}

.pw-res-duration {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-gray-900);
}

.pw-res-size {
  font-size: 11px;
  color: var(--color-gray-700);
}

.pw-res-proto {
  font-size: 10px;
  color: var(--color-gray-600);
}

@media (max-width: 960px) {
  .pw-twocol {
    grid-template-columns: 1fr;
  }

  .pw-left-rail {
    position: static;
  }
}

.pw-insights-header {
  gap: 12px;
}

.pw-insight-card {
  min-height: 132px;
  height: 100%;
}

.pw-recommendation-card {
  border-left: 3px solid #366CD9;
}

.pw-table-shell {
  position: relative;
}

.pw-table-overlay {
  position: absolute;
  inset: 1px 1px 1px 1px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.pw-table-state {
  align-items: center;
  padding: 12px;
}


@media (max-width: 960px) {
  .pw-type-breakdown-layout {
    flex-direction: column;
    min-height: auto;
  }

  .pw-donut-container {
    min-height: 200px;
    height: 200px;
  }

  .pw-type-breakdown-side {
    flex: 1 1 auto;
    max-width: none;
  }

  .pw-type-chip-side,
  .pw-type-table-side {
    flex: 1 1 auto;
    max-width: none;
  }

  .pw-type-breakdown-list {
    max-height: none;
    overflow-y: visible;
  }

  .pw-type-bars-side {
    flex: 1 1 auto;
    max-width: none;
    max-height: none;
    overflow-y: visible;
  }

  .pw-type-cards-side {
    flex: 1 1 auto;
    max-width: none;
    grid-template-columns: 1fr;
  }

  .pw-topop-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .pw-topop-list-head {
    display: none;
  }

  .pw-topop-save,
  .pw-topop-traffic {
    grid-column: 2;
    text-align: left;
  }

  .pw-topop-split {
    grid-template-columns: 1fr;
  }

  .pw-insights-header {
    flex-direction: column;
    align-items: flex-start !important;
  }
}

.pages-table {
  width: 100%;
}

.pages-table .mud-table-root {
  width: 100%;
  table-layout: fixed;
}

.pages-table col.pages-col-page-views-width {
  width: 180px;
}

.pages-table col.pages-col-slow-width {
  width: 100px;
}

.pages-table col.pages-col-metric-width {
  width: 132px;
}

.pages-table col.pages-col-action-width {
  width: 48px;
}

.pages-table th.pages-col-page,
.pages-table td.pages-col-page,
.pages-table th.pages-col-page-views,
.pages-table td.pages-col-page-views,
.pages-table th.pages-col-slow,
.pages-table td.pages-col-slow,
.pages-table th.pages-col-metric,
.pages-table td.pages-col-metric,
.pages-table th.pages-col-action,
.pages-table td.pages-col-action {
  text-align: left !important;
}

.pages-table th.pages-col-page,
.pages-table td.pages-col-page {
  overflow: hidden;
}

.pages-table td.pages-col-page {
  max-width: 0;
  text-overflow: ellipsis;
}

.pages-table td.pages-col-page .mud-link,
.pages-table td.pages-col-page .mud-tooltip-root {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pages-table th.pages-col-page-views,
.pages-table td.pages-col-page-views,
.pages-table td.pages-col-slow,
.pages-table td.pages-col-metric,
.pages-table td.pages-col-action {
  white-space: nowrap;
}

.pages-table .pages-table-progress-row {
  width: auto;
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin: 8px 0;
}

.pages-table .pages-table-progress-row > .mud-grid-item:first-child {
  padding: 0px;
}

.pages-table .pages-table-progress-row > .mud-grid-item:last-child {
  white-space: nowrap;
  padding: 0 0 0 8px;
}

.pages-table .pages-table-investigation-button {
  margin-left: 0;
  width: 18px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.page-details-table tr td:nth-child(1) {
  text-align: left !important;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-details-table tr td:nth-child(2) {
  width: 100px;
}

.page-details-table tr td:nth-child(3) {
  width: 200px;
}

.page-details-table tr td:nth-child(4) {
  width: 135px;
  text-align: center !important;
}

.page-details-table tr td:nth-child(5) {
  width: 100px;
  text-align: center !important;
}

.mobile-warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1F2937E0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.mobile-warning-popup {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
}

.mobile-warning-content {
  padding: 2rem;
  text-align: center;
}

.mobile-warning-icon {
  color: #594ae2;
  opacity: 0.8;
}

.cm-map, .webvitals-table {
  height: calc(100vh - 630px);
}

.mcp-instructions .mud-expand-panel.banner {
  margin: 8px 0 !important;
}

.mcp-instructions .mud-expand-panel-content .mud-grid-item > img {
  width: 200px;
  border-width: 3px;
  border-radius: 15px;
  cursor: pointer;
}

.mcp-instructions .mud-expand-panel-content .mud-avatar {
  width: 40px;
  height: 40px;
  background: #D8E7FF;
  font-weight: var(--font-weight-13-semibold);
  font-size: var(--font-size-13);
  line-height: var(--line-height);
  color: var(--color-blue-500);
}

.mcp-instructions .code-block {
  background: var(--color-blue-100);
  font-size: 12px;
  width: 270px;
  overflow-x: auto;
}

.mcp-instructions .flex-row .mud-grid-item:nth-child(3) {
  flex: 1; 
  min-width: 0; 
  white-space: normal; 
  word-wrap: break-word;
}

.webvitals-cards-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 1px;
  width: 0;
  min-width: 100%;
}

.webvitals-country-scroll {
  overflow-x: auto;
  width: 0;
  min-width: 100%;
}

.webvitals-country-scroll > * {
  min-width: 800px;
}

.webvitals-chart-container {
  min-width: 240px;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}

.webvitals-chart-container > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.webvitals-chart-container .mud-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.webvitals-chart-container .mud-card-header {
  padding: 10px 16px;
  overflow: hidden;
}

.webvitals-chart-container .mud-card-header-content {
  overflow: hidden;
}

.webvitals-chart-container .mud-card-header-content > div {
  min-width: 0;
}

.webvitals-chart-container .mud-card-header-content > div > div:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.webvitals-chart-container .mud-card-content {
  flex: 1;
  padding: 8px 16px;
}

.webvitals-chart-container .mud-card-content.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.webvitals-chart-container .chart-container {
  max-height: 150px;
  width: calc(100% + 36px);
  margin-left: -18px;
  margin-right: -18px;
  overflow: hidden;
}

.webvitals-chart-container .mud-card-actions .mud-button {
  padding: 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-swap-menu .mud-icon-button-root {
  opacity: 0.35;
  transition: opacity 0.15s;
}

.slot-swap-menu:hover .mud-icon-button-root,
.slot-swap-menu .mud-icon-button-root:hover {
  opacity: 1;
}


.font-small {
  font-size: var(--font-size-12);
}

.mud-progress-linear.mud-progress-linear-color-error:not(.mud-progress-linear-buffer)::before {
  background-color: var(--color-red-500) !important;
}

.mud-progress-linear.mud-progress-linear-color-error:not(.mud-progress-linear-buffer) .mud-progress-linear-bar {
  background-color: var(--color-red-500) !important;
}

.mud-progress-linear.mud-progress-linear-color-warning:not(.mud-progress-linear-buffer)::before {
  background-color: var(--color-yellow-500) !important;
}

.mud-progress-linear.mud-progress-linear-color-warning:not(.mud-progress-linear-buffer) .mud-progress-linear-bar {
  background-color: var(--color-yellow-500) !important;
}

.mud-progress-linear.mud-progress-linear-color-success:not(.mud-progress-linear-buffer)::before {
  background-color: var(--color-blue-500) !important;
}

.mud-progress-linear.mud-progress-linear-color-success:not(.mud-progress-linear-buffer) .mud-progress-linear-bar {
  background-color: var(--color-blue-500) !important;
}

.cm-paper-pageviews-sidebar {
  background-color: #73A6FF26;
}

.cm-paper-pageviews-sidebar .mud-typography-body1 {
  font-weight: var(--font-weight-13-semibold);
  font-size: var(--font-size-13);
  line-height: var(--line-height);
  color: var(--color-white);
}

.cm-paper-pageviews-sidebar .mud-typography-body2 {
  font-weight: var(--font-weight-13-medium);
  font-size: var(--font-size-13);
  line-height: var(--line-height);
  color: var(--color-navy-300);
}

.cm-paper-pageviews-sidebar .mud-progress-linear {
  background-color: #73A6FF4D;
}

.cm-paper-pageviews-sidebar .mud-button-label {
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-regular);
}

.cm-unlimited-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--color-blue-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-blue-500);
}

.cm-pv-alert .mud-typography-body1 {
  font-weight: var(--font-weight-14-semibold);
  font-size: var(--font-size-14);
  line-height: var(--line-height);
  color: var(--color-gray-900);
}

.cm-pv-alert  .mud-typography-body2 {
  font-weight: var(--font-weight-14-regular);
  font-size: var(--font-size-14);
  line-height: var(--line-height);
  color: var(--color-gray-800);
}

.cm-pv-alert .mud-alert-text-error {
  background-color: var(--color-red-200);
}

.cm-pv-alert .mud-alert-text-warning {
  background-color: var(--color-yellow-50);
}

/* Hide mobile logo on desktop */
.auth-page .mobile-logo {
  display: none;
}

.payment-dialog .payment-plans .payment-plan-item .mud-paper {
  width: 323px;
  height: 100%;
}

.payment-dialog .mud-dialog-title {
  margin-top: -32px;
}

.payment-dialog .payment-plans .payment-plan-item.active .mud-paper {
  outline: 8px solid #CCE0FF;
  box-sizing: border-box;
  background: #F5F9FF;
  border: 1px solid #1F67D3;
  border-radius: 16px;
}

.payment-dialog .payment-plans .payment-plan-item .mud-button {
  background: #E8EAED;
  border: none;
}

.payment-dialog .payment-plans .payment-plan-item.active .mud-button {
  background: #1F67D3;
  color: white;
}

.payment-dialog {
  width: auto;
  max-width: 1100px;
  border-radius: 24px;
}

.payment-dialog .mud-toggle-group-outlined {
  width: 300px;
  margin: auto;
  align-items: center;
  height: 40px;
  border: none;
}

.payment-dialog .mud-toggle-group-outlined .mud-toggle-item {
  height: 40px;
  color: #64748B !important;
  background-color: #F8F8F9 !important;
  border-width: 1px 1px 1px 0;
  border-style: solid;
  border-color: #D5DBE0;
}

.payment-dialog .mud-toggle-group-outlined .mud-toggle-item.mud-toggle-item-selected {
  background-color: #1F67D3 !important;
  color: white !important;
}

.payment-dialog .mud-svg-icon {
  color: #1F2937;
  border-radius: 50%;
  background-color: #F4F6F7;
  padding: 2px;
}

.payment-dialog .checkout-items input[type="text"] {
  padding: 0px 10px 0px 12px;
  height: 40px;
  border: 1px solid #D5DBE0;
  border-radius: 6px;
  width: 100%;
}

.text-center {
  text-align: center;
}

.text-end {
    text-align: end;
}

.payment-dialog a {
    color: var(--color-blue-500);
    text-decoration: underline;
}
 
@media (max-width: 480px) {
  .mobile-warning-popup {
    width: 95%;
    margin: 1rem;
  }

  .mobile-warning-content {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Show mobile logo on mobile */
  .auth-page .mobile-logo {
    display: block !important;
    text-align: center;
    margin-bottom: 2rem;
  }

  .auth-page .mobile-logo img {
    max-width: 200px;
    height: auto;
  }

  /* Add more space between signup and forgot password links on mobile */
  .auth-page .mud-typography-subtitle2:last-of-type {
    margin-top: 1rem !important;
  }

  /* Hide the left content (Why sign up?) on mobile */
  .auth-page .align-self-start {
    display: none !important;
  }

  /* Remove the gap on mobile */
  .auth-page .align-center {
    gap: 0 !important;
    justify-content: center !important;
  }

  /* Center the form on mobile */
  .auth-page .mud-form {
    margin: 0 auto !important;
  }
}

/* Hide chart icons by default (when charts are visible) */
.webvitals-chart-container .chart-icon {
  display: none;
}

.cursor-pointer {
  cursor: pointer;
}

.white-text-btn svg {
  color: white !important;
  fill: white !important;
}

.delete-btn svg {
  color: var(--color-red-500) !important;
  fill: var(--color-red-500) !important;
}

.mud-drawer-content .mud-divider {
  display: none;
}

.mud-drawer-content .mud-list .mud-divider {
  display: block;
}

@media (max-height: 800px) {
  /* Hide INP, LCP, and CLS chart graphs on short screens but keep them in DOM
     Note: Using visibility:hidden instead of display:none so ApexCharts can still
     initialize properly. Without this, clicking chart icons too quickly fails with
     null chart instances. */
  .webvitals-chart-container .chart-container,
  .webvitals-chart-container .d-flex.justify-center.my-4 {
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
  }

  /* Hide fullscreen icons when charts are collapsed */
  .webvitals-chart-container .fullscreen-icon {
    display: none !important;
  }

  /* Show chart icons when charts are collapsed */
  .webvitals-chart-container .chart-icon {
    display: inline-flex !important;
  }

}

@media (max-height: 1000px) {
  .cm-map,
  .webvitals-table {
    max-height: none;
    height: 500px;
  }
}

/* Allow toggle group items to size to their own content */
.pages-metric-toggle.mud-toggle-group {
  display: inline-flex !important;
  border-color: var(--color-gray-500);
}

/* Numeric spinner: tighten arrow placement so they don't stretch full height and sit away from the edge */
.mud-input-numeric-spin {
  justify-content: center !important;
  gap: 0;
  right: 6px !important;
}

.mud-input-numeric-spin button {
  padding: 0 !important;
}

/* ── Alerts: summary strip above the table ── */
.alerts-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.alerts-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--color-gray-300);
  background: var(--color-white);
  position: relative;
}

.alerts-summary-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--alerts-summary-accent, var(--color-gray-500));
}

.alerts-summary-item--firing { --alerts-summary-accent: var(--color-red-500); }
.alerts-summary-item--healthy { --alerts-summary-accent: var(--color-green-500); }
.alerts-summary-item--paused { --alerts-summary-accent: var(--color-gray-500); }

.alerts-summary-count {
  font-size: 28px;
  font-weight: var(--font-weight-14-semibold);
  color: var(--color-gray-900);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  padding-left: 10px;
}

.alerts-summary-label {
  font-size: var(--font-size-12);
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--font-weight-12-semibold);
  padding-left: 10px;
}

.alerts-summary-item--firing .alerts-summary-count { color: var(--color-red-500); }

/* ── Alerts table ── */
.alerts-table .mud-table-head th,
.alerts-table .mud-table-body > .mud-table-row > td {
  text-align: left !important;
  vertical-align: middle;
}

.alerts-table .mud-table-head th .mud-table-sort-label,
.alerts-table .mud-table-head th > span {
  justify-content: flex-start;
  text-align: left !important;
}

.alerts-table .alerts-col-action {
  width: 44px;
  text-align: center !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

.alerts-table .mud-table-body > .mud-table-row > td.alerts-col-action {
  text-align: center !important;
}

.alerts-cell-primary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.alerts-cell-name {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-semibold);
  color: var(--color-gray-900);
}

.alerts-cell-sub {
  font-size: var(--font-size-11);
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--font-weight-11-semibold);
}

.alerts-cell-condition {
  font-variant-numeric: tabular-nums;
  color: var(--color-gray-800);
}

.alerts-cell-time {
  color: var(--color-gray-700);
  font-variant-numeric: tabular-nums;
}

.alerts-cell-empty {
  color: var(--color-gray-600);
}

.alerts-state-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-12-semibold);
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}

.alerts-state-pill--healthy {
  background: var(--color-green-100);
  color: var(--color-green-700);
  border-color: var(--color-green-300);
}

.alerts-state-pill--firing {
  background: var(--color-red-200);
  color: var(--color-red-500);
  border-color: var(--color-red-300);
}

.alerts-state-pill--paused {
  background: var(--color-gray-200);
  color: var(--color-gray-700);
  border-color: var(--color-gray-400);
}

/* ── New Alert dialog ── */
.alert-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.alert-section-label {
  display: block;
  color: var(--color-gray-700);
  margin-bottom: 6px;
  font-weight: var(--font-weight-13-semibold);
  font-size: var(--font-size-12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alert-form-grid .mud-select {
  display: block;
}

.alert-required-hint {
  color: var(--color-red-500);
  font-weight: var(--font-weight-11-semibold);
  margin-left: 8px;
  font-size: var(--font-size-11);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alert-threshold-numeric .mud-input-numeric-spin {
  gap: 0;
  padding-right: 7px;
}

.alert-threshold-numeric input {
  padding-left: 12px !important;
  padding-right: 24px !important;
  text-align: left;
}

/* ── Alert Recipients dialog
   Two-line user rows with circular initials, search input, soft selection state.
   Sized to match the new-alert wizard family. */

.recipients-dialog .mud-dialog-content {
  padding: 4px 24px 16px;
}

.recipients-dialog .mud-dialog-title {
  padding: 20px 24px 0;
}

.recipients-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recipients-subtitle.mud-typography {
  color: var(--color-gray-700);
  font-size: var(--font-size-13);
}

.recipients-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 10px;
}

.recipients-search.mud-input-control {
  margin: 0;
}

.recipients-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.recipients-count {
  font-size: var(--font-size-12);
  color: var(--color-gray-700);
  font-variant-numeric: tabular-nums;
}

.recipients-count strong {
  color: var(--color-gray-900);
  font-weight: var(--font-weight-13-semibold);
  font-size: var(--font-size-13);
}

.recipients-link-action {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-13-semibold);
  color: var(--color-blue-500);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.recipients-link-action:hover { color: var(--color-blue-700); text-decoration: underline; }
.recipients-link-action:disabled { color: var(--color-gray-500); cursor: not-allowed; text-decoration: none; }

.recipients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 340px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--color-gray-300);
  background: var(--color-white);
}

.recipients-row {
  padding: 0;
  margin: 0;
  border-bottom: 1px solid var(--color-gray-200);
  transition: background-color 0.12s ease;
}

.recipients-row:last-child { border-bottom: 0; }

.recipients-row:hover { background: var(--color-gray-200); }

.recipients-row--selected { background: var(--color-blue-100); }
.recipients-row--selected:hover { background: var(--color-blue-200); }

.recipients-row--locked .recipients-row-label { cursor: not-allowed; }

.recipients-row-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  min-height: 52px;
}

.recipients-row-checkbox {
  margin: 0;
  flex-shrink: 0;
}

.recipients-row-checkbox.mud-checkbox {
  padding: 0;
}

.recipients-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--avatar-bg, var(--color-gray-500));
  color: var(--color-white);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-13-semibold);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.recipients-identity {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.recipients-identity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.recipients-name {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-semibold);
  color: var(--color-gray-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipients-email {
  font-size: var(--font-size-12);
  color: var(--color-gray-700);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipients-you-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--color-blue-200);
  color: var(--color-blue-700);
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.recipients-locked-hint {
  color: var(--color-gray-600);
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.recipients-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  color: var(--color-gray-700);
  text-align: center;
}

/* ── Recipients: webhook (Slack/Teams) channels section ── */
.recipients-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 4px 6px;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-13-semibold);
  color: var(--color-gray-800);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recipients-section-hint {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  height: 18px;
  border-radius: 999px;
  background: var(--color-blue-100);
  color: var(--color-blue-700);
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: help;
  border: 1px solid var(--color-blue-200);
}

.recipients-section-count {
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-13-regular);
  color: var(--color-gray-700);
  text-transform: none;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.recipients-list--webhooks .recipients-row--webhook {
  cursor: default;
}

.recipients-list--webhooks .recipients-row--webhook:hover {
  background: transparent;
}

.recipients-list--webhooks .recipients-row-label {
  cursor: default;
}

.recipients-avatar--webhook {
  color: var(--color-white);
  font-size: 0;
}

.recipients-avatar--slack {
  background: #4A154B;
}

.recipients-avatar--teams {
  background: #4B53BC;
}

.recipients-channel-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.recipients-channel-pill--slack {
  background: rgba(74, 21, 75, 0.1);
  color: #4A154B;
}

.recipients-channel-pill--teams {
  background: rgba(75, 83, 188, 0.1);
  color: #4B53BC;
}

.recipients-empty .mud-icon-root {
  color: var(--color-gray-500);
}

.recipients-footer {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 12px 0 0;
  border-top: 1px solid var(--color-gray-300);
}

.recipients-footer .mud-button {
  height: 38px;
  min-height: 38px;
  min-width: 92px;
  padding: 0 16px;
  text-transform: none;
  font-weight: var(--font-weight-14-semibold);
  letter-spacing: 0;
  border-radius: 6px;
  white-space: nowrap;
}

.recipients-cancel {
  color: var(--color-gray-700);
}

.recipients-cancel:hover {
  background: var(--color-gray-200) !important;
  color: var(--color-gray-900);
}

.recipients-save.mud-button-filled-secondary:not(.mud-disabled) {
  background-color: var(--color-blue-500) !important;
  color: var(--color-white) !important;
  box-shadow: none !important;
}

.recipients-save.mud-button-filled-secondary:not(.mud-disabled):hover {
  background-color: var(--color-blue-700) !important;
}

.recipients-save.mud-button-filled-secondary.mud-disabled {
  background-color: var(--color-gray-300) !important;
  color: var(--color-gray-600) !important;
}

/* ── New Alert dialog: wizard
   The MudDialog/MudStepper combo nests several containers; we set explicit
   spacing tokens here so every step renders with the same vertical rhythm. */

.new-alert-dialog {
  --wizard-gap: 20px;
  --wizard-action-h: 38px;
  --wizard-inline-x: 4px;
}

.new-alert-dialog .mud-dialog-title {
  padding: 20px 24px 4px;
}

.new-alert-dialog .mud-dialog-content {
  padding: 4px 24px 20px;
}

.new-alert-stepper {
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.new-alert-stepper > .mud-stepper-nav {
  padding: 4px 0 var(--wizard-gap);
}

.new-alert-stepper > .mud-stepper-content {
  padding: 0;
}

/* Stepper nav: number circles + step labels. */
.new-alert-stepper .mud-step {
  flex: 0 1 auto;
}

.new-alert-stepper .mud-step .mud-step-button {
  padding: 0 8px;
}

.new-alert-stepper .mud-step .mud-step-circle {
  background-color: var(--color-gray-300) !important;
  color: var(--color-gray-700) !important;
  border: 0 !important;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: var(--font-weight-12-semibold);
  transition: background-color 0.15s ease;
}

.new-alert-stepper .mud-step.mud-step-active .mud-step-circle {
  background-color: var(--color-blue-500) !important;
  color: var(--color-white) !important;
}

.new-alert-stepper .mud-step.mud-step-completed .mud-step-circle {
  background-color: var(--color-blue-100) !important;
  color: var(--color-blue-700) !important;
}

.new-alert-stepper .mud-step .mud-step-label-content,
.new-alert-stepper .mud-step .mud-step-label-text {
  font-size: var(--font-size-13);
  color: var(--color-gray-700);
  text-transform: none;
  letter-spacing: 0;
}

.new-alert-stepper .mud-step.mud-step-active .mud-step-label-content,
.new-alert-stepper .mud-step.mud-step-active .mud-step-label-text {
  color: var(--color-gray-900);
  font-weight: var(--font-weight-13-semibold);
}

.new-alert-stepper .mud-step-connector {
  background-color: var(--color-gray-400) !important;
  height: 1px;
  margin: 0 8px;
}

.new-alert-stepper .mud-step.mud-step-completed + .mud-step-connector,
.new-alert-stepper .mud-step-connector.mud-step-completed {
  background-color: var(--color-blue-300) !important;
}

.alert-wizard-step {
  padding: 0;
  gap: var(--wizard-gap);
}

.alert-wizard-hint.mud-typography {
  color: var(--color-gray-700);
  font-size: var(--font-size-13);
  margin: 0 0 4px;
}

.alert-metric-toggle.mud-toggle-group {
  height: 36px;
  width: fit-content;
  flex-wrap: wrap;
}

.alert-options-row {
  flex-wrap: wrap;
  gap: 8px !important;
}

.alert-options-row .mud-button {
  text-transform: none;
  height: 34px;
  min-height: 34px;
  font-weight: var(--font-weight-13-semibold);
  font-size: var(--font-size-13);
  letter-spacing: 0;
  border-radius: 6px;
}

.alert-filter-button.mud-button-outlined {
  border: 1px solid var(--color-gray-500) !important;
  color: var(--color-gray-900) !important;
  background: var(--color-white);
  text-transform: none;
}

.alert-filter-button.mud-button-outlined .mud-icon-root {
  color: var(--color-gray-700);
}

.alert-filter-button--applied.mud-button-outlined {
  border-color: var(--color-blue-500) !important;
  color: var(--color-blue-700) !important;
  background: var(--color-blue-100);
}

.alert-filter-button--applied.mud-button-outlined .mud-icon-root {
  color: var(--color-blue-500);
}

/* MudStepper renders ActionContent inside its own container — force the row
   to span the full content width so MudSpacer pushes primary CTAs to the right. */
.new-alert-stepper .mud-stepper-action-content,
.new-alert-stepper > div:has(> .alert-wizard-actions) {
  width: 100%;
}

/* Footer action row: same height for every button, no vertical wobble. */
.alert-wizard-actions {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 16px 0 0;
  margin: var(--wizard-gap) 0 0;
  border-top: 1px solid var(--color-gray-300);
}

.alert-wizard-actions .mud-button {
  height: var(--wizard-action-h);
  min-height: var(--wizard-action-h);
  padding: 0 16px;
  min-width: 84px;
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-14-semibold);
  text-transform: none;
  white-space: nowrap;
  letter-spacing: 0;
  border-radius: 6px;
}

/* Cancel is the lightest weight — keep it as a quiet text button. */
.alert-wizard-actions [data-testid="alert-cancel-button"] {
  color: var(--color-gray-700);
  background: transparent !important;
}

.alert-wizard-actions [data-testid="alert-cancel-button"]:hover {
  background: var(--color-gray-200) !important;
  color: var(--color-gray-900);
}

/* Back is medium weight: outlined neutral. */
.alert-wizard-actions [data-testid="alert-back-button"] {
  border-color: var(--color-gray-500) !important;
  color: var(--color-gray-900) !important;
}

.alert-wizard-actions [data-testid="alert-back-button"]:hover {
  background: var(--color-gray-200) !important;
}

/* Primary CTAs (Next/Create alert): brand blue. */
.alert-wizard-actions [data-testid="alert-next-button"],
.alert-wizard-actions [data-testid="alert-submit-button"] {
  background-color: var(--color-blue-500) !important;
  color: var(--color-white) !important;
  box-shadow: none !important;
}

.alert-wizard-actions [data-testid="alert-next-button"]:not(.mud-disabled):hover,
.alert-wizard-actions [data-testid="alert-submit-button"]:not(.mud-disabled):hover {
  background-color: var(--color-blue-700) !important;
}

.alert-wizard-actions [data-testid="alert-next-button"].mud-disabled,
.alert-wizard-actions [data-testid="alert-submit-button"].mud-disabled {
  background-color: var(--color-gray-300) !important;
  color: var(--color-gray-600) !important;
}

/* ── New Alert dialog: threshold preview ── */
.alert-threshold-preview {
  background: var(--color-gray-200);
  border: 1px solid var(--color-gray-300);
  border-radius: 10px;
  padding: 12px 14px;
}

.alert-threshold-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.alert-threshold-preview-title.mud-typography {
  color: var(--color-gray-900);
  font-weight: var(--font-weight-14-semibold);
}

.alert-threshold-preview-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alert-threshold-preview-badge--breach {
  background: var(--color-red-200);
  color: var(--color-red-500);
  border: 1px solid var(--color-red-300);
}

.alert-threshold-preview-badge--ok {
  background: var(--color-green-100);
  color: var(--color-green-700);
  border: 1px solid var(--color-green-300);
}

.alert-threshold-preview-placeholder {
  font-size: var(--font-size-12);
  color: var(--color-gray-700);
  padding: 22px 0;
  text-align: center;
  border: 1px dashed var(--color-gray-400);
  border-radius: 8px;
  background: var(--color-white);
}

.alert-threshold-preview-placeholder--error {
  border-color: var(--color-red-300);
  color: var(--color-red-500);
  background: var(--color-red-200);
}

.alert-threshold-preview-chart {
  background: var(--color-white);
  border-radius: 8px;
  padding: 4px;
}

.alert-threshold-preview-foot.mud-typography {
  display: block;
  margin-top: 6px;
  color: var(--color-gray-700);
  font-size: var(--font-size-11);
  text-align: center;
}

/* ── New Alert dialog: summary list ── */
.alert-summary-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  background: var(--color-gray-200);
  border: 1px solid var(--color-gray-300);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-summary-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-gray-300);
}

.alert-summary-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.alert-summary-key {
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-semibold);
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alert-summary-value {
  font-size: var(--font-size-13);
  color: var(--color-gray-900);
  font-weight: var(--font-weight-13-semibold);
  text-align: right;
}

/* Prevent label truncation in select-extended with long values */
.select-label-fixed label.mud-input-label-outlined {
  width: auto !important;
  max-width: none !important;
  flex-shrink: 0 !important;
}
.select-label-fixed .mud-select-input-extended {
  min-width: 0;
  overflow: hidden;
}

/* When a chart tooltip is active, temporarily remove overflow clipping on ancestors */
.webvitals-cards-scroll:has(.apexcharts-tooltip.apexcharts-active) {
  overflow: visible !important;
}

.webvitals-chart-container .mud-card:has(.apexcharts-tooltip.apexcharts-active) {
  overflow: visible !important;
}

.webvitals-chart-container .chart-container:has(.apexcharts-tooltip.apexcharts-active) {
  overflow: visible !important;
}

.apexcharts-tooltip:has(.tooltip-annotation) {
  transform: translate(15px, -50%) !important;
}

.tooltip-annotation {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.annotation-icon {
  margin-top: 4px;
  margin-left: auto;
  color: #64748B;
}

.annotation-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.annotation-item {
  display: flex;
  flex-direction: row;
  gap: 2px;
}

.annotation-item:not(:last-child) {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(119, 93, 208, 0.2);
}

.annotation-title {
  font-weight: 600;
  font-size: 13px;
  color: #64748B;
}

.annotation-time {
  font-size: 11px;
  opacity: 0.8;
}

/* Crash setup card (empty state) */
.crash-setup-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-500);
  border-radius: 8px;
  max-width: 800px;
  overflow: hidden;
}

.crash-setup-hero {
  padding: 32px 24px;
  text-align: center;
  border-bottom: 1px solid var(--color-gray-400);
}

.crash-hero-icon {
  width: 56px;
  height: 56px;
  background: var(--color-gray-300);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.crash-setup-hero h2 {
  font-family: var(--font-family-inter);
  font-size: var(--font-size-20);
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 8px;
}

.crash-setup-hero p {
  font-size: var(--font-size-14);
  color: var(--color-gray-700);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.crash-endpoint-highlight {
  margin: 24px;
  background: var(--color-blue-100);
  border: 1px solid var(--color-blue-200);
  border-radius: 6px;
  padding: 16px;
}

.crash-endpoint-label {
  font-size: var(--font-size-12);
  font-weight: 600;
  color: var(--color-blue-700);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.crash-endpoint-value {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-blue-200);
  border-radius: 4px;
  padding: 8px 12px;
}

.crash-endpoint-value code {
  font-family: var(--font-family-jetbrains-mono);
  font-size: var(--font-size-12);
  color: var(--color-gray-800);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crash-accordion-section {
  padding: 0 24px 24px;
}

.crash-accordion-label {
  font-size: var(--font-size-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gray-700);
  margin-bottom: 12px;
}

.crash-accordion-list {
  border: 1px solid var(--color-gray-400);
  border-radius: 6px;
  overflow: hidden;
}

.crash-accordion-item {
  border-bottom: 1px solid var(--color-gray-400);
}

.crash-accordion-item:last-child {
  border-bottom: none;
}

.crash-accordion-trigger {
  width: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-white);
  border: none;
  cursor: pointer;
  font-family: var(--font-family-inter);
  font-size: var(--font-size-13);
  font-weight: 500;
  color: var(--color-gray-900);
  transition: background 0.15s;
}

.crash-accordion-trigger:hover {
  background: var(--color-gray-300);
}

.crash-accordion-trigger-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crash-platform-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  object-fit: contain;
}

.crash-accordion-chevron {
  transition: transform 0.2s;
  color: var(--color-gray-600);
}

.crash-accordion-item.open .crash-accordion-chevron {
  transform: rotate(180deg);
}

.crash-accordion-panel {
  display: none;
  border-top: 1px solid var(--color-gray-400);
}

.crash-accordion-item.open .crash-accordion-panel {
  display: block;
}

.crash-code-block {
  background: var(--color-gray-900);
  padding: 16px;
  position: relative;
}

.crash-code-block pre {
  font-family: var(--font-family-jetbrains-mono);
  font-size: var(--font-size-13);
  color: #E5E7EB;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  padding-right: 60px;
}

.crash-code-block .crash-copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: var(--font-family-inter);
  font-size: var(--font-size-11);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.15s ease;
}

.crash-code-block .crash-copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}

.crash-setup-footer {
  padding: 12px 24px;
  background: var(--color-gray-300);
  border-top: 1px solid var(--color-gray-400);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.crash-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crash-footer-left > span {
  font-size: var(--font-size-12);
  color: var(--color-gray-700);
}

.crash-browser-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--color-yellow-50);
  border: 1px solid #F0DFC0;
  border-radius: 4px;
  font-size: var(--font-size-11);
  font-weight: 500;
  color: var(--color-yellow-700);
}

.crash-footer-note {
  font-size: var(--font-size-12);
  color: var(--color-gray-700);
  font-style: italic;
}

.mud-button-root.mud-button-filled .mud-icon-root {
  color: inherit;
}

.mud-alert .mud-icon-root {
  color: inherit;
}
.mud-alert .mud-alert-position {
  align-items: center;
}

.mud-badge-root,
.mud-typography-h3 {
  font-variant-numeric: tabular-nums;
}


.mud-button.ds-btn-default {
  background: var(--color-gray-400);
  color: var(--color-gray-900);
  border: 1px solid var(--color-gray-500);
}
.mud-button.ds-btn-default:hover {
  background: var(--color-gray-500);
}

.mud-button.ds-btn-outlined-default {
  background: transparent;
  color: var(--color-gray-800);
  border: 1px solid var(--color-gray-500);
}
.mud-button.ds-btn-outlined-default:hover {
  background: var(--color-gray-300);
  border-color: var(--color-gray-600);
}
.mud-button.ds-btn-outlined-default .mud-icon-root {
  color: inherit;
}

.mud-button.ds-btn-destructive {
  background: var(--color-red-500);
  color: var(--color-white);
}
.mud-button.ds-btn-destructive:hover {
  background: var(--cwv-poor-text);
}

.mud-button.ds-btn-disabled:disabled,
.mud-button.ds-btn-disabled[disabled] {
  opacity: 0.5;
}

.mud-button.ds-btn-success {
  background: var(--color-green-500);
  color: var(--color-white);
}
.mud-button.ds-btn-success:hover {
  background: var(--color-green-700);
}
.mud-button.ds-btn-success .mud-icon-root {
  color: inherit;
}

.mud-input.mud-input-outlined.mud-input-error:hover {
  background: var(--color-red-200);
}

.mud-select-extended:focus-within > .mud-input-filled-with-label,
.mud-select-extended:focus-within > .mud-input-outlined-with-label,
.mud-select-extended:focus-within > .mud-input-control-input-container,
.mud-select:focus-within .mud-input.mud-input-outlined.mud-select-input {
  cursor: default;
}

.mud-select-extended .mud-input-slot.mud-select-input-extended:focus,
.mud-select-extended .mud-input-slot.mud-select-input-extended:focus-visible {
  outline: none !important;
}

.ds-variant-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px;
  border: 1px dashed var(--color-gray-500);
  border-radius: 6px;
  background: var(--color-gray-200);
  min-width: 180px;
}
.ds-variant-cell .ds-variant-label {
  font-family: var(--font-family-jetbrains-mono);
  font-size: 11px;
  color: var(--color-gray-700);
  font-weight: 600;
  letter-spacing: 0.4px;
}

.ds-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.ds-status-dot.dot-success {
  background-color: var(--color-green-300);
  box-shadow: 0 0 0 3px var(--color-green-100);
}
.ds-status-dot.dot-warning {
  background-color: var(--color-yellow-500);
  box-shadow: 0 0 0 3px var(--color-yellow-100);
}
.ds-status-dot.dot-error {
  background-color: var(--color-red-500);
  box-shadow: 0 0 0 3px var(--color-red-100);
}

.ds-swatch {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px var(--color-gray-600),
    0 0 0 1px rgba(255, 255, 255, 0.4);
  background-image:
    linear-gradient(45deg, rgba(0, 0, 0, 0.06) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.06) 75%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.06) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.06) 75%);
  background-size: 8px 8px, 8px 8px;
  background-position: 0 0, 4px 4px;
  flex: 0 0 auto;
}

.ds-variant-picker {
  border: 1px solid var(--color-gray-500);
  border-radius: 8px;
  padding: 16px;
  background: var(--color-gray-300);
}

.ds-variant-picker .ds-variant-picker-content {
  padding: 16px;
  margin-top: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-500);
  border-radius: 6px;
}

/* ── Portfolio Vendors ── */

.pv-summary-card {
  min-height: 124px;
}

.pv-card-header {
  height: 50px;
}

.pv-card-clickable {
  cursor: pointer;
  transition: all 0.15s ease;
}

.pv-card-active {
  outline: 1px solid var(--color-blue-500);
}

.pv-card-active .mud-card-content {
  background: var(--color-blue-100);
}

.pv-chevron-active {
  color: var(--color-blue-500);
}

.pv-chevron-inactive {
  color: var(--color-gray-600);
}

.pv-vendor-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-blue-500);
}

.pv-vendor-trend .mud-icon-root {
  color: var(--color-blue-500);
  font-size: 14px;
}

.pv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.pv-badge .mud-icon-root {
  font-size: 12px;
}

.pv-badge-new {
  background: var(--color-blue-100);
  color: var(--color-blue-500);
}

.pv-badge-new .mud-icon-root {
  color: var(--color-blue-500);
}

.pv-badge-removed {
  background: var(--color-gray-400);
  color: var(--color-gray-700);
}

.pv-badge-removed .mud-icon-root {
  color: var(--color-gray-700);
}

.pv-panel {
  border-radius: 8px;
}

.pv-panel-new {
  border-color: var(--color-blue-200);
}

.pv-panel-removed {
  border-color: var(--color-gray-400);
}

.pv-panel-row {
  border-bottom: 1px solid var(--color-gray-400);
  cursor: pointer;
}

.pv-icon-new {
  color: var(--color-blue-500);
}

.pv-icon-removed {
  color: var(--color-gray-600);
}

.pv-vendor-name {
  font-weight: 500;
  color: var(--color-gray-900);
}

.pv-text-secondary {
  color: var(--color-gray-700);
}

.pv-chip-new {
  background: var(--color-blue-100);
  color: var(--color-blue-500);
}

.pv-chip-removed {
  background: var(--color-gray-400);
  color: var(--color-gray-700);
}

.pv-badge-new-sm {
  background: var(--color-blue-100);
  color: var(--color-blue-500);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pv-vendor-subdomain {
  font-size: 12px;
  color: var(--color-gray-600);
  margin-top: 2px;
}

.pv-text-muted {
  color: var(--color-gray-600);
}

.pv-numeric {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  min-width: 55px;
  text-align: right;
}

.pv-numeric-secondary {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--color-gray-700);
}

.pv-bar-track {
  height: 6px;
  background: var(--color-gray-400);
  border-radius: 3px;
  overflow: hidden;
}

.pv-bar-fill {
  height: 100%;
  background: var(--color-blue-500);
  border-radius: 3px;
}

.pv-pv-percent {
  font-weight: 500;
  color: var(--color-gray-800);
}

/* ── Journey page ── */

.journey-draggable-item {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  isolation: isolate;
  display: block;
  position: relative;
}

.add-stage-block {
  border: 2px dashed var(--color-gray-500);
  border-radius: var(--mud-default-borderradius);
  background-color: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-stage-block:hover {
  border-color: var(--color-blue-500) !important;
  background-color: rgba(54, 108, 217, 0.04) !important;
}

.add-stage-block:hover .add-stage-icon,
.add-stage-block:hover .add-stage-text {
  color: var(--color-blue-500) !important;
}

.add-stage-block:active {
  transform: scale(0.98);
}

.journey-loading {
  min-height: 300px;
}

.journey-empty-state {
  border: 2px dashed var(--mud-palette-divider);
  background-color: transparent;
}

.journey-empty-description {
  max-width: 500px;
}

.journey-empty-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--color-gray-400);
  text-align: center;
  margin-bottom: 10px;
  padding: 15px;
}

.journey-empty-icon .mud-icon-root {
  width: 40px;
  height: 40px;
}


.cwv-good {
  color: var(--cwv-good-text);
}

.cwv-needs-improvement {
  color: var(--cwv-needs-improvement-text);
}

.cwv-poor {
  color: var(--cwv-poor-text);
}

.journey-cumulative-label {
  font-size: var(--font-size-12);
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-gray-700);
  text-transform: uppercase;
}

.journey-cumulative-value {
  font-size: var(--font-size-16);
  font-weight: 600;
}

.journey-show-all-link {
  font-size: var(--font-size-12);
  font-weight: 700;
}

.journey-vendor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.journey-vendor-list-scrollable {
  max-height: 200px;
  overflow-y: auto;
}

.journey-vendor-panel {
  min-width: 400px;
  max-width: 400px;
  border-left: 2px solid var(--color-gray-400);
  padding-left: 14px;
}

.journey-section-heading {
  color: var(--color-gray-700);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.journey-vendor-chip {
  height: 26px;
  font-size: var(--font-size-12);
  padding: 4px 10px;
  background-color: var(--color-blue-100);
  color: var(--color-blue-500);
  border: none;
}

.journey-vendor-time {
  color: var(--color-blue-700);
  font-weight: 700;
  padding-left: 4px;
}

.cwv-box {
  padding: 10px 14px;
  border-radius: var(--mud-default-borderradius);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid currentColor;
  border-left-width: 3px;
  background-color: transparent;
}

.cwv-box-good {
  color: var(--cwv-good-text);
}

.cwv-box-needs-improvement {
  color: var(--cwv-needs-improvement-text);
}

.cwv-box-poor {
  color: var(--cwv-poor-text);
}

.cwv-box-label {
  font-size: var(--font-size-11);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gray-700);
}

.cwv-box-value {
  font-size: var(--font-size-14);
  font-weight: 600;
  color: var(--color-gray-900);
}

.journey-step-vendors {
  min-width: 260px;
  max-width: 260px;
  border-left: 2px solid var(--color-gray-400);
  padding-left: 14px;
  position: relative;
}

.journey-drag-handle {
  color: var(--color-gray-600);
  cursor: grab;
}

.journey-text-muted {
  font-size: var(--font-size-12);
  color: var(--color-gray-600);
}

.journey-vendor-name {
  font-size: var(--font-size-12);
  color: var(--color-gray-900);
}

.journey-step-vendor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.journey-step-vendor-chip {
  height: auto;
  font-size: var(--font-size-12);
  padding: 4px 10px;
  background-color: var(--color-blue-100);
  color: var(--color-blue-500);
  border: none;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
}

.journey-step-vendor-chip .journey-vendor-time {
  display: block;
}

.journey-expand-btn {
  font-size: var(--font-size-12);
  cursor: pointer;
  color: var(--color-blue-500);
  background-color: var(--color-blue-100);
  padding: 2px 12px;
  width: fit-content;
}

.journey-step-card {
  border-radius: var(--mud-default-borderradius);
  background-color: var(--color-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: move;
}

.journey-step-card:hover {
  border-color: var(--color-gray-500);
}

.journey-step-card-dragged {
  opacity: 0.5;
}

.journey-step-card-drag-over {
  border-color: var(--mud-palette-secondary);
  box-shadow: 0 4px 12px rgba(1, 117, 224, 0.3);
}

.journey-step-category {
  min-width: 160px;
  max-width: 160px;
}

.journey-step-category-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.journey-step-badge {
  height: 22px;
  font-size: 0.65rem;
  border-radius: 12px;
  padding: 2px 6px;
  font-weight: 600;
}

.journey-step-delete {
  position: absolute;
  top: 0;
  right: 0;
}

.journey-arrow {
  color: var(--color-gray-500);
  margin: 4px 0;
}


/* ── AddJourneyStageDialog ── */

.journey-tab-bar {
  background-color: var(--color-gray-300);
  padding: 4px;
  border-radius: 8px;
  display: inline-flex;
  width: 100%;
}

.journey-tab {
  padding: 8px 24px;
  width: 50%;
}

.journey-tab-active {
  background-color: var(--color-white);
  color: var(--mud-palette-secondary);
}

.journey-tab-inactive {
  color: var(--color-gray-700);
}

.journey-form-label {
  font-weight: 600;
  color: var(--color-gray-900);
}

/* ── MudSwitch vertical alignment ── */

.mud-switch .mud-switch-base {
  top: 50%;
  transform: translateY(-50%);
}

.mud-switch .mud-switch-base.mud-checked {
  transform: translateX(20px) translateY(-50%);
}

/* ── Session View ── */

.sv-range-label {
  color: var(--color-gray-600);
  min-width: 60px;
  text-align: right;
}

.sv-load-btn {
  color: var(--color-gray-700);
  border: 1px solid var(--color-gray-500);
  outline: 1px solid var(--color-gray-100);
  border-radius: 7px;
}

.sv-info-label {
  color: var(--color-gray-500);
}

.sv-text-secondary {
  color: var(--color-gray-600);
}

/* Web Vitals markers */

.sv-marker {
  position: absolute;
  transform: translateX(-50%);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sv-marker-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sv-marker-line {
  width: 2px;
  height: 100%;
  position: fixed;
}

.sv-marker-diamond {
  width: 10px;
  height: 10px;
  background: #fff;
  transform: rotate(45deg);
  z-index: 1;
}

.sv-marker-ttfb .sv-marker-line {
  background-color: #1976d2;
}

.sv-marker-ttfb .sv-marker-diamond {
  border: 2px solid #1976d2;
}

.sv-marker-lcp-start .sv-marker-line {
  background-color: #66bb6a;
}

.sv-marker-lcp-start .sv-marker-diamond {
  border: 2px solid #66bb6a;
}

.sv-marker-lcp .sv-marker-line {
  background-color: #2e7d32;
}

.sv-marker-lcp .sv-marker-diamond {
  border: 2px solid #2e7d32;
}

.sv-marker-inp .sv-marker-line {
  background-color: #ff9800;
}

.sv-marker-inp .sv-marker-diamond {
  border: 2px solid #ff9800;
}

.sv-marker-cls .sv-marker-line {
  background-color: #f44336;
}

.sv-marker-cls .sv-marker-diamond {
  border: 2px solid #f44336;
}

/* Timeline */

.sv-timeline-scale {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-left: 200px;
  padding-right: 185px;
  font-size: 12px;
  color: var(--color-gray-600);
}

/* Heatmap rows */

.sv-heatmap-label {
  width: 178px;
  font-size: 14px;
  color: var(--color-gray-900);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 15px;
}

.sv-heatmap-bg {
  flex: 1;
  height: 50px;
  position: relative;
  background: var(--color-gray-100);
  border-radius: 4px;
  overflow: hidden;
}

.sv-heatmap-stats {
  margin-left: 15px;
  font-size: 11px;
  color: var(--color-gray-600);
  min-width: 180px;
}

.sv-no-data {
  color: var(--color-gray-500);
  text-align: center;
  padding: 20px;
}

/* Individual scripts section */

.sv-scripts-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-gray-300);
}

.sv-script-label {
  width: 200px;
  font-size: 12px;
  color: var(--color-gray-900);
  padding-right: 15px;
}

.sv-script-vendor {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-script-url {
  color: var(--color-gray-600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

/* Sticky legend */

.sv-legend {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-gray-100);
  border-top: 1px solid var(--color-gray-300);
  padding: 15px 20px;
  z-index: 1000;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.sv-legend-title {
  font-weight: 600;
  font-size: 14px;
}

.sv-legend-desc {
  font-size: 12px;
  color: var(--color-gray-600);
}

.sv-legend-swatch {
  width: 16px;
  height: 16px;
  border: 1px solid var(--color-gray-300);
  border-radius: 2px;
}

.sv-legend-label {
  font-size: 11px;
  color: var(--color-gray-600);
}

/* ── P2/P3 utility classes ── */

.cm-table-fit-content {
  max-width: 1200px;
  width: max-content;
  width: -moz-max-content;
  width: -webkit-max-content;
}

.crashes-summary-card {
  min-height: 124px;
  min-width: 450px;
}

.crashes-trend-chart {
  min-width: 180px;
  min-height: 60px;
  width: 180px;
  height: 60px;
}

.crashes-table-scroll {
  height: calc(100vh - 340px);
}

/* ── Script Heatmap: page filter ── */

.sh-page-filter {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-gray-500);
  border-radius: 8px;
  background: var(--color-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 480px;
  height: 36px;
}

.sh-page-filter:hover {
  cursor: pointer;
  border-color: var(--color-gray-700);
}

.sh-page-filter:focus-within {
  border-color: var(--color-gray-700);
}

.sh-page-filter-label {
  padding: 0 12px;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-12-semibold);
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-right: 1px solid var(--color-gray-400);
  line-height: 34px;
  border-radius: 7px 0 0 7px;
  flex-shrink: 0;
  background: var(--color-gray-200);
}

.sh-page-filter:hover .sh-page-filter-label {
  background-color: var(--color-gray-300);
}

.sh-page-filter-input {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
}

.sh-page-filter .mud-select .mud-icon-root {
  margin: 0;
}

.sh-page-filter-input .mud-input-control {
  margin: 0;
}

.sh-page-filter-input .mud-input {
  padding-right: 4px;
}

.sh-page-filter-input .mud-input::before,
.sh-page-filter-input .mud-input::after {
  border: none !important;
}

.sh-page-filter-input .mud-icon-button {
  padding: 4px;
}

/* ── Script Heatmap: page layout ── */

.sh-page {
  /* Reserve space at the bottom for the sticky legend so the last vendor row isn't covered. */
  padding-bottom: 120px;
  --sh-row-label-width: 200px;
  --sh-row-stats-width: 185px;
  --sh-canvas-height: 50px;
  --sh-canvas-height-child: 40px;
}

.sh-filters {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ── Script Heatmap: panel ── */

.sh-panel {
  border-radius: 12px;
}

.sh-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sh-panel-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sh-panel-title.mud-typography {
  margin: 0;
  color: var(--color-gray-900);
}

.sh-panel-subtitle.mud-typography {
  color: var(--color-gray-700);
}

.sh-panel-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sh-range-label {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  border: 1px solid var(--color-gray-400);
  background: var(--color-white);
  overflow: hidden;
  white-space: nowrap;
  height: 28px;
  font-variant-numeric: tabular-nums;
}

.sh-range-label-key {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-semibold);
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--color-gray-200);
  border-right: 1px solid var(--color-gray-400);
}

.sh-range-label-value {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-13-semibold);
  color: var(--color-gray-900);
}

/* ── Script Heatmap: zoom buttons ── */

.sh-zoom-group {
  display: inline-flex;
  align-items: stretch;
  background: var(--color-white);
  border: 1px solid var(--color-gray-500);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.sh-zoom-group .sh-zoom-button.mud-icon-button {
  border: 0;
  border-radius: 0;
  width: 32px;
  height: 32px;
  color: var(--color-gray-800);
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sh-zoom-group .sh-zoom-button.mud-icon-button:hover:not(.mud-disabled) {
  background: var(--color-gray-200);
  color: var(--color-gray-900);
}

.sh-zoom-group .sh-zoom-button.mud-icon-button.mud-disabled {
  color: var(--color-gray-500);
  cursor: not-allowed;
}

.sh-zoom-group .sh-zoom-button .mud-icon-root {
  font-size: 18px;
}

.sh-zoom-divider {
  width: 1px;
  background: var(--color-gray-400);
  align-self: stretch;
}

/* ── Script Heatmap: page-lifecycle event guides ──
   Vertical lines that span the whole heatmap plot — TTFB / LCP start / LCP / custom marks.
   Each event has matching colour tokens shared between the legend chip and the guide line. */

/* MudTabs — relax MudBlazor's hard-coded 160px min-width so the Settings
   page's 6-tab bar still fits when cm-layout-main is only ~860px wide (the
   2+1 desktop split). The smallest tab text ("Profile" + icon ≈ 90 px) is the
   new floor; longer labels like "Page Categories" still grow to fit their
   content. MudBlazor stamps min-width:160px as a high-specificity rule, so we
   need !important here. */
.mud-tabs .mud-tab.mud-tab {
  min-width: 0 !important;
  padding: 12px 16px !important;
}

/* When the tab strip would still overflow (e.g. extremely narrow viewports),
   let it scroll horizontally inside its own bounds instead of widening the
   page — MudTabs' scroll buttons remain functional. */
.mud-tabs .mud-tabs-tabbar-content {
  min-width: 0;
}

.sh-marker--ttfb { --sh-marker-color: var(--color-blue-500); }
.sh-marker--lcp-start { --sh-marker-color: var(--color-green-300); }
.sh-marker--lcp { --sh-marker-color: var(--color-green-500); }
.sh-event-line--custom { --sh-marker-color: var(--color-purple-500); }

/* Legend chips: short line glyph + label + value, sit just above the chart. */
.sh-event-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 10px 12px;
  border: 1px solid var(--color-gray-300);
  border-radius: 10px;
  background: var(--color-gray-100, var(--color-gray-200));
  margin-bottom: 12px;
}

.sh-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-12);
  color: var(--color-gray-800);
  cursor: help;
}

.sh-event-chip-line {
  display: inline-block;
  width: 2px;
  height: 14px;
  border-radius: 1px;
  background-color: var(--sh-marker-color, var(--color-gray-500));
  flex-shrink: 0;
}

/* Mirror the per-event dash/dot pattern from the chart on the legend chip. */
.sh-event-chip.sh-marker--ttfb .sh-event-chip-line {
  background-color: transparent;
  background-image: linear-gradient(to bottom, var(--sh-marker-color) 50%, transparent 50%);
  background-size: 2px 4px;
  background-repeat: repeat-y;
}

.sh-event-chip.sh-marker--lcp-start .sh-event-chip-line {
  background-color: transparent;
  background-image: linear-gradient(to bottom, var(--sh-marker-color) 50%, transparent 50%);
  background-size: 2px 5px;
  background-repeat: repeat-y;
}

.sh-event-chip.sh-marker--lcp .sh-event-chip-line {
  background-color: var(--sh-marker-color);
}

.sh-event-chip-text {
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-13-semibold);
}

.sh-event-chip-text strong { color: var(--color-gray-900); }

/* Chart body: wraps time scale + plot, so guide lines can span only the plot area. */
.sh-chart {
  display: flex;
  flex-direction: column;
}

.sh-plot {
  position: relative;
  /* Establish a stacking context so the event overlay can sit above canvases without floating into the panel header. */
  isolation: isolate;
}

.sh-event-overlay {
  position: absolute;
  /* Extend slightly above and below the rows so cap dots don't get clipped. */
  top: -2px;
  bottom: -2px;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
  /* Align overlay with the canvas gutter inside each row:
     4px row padding + 28px toggle + 12px gap + (label-width − 40px) + 12px gap. */
  margin-left: calc(var(--sh-row-label-width) + 16px);
  margin-right: calc(var(--sh-row-stats-width) + 4px);
}

/* Keep the row's own canvas explicitly below the overlay; row hover/click still work via the row button below the canvas. */
.sh-plot .sh-row-canvas {
  position: relative;
  z-index: 1;
}

/* Vertical event guide (Chrome / WPT pattern):
   - .sh-event-line is a zero-width positioned anchor at the event time.
   - .sh-event-stem is the visible coloured line through the rows. Background-image
     gives each event type a distinct dash pattern (TTFB dotted, LCP-start dashed,
     LCP solid) — colour + pattern as redundant cues.
   - .sh-event-flag is a small inverted-triangle hit target pinned to the top of
     the chart, the real hover/click target carrying the tooltip. When two flags
     fall close together, lane-N classes offset the flag (and only the flag)
     horizontally, while the line stays at the precise event time. */
.sh-event-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  pointer-events: none;
}

.sh-event-stem {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  /* Default pattern (custom marks): dotted */
  background-image: linear-gradient(to bottom, var(--sh-marker-color) 50%, transparent 50%);
  background-size: 2px 6px;
  background-repeat: repeat-y;
  background-position: center;
  opacity: 0.7;
  transition: opacity 0.12s ease;
}

.sh-event-line.sh-marker--ttfb .sh-event-stem {
  background-size: 2px 4px;
}

.sh-event-line.sh-marker--lcp-start .sh-event-stem {
  background-size: 2px 10px;
}

.sh-event-line.sh-marker--lcp .sh-event-stem {
  background-image: none;
  background-color: var(--sh-marker-color);
}

/* Flag — small downward-pointing pin pinned to the top edge of the chart. */
.sh-event-flag {
  position: absolute;
  left: 0;
  /* Flag tip pierces the chart top by 3 px so it visually anchors into the row,
     no daylight between marker and chart. */
  top: -11px;
  width: 14px;
  height: 14px;
  background: var(--sh-marker-color);
  /* Downward isoceles triangle (Chrome Performance / Lighthouse marker shape). */
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
  /* Slightly heavier shadow so the triangle reads against the dashed stem behind it. */
  filter: drop-shadow(0 1px 1.5px rgba(15, 23, 42, 0.28));
  pointer-events: auto;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.12s ease, filter 0.12s ease;
}

/* Keyboard accessibility — flags are focusable via tab order so the same
   hover-style highlight reads on keyboard nav. */
.sh-event-flag:focus-visible {
  outline: none;
  filter:
    drop-shadow(0 0 4px color-mix(in srgb, var(--sh-marker-color) 70%, transparent))
    drop-shadow(0 2px 3px rgba(15, 23, 42, 0.22));
}

/* Custom marks use a circle so users can distinguish life-cycle events
   (TTFB/LCP-start/LCP — triangle) from app marks (custom — round) at a glance. */
.sh-event-line.sh-event-line--custom .sh-event-flag {
  clip-path: none;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  top: -8px;
}

/* Hover: subtle lift + soft halo in the line's own colour. */
.sh-event-flag:hover {
  transform: translateX(-50%) translateY(-2px);
  filter:
    drop-shadow(0 0 4px color-mix(in srgb, var(--sh-marker-color) 60%, transparent))
    drop-shadow(0 2px 3px rgba(15, 23, 42, 0.22));
}

.sh-event-line:has(.sh-event-flag:hover) { z-index: 5; }
.sh-event-line:has(.sh-event-flag:hover) .sh-event-stem { opacity: 1; }

/* Flag tooltip — CSS-only popover positioned as a sibling of the flag inside
   the .sh-event-line wrapper. Visibility is driven entirely by the line's
   :hover / :focus-within state, so the popover stays open while the cursor
   moves from the flag onto the popover itself (essential for scrolling a long
   cluster). Surface matches the DS tooltip token (white + gray-800 text). */
.sh-flag-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s linear 0.12s;

  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 260px;
  max-width: 80vw;
  padding: 8px 10px;
  text-align: left;
  font-size: var(--font-size-12);
  line-height: 1.4;
  color: var(--color-gray-800);
  background: var(--color-white);
  border-radius: 6px;
  box-shadow:
    0 4px 8px 3px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

/* Down-pointing arrow on the popover so the connection between flag and
   popover reads as a single object. */
.sh-flag-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-white);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.06));
}

/* Show when the line wrapper is hovered or contains a focused flag. The wrapper
   is zero-width but the flag sits visually on top of it, so :hover bubbles up
   the moment the cursor enters the flag, and stays true while the cursor moves
   onto the absolutely-positioned popover (since the popover is a child). */
.sh-event-line:hover .sh-flag-tooltip,
.sh-event-line:focus-within .sh-flag-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s;
}

.sh-flag-tooltip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  /* Cap so a very large cluster doesn't push the popover up over the panel
     title; 160 px ≈ 11 lines, which is enough to scan a typical cluster while
     keeping the popover under ~210 px tall. Wheel-scroll reveals the rest. */
  max-height: 160px;
  overflow-y: auto;
  /* Subtle scrollbar so the affordance is visible without dominating. */
  scrollbar-width: thin;
  scrollbar-color: var(--color-gray-500) transparent;
}

.sh-flag-tooltip-list li {
  white-space: normal;
  word-break: break-word;
}

.sh-flag-tooltip-footer {
  padding-top: 4px;
  border-top: 1px solid var(--color-gray-300);
  font-weight: var(--font-weight-13-semibold);
  color: var(--color-gray-900);
}

/* Chip-to-line linkage: hovering a legend chip dims unrelated lines.
   Uses :has() to walk up to the legend, then siblings to find the matching line.
   Implementation pattern: when a chip is hovered, mark a CSS variable on the
   shared parent that the lines read to drop their opacity. */
.sh-event-legend:has(.sh-event-chip:hover) ~ .sh-chart .sh-event-line { opacity: 0.35; }
.sh-event-legend:has(.sh-marker--ttfb.sh-event-chip:hover) ~ .sh-chart .sh-event-line.sh-marker--ttfb { opacity: 1; }
.sh-event-legend:has(.sh-marker--lcp-start.sh-event-chip:hover) ~ .sh-chart .sh-event-line.sh-marker--lcp-start { opacity: 1; }
.sh-event-legend:has(.sh-marker--lcp.sh-event-chip:hover) ~ .sh-chart .sh-event-line.sh-marker--lcp { opacity: 1; }

.sh-time-scale {
  display: flex;
  justify-content: space-between;
  padding-left: calc(var(--sh-row-label-width) + 16px);
  padding-right: calc(var(--sh-row-stats-width) + 4px);
  margin-bottom: 8px;
  margin-top: 4px;
  font-size: var(--font-size-11);
  color: var(--color-gray-700);
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-11-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sh-time-scale > span:first-child { color: var(--color-gray-800); }
.sh-time-scale > span:last-child { color: var(--color-gray-800); }

/* ── Script Heatmap: vendor rows ── */

/* Marker legend chips — readable at-rest decoder for the dot markers above the time scale. */
.sh-marker-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 var(--sh-row-stats-width) 8px var(--sh-row-label-width);
  margin-top: -4px;
}

.sh-marker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-11-semibold);
  color: var(--color-gray-800);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sh-marker-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--sh-marker-color, var(--color-gray-500));
  border: 2px solid var(--sh-marker-color, var(--color-gray-500));
}

.sh-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sh-row-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

/* Expanded state — background only. Padding/margin used to widen the group
   visually, but they also pushed neighbouring rows down by 12 px on each
   open/close. Background alone (the row group is already a flex column with
   gap:8px) gives the visual grouping without any layout shift. */
.sh-row-group--expanded {
  background: var(--color-gray-200);
}

/* Whole-row click target — replaces the inline <button> + separate label/canvas wrappers. */
.sh-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 4px 4px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: background-color 0.18s ease;
}

.sh-row:hover {
  background: var(--color-gray-200);
}

.sh-row:active {
  background: var(--color-gray-300);
}

.sh-row-group--expanded .sh-row:hover {
  background: var(--color-gray-300);
}

.sh-row:focus-visible {
  outline: 2px solid var(--color-blue-500);
  outline-offset: 2px;
}

.sh-row--active {
  background: transparent;
}

.sh-row--child {
  opacity: 0.95;
  padding-left: 48px;  /* room for hierarchy guide bar + indent */
  cursor: default;
  position: relative;
}

.sh-row--child:hover {
  background: transparent;
}

/* Hierarchy guide bar inside child indent — replaces the children-container's border-left
   and lives entirely within the label gutter so it never overlaps the canvas. */
.sh-row--child::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--color-gray-400);
  border-radius: 1px;
}

.sh-row-toggle {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-700);
  flex-shrink: 0;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.sh-row:hover .sh-row-toggle {
  color: var(--color-gray-900);
}

.sh-row-toggle-loader.mud-progress-circular {
  width: 16px;
  height: 16px;
}

.sh-row-label {
  width: calc(var(--sh-row-label-width) - 40px);
  font-size: var(--font-size-14);
  color: var(--color-gray-900);
  font-weight: var(--font-weight-14-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 12px;
  flex-shrink: 0;
}

.sh-row-label--child {
  font-size: var(--font-size-12);
  color: var(--color-gray-700);
  font-weight: var(--font-weight-12-regular);
  /* 200(token) - 48(child padding-left) - 12(gap before canvas) + 16(matches parent's +16 offset) − ... */
  /* Net: keep canvas aligned with parent canvas at row-left + 216. */
  width: calc(var(--sh-row-label-width) - 44px);
}

.sh-row-canvas {
  flex: 1;
  min-width: 0;
  height: var(--sh-canvas-height);
  background: var(--color-gray-200);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.sh-row-canvas--child {
  height: var(--sh-canvas-height-child);
}

.sh-row-canvas .heatmap-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sh-row-stats {
  width: calc(var(--sh-row-stats-width) - 15px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--font-size-12);
  color: var(--color-gray-700);
  flex-shrink: 0;
  padding-left: 12px;
}

.sh-row-stat-label {
  font-size: var(--font-size-11);
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: var(--font-weight-11-semibold);
}

.sh-row-stat-value {
  font-size: var(--font-size-13);
  color: var(--color-gray-900);
  font-weight: var(--font-weight-14-semibold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sh-row-stat-time {
  color: var(--color-gray-700);
  font-weight: var(--font-weight-13-regular);
  margin-left: 4px;
}

.sh-row-children {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 6px;
  /* No horizontal indent here — the indent + hierarchy guide lives INSIDE each child row
     so its canvas stays aligned with the parent canvas (and the event guide lines line up). */
}

/* ── Script Heatmap: empty state ── */
.sh-empty .mud-icon-root {
  color: var(--color-gray-600);
}

.sh-empty-hint.mud-typography {
  color: var(--color-gray-700);
  max-width: 520px;
  margin: 0 auto;
}

/* ── Script Heatmap: legend — gradient strip with tick labels
   Replaces 15 individual swatches with a calm horizontal gradient.
   The full 15-bin colour resolution remains in the heatmap canvas. */

.sh-legend {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-gray-400);
  padding: 12px 32px;
  z-index: 10;
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.05);
}

.sh-legend-inner {
  margin-left: 240px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.sh-legend-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
}

.sh-legend-title {
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-14-semibold);
  color: var(--color-gray-900);
}

.sh-legend-hint {
  font-size: var(--font-size-11);
  color: var(--color-gray-700);
}

.sh-legend-strip {
  flex: 1;
  min-width: 240px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sh-legend-bar {
  height: 10px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(
    to right,
    #f0f0f0 0%,
    #fff3cd 12%,
    #ffe082 25%,
    #ffb74d 42%,
    #ff9800 55%,
    #ff5722 70%,
    #c62828 85%,
    #8b0000 100%
  );
}

.sh-legend-ticks {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-11);
  color: var(--color-gray-700);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .sh-legend-inner {
    margin-left: 0;
    gap: 16px;
  }
  .sh-legend {
    padding: 10px 16px;
  }
  .sh-legend-strip {
    min-width: 0;
  }
}

.snippet-copy-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--color-white);
}

.color-warning {
  color: #F59E0B;
}

/* ========================================
   Investigation Pages
   ======================================== */

/* Section Labels */
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gray-600);
  padding: 24px 0 8px;
  border-bottom: 1px solid var(--color-gray-400);
  margin-bottom: 4px;
}

.section-label:first-child {
  padding-top: 0;
}

/* Investigation List Item */
.doc-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin: 4px 0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid var(--color-gray-400);
  background: var(--color-white);
}

.doc-item:hover {
  background: var(--color-blue-100);
  border-color: var(--color-blue-500);
  box-shadow: 0 2px 8px rgba(54, 108, 217, 0.15);
}

.doc-item:hover .doc-title {
  color: var(--color-blue-500);
}

.doc-item:hover .doc-arrow {
  color: var(--color-blue-500);
  transform: translateX(3px);
}

/* Status Icons */
.doc-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.doc-icon svg {
  width: 14px;
  height: 14px;
}

.doc-icon.completed {
  background: var(--color-green-100);
  color: var(--color-green-500);
}

.doc-icon.executing {
  background: var(--color-blue-200);
  color: var(--color-blue-500);
}

.doc-icon.pending {
  background: var(--color-yellow-100);
  color: var(--color-yellow-700);
}

.doc-icon.failed {
  background: var(--color-red-100);
  color: var(--color-red-500);
}

/* Doc Content */
.doc-content {
  flex: 1;
  min-width: 0;
}

.doc-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-gray-900);
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.doc-snippet {
  font-size: 13px;
  color: var(--color-gray-700);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-gray-600);
  flex-shrink: 0;
  margin-top: 4px;
}

.doc-meta-dot {
  width: 3px;
  height: 3px;
  background: var(--color-gray-500);
  border-radius: 50%;
}

.doc-domain-badge {
  background: var(--color-blue-100);
  color: var(--color-blue-700);
  font-size: 11px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.doc-arrow {
  width: 20px;
  height: 20px;
  color: var(--color-gray-500);
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.doc-list {
  display: flex;
  flex-direction: column;
}

.doc-actions {
  display: flex;
  gap: 4px;
  margin-right: 0;
}

.doc-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-gray-300);
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
  color: var(--color-gray-700);
}

.doc-action-btn:hover {
  background: var(--color-blue-200);
  color: var(--color-blue-500);
}

.doc-action-btn svg {
  width: 16px;
  height: 16px;
}

/* New Investigation Form */
.form-section {
  margin-bottom: 32px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 8px;
}

.form-label-optional {
  font-weight: 400;
  color: var(--color-gray-600);
}

.form-hint {
  font-size: 13px;
  color: var(--color-gray-700);
  margin-bottom: 12px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-gray-500);
  border-radius: 8px;
  font-family: var(--font-family-inter);
  font-size: 16px;
  color: var(--color-gray-900);
  background: var(--color-white);
  transition: 0.2s ease;
}

.form-input:hover {
  border-color: var(--color-gray-600);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-blue-500);
  box-shadow: 0 0 0 3px var(--color-blue-100);
}

.form-input::placeholder {
  color: var(--color-gray-600);
}

.form-input-title {
  font-size: 20px;
  font-weight: 500;
  padding: 16px 20px;
}

.form-textarea {
  min-height: 200px;
  resize: vertical;
  line-height: 1.6;
}

.form-textarea-context {
  min-height: 100px;
}

.form-section .mud-input-adornment-end,
.mud-dialog .mud-input-adornment-end {
  padding-right: 12px;
}

.form-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
  margin-top: 8px;
  border-top: 1px solid var(--color-gray-400);
}

/* Investigation Form Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
  border: none;
  font-family: var(--font-family-inter);
}

.btn-primary {
  background: var(--color-blue-500);
  color: white;
}

.btn-primary:hover {
  background: var(--color-blue-700);
}

.btn-primary:disabled {
  background: var(--color-gray-500);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--color-gray-300);
  color: var(--color-gray-800);
}

.btn-secondary:hover {
  background: var(--color-gray-400);
}

/* File Upload Dropzone */
.file-dropzone {
  position: relative;
  border: 2px dashed var(--color-gray-500);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s ease;
  background: var(--color-gray-200);
}

.file-dropzone:hover {
  border-color: var(--color-blue-500);
  background-color: var(--color-blue-100);
}

.file-dropzone--drag-over {
  border-color: var(--color-blue-500);
  background-color: var(--color-blue-100);
}

.file-dropzone__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-dropzone__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.file-dropzone__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  color: var(--color-gray-600);
}

.file-dropzone__text {
  font-size: 14px;
  color: var(--color-gray-800);
  margin-bottom: 4px;
}

.file-dropzone__link {
  color: var(--color-blue-500);
  font-weight: 500;
}

.file-dropzone__hint {
  font-size: 13px;
  color: var(--color-gray-600);
}

/* Attached Files */
.attached-files {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attached-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--color-gray-300);
  border-radius: 6px;
  font-size: 13px;
  color: var(--color-gray-800);
}

.attached-file__icon {
  width: 16px;
  height: 16px;
  color: var(--color-gray-600);
}

.attached-file__remove {
  width: 16px;
  height: 16px;
  color: var(--color-gray-600);
  cursor: pointer;
  margin-left: 4px;
}

.attached-file__remove:hover {
  color: var(--color-gray-900);
}

/* Tips Section */
.tips-section {
  background: var(--color-blue-100);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 32px;
}

.tips-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tips-title svg {
  width: 18px;
  height: 18px;
  color: var(--color-blue-500);
}

.tips-list {
  list-style: none;
  font-size: 13px;
  color: var(--color-gray-700);
  padding: 0;
  margin: 0;
}

.tips-list li {
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
}

.tips-list li::before {
  content: "\2022";
  position: absolute;
  left: 6px;
  color: var(--color-blue-500);
}

/* Selected Files (MudBlazor override) */
.selected-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-files__chip {
  max-width: 250px;
}

.selected-files__chip .mud-chip-content {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Execution Stats */
.execution-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-size: var(--font-size-13);
  color: var(--color-gray-700);
}

.stat-value {
  font-size: var(--font-size-13);
  font-weight: 500;
  color: var(--color-gray-900);
}

/* Callouts (GitHub-style alerts) */
.callout {
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-left: 4px solid;
}

.callout__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: var(--font-size-13);
}

.callout__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.callout__title {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.callout__content {
  font-size: var(--font-size-13);
  line-height: 1.5;
}

.callout__content > *:last-child {
  margin-bottom: 0;
}

.callout--warning {
  background-color: var(--color-yellow-50);
  border-color: var(--color-yellow-500);
}

.callout--warning .callout__header {
  color: var(--color-yellow-700);
}

.callout--warning .callout__icon {
  color: var(--color-yellow-500);
}

.callout--caution {
  background-color: var(--color-red-200);
  border-color: var(--color-red-500);
}

.callout--caution .callout__header {
  color: var(--color-red-500);
}

.callout--caution .callout__icon {
  color: var(--color-red-500);
}

.callout--tip {
  background-color: var(--color-green-100);
  border-color: var(--color-green-400);
}

.callout--tip .callout__header {
  color: var(--color-green-500);
}

.callout--tip .callout__icon {
  color: var(--color-green-400);
}

.callout--note {
  background-color: var(--color-blue-100);
  border-color: var(--color-blue-500);
}

.callout--note .callout__header {
  color: var(--color-blue-700);
}

.callout--note .callout__icon {
  color: var(--color-blue-500);
}

.callout--important {
  background-color: var(--color-navy-200);
  border-color: var(--color-navy-400);
}

.callout--important .callout__header {
  color: var(--color-navy-400);
}

.callout--important .callout__icon {
  color: var(--color-navy-400);
}

/* ── Investigation Detail Page ── */

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.status-completed {
  background: var(--color-green-100);
  color: var(--color-green-500);
}

.status-executing {
  background: var(--color-blue-200);
  color: var(--color-blue-500);
}

.status-pending {
  background: var(--color-yellow-100);
  color: var(--color-yellow-700);
}

.status-failed {
  background: var(--color-red-100);
  color: var(--color-red-500);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-gray-700);
}

.meta-icon {
  width: 14px;
  height: 14px;
}

/* Two-column layout */
.content-sidebar {
  background: var(--color-gray-300);
  padding: 32px 24px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  position: sticky;
  top: 55px;
  border-radius: 8px;
}

/* Output content */
.output-content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-800);
}

.output-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-gray-400);
}

.output-content h2:first-child {
  margin-top: 0;
}

.output-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-top: 32px;
  margin-bottom: 12px;
}

.output-content p {
  margin-bottom: 16px;
}

.output-content ul,
.output-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.output-content li {
  margin-bottom: 8px;
}

.output-content strong {
  font-weight: 600;
  color: var(--color-gray-900);
}

.output-content code {
  font-family: var(--font-family-jetbrains-mono);
  font-size: 14px;
  background: var(--color-gray-300);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-gray-800);
}

.output-content pre {
  background: var(--color-gray-300);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.output-content pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

.output-content img {
  max-width: 100%;
  height: auto;
}

.output-content blockquote {
  border-left: 3px solid var(--color-blue-500);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--color-gray-700);
  font-style: italic;
}

.output-content .table-scroll-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 8px;
  border: 1px solid var(--color-gray-400);
}

.output-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.output-content thead {
  background: var(--color-gray-300);
}

.output-content th {
  font-weight: 600;
  color: var(--color-gray-900);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-gray-400);
  white-space: nowrap;
}

.output-content th:first-child {
  border-top-left-radius: 7px;
}

.output-content th:last-child {
  border-top-right-radius: 7px;
}

.output-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-gray-400);
  color: var(--color-gray-800);
  vertical-align: top;
}

.output-content tbody tr:last-child td {
  border-bottom: none;
}

.output-content tbody tr:last-child td:first-child {
  border-bottom-left-radius: 7px;
}

.output-content tbody tr:last-child td:last-child {
  border-bottom-right-radius: 7px;
}

.output-content tbody tr:nth-child(even) {
  background: var(--color-gray-200);
}

.output-content tbody tr:hover {
  background: var(--color-gray-300);
}

.output-content td code,
.output-content th code {
  font-size: 13px;
  padding: 2px 6px;
  background: var(--color-gray-400);
  border-radius: 4px;
}

/* Data file download links (csv/xlsx/json/txt) — rendered as a colored chip with a download icon. */
.output-content .data-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--color-blue-500);
  border-radius: 6px;
  background: var(--color-blue-100);
  color: var(--color-blue-500);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.output-content .data-file-link:hover {
  background: var(--color-blue-500);
  color: var(--color-white);
}

.output-content .data-file-link__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Prompt section */
.prompt-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-gray-400);
}

.prompt-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-700);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.prompt-section-title--spaced {
  margin-top: 16px;
}

.original-prompt {
  background: var(--color-gray-300);
  border-radius: 8px;
  padding: 16px 20px;
}

.original-prompt--error {
  background: var(--color-red-100);
  border-left: 3px solid var(--color-red-500);
}

.original-prompt-text {
  font-size: 14px;
  color: var(--color-gray-800);
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

/* Sidebar sections */
.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-section-title svg {
  width: 14px;
  height: 14px;
}

/* Duration stats */
.duration-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-gray-400);
  flex-wrap: wrap;
}

.duration-stat {
  text-align: center;
}

.duration-stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gray-900);
}

.duration-stat-label {
  font-size: 11px;
  color: var(--color-gray-600);
  text-transform: uppercase;
}

/* Feedback buttons */
.feedback-buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--color-white);
  border: 1px solid var(--color-gray-400);
  border-radius: 6px;
  color: var(--color-gray-700);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.feedback-btn svg {
  width: 18px;
  height: 18px;
}

.feedback-btn:hover {
  background: var(--color-gray-200);
  color: var(--color-gray-900);
}

.feedback-btn--active.feedback-btn--like {
  background: var(--color-green-100);
  border-color: var(--color-green-500);
  color: var(--color-green-500);
}

.feedback-btn--active.feedback-btn--dislike {
  background: var(--color-red-100);
  border-color: var(--color-red-500);
  color: var(--color-red-500);
}

/* Step items */
.step-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-gray-400);
}

.step-item:last-child {
  border-bottom: none;
}

.step-number {
  width: 24px;
  height: 24px;
  background: var(--color-gray-400);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-700);
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-description {
  font-size: 13px;
  color: var(--color-gray-800);
  line-height: 1.4;
}

.step-description--muted {
  color: var(--color-gray-600);
}

.step-duration {
  font-size: 12px;
  color: var(--color-gray-600);
  margin-top: 4px;
}

/* Running status */
.running-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 16px;
  color: var(--color-gray-800);
}

.running-status__icon {
  width: 32px;
  height: 32px;
  color: var(--color-gray-600);
}

/* Execution container for live steps */
.execution-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
  padding: 60px 32px;
  max-width: 700px;
  width: 100%;
}

.exec-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-gray-900);
  text-align: left;
  margin-bottom: 8px;
  max-width: 600px;
}

.exec-subtitle {
  font-size: 15px;
  color: var(--color-gray-700);
  text-align: left;
  margin-top: 4px;
  margin-bottom: 40px;
}

.status-bar {
  width: 100%;
  max-width: 400px;
  height: 3px;
  background: var(--color-gray-300);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 32px;
}

.status-bar-fill {
  height: 100%;
  width: 30%;
  background: var(--color-blue-500);
  border-radius: 2px;
  animation: statusSlide 1.5s ease-in-out infinite;
}

.status-bar-fill.paused {
  animation: none;
  background: var(--color-gray-500);
}

@keyframes statusSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--color-gray-600);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-dot {
  width: 8px;
  height: 8px;
  background: var(--color-blue-500);
  border-radius: 50%;
  animation: timerBlink 1s ease-in-out infinite;
}

.timer-dot.paused {
  animation: none;
  background: var(--color-gray-500);
}

@keyframes timerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.steps-wrapper {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.steps-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.4s ease;
}

.live-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: var(--color-white);
  border-radius: 12px;
  border: 1px solid var(--color-gray-400);
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.live-step.active {
  border-color: var(--color-blue-500);
  background: var(--color-blue-100);
}

.live-step.completed {
  border-color: var(--color-gray-400);
  background: var(--color-white);
  opacity: 0.7;
}

.live-step-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.live-step.active .live-step-indicator {
  background: var(--color-blue-500);
  color: white;
}

.live-step.completed .live-step-indicator {
  background: var(--color-green-500);
  color: white;
}

.live-step-indicator svg {
  width: 14px;
  height: 14px;
}

.live-step-content {
  flex: 1;
  min-width: 0;
}

.live-step-description {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-900);
  margin-bottom: 4px;
}

.live-step.active .live-step-description {
  color: var(--color-blue-500);
}

.live-step-meta {
  font-size: 12px;
  color: var(--color-gray-600);
}

.live-step.active .live-step-meta {
  color: var(--color-blue-500);
}

.typing-dots {
  display: inline-flex;
  gap: 3px;
}

.typing-dots span {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  animation: typing 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

.steps-count {
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-gray-600);
  text-align: center;
}

/* Investigation Templates */
.template-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.template-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--color-gray-400);
  background: var(--color-white);
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 250px;
  max-width: 300px;
  flex-shrink: 0;
}

.template-card:hover {
  background: var(--color-blue-100);
  border-color: var(--color-blue-500);
  box-shadow: 0 2px 8px rgba(54, 108, 217, 0.15);
}

.template-card:hover .template-title {
  color: var(--color-blue-500);
}

.template-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 6px;
  transition: color 0.15s ease;
}

.template-prompt {
  font-size: 13px;
  color: var(--color-gray-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Templates sidebar (wide screens) */
.templates-sidebar {
  display: none;
}

.templates-sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gray-600);
  padding-bottom: 12px;
}

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

.template-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid var(--color-gray-400);
  background: var(--color-white);
}

.template-sidebar-item:hover {
  background: var(--color-purple-50);
  border-color: var(--color-purple-500);
}

.template-sidebar-icon {
  width: 18px;
  height: 18px;
  color: var(--color-purple-500);
  flex-shrink: 0;
  margin-top: 1px;
}

.template-sidebar-content {
  flex: 1;
  min-width: 0;
}

.template-sidebar-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-gray-900);
  transition: color 0.15s ease;
}

.template-sidebar-item:hover .template-sidebar-item-title {
  color: var(--color-purple-500);
}

.template-sidebar-desc {
  font-size: 11px;
  color: var(--color-gray-700);
  margin-top: 2px;
  line-height: 1.4;
}

/* Templates collapsible box (narrow screens) */
.templates-box {
  margin-bottom: 24px;
  border: 1px solid var(--color-purple-100);
  border-radius: 10px;
  background: var(--color-purple-50);
  overflow: hidden;
}

.templates-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.templates-box-header:hover {
  background: var(--color-purple-100);
}

.templates-box-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.templates-box-header-icon {
  width: 20px;
  height: 20px;
  color: var(--color-purple-500);
}

.templates-box-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-purple-500);
}

.templates-box-count {
  font-size: 12px;
  color: var(--color-gray-700);
  background: var(--color-white);
  padding: 2px 8px;
  border-radius: 10px;
}

.templates-box-toggle {
  width: 18px;
  height: 18px;
  color: var(--color-purple-500);
  transition: transform 0.2s ease;
}

.templates-box.collapsed .templates-box-toggle {
  transform: rotate(-90deg);
}

.templates-box-content {
  border-top: 1px solid var(--color-purple-100);
}

.templates-box.collapsed .templates-box-content {
  display: none;
}

/* Template items in collapsible box */
.template-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border-bottom: 1px solid var(--color-purple-100);
}

.template-item:last-child {
  border-bottom: none;
}

.template-item:hover {
  background: var(--color-white);
}

.template-icon {
  width: 18px;
  height: 18px;
  color: var(--color-purple-500);
  flex-shrink: 0;
}

.template-item-content {
  flex: 1;
  min-width: 0;
}

.template-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-900);
  transition: color 0.15s ease;
}

.template-item:hover .template-item-title {
  color: var(--color-purple-500);
}

.template-item-desc {
  font-size: 12px;
  color: var(--color-gray-700);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-arrow {
  width: 16px;
  height: 16px;
  color: var(--color-gray-500);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.template-item:hover .template-arrow {
  opacity: 1;
  color: var(--color-purple-500);
}

@media (min-width: 1100px) {
  .templates-sidebar {
    display: block;
  }

  .templates-box {
    display: none;
  }
}

/* Export to PDF button */
.export-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--color-gray-500);
  border-radius: 6px;
  background: var(--color-white);
  color: var(--color-gray-800);
  font-size: var(--font-size-13);
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
  margin-left: 8px;
}

.export-pdf-btn:hover {
  background: var(--color-blue-100);
  border-color: var(--color-blue-300);
  color: var(--color-blue-700);
}

.export-pdf-btn .meta-icon {
  width: 14px;
  height: 14px;
}

/* Follow-up file warning */
.followup-file-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--color-red-100);
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-gray-800);
  line-height: 1.4;
}

.followup-file-warning svg {
  flex-shrink: 0;
  color: var(--color-gray-700);
}

/* Custom Metrics Picker */
.custom-metric-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px dashed var(--color-gray-500);
  border-radius: 8px;
  background: var(--color-white);
  font-family: var(--font-family-inter);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-gray-700);
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-metric-picker-btn:hover {
  border-color: var(--color-blue-500);
  color: var(--color-blue-500);
  background: var(--color-blue-100);
}

.custom-metrics-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.custom-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-family-inter);
  font-size: 13px;
  font-weight: 500;
}

.custom-metric-chip--selected {
  border: 1px solid var(--color-blue-500);
  background: var(--color-blue-200);
  color: var(--color-blue-700);
}

.custom-metric-chip__remove {
  width: 14px;
  height: 14px;
  cursor: pointer;
  color: var(--color-blue-500);
  transition: color 0.15s ease;
}

.custom-metric-chip__remove:hover {
  color: var(--color-blue-700);
}

/* Custom Metric Multi-Picker Dialog */
.custom-metric-multi-row {
  cursor: pointer;
  border-radius: 4px;
  padding-top: 6px;
  padding-bottom: 6px;
  transition: background 0.1s ease;
}

.custom-metric-multi-row:hover {
  background: var(--mud-palette-action-default-hover, rgba(0, 0, 0, 0.04));
}

/* =====================================================================
   Vendor categories (ADP-1691) — lives inside Vendor details panel on
   /scripts. Grouped by family with colour coding and per-chip tooltips.
   ===================================================================== */
.vendor-cat-mock-frame {
  max-width: 460px;
}

.vendor-cat-mock-card {
  background: var(--color-white);
}

.vendor-cat-mock-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--font-size-13);
  color: var(--color-gray-800);
  margin-bottom: 14px;
}

.vendor-cat-mock-tabs {
  display: inline-flex;
  border: 1px solid var(--color-gray-400);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-gray-200);
  margin-bottom: 14px;
}

.vendor-cat-mock-tab {
  padding: 6px 18px;
  font-size: var(--font-size-13);
  color: var(--color-gray-700);
  cursor: default;
}

.vendor-cat-mock-tab.is-active {
  background: var(--color-white);
  color: var(--color-gray-900);
  font-weight: var(--font-weight-13-semibold);
}

.vendor-cat-mock-chart-label {
  color: var(--color-gray-800);
  margin-bottom: 6px;
}

.vendor-cat-mock-chart-placeholder {
  height: 88px;
  background: linear-gradient(180deg, var(--color-blue-100), transparent 70%);
  border-bottom: 2px solid var(--color-blue-300);
  border-radius: 4px;
  position: relative;
}

.vendor-cat-mock-chart-placeholder::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--color-gray-400);
}

.vendor-cat-mock-divider {
  border: 0;
  border-top: 1px solid var(--color-gray-400);
  margin: 18px 0 14px;
}

/* The whole Categories block lives inside the Vendor details card,
   right below the Trends chart. Tight vertical spacing so it sits close
   to the chart without crowding it. */
.vendor-cat-section {
  margin-top: 8px;
  padding: 4px 0;
  /* Allow the panel to shrink below its content-determined width so chips wrap instead of triggering page scroll. */
  min-width: 0;
  overflow-wrap: anywhere;
}

.vendor-cat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

/* Match the Vendor details title (MudBlazor H4: 16px / 600 / gray-900). */
.vendor-cat-title.mud-typography-h4 {
  color: var(--color-gray-900);
}

.vendor-cat-loading {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.vendor-cat-empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border: 1px dashed var(--color-gray-400);
  border-radius: 8px;
  background: var(--color-gray-200);
}

.vendor-cat-empty-title {
  color: var(--color-gray-800);
  font-weight: var(--font-weight-13-semibold);
}

.vendor-cat-empty-hint {
  color: var(--color-gray-700);
}

.vendor-cat-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vendor-cat-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.vendor-cat-group-label {
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-12-semibold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-gray-800);
}

.vendor-cat-group-info.mud-icon-root {
  width: 14px;
  height: 14px;
  font-size: 14px;
  color: var(--color-gray-600);
  cursor: help;
}

.vendor-cat-group-count {
  margin-left: auto;
  font-size: var(--font-size-11);
  color: var(--color-gray-700);
  background: var(--color-gray-300);
  padding: 1px 8px;
  border-radius: 9px;
}

.vendor-cat-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 14px;
  min-width: 0;
  max-width: 100%;
}

.vendor-cat-group {
  min-width: 0;
}

.vendor-cat-group-header {
  flex-wrap: wrap;
}

/* Family dots (used in group headers) */
.vendor-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.vendor-cat-dot--ads { background: var(--color-yellow-400); }
.vendor-cat-dot--analytics { background: var(--color-blue-500); }
.vendor-cat-dot--infra { background: var(--color-gray-600); }
.vendor-cat-dot--commerce { background: var(--color-green-400); }
.vendor-cat-dot--social { background: var(--color-purple-500); }
.vendor-cat-dot--other { background: var(--color-gray-500); }

/* Chips */
.vendor-cat-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  font-size: 10px;
  font-weight: var(--font-weight-11-semibold);
  letter-spacing: 0.02em;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: help;
}

.vendor-cat-chip--ads {
  background: var(--color-yellow-100);
  color: var(--color-yellow-700);
  border-color: var(--color-yellow-100);
}

.vendor-cat-chip--analytics {
  background: var(--color-blue-200);
  color: var(--color-blue-700);
  border-color: var(--color-blue-200);
}

.vendor-cat-chip--infra {
  background: var(--color-gray-300);
  color: var(--color-gray-800);
  border-color: var(--color-gray-400);
}

.vendor-cat-chip--commerce {
  background: var(--color-green-100);
  color: var(--color-green-700);
  border-color: var(--color-green-100);
}

.vendor-cat-chip--social {
  background: var(--color-purple-100);
  color: var(--color-purple-500);
  border-color: var(--color-purple-100);
}

.vendor-cat-chip--other {
  background: var(--color-gray-200);
  color: var(--color-gray-700);
  border-color: var(--color-gray-400);
}
