.operations-dashboard {
  --site-header-height: 72px;
  --site-primary: #6265f0;
  --site-secondary: #aa59f7;
  --site-accent: #ec4a9d;
  --site-accent-hover: #d6367d;
  --blue: var(--site-primary);
  --violet: var(--site-secondary);
  --pink: var(--site-accent);
  --cognera-gradient: linear-gradient(135deg, var(--site-primary), var(--site-secondary), var(--site-accent));
  --cognera-gradient-hover: linear-gradient(135deg, #5356df, #9b4ee7, var(--site-accent-hover));
  --site-white: #fff;
  --site-line: rgba(31, 42, 53, 0.12);
  --site-shadow: 0 18px 45px rgba(31, 42, 53, 0.10);
  --site-radius: 8px;
  --site-max: 1180px;
  --site-ease: cubic-bezier(.2, .8, .2, 1);
}

.operations-dashboard.nav-open {
  overflow: hidden;
}

.operations-dashboard .site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(31, 42, 53, 0.08);
  backdrop-filter: blur(18px);
}

.operations-dashboard .nav-shell {
  display: flex;
  width: min(var(--site-max), calc(100% - 40px));
  min-height: var(--site-header-height);
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
}

.operations-dashboard .brand {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 0;
  color: #1f2a35;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.operations-dashboard .brand img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.operations-dashboard .brand span {
  overflow: hidden;
  color: transparent;
  background: var(--cognera-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  text-overflow: ellipsis;
}

.operations-dashboard .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.operations-dashboard .nav-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--site-radius);
  color: #4a5565;
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
  transition: background .2s var(--site-ease), color .2s var(--site-ease);
}

.operations-dashboard .nav-links a:hover,
.operations-dashboard .nav-links a.active {
  color: var(--site-primary);
  background: rgba(98, 101, 240, 0.08);
}

.operations-dashboard .nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.operations-dashboard .nav-dropdown::after {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 10px;
  content: "";
}

.operations-dashboard .nav-dropdown-toggle::after {
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.operations-dashboard .nav-submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 4px;
  min-width: 246px;
  padding: 10px;
  border: 1px solid rgba(31, 42, 53, 0.10);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 36px rgba(31, 42, 53, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .18s var(--site-ease), transform .18s var(--site-ease), visibility .18s var(--site-ease);
  visibility: hidden;
}

.operations-dashboard .nav-dropdown:hover .nav-submenu,
.operations-dashboard .nav-dropdown.is-open .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  visibility: visible;
}

.operations-dashboard .nav-submenu a {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
  line-height: 1.15;
  white-space: nowrap;
}

.operations-dashboard .nav-links .nav-cta {
  margin-left: 6px;
  color: var(--site-white);
  background: var(--cognera-gradient);
  box-shadow: 0 10px 22px rgba(98, 101, 240, 0.18);
}

.operations-dashboard .nav-links .nav-cta:hover,
.operations-dashboard .nav-links .nav-cta.active {
  color: var(--site-white);
  background: var(--cognera-gradient-hover);
}

.operations-dashboard .menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  color: var(--site-primary);
  background: var(--site-white);
  cursor: pointer;
}

.operations-dashboard .menu-toggle svg {
  width: 22px;
  height: 22px;
}

.brand-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(29, 118, 255, 0.28));
}

.sidebar .brand-name,
.sidebar .brand-subtitle {
  display: inline-block;
  color: transparent;
  background: var(--cognera-gradient);
  -webkit-background-clip: text;
  background-clip: text;
}

.assistant-ai-mark {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--cognera-gradient);
  box-shadow: 0 12px 22px rgba(98, 101, 240, 0.24);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
}

.assistant-card > div:last-child {
  min-width: 0;
}

.assistant-card p {
  overflow-wrap: break-word;
}

.operations-dashboard .operations-title {
  max-width: 100%;
  font-size: clamp(1rem, 4.6vw, 3.2rem);
  white-space: nowrap;
}

.operations-dashboard,
.operations-dashboard .app-shell,
.operations-dashboard .sidebar,
.operations-dashboard .workspace {
  max-width: 100%;
  overflow-x: clip;
}

.operations-dashboard .app-shell {
  min-height: calc(100vh - var(--site-header-height));
}

.operations-dashboard .sidebar {
  top: var(--site-header-height);
  height: calc(100vh - var(--site-header-height));
}

.dashboard-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 18px;
}

.dashboard-control-row .period-strip {
  flex: 1 1 auto;
  margin: 0;
}

.about-actions {
  display: flex;
  flex: 0 1 360px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.about-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(98, 101, 240, 0.22);
  border-radius: 8px;
  color: #fff;
  background: var(--cognera-gradient);
  box-shadow: 0 12px 24px rgba(98, 101, 240, 0.18);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.about-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(98, 101, 240, 0.24);
}

.operations-dashboard .category-button.active {
  background: var(--cognera-gradient);
  box-shadow: 0 14px 26px rgba(98, 101, 240, 0.24);
}

.operations-dashboard .period-button.active,
.operations-dashboard .scope-card.active {
  background: var(--cognera-gradient);
}

.operations-dashboard .dashboard-grid .panel-wide {
  grid-row: auto;
}

.operations-dashboard .chart-stage {
  min-height: 234px;
}

.operations-dashboard .trend-svg {
  height: 234px;
}

.operation-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--violet);
  background: #f0edff;
  font-size: 0.72rem;
  font-weight: 850;
}

.scope-card.active .operation-tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.metric-main .operation-tag {
  margin-bottom: 7px;
}

.metric-main .metric-status {
  margin-right: 8px;
}

.metric-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  margin: 10px 0 0;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: var(--cognera-gradient);
  box-shadow: 0 14px 26px rgba(98, 101, 240, 0.18);
  font-weight: 850;
}

.metric-group-heading strong {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  font-weight: 850;
}

.metric-group-heading span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.change-context {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: uppercase;
}

.previous-trend-path {
  fill: none;
  stroke: var(--teal);
  stroke-dasharray: 8 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  opacity: 0.88;
}

.previous-trend-dot {
  fill: #fff;
  stroke: var(--teal);
  stroke-width: 2.5;
  animation: pulseIn 540ms ease both;
}

.trend-legend text {
  fill: #56688e;
  font-size: 12px;
  font-weight: 800;
}

.legend-current-line {
  stroke: url(#trendStroke);
  stroke-linecap: round;
  stroke-width: 4;
}

.legend-previous-line {
  stroke: var(--teal);
  stroke-dasharray: 7 6;
  stroke-linecap: round;
  stroke-width: 3;
}

@media (max-width: 1560px) {
  .operations-dashboard .topbar {
    display: grid;
  }

  .operations-dashboard .toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .operations-dashboard .search-field {
    grid-template-columns: 24px minmax(0, 390px);
  }
}

@media (max-width: 1180px) {
  .operations-dashboard .dashboard-control-row {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .operations-dashboard .about-actions {
    width: 100%;
    justify-self: stretch;
    justify-content: flex-end;
  }
}

@media (max-width: 1040px) {
  .operations-dashboard {
    --site-header-height: 68px;
  }

  .operations-dashboard .site-header {
    position: sticky;
  }

  .operations-dashboard .nav-shell {
    width: calc(100% - 32px);
    min-height: var(--site-header-height);
    gap: 12px;
  }

  .operations-dashboard .brand {
    max-width: calc(100% - 58px);
  }

  .operations-dashboard .brand span {
    font-size: 1rem;
  }

  .operations-dashboard .menu-toggle {
    position: relative;
    z-index: 90;
    display: inline-flex;
    flex: 0 0 44px;
  }

  .operations-dashboard .nav-links {
    position: fixed;
    top: calc(var(--site-header-height) + 8px);
    right: 16px;
    left: 16px;
    z-index: 85;
    display: none;
    max-height: calc(100dvh - var(--site-header-height) - 24px);
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    overflow-y: auto;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius);
    background: var(--site-white);
    box-shadow: var(--site-shadow);
    overscroll-behavior: contain;
  }

  .operations-dashboard .nav-links.open {
    display: flex;
  }

  .operations-dashboard .nav-links a {
    justify-content: space-between;
    min-height: 48px;
  }

  .operations-dashboard .nav-item,
  .operations-dashboard .nav-dropdown {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .operations-dashboard .nav-dropdown::after,
  .operations-dashboard .nav-dropdown-toggle::after {
    display: none;
  }

  .operations-dashboard .nav-dropdown-toggle {
    width: 100%;
  }

  .operations-dashboard .nav-submenu {
    position: static;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    min-width: 0;
    max-height: none;
    margin: 0 0 8px;
    padding: 6px 0 4px;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition: none;
    visibility: visible;
  }

  .operations-dashboard .nav-dropdown.is-open .nav-submenu {
    display: grid;
  }

  .operations-dashboard .nav-submenu a {
    min-height: 40px;
    justify-content: flex-start;
    padding: 9px 12px;
    background: rgba(98, 101, 240, 0.05);
    font-size: 0.84rem;
    line-height: 1.2;
    white-space: normal;
  }

  .operations-dashboard .nav-links .nav-cta {
    justify-content: center;
    margin-left: 0;
  }
}

@media (max-width: 1400px) {
  .topbar {
    display: grid;
  }

  .toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .search-field {
    grid-template-columns: 24px minmax(0, 390px);
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }
}

@media (max-width: 900px) {
  .operations-dashboard .sidebar {
    top: 0;
    height: auto;
  }

  .operations-dashboard .operations-title {
    font-size: clamp(1rem, 5.2vw, 2rem);
  }

  .operations-dashboard .kpi-grid {
    grid-template-columns: 1fr;
  }

  .operations-dashboard .search-field {
    grid-template-columns: 24px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .operations-dashboard .nav-shell {
    width: calc(100% - 28px);
  }

  .operations-dashboard .brand img {
    width: 32px;
    height: 32px;
  }

  .operations-dashboard .brand span {
    max-width: calc(100vw - 104px);
    font-size: 0.94rem;
  }

  .operations-dashboard .dashboard-control-row {
    gap: 10px;
  }

  .operations-dashboard .about-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .operations-dashboard .about-button {
    width: 100%;
    white-space: normal;
  }

  .operations-dashboard .app-shell,
  .operations-dashboard .sidebar,
  .operations-dashboard .workspace {
    width: 100%;
    max-width: 100vw;
  }

  .operations-dashboard .sidebar,
  .operations-dashboard .workspace {
    padding-right: 14px;
    padding-left: 14px;
  }

  .operations-dashboard .brand-lockup,
  .operations-dashboard .category-button,
  .operations-dashboard .assistant-card,
  .operations-dashboard .topbar,
  .operations-dashboard .toolbar,
  .operations-dashboard .period-strip,
  .operations-dashboard .scope-section,
  .operations-dashboard .kpi-grid,
  .operations-dashboard .dashboard-grid,
  .operations-dashboard .metric-section {
    max-width: 100%;
    min-width: 0;
  }

  .operations-dashboard .brand-lockup,
  .operations-dashboard .sidebar > .category-button,
  .operations-dashboard .category-list,
  .operations-dashboard .assistant-card {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .operations-dashboard .operations-title {
    font-size: clamp(0.63rem, 3.18vw, 1.08rem);
  }

  .operations-dashboard .assistant-card {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    margin-right: 0;
    margin-left: 0;
  }

  .operations-dashboard .category-button {
    padding-right: 8px;
    padding-left: 8px;
  }

  .metric-group-heading {
    display: grid;
    gap: 4px;
    align-items: center;
    justify-content: stretch;
    min-height: 56px;
    padding: 8px 14px;
  }

  .metric-group-heading strong {
    justify-self: start;
  }
}
