﻿.portal-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}

.portal-filter-bar .form-select,
.portal-filter-bar .form-control {
  width: auto;
  min-width: 160px;
}

.portal-diy-table-wrap {
  max-height: calc(100vh - 22rem);
  min-height: 18rem;
}

.portal-diy-table {
  --bs-table-bg: transparent;
  min-width: 1340px;
}

.portal-diy-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--nemi-surface);
  color: var(--nemi-muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--nemi-glass-border);
}

.portal-diy-table td {
  vertical-align: top;
  border-color: var(--nemi-glass-border);
}

.portal-diy-select-col {
  width: 2.4rem;
  text-align: center;
}

.portal-diy-action-col {
  width: 3rem;
  text-align: center;
}

.portal-diy-coverage-cell {
  min-width: 320px;
  max-width: 440px;
}

.portal-diy-title {
  color: var(--nemi-ink);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: .2rem;
}

.portal-diy-meta {
  color: var(--nemi-muted);
  font-size: .78rem;
  line-height: 1.35;
}

.portal-diy-key-message {
  min-width: 220px;
  resize: vertical;
}

html[data-portal-theme="dark"] .portal-diy-table thead th {
  background: rgba(8, 24, 44, .94);
}

.portal-report-date-select {
  width: auto;
  min-width: 170px;
}

.portal-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .7rem;
  margin-bottom: .75rem;
}

.portal-search-header-actions,
.portal-search-primary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}

.portal-search-header-actions {
  flex: 1 1 640px;
  justify-content: flex-end;
  margin-left: auto;
  max-width: 780px;
}

.portal-search-primary-actions {
  justify-content: flex-start;
}

.portal-action-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: .5rem;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(10, 22, 40, .07);
  backdrop-filter: blur(12px) saturate(1.08);
}

.portal-action-icon i {
  font-size: 1rem;
}

.portal-action-icon.dropdown-toggle::after {
  display: none;
}

.portal-action-icon:hover,
.portal-action-icon:focus-visible {
  transform: translateY(-1px);
}

.portal-page-header .portal-saved-search-select {
  flex: 0 0 230px;
  width: 230px;
  max-width: 100%;
}

.portal-filter-bar,
.portal-smart-filter,
.portal-search-workbench {
  position: relative;
}

.portal-filter-bar {
  z-index: 30;
  overflow: visible;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .65rem;
  background: var(--nemi-surface);
  padding: .48rem;
  box-shadow: 0 12px 28px rgba(10, 22, 40, .06);
  backdrop-filter: blur(16px) saturate(1.08);
}

.portal-filter-fab {
  position: fixed;
  top: calc(58px + .65rem);
  right: .75rem;
  z-index: 1090;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(0, 168, 232, .34);
  border-radius: .55rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .62));
  color: var(--nemi-accent-2);
  box-shadow: 0 16px 34px rgba(10, 22, 40, .12);
  backdrop-filter: blur(16px) saturate(1.08);
  transition: transform .22s ease, opacity .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.portal-filter-fab:hover,
.portal-filter-fab:focus-visible {
  border-color: rgba(244, 118, 33, .52);
  box-shadow: 0 18px 38px rgba(0, 119, 182, .18);
  outline: 0;
  transform: translateY(-1px);
}

.portal-filter-fab-icon {
  position: relative;
  width: 20px;
  height: 16px;
  display: block;
}

.portal-filter-fab-icon::before,
.portal-filter-fab-icon::after,
.portal-filter-fab-icon span {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.portal-filter-fab-icon::before {
  top: 1px;
}

.portal-filter-fab-icon span {
  top: 7px;
  left: 5px;
}

.portal-filter-fab-icon::after {
  bottom: 1px;
  right: 6px;
}

.portal-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  pointer-events: none;
  background: rgba(7, 17, 31, .34);
  opacity: 0;
  transition: opacity .24s ease;
}

.portal-filter-open .portal-filter-backdrop {
  pointer-events: auto;
  opacity: 1;
}

body.portal-filter-open {
  overflow: hidden;
}

.portal-filter-open .portal-filter-fab {
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
}

.portal-filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  width: min(420px, calc(100vw - 1rem));
  display: grid;
  align-content: start;
  gap: .72rem;
  overflow-y: auto;
  border-width: 0 0 0 1px;
  border-radius: 0;
  padding: 1rem;
  pointer-events: none;
  transform: translateX(calc(100% + 28px));
  box-shadow: -26px 0 52px rgba(10, 22, 40, .18);
  transition: transform .3s cubic-bezier(.2, .72, .22, 1), box-shadow .3s ease;
}

.portal-filter-drawer.is-open {
  pointer-events: auto;
  transform: translateX(0);
}

.portal-filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 .15rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--nemi-border);
}

.portal-filter-drawer-kicker {
  display: block;
  color: var(--nemi-muted);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-filter-drawer-title {
  display: block;
  color: var(--nemi-text);
  font-size: 1rem;
  font-weight: 900;
}

.portal-filter-drawer-close {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface-soft);
  color: var(--nemi-muted);
  font-size: 1.25rem;
  line-height: 1;
}

.portal-filter-drawer-close:hover,
.portal-filter-drawer-close:focus-visible {
  color: var(--nemi-accent-2);
  border-color: rgba(0, 168, 232, .44);
  outline: 0;
}

.portal-filter-drawer .form-select,
.portal-filter-drawer .form-control,
.portal-filter-drawer .portal-multiselect,
.portal-filter-drawer .portal-report-date-select {
  width: 100%;
  min-width: 0;
}

.portal-filter-drawer > .btn,
.portal-filter-drawer > button,
.portal-filter-drawer .d-flex > .btn {
  width: 100%;
}

.portal-filter-drawer .row {
  --bs-gutter-x: 0;
  --bs-gutter-y: .65rem;
  display: grid;
  grid-template-columns: 1fr;
}

.portal-filter-drawer [class*="col-"] {
  width: 100%;
  max-width: 100%;
  padding-right: 0;
  padding-left: 0;
}

.portal-filter-drawer .d-flex {
  display: grid !important;
  gap: .65rem !important;
}

.portal-filter-drawer .ms-auto {
  margin-left: 0 !important;
}

.portal-filter-drawer .dropdown-menu {
  z-index: 1225;
}

body.modal-open .portal-filter-fab,
body.modal-open .portal-filter-backdrop,
body.modal-open .portal-filter-drawer {
  pointer-events: none !important;
}

body.modal-open .portal-filter-fab,
body.modal-open .portal-filter-backdrop {
  opacity: 0 !important;
}

.modal-backdrop {
  z-index: 1590;
}

.modal {
  z-index: 1600;
}

.modal .dropdown-menu {
  z-index: 1610;
}

html[data-portal-theme="dark"] .portal-filter-fab {
  background: linear-gradient(135deg, rgba(12, 28, 50, .92), rgba(15, 35, 62, .68));
  box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

html[data-portal-theme="dark"] .portal-filter-backdrop {
  background: rgba(0, 0, 0, .54);
}

.portal-widget-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: .55rem;
}

.portal-widget {
  min-height: 260px;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: var(--nemi-surface);
}

.portal-configurable-widget {
  position: relative;
  overflow: visible;
}

.portal-configurable-widget:hover,
.portal-configurable-widget:focus-within {
  z-index: 1350;
}

.portal-configurable-widget > .card-header {
  padding: .52rem .68rem;
}

.portal-configurable-widget > .card-body {
  padding: .58rem .68rem 1.55rem;
}

.portal-widget-graphic-deep {
  border-color: rgba(96, 165, 250, .2) !important;
  background:
    radial-gradient(circle at 78% 16%, rgba(0, 168, 232, .18), transparent 32%),
    linear-gradient(135deg, #171b3f, #262849) !important;
  color: #f8fbff;
}

.portal-widget-graphic-deep .card-header,
.portal-widget-graphic-deep .card-body,
.portal-widget-graphic-deep .list-group-item {
  background: transparent !important;
  color: rgba(248, 251, 255, .9);
}

.portal-widget-graphic-deep .text-muted,
.portal-widget-graphic-deep .small,
.portal-widget-graphic-deep .portal-signal-row span,
.portal-widget-graphic-deep .portal-source-row span {
  color: rgba(232, 242, 255, .7) !important;
}

.portal-widget-graphic-deep .portal-metric,
.portal-widget-graphic-deep h2,
.portal-widget-graphic-deep .h6,
.portal-widget-graphic-deep .portal-signal-row strong {
  color: #fff !important;
}

.portal-widget-graphic-glass {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .48)),
    linear-gradient(140deg, rgba(0, 168, 232, .1), rgba(244, 118, 33, .08)) !important;
  box-shadow: 0 18px 42px rgba(10, 22, 40, .09);
  backdrop-filter: blur(16px);
}

.portal-widget-graphic-contrast {
  border-color: rgba(10, 22, 40, .55) !important;
  box-shadow: inset 4px 0 0 var(--nemi-accent), 0 16px 38px rgba(10, 22, 40, .08);
}

.portal-widget-graphic-minimal {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.portal-widget-placement-hero .portal-metric {
  font-size: 1.95rem;
}

.portal-widget-placement-compact > .card-body {
  padding: .42rem .55rem 1.35rem;
}

.portal-widget-placement-chart-first .card-body {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: .7rem;
}

.portal-widget-actions {
  position: absolute;
  top: .32rem;
  right: .38rem;
  bottom: auto;
  left: auto;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  opacity: .86;
  transform: none;
  transition: opacity .18s ease;
}

.portal-configurable-widget:hover .portal-widget-actions,
.portal-widget-actions:focus-within {
  opacity: 1;
}

.portal-widget-options-button {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: .35rem;
  background: transparent;
  color: rgba(100, 116, 139, .78);
  line-height: 1;
}

.portal-widget-options-button::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.portal-widget-options-button:hover,
.portal-widget-options-button:focus-visible,
.portal-widget-options-button[aria-expanded="true"] {
  color: var(--nemi-accent-2);
  background: rgba(0, 168, 232, .08);
  outline: 0;
}

.portal-widget-menu {
  min-width: 11rem;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .48rem;
  background: var(--nemi-surface-strong);
  box-shadow: 0 18px 44px rgba(10, 22, 40, .18);
  padding: .3rem;
  z-index: 1280;
}

.portal-widget-menu .dropdown-item {
  border-radius: .32rem;
  color: var(--nemi-text);
  font-size: .76rem;
  font-weight: 750;
  padding: .36rem .5rem;
}

.portal-widget-menu .dropdown-item:hover,
.portal-widget-menu .dropdown-item:focus {
  background: rgba(0, 168, 232, .1);
  color: var(--nemi-accent-2);
}

.portal-widget-move-handle {
  cursor: grab;
}

.portal-widget-move-handle:active {
  cursor: grabbing;
}

.portal-configurable-widget > .card-header,
.portal-configurable-widget .portal-generic-widget-head,
.portal-configurable-widget .card-body > .d-flex.justify-content-between.align-items-start {
  padding-right: 2rem;
}

.portal-configurable-widget .badge[data-widget-badge] {
  margin-right: 1.35rem;
}

.portal-widget-resize-handle {
  position: absolute;
  right: .35rem;
  bottom: .35rem;
  width: 18px;
  height: 18px;
  border-right: 2px solid rgba(13, 31, 60, .32);
  border-bottom: 2px solid rgba(13, 31, 60, .32);
  cursor: nwse-resize;
  z-index: 2;
  opacity: .42;
  transition: opacity .18s ease, border-color .18s ease;
}

.portal-widget-resize-handle::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(13, 31, 60, .22);
  border-bottom: 2px solid rgba(13, 31, 60, .22);
}

.portal-configurable-widget:hover .portal-widget-resize-handle,
.portal-widget-resize-handle:focus-visible {
  opacity: .86;
  border-color: rgba(0, 119, 182, .44);
}

.portal-widget-remove-button {
  position: relative;
}

.portal-widget-remove-button::before,
.portal-widget-remove-button::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 1.7px;
  border-radius: .2rem;
  background: currentColor;
}

.portal-widget-remove-button::before {
  transform: rotate(45deg);
}

.portal-widget-remove-button::after {
  transform: rotate(-45deg);
}

.portal-widget-remove-button:hover,
.portal-widget-remove-button:focus-visible {
  color: var(--nemi-orange);
  background: transparent;
}

.portal-widget-configure-button {
  position: relative;
}

.portal-widget-configure-button::before {
  content: "";
  width: 12px;
  height: 12px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 999px;
  box-shadow:
    0 -5px 0 -3px currentColor,
    0 5px 0 -3px currentColor,
    5px 0 0 -3px currentColor,
    -5px 0 0 -3px currentColor;
}

.portal-widget-settings-popover {
  position: absolute;
  z-index: 1240;
  width: min(304px, calc(100vw - 32px));
  display: grid;
  gap: .55rem;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .58rem;
  background: var(--nemi-surface-strong);
  box-shadow: 0 22px 54px rgba(10, 22, 40, .2);
  padding: .75rem;
}

.portal-widget-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--nemi-border);
}

.portal-widget-settings-head strong {
  color: var(--nemi-text);
  font-size: .86rem;
}

.portal-widget-settings-head button {
  width: 24px;
  height: 24px;
  position: relative;
  border: 0;
  background: transparent;
  color: var(--nemi-muted);
}

.portal-widget-settings-head button::before,
.portal-widget-settings-head button::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 6px;
  width: 12px;
  height: 1.6px;
  background: currentColor;
}

.portal-widget-settings-head button::before {
  transform: rotate(45deg);
}

.portal-widget-settings-head button::after {
  transform: rotate(-45deg);
}

.portal-widget-settings-popover label {
  display: grid;
  gap: .2rem;
  color: var(--nemi-muted);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-widget-settings-popover select,
.portal-widget-settings-popover input[type="number"] {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .35rem;
  background: var(--nemi-surface);
  color: var(--nemi-text);
  font-size: .78rem;
  padding: .36rem .45rem;
}

.portal-widget-settings-note,
.report-chart-lock-note {
  border: 1px solid rgba(var(--bs-info-rgb), .28);
  border-radius: .42rem;
  background: rgba(var(--bs-info-rgb), .08);
  color: var(--nemi-muted);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.35;
  padding: .48rem .55rem;
}

.portal-widget-settings-popover select:disabled,
.portal-widget-settings-popover input:disabled {
  opacity: .68;
  cursor: not-allowed;
}

.portal-widget-settings-checks {
  display: flex;
  gap: .75rem;
}

.portal-widget-settings-checks label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  text-transform: none;
}

.portal-widget-settings-foot {
  color: var(--nemi-muted);
  font-size: .72rem;
}

.portal-widget-resizing,
.portal-widget-resizing *,
.portal-widget-reordering,
.portal-widget-reordering * {
  cursor: nwse-resize !important;
  user-select: none;
}

.portal-widget-reordering,
.portal-widget-reordering * {
  cursor: grabbing !important;
}

.portal-widget-column-dragging {
  opacity: .45;
}

.portal-widget-drilldown .portal-widget-drilldown-target,
.portal-widget-drilldown [data-chart-drilldown-url],
.portal-widget-drilldown .portal-signal-row,
.portal-widget-drilldown .portal-source-row,
.portal-widget-drilldown .portal-dashboard-insight-row {
  cursor: pointer;
}

.portal-widget-loading {
  overflow: visible;
}

.portal-widget-loading::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 18;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 0 36%, rgba(255, 255, 255, .22) 47%, transparent 58% 100%);
  background-size: 220% 100%;
  background-position: 140% 0;
  opacity: .55;
  animation: portal-widget-sheen 1.35s ease-in-out infinite;
}

.portal-widget-loading > .card-body {
  opacity: .82;
  transition: opacity .18s ease;
}

html[data-portal-theme="dark"] .portal-widget-loading::after {
  background: linear-gradient(110deg, transparent 0 32%, rgba(95, 178, 235, .14) 45%, transparent 58% 100%);
  background-size: 220% 100%;
  background-position: 140% 0;
}

@keyframes portal-widget-sheen {
  to {
    background-position: -40% 0;
  }
}

.portal-widget-library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .55rem;
}

.portal-widget-library-item {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .25rem;
  text-align: left;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: var(--nemi-surface);
  padding: .5rem .58rem;
  box-shadow: 0 10px 24px rgba(10, 22, 40, .05);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.portal-widget-library-item input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0 .22rem 0 0;
  accent-color: var(--nemi-accent);
}

.portal-widget-library-item:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--bs-primary-rgb), .42);
}

.portal-widget-library-copy {
  min-width: 0;
  display: grid;
  gap: .12rem;
}

.portal-widget-library-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-widget-library-item span {
  color: var(--nemi-accent-2);
  font-size: .78rem;
  font-weight: 700;
}

.portal-widget-library-copy > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-widget-admin-panel {
  color: var(--nemi-body);
}

.portal-widget-admin-panel > summary {
  width: fit-content;
  cursor: pointer;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface);
  color: var(--nemi-muted);
  padding: .4rem .68rem;
  font-size: .78rem;
  font-weight: 800;
  list-style: none;
  box-shadow: 0 10px 24px rgba(10, 22, 40, .05);
}

.portal-widget-admin-panel > summary::-webkit-details-marker {
  display: none;
}

.portal-widget-admin-panel > summary:hover,
.portal-widget-admin-panel[open] > summary {
  color: var(--nemi-accent-2);
  border-color: rgba(0, 168, 232, .42);
}

.portal-widget-library-item em {
  justify-self: end;
  border-radius: .35rem;
  background: rgba(100, 116, 139, .13);
  color: var(--nemi-muted);
  padding: .18rem .5rem;
  font-size: .72rem;
  font-style: normal;
  font-weight: 800;
}

.portal-widget-library-item-active {
  border-color: rgba(0, 168, 232, .55);
  background: linear-gradient(135deg, rgba(0, 168, 232, .11), rgba(244, 118, 33, .06));
}

.portal-widget-library-item-active em {
  background: rgba(0, 168, 232, .16);
  color: var(--nemi-accent-2);
}

.portal-dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  z-index: 50;
  overflow: visible;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .65rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .54)),
    linear-gradient(120deg, rgba(0, 168, 232, .14), rgba(244, 118, 33, .08));
  padding: .72rem .82rem .78rem;
  box-shadow: 0 18px 44px rgba(10, 22, 40, .08);
  backdrop-filter: blur(18px) saturate(1.08);
}

html[data-portal-theme="dark"] .portal-dashboard-hero {
  background:
    linear-gradient(135deg, rgba(10, 24, 43, .86), rgba(13, 31, 60, .7)),
    linear-gradient(120deg, rgba(16, 184, 244, .11), rgba(255, 138, 61, .08));
}

.portal-dashboard-hero::after {
  content: "";
  position: absolute;
  left: .82rem;
  right: .82rem;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nemi-accent), var(--nemi-orange));
  opacity: .78;
}

.portal-dashboard-hero h1 {
  color: var(--nemi-text);
  font-weight: 900;
  letter-spacing: 0;
  font-size: 1.55rem;
}

.portal-dashboard-title {
  min-width: 0;
}

.portal-dashboard-title p {
  max-width: 720px;
  font-size: 12px;
}

.portal-dashboard-actions {
  position: relative;
  z-index: 1055;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .32rem;
}

.portal-dashboard-actions .dropdown-menu {
  z-index: 1060;
  margin-top: .4rem !important;
  border-radius: .45rem;
  box-shadow: 0 18px 42px rgba(10, 22, 40, .16);
}

.portal-dashboard-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: fit-content;
  max-width: 100%;
  margin: -.35rem 0 .55rem;
  border: 1px solid var(--nemi-glass-border);
  border-radius: 999px;
  background: var(--nemi-surface);
  color: var(--nemi-muted);
  padding: .24rem .52rem;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(10, 22, 40, .05);
  backdrop-filter: blur(14px);
}

.portal-status-dot {
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: var(--nemi-accent);
  box-shadow: 0 0 0 .18rem rgba(0, 168, 232, .14);
}

.portal-dashboard-filter-bar {
  gap: .4rem;
  padding: .42rem;
  margin-bottom: .75rem !important;
}

.portal-dashboard-filter-bar .form-select,
.portal-dashboard-filter-bar .form-control {
  min-width: 150px;
}

.portal-multiselect {
  min-width: 160px;
}

.portal-multiselect-toggle {
  width: 100%;
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: .55rem;
  border-color: rgba(0, 168, 232, .28);
  background:
    linear-gradient(135deg, rgba(0, 168, 232, .08), rgba(244, 118, 33, .04)),
    var(--nemi-field-bg);
  color: var(--nemi-field-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 8px 18px rgba(10, 22, 40, .04);
  font-weight: 700;
  text-align: left;
}

.portal-multiselect-toggle::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 168, 232, .48);
  border-radius: .24rem;
  background:
    linear-gradient(135deg, rgba(0, 168, 232, .22), rgba(244, 118, 33, .1)),
    rgba(255, 255, 255, .52);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .54);
}

.portal-multiselect-toggle::after {
  margin-left: auto;
}

.portal-multiselect-toggle:hover,
.portal-multiselect-toggle:focus-visible,
.portal-multiselect-toggle.show {
  border-color: rgba(0, 168, 232, .58);
  background:
    linear-gradient(135deg, rgba(0, 168, 232, .13), rgba(244, 118, 33, .07)),
    var(--nemi-field-bg);
  color: var(--nemi-text);
  box-shadow: 0 0 0 .16rem rgba(0, 168, 232, .09), 0 10px 22px rgba(10, 22, 40, .07);
}

.portal-multiselect-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-multiselect-menu {
  z-index: 1080;
  min-width: 210px;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface-strong);
  box-shadow: 0 18px 42px rgba(10, 22, 40, .14);
  backdrop-filter: blur(16px);
}

.portal-multiselect-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--nemi-body);
  font-size: 12px;
  font-weight: 700;
  padding: .46rem .72rem;
}

.portal-multiselect-menu .dropdown-item:hover {
  background: rgba(var(--bs-primary-rgb), .08);
  color: var(--nemi-text);
}

.portal-multiselect-menu .form-check-input {
  margin-top: 0;
}

.portal-multiselect-menu .form-check-input:checked {
  border-color: var(--nemi-accent);
  background-color: var(--nemi-accent);
}

#dashboardTrendSearchInput {
  flex: 1 1 260px;
}

.portal-ml-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin-bottom: .75rem !important;
}

.portal-ml-card {
  min-width: 0;
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: .38rem;
  overflow: hidden;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .58rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .48)),
    linear-gradient(140deg, rgba(0, 168, 232, .12), rgba(244, 118, 33, .06));
  padding: .62rem;
  box-shadow: 0 18px 42px rgba(10, 22, 40, .08);
  backdrop-filter: blur(18px) saturate(1.08);
}

html[data-portal-theme="dark"] .portal-ml-card {
  background:
    linear-gradient(135deg, rgba(10, 24, 43, .82), rgba(13, 31, 60, .64)),
    linear-gradient(140deg, rgba(16, 184, 244, .12), rgba(255, 138, 61, .07));
}

.portal-ml-card-primary {
  position: relative;
}

.portal-ml-card-primary::after {
  content: "";
  position: absolute;
  inset: auto .9rem 0 .9rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nemi-accent), var(--nemi-orange));
  opacity: .78;
}

.portal-ml-kicker {
  color: var(--nemi-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.portal-ml-headline,
.portal-ml-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-text);
  font-size: 1rem;
  line-height: 1.12;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-ml-card-primary .portal-ml-headline {
  font-size: 1.18rem;
}

.portal-ml-card p,
.portal-ml-card span,
.portal-ml-foot {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-muted);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.portal-ml-card p {
  display: -webkit-box;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.portal-ml-card > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.portal-ml-meter,
.portal-ml-split {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, .14);
}

.portal-ml-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--nemi-accent), var(--nemi-accent-2));
  transition: width .35s ease;
}

.portal-ml-meter-warm span {
  background: linear-gradient(90deg, var(--nemi-accent), var(--nemi-orange));
}

.portal-ml-split {
  display: flex;
}

.portal-ml-split i,
.portal-ml-split b {
  display: block;
  height: 100%;
  transition: width .35s ease;
}

.portal-ml-split i {
  background: var(--nemi-accent);
}

.portal-ml-split b {
  background: var(--nemi-orange);
}

.portal-ml-sparkline {
  height: 32px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: .26rem;
}

.portal-ml-sparkline span {
  display: block;
  min-height: 5px;
  border-radius: .22rem .22rem 0 0;
  background: linear-gradient(180deg, var(--nemi-accent), var(--nemi-accent-2));
}

.portal-ml-sparkline span[data-hot="true"] {
  background: linear-gradient(180deg, var(--nemi-orange), #ffb36b);
}

#dashboardWidgetGrid {
  --dashboard-gap: .55rem;
  --bs-gutter-x: .55rem;
  --bs-gutter-y: .55rem;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: .75rem !important;
}

#dashboardWidgetGrid > [class*="col-"] {
  min-width: 0;
}

#dashboardWidgetGrid .portal-card {
  min-width: 0;
}

#dashboardWidgetGrid .card-body,
#dashboardWidgetGrid .card-header,
#dashboardWidgetGrid [data-widget-list],
#dashboardWidgetGrid [data-widget-source-leaders],
#dashboardWidgetGrid .vstack,
#dashboardWidgetGrid .row {
  min-width: 0;
}

#dashboardWidgetGrid .card-body {
  overflow: hidden;
  padding-bottom: 2rem;
}

#dashboardWidgetGrid .portal-echarts-widget,
#dashboardWidgetGrid .portal-echarts-widget > .card-body,
#dashboardWidgetGrid .portal-echarts-widget .portal-dashboard-chart-surface,
#dashboardWidgetGrid .portal-echarts-widget .portal-echarts {
  overflow: hidden;
}

#dashboardWidgetGrid .portal-echarts-widget:hover,
#dashboardWidgetGrid .portal-echarts-widget:focus-within {
  position: relative;
  z-index: 1350;
}

#dashboardWidgetGrid .card-body > .d-flex.justify-content-between.align-items-start {
  min-width: 0;
  gap: .7rem !important;
}

#dashboardWidgetGrid .card-body > .d-flex.justify-content-between.align-items-start > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

#dashboardWidgetGrid [data-widget-subtitle] {
  min-width: 0;
  overflow: visible;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

#dashboardWidgetGrid .portal-echarts-widget [data-widget-subtitle] {
  flex: 0 0 auto;
  min-height: 1.22rem;
  margin-top: .18rem !important;
  margin-bottom: .48rem;
  line-height: 1.45;
}

.portal-chart-surface {
  width: 100%;
  min-height: 190px;
}

.portal-metric {
  font-size: 1.48rem;
  line-height: 1.1;
  font-weight: 800;
  color: var(--nemi-text);
}

.portal-configurable-widget .badge[data-widget-badge] {
  flex: 0 0 auto;
  max-width: min(8.5rem, 42%);
  overflow: hidden;
  border: 1px solid rgba(var(--bs-primary-rgb), .22);
  border-radius: .3rem;
  background: linear-gradient(135deg, rgba(0, 168, 232, .88), rgba(0, 119, 182, .86)) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(0, 119, 182, .16);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: .2rem .42rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-generic-widget-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .45rem;
  margin-bottom: .2rem;
}

.portal-generic-widget-head > div {
  min-width: 0;
}

.portal-generic-widget-head h2 {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-text);
  font-size: 1rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-generic-chart {
  width: 100%;
  min-width: 0;
  min-height: 210px;
}

.portal-generic-insight-list {
  margin-bottom: 0;
  max-height: none;
  overflow: visible;
  padding-right: .35rem;
  padding-bottom: 1.1rem;
}

.portal-dashboard-insight-row {
  min-height: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .55rem;
  padding: .34rem .48rem;
  line-height: 1.25;
}

.portal-dashboard-insight-row:last-child {
  margin-bottom: .3rem;
}

.portal-dashboard-insight-row span {
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.portal-dashboard-insight-row strong {
  flex: 0 0 auto;
  min-width: max-content;
  max-width: none;
  overflow: visible;
  justify-self: end;
  text-align: right;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-dashboard-insight-row small,
.portal-dashboard-insight-row i {
  display: none;
}

.portal-spark-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: .28rem;
  height: 46px;
}

.portal-spark-bars span {
  position: relative;
  display: block;
  min-height: 8px;
  border-radius: .25rem .25rem 0 0;
  background: linear-gradient(180deg, var(--nemi-accent), var(--nemi-accent-2));
}

.portal-spark-bars strong {
  position: absolute;
  top: -.95rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--nemi-text);
  font-size: .62rem;
  white-space: nowrap;
}

.portal-spark-bars em {
  position: absolute;
  right: 0;
  bottom: -1.05rem;
  left: 0;
  overflow: hidden;
  color: var(--nemi-muted);
  font-size: .58rem;
  font-style: normal;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-dashboard-chart-surface {
  align-self: stretch;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.portal-dashboard-chart-surface.portal-echarts-active {
  display: block !important;
  width: 100%;
  min-height: 118px;
  padding: 0 !important;
  position: relative;
  z-index: 4;
  overflow: hidden;
  background: transparent !important;
}

.portal-chart-surface.portal-echarts-active {
  min-height: 220px;
}

.portal-echarts-widget {
  display: flex;
  flex-direction: column;
}

.portal-echarts-widget > .card-body {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portal-echarts-widget > .card-body > .portal-dashboard-chart-surface.portal-echarts-active {
  flex: 1 1 auto;
}

.portal-echarts-widget > .card-body > .portal-generic-chart.portal-echarts-active {
  flex: 0 0 auto;
  height: clamp(180px, 34%, 260px);
  min-height: 180px;
  max-height: 260px;
  margin-top: .2rem !important;
  overflow: hidden;
}

.portal-widget-placement-compact.portal-echarts-widget > .card-body > .portal-generic-chart.portal-echarts-active {
  height: 160px;
  flex-basis: 160px;
  min-height: 160px;
  max-height: 160px;
}

.portal-widget-placement-hero.portal-echarts-widget > .card-body > .portal-generic-chart.portal-echarts-active {
  height: 220px;
  flex-basis: 220px;
  min-height: 220px;
  max-height: 220px;
}

.portal-echarts {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 112px;
  margin: 0;
  overflow: hidden;
}

.portal-echarts-html-legend {
  position: absolute;
  right: .25rem;
  bottom: .15rem;
  left: .25rem;
  z-index: 18;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .28rem .55rem;
  max-height: 2.6rem;
  overflow: hidden;
  pointer-events: auto;
}

.portal-echarts-html-legend-item {
  display: inline-flex;
  min-width: 0;
  max-width: 10.5rem;
  align-items: center;
  gap: .28rem;
  border: 0;
  background: transparent;
  color: var(--nemi-text);
  font-size: .72rem;
  font-weight: 750;
  line-height: 1.15;
  padding: .06rem 0;
  text-align: left;
}

.portal-echarts-html-legend-item i {
  flex: 0 0 auto;
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
}

.portal-echarts-html-legend-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-echarts-html-legend-item.is-muted {
  opacity: .42;
}

.portal-echarts-html-legend-item:hover,
.portal-echarts-html-legend-item:focus-visible {
  color: var(--nemi-accent-2);
}

.portal-echarts > div {
  flex: 1 1 auto;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  margin: 0 auto;
  overflow: hidden;
}

.portal-echarts canvas,
.portal-echarts > div {
  width: 100% !important;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

.portal-echarts canvas {
  display: block;
  height: 100% !important;
}

.portal-echarts .portal-chart-tooltip,
.portal-chart-tooltip {
  z-index: 1400 !important;
  border: 1px solid var(--nemi-border) !important;
  border-radius: .38rem !important;
  box-shadow: 0 14px 32px rgba(10, 22, 40, .22) !important;
  pointer-events: none;
  max-width: min(260px, calc(100vw - 2rem)) !important;
  white-space: normal !important;
}

.portal-chart-tooltip {
  display: grid;
  gap: .18rem;
  min-width: 128px;
  max-width: 240px;
  padding: .45rem .55rem;
  color: var(--nemi-text);
  font-size: 11px;
  line-height: 1.25;
}

.portal-chart-tooltip strong,
.portal-chart-tooltip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.portal-spark-bars.portal-dashboard-chart-surface {
  margin-top: .5rem;
}

.portal-echarts-status {
  width: 100%;
  min-height: 112px;
  display: grid;
  place-items: center;
  text-align: center;
}

.portal-chart-surface .portal-echarts-status {
  min-height: 210px;
}

.portal-dashboard-chart-table,
.portal-dashboard-chart-horizontal,
.portal-dashboard-chart-heatmap,
.portal-dashboard-chart-donut,
.portal-dashboard-chart-column {
  display: grid !important;
  height: auto !important;
}

.portal-dashboard-chart-column {
  grid-template-columns: repeat(auto-fit, minmax(28px, 48px));
  align-items: end;
  justify-content: center;
  gap: .48rem;
  min-height: 76px;
  padding: 1rem .25rem 1.1rem;
}

.portal-dashboard-chart-column span {
  position: relative;
  display: block;
  min-height: 10px;
  border-radius: .25rem .25rem 0 0;
  background: linear-gradient(180deg, var(--nemi-accent), var(--nemi-accent-2));
}

.portal-dashboard-chart-column strong {
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--nemi-text);
  font-size: .62rem;
  white-space: nowrap;
}

.portal-dashboard-chart-column em {
  position: absolute;
  right: 0;
  bottom: -1.05rem;
  left: 0;
  overflow: hidden;
  color: var(--nemi-muted);
  font-size: .58rem;
  font-style: normal;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-chart-surface.portal-dashboard-chart-column {
  grid-template-columns: repeat(auto-fit, minmax(44px, 68px));
  align-content: center;
  min-height: 240px;
  padding: 1.25rem 1rem 1.45rem;
}

.portal-dashboard-chart-table {
  align-content: center;
  justify-items: center;
  min-height: 120px;
}

.portal-chart-surface.portal-dashboard-chart-table {
  min-height: 240px;
}

.portal-widget-data-table {
  width: min(100%, 460px);
  border-collapse: collapse;
  font-size: 11px;
}

.portal-widget-data-table th,
.portal-widget-data-table td {
  border-bottom: 1px solid var(--nemi-border);
  padding: .25rem .2rem;
  text-align: left;
}

.portal-dashboard-chart-horizontal {
  align-items: stretch !important;
  align-content: center;
  gap: .32rem !important;
  min-height: 112px;
}

.portal-dashboard-chart-horizontal div {
  display: grid;
  grid-template-columns: minmax(82px, .8fr) minmax(80px, 1.4fr) auto;
  align-items: center;
  gap: .5rem;
}

.portal-dashboard-chart-horizontal span,
.portal-dashboard-chart-horizontal strong {
  overflow: hidden;
  color: var(--nemi-text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-dashboard-chart-horizontal i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nemi-accent), var(--nemi-orange));
}

.portal-dashboard-chart-line {
  position: relative;
  min-height: 130px;
  border-radius: .5rem;
  background:
    linear-gradient(180deg, rgba(0, 168, 232, .12), rgba(0, 168, 232, .03)),
    repeating-linear-gradient(0deg, transparent 0 43px, var(--nemi-border) 43px 44px);
}

.portal-chart-surface.portal-dashboard-chart-line {
  min-height: 130px;
}

.portal-dashboard-chart-line span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--nemi-orange);
  box-shadow: 0 0 0 5px rgba(244, 118, 33, .14);
}

.portal-dashboard-chart-area::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 68%;
  background: linear-gradient(180deg, rgba(0, 168, 232, .28), rgba(0, 168, 232, .02));
  clip-path: polygon(0 75%, 18% 48%, 36% 62%, 54% 34%, 72% 46%, 100% 22%, 100% 100%, 0 100%);
}

.portal-dashboard-chart-3d span {
  border-radius: .1rem .1rem 0 0;
  background: linear-gradient(120deg, #7be7f0 0%, var(--nemi-accent) 45%, var(--nemi-accent-2) 100%);
  box-shadow: inset -7px 0 0 rgba(10, 22, 40, .14), 7px 7px 0 rgba(10, 22, 40, .1);
  transform: skewY(-3deg);
}

.portal-dashboard-chart-heatmap {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-content: center;
  gap: .5rem !important;
  min-height: 132px;
}

.portal-chart-surface.portal-dashboard-chart-heatmap {
  min-height: 212px;
}

.portal-dashboard-chart-heatmap span {
  min-height: 62px;
  display: grid;
  align-content: space-between;
  border: 1px solid rgba(var(--bs-primary-rgb), .14);
  border-radius: .42rem;
  background: rgba(0, 168, 232, calc(var(--heat) * .32));
  color: var(--nemi-text);
  font-size: .72rem;
  padding: .45rem;
}

.portal-dashboard-chart-heatmap strong {
  color: var(--nemi-accent-2);
}

.portal-dashboard-chart-donut {
  align-content: center;
  justify-items: center;
  gap: .8rem;
  min-height: 150px;
}

.portal-chart-surface.portal-dashboard-chart-donut {
  min-height: 220px;
}

.portal-widget-donut-preview {
  width: clamp(144px, 38%, 220px);
  aspect-ratio: 1;
  margin: 0;
  border-radius: 999px;
  position: relative;
}

.portal-media-mix-chart .portal-widget-donut-preview {
  width: clamp(170px, 42%, 236px);
}

.portal-widget-donut-preview::after {
  content: "";
  position: absolute;
  inset: 25%;
  border-radius: inherit;
  background: var(--nemi-surface-strong);
}

.portal-widget-pie-preview::after {
  display: none;
}

.portal-widget-mini-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .35rem;
  margin-top: .55rem;
  width: min(100%, 440px);
}

.portal-widget-mini-legend span {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-text);
  font-size: .7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-widget-mini-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: .28rem;
  border-radius: 999px;
}

.portal-media-mix-row,
.portal-timeline-breakdown-item {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  gap: .16rem;
  overflow: hidden;
  border: 1px solid rgba(var(--bs-primary-rgb), .16);
  border-radius: .42rem;
  background: rgba(255, 255, 255, .58);
  color: var(--nemi-text);
  padding: .42rem .5rem .5rem;
  text-align: left;
}

.portal-media-mix-row {
  border-color: rgba(var(--bs-primary-rgb), .22);
  cursor: pointer;
}

.portal-media-mix-row:hover,
.portal-media-mix-row:focus-visible {
  border-color: rgba(var(--bs-primary-rgb), .52);
  box-shadow: 0 8px 18px rgba(0, 168, 232, .12);
  outline: 0;
}

.portal-media-mix-row span,
.portal-timeline-breakdown-item span {
  overflow: hidden;
  color: var(--nemi-text);
  font-size: .72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-media-mix-row strong,
.portal-timeline-breakdown-item strong {
  color: var(--nemi-accent-2);
  font-size: .72rem;
  font-weight: 900;
}

.portal-media-mix-row small,
.portal-timeline-breakdown-item small {
  overflow: hidden;
  color: var(--nemi-muted);
  font-size: .66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-media-mix-row i {
  display: block;
  width: 0;
  max-width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nemi-accent), var(--nemi-orange));
}

.portal-timeline-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .4rem;
}

.portal-widget-explainer {
  margin: .35rem 0 0;
  color: var(--nemi-muted);
  font-size: .72rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.portal-widget-details-modal {
  display: grid;
  gap: .75rem;
}

.portal-widget-detail-intro {
  margin: 0;
  color: var(--nemi-muted);
  font-size: .9rem;
  line-height: 1.55;
}

.portal-widget-detail-section {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .55rem;
  background: var(--nemi-surface-soft);
  padding: .75rem .85rem;
}

.portal-widget-detail-section strong {
  display: block;
  margin-bottom: .25rem;
  color: var(--nemi-accent-2);
  font-size: .76rem;
  text-transform: uppercase;
}

.portal-widget-detail-section p {
  margin: 0;
  color: var(--nemi-text);
  font-size: .9rem;
  line-height: 1.5;
}

.portal-share-strip {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, .16);
}

.portal-share-primary {
  background: var(--nemi-accent);
}

.portal-share-secondary {
  background: var(--nemi-orange);
}

.portal-share-muted {
  background: var(--nemi-blue-mid);
}

.portal-line-chart {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: .5rem;
  background:
    linear-gradient(180deg, rgba(0, 168, 232, .12), rgba(0, 168, 232, .03)),
    repeating-linear-gradient(0deg, transparent 0 43px, var(--nemi-border) 43px 44px);
}

.portal-line-chart span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--nemi-orange);
  box-shadow: 0 0 0 5px rgba(244, 118, 33, .14);
}

.portal-advanced-echart-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  padding-bottom: 2.35rem;
}

.portal-advanced-echart {
  width: 100%;
  min-width: 0;
  height: clamp(220px, 31vh, 340px);
}

.portal-advanced-echart-wrap .portal-echarts-html-legend {
  bottom: .45rem;
}

.portal-chart-empty {
  color: var(--nemi-muted);
  font-size: .8rem;
  font-weight: 700;
}

.portal-signal-row {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding-bottom: .48rem;
  border-bottom: 1px solid var(--nemi-border);
  color: var(--nemi-text);
  cursor: pointer;
}

.portal-signal-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-signal-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-accent-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-source-row {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  overflow: hidden;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .4rem;
  background: var(--nemi-surface-soft);
  color: var(--nemi-text);
  padding: .34rem .45rem;
  text-align: left;
  text-decoration: none;
}

.portal-source-row span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.portal-source-row strong {
  flex: 0 0 auto;
  min-width: max-content;
  max-width: none;
  overflow: visible;
  color: var(--nemi-accent-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-overflow: clip;
  white-space: nowrap;
}

.portal-donut {
  width: 180px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 999px;
  background: conic-gradient(var(--nemi-accent) 0 48%, var(--nemi-orange) 48% 72%, var(--nemi-blue-mid) 72% 100%);
  position: relative;
}

.portal-donut::after {
  content: "";
  position: absolute;
  inset: 38px;
  border-radius: 999px;
  background: var(--nemi-surface-strong);
}

.portal-donut-alt {
  background: conic-gradient(var(--nemi-blue-mid) 0 42%, var(--nemi-accent) 42% 76%, var(--nemi-orange) 76% 100%);
}

.portal-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: .35rem;
}

.portal-search-workbench {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.portal-search-query {
  flex: 1 1 auto;
  min-width: 0;
}

.portal-search-submit {
  width: 3rem;
  min-width: 3rem;
  display: inline-grid;
  place-items: center;
  padding-inline: 0;
}

.portal-search-examples {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  margin-top: .35rem;
  color: var(--nemi-muted);
  font-size: .76rem;
  line-height: 1.35;
}

.portal-search-examples strong {
  color: var(--nemi-text);
  font-weight: 700;
}

.portal-search-examples code {
  color: var(--nemi-blue-mid);
  background: rgba(14, 165, 233, .08);
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: .25rem;
  padding: .05rem .25rem;
}

.portal-smart-filter {
  display: grid;
  gap: .65rem;
}

.portal-smart-filter-input {
  position: relative;
  display: flex;
  gap: .5rem;
}

.portal-smart-filter-input .portal-action-icon {
  flex: 0 0 2.25rem;
}

.portal-smart-filter-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + .35rem);
  left: 0;
  right: 4.25rem;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: var(--nemi-surface-strong);
  box-shadow: 0 12px 28px rgba(10, 22, 40, .14);
  backdrop-filter: blur(16px);
}

.portal-smart-filter-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 0;
  border-bottom: 1px solid var(--nemi-border);
  background: transparent;
  color: var(--nemi-text);
  padding: .65rem .75rem;
  text-align: left;
}

.portal-smart-filter-option:last-child {
  border-bottom: 0;
}

.portal-smart-filter-option:hover {
  background: rgba(var(--bs-primary-rgb), .09);
}

.portal-smart-filter-option span {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-accent-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-filter-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-height: 0;
}

.portal-filter-token {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 100%;
  border: 1px solid rgba(0, 168, 232, .32);
  border-radius: .4rem;
  background: linear-gradient(135deg, rgba(0, 168, 232, .12), rgba(244, 118, 33, .06));
  color: var(--nemi-text);
  padding: .35rem .55rem;
  font-size: .82rem;
}

.portal-filter-token span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-filter-token strong {
  color: var(--nemi-accent-2);
  font-size: .9rem;
  line-height: 1;
}

.portal-search-metric {
  position: relative;
  min-height: 86px;
  display: grid;
  gap: .35rem;
  align-content: center;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: var(--nemi-surface);
  padding: .85rem;
  box-shadow: 0 10px 26px rgba(10, 22, 40, .06);
  backdrop-filter: blur(14px);
}

.portal-search-metric-top-market {
  padding-right: 3.2rem;
}

.portal-search-refresh-action {
  position: absolute;
  top: .55rem;
  right: .55rem;
  width: 2rem;
  height: 2rem;
}

.portal-search-metric span {
  color: var(--nemi-muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-search-metric strong {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-text);
  font-size: 1.35rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-trend-panel {
  position: sticky;
  top: 5.4rem;
  overflow: hidden;
}

.portal-trend-panel .card-body {
  display: grid;
  gap: .9rem;
}

.portal-trend-section {
  display: grid;
  gap: .45rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--nemi-border);
}

.portal-trend-section:last-child {
  border-bottom: 0;
}

.portal-trend-section h3 {
  margin: 0;
  color: var(--nemi-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.portal-trend-list {
  display: grid;
  gap: .42rem;
}

.portal-trend-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem .6rem;
  overflow: hidden;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface-soft);
  color: var(--nemi-text);
  padding: .52rem .6rem;
  text-align: left;
}

.portal-trend-row:hover,
.portal-trend-row:focus-visible {
  border-color: rgba(0, 168, 232, .48);
  background: linear-gradient(135deg, rgba(0, 168, 232, .12), rgba(244, 118, 33, .07));
  outline: 0;
}

.portal-trend-label {
  min-width: 0;
  overflow: hidden;
  font-size: .84rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-trend-row strong {
  color: var(--nemi-muted);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.portal-trend-row i {
  grid-column: 1 / -1;
  display: block;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nemi-accent), var(--nemi-orange));
}

.portal-trend-empty {
  border: 1px dashed var(--nemi-glass-border);
  border-radius: .45rem;
  color: var(--nemi-muted);
  padding: .55rem .6rem;
  font-size: .78rem;
}

.portal-page-size-select {
  width: 82px;
}

.portal-search-sort-select {
  min-width: 150px;
  width: auto;
}

.portal-search-results {
  min-height: 240px;
}

.portal-search-result-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1rem;
}

.portal-result-select {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  align-items: center;
  padding-top: .2rem;
}

.portal-result-serial {
  display: inline-flex;
  min-width: 1.6rem;
  justify-content: center;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .35rem;
  background: rgba(255, 255, 255, .7);
  color: var(--nemi-muted);
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.4;
}

html[data-portal-theme="dark"] .portal-result-serial {
  background: rgba(255, 255, 255, .08);
}

.portal-result-main {
  min-width: 0;
}

.portal-result-title {
  font-size: 1rem;
  line-height: 1.35;
}

.portal-result-title a {
  color: var(--nemi-text);
  text-decoration: none;
}

.portal-result-title a:hover {
  color: var(--nemi-accent-2);
}

.portal-result-summary {
  display: -webkit-box;
  overflow: hidden;
  font-size: .86rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.portal-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  margin-top: .55rem;
}

.portal-result-meta span {
  max-width: 220px;
  overflow: hidden;
  color: var(--nemi-muted);
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-result-side {
  display: grid;
  justify-items: end;
  align-content: space-between;
  gap: .75rem;
  min-width: 92px;
}

.portal-result-side .btn {
  min-width: 72px;
}

.portal-result-date {
  color: var(--nemi-muted);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.portal-article-detail-content {
  color: var(--nemi-body);
  line-height: 1.7;
  white-space: pre-wrap;
}

.portal-detail-text {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface-soft);
  padding: .8rem;
}

.portal-search-highlight {
  border-radius: .18rem;
  background: rgba(244, 118, 33, .24);
  color: inherit;
  padding: 0 .1rem;
}

.portal-transcript-jumps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-bottom: .6rem;
  white-space: normal;
}

.portal-transcript-jumps > span {
  color: var(--nemi-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-article-detail-meta {
  display: grid;
  gap: .5rem;
}

.portal-article-detail-meta div {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .4rem;
  background: var(--nemi-surface-soft);
  padding: .55rem .65rem;
}

.portal-article-detail-meta span {
  display: block;
  color: var(--nemi-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-article-detail-meta strong {
  color: var(--nemi-text);
  font-size: .86rem;
}

.portal-report-toolbar,
.portal-builder-panel {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: var(--nemi-surface);
  box-shadow: 0 10px 26px rgba(10, 22, 40, .06);
  backdrop-filter: blur(14px) saturate(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
}

.portal-report-toolbar {
  margin-bottom: 1rem;
  padding: .85rem;
}

.portal-report-action-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: linear-gradient(135deg, rgba(0, 168, 232, .08), rgba(244, 118, 33, .06));
  padding: .65rem .75rem;
}

.portal-report-action-strip strong {
  display: block;
  color: var(--nemi-text);
  font-size: .86rem;
}

.portal-report-action-strip span {
  display: block;
  color: var(--nemi-muted);
  font-size: .75rem;
}

.portal-report-mode-pills {
  display: inline-flex;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface-strong);
}

.portal-report-mode-pills button {
  border: 0;
  background: transparent;
  color: var(--nemi-muted);
  font-size: .75rem;
  font-weight: 800;
  padding: .38rem .65rem;
}

.portal-report-mode-pills button.active {
  background: linear-gradient(135deg, var(--nemi-accent), var(--nemi-accent-2));
  color: #fff;
}

.portal-report-export-menu {
  min-width: 13rem;
}

.portal-report-toolbar.portal-filter-drawer {
  margin-bottom: 0;
  border-width: 0 0 0 1px;
  border-radius: 0;
  padding: 1rem;
}

.portal-builder-panel {
  padding: .9rem;
}

.portal-report-widget-library,
.portal-report-page-list {
  display: grid;
  gap: .55rem;
}

.portal-report-widget-library button,
.portal-report-page-list button {
  display: grid;
  gap: .15rem;
  width: 100%;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .4rem;
  background: var(--nemi-surface-soft);
  color: var(--nemi-text);
  padding: .55rem .65rem;
  text-align: left;
}

.portal-report-widget-library button:hover,
.portal-report-page-list button:hover,
.portal-report-page-list button.active {
  border-color: rgba(var(--bs-primary-rgb), .45);
  background: rgba(var(--bs-primary-rgb), .08);
}

.portal-report-widget-library small,
.portal-report-page-list small {
  color: var(--nemi-muted);
}

.portal-report-workspace {
  overflow: auto;
  max-height: calc(100vh - 11rem);
  padding: 1rem;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: rgba(15, 23, 42, .05);
}

.portal-report-preview {
  width: min(100%, 520px);
  min-height: 720px;
  padding: 1.25rem;
  border: 1px solid var(--nemi-glass-border);
  box-shadow: 0 8px 28px rgba(10, 22, 40, .08);
  background: var(--nemi-surface-strong);
}

.portal-report-page {
  color: #172033;
  border: 1px solid rgba(148, 163, 184, .38);
  border-radius: .35rem;
  box-shadow: 0 18px 48px rgba(10, 22, 40, .12);
  transition: box-shadow .2s ease, transform .2s ease;
}

.portal-report-page.portal-report-review-mode .report-builder-widget-actions {
  display: none;
}

.portal-report-page.portal-report-review-mode .report-builder-widget {
  cursor: default;
}

.portal-report-page[data-report-paper="A4"][data-report-orientation="Portrait"] {
  width: min(100%, 210mm);
  min-height: 297mm;
}

.portal-report-page[data-report-paper="A4"][data-report-orientation="Landscape"] {
  width: min(100%, 297mm);
  min-height: 210mm;
}

.portal-report-page[data-report-paper="A3"][data-report-orientation="Portrait"] {
  width: min(100%, 297mm);
  min-height: 420mm;
}

.portal-report-page[data-report-paper="A3"][data-report-orientation="Landscape"] {
  width: min(100%, 420mm);
  min-height: 297mm;
}

.report-page-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #dbe3ef;
}

.report-brand {
  color: #0077b6;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-page-header h2 {
  margin: .15rem 0 0;
  color: #0a1628;
  font-size: 1.25rem;
  font-weight: 800;
}

.report-meta {
  color: #64748b;
  font-size: .78rem;
  font-weight: 700;
}

.report-widget-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: .75rem;
}

.report-builder-widget {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  border: 1px solid #dce5ef;
  border-radius: .4rem;
  background: #fff;
  overflow: hidden;
}

.report-graphic-deep {
  border-color: rgba(96, 165, 250, .24);
  background:
    radial-gradient(circle at 78% 18%, rgba(0, 168, 232, .18), transparent 30%),
    linear-gradient(135deg, #171b3f, #262849);
  color: #f8fbff;
}

.report-graphic-deep .report-builder-widget-header,
.report-graphic-deep .report-article-list article {
  border-color: rgba(255, 255, 255, .12);
}

.report-graphic-deep .report-builder-widget-title,
.report-graphic-deep .report-kpi-value,
.report-graphic-deep .report-article-list h4 {
  color: #fff;
}

.report-graphic-deep .report-builder-widget-type,
.report-graphic-deep .report-kpi-subtitle,
.report-graphic-deep .report-widget-note,
.report-graphic-deep .report-chart-labels span,
.report-graphic-deep .report-chart-legend span {
  color: rgba(232, 242, 255, .72);
}

.report-graphic-glass {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .48)),
    linear-gradient(140deg, rgba(0, 168, 232, .1), rgba(244, 118, 33, .08));
  box-shadow: 0 18px 42px rgba(10, 22, 40, .09);
  backdrop-filter: blur(16px);
}

.report-graphic-contrast {
  border-color: #0a1628;
  box-shadow: inset 4px 0 0 #00a8e8;
}

.report-graphic-minimal {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.report-builder-widget.active {
  border-color: #00a8e8;
  box-shadow: 0 0 0 .14rem rgba(0, 168, 232, .12);
}

.report-builder-widget-cover {
  border: 0;
  background: linear-gradient(135deg, #0a1628, #0077b6 58%, #00a8e8);
  color: #fff;
}

.report-builder-widget-cover .report-builder-widget-header {
  border-color: rgba(255, 255, 255, .18);
}

.report-builder-widget-cover .report-builder-widget-title {
  color: #fff;
}

.report-builder-widget-cover .report-builder-widget-type,
.report-builder-widget-cover .report-builder-widget-actions button {
  color: rgba(223, 246, 255, .9);
}

.report-builder-widget-header {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .58rem .68rem;
  border-bottom: 1px solid #edf2f7;
}

.report-builder-widget-title {
  color: #0a1628;
  font-size: .82rem;
  font-weight: 800;
}

.report-builder-widget-type {
  color: #0077b6;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-builder-widget-body {
  flex: 1;
  padding: .7rem;
}

.report-cover-widget {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, .75fr);
  gap: 1rem;
  align-items: end;
  height: 100%;
}

.report-cover-brand {
  color: #bfeeff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-cover-widget h3 {
  margin: .25rem 0 .45rem;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1.08;
  font-weight: 900;
}

.report-cover-widget p {
  margin: 0;
  color: #dff6ff;
  font-size: .82rem;
  line-height: 1.5;
}

.report-cover-widget dl {
  display: grid;
  gap: .5rem;
  margin: 0;
}

.report-cover-widget dl div {
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: .35rem;
  background: rgba(255, 255, 255, .1);
  padding: .55rem .65rem;
}

.report-cover-widget dt {
  margin: 0 0 .12rem;
  color: #bfeeff;
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-cover-widget dd {
  margin: 0;
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
}

.report-kpi-value {
  color: #0a1628;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
}

.report-kpi-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 86px;
}

.report-kpi-layout-hero .report-kpi-value {
  font-size: 2.45rem;
}

.report-kpi-layout-compact {
  min-height: 56px;
}

.report-kpi-layout-split {
  border-top: 1px solid #edf2f7;
  padding-top: .55rem;
}

.report-kpi-layout-chart-first {
  flex-direction: row-reverse;
}

.report-kpi-glyph {
  flex: 0 0 58px;
  aspect-ratio: 1;
  border-radius: .75rem;
  background:
    linear-gradient(135deg, rgba(0, 168, 232, .18), rgba(244, 118, 33, .12)),
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(0, 119, 182, .08) 8px 9px);
}

.report-kpi-subtitle,
.report-widget-note {
  color: #64748b;
  font-size: .76rem;
}

.report-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: .28rem;
  height: 116px;
}

.report-chart-bars span {
  position: relative;
  flex: 1;
  min-width: 10px;
  border-radius: .18rem .18rem 0 0;
  background: linear-gradient(180deg, #00a8e8, #0077b6);
}

.report-chart-bars-3d {
  align-items: flex-end;
  perspective: 900px;
}

.report-chart-bars-3d span {
  border-radius: .12rem .12rem 0 0;
  background: linear-gradient(120deg, #7be7f0 0%, #00a8e8 46%, #0077b6 100%);
  box-shadow: inset -8px 0 0 rgba(10, 22, 40, .15), 8px 8px 0 rgba(10, 22, 40, .12);
  transform: skewY(-3deg);
}

.report-chart-bars strong {
  position: absolute;
  top: -.95rem;
  left: 50%;
  transform: translateX(-50%);
  color: #0a1628;
  font-size: .62rem;
  white-space: nowrap;
}

.report-chart-bars em {
  position: absolute;
  right: 0;
  bottom: -1.15rem;
  left: 0;
  overflow: hidden;
  color: #64748b;
  font-size: .58rem;
  font-style: normal;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-chart-horizontal {
  display: grid;
  gap: .42rem;
}

.report-chart-horizontal div {
  display: grid;
  grid-template-columns: minmax(72px, .8fr) minmax(90px, 1.4fr) auto;
  align-items: center;
  gap: .45rem;
}

.report-chart-horizontal span,
.report-chart-horizontal strong {
  overflow: hidden;
  color: #334155;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-chart-horizontal i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00a8e8, #f47621);
}

.report-chart-line {
  position: relative;
  min-height: 122px;
  border-radius: .35rem;
  background:
    linear-gradient(180deg, rgba(0, 168, 232, .1), rgba(0, 168, 232, .02)),
    repeating-linear-gradient(0deg, transparent 0 29px, #edf2f7 29px 30px);
}

.report-chart-area::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 68%;
  background: linear-gradient(180deg, rgba(0, 168, 232, .28), rgba(0, 168, 232, .02));
  clip-path: polygon(0 75%, 18% 48%, 36% 62%, 54% 34%, 72% 46%, 100% 22%, 100% 100%, 0 100%);
}

.report-chart-line span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f47621;
  box-shadow: 0 0 0 4px rgba(244, 118, 33, .14);
}

.report-chart-labels {
  display: grid;
  grid-auto-flow: column;
  gap: .35rem;
  margin-top: .35rem;
}

.report-chart-labels span {
  overflow: hidden;
  color: #64748b;
  font-size: .6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-chart-donut {
  width: 138px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 999px;
  position: relative;
}

.report-chart-pie {
  width: 148px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(10, 22, 40, .12);
}

.report-chart-donut::after {
  content: "";
  position: absolute;
  inset: 30px;
  border-radius: inherit;
  background: #fff;
}

.report-chart-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem;
  margin-top: .55rem;
}

.report-chart-legend span {
  overflow: hidden;
  color: #334155;
  font-size: .66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-chart-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: .25rem;
  border-radius: 999px;
}

.report-chart-heatmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .4rem;
}

.report-chart-heatmap span {
  min-height: 54px;
  display: grid;
  align-content: space-between;
  border: 1px solid rgba(0, 119, 182, .16);
  border-radius: .35rem;
  background: rgba(0, 168, 232, calc(var(--heat) * .34));
  color: #0a1628;
  font-size: .66rem;
  padding: .42rem;
}

.report-chart-heatmap strong {
  color: #0077b6;
  font-size: .78rem;
}

.report-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .7rem;
}

.report-data-table th,
.report-data-table td {
  border-bottom: 1px solid #edf2f7;
  padding: .32rem .25rem;
  text-align: left;
}

.report-article-list {
  display: grid;
  gap: .5rem;
}

.report-article-list article {
  padding-bottom: .48rem;
  border-bottom: 1px solid #edf2f7;
}

.report-article-list article:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.report-article-list h4 {
  margin: 0 0 .15rem;
  color: #0a1628;
  font-size: .82rem;
  font-weight: 800;
}

.report-builder-widget-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .2rem;
}

.report-builder-widget-actions button {
  border: 1px solid #dce5ef;
  border-radius: .25rem;
  background: #f8fafc;
  color: #64748b;
  font-size: .64rem;
  font-weight: 800;
  line-height: 1;
  padding: .22rem .3rem;
}

.report-builder-widget-actions button:hover {
  border-color: #00a8e8;
  color: #0077b6;
}

.report-property-grid {
  display: grid;
  gap: .65rem;
}

.report-property-section {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface-soft);
  padding: .65rem;
}

.report-property-section-title {
  color: var(--nemi-muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .04em;
  margin-bottom: .45rem;
  text-transform: uppercase;
}

.report-chart-lock-note {
  margin-bottom: .55rem;
}

.report-property-checks {
  display: grid;
  align-content: end;
  gap: .25rem;
}

.report-property-checks .form-check {
  min-height: 0;
  margin-bottom: 0;
}

.report-property-checks .form-check-label {
  font-size: .72rem;
  font-weight: 700;
}

.portal-report-block {
  min-height: 120px;
  border: 1px dashed var(--nemi-border);
  border-radius: .5rem;
  background: repeating-linear-gradient(135deg, rgba(0, 168, 232, .06) 0 8px, rgba(244, 118, 33, .05) 8px 16px);
}

.portal-report-block-wide {
  min-height: 220px;
}

.portal-heat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .5rem;
}

.portal-heat-grid span {
  min-height: 58px;
  border-radius: .5rem;
  background: rgba(0, 168, 232, .12);
}

.portal-heat-grid span:nth-child(3n) {
  background: rgba(244, 118, 33, .2);
}

.portal-heat-grid span:nth-child(4n) {
  background: rgba(13, 31, 60, .16);
}

.portal-insight-note {
  padding: .85rem;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: var(--nemi-surface);
}

.portal-advanced-card {
  overflow: hidden;
}

#advancedInsightGrid .portal-advanced-card > .card-header.portal-advanced-card-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .55rem;
  min-width: 0;
  padding: .6rem .76rem .52rem;
  background: var(--nemi-surface-strong) !important;
}

.portal-advanced-card-heading {
  min-width: 0;
  display: grid;
  gap: .12rem;
  padding-right: .35rem;
}

.portal-advanced-card-heading h2 {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-text);
  font-size: .98rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-advanced-card-heading .small {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--nemi-muted) !important;
  font-size: .72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#advancedInsightGrid .portal-advanced-card .portal-widget-actions {
  position: static;
  z-index: 20;
  align-self: start;
  justify-self: end;
  opacity: .9;
}

#advancedInsightGrid .portal-advanced-card > .card-body,
#advancedInsightGrid .portal-advanced-card > .table-responsive[data-advanced-body] {
  padding: .75rem .86rem 2.05rem;
}

#advancedInsightGrid .portal-advanced-card > .card-body.portal-advanced-list[data-advanced-body],
#advancedInsightGrid .portal-advanced-card > .table-responsive.portal-advanced-list[data-advanced-body] {
  padding-bottom: 2.2rem;
}

.portal-narrative-board,
.portal-narrative-panel,
.portal-narrative-hero,
.portal-narrative-mini {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: var(--nemi-surface);
  box-shadow: var(--nemi-shadow);
}

.portal-narrative-board {
  position: relative;
  padding: .9rem;
}

.portal-narrative-head {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: start;
  justify-content: space-between;
  margin-bottom: .85rem;
}

.portal-narrative-hero,
.portal-narrative-mini,
.portal-narrative-panel {
  background: var(--nemi-surface-soft);
}

.portal-narrative-hero {
  display: grid;
  align-content: space-between;
  min-height: 190px;
  padding: 1rem;
}

.portal-narrative-hero h3 {
  margin: .18rem 0 .65rem;
  color: var(--nemi-text);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.1;
}

.portal-narrative-score {
  display: grid;
  gap: .2rem;
}

.portal-narrative-score strong,
.portal-narrative-mini strong {
  color: var(--nemi-text);
  font-size: 1.65rem;
  line-height: 1;
}

.portal-narrative-score span,
.portal-narrative-mini small,
.portal-narrative-row span,
.portal-narrative-evidence-row span,
.portal-narrative-role-summary {
  color: var(--nemi-muted);
}

.portal-narrative-actions,
.portal-narrative-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  margin-top: .85rem;
}

.portal-narrative-chip,
.portal-narrative-tabs button {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .35rem;
  background: rgba(255, 255, 255, .42);
  color: var(--nemi-text);
  font-size: .72rem;
  font-weight: 800;
  padding: .28rem .45rem;
  text-decoration: none;
}

html[data-portal-theme="dark"] .portal-narrative-chip,
html[data-portal-theme="dark"] .portal-narrative-tabs button {
  background: rgba(255, 255, 255, .08);
}

.portal-narrative-tabs button.active {
  border-color: rgba(0, 168, 232, .58);
  background: rgba(0, 168, 232, .12);
  color: var(--nemi-accent-2);
}

.portal-narrative-mini {
  display: grid;
  align-content: center;
  min-height: 128px;
  gap: .25rem;
  padding: .85rem;
}

.portal-narrative-mini span,
.portal-narrative-panel-title {
  color: var(--nemi-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-narrative-panel {
  padding: .85rem;
}

.portal-narrative-list,
.portal-narrative-evidence {
  display: grid;
  gap: .5rem;
  margin-top: .65rem;
}

.portal-narrative-row,
.portal-narrative-evidence-row {
  display: grid;
  gap: .18rem;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .42rem;
  background: rgba(255, 255, 255, .38);
  color: var(--nemi-text);
  padding: .55rem .6rem;
  text-decoration: none;
}

html[data-portal-theme="dark"] .portal-narrative-row,
html[data-portal-theme="dark"] .portal-narrative-evidence-row {
  background: rgba(255, 255, 255, .06);
}

.portal-narrative-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.portal-narrative-row div {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.portal-narrative-row strong,
.portal-narrative-evidence-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-text);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-narrative-row em {
  border-radius: .32rem;
  background: rgba(244, 118, 33, .14);
  color: var(--nemi-orange);
  font-size: .68rem;
  font-style: normal;
  font-weight: 900;
  padding: .16rem .38rem;
}

.portal-narrative-search-note {
  margin-top: .45rem;
  color: var(--nemi-text);
  font-size: .78rem;
  line-height: 1.45;
}

.report-narrative-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .74rem;
}

.report-narrative-table th,
.report-narrative-table td {
  border-bottom: 1px solid #edf2f7;
  padding: .38rem .3rem;
  text-align: left;
  vertical-align: top;
}

.report-narrative-table th {
  color: #64748b;
  font-size: .66rem;
  text-transform: uppercase;
}

.report-narrative-factors {
  display: grid;
  gap: .35rem;
  margin: .65rem 0 0;
  padding-left: 1rem;
  color: #334155;
  font-size: .75rem;
}

.portal-advanced-timeline {
  min-height: 260px;
}

.portal-advanced-timeline span {
  cursor: pointer;
}

.portal-advanced-point-up {
  background: #16a34a !important;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, .14) !important;
}

.portal-advanced-point-down {
  background: #ef4444 !important;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, .14) !important;
}

.portal-advanced-list {
  display: grid;
  gap: .38rem;
}

.portal-advanced-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(4.75rem, max-content);
  gap: .12rem .55rem;
  overflow: hidden;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface-soft);
  color: var(--nemi-text);
  padding: .46rem .52rem;
  text-align: left;
}

.portal-advanced-row:hover,
.portal-advanced-row:focus-visible,
.portal-advanced-heat-tile:hover,
.portal-advanced-heat-tile:focus-visible {
  border-color: rgba(0, 168, 232, .48);
  background: linear-gradient(135deg, rgba(0, 168, 232, .12), rgba(244, 118, 33, .07));
  outline: 0;
}

.portal-advanced-row span {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-advanced-row strong {
  min-width: max-content;
  max-width: none;
  justify-self: end;
  overflow: visible;
  color: var(--nemi-accent-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.portal-advanced-row small {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-advanced-row i {
  grid-column: 1 / -1;
  display: block;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nemi-accent), var(--nemi-orange));
}

.portal-advanced-table tbody tr {
  cursor: pointer;
}

.portal-advanced-heatmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.portal-advanced-heat-tile {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: .16rem;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background:
    linear-gradient(135deg, rgba(0, 168, 232, calc(.08 + var(--heat, .2) * .3)), rgba(244, 118, 33, calc(.04 + var(--heat, .2) * .26))),
    var(--nemi-surface-soft);
  color: var(--nemi-text);
  padding: .65rem;
  text-align: left;
}

.portal-advanced-heat-tile span,
.portal-advanced-heat-tile small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-advanced-heat-tile strong {
  color: var(--nemi-text);
  font-size: 1.25rem;
  line-height: 1;
}

.portal-advanced-heat-tile small {
  color: var(--nemi-muted);
}

.portal-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.portal-settings-span {
  grid-column: 1 / -1;
}

.portal-settings-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .6rem;
}

.portal-settings-widget-option,
.portal-settings-alert-row,
.portal-settings-access-card,
.portal-settings-qa-row {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface-soft);
}

.portal-settings-widget-option {
  display: flex;
  align-items: center;
  gap: .62rem;
  padding: .62rem .68rem;
}

.portal-settings-widget-option span {
  display: grid;
  min-width: 0;
}

.portal-settings-widget-option strong {
  min-width: 0;
  overflow: hidden;
  color: var(--nemi-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-settings-widget-option small,
.portal-settings-access-card span,
.portal-settings-qa-row small {
  color: var(--nemi-muted);
}

.portal-settings-alert-list,
.portal-settings-access,
.portal-settings-qa-list,
.portal-settings-narrative-list {
  display: grid;
  gap: .6rem;
}

.portal-settings-alert-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) .55fr .8fr .8fr;
  gap: .5rem;
  align-items: center;
  padding: .65rem;
}

.portal-settings-access-card {
  display: grid;
  gap: .15rem;
  padding: .7rem;
}

.portal-settings-access-card strong {
  color: var(--nemi-text);
}

.portal-settings-qa-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
  padding: .65rem;
}

.portal-settings-qa-row span {
  border-radius: .35rem;
  padding: .2rem .45rem;
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
}

.portal-settings-qa-row div {
  display: grid;
  gap: .12rem;
}

.portal-settings-qa-pass span {
  background: rgba(22, 163, 74, .14);
  color: #15803d;
}

.portal-settings-qa-review span {
  background: rgba(244, 118, 33, .15);
  color: #b45309;
}

.portal-settings-qa-fail span {
  background: rgba(239, 68, 68, .15);
  color: #b91c1c;
}

.portal-settings-narrative-row {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .55rem;
  background: var(--nemi-surface-soft);
  padding: .75rem;
}

.portal-settings-narrative-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .7rem;
}

.portal-settings-narrative-row textarea {
  resize: vertical;
}

.portal-market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.portal-market-tile {
  min-height: 96px;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: var(--nemi-surface);
  color: var(--nemi-text);
  font-weight: 700;
  text-align: left;
  padding: .9rem;
}

.portal-market-tile span {
  display: block;
  margin-top: .5rem;
  color: var(--nemi-accent-2);
  font-size: 1.4rem;
}

.portal-keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.portal-keyword-cloud button {
  border: 1px solid var(--nemi-glass-border);
  border-radius: 999px;
  background: var(--nemi-surface);
  color: var(--nemi-text);
  padding: .5rem .85rem;
}

.portal-keyword-cloud button:nth-child(3n) {
  border-color: rgba(244, 118, 33, .45);
}

.portal-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .portal-page-header,
  .portal-search-workbench,
  .portal-smart-filter-input,
  .portal-search-result-item {
    display: grid;
  }

  .portal-dashboard-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .portal-dashboard-actions {
    justify-content: flex-start;
  }

  .portal-smart-filter-menu {
    right: 0;
  }

  .portal-report-action-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-report-mode-pills {
    width: 100%;
  }

  .portal-report-mode-pills button {
    flex: 1 1 0;
  }

  .portal-result-side {
    justify-items: start;
  }

  .portal-widget-grid {
    grid-template-columns: 1fr;
  }

  .portal-ml-brief {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-ml-card-primary {
    grid-column: 1 / -1;
  }

  .report-cover-widget {
    grid-template-columns: 1fr;
  }

  .portal-filter-bar .form-select,
  .portal-filter-bar .form-control,
  .portal-filter-bar .portal-multiselect {
    width: 100%;
  }

  .portal-market-grid,
  .portal-heat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-advanced-heatmap,
  .portal-settings-grid,
  .portal-settings-alert-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .portal-market-grid,
  .portal-heat-grid,
  .portal-advanced-heatmap {
    grid-template-columns: 1fr;
  }

  .portal-metric {
    font-size: 1.45rem;
  }

  .portal-ml-brief {
    grid-template-columns: 1fr;
  }
}

.portal-upload-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1070;
  pointer-events: none;
  opacity: 0;
  background: rgba(5, 15, 31, 0.08);
  backdrop-filter: blur(1px);
  transition: opacity 180ms ease;
}

.portal-upload-tour-backdrop.portal-upload-tour-visible {
  opacity: 1;
}

.portal-upload-tour-highlight {
  position: relative;
  z-index: 1080 !important;
  border-radius: 8px;
  outline: 2px solid rgba(12, 169, 223, 0.92);
  outline-offset: 4px;
  box-shadow: 0 16px 42px rgba(12, 169, 223, 0.22);
  transition: outline-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.portal-filter-drawer.portal-upload-tour-highlight {
  position: fixed;
  z-index: 1210 !important;
}

.portal-upload-tour-card {
  position: fixed;
  z-index: 1230;
  width: min(320px, calc(100vw - 24px));
  padding: 14px;
  --tour-shift-x: -8px;
  --tour-shift-y: 0;
  --tour-arrow-x: 28px;
  --tour-arrow-y: 28px;
  border: 1px solid rgba(133, 164, 190, 0.46);
  border-radius: 10px;
  background: rgba(var(--bs-body-bg-rgb), 0.96);
  color: var(--bs-body-color);
  box-shadow: 0 18px 52px rgba(5, 15, 31, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(var(--tour-shift-x), var(--tour-shift-y), 0) scale(0.985);
  transition:
    left 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: left, top, opacity, transform;
}

.portal-upload-tour-card.portal-upload-tour-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.portal-upload-tour-card[data-placement="left"] {
  --tour-shift-x: 8px;
  --tour-shift-y: 0;
}

.portal-upload-tour-card[data-placement="bottom"] {
  --tour-shift-x: 0;
  --tour-shift-y: -8px;
}

.portal-upload-tour-card[data-placement="top"] {
  --tour-shift-x: 0;
  --tour-shift-y: 8px;
}

.portal-upload-tour-card.portal-upload-tour-moving .portal-upload-tour-content {
  animation: portalUploadTourContent 180ms ease both;
}

.portal-upload-tour-arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  background: rgba(var(--bs-body-bg-rgb), 0.96);
  border-color: rgba(133, 164, 190, 0.46);
  border-style: solid;
  border-width: 0;
  transform: rotate(45deg);
  box-shadow: 0 8px 18px rgba(5, 15, 31, 0.12);
}

.portal-upload-tour-card[data-placement="right"] .portal-upload-tour-arrow {
  left: -7px;
  top: var(--tour-arrow-y);
  margin-top: -7px;
  border-left-width: 1px;
  border-bottom-width: 1px;
}

.portal-upload-tour-card[data-placement="left"] .portal-upload-tour-arrow {
  right: -7px;
  top: var(--tour-arrow-y);
  margin-top: -7px;
  border-right-width: 1px;
  border-top-width: 1px;
}

.portal-upload-tour-card[data-placement="bottom"] .portal-upload-tour-arrow {
  top: -7px;
  left: var(--tour-arrow-x);
  margin-left: -7px;
  border-left-width: 1px;
  border-top-width: 1px;
}

.portal-upload-tour-card[data-placement="top"] .portal-upload-tour-arrow {
  bottom: -7px;
  left: var(--tour-arrow-x);
  margin-left: -7px;
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.portal-upload-tour-card h2 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 800;
}

.portal-upload-tour-card p {
  margin: 0;
  color: var(--nemi-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.portal-upload-tour-detail {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(133, 164, 190, 0.28);
  border-radius: 8px;
  background: rgba(var(--bs-tertiary-bg-rgb), 0.72);
}

.portal-upload-tour-detail strong {
  color: var(--bs-primary);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-upload-tour-detail span {
  color: var(--bs-body-color);
  font-size: 0.75rem;
  line-height: 1.4;
}

.portal-upload-tour-kicker {
  margin-bottom: 5px;
  color: var(--bs-primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-upload-tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

@keyframes portalUploadTourContent {
  from {
    opacity: 0;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-report-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: .75rem;
}

.custom-report-card {
  display: grid;
  gap: .18rem;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .5rem;
  background: var(--nemi-surface);
  color: var(--nemi-text);
  padding: .75rem .9rem;
  text-align: left;
  box-shadow: 0 12px 28px rgba(10, 22, 40, .06);
}

.custom-report-card:hover,
.custom-report-card:focus-visible,
.custom-report-card.active {
  border-color: rgba(0, 168, 232, .6);
  background: linear-gradient(135deg, rgba(0, 168, 232, .1), rgba(244, 118, 33, .05));
  outline: 0;
}

.custom-report-card span {
  color: var(--nemi-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.custom-report-card strong {
  font-size: .9rem;
}

.custom-report-card small {
  color: var(--nemi-muted);
  font-size: .74rem;
}

.custom-report-toolbar {
  margin-bottom: .75rem;
}

.custom-report-shell {
  display: grid;
  grid-template-columns: minmax(230px, .78fr) minmax(0, 2.2fr) minmax(260px, .9fr);
  gap: .75rem;
  align-items: start;
}

.custom-report-panel {
  border: 1px solid var(--nemi-glass-border);
  border-radius: .55rem;
  background: var(--nemi-surface);
  padding: .8rem;
  box-shadow: 0 16px 38px rgba(10, 22, 40, .07);
}

.custom-report-page-list {
  display: grid;
  gap: .45rem;
}

.custom-report-page-list button {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: .08rem .45rem;
  width: 100%;
  border: 1px solid var(--nemi-glass-border);
  border-radius: .45rem;
  background: var(--nemi-surface-soft);
  color: var(--nemi-text);
  padding: .52rem;
  text-align: left;
}

.custom-report-page-list button:hover,
.custom-report-page-list button:focus-visible,
.custom-report-page-list button.active {
  border-color: rgba(0, 168, 232, .52);
  background: linear-gradient(135deg, rgba(0, 168, 232, .11), rgba(244, 118, 33, .06));
  outline: 0;
}

.custom-report-page-list span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  border-radius: .35rem;
  background: rgba(15, 39, 68, .1);
  color: var(--nemi-accent-2);
  font-size: .74rem;
  font-weight: 900;
}

.custom-report-page-list strong,
.custom-report-page-list small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-report-page-list strong {
  font-size: .78rem;
}

.custom-report-page-list small {
  color: var(--nemi-muted);
  font-size: .68rem;
}

.custom-report-workspace {
  overflow: auto;
  max-height: calc(100vh - 190px);
  border: 1px solid var(--nemi-glass-border);
  border-radius: .55rem;
  background:
    linear-gradient(45deg, rgba(148, 163, 184, .14) 25%, transparent 25% 75%, rgba(148, 163, 184, .14) 75%),
    linear-gradient(45deg, rgba(148, 163, 184, .14) 25%, transparent 25% 75%, rgba(148, 163, 184, .14) 75%);
  background-color: rgba(226, 232, 240, .72);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  padding: 1rem;
}

.custom-report-preview {
  display: grid;
  justify-items: center;
  min-height: 420px;
}

.custom-report-page {
  display: grid;
  place-items: center;
  position: relative;
  width: min(100%, 1080px);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 70px rgba(10, 22, 40, .22);
}

.custom-report-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f6f2ea;
}

.custom-report-page[data-paper="A4"][data-orientation="Landscape"] {
  aspect-ratio: 297 / 210;
}

.custom-report-page[data-paper="Widescreen"][data-orientation="Landscape"] {
  aspect-ratio: 16 / 9;
}

.custom-report-page[data-paper="Widescreen"][data-orientation="Portrait"] {
  aspect-ratio: 9 / 16;
  width: min(100%, 700px);
}

.custom-report-page[data-paper="A4"][data-orientation="Portrait"] {
  aspect-ratio: 210 / 297;
  width: min(100%, 760px);
}

.custom-report-page[data-paper="A3"][data-orientation="Landscape"] {
  aspect-ratio: 420 / 297;
}

.custom-report-page[data-paper="A3"][data-orientation="Portrait"] {
  aspect-ratio: 297 / 420;
  width: min(100%, 820px);
}

.custom-report-el {
  position: absolute;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid transparent;
}

.custom-report-el.is-editable {
  cursor: text;
}

.custom-report-el.is-selected {
  outline: 2px solid rgba(0, 168, 232, .82);
  outline-offset: 2px;
  z-index: 5;
}

.custom-report-el.is-locked::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(184, 146, 42, .72);
}

.custom-report-text {
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  line-height: 1.18;
  white-space: pre-wrap;
}

.custom-report-text[contenteditable="true"]:focus {
  outline: 0;
}

.custom-report-el-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.custom-report-image-slot,
.custom-report-chart-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(100, 116, 139, .7);
  background: rgba(255, 255, 255, .38);
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
}

.custom-report-el-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: .45rem;
}

.custom-report-metric {
  display: grid;
  align-content: center;
  gap: .18rem;
  color: #fff;
  padding: .45rem;
  text-align: center;
}

.custom-report-metric strong {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(1.0625rem, 2.08vw, 1.625rem);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-report-metric span {
  min-width: 0;
  overflow: hidden;
  font-size: .64rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.custom-report-el-chart {
  border-color: rgba(15, 39, 68, .12);
  background: rgba(255, 255, 255, .56);
  padding: .5rem;
}

.custom-report-bars {
  display: grid;
  align-content: center;
  gap: .32rem;
  height: 100%;
}

.custom-report-bar-row {
  display: grid;
  grid-template-columns: minmax(70px, .88fr) minmax(80px, 1.35fr) minmax(34px, auto);
  gap: .35rem;
  align-items: center;
  min-height: 12px;
}

.custom-report-bar-row span,
.custom-report-bar-row strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: .52rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-report-bar-row strong {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.custom-report-bar-row i {
  display: block;
  height: 7px;
  background: rgba(212, 207, 196, .74);
}

.custom-report-bar-row b {
  display: block;
  height: 100%;
}

.custom-report-columns {
  height: 100%;
  display: flex;
  align-items: end;
  gap: .28rem;
}

.custom-report-columns i {
  flex: 1 1 0;
  min-height: 5px;
}

.custom-report-line-chart {
  height: calc(100% - 2.2rem);
  min-height: 80px;
}

.custom-report-line-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.custom-report-stack {
  display: flex !important;
  overflow: hidden;
  background: rgba(212, 207, 196, .74);
}

.custom-report-stack-segment {
  display: block;
  height: 100%;
  min-width: 2px;
}

.custom-report-series-legend {
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  margin-top: .3rem;
}

.custom-report-donut {
  width: min(44%, 126px);
  aspect-ratio: 1;
  position: relative;
  margin: 0 auto;
  border-radius: 999px;
}

.custom-report-donut::after {
  content: "";
  position: absolute;
  inset: 25%;
  border-radius: inherit;
  background: #f6f2ea;
}

.custom-report-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .2rem .45rem;
  margin-top: .45rem;
}

.custom-report-legend span {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: .58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-report-legend i {
  width: .48rem;
  height: .48rem;
  display: inline-block;
  margin-right: .25rem;
  vertical-align: -1px;
}

.custom-report-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: .64rem;
}

.custom-report-table th,
.custom-report-table td {
  overflow: hidden;
  border-bottom: 1px solid #e5e7eb;
  padding: .28rem .32rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-report-table th {
  background: #0f2744;
  color: #fff;
  font-size: .6rem;
  text-transform: uppercase;
}

.custom-report-property-grid {
  display: grid;
  gap: .65rem;
}

.portal-export-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .45rem .75rem;
}

.portal-export-column-option {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: .45rem;
  background: rgba(255, 255, 255, .72);
  padding: .5rem .6rem;
}

.portal-export-column-option .form-check-label {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-bs-theme="dark"] .portal-export-column-option {
  background: rgba(15, 32, 51, .72);
}

.custom-report-lock-note {
  border: 1px solid rgba(0, 168, 232, .26);
  border-radius: .45rem;
  background: rgba(0, 168, 232, .08);
  color: var(--nemi-muted);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.4;
  padding: .55rem .62rem;
}

@media (max-width: 1199.98px) {
  .custom-report-selector {
    grid-template-columns: 1fr;
  }

  .custom-report-shell {
    grid-template-columns: 1fr;
  }

  .custom-report-workspace {
    max-height: none;
  }
}

