:root {
  --bg-1: #0f172a;
  --bg-2: #111827;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --line: #34445f;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --header-bg-solid: #0f172a;
  --tab-rail-top: #0b1020;
  --tab-inactive: #0b1020;
  --tab-border: #34445f;
  --tab-border-hover: #4b607f;
  --font-ui: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:
    "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --theme-ops: #f59e0b;
  --theme-ops-glow: #fbbf24;
  --theme-brain: #38bdf8;
  --theme-brain-glow: #7dd3fc;
  --theme-lab: #22c55e;
  --theme-lab-glow: #4ade80;

  --module-accent: var(--theme-ops);
  --module-glow: var(--theme-ops-glow);
  --footer-zone-height: 150px;
}

body[data-module="ops"] {
  --module-accent: var(--theme-ops);
  --module-glow: var(--theme-ops-glow);
}
body[data-module="brain"] {
  --module-accent: var(--theme-brain);
  --module-glow: var(--theme-brain-glow);
}
body[data-module="lab"] {
  --module-accent: var(--theme-lab);
  --module-glow: var(--theme-lab-glow);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, #1e293b, var(--bg-1) 40%),
    linear-gradient(140deg, var(--bg-2), #0b1020);
  overflow: hidden;
}

.desktop-bg {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(1px);
}

/* Full-width shell: no outer rounded frame or vertical borders */
.app-window {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--footer-zone-height);
  border: none;
  border-radius: 0;
  background: var(--panel);
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: none;
}

.module-header {
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
  display: grid;
  gap: 10px;
  background: var(--header-bg-solid);
}

/* Full-width tab rail with single accent line */
.top-tabs-rail {
  order: -1;
  width: 100%;
  margin: 0;
  padding: 10px 12px 0;
  position: relative;
  background: var(--tab-rail-top);
}

.top-tabs-rail::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--module-accent);
  box-shadow: 0 -2px 4px
    color-mix(in srgb, var(--module-glow) 100%, transparent);
  pointer-events: none;
  z-index: 0;
}

.top-tabs-rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--module-glow) 12%, transparent),
    transparent
  );
  pointer-events: none;
  z-index: 0;
}

.top-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 0;
  position: relative;
}

.tab {
  border: 2px solid var(--tab-border);
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  background: var(--tab-inactive);
  background-clip: padding-box;
  overflow: visible;
  color: #94a3b8;
  padding: 8px 13px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  min-height: 34px;
  transform: translateY(-2px);
  position: relative;
  isolation: isolate;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition:
    color 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.tab::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: -2px;
  bottom: 0;
  border-radius: 12px 12px 0 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  box-shadow:
    0 -2px 6px color-mix(in srgb, var(--module-glow) 25%, transparent),
    -5px -2px 5px color-mix(in srgb, var(--module-glow) 25%, transparent),
    5px -2px 5px color-mix(in srgb, var(--module-glow) 25%, transparent);
  transition: opacity 120ms ease;
}

.tab:hover {
  color: #cbd5e1;
  border-color: var(--module-accent);
}

.tab:hover::before {
  opacity: 1;
}

.tab.active {
  color: #ffffff;
  text-shadow: 0 0 8px color-mix(in srgb, var(--module-glow) 85%, transparent);
  background: var(--header-bg-solid);
  border-color: var(--module-accent);
  transform: translateY(-2px);
  z-index: 2;
}

.tab.active::before {
  opacity: 1;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 6px;
  background: var(--header-bg-solid);
}

.tab.dragging {
  opacity: 0.45;
}

.module-title-wrap {
  padding: 4px 16px 0;
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  grid-template-areas:
    "icon title refresh bell"
    "icon subtitle refresh bell";
  align-items: center;
  column-gap: 10px;
}
.module-title-icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}
.module-title-icon svg {
  width: 34px;
  height: 34px;
  color: var(--module-accent);
  filter: drop-shadow(0 0 8px var(--module-glow));
}
.module-title-wrap h1 {
  grid-area: title;
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.3px;
  color: var(--module-accent);
  text-shadow: 0 0 10px var(--module-glow);
}
.module-title-wrap p {
  grid-area: subtitle;
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13px;
}

.module-content {
  overflow: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--module-accent) transparent;
}

body[data-module="brain"] .module-content {
  overflow: hidden;
}

body[data-module="ops"] .module-content:has(.ops-workspaces-page) {
  overflow: hidden;
}

.module-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.module-content::-webkit-scrollbar-thumb {
  background: var(--module-accent);
  border-radius: 8px;
}
.module-content::-webkit-scrollbar-thumb:hover {
  background: var(--module-accent);
}
.module-content::-webkit-scrollbar-thumb:active {
  background: var(--module-accent);
}
.module-content::-webkit-scrollbar-track {
  background: transparent;
}

.content-flow {
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 24px;
}

#moduleContent {
  display: block;
  min-height: 100%;
  padding-bottom: 8px;
}

.content-divider {
  height: 2px;
  border-radius: 2px;
  background: var(--module-accent);
  box-shadow: 0 0 10px var(--module-glow);
}

.footer-zone .content-divider {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}
.grid {
  display: grid;
  gap: 12px;
}
.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card-group > h3 {
  margin-bottom: 10px;
  color: var(--text);
  text-shadow: 0 0 8px var(--module-glow);
}

.session-card {
  cursor: pointer;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}
.session-card:hover,
.session-card:focus-visible {
  border-color: var(--module-accent);
  box-shadow: 0 0 0 1px var(--module-accent) inset;
  outline: none;
}

.session-card-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(2, 6, 23, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  justify-items: center;
  align-items: start;
  padding-top: 6vh;
  padding-bottom: 24px;
  overflow-y: auto;
}
.session-modal {
  width: min(75vw, 1200px);
  min-height: 500px;
  max-height: 82vh;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.72),
    rgba(15, 23, 42, 0.68)
  );
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-rows: auto 1fr;
}
.session-modal.expanded-history {
  max-height: 90vh;
}
.session-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.48);
}
.session-modal-body {
  padding: 12px;
  overflow: hidden;
}
.icon-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.35);
  color: var(--text);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover {
  border-color: var(--module-accent);
}

.session-meta-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr 1.2fr;
  gap: 12px;
  align-items: stretch;
}
.meta-col {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.meta-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.meta-col > span:last-child {
  font-size: 13px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.meta-tokens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.24);
}
.token-col {
  text-align: right;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.3);
  color: var(--text);
  border-radius: 10px;
  padding: 16px 15px;
  cursor: pointer;
}
.accordion-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.accordion-chevron {
  width: 16px;
  height: 16px;
  color: var(--module-accent);
  transition: transform 180ms ease;
}
.accordion-trigger[aria-expanded="true"] .accordion-chevron {
  transform: rotate(180deg);
}
.session-history-preview {
  margin-top: 14px;
  min-height: 240px;
  max-height: 260px;
  overflow: hidden;
}
#historyCard.open .session-history-preview {
  display: none;
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
}
.accordion-panel.open {
  max-height: 58vh;
  margin-top: 14px;
}

.session-history {
  display: grid;
  gap: 10px;
  max-height: calc(58vh - 44px);
  overflow: auto;
  padding-right: 4px;
}
.history-pager {
  margin-top: 10px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.history-pager.is-hidden {
  visibility: hidden;
  pointer-events: none;
}
.history-pager .btn[disabled] {
  opacity: 0.45;
  cursor: default;
}
.history-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(30, 41, 59, 0.55);
}
.session-history-preview .history-item {
  margin-bottom: 8px;
}
.session-history-preview .history-item:last-child {
  margin-bottom: 0;
}
.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.history-item pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}

.session-modal-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}
.session-modal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.session-modal-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 8px;
}
.session-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.ops-session-history-list {
  scrollbar-width: thin;
  scrollbar-color: var(--module-accent) transparent;
}
.ops-session-history-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.ops-session-history-list::-webkit-scrollbar-thumb {
  background: var(--module-accent);
  border-radius: 8px;
}
.ops-session-history-list::-webkit-scrollbar-thumb:hover {
  background: var(--module-accent);
}
.ops-session-history-list::-webkit-scrollbar-thumb:active {
  background: var(--module-accent);
}
.ops-session-history-list::-webkit-scrollbar-track {
  background: transparent;
}

.card {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 14px;
  padding: 14px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--text);
  text-shadow: 0 0 8px var(--module-glow);
}
.card p,
.card li {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.card ul {
  margin: 8px 0 0 18px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.mission-header {
  display: grid;
  gap: 6px;
  justify-items: start;
}
.title-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}
.title-with-icon svg {
  width: 16px;
  height: 16px;
  color: var(--module-accent);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 4px var(--module-glow));
}

.lab-prototypes-title > span:first-of-type,
.brain-automation-title > span:first-of-type {
  text-shadow: 0 0 12px color-mix(in srgb, var(--module-glow) 72%, transparent);
}
.refresh-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  min-width: 22px;
}
.refresh-dots span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--module-accent);
  opacity: 0.08;
  box-shadow: 0 0 0 transparent;
  animation: none;
}
.refresh-dots span:nth-child(1) {
  animation: dot-stack-1 1000ms linear infinite;
}
.refresh-dots span:nth-child(2) {
  animation: dot-stack-2 1000ms linear infinite;
}
.refresh-dots span:nth-child(3) {
  animation: dot-stack-3 1000ms linear infinite;
}
.subcard h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
  text-shadow: none;
}
.subitem-title {
  display: block;
}

.kv {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.28);
  padding: 8px 0;
  font-size: 13px;
  gap: 10px;
}

.kv > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.kv > :last-child {
  min-width: 0;
  flex: 0 0 auto;
  text-align: right;
}
.kv:last-child {
  border-bottom: none;
}

.inline-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cron-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cron-actions-left {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.cron-actions-right {
  margin-left: auto;
}

.cron-actions-split {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.cron-run-btn {
  min-width: 78px;
}

.org-header-card {
  padding: 0 0 8px;
  background: none;
  border: 0;
  box-shadow: none;
}

.org-chart-wrap {
  margin-top: 10px;
  display: grid;
  gap: 14px;
}

.org-level {
  display: grid;
  gap: 14px;
  justify-content: center;
  position: relative;
}

.org-level-top,
.org-level-mid {
  grid-template-columns: minmax(300px, 380px);
}

.org-level-account-managers {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  position: relative;
  padding-top: 18px;
}

.org-level-account-managers::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(16.666% + 18px);
  right: calc(16.666% + 18px);
  height: 2px;
  background: color-mix(in srgb, var(--module-accent) 48%, transparent);
}

.org-level-account-managers > .org-node {
  position: relative;
}

.org-level-account-managers > .org-node::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 50%;
  width: 2px;
  height: 18px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--module-accent) 48%, transparent);
}

.org-node {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-style: solid;
  padding: 12px 14px 12px 0;
}

.org-node-status-rail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: color-mix(in srgb, var(--line) 75%, transparent);
}

.org-node.is-active .org-node-status-rail,
.org-node-primary .org-node-status-rail {
  background: linear-gradient(180deg, color-mix(in srgb, var(--module-accent) 92%, #ffd166), color-mix(in srgb, var(--module-accent) 68%, transparent));
}

.org-node-body {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-left: 14px;
}

.org-node-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-soft) 88%, #182132), color-mix(in srgb, var(--bg-1) 95%, black));
  color: color-mix(in srgb, var(--module-accent) 72%, #e2e8f0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.org-node-avatar i {
  width: 22px;
  height: 22px;
}

.org-node-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.org-node-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.org-node-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.org-node-edit-btn {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.org-node h4 {
  margin: 0;
}

.org-node-role {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.org-node-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.org-node-state {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--panel-soft) 88%, black);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.org-node.is-active .org-node-state,
.org-node-primary .org-node-state {
  border-color: color-mix(in srgb, var(--module-accent) 60%, transparent);
  color: #fff3d6;
}

.org-node-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.org-node-primary {
  border-color: color-mix(in srgb, var(--module-accent) 65%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-glow) 25%, transparent) inset;
}

.org-cluster {
  display: grid;
  gap: 14px;
  position: relative;
}

.org-cluster-root::before {
  display: none;
}

.org-cluster::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 50%;
  width: 2px;
  height: 18px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--module-accent) 48%, transparent);
}

.org-cluster-children {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 14px;
  position: relative;
}

.org-cluster-children-multi {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.org-cluster-children::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: color-mix(in srgb, var(--module-accent) 40%, transparent);
}

.org-cluster-children > .org-node {
  position: relative;
}

.org-cluster-children > .org-node::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  width: 2px;
  height: 14px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--module-accent) 40%, transparent);
}

.org-node-dashed {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
}

.org-node-compact .org-node-body {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
}

.org-node-compact .org-node-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.org-node-compact .org-node-avatar i {
  width: 18px;
  height: 18px;
}

.org-connector {
  height: 24px;
  position: relative;
}

.org-connector::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--module-accent) 45%, transparent);
}

.team-header-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.team-header-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.team-header-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--bg-2) 88%, black);
  min-width: 0;
  max-width: 100%;
}

.team-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  min-width: 0;
}

.team-view-btn.active {
  border-color: color-mix(in srgb, var(--module-accent) 68%, transparent);
  color: #fff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--module-glow) 30%, transparent);
}

.team-member-trigger {
  cursor: pointer;
}

.team-member-trigger:hover {
  border-color: color-mix(in srgb, var(--module-accent) 72%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-glow) 25%, transparent) inset;
}

.team-office-shell {
  margin-top: 8px;
  width: 100%;
  min-width: 0;
}

.team-office-canvas {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 765.93 / 481.21;
  max-height: min(84vh, 980px);
  min-height: clamp(380px, 64vh, 820px);
  overflow: hidden;
  border: 1px solid rgba(126, 184, 255, 0.14);
  border-radius: 22px;
  background: #1E293B;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.office-blueprint-shell {
  position: absolute;
  inset: 0;
  color: #bfd8ff;
}

.office-floorplan-stage {
  position: absolute;
}

@media (max-width: 900px) {
  .team-office-canvas {
    min-height: clamp(320px, 50vh, 600px);
    max-height: min(80vh, 760px);
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .team-office-canvas {
    aspect-ratio: 481.21 / 765.93;
    min-height: clamp(420px, 68vh, 820px);
    max-height: min(82vh, 900px);
  }
}

.office-floorplan-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.office-location {
  position: absolute;
  background: rgba(170, 188, 205, 0.03);
  border: 1px dashed rgba(205, 219, 232, 0.35);
  border-radius: 12px;
}

.office-location-label {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(234, 241, 248, 0.92);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.office-location-label i {
  width: 11px;
  height: 11px;
}

.office-location-chips {
  position: absolute;
  inset: 28px 8px 8px 8px;
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: start;
}

.office-capacity-1 { grid-template-columns: 1fr; }
.office-capacity-2 { grid-template-columns: repeat(2, minmax(0, max-content)); }
.office-capacity-3,
.office-capacity-4,
.office-capacity-5,
.office-capacity-6,
.office-capacity-7,
.office-capacity-8 { grid-template-columns: repeat(2, minmax(0, max-content)); }

.office-marker-slot-empty {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px dashed rgba(156, 202, 255, 0.16);
  opacity: 0.22;
}

.office-member-marker {
  --member-accent: #78bfff;
  position: absolute;
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f3f8ff;
  cursor: pointer;
  text-align: center;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
  transition: transform 140ms ease, filter 140ms ease;
}

.office-member-marker:hover {
  transform: translate(-50%, calc(-100% - 1px)) scale(1.02);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--member-accent) 58%, transparent));
}

.office-member-marker-body {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.office-member-marker-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.office-member-marker-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--member-accent) 28%, rgba(8, 14, 24, 0.82));
  color: var(--member-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--member-accent) 48%, transparent);
  flex: 0 0 auto;
}

.office-member-marker-icon i {
  width: 18px;
  height: 18px;
}

.office-member-marker-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 10px color-mix(in srgb, var(--member-accent) 20%, transparent);
  white-space: nowrap;
}

.office-member-marker-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(8, 14, 24, 0.82);
  border: 1px solid color-mix(in srgb, var(--member-accent) 36%, transparent);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 118px;
}

.office-member-marker-pointer {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid color-mix(in srgb, var(--member-accent) 82%, rgba(255, 255, 255, 0.12));
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.ops-team-member-modal {
  max-width: min(900px, calc(100vw - 40px));
}

.ops-team-member-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ops-team-member-modal-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.team-roster-access {
  display: grid;
  gap: 12px;
}

.team-roster-access-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.team-roster-access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-2) 82%, black);
}

.team-roster-access-meta {
  margin: 4px 0 0;
}

.session-card-title,
.cron-card-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cron-card-link {
  cursor: pointer;
}

.cron-card-link:hover,
.cron-card-link:focus-visible {
  border-color: var(--module-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-glow) 35%, transparent) inset;
  outline: none;
}

.cron-actions-compact {
  flex-wrap: nowrap;
  gap: 6px;
}

.cron-actions-compact .btn {
  padding: 5px 8px;
  white-space: nowrap;
}

.cron-actions-compact .cron-run-btn {
  min-width: 52px;
}

.config-shell {
  height: 100%;
}

.config-render {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
}

.config-render-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.config-render-subtitle {
  margin: 6px 0 0;
}

.config-readonly-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #35517b);
  background: color-mix(in srgb, var(--module-glow) 10%, #13203a);
  color: #cddcf0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.config-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.config-summary-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.config-summary-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c8d8ee;
  font-size: 12px;
}

.config-summary-head svg {
  width: 14px;
  height: 14px;
  color: var(--module-accent);
}

.config-summary-value {
  font-size: 24px;
  font-weight: 700;
  color: #f5f9ff;
}

.config-summary-meta {
  font-size: 12px;
  line-height: 1.45;
}

.config-inspector-body {
  display: grid;
  align-content: start;
  gap: 14px;
}

.config-section-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.config-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.config-section-subtitle {
  margin: 6px 0 0;
}

.config-section-body {
  min-width: 0;
}

.config-tree-group {
  display: grid;
  gap: 10px;
}

.config-tree-branch {
  border: 1px solid color-mix(in srgb, var(--line) 68%, #213150);
  border-radius: 12px;
  background: color-mix(in srgb, var(--module-glow) 4%, #0f172c);
  overflow: hidden;
}

.config-tree-branch summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
}

.config-tree-branch summary::-webkit-details-marker {
  display: none;
}

.config-tree-branch[open] > summary {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 68%, #213150);
  background: color-mix(in srgb, var(--module-glow) 8%, #13203a);
}

.config-branch-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #f5f9ff;
  word-break: break-word;
}

.config-branch-meta {
  color: #91a7c4;
  font-size: 12px;
  text-align: right;
}

.config-tree-body {
  padding: 12px;
}

.config-value-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #3c5275);
  background: color-mix(in srgb, var(--module-glow) 8%, #13203a);
  color: #e7f0fb;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.config-value-chip.is-boolean {
  color: #d8f7e2;
}

.config-value-chip.is-number {
  color: #d7e8ff;
}

.config-value-chip.is-null,
.config-value-chip.is-empty {
  color: #9fb3cd;
}

.config-leaf-string {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 68%, #24385e);
  background: rgba(8, 12, 22, 0.48);
  color: #e8f1ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.automation-shell {
  height: 100%;
}

.skills-directory-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  height: 100%;
  min-height: 0;
}

.skills-directory-head {
  display: grid;
  gap: 12px;
}

.skills-directory-head-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.skills-directory-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.skills-searchbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  min-width: 290px;
  margin-left: auto;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--module-accent) 36%, rgba(255,255,255,0.08));
  background: rgba(8, 12, 22, 0.78);
  color: #9fb3cd;
}

.skills-searchbox i {
  width: 15px;
  height: 15px;
  color: var(--module-accent);
}

.skills-searchbox input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5f9ff;
  font-size: 12px;
}

.skills-searchbox input::placeholder {
  color: #7d91ab;
}

.skills-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills-filter-row-primary {
  align-items: center;
}

.skills-filter-separator {
  color: rgba(148, 163, 184, 0.72);
  font-size: 16px;
  line-height: 1;
  align-self: center;
}

.filter-chip-count {
  color: #7f8fa6;
  font-weight: 600;
}

.skills-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--module-accent) 55%, rgba(255,255,255,0.08));
  background: color-mix(in srgb, var(--module-accent) 10%, rgba(10,14,24,0.92));
  color: #d8e5f7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.skills-filter-btn:hover {
  border-color: color-mix(in srgb, var(--module-accent) 80%, white 20%);
  background: color-mix(in srgb, var(--module-accent) 16%, rgba(10,14,24,0.94));
  color: #f8fbff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-accent) 16%, transparent), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.skills-filter-btn.filter-active {
  border-color: color-mix(in srgb, var(--module-accent) 90%, white 10%);
  background: color-mix(in srgb, var(--module-accent) 22%, rgba(10,14,24,0.96));
  color: #ffffff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-accent) 22%, transparent), 0 0 24px color-mix(in srgb, var(--module-glow) 24%, transparent);
}

.skills-badge-grid-wrap {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.skills-badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.skills-badge-card {
  min-width: 0;
  min-height: 170px;
  padding: 11px 12px 10px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  border: 2px solid rgba(125, 211, 252, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(11, 16, 32, 0.96)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 45%);
  text-align: left;
  cursor: pointer;
}

.skills-badge-card:hover {
  border-color: color-mix(in srgb, var(--module-accent) 52%, rgba(255,255,255,0.16));
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.22),
    0 0 0 1px color-mix(in srgb, var(--module-accent) 18%, transparent),
    0 0 18px color-mix(in srgb, var(--module-glow) 18%, transparent);
}

.skills-badge-card-skill {
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.08);
}

.skills-badge-card-plugin {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.skills-badge-topline {
  display: block;
}

.skills-badge-headgroup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.skills-badge-iconbox {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--module-accent) 42%, rgba(255,255,255,0.08));
  background: color-mix(in srgb, var(--module-accent) 10%, rgba(9,13,22,0.96));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.skills-badge-card-skill .skills-badge-iconbox {
  border-color: color-mix(in srgb, #8b5cf6 42%, rgba(255,255,255,0.08));
  background: color-mix(in srgb, #8b5cf6 12%, rgba(9,13,22,0.96));
}

.skills-badge-card-plugin .skills-badge-iconbox {
  border-color: color-mix(in srgb, #3b82f6 42%, rgba(255,255,255,0.08));
  background: color-mix(in srgb, #3b82f6 12%, rgba(9,13,22,0.96));
}

.skills-badge-titlewrap {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.skills-badge-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.skills-badge-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.12;
  color: rgba(248, 251, 255, 0.88);
  text-shadow: none !important;
  filter: none;
  transition: color 160ms ease, text-shadow 160ms ease, filter 160ms ease;
}

.skills-badge-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  margin-top: -1px;
}

.skills-badge-subtitle {
  margin: 0;
  font-size: 11px;
  line-height: 1.1;
  color: #9db1cc;
}

.skills-badge-led {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 3px;
  border: 1px solid rgba(255,255,255,0.28);
  background: #64748b;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.55);
}

.skills-badge-led.is-active {
  background: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.75), 0 0 0 1px rgba(15, 23, 42, 0.55);
}

.skills-badge-led.is-inactive {
  background: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.72), 0 0 0 1px rgba(15, 23, 42, 0.55);
}

.skills-badge-led.is-unknown {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.72), 0 0 0 1px rgba(15, 23, 42, 0.55);
}

.skills-badge-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--module-accent);
  filter: none;
  transition: color 160ms ease, filter 160ms ease;
}

.skills-badge-card-skill .skills-badge-icon {
  color: #c4b5fd;
  filter: none;
}

.skills-badge-card-plugin .skills-badge-icon {
  color: #93c5fd;
  filter: none;
}

.skills-badge-card:hover .skills-badge-title {
  color: #f8fbff;
  text-shadow: 0 0 10px color-mix(in srgb, var(--module-glow) 28%, transparent) !important;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--module-glow) 18%, transparent));
}

.skills-badge-card:hover .skills-badge-iconbox {
  box-shadow: 0 0 14px color-mix(in srgb, var(--module-glow) 20%, transparent);
}

.skills-badge-card-skill:hover .skills-badge-iconbox {
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.26);
}

.skills-badge-card-plugin:hover .skills-badge-iconbox {
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.26);
}

.skills-badge-card:hover .skills-badge-icon {
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--module-glow) 55%, transparent));
}

.skills-badge-card-skill:hover .skills-badge-icon {
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.42));
}

.skills-badge-card-plugin:hover .skills-badge-icon {
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.42));
}

.skills-badge-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-badge-chip-row-bottom {
  align-items: center;
}

.skills-type-pill,
.skills-badge-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, #172742 88%, transparent);
}

.skills-type-pill.is-skill {
  color: #c4b5fd;
  border-color: color-mix(in srgb, #8b5cf6 40%, transparent);
  background: color-mix(in srgb, #8b5cf6 12%, #172742);
}

.skills-type-pill.is-plugin {
  color: #93c5fd;
  border-color: color-mix(in srgb, #3b82f6 40%, transparent);
  background: color-mix(in srgb, #3b82f6 12%, #172742);
}

.skills-badge-chip.is-status.is-ready,
.skills-badge-chip.is-status.is-enabled,
.skills-badge-chip.is-status.is-loaded {
  color: #86efac;
  border-color: color-mix(in srgb, #22c55e 40%, transparent);
  background: color-mix(in srgb, #22c55e 12%, #172742);
}

.skills-badge-chip.is-status.is-missing,
.skills-badge-chip.is-status.is-disabled,
.skills-badge-chip.is-status.is-unknown {
  color: #fda4af;
  border-color: color-mix(in srgb, #ef4444 38%, transparent);
  background: color-mix(in srgb, #ef4444 12%, #172742);
}

.skills-badge-chip.is-version {
  color: #cbd5e1;
}

.skills-badge-copy {
  min-width: 0;
  margin-top: 6px;
}

.skills-badge-description {
  margin: 0;
  font-size: 12px;
  line-height: 1.28;
  color: #d4deee;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skills-badge-footer {
  margin-top: auto;
  padding-top: 0;
}

@media (max-width: 1400px) {
  .skills-badge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .skills-badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .skills-directory-shell {
    padding: 14px;
  }

  .skills-directory-head-top {
    grid-template-columns: 1fr;
  }

  .skills-searchbox {
    min-width: 0;
    width: 100%;
    margin-left: 0;
  }

  .skills-filter-btn {
    min-height: 32px;
    padding: 0 12px;
  }

  .skills-badge-grid {
    grid-template-columns: 1fr;
  }
}

.skills-directory-modal {
  width: min(82vw, 1080px);
}

.skills-directory-modal-body {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.skills-modal-header {
  min-height: 42px;
  padding: 5px 10px;
}

.skills-modal-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skills-modal-title {
  margin: 0;
  min-width: 0;
  line-height: 1;
}

.skills-modal-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.skills-modal-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 10px;
  min-height: 0;
}

.skills-modal-description {
  margin: 0;
  line-height: 1.45;
}

.skills-modal-meta-grid {
  display: grid;
  gap: 0;
  align-content: start;
}

.skills-modal-section {
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(19, 27, 44, 0.9), rgba(12, 18, 32, 0.92));
}

.skills-modal-section .kv {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 6px 0;
  gap: 12px;
}

.skills-modal-section .kv > :last-child {
  max-width: 64%;
  overflow-wrap: anywhere;
}

.skills-modal-description-card,
.skills-modal-meta-grid {
  padding: 12px;
}

.skills-modal-doc-section {
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.skills-modal-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.skills-modal-doc-path {
  margin: 4px 0 0;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(70vw, 840px);
}

.skills-modal-doc-scroll {
  min-height: 240px;
  overflow: auto;
  padding: 12px;
}

.skills-modal-doc-head .icon-btn {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.skills-modal-doc-head .icon-btn:hover,
.skills-modal-doc-head .icon-btn:focus-visible {
  border-color: transparent;
  color: var(--module-accent);
  background: color-mix(in srgb, var(--module-accent) 10%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--module-accent) 45%, transparent);
}

.skills-modal-doc-preview,
.skills-modal-doc-raw {
  max-height: none;
  margin: 0;
}

.skills-modal-doc-preview {
  overflow: visible !important;
  height: auto;
  max-height: none;
}

.skills-modal-doc-scroll .skills-modal-doc-preview {
  overflow: visible !important;
}

.skills-modal-doc-preview pre {
  overflow: visible;
  white-space: pre-wrap;
}

.skills-modal-doc-raw {
  white-space: pre-wrap;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.9);
  font-size: 12px;
}

@media (max-width: 820px) {
  .skills-directory-modal {
    width: min(94vw, 720px);
  }

  .skills-modal-summary-grid {
    grid-template-columns: 1fr;
  }

  .skills-modal-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .skills-modal-doc-scroll {
    min-height: 220px;
  }
}

.automation-menu {
  min-width: 0;
}

.automation-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.automation-brief-item {
  align-items: stretch;
}

.automation-brief-copy {
  gap: 4px;
  min-width: 0;
}

.automation-brief-label {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.automation-brief-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
  line-height: 1.3;
}

.automation-brief-schedule {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automation-brief-meta {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 8px;
  flex: 0 0 auto;
}

.automation-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, #172742 88%, transparent);
  color: #cbd5e1;
  flex: 0 0 auto;
}

.automation-status-badge-nav {
  min-width: 0;
  padding: 2px 6px;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.automation-status-badge.is-online {
  color: #86efac;
  border-color: color-mix(in srgb, #22c55e 42%, transparent);
  background: color-mix(in srgb, #22c55e 12%, #172742);
}

.automation-status-badge.is-running {
  color: #93c5fd;
  border-color: color-mix(in srgb, #3b82f6 42%, transparent);
  background: color-mix(in srgb, #3b82f6 12%, #172742);
  box-shadow: 0 0 12px color-mix(in srgb, #3b82f6 18%, transparent);
}

.automation-status-badge.is-paused {
  color: #fde68a;
  border-color: color-mix(in srgb, #f59e0b 42%, transparent);
  background: color-mix(in srgb, #f59e0b 12%, #172742);
}

.automation-status-badge.is-offline {
  color: #fca5a5;
  border-color: color-mix(in srgb, #ef4444 42%, transparent);
  background: color-mix(in srgb, #ef4444 12%, #172742);
}

.automation-detail-card {
  min-width: 0;
}

.automation-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.automation-detail-head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.automation-data-table {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px 10px;
}

.automation-data-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.automation-data-val {
  font-size: 13px;
  color: var(--muted);
}

.automation-instructions-modal {
  width: min(82vw, 860px);
}

.automation-instructions-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 6px;
  height: min(68vh, 680px);
}

.automation-payload-title {
  margin: 8px 0 0;
}

.automation-meta-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
}

.automation-meta-head {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

.automation-meta-val {
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automation-payload-wrap {
  min-height: 0;
  height: 100%;
}

.automation-payload-wrap-inline {
  margin-top: 8px;
  min-height: 260px;
}

.automation-detail-actions {
  margin-top: 14px;
}

.automation-terminal {
  height: 100%;
  margin: 0;
  overflow: auto;
  background: #0b1224;
  border: 1px solid color-mix(in srgb, #ff4fd8 28%, #334155);
  border-left: 3px solid color-mix(in srgb, #ff4fd8 65%, #94a3b8);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #ff4fd8 14%, transparent);
}

.automation-terminal pre {
  margin: 0;
}

.docs-toc-item.active {
  border-color: var(--module-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-glow) 30%, transparent) inset;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.7);
}
.status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.85);
}
.status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.85);
}

.status-dot.paused {
  background: #eab308;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.9);
}

.status-dot.running {
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.85);
  animation: pulse-running 1.2s ease-in-out infinite;
}
@keyframes pulse-running {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(59, 130, 246, 0.85); }
  50% { opacity: 0.5; box-shadow: 0 0 14px rgba(59, 130, 246, 0.6); }
}

.cron-running-label {
  color: #60a5fa;
  font-style: italic;
}

.cron-btn-running {
  opacity: 0.7;
  pointer-events: none;
}

.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.pill {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  border: 1px solid var(--line);
}
.pill.ok {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.4);
}
.pill.warn {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.4);
}
.pill.bad {
  color: var(--bad);
  border-color: rgba(248, 113, 113, 0.4);
}
.pill.running {
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
  animation: pulse-running 1.2s ease-in-out infinite;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.btn {
  border: 1px solid var(--line);
  background: #1e293b;
  color: var(--text);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--module-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-glow) 35%, transparent)
    inset;
}

.mission-control-link {
  width: 100%;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}
.mission-control-link:hover,
.mission-control-link:focus-visible {
  border-color: var(--module-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-glow) 35%, transparent)
    inset;
  transform: translateY(-1px);
  outline: none;
}

.subcards {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.footer-zone {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-zone-height);
  background: var(--tab-rail-top);
  z-index: 8;
  pointer-events: none;
}

.data-freshness {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 20;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.55);
  padding: 6px 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* macOS-like glass dock */
.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  display: flex;
  gap: 18px;
  padding: 10px 20px;
  border: 1px solid rgba(203, 213, 225, 0.25);
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(16px) saturate(155%);
  -webkit-backdrop-filter: blur(16px) saturate(155%);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
  z-index: 12;
}

.dock-icon {
  --scale: 1;
  width: 62px;
  height: 70px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.75),
    rgba(15, 23, 42, 0.8)
  );
  color: var(--text);
  display: grid;
  place-items: center;
  grid-template-rows: 1fr auto;
  padding: 7px 6px 6px;
  cursor: pointer;
  transform: translateY(calc((var(--scale) - 1) * -5px)) scale(var(--scale));
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
}

.dock-icon svg {
  width: 34px;
  height: 34px;
  color: #cbd5e1;
  transition:
    color 140ms ease,
    filter 140ms ease;
}
.dock-icon small {
  font-size: 10px;
  color: #cbd5e1;
  transition: color 140ms ease;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.dock-icon small::after {
  content: "";
  width: 28px;
  height: 4px;
  border-radius: 3px;
  margin-top: 6px;
  background: #64748b;
  box-shadow: 0 0 0 0 transparent;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}
.dock-icon:hover {
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}
.dock-icon.active {
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}
.dock-icon.active svg,
.dock-icon.active small {
  color: var(--module-glow);
}
.dock-icon.active svg {
  filter: drop-shadow(0 0 8px var(--module-glow));
}
.dock-icon.active small::after {
  background: var(--module-glow);
  box-shadow: 0 0 8px var(--module-glow);
}

.dock-icon[data-module="ops"]:hover {
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}
.dock-icon[data-module="ops"]:hover svg,
.dock-icon[data-module="ops"]:hover small {
  color: var(--theme-ops-glow);
}
.dock-icon[data-module="ops"]:hover svg {
  filter: drop-shadow(0 0 8px var(--theme-ops-glow));
}
.dock-icon[data-module="ops"]:hover small::after {
  background: var(--theme-ops-glow);
  box-shadow: 0 0 8px var(--theme-ops-glow);
}

.dock-icon[data-module="brain"]:hover {
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}
.dock-icon[data-module="brain"]:hover svg,
.dock-icon[data-module="brain"]:hover small {
  color: var(--theme-brain-glow);
}
.dock-icon[data-module="brain"]:hover svg {
  filter: drop-shadow(0 0 8px var(--theme-brain-glow));
}
.dock-icon[data-module="brain"]:hover small::after {
  background: var(--theme-brain-glow);
  box-shadow: 0 0 8px var(--theme-brain-glow);
}

.dock-icon[data-module="lab"]:hover {
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}
.dock-icon[data-module="lab"]:hover svg,
.dock-icon[data-module="lab"]:hover small {
  color: var(--theme-lab-glow);
}
.dock-icon[data-module="lab"]:hover svg {
  filter: drop-shadow(0 0 8px var(--theme-lab-glow));
}
.dock-icon[data-module="lab"]:hover small::after {
  background: var(--theme-lab-glow);
  box-shadow: 0 0 8px var(--theme-lab-glow);
}

@keyframes dot-stack-1 {
  0%,
  12.5%,
  87.5%,
  100% {
    opacity: 0.08;
    transform: scale(0.9);
    box-shadow: 0 0 0 transparent;
  }
  13%,
  87% {
    opacity: 1;
    transform: scale(1.12);
    box-shadow: 0 0 8px var(--module-glow);
  }
}

@keyframes dot-stack-2 {
  0%,
  25%,
  75%,
  100% {
    opacity: 0.08;
    transform: scale(0.9);
    box-shadow: 0 0 0 transparent;
  }
  26%,
  74% {
    opacity: 1;
    transform: scale(1.12);
    box-shadow: 0 0 8px var(--module-glow);
  }
}

@keyframes dot-stack-3 {
  0%,
  37.5%,
  62.5%,
  100% {
    opacity: 0.08;
    transform: scale(0.9);
    box-shadow: 0 0 0 transparent;
  }
  38%,
  62% {
    opacity: 1;
    transform: scale(1.12);
    box-shadow: 0 0 8px var(--module-glow);
  }
}

.mono {
  font-family: var(--font-mono);
}
.muted {
  color: var(--muted);
}

.brain-dashboard-shell {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.brain-dashboard-hero {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #1b2740);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--module-glow) 12%, transparent), transparent 34%),
    linear-gradient(180deg, #12203a 0%, #0f172c 100%);
}

.brain-dashboard-hero-copy {
  display: grid;
  gap: 6px;
}

.brain-dashboard-hero-text {
  margin: 0;
  max-width: 920px;
}

.brain-dashboard-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brain-dashboard-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.brain-dashboard-kpi-card {
  display: grid;
  gap: 6px;
  min-height: 132px;
  background: linear-gradient(180deg, #13203a 0%, #10192e 100%);
}

.brain-dashboard-kpi-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fa7cb;
}

.brain-dashboard-kpi-head svg {
  width: 14px;
  height: 14px;
}

.brain-dashboard-kpi-value {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: #f8fbff;
  line-height: 1;
}

.brain-dashboard-kpi-meta {
  font-size: 12px;
  line-height: 1.35;
}

.brain-dashboard-card-grid {
  align-items: stretch;
}

.brain-dashboard-page-card {
  width: 100%;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #243553);
  background: linear-gradient(180deg, #121d35 0%, #0e162b 100%);
  display: grid;
  gap: 12px;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.brain-dashboard-page-card:hover,
.brain-dashboard-page-card:focus-visible {
  border-color: color-mix(in srgb, var(--module-accent) 60%, #8ab4ff);
  background: linear-gradient(180deg, #152340 0%, #111a31 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-glow) 24%, transparent) inset;
  outline: none;
}

.brain-dashboard-page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brain-dashboard-page-title {
  color: #ffffff;
}

.brain-dashboard-page-arrow {
  width: 16px;
  height: 16px;
  color: #9bb0cf;
}

.brain-dashboard-page-copy {
  margin: 0;
  min-height: 54px;
  line-height: 1.45;
}

.brain-dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.brain-dashboard-stat-chip {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, #294268);
  background: #0c1428;
}

.brain-dashboard-stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7f96bc;
}

.brain-dashboard-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #eef5ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brain-dashboard-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brain-dashboard-inline-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, #324a70);
  background: color-mix(in srgb, var(--module-glow) 6%, #0e162b);
  color: #b9c9df;
  font-size: 12px;
}

.lab-dashboard-shell {
  gap: 12px;
}

.lab-dashboard-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.lab-dashboard-grid {
  grid-template-columns: 1.2fr 1fr 1fr 0.95fr;
  align-items: stretch;
}

.lab-dashboard-panel {
  display: grid;
  gap: 12px;
  min-height: 0;
  align-content: start;
  background: linear-gradient(180deg, #111b31 0%, #0d1527 100%);
}

.lab-dashboard-panel-hero {
  background: linear-gradient(180deg, #132441 0%, #0d1628 100%);
}

.lab-dashboard-panel-head {
  color: #ffffff;
}

.lab-dashboard-panel-copy {
  margin: 0;
}

.lab-dashboard-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lab-dashboard-mount-list,
.lab-dashboard-activity-list,
.lab-dashboard-kv-list {
  display: grid;
  gap: 8px;
}

.lab-dashboard-mount-card,
.lab-dashboard-activity-row {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, #243553);
  background: #0d1629;
  min-width: 0;
}

.lab-dashboard-mount-card-head,
.lab-dashboard-mount-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.lab-dashboard-mount-main {
  min-width: 0;
  flex: 1 1 auto;
}

.lab-dashboard-mount-label,
.lab-dashboard-activity-title {
  font-size: 13px;
  font-weight: 700;
  color: #eef5ff;
}

.lab-dashboard-mount-path,
.lab-dashboard-mount-meta,
.lab-dashboard-mount-target,
.lab-dashboard-mount-percent {
  font-size: 11px;
  color: #97add0;
}

.lab-dashboard-mount-path,
.lab-dashboard-mount-target {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-dashboard-mount-meta {
  flex: 0 0 auto;
  white-space: nowrap;
  color: #c4d4f0;
}

.lab-dashboard-mount-percent {
  flex: 0 0 auto;
  width: 40px;
  text-align: right;
  font-weight: 700;
  color: #dbeafe;
}

.lab-dashboard-mount-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel-soft) 82%, black);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.lab-dashboard-mount-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8 0%, #7dd3fc 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.28);
}

.lab-dashboard-activity-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.lab-dashboard-activity-sub {
  font-size: 12px;
  line-height: 1.4;
}

.lab-dashboard-panel-ideas {
  grid-column: span 2;
}

.lab-dashboard-ideas-meta,
.lab-dashboard-ideas-lanes,
.lab-dashboard-ideas-list,
.lab-dashboard-ideas-timeline {
  display: grid;
  gap: 8px;
}

.lab-dashboard-ideas-lanes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lab-dashboard-ideas-lane {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, #243553);
  background: linear-gradient(180deg, #0d172b 0%, #0b1324 100%);
}

.lab-dashboard-ideas-lane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.lab-dashboard-ideas-run {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, #243553);
  background: linear-gradient(180deg, #0d172b 0%, #0b1324 100%);
}

.lab-dashboard-ideas-run-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #eef5ff;
}

.lab-dashboard-ideas-run-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.lab-dashboard-ideas-run-grid-lanes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lab-dashboard-ideas-run-lane {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 60%, #243553);
  background: #0b1426;
}

.lab-dashboard-ideas-run-lane-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.lab-dashboard-idea-card {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, #243553);
  background: #0d1629;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.lab-dashboard-idea-card:hover {
  border-color: color-mix(in srgb, var(--module-accent) 70%, #7dd3fc);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(3, 8, 20, 0.28);
}

.lab-dashboard-idea-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--module-glow) 18%, #12203a);
  color: #eff6ff;
  font-size: 12px;
  font-weight: 700;
}

.lab-dashboard-idea-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.lab-dashboard-idea-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.lab-dashboard-idea-title {
  font-size: 13px;
  font-weight: 700;
  color: #eef5ff;
}

.lab-dashboard-idea-score {
  flex: 0 0 auto;
  font-size: 13px;
  color: #dbeafe;
}

.lab-dashboard-idea-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lab-dashboard-idea-summary {
  font-size: 12px;
  line-height: 1.45;
}

.lab-dashboard-ideas-timeline-head {
  color: #eef5ff;
}

.lab-dashboard-ideas-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, #243553);
  background: #0d1629;
}

.lab-dashboard-ideas-event-icon {
  text-transform: capitalize;
}

.lab-dashboard-ideas-event-copy {
  min-width: 0;
}

.lab-dashboard-ideas-event-title {
  font-size: 13px;
  font-weight: 700;
  color: #eef5ff;
}

.lab-dashboard-ideas-event-sub {
  font-size: 12px;
  line-height: 1.45;
}

.lab-dashboard-ideas-event-time {
  font-size: 11px;
  color: #97add0;
  white-space: nowrap;
}

.lab-dashboard-ideas-footer {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1500px) {
  .lab-dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lab-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-dashboard-panel-ideas {
    grid-column: span 2;
  }
}

@media (max-width: 960px) {
  .lab-dashboard-grid,
  .lab-dashboard-kpi-grid,
  .lab-dashboard-stat-grid,
  .lab-dashboard-ideas-run-grid,
  .lab-dashboard-ideas-lanes {
    grid-template-columns: 1fr;
  }

  .lab-dashboard-panel-ideas {
    grid-column: auto;
  }

  .lab-dashboard-mount-card-head,
  .lab-dashboard-activity-row,
  .lab-dashboard-idea-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .lab-dashboard-mount-foot {
    flex-wrap: wrap;
    align-items: center;
  }

  .lab-dashboard-ideas-event {
    grid-template-columns: 1fr;
  }

  .lab-dashboard-mount-percent {
    width: auto;
    align-self: flex-end;
  }

  .lab-dashboard-ideas-footer {
    justify-content: stretch;
  }

  .lab-dashboard-ideas-footer .btn {
    width: 100%;
  }
}

.brain-briefs-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  max-height: none;
}

.glow-title {
  color: #ffffff;
  text-shadow: 0 0 10px var(--module-glow);
}

.briefs-menu {
  border: 1px solid color-mix(in srgb, var(--line) 68%, #1b2740);
  border-radius: 12px;
  background: linear-gradient(180deg, #13203a 0%, #101a31 100%);
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.briefs-menu-head {
  padding: 12px 12px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, #1b2740);
}

.briefs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: auto;
  padding: 0;
}

.briefs-empty {
  margin: 0;
  padding: 12px;
}

.brief-item {
  width: 100%;
  border: 0;
  border-left: 4px solid color-mix(in srgb, var(--module-accent) 16%, #2b3952);
  border-radius: 0;
  background: #172742;
  color: var(--text);
  text-align: left;
  padding: 11px 12px;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  transition: border-left-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.brief-item:hover {
  border-left-color: color-mix(in srgb, var(--module-accent) 38%, #739bcf);
  background: #1a2d4c;
  box-shadow: none;
}

.brief-item:focus-visible {
  outline: none;
  border-left-color: color-mix(in srgb, var(--module-accent) 38%, #739bcf);
  background: #1a2d4c;
  box-shadow: none;
}

.brief-item.active {
  border-left-color: color-mix(in srgb, var(--module-accent) 90%, #cfe6ff);
  background: #1f375c;
  box-shadow: inset 4px 0 8px -4px color-mix(in srgb, var(--module-glow) 72%, transparent);
}

.brief-item.active:hover,
.brief-item.active:focus-visible {
  border-left-color: color-mix(in srgb, var(--module-accent) 90%, #cfe6ff);
  background: #1f375c;
  box-shadow: inset 4px 0 8px -4px color-mix(in srgb, var(--module-glow) 72%, transparent);
}

.brief-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brief-item-label {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #b6c3d6;
  transition: color 120ms ease, text-shadow 120ms ease;
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brief-item:hover .brief-item-label,
.brief-item:focus-visible .brief-item-label {
  color: #eaf2ff;
}

.brief-item.active .brief-item-label {
  color: #ffffff;
  text-shadow: 0 0 8px color-mix(in srgb, var(--module-glow) 85%, transparent);
}

.brief-item-sub {
  font-size: 12px;
  color: #9aa8bf;
}

.ops-session-item-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ops-session-item-sub .badge {
  margin-left: 0;
}

.brief-item-chevron {
  width: 14px;
  height: 14px;
  color: #8ea6c8;
  transition: color 120ms ease, filter 120ms ease;
}

.brief-item:hover .brief-item-chevron,
.brief-item:focus-visible .brief-item-chevron {
  color: #ffffff;
  filter: none;
}

.brief-item.active .brief-item-chevron {
  color: #ffffff;
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, #ffffff 100%, transparent))
    drop-shadow(0 0 12px color-mix(in srgb, #ffffff 90%, transparent));
}

.briefs-footer {
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, #1b2740);
  background: #0e162b;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px;
}

.brief-page-btn {
  min-width: 68px;
}

.brief-page-label {
  min-width: 74px;
  text-align: center;
}

.brain-memory-list {
  padding-bottom: 6px;
}

.brain-memory-section-head {
  padding: 12px 12px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fa7cb;
  border-top: 1px solid color-mix(in srgb, var(--line) 65%, #1b2740);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.92), rgba(14, 22, 40, 0.96));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brain-memory-section-head-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brain-memory-section-head svg {
  width: 14px;
  height: 14px;
  stroke-width: 2px;
  opacity: 0.9;
}

.brain-memory-section-head-daily {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, #334767);
}

.brain-memory-section-count {
  color: #6f87ae;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.brain-memory-list .brain-memory-section-head:first-child {
  border-top: 0;
}

.brain-memory-empty {
  padding-top: 8px;
  padding-bottom: 10px;
}

.brain-memory-render-head {
  align-items: flex-start;
}

.brain-memory-render-title {
  min-width: 0;
}

.brain-memory-path {
  margin: 4px 0 0;
}

.brief-render {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.brief-markdown {
  overflow: auto;
  min-height: 0;
}

.brief-markdown pre {
  background: #0b1224;
  border: 1px solid color-mix(in srgb, #ff4fd8 28%, #334155);
  border-left: 3px solid color-mix(in srgb, #ff4fd8 65%, #94a3b8);
  border-radius: 10px;
  padding: 12px 14px;
  overflow: auto;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #ff4fd8 14%, transparent);
}

.brief-markdown code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.brief-markdown :not(pre) > code {
  background: color-mix(in srgb, #ff4fd8 12%, #0f172a);
  border: 1px solid color-mix(in srgb, #ff4fd8 32%, #334155);
  border-radius: 6px;
  padding: 1px 6px;
  color: #ffd7f5;
}

.module-content a {
  color: #ff4fd8;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, #ff4fd8 48%, transparent);
  transition: color 120ms ease, border-color 120ms ease, text-shadow 120ms ease;
}

.module-content a:visited {
  color: #ff8ce9;
  border-bottom-color: color-mix(in srgb, #ff8ce9 52%, transparent);
}

.module-content a:hover,
.module-content a:focus-visible {
  color: #ffffff;
  border-bottom-color: color-mix(in srgb, #ff4fd8 85%, #ffffff);
  text-shadow: 0 0 8px color-mix(in srgb, #ff4fd8 75%, transparent);
}

.module-content a:active {
  color: #ffd7f5;
  border-bottom-color: #ffd7f5;
}

.brief-markdown h1,
.brief-markdown h2,
.brief-markdown h3 {
  margin: 1.15rem 0 0.7rem;
}

.brief-markdown h1:first-child,
.brief-markdown h2:first-child,
.brief-markdown h3:first-child {
  margin-top: 0.2rem;
}

.brief-markdown p,
.brief-markdown ul {
  margin-top: 0.35rem;
}

.brief-markdown .build-log-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0.1rem 0 0.9rem;
}

.brief-markdown .build-log-meta .meta-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--module-accent) 10%, #0f172a);
}

.brief-markdown .build-log-meta .meta-label {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.brief-markdown .build-log-meta .meta-value {
  font-weight: 600;
  color: #eaf2ff;
}

.lab-proto-card {
  cursor: pointer;
  position: relative;
}

.lab-proto-card:hover {
  border-color: var(--module-accent);
}

.proto-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.proto-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.proto-add-icon {
  width: 20px;
  height: 20px;
}

.proto-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.proto-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.proto-title span {
  display: block;
  max-width: min(32ch, 52vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proto-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.proto-ellipsis {
  display: inline-block;
  max-width: min(38ch, 55vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proto-module-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--panel) 88%, #0b1224);
  color: #e8eefc;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #ffffff 4%, transparent);
}

.proto-module-badge svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.25;
}

.proto-module-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
}

.proto-module-ops {
  border-color: color-mix(in srgb, #3b82f6 48%, var(--line));
  background: color-mix(in srgb, #3b82f6 14%, var(--panel));
  color: #bfdbfe;
}

.proto-module-brain {
  border-color: color-mix(in srgb, #a855f7 48%, var(--line));
  background: color-mix(in srgb, #a855f7 14%, var(--panel));
  color: #e9d5ff;
}

.proto-module-lab {
  border-color: color-mix(in srgb, #22c55e 48%, var(--line));
  background: color-mix(in srgb, #22c55e 14%, var(--panel));
  color: #bbf7d0;
}

.proto-preview-row {
  margin-bottom: 16px;
}

.proto-prompt-snippet {
  margin: 0 0 18px;
  background: #0b1224;
  border: 1px solid color-mix(in srgb, #ff4fd8 28%, #334155);
  border-left: 3px solid color-mix(in srgb, #ff4fd8 65%, #94a3b8);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #ff4fd8 14%, transparent);
  height: 105px;
}

.proto-prompt-snippet code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: #ffd7f5;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.45;
}

.proto-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.proto-actions-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.proto-actions-right {
  margin-left: auto;
}

.proto-action-danger {
  color: #ff7a9a;
}

.proto-info-wrap {
  position: relative;
}

.proto-tooltip {
  position: absolute;
  top: 34px;
  right: 0;
  width: min(520px, 82vw);
  white-space: pre-wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1425;
  color: #e8f1ff;
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
  font-size: 10.5px;
  line-height: 1.3;
  z-index: 20;
  display: none;
}

.proto-tooltip.align-right {
  right: 0;
  left: auto;
  transform: none;
}

.proto-tooltip.align-left {
  left: 0;
  right: auto;
  transform: none;
}

.proto-tooltip.align-center {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.proto-info-wrap:hover .proto-tooltip,
.proto-info-wrap:focus-within .proto-tooltip {
  display: block;
}

.prototype-modal {
  width: min(95vw, 1400px);
}

.prototype-form-modal {
  width: min(92vw, 760px);
}

.prototype-form-body {
  display: grid;
  gap: 10px;
  height: auto;
}

.proto-form-field {
  display: grid;
  gap: 6px;
}

.proto-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0c1324;
  color: #eaf2ff;
  border-radius: 8px;
  padding: 8px 10px;
}
/* Make the native date picker icon visible on dark backgrounds */
.proto-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}
.proto-input[type="date"] {
  color-scheme: dark;
}

/* ── Calendar Picker ── */
.cal-picker-anchor { margin-top: -4px; }
.cal-picker {
  background: #0c1324;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-month-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--module-accent, #eaf2ff);
}
.cal-nav {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.cal-nav:hover { color: var(--module-accent, #eaf2ff); background: rgba(255,255,255,0.06); }
.cal-nav svg { width: 14px; height: 14px; }
.cal-days-header, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.cal-cell {
  font-size: 12px;
  padding: 5px 0;
  border-radius: 6px;
}
.cal-day-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
}
.cal-empty { visibility: hidden; }
.cal-day {
  cursor: pointer;
  color: #bcc8db;
  transition: background 0.12s, color 0.12s;
}
.cal-day:hover {
  background: var(--module-accent, #4e8cff);
  color: #fff;
}
.cal-selected {
  background: var(--module-accent, #4e8cff) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 0 8px var(--module-glow, rgba(78,140,255,0.4));
}
.cal-today {
  border: 1px solid var(--module-accent, #4e8cff);
}

.proto-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.pm-task-form-modal {
  width: min(92vw, 980px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(94vh, 980px);
  overflow: hidden;
}

.pm-task-note-backdrop {
  z-index: 48;
}

.pm-task-note-modal {
  width: min(92vw, 560px);
  min-height: 0;
  max-height: min(82vh, 620px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.pm-task-form-modal .session-modal-header {
  padding: 3px 10px;
  min-height: 28px;
}

.pm-task-note-modal .session-modal-header {
  padding: 6px 10px;
  min-height: 34px;
}

.pm-task-form-modal .session-modal-header h3 {
  margin: 0;
  line-height: 1.1;
}

.pm-task-note-modal .session-modal-header h3 {
  margin: 0;
  line-height: 1.1;
}

.pm-task-form-modal .session-modal-header .icon-btn {
  width: 26px;
  height: 26px;
}

.pm-task-note-modal .session-modal-header .icon-btn {
  width: 26px;
  height: 26px;
}

.pm-task-form-body {
  gap: 10px;
  padding-bottom: 4px;
  min-height: 0;
  overflow: auto;
}

.pm-task-note-body {
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.pm-task-note-textarea {
  min-height: 112px;
}

.pm-task-note-type-help {
  margin: -6px 0 2px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  font-size: 11px;
  line-height: 1.35;
  color: #8fa0b8;
}

.pm-task-note-actions {
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(12, 19, 36, 0) 0%, rgba(12, 19, 36, 0.82) 100%);
}

.team-member-form-modal {
  width: min(92vw, 860px);
}

.client-form-modal {
  width: min(92vw, 860px);
}

.client-form-body {
  gap: 12px;
}

.client-form-actions #archiveClientForm {
  margin-right: auto;
}

.team-member-form-body {
  gap: 12px;
}

.team-member-form-flags {
  display: grid;
  gap: 10px;
}

.team-member-flag-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.team-member-form-note {
  margin: 0;
}

.pm-task-field-label {
  display: grid;
  gap: 4px;
  align-content: start;
  color: #c4cfdf;
  font-weight: 600;
}

.pm-task-section-title {
  color: var(--module-accent, #7dd3fc);
  font-weight: 700;
}

.pm-task-input {
  color: #c9d4e5;
}

.pm-task-input::placeholder {
  color: #7f8ba2;
}

.pm-task-input option {
  color: #c9d4e5;
  background: #0c1324;
}

select.pm-task-input {
  min-height: 34px;
}

.pm-task-textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.4;
}

.pm-task-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pm-task-meta-grid-tight {
  gap: 8px;
}

.pm-task-deliverables-panel {
  display: grid;
  gap: 8px;
}

.pm-task-deliverables-composer {
  display: grid;
  gap: 8px;
}

.pm-task-composer-divider {
  width: 33%;
  height: 2px;
  border: 0;
  margin: 2px auto 4px;
  background: color-mix(in srgb, var(--module-accent, #7dd3fc) 58%, transparent);
}

.pm-task-deliverables-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.pm-task-deliverable-chip {
  border-color: rgba(125, 211, 252, 0.18);
  height: 100%;
}

.pm-task-deliverable-chip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pm-task-deliverable-chip-copy {
  min-width: 0;
}

.pm-task-deliverable-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #9fb1c8;
  font-size: 11px;
}

.pm-task-deliverable-chip-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pm-task-deliverable-order-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  color: #8fa0b8;
}

.pm-task-deliverable-order-btn svg {
  width: 14px;
  height: 14px;
}

.pm-task-deliverable-order-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.pm-task-deliverable-chip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: #9fb1c8;
}

.pm-task-deliverable-chip-meta a {
  color: var(--module-accent, #7dd3fc);
  text-decoration: none;
}

.pm-task-deliverable-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.pm-task-deliverable-description {
  min-height: 64px;
}

.pm-task-deliverable-actions-inline {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.pm-task-check {
  color: #c4cfdf;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding-bottom: 10px;
}

.pm-task-blocked-toggle {
  align-self: end;
}

.pm-task-form-actions {
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(12, 19, 36, 0) 0%, rgba(12, 19, 36, 0.82) 100%);
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .pm-task-meta-grid {
    grid-template-columns: 1fr;
  }

  .pm-task-deliverables-list {
    grid-template-columns: 1fr;
  }

  .pm-task-deliverable-foot {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .pm-task-check {
    padding-bottom: 0;
  }
}

.prototype-modal-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: min(80vh, 920px);
}

.prototype-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.session-modal a {
  color: #ff4fd8;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, #ff4fd8 48%, transparent);
}

.session-modal a:visited {
  color: #ff8ce9;
  border-bottom-color: color-mix(in srgb, #ff8ce9 52%, transparent);
}

.session-modal a:hover,
.session-modal a:focus-visible {
  color: #ffffff;
  border-bottom-color: color-mix(in srgb, #ff4fd8 85%, #ffffff);
  text-shadow: 0 0 8px color-mix(in srgb, #ff4fd8 75%, transparent);
}

.session-modal a:active {
  color: #ffd7f5;
  border-bottom-color: #ffd7f5;
}

.prototype-frame {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1020;
}

@media (max-width: 900px) {
  .content-flow {
    padding-bottom: 32px;
  }

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

  .config-render-head {
    flex-direction: column;
    align-items: stretch;
  }

  .brain-briefs-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    max-height: none;
  }

  .brief-render {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .brief-markdown {
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .org-level-top,
  .org-level-account-managers,
  .org-level-subagents {
    grid-template-columns: 1fr;
  }

  .org-level-account-managers {
    padding-top: 0;
  }

  .org-level-account-managers::before,
  .org-level-account-managers > .org-node::before {
    display: none;
  }

  .org-node-head,
  .org-node-meta {
    grid-template-columns: 1fr;
    display: grid;
  }

  .team-header-card {
    flex-direction: column;
    align-items: stretch;
  }

  .team-view-toggle {
    width: 100%;
    justify-content: stretch;
  }

  .team-view-btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .team-office-canvas {
    aspect-ratio: 4 / 5;
    min-height: 560px;
  }

  .office-location-label {
    font-size: 9px;
    top: -14px;
  }

  .office-location-chips {
    gap: 6px;
  }

}

@media (max-width: 640px) {
  .module-content {
    overflow-x: hidden;
  }

  .content-flow {
    padding: 12px 12px 20px;
  }

  .module-title-wrap {
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
    column-gap: 8px;
    padding: 4px 12px 0;
  }

  .module-title-wrap h1 {
    font-size: 18px;
    min-width: 0;
  }

  .module-title-wrap p {
    font-size: 12px;
    min-width: 0;
  }

  .top-tabs-rail {
    padding: 10px 8px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .top-tabs-rail::-webkit-scrollbar {
    display: none;
  }

  .top-tabs {
    width: max-content;
    min-width: 100%;
  }

  .tab {
    padding: 8px 11px;
    font-size: 12px;
  }

  .team-view-toggle {
    gap: 6px;
    padding: 5px;
  }

  .team-view-btn {
    gap: 6px;
    padding-inline: 10px;
  }

  .team-view-btn span {
    min-width: 0;
  }

  .org-header-card,
  .team-office-shell,
  .team-office-canvas {
    min-width: 0;
    max-width: 100%;
  }

  .team-office-shell {
    overflow: hidden;
  }

  .team-office-canvas {
    min-height: clamp(380px, 62vh, 680px);
    border-radius: 18px;
  }

  .office-member-marker-body {
    gap: 5px;
  }

  .office-member-marker-main {
    gap: 6px;
  }

  .office-member-marker-icon {
    width: 32px;
    height: 32px;
  }

  .office-member-marker-icon i {
    width: 16px;
    height: 16px;
  }

  .office-member-marker-name {
    font-size: 16px;
  }

  .office-member-marker-meta {
    max-width: 102px;
    font-size: 8px;
    padding: 3px 6px;
  }

  .office-member-marker-pointer {
    border-left-width: 5px;
    border-right-width: 5px;
    border-top-width: 8px;
  }

  .office-member-chip {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
    padding: 5px 7px;
  }

  .office-member-chip-icon {
    width: 24px;
    height: 24px;
  }

  .office-member-chip-icon i {
    width: 13px;
    height: 13px;
  }

  .office-member-chip-name {
    font-size: 10px;
  }

  .office-member-chip-meta {
    font-size: 8px;
  }

  .ops-team-member-modal-body {
    grid-template-columns: 1fr;
  }

  .briefs-menu {
    max-height: min(34vh, 300px);
  }

  .subcards {
    grid-template-columns: 1fr;
  }

  .session-meta-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .meta-tokens {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    padding-top: 8px;
  }

  .token-col {
    text-align: left;
  }

  .session-history-preview {
    min-height: 130px;
    max-height: 150px;
    margin-top: 14px;
  }
}

@media (max-width: 920px) {
  .data-freshness {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    bottom: 8px;
    max-width: calc(100vw - 24px);
    text-align: center;
    white-space: normal;
    line-height: 1.2;
    z-index: 13;
  }
}

@media (max-width: 860px) {
  .session-modal {
    width: min(92vw, 1200px);
  }
  .session-meta-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .refresh-dots span {
    animation: none;
    opacity: 0.7;
  }
}

/* Header refresh button */
.header-refresh-btn {
  grid-area: refresh;
  align-self: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eaf2ff;
  opacity: 0.7;
  transition: opacity 150ms ease, color 150ms ease, filter 150ms ease, transform 150ms ease;
}
.header-refresh-btn:hover {
  opacity: 1;
  color: var(--module-accent);
  filter: drop-shadow(0 0 8px var(--module-glow));
}
.header-refresh-btn svg {
  width: 20px;
  height: 20px;
}
.header-refresh-btn.refreshing svg {
  animation: spin 1000ms linear infinite;
  transform-origin: center;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Section filter button */
.section-filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  color: #eaf2ff;
  opacity: 0.7;
  transition: opacity 150ms ease, color 150ms ease;
  position: relative;
  z-index: 200;
}
.section-filter-btn:focus-within,
.section-filter-btn:hover {
  z-index: 5000;
}
.section-filter-btn:hover,
.section-filter-btn:focus-visible,
.section-filter-btn:focus-within,
.section-filter-btn.filter-active {
  opacity: 1;
  color: var(--module-accent);
  outline: none;
}
.section-filter-btn svg {
  width: 14px;
  height: 14px;
  color: currentColor;
  stroke: currentColor;
  filter: none;
  transition: filter 150ms ease, color 150ms ease;
}
.section-filter-btn:hover svg,
.section-filter-btn:focus-visible svg,
.section-filter-btn:focus-within svg,
.section-filter-btn.filter-active svg {
  color: currentColor;
  stroke: currentColor;
  filter: drop-shadow(0 0 8px var(--module-glow));
}

/* Filter dropdown */
.filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  min-width: max-content;
  max-width: min(32ch, calc(100vw - 24px));
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.985), rgba(2, 6, 23, 0.985));
  border: 1px solid var(--module-accent);
  border-radius: 8px;
  padding: 0;
  z-index: 6000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: none;
  overflow: hidden;
}
.filter-dropdown-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.15;
  color: #aeb8c8;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0;
  transition: background 120ms ease, color 120ms ease, text-shadow 120ms ease;
}
.filter-dropdown-item:hover {
  background: color-mix(in srgb, var(--module-accent) 8%, transparent);
  color: #ffffff;
  text-shadow: 0 0 10px color-mix(in srgb, var(--module-accent) 42%, transparent);
}
.filter-dropdown-item.selected {
  color: #ffffff;
  background: color-mix(in srgb, var(--module-accent) 8%, transparent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--module-accent) 42%, transparent);
}
.filter-dropdown-item.selected::before {
  content: '✓';
  font-size: 11px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  color: currentColor;
  text-shadow: inherit;
}
.filter-dropdown-item:not(.selected)::before {
  content: '';
  width: 14px;
  flex-shrink: 0;
}
.filter-dropdown-item .badge {
  text-shadow: none;
}
.filter-dropdown-item .badge-low {
  color: #e2e8f0;
}
.filter-dropdown-item .badge-medium {
  color: #7dd3fc;
}
.filter-dropdown-item .badge-high {
  color: #fbbf24;
}
.filter-dropdown-item .badge-urgent {
  color: #f87171;
}

/* Build log status badges */
.badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge-promoted {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.badge-archived {
  background: rgba(148, 163, 184, 0.24);
  color: #cbd5e1;
}
.badge-active {
  background: rgba(59, 130, 246, 0.24);
  color: #93c5fd;
}
.badge-idle {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}
.badge-idea {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}
.badge-building {
  background: rgba(245, 158, 11, 0.24);
  color: #fbbf24;
}
.badge-preview-ready {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}
.badge-approved {
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
}
.badge-promoting {
  background: rgba(34, 197, 94, 0.10);
  color: #86efac;
}
.badge-urgent {
  background: rgba(239, 68, 68, 0.24);
  color: #f87171;
}

/* Filter button in menu head — push to far right */
.briefs-menu-head .section-filter-btn {
  margin-left: auto;
}

.lab-build-toolbar {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lab-build-toolbar .section-filter-btn {
  margin-left: 0;
}

.lab-build-event-summary {
  display: grid;
  gap: 0;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 68%, #243553);
  background: linear-gradient(180deg, #111a31 0%, #0d1527 100%);
}

.lab-build-event-summary .kv {
  padding: 7px 0;
}

.lab-build-event-reason {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}

/* Toast notifications */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 10px 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #f1f5f9;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: auto;
  max-width: 400px;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.toast-icon { flex-shrink: 0; display: flex; align-items: center; }
.toast-icon svg { width: 18px; height: 18px; }
.toast-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-right: 20px; }
.toast-title { font-weight: 600; font-size: 13px; line-height: 1.3; }
.toast-detail { font-size: 12px; font-weight: 400; opacity: 0.8; line-height: 1.4; }
.toast-msg { flex: 1; padding-right: 20px; }
.toast-close {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  color: inherit;
  opacity: 0.4;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 150ms, background 150ms;
}
.toast-close svg { width: 10px; height: 10px; }
.toast-close:hover { opacity: 1; background: rgba(255,255,255,0.15); }
.toast-visible {
  opacity: 1;
  transform: translateX(0);
}
.toast-success {
  border-color: rgba(34, 197, 94, 0.6);
  background: #143a20;
}
.toast-success .toast-icon { color: #22c55e; }
.toast-error {
  border-color: rgba(239, 68, 68, 0.6);
  background: #3b1518;
}
.toast-error .toast-icon { color: #ef4444; }
.toast-info {
  border-color: rgba(59, 130, 246, 0.6);
  background: #152140;
}
.toast-info .toast-icon { color: #3b82f6; }

/* Docs TOC heading-level indentation */
.docs-toc-h1 { padding-left: 8px; }
.docs-toc-h2 { padding-left: 24px; }
.docs-toc-h3 { padding-left: 40px; }

/* ── Notification Center ── */
.bell-btn {
  grid-area: bell;
  position: relative;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #eaf2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  align-self: center;
  opacity: 0.7;
  transition: opacity 150ms ease, color 150ms ease, filter 150ms ease;
}
.bell-btn:hover {
  opacity: 1;
  color: var(--module-accent);
  filter: drop-shadow(0 0 8px var(--module-glow));
}
.bell-btn svg { width: 18px; height: 18px; }
.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--bad);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--header-bg-solid);
}
.bell-badge.hidden { display: none; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 380px;
  max-width: 95vw;
  height: 100vh;
  background: var(--panel-soft);
  border-left: 1px solid var(--line);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
}
.drawer.open { right: 0; }

/* Drawer close strip — left edge handle */
.drawer-close-strip {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  z-index: 1;
}
.drawer-close-strip:hover {
  background: rgba(0, 0, 0, 0.4);
}
.drawer-close-strip svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  opacity: 0.7;
  transition: opacity 0.15s;
}
.drawer-close-strip:hover svg {
  opacity: 1;
  color: var(--text);
}

/* Shift drawer content right to make room for the strip */
.drawer-head,
.drawer-body {
  margin-left: 28px;
}

.drawer-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-head h2 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-head h2 svg { width: 16px; height: 16px; color: var(--module-accent); }
.drawer-actions { display: flex; gap: 6px; }
.drawer-actions button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.15s;
}
.drawer-actions button:hover { color: var(--text); border-color: var(--module-accent); }

.drawer-body { flex: 1; overflow-y: auto; padding: 0; }

/* ── Notification items ── */
.notif {
  --notif-color: #3b82f6;
  display: flex;
  align-items: stretch;
  border-radius: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s, opacity 0.2s;
  height: 76px;
}
.notif.success { --notif-color: var(--ok); }
.notif.error   { --notif-color: var(--bad); }
.notif.info    { --notif-color: #3b82f6; }
.notif.warning { --notif-color: var(--warn); }
.notif:not(.read):hover .notif-icon svg { filter: drop-shadow(0 0 6px var(--notif-color)); }
.notif:not(.read):hover .notif-strip { box-shadow: 0 0 10px var(--notif-color); }
.notif:not(.read):hover .notif-title {
  color: #eaf2ff;
  text-shadow: 0 0 8px var(--notif-color);
}
.notif:hover .notif-icon,
.notif:hover .notif-strip { filter: brightness(1.3); }
.notif.read { opacity: 0.5; }
.notif.read:hover { opacity: 1; }
.notif.read:hover .notif-strip { opacity: 1; }
.notif.read:hover .notif-icon,
.notif.read:hover .notif-strip { filter: brightness(1.3); }

/* Left icon block — always square */
.notif-icon {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s;
}
.notif-icon svg { width: 34px; height: 34px; }
.notif-icon.success { background: rgba(34, 197, 94, 0.12); color: var(--ok); }
.notif-icon.error   { background: rgba(239, 68, 68, 0.12); color: var(--bad); }
.notif-icon.info    { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.notif-icon.warning { background: rgba(245, 158, 11, 0.12); color: var(--warn); }

/* Center text block — fixed 3-line layout */
.notif-content {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.notif-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
}
.notif-detail {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.notif-time {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  opacity: 0.6;
}

/* Right color strip with dismiss cap */
.notif-strip {
  flex-shrink: 0;
  width: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: filter 0.15s;
}
.notif-strip.success { background: var(--ok); }
.notif-strip.error   { background: var(--bad); }
.notif-strip.info    { background: #3b82f6; }
.notif-strip.warning { background: var(--warn); }
.notif.read .notif-strip { opacity: 0.35; }

.notif-dismiss {
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.22);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  padding: 0;
  flex-shrink: 0;
  font-weight: 900;
}
.notif-dismiss svg { width: 11px; height: 11px; stroke-width: 4; }
.notif-dismiss:hover { background: rgba(0,0,0,0.35); }

/* Strip body fills remaining height */
.notif-strip-body { flex: 1; }

.notif-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.notif-empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.4; }
.notif-empty-state p { font-size: 13px; }

.empty-state-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.empty-state-msg {
  text-align: center;
  font-size: 0.9rem;
}

/* Ops skeleton v1 */
.ops-shell { margin-top: 4px; }
.ops-workspaces-page {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.ops-kpi-grid-compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.ops-pm-overview-card {
  padding-top: 12px;
  padding-bottom: 12px;
}
.ops-pm-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ops-pm-summary-copy {
  margin: 4px 0 0;
}
.ops-pm-summary-side {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}
.ops-pm-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.ops-pm-board-hint {
  margin: 0;
  max-width: 340px;
  font-size: 12px;
  line-height: 1.35;
}
.ops-pm-board-hint-bottom {
  margin-top: 8px;
  margin-left: auto;
  text-align: right;
}
.ops-pm-client-grid {
  margin-top: 10px;
  margin-bottom: 20px;
  align-items: start;
}
.ops-pm-client-controls-row {
  margin-top: 0;
}
.ops-pm-client-card {
  min-height: 0;
  height: auto;
  align-self: start;
  padding: 0;
  overflow: hidden;
}
.ops-pm-new-client-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8fa0b8;
  text-shadow: none;
  filter: none;
  box-shadow: none;
}
.ops-pm-new-client-btn:hover,
.ops-pm-new-client-btn:focus-visible {
  outline: none;
  border-color: transparent;
  background: transparent;
  color: #8fa0b8;
  filter: none;
}
.ops-pm-new-client-btn svg,
.ops-pm-new-client-btn i {
  width: 18px;
  height: 18px;
  color: #8fa0b8;
  filter: none;
  text-shadow: none;
  transition: color 120ms ease, filter 120ms ease;
}
.ops-pm-new-client-btn:hover svg,
.ops-pm-new-client-btn:focus-visible svg {
  color: var(--module-accent);
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--module-glow) 70%, transparent))
    drop-shadow(0 0 12px color-mix(in srgb, var(--module-glow) 35%, transparent));
}
.ops-pm-client-titlebar {
  padding: 6px 16px 6px 10px;
}
.ops-pm-client-favicon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  color: #94a3b8;
  flex: 0 0 32px;
}
.ops-pm-client-favicon-wrap svg,
.ops-pm-client-favicon {
  width: 32px;
  height: 32px;
  display: block;
}
.ops-pm-client-favicon-wrap svg {
  display: none;
}
.ops-pm-client-favicon {
  object-fit: contain;
  object-position: center;
}
.ops-pm-client-favicon-wrap.is-fallback img {
  display: none;
}
.ops-pm-client-favicon-wrap.is-fallback svg {
  display: block;
}
.ops-pm-client-body {
  display: grid;
  gap: 8px;
  padding: 8px 16px 10px 10px;
}
.ops-pm-client-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.ops-pm-client-row > :first-child {
  min-width: 0;
  max-width: 100%;
}
.ops-pm-client-row > :last-child {
  min-width: 0;
  justify-self: end;
}
.ops-client-link {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  vertical-align: top;
  color: #f472b6;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, #ff4fd8 48%, transparent);
  text-shadow: none;
}
.ops-client-link:hover,
.ops-client-link:focus-visible {
  color: #f9a8d4;
  text-decoration: none;
  border-bottom-color: color-mix(in srgb, #ff4fd8 85%, #ffffff);
  text-shadow: none;
}
.ops-client-link:visited {
  border-bottom-color: color-mix(in srgb, #ff8ce9 52%, transparent);
}
.ops-pm-client-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ops-client-mini-stat {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  background: rgba(8, 15, 28, 0.52);
}
.ops-client-mini-stat strong {
  font-size: 16px;
  line-height: 1;
  color: #f8fbff;
}
.ops-client-mini-stat span {
  font-size: 11px;
  line-height: 1.2;
  color: #9db1cc;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ops-pm-client-metrics {
  display: grid;
  gap: 6px;
}
.ops-pm-client-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}
.ops-pm-client-notes {
  margin: 2px 0 0;
}
.ops-pm-client-row {
  border-bottom: none;
}
.ops-pm-client-card.collapsed .ops-pm-client-metrics {
  display: none;
}
.ops-pm-board-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
}
.ops-pm-board-header-row.ops-pm-client-controls-row {
  margin: 28px 0 4px;
}
.ops-pm-new-task-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8fa0b8;
  text-shadow: none;
  filter: none;
  box-shadow: none;
}
.ops-pm-new-task-btn:hover,
.ops-pm-new-task-btn:focus-visible {
  border-color: transparent;
  background: transparent;
  color: #8fa0b8;
  filter: none;
  outline: none;
}
.ops-pm-new-task-btn i,
.ops-pm-new-task-btn svg {
  width: 18px;
  height: 18px;
  color: #8fa0b8;
  filter: none;
  text-shadow: none;
  transition: color 120ms ease, filter 120ms ease;
}
.ops-pm-new-task-btn:hover svg,
.ops-pm-new-task-btn:focus-visible svg {
  color: var(--module-accent);
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--module-glow) 70%, transparent))
    drop-shadow(0 0 12px color-mix(in srgb, var(--module-glow) 35%, transparent));
}
.ops-pm-board-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.ops-pm-menu-btn {
  padding: 2px;
}
.ops-pm-menu-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.ops-pm-menu-btn .filter-dropdown {
  min-width: max-content;
}
.ops-mission-overview-card {
  padding-top: 12px;
  padding-bottom: 12px;
}
.ops-mission-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ops-mission-copy {
  margin: 4px 0 0;
}
.ops-mission-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.ops-stat-pill {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(8, 15, 28, 0.58);
}
.ops-stat-label {
  font-size: 11px;
  line-height: 1.2;
  color: #9db1cc;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ops-stat-value {
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  color: #f8fbff;
}
.ops-mission-chart-grid {
  margin-top: 8px;
}
.ops-mission-chart-card {
  min-height: 100%;
  padding-top: 10px;
  padding-bottom: 10px;
}
.ops-chart-bars {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.ops-chart-bars-compact {
  gap: 7px;
}
.ops-chart-row {
  display: grid;
  grid-template-columns: minmax(70px, 92px) minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
}
.ops-chart-label,
.ops-chart-value {
  font-size: 12px;
  color: #cfe0f8;
}
.ops-chart-value {
  text-align: right;
  color: #eef4ff;
}
.ops-chart-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.08);
}
.ops-donut-wrap {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.ops-donut-chart {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12);
}
.ops-donut-chart::after {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.08);
}
.ops-donut-legend {
  display: grid;
  gap: 6px;
}
.ops-donut-legend-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
}
.ops-donut-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.ops-line-chart-wrap {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.ops-line-chart {
  width: 100%;
  height: 72px;
  overflow: visible;
}
.ops-line-chart-path {
  fill: none;
  stroke: #22d3ee;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ops-line-chart-path-amber {
  stroke: #fbbf24;
}
.ops-line-chart-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px;
}
.ops-line-chart-label {
  display: grid;
  gap: 2px;
}
.ops-chart-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.4), rgba(125, 211, 252, 0.95));
}
.ops-chart-bar-cyan {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.35), rgba(34, 211, 238, 0.95));
}
.ops-chart-bar-violet {
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.35), rgba(196, 181, 253, 0.95));
}
.ops-chart-bar-amber {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.35), rgba(253, 224, 71, 0.95));
}
.ops-mission-model-card,
.ops-mission-session-card {
  min-height: 100%;
}
.ops-mission-session-head .session-card-title {
  flex: 1 1 auto;
}
.ops-mission-session-head .ops-session-agent-pill {
  margin-left: auto;
  flex-shrink: 0;
}
#missionCronGrid {
  align-items: start;
}
.cron-card-link {
  min-height: 0;
  height: auto;
  align-self: start;
  padding: 0;
  overflow: hidden;
}
.ops-mission-model-card {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.ops-mission-model-name {
  margin: 0;
  line-height: 1.2;
}
.ops-mission-model-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-size: 12px;
  color: #cfe0f8;
}
.ops-mission-model-source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
}
.ops-card-link-main {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}
.ops-card-link-main:hover,
.ops-card-link-main:focus-visible {
  outline: none;
  background: rgba(251, 191, 36, 0.08);
}
.ops-card-link-main-top,
.ops-card-link-main-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.ops-card-link-main-top > *,
.ops-card-link-main-bottom > * {
  min-width: 0;
}
.ops-card-link-main-top-static {
  margin-bottom: 8px;
}
.ops-card-link-main-bottom {
  font-size: 12px;
  color: #9db1cc;
  flex-wrap: wrap;
}
.ops-card-link-main-cron {
  width: 100%;
  margin-top: 0;
  padding: 8px 10px 0;
  border-radius: 0;
  cursor: default;
}
.ops-card-link-main-cron:hover,
.ops-card-link-main-cron:focus-visible {
  background: transparent;
}
.ops-card-link-main-bottom-cron {
  justify-content: space-between;
  gap: 12px;
}
.ops-card-cron-next-run {
  margin-left: auto;
  text-align: right;
}
.ops-card-accordion-titlebar {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.82);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.ops-card-accordion-titlebar:hover,
.ops-card-accordion-titlebar:focus-visible {
  outline: none;
  background: rgba(15, 23, 42, 0.82);
}
.ops-card-titlebar-status {
  display: inline-flex;
  min-width: 0;
}
.cron-card-title {
  margin: 0;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  justify-self: stretch;
  align-self: stretch;
}
.ops-card-accordion-body {
  display: grid;
  gap: 0;
  margin-top: 8px;
  padding: 0 10px;
}
.cron-card-link.collapsed .ops-card-accordion-body {
  display: none;
}
.ops-card-actions-row {
  margin-top: 8px;
}
.ops-card-actions-row-bottom {
  margin-top: 10px;
  padding: 0 10px 10px;
}
.ops-kpi-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  margin-top: 12px;
  color: #f8fbff;
}
.ops-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.ops-task-card-head {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
  row-gap: 0;
  margin-bottom: 4px;
}
.ops-task-client-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  gap: 0;
  min-width: 16px;
  width: 16px;
  flex: 0 0 16px;
  order: 0;
  max-width: 16px;
  margin-top: 0;
  transform: translateY(-1px);
}
.ops-task-client-favicon-wrap {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  overflow: visible;
  margin: 0;
  padding: 0;
  background: transparent;
}
.ops-task-client-favicon-wrap svg,
.ops-task-client-favicon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  display: block;
}
.ops-task-client-favicon-wrap svg {
  display: none;
}
.ops-task-client-favicon {
  object-fit: contain;
}
.ops-task-client-favicon-wrap.is-fallback img {
  display: none;
}
.ops-task-client-favicon-wrap.is-fallback svg {
  display: block;
}
.ops-task-priority-btn {
  border: 0;
  margin: 0;
  margin-left: 0;
  padding: 4px 8px;
  border-radius: 999px;
  opacity: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  justify-self: end;
  width: auto;
  min-width: 0;
  max-width: max-content;
  font-size: 11px;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0.01em;
  text-align: center;
  margin-top: 1px;
}
.ops-task-priority-btn > span {
  white-space: nowrap;
  width: auto;
  margin: 0;
  text-align: center;
  color: inherit;
}
.ops-task-priority-btn:hover,
.ops-task-priority-btn:focus-visible,
.ops-task-priority-btn:focus-within,
.ops-task-priority-btn.filter-active {
  color: #f8fbff;
}
.ops-task-priority-btn:hover > span,
.ops-task-priority-btn:focus-visible > span,
.ops-task-priority-btn:focus-within > span,
.ops-task-priority-btn.filter-active > span {
  color: #f8fbff;
}
.ops-task-priority-btn.badge-low {
  background: rgba(148, 163, 184, 0.24);
  color: #cbd5e1;
}
.ops-task-priority-btn.badge-medium {
  background: rgba(59, 130, 246, 0.24);
  color: #93c5fd;
}
.ops-task-priority-btn.badge-high {
  background: rgba(245, 158, 11, 0.24);
  color: #fbbf24;
}
.ops-task-priority-btn.badge-urgent {
  background: rgba(239, 68, 68, 0.24);
  color: #f87171;
}
.ops-task-card-head .ops-task-priority-btn {
  margin: 0 0 0 auto;
  margin-left: auto;
  flex: 0 0 auto;
  order: 2;
}
.ops-task-card-head .ops-task-priority-btn.badge {
  margin-left: 0;
}
.ops-task-title-singleline {
  margin: 0;
  align-self: start;
  line-height: 1.1;
  font-weight: 700;
  color: #f8fbff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ops-task-summary {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: #94a3b8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ops-rail-list, .ops-board-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.ops-list-card, .ops-task-card, .ops-deliverable-card, .ops-client-card {
  border-color: rgba(125, 211, 252, 0.18);
}
.ops-list-title {
  font-weight: 600;
  color: #eef4ff;
}
.ops-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  color: #94a3b8;
}
.ops-text-danger { color: #fca5a5; }
.ops-text-warn { color: #fde68a; }
.ops-board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.ops-board-col {
  min-width: 240px;
  background: color-mix(in srgb, var(--panel) 92%, #08111f);
  display: flex;
  flex-direction: column;
}
.ops-board-stack {
  min-height: 240px;
  flex: 1 1 auto;
  min-width: 0;
  align-content: start;
  grid-auto-rows: max-content;
  padding-bottom: 14px;
  border-radius: 10px;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}
.ops-task-card {
  cursor: pointer;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  align-self: start;
  box-sizing: border-box;
  overflow: visible;
  padding: 12px 10px 10px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease, opacity 140ms ease;
  z-index: 1;
}
.ops-task-card:hover {
  z-index: 30;
  border-color: rgba(251, 191, 36, 0.88);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.88);
  transform: none;
}
.ops-task-card:focus,
.ops-task-card:focus-visible,
.ops-task-card:focus-within {
  outline: none;
  box-shadow: none;
}
.ops-task-card:active:not(.dragging) {
  z-index: 32;
  border-color: rgba(251, 191, 36, 0.88);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.88), 0 0 18px rgba(251, 191, 36, 0.2), 0 10px 26px rgba(69, 45, 8, 0.38);
}
.ops-task-card.dragging {
  opacity: 0.88;
  z-index: 40;
  border-style: solid;
  border-color: rgba(251, 191, 36, 0.88);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.88), 0 0 24px rgba(251, 191, 36, 0.3), 0 14px 26px rgba(2, 6, 23, 0.45);
  transform: scale(1.02);
  background: color-mix(in srgb, var(--panel) 84%, #2b1b05);
}
.ops-drop-target {
  background: transparent;
  box-shadow: none;
}
.ops-drop-target-empty {
  box-shadow: none;
}
.ops-drop-target-empty::before,
.ops-drop-target-tail::after,
.ops-drop-indicator::before {
  content: '';
  display: block;
  height: 3px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.95);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.22);
}
.ops-drop-target-empty::before {
  margin: 18px 12px;
}
.ops-drop-target-tail::after {
  margin: 10px 8px 4px;
}
.ops-drop-indicator {
  height: 12px;
  min-height: 12px;
  display: block;
  flex: 0 0 12px;
}
.ops-drop-indicator::before {
  margin: 4px 8px 5px;
}
.ops-task-blocked {
  border-color: rgba(125, 211, 252, 0.18);
  box-shadow: none;
}
.ops-task-modal {
  width: min(92vw, 1180px);
}
.ops-task-modal .session-modal-header {
  min-height: 46px;
  padding: 10px 12px;
}
.ops-task-modal .session-modal-header h3 {
  margin: 0;
  line-height: 1.1;
}
.ops-task-modal .session-modal-header .ops-standups-inspector-links {
  align-items: center;
}
.ops-task-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  overflow: auto;
}
.ops-task-modal-body-rich {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.95fr);
  align-items: start;
}
.ops-task-modal-col {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.ops-task-modal-section-wide {
  grid-column: 1 / -1;
}
.ops-task-modal-main {
  display: grid;
  gap: 8px;
}
.ops-task-modal-section {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}
.ops-task-modal-section h4 {
  margin: 0;
}
.ops-task-modal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ops-task-section-titlebar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
}
.ops-task-add-note-btn {
  flex: 0 0 auto;
}
.ops-task-notes-sort-btn {
  flex: 0 0 auto;
  margin-left: auto;
}
.ops-task-notes-sort-btn[data-sort-direction="asc"] {
  color: var(--module-accent);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--module-glow) 45%, transparent));
}
.ops-task-modal-section-notes,
.ops-task-modal-col-side .ops-task-modal-section {
  align-content: start;
}
.ops-task-linked-deliverables-titlebar {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.ops-task-modal-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.ops-task-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
.ops-task-kv-grid-tight {
  gap: 6px 12px;
}
.ops-task-blocker-panel {
  border-color: rgba(248, 113, 113, 0.28);
  gap: 8px;
}
.ops-task-blocker-panel .title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1.1;
}
.ops-task-blocker-panel .title-with-icon svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.ops-task-blocker-body {
  display: grid;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid rgba(248, 113, 113, 0.16);
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.1);
}
.ops-task-blocker-body .ops-task-note-body {
  gap: 6px;
}
.ops-task-blocker-body .ops-task-note-paragraph,
.ops-task-blocker-body .ops-task-note-list {
  font-size: 12px;
  line-height: 1.4;
}
.ops-task-blocker-body .ops-task-note-section-label {
  color: #fecaca;
}
.ops-task-blocker-body .ops-task-note-path {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.18);
}
.ops-task-blocker-meta,
.ops-task-note-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ops-task-blocker-meta {
  justify-content: space-between;
  color: #fca5a5;
  font-size: 12px;
}
.ops-task-deliverables,
.ops-task-notes-list,
.ops-task-history-list {
  display: grid;
  gap: 10px;
  margin-top: 0;
}
.ops-task-notes-list {
  max-height: 500px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-color: color-mix(in srgb, var(--module-accent) 72%, #334155) rgba(8, 15, 28, 0.38);
  scrollbar-width: thin;
}
.ops-task-notes-list::-webkit-scrollbar {
  width: 8px;
}
.ops-task-notes-list::-webkit-scrollbar-track {
  background: rgba(8, 15, 28, 0.38);
  border-radius: 999px;
}
.ops-task-notes-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--module-accent) 72%, #334155);
  border-radius: 999px;
  box-shadow: 0 0 8px color-mix(in srgb, var(--module-glow) 55%, transparent);
}
.ops-task-history-list-grid {
  grid-template-columns: 1fr;
  max-height: 260px;
  overflow: auto;
}
.ops-task-history-section {
  gap: 8px;
}
.ops-task-history-toggle {
  padding: 0;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  list-style: none;
}
.ops-task-history-toggle::-webkit-details-marker {
  display: none;
}
.ops-task-history-toggle:focus-visible {
  outline: 1px solid rgba(125, 211, 252, 0.6);
  outline-offset: 4px;
  border-radius: 8px;
}
.ops-task-history-toggle-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ops-task-history-chevron {
  display: inline-flex;
  align-items: center;
  color: #8fa0b8;
  transition: color 120ms ease, filter 120ms ease, transform 120ms ease;
}
.ops-task-history-toggle:hover .ops-task-history-chevron,
.ops-task-history-toggle:focus-visible .ops-task-history-chevron {
  color: var(--module-accent);
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--module-glow) 70%, transparent))
    drop-shadow(0 0 12px color-mix(in srgb, var(--module-glow) 35%, transparent));
}
.ops-task-history-section[open] .ops-task-history-chevron {
  transform: rotate(180deg);
}
.ops-task-history-section .ops-task-history-list {
  margin-top: 0;
}
.ops-task-deliverable,
.ops-task-note,
.ops-task-history-item {
  border-color: rgba(125, 211, 252, 0.24);
}
.ops-task-note {
  display: grid;
  gap: 8px;
}
.ops-task-note .ops-card-topline {
  margin-bottom: 0;
}
.ops-task-note-body {
  display: grid;
  gap: 8px;
}
.ops-task-note-paragraph {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
}
.ops-task-note-paragraph strong {
  color: #f8fafc;
  font-weight: 700;
}
.ops-task-note-section-label {
  margin: 2px 0 0;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}
.ops-task-note-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
}
.ops-task-note-path {
  display: inline;
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--module-accent) 26%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--module-accent) 10%, rgba(15, 23, 42, 0.92));
  color: #dbeafe;
  font-family: "Ubuntu Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}
.ops-task-history-table {
  display: grid;
  gap: 0;
}
.ops-task-history-row {
  display: grid;
  grid-template-columns: 170px 130px minmax(0, 1fr) 140px;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 12px;
}
.ops-task-history-row:last-child {
  border-bottom: 0;
}
.ops-task-history-row-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0f172a;
  color: #9fb1c8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ops-task-deliverable {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.ops-task-deliverable.is-blocked {
  border-color: rgba(248, 113, 113, 0.36);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.08);
}
.ops-task-deliverable-content {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
}
.ops-task-deliverable-order-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  min-height: 76px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  border-right: 1px solid rgba(125, 211, 252, 0.16);
}
.ops-task-deliverable-header {
  display: block;
  min-width: 0;
}
.ops-task-deliverable-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: left;
  cursor: pointer;
}

.ops-task-deliverable-toggle:focus-visible {
  outline: 1px solid rgba(125, 211, 252, 0.6);
  outline-offset: 3px;
  border-radius: 8px;
}
.ops-task-deliverable-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.ops-task-deliverable-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ops-task-deliverable-order-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8fa0b8;
  box-shadow: none;
  filter: none;
}
.ops-task-deliverable-order-btn:hover:not(:disabled),
.ops-task-deliverable-order-btn:focus-visible:not(:disabled) {
  color: var(--module-accent);
  background: transparent;
  border-color: transparent;
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--module-glow) 70%, transparent))
    drop-shadow(0 0 12px color-mix(in srgb, var(--module-glow) 35%, transparent));
}
.ops-task-deliverable-order-btn:disabled {
  opacity: 0.28;
  cursor: default;
}
.ops-task-deliverable-order-btn svg {
  width: 14px;
  height: 14px;
}
.ops-task-deliverable-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ops-task-deliverable-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ops-task-deliverable-check-ui {
  width: 18px;
  height: 18px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid rgba(125, 211, 252, 0.5);
  background: rgba(15, 23, 42, 0.65);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.4);
}
.ops-task-deliverable.is-complete .ops-task-deliverable-check-ui {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.7);
}
.ops-task-deliverable.is-complete .ops-task-deliverable-check-ui::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 10px;
  border-right: 2px solid #4ade80;
  border-bottom: 2px solid #4ade80;
  transform: translate(-50%, -56%) rotate(45deg);
}
.ops-task-deliverable.is-blocked .ops-task-deliverable-order-rail {
  background: linear-gradient(180deg, rgba(76, 29, 29, 0.9), rgba(30, 41, 59, 0.94));
  border-right-color: rgba(248, 113, 113, 0.24);
}
.ops-task-deliverable-blocked-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 9px;
  background: rgba(127, 29, 29, 0.16);
  color: #fecaca;
  font-size: 12px;
  line-height: 1.35;
}
.ops-task-deliverable-blocked-note .badge {
  flex: 0 0 auto;
}
.ops-task-deliverable-title {
  min-width: 0;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}
.ops-task-deliverable-preview {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  max-width: 100%;
}
.ops-task-deliverable.is-open .ops-task-deliverable-preview {
  display: none;
}
.ops-task-deliverable-body-copy {
  margin: 0 0 4px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.45;
}
.ops-task-deliverable-toggle-icon {
  color: #9fb1c8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease;
}
.ops-task-deliverable-toggle[aria-expanded="true"] .ops-task-deliverable-toggle-icon {
  transform: rotate(180deg);
}
.ops-task-deliverable-panel {
  display: grid;
  gap: 8px;
  padding-top: 4px;
  padding-left: 0;
}
.ops-task-deliverable-panel[hidden] {
  display: none !important;
}
.ops-task-deliverable.is-open .ops-task-deliverable-panel {
  display: grid;
}
.ops-task-deliverable-panel .kv {
  border-top: 1px dashed rgba(148, 163, 184, 0.16);
  padding-top: 8px;
  align-items: start;
  gap: 12px;
}
.ops-workspaces-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  max-height: none;
}
.ops-workspace-render,
.ops-workspace-empty {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ops-workspaces-menu {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ops-workspaces-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 2;
}
.ops-workspaces-files {
  flex: 1 1 auto;
  min-height: 0;
  height: 0;
  padding: 0;
  background: #0e162b;
  overflow: auto;
  border-radius: 0;
}
.ops-workspace-file-group {
  display: grid;
}
.ops-workspace-file-group.is-shared {
  border-top: 1px solid rgba(148,163,184,0.14);
}
.ops-workspace-file-group-head {
  padding: 10px 14px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fa0b8;
}
.ops-workspace-file-group.is-shared .ops-workspace-file-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
  padding: 12px 14px 10px;
  color: #9fb1c8;
  background: #162136;
  border-bottom: 1px solid rgba(148,163,184,0.1);
  box-shadow: none;
}
.ops-workspace-file-group.is-shared .ops-workspace-file-group-head .title-with-icon {
  color: #dfe9f7;
}
.ops-workspace-file-group.is-shared .ops-workspace-file-group-head i {
  color: #dfe9f7;
  filter: drop-shadow(0 0 10px rgba(125, 211, 252, 0.18));
}
.ops-workspace-scope-label {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ops-workspace-file-group .briefs-empty {
  margin: 0;
  padding: 0 14px 14px;
}
.ops-workspace-file-group .ops-workspace-file {
  border-radius: 0;
}
.ops-workspace-file-group .ops-workspace-file + .ops-workspace-file,
.ops-workspace-file-group .ops-workspace-file:first-of-type {
  border-top: 1px solid rgba(148,163,184,0.1);
}
.ops-workspace-file-group:first-child .ops-workspace-file:first-of-type {
  border-top-color: rgba(148,163,184,0.08);
}
.ops-workspace-file[data-workspace-scope="shared"] {
  background: rgba(11, 25, 48, 0.72);
}
.ops-workspace-file[data-workspace-scope="shared"]:hover {
  background: rgba(17, 34, 64, 0.92);
}
.ops-workspace-file[data-workspace-scope="shared"].active {
  background: rgba(19, 40, 72, 0.96);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.22);
}
.ops-workspace-file[data-workspace-scope="shared"] .brief-item-label {
  color: #c4dcff;
}
.ops-workspace-file[data-workspace-scope="shared"] .brief-item-sub,
.ops-workspace-file[data-workspace-scope="shared"] .brief-item-chevron {
  color: #8dc6ff;
}
.ops-workspaces-footer {
  min-height: 56px;
  border-top: 1px solid rgba(148,163,184,0.12);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  background: #162136;
  box-shadow: none;
}
.ops-workspaces-footer-label {
  color: #8fa0b8;
  letter-spacing: 0.04em;
}
.ops-workspace-member-btn {
  position: relative;
  flex: 0 0 auto;
  color: #8fa0b8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
}
.ops-workspace-member-btn > i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.ops-workspace-member-label {
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ops-workspace-member-btn .filter-dropdown {
  right: 0;
  left: auto;
}
.ops-workspace-member-option i {
  width: 14px;
  height: 14px;
  color: #8fa0b8;
  flex-shrink: 0;
}
.ops-workspace-member-option span {
  white-space: nowrap;
}
.ops-workspace-file {
  border-radius: 0;
}
.ops-workspace-render-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 0 0 10px;
}
.ops-workspace-render-title {
  min-width: 0;
  flex: 1 1 auto;
}
.ops-workspace-title-main {
  margin: 0;
}
.ops-workspace-root {
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-workspace-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ops-workspace-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.ops-workspace-editor {
  width: 100%;
  min-height: 100%;
  flex: 1 1 auto;
  resize: none;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.2);
  background: #09111f;
  color: #eef4ff;
  padding: 14px;
  font: 14px/1.5 var(--font-mono);
}
.ops-workspace-markdown {
  min-height: 100%;
  max-height: none;
  overflow: auto;
}
.ops-workspace-code {
  margin: 0;
  min-height: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #09111f;
  border: 1px solid rgba(148,163,184,0.16);
  color: #d9e7ff;
  font: 13px/1.5 var(--font-mono);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 1280px) {
  .ops-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-board-grid { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
}
@media (max-width: 860px) {
  .ops-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brain-dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brain-dashboard-stat-grid {
    grid-template-columns: 1fr;
  }
  .brain-dashboard-page-copy {
    min-height: 0;
  }
  .config-summary-grid {
    grid-template-columns: 1fr;
  }
  .ops-pm-summary-head,
  .ops-mission-head {
    flex-direction: column;
    align-items: stretch;
  }
  .ops-pm-summary-side {
    justify-items: start;
    text-align: left;
  }
  .ops-pm-summary-chips,
  .ops-mission-status-chips {
    justify-content: flex-start;
  }
  .ops-pm-board-hint {
    max-width: none;
  }
  .ops-pm-board-hint-bottom {
    margin-left: 0;
    text-align: left;
  }
  .ops-pm-client-row,
  .ops-pm-board-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .ops-pm-board-controls {
    justify-content: flex-start;
  }
  .ops-pm-client-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ops-chart-row {
    grid-template-columns: minmax(64px, 84px) minmax(0, 1fr) 24px;
  }
  .ops-task-modal-body { grid-template-columns: 1fr; }
}

/* Ops Sessions split view – mirrors the briefs/build logs layout */
.ops-sessions-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  max-height: none;
}

.ops-session-render-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 0 0 10px;
}

.ops-session-title-main {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.ops-session-title-main span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-session-title-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  font-size: 10px;
  color: #8fa0b8;
  white-space: nowrap;
  line-height: 1;
}

.ops-session-render-head > * {
  min-width: 0;
}

.ops-session-render {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ops-session-history-wrap {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0 -14px -14px;
  width: calc(100% + 28px);
}

.ops-session-history-list {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  padding: 0 10px 0 14px;
}

.ops-session-history-footer {
  margin: 0;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  justify-content: center;
  border-radius: 0 0 14px 14px;
}

.ops-session-title-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  padding: 0;
}

.ops-session-title-chip-label {
  color: #71839c;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-sessions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.ops-sessions-head-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.ops-session-filter-btn {
  position: relative;
  flex: 0 0 auto;
  color: #8fa0b8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
}

.ops-session-filter-btn > i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ops-session-filter-label {
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.ops-session-filter-btn .filter-dropdown {
  right: 0;
  left: auto;
}

.ops-session-filter-option i {
  width: 14px;
  height: 14px;
  color: #8fa0b8;
  flex-shrink: 0;
}

.ops-session-filter-option span {
  white-space: nowrap;
}

.ops-sessions-list {
  padding-bottom: 4px;
}

.ops-session-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ops-session-item-head .brief-item-label {
  flex: 1 1 auto;
}

.ops-session-item-head .ops-session-agent-pill {
  margin-left: auto;
  flex-shrink: 0;
}

.ops-session-item-head .ops-session-agent-pill-lineage {
  display: none;
}

.ops-session-agent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
}

.ops-session-agent-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #122033;
  border: 1px solid #243a56;
  color: #dce9fb;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.ops-session-agent-pill.compact {
  font-size: 10px;
  padding: 4px 8px;
}

.ops-session-agent-pill-lineage {
  color: #7f97b6;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ops-session-agent-pill i {
  width: 13px;
  height: 13px;
}

@media (max-width: 900px) {
  .ops-sessions-head {
    align-items: flex-start;
  }

  .ops-sessions-head-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .ops-session-render-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .ops-session-title-main {
    flex-basis: 100%;
  }

  .ops-session-title-meta {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .ops-sessions-shell,
  .ops-workspaces-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 30%) minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  .ops-sessions-menu,
  .ops-workspaces-menu {
    min-height: 0;
    max-height: none;
  }

  .ops-session-render,
  .ops-workspace-render,
  .ops-workspace-empty {
    min-height: 0;
    overflow: hidden;
  }

  .ops-workspaces-head {
    align-items: flex-start;
  }

  .ops-workspace-render-head {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-workspace-actions {
    justify-content: flex-start;
  }

  .ops-workspace-root {
    white-space: normal;
  }
}

.ops-standups-shell {
  display: grid;
  gap: 12px;
  padding: 4px 12px 12px;
}

.ops-standups-overview-card,
.ops-standups-calendar-card {
  overflow: visible;
}

.ops-standups-overview-card {
  position: relative;
  z-index: 50;
}

.ops-standups-calendar-card {
  position: relative;
  z-index: 1;
}

.ops-standups-titlebar,
.ops-standups-toolbar {
  display: grid;
  align-items: center;
  overflow: visible;
  position: relative;
  z-index: 60;
}

.ops-standups-titlebar {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.ops-standups-toolbar {
  grid-template-columns: auto 1fr auto;
  gap: 10px 12px;
}

.ops-standups-toolbar-prominent {
  padding: 0;
  margin-top: 18px;
}

.ops-standups-view-toggle,
.ops-standups-date-nav,
.ops-standups-filters,
.ops-standups-inspector-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.ops-standups-view-toggle {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ops-standups-filters {
  justify-content: flex-end;
  align-self: center;
  overflow: visible;
  position: relative;
  z-index: 70;
}

.ops-standups-title {
  margin: 0;
}

.ops-standups-title span {
  text-shadow: 0 0 10px var(--module-glow);
}

.ops-standups-date-nav-prominent {
  gap: 12px;
  justify-content: center;
}

.ops-standups-date-nav-prominent .section-filter-btn {
  min-height: 40px;
}

.ops-standups-nav-btn {
  min-width: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  justify-content: center;
}

.ops-standups-nav-btn i {
  width: 20px;
  height: 20px;
}

.ops-standups-nav-btn:hover,
.ops-standups-nav-btn:active {
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0 12px color-mix(in srgb, var(--module-accent) 38%, transparent);
}

.ops-standups-today-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease, text-shadow 120ms ease;
}

.ops-standups-today-btn:hover,
.ops-standups-today-btn.is-active {
  color: #ffffff;
}

.ops-standups-today-btn.is-active {
  text-shadow: 0 0 12px color-mix(in srgb, var(--module-accent) 55%, transparent);
}

.ops-standups-period-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  min-width: 260px;
  text-align: center;
}

.ops-standups-period-hint {
  font-size: 12px;
  white-space: nowrap;
}

.ops-standups-menu-btn {
  gap: 8px;
}

.ops-standups-new-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8fa0b8;
  text-shadow: none;
  filter: none;
  box-shadow: none;
  transition: color 120ms ease;
}

.ops-standups-new-btn:hover,
.ops-standups-new-btn:focus-visible {
  border-color: transparent;
  background: transparent;
  color: var(--module-accent);
  filter: none;
  outline: none;
}

.ops-standups-new-btn i,
.ops-standups-new-btn svg {
  width: 18px;
  height: 18px;
  color: currentColor;
  filter: none;
  text-shadow: none;
  transition: color 120ms ease, filter 120ms ease;
}

.ops-standups-new-btn:hover svg,
.ops-standups-new-btn:focus-visible svg {
  color: currentColor;
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--module-glow) 70%, transparent))
    drop-shadow(0 0 12px color-mix(in srgb, var(--module-glow) 35%, transparent));
}

.ops-standup-participant-picker {
  display: grid;
  gap: 10px;
}

.ops-standup-participant-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.ops-standup-moderator-lock {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
}

.ops-standup-moderator-lock > div {
  min-width: 0;
}

.ops-standup-moderator-lock > .mono {
  text-align: right;
  overflow-wrap: anywhere;
}

.ops-standup-moderator-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.ops-standup-moderator-icon svg {
  width: 15px;
  height: 15px;
}

.ops-standup-moderator-lock strong,
.ops-standup-moderator-lock small {
  display: block;
}

.ops-standup-moderator-lock strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.ops-standup-moderator-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.ops-standup-participant-hint {
  display: block;
}

@media (max-width: 720px) {
  .ops-standup-moderator-lock {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ops-standup-moderator-lock > .mono {
    grid-column: 2;
    text-align: left;
  }
}

.ops-standup-participant-option {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}

.ops-standup-participant-option input {
  margin: 0;
}

.ops-standup-participant-option small {
  color: var(--muted);
  width: 100%;
  margin-left: 24px;
}

.ops-standup-skill-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.55fr) minmax(0, 1.45fr);
  gap: 10px;
  align-items: start;
}

.ops-standup-skill-hint {
  grid-column: 1 / -1;
  display: block;
  min-height: 76px;
  max-height: 76px;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2, #10182a) 90%, transparent);
  color: var(--muted);
  line-height: 1.35;
}

.ops-standup-schedule-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(170px, 0.7fr) minmax(0, 1.75fr);
  gap: 10px;
  align-items: start;
}

.ops-standup-recurrence-inline {
  display: contents;
}

.ops-standup-weekdays-field {
  min-width: 0;
}

.ops-standup-weekday-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.ops-standup-weekday-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2, #10182a) 82%, transparent);
  color: var(--text);
  font-size: 11px;
  line-height: 1;
}

.ops-standup-weekday-option input {
  margin: 0;
}

.ops-standup-participants-panel {
  margin-bottom: 12px;
}

.ops-standup-module-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.ops-standup-module-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.ops-standup-module-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2, #10182a) 86%, transparent);
}

.ops-standup-module-item.is-active {
  border-color: color-mix(in srgb, var(--module-accent) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-accent) 18%, transparent) inset;
}

.ops-standup-module-check {
  margin: 0;
}

.ops-standup-module-trigger {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-standup-module-trigger:hover,
.ops-standup-module-trigger:focus-visible {
  color: var(--module-accent);
  outline: none;
}

.ops-standup-module-detail {
  min-height: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel-2, #10182a) 92%, transparent);
  display: grid;
  gap: 6px;
  align-content: start;
}

.ops-standup-module-detail-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.ops-standup-module-detail-head .title-with-icon {
  margin: 0;
  font-size: 12px;
}

.ops-standup-module-detail-body {
  display: grid;
  gap: 6px;
  align-content: start;
}

.ops-standup-module-detail-body p {
  min-height: calc(2 * 1.35em);
  margin: 0;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .ops-standup-skill-grid,
  .ops-standup-schedule-grid {
    grid-template-columns: 1fr;
  }

  .ops-standup-weekday-list {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  }

  .ops-standup-module-shell {
    grid-template-columns: 1fr;
  }
}

.ops-standups-calendar-card {
  padding: 12px;
  position: relative;
  z-index: 1;
}

.ops-standups-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.ops-standups-day-card {
  padding: 10px;
  min-height: 360px;
  border-color: color-mix(in srgb, var(--line) 85%, transparent);
}

.ops-standups-day-card.is-today,
.ops-standups-month-cell.is-today {
  border-color: var(--module-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--module-accent) 50%, transparent) inset;
}

.ops-standups-day-card.is-today {
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 0;
}

.ops-standups-day-card.is-today::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 8%, color-mix(in srgb, var(--module-accent) 22%, transparent), transparent 60%),
    radial-gradient(circle at 50% 92%, color-mix(in srgb, var(--module-accent) 14%, transparent), transparent 68%);
  filter: blur(14px);
  opacity: 1;
  pointer-events: none;
  z-index: -2;
}

.ops-standups-day-card.is-today::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  background: var(--panel-soft);
  pointer-events: none;
  z-index: -1;
}

.ops-standups-day-card.is-today > * {
  position: relative;
  z-index: 1;
}

.ops-standups-month-cell.is-today {
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 0;
}

.ops-standups-month-cell.is-today::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 8%, color-mix(in srgb, var(--module-accent) 20%, transparent), transparent 60%),
    radial-gradient(circle at 50% 92%, color-mix(in srgb, var(--module-accent) 12%, transparent), transparent 68%);
  filter: blur(12px);
  opacity: 1;
  pointer-events: none;
  z-index: -2;
}

.ops-standups-month-cell.is-today::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-soft) 76%, #0b1020), color-mix(in srgb, var(--bg-1) 92%, black));
  pointer-events: none;
  z-index: -1;
}

.ops-standups-month-cell.is-today > * {
  position: relative;
  z-index: 1;
}

.ops-standups-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ops-standups-day-name {
  font-weight: 700;
  font-size: 13px;
}

.ops-standups-day-date {
  color: var(--muted);
  font-size: 12px;
}

.ops-standups-day-stack,
.ops-standups-related-list {
  display: grid;
  gap: 8px;
}

.ops-standup-card,
.ops-standups-related-task,
.ops-standups-month-cell {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-soft) 76%, #0b1020), color-mix(in srgb, var(--bg-1) 92%, black));
  color: var(--text);
  border-radius: 14px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  min-width: 0;
}

.ops-standup-card:hover,
.ops-standups-related-task:hover,
.ops-standups-month-cell:hover {
  border-color: var(--module-accent);
}

.ops-standup-card-top,
.ops-standup-card-meta,
.ops-standups-month-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.ops-standup-card-top {
  flex-wrap: nowrap;
  min-height: 16px;
}

.ops-standup-card-divider {
  height: 1px;
  margin: 4px -10px 3px;
  background: color-mix(in srgb, var(--line) 78%, transparent);
}

.ops-standup-card-title,
.ops-standups-related-task-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  margin: 6px 0 4px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ops-standup-card-meta,
.ops-standups-related-task-meta,
.ops-standups-empty-slot,
.ops-standups-empty-note,
.ops-standups-month-more {
  color: var(--muted);
  font-size: 12px;
}

.ops-standup-card-meta {
  flex-wrap: wrap;
}


.ops-standup-card-submeta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.ops-standup-card-type {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
}

.ops-standup-card-type.type-standup { background: #7dd3fc; }
.ops-standup-card-type.type-review { background: #34d399; }
.ops-standup-card-type.type-research { background: #fbbf24; }
.ops-standup-card-type.type-execution { background: #fb7185; }
.ops-standup-card-type.type-executive { background: #7dd3fc; }
.ops-standup-card-type.type-client { background: #7dd3fc; }
.ops-standup-card-type.type-kickoff { background: #7dd3fc; }

.ops-standup-card-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.ops-standup-card-status {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.ops-standup-card-status.status-completed {
  color: #34d399;
}

.ops-standup-card-status.status-pending,
.ops-standup-card-status.status-in_progress {
  color: #fbbf24;
}

.ops-standup-card-status.status-upcoming {
  color: #7dd3fc;
}

.ops-standup-card-status.status-missed {
  color: #94a3b8;
}

.ops-standups-month-weekdays,
.ops-standups-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.ops-standups-month-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ops-standups-month-cell {
  min-height: 124px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.ops-standups-month-cell.is-outside {
  opacity: 0.5;
}

.ops-standups-month-items {
  display: grid;
  gap: 6px;
}

.ops-standups-month-pill {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: color-mix(in srgb, var(--panel-soft) 85%, black);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.ops-standups-month-pill.type-standup { border-color: #7dd3fc; }
.ops-standups-month-pill.type-review { border-color: #34d399; }
.ops-standups-month-pill.type-research { border-color: #fbbf24; }
.ops-standups-month-pill.type-execution { border-color: #fb7185; }
.ops-standups-month-pill.type-executive { border-color: #7dd3fc; }
.ops-standups-month-pill.type-client { border-color: #7dd3fc; }
.ops-standups-month-pill.type-kickoff { border-color: #7dd3fc; }


.ops-standups-month-pill.has-finalization.status-pending {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.28);
}

.ops-standups-month-pill.has-finalization.status-failed {
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}

.ops-standups-inspector-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  align-items: center;
}

.ops-standups-meta-slot {
  display: contents;
}

.ops-standups-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-standups-participant-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--panel-soft) 76%, black);
  font-size: 12px;
}

.ops-standups-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text);
}

.ops-standups-list li + li {
  margin-top: 6px;
}

.ops-standups-playback-grid {
  display: grid;
  gap: 6px;
}

.ops-standups-playback-note {
  margin-top: 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ops-proposals-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.ops-proposal-metric {
  display: grid;
  gap: 8px;
}

.ops-proposal-metric-value {
  justify-self: start;
}

.ops-proposals-panel,
.ops-proposal-queue,
.ops-proposal-card,
.ops-proposal-actions {
  display: grid;
  gap: 10px;
}

.ops-proposal-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ops-proposal-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--muted);
}

.ops-proposal-actions {
  grid-template-columns: repeat(auto-fit, minmax(110px, max-content));
  align-items: start;
}

.ops-proposal-review-panel {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
}

.ops-proposal-review-panel summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-proposal-review-panel summary::-webkit-details-marker {
  display: none;
}

.ops-proposal-review-panel[open] .accordion-chevron {
  transform: rotate(180deg);
}

.ops-proposal-review-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ops-proposal-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
}

.ops-proposal-review-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ops-proposal-review-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ops-proposal-review-row-actions,
.ops-proposal-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ops-proposal-rationale {
  margin: 10px 0 0;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ops-standups-linked-proposals {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ops-standups-action-list {
  gap: 8px;
}

.ops-standups-action-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ops-standups-action-item > span {
  flex: 1 1 auto;
}

.ops-standups-action-item .btn {
  flex: 0 0 auto;
}

.ops-proposal-form-modal {
  width: min(92vw, 880px);
}

.ops-standups-transcript {
  max-height: 320px;
  overflow: auto;
}

.ops-standup-modal {
  width: min(1120px, calc(100vw - 48px));
  min-height: 500px;
  max-height: 82vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.ops-standup-modal .session-modal-header {
  flex: 0 0 auto;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ops-standups-modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ops-standups-modal-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ops-standups-modal-title-actions .icon-btn,
.ops-standups-header-right .icon-btn,
.ops-standups-transcript-toolbar .icon-btn,
.ops-standups-transcript-toolbar a.icon-btn {
  border: none;
  background: transparent;
  box-shadow: none;
  color: #ffffff;
}

.ops-standups-modal-title-actions .icon-btn:hover,
.ops-standups-modal-title-actions .icon-btn:focus-visible,
.ops-standups-header-right .icon-btn:hover,
.ops-standups-header-right .icon-btn:focus-visible,
.ops-standups-transcript-toolbar .icon-btn:hover:not(:disabled),
.ops-standups-transcript-toolbar .icon-btn:focus-visible:not(:disabled),
.ops-standups-transcript-toolbar a.icon-btn:hover,
.ops-standups-transcript-toolbar a.icon-btn:focus-visible {
  color: var(--module-accent);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--module-accent) 55%, transparent));
  outline: none;
}

.ops-standups-transcript-toolbar a.icon-btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.35;
}

.ops-standups-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ops-standups-header-participants {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ops-standup-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(348px, 1fr);
  gap: 12px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-right: 6px;
  align-content: start;
}

.ops-standups-transcript-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.ops-standups-transcript-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.ops-standups-transcript-head > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.ops-standups-transcript-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ops-standups-transcript-toolbar .icon-btn {
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted, rgba(255,255,255,0.82));
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  transition: color 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.ops-standups-transcript-toolbar .icon-btn:hover:not(:disabled),
.ops-standups-transcript-toolbar .icon-btn:focus-visible:not(:disabled) {
  color: var(--module-accent);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--module-accent) 55%, transparent));
  outline: none;
}

.ops-standups-transcript-toolbar .icon-btn:disabled {
  color: rgba(255,255,255,0.3);
  cursor: default;
  opacity: 0.55;
}

.ops-standups-transcript-toolbar .icon-btn svg,
.ops-standups-transcript-toolbar .icon-btn i,
.ops-standups-transcript-toolbar .icon-btn svg * {
  stroke: currentColor;
}

.ops-standups-audio-scrubber {
  width: 140px;
  min-width: 96px;
  max-width: 20vw;
  accent-color: var(--module-accent);
  color: var(--module-accent);
}

.ops-standups-transcript-script,
.ops-standups-transcript {
  max-height: 62vh;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.ops-standups-transcript-script *,
.ops-standups-transcript * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ops-standups-transcript-script pre,
.ops-standups-transcript pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ops-standups-transcript-script code,
.ops-standups-transcript code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ops-standups-transcript-script table,
.ops-standups-transcript img,
.ops-standups-transcript table,
.ops-standups-transcript-script img {
  max-width: 100%;
}

.ops-standups-transcript-turn {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.02);
  contain: layout paint;
}

.ops-standups-transcript-speaker {
  font-weight: 700;
  margin-bottom: 8px;
}

.ops-standups-overview-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
  box-sizing: border-box;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ops-standups-overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ops-standups-overview-grid .kv,
.ops-standups-details-accordion .kv {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.ops-standups-overview-grid .kv > :first-child,
.ops-standups-details-accordion .kv > :first-child {
  min-width: 0;
  flex: none;
}

.ops-standups-overview-grid .kv > :last-child,
.ops-standups-details-accordion .kv > :last-child {
  min-width: 0;
  flex: none;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ops-standups-overview-grid .kv > :last-child {
  font-size: 12px;
  line-height: 1.35;
}

.ops-standups-details-accordion {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  min-width: 0;
  max-width: 100%;
}

.ops-standups-details-accordion summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.ops-standups-details-accordion summary::-webkit-details-marker {
  display: none;
}

.ops-standups-accordion-label,
.ops-standups-accordion-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ops-standups-accordion-label {
  flex: 1 1 auto;
  min-width: 0;
}

.ops-standups-accordion-label > span {
  min-width: 0;
}

.ops-standups-accordion-meta {
  flex: 0 0 auto;
}

.ops-standups-details-accordion[open] .accordion-chevron {
  transform: rotate(180deg);
}

.ops-standups-details-accordion + .ops-standups-details-accordion {
  margin-top: 10px;
}

.ops-standups-brief-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  min-width: 0;
}

.ops-standups-timeline {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  min-width: 0;
}

.ops-standups-timeline-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
    color-mix(in srgb, var(--panel) 86%, #05070a);
  min-width: 0;
}

.ops-standups-timeline-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.ops-standups-timeline-summary-head > div {
  min-width: 0;
}

.ops-standups-timeline-summary-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.ops-standups-timeline-summary-title {
  margin-top: 3px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ops-standups-timeline-state {
  flex: 0 0 auto;
  max-width: 46%;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.ops-standups-timeline-state.status-completed {
  border-color: color-mix(in srgb, var(--ok) 32%, rgba(255,255,255,0.12));
  background: color-mix(in srgb, var(--ok) 10%, rgba(255,255,255,0.035));
  color: var(--ok);
}

.ops-standups-timeline-state.status-running {
  border-color: color-mix(in srgb, var(--warn) 34%, rgba(255,255,255,0.12));
  background: color-mix(in srgb, var(--warn) 10%, rgba(255,255,255,0.035));
  color: var(--warn);
}

.ops-standups-timeline-state.status-failed {
  border-color: color-mix(in srgb, var(--bad) 34%, rgba(255,255,255,0.12));
  background: color-mix(in srgb, var(--bad) 10%, rgba(255,255,255,0.035));
  color: var(--bad);
}

.ops-standups-timeline-state.status-skipped,
.ops-standups-timeline-state.status-cancelled,
.ops-standups-timeline-state.status-info {
  color: var(--muted);
}

.ops-standups-timeline-summary-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.ops-standups-timeline-summary-list > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding-top: 7px;
  margin-top: 7px;
  border-top: 1px solid rgba(255,255,255,0.065);
}

.ops-standups-timeline-summary-list > div:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.ops-standups-timeline-summary-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.ops-standups-timeline-summary-list dd {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
  text-align: right;
  overflow-wrap: anywhere;
}

.ops-standups-timeline-log {
  display: grid;
  gap: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.008)),
    rgba(5,7,10,0.46);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025);
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  contain: layout paint;
}

.ops-standups-timeline-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.065);
  contain: layout paint;
}

.ops-standups-timeline-row:last-child {
  border-bottom: 0;
}

.ops-standups-timeline-fallback {
  background: rgba(255,255,255,0.018);
}

.ops-standups-timeline-fallback .ops-standups-timeline-message {
  color: var(--muted);
}

.ops-standups-timeline-time {
  color: var(--muted);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  white-space: nowrap;
}

.ops-standups-timeline-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ops-standups-timeline-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.ops-standups-timeline-line-head > :last-child {
  color: var(--muted);
}

.ops-standups-timeline-message {
  color: color-mix(in srgb, var(--text) 70%, var(--muted));
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ops-standups-timeline-row.status-completed .ops-standups-timeline-line-head > :last-child {
  color: var(--ok);
}

.ops-standups-timeline-row.status-running .ops-standups-timeline-line-head > :last-child {
  color: var(--warn);
}

.ops-standups-timeline-row.status-failed .ops-standups-timeline-line-head > :last-child {
  color: var(--bad);
}

.ops-standups-timeline-row.status-skipped .ops-standups-timeline-line-head > :last-child,
.ops-standups-timeline-row.status-cancelled .ops-standups-timeline-line-head > :last-child {
  color: var(--muted);
}

.ops-standups-timeline-pending .ops-standups-timeline-message {
  min-height: 18px;
  display: flex;
  align-items: center;
}

.ops-standups-timeline-pending .refresh-dots {
  margin-left: 0;
}

.ops-standups-timeline-pending .refresh-dots span {
  background: var(--module-accent);
}

.ops-standups-timeline-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .ops-proposal-review-row {
    grid-template-columns: 1fr;
  }

  .ops-proposal-review-row-actions {
    justify-content: flex-start;
  }

  .ops-standups-timeline-summary-head {
    align-items: flex-start;
  }

  .ops-standups-timeline-summary-list > div {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .ops-standups-timeline-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }
}

.ops-standups-brief-grid > * {
  min-width: 0;
  max-width: 100%;
}

.ops-standups-brief-grid p,
.ops-standups-brief-grid li,
.ops-standups-brief-grid span,
.ops-standups-brief-grid a,
.ops-standups-brief-grid .muted,
.ops-standups-brief-grid .mono {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ops-standups-overview-card details:last-of-type {
  margin-bottom: 0;
}

@media (max-width: 1200px) {
  .ops-standups-period-label {
    min-width: 180px;
  }
}

@media (max-width: 1100px) {
  .ops-standups-titlebar,
  .ops-standups-toolbar,
  .ops-proposals-overview-grid {
    grid-template-columns: 1fr;
  }

  .ops-standups-filters {
    justify-content: flex-start;
  }

  .ops-standups-week-grid,
  .ops-standups-month-weekdays,
  .ops-standups-month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-standup-modal-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .ops-standups-overview-card,
  .ops-standups-transcript-card {
    overflow: visible;
  }

  .ops-standups-transcript-head {
    flex-wrap: wrap;
  }

  .ops-standups-transcript-toolbar {
    width: 100%;
    justify-content: flex-end;
  }

  .ops-standups-action-item {
    flex-direction: column;
  }
}

@media (max-width: 800px) {
  .ops-standups-week-grid,
  .ops-standups-month-weekdays,
  .ops-standups-month-grid,
  .ops-standup-modal-body {
    grid-template-columns: 1fr;
  }

  .ops-standups-period-label {
    min-width: 0;
    text-align: left;
  }

  .ops-standups-date-nav-prominent {
    justify-content: flex-start;
  }
}

.lab-ideas-shell {
  gap: 14px;
}

.lab-ideas-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.lab-ideas-browser {
  min-height: 0;
}

.lab-ideas-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.lab-idea-detail-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.lab-idea-detail-head {
  align-items: start;
  gap: 12px;
}

.lab-idea-detail-title-wrap {
  min-width: 0;
}

.lab-idea-name-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lab-idea-detail-score {
  align-self: stretch;
  min-width: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--module-accent) 55%, #6c84a8);
  background: linear-gradient(180deg, #172742 0%, #13203a 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  text-shadow: 0 0 12px color-mix(in srgb, var(--module-glow) 72%, transparent);
  padding: 10px 14px;
}

.lab-idea-score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.lab-idea-score-chip {
  border: 1px solid color-mix(in srgb, var(--line) 70%, #23324d);
  border-radius: 12px;
  background: #15233d;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lab-idea-score-chip span {
  color: #91a3bb;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lab-idea-score-chip strong {
  color: #fff;
  font-size: 16px;
}

.lab-idea-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lab-idea-section {
  display: grid;
  gap: 10px;
}

.lab-idea-run-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.proto-plan-note {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.lab-idea-evidence-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.lab-idea-penalties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

@media (max-width: 1400px) {
  .lab-ideas-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .lab-idea-score-grid,
  .lab-idea-detail-grid,
  .lab-idea-penalties,
  .lab-idea-run-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .lab-ideas-kpi-grid,
  .lab-idea-score-grid,
  .lab-idea-detail-grid,
  .lab-idea-penalties,
  .lab-idea-run-grid {
    grid-template-columns: 1fr;
  }

  .lab-ideas-toolbar {
    margin-left: 0;
  }

  .lab-idea-detail-head {
    grid-template-columns: 1fr;
  }

  .lab-idea-detail-score {
    justify-self: start;
  }
}


.badge-review {
  color: #fde68a;
  border-color: color-mix(in srgb, #f59e0b 60%, #334155);
  background: color-mix(in srgb, #7c4a03 72%, #111827);
}

.lab-ideas-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lab-ideas-primary-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lab-idea-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.lab-idea-intake-modal .prototype-form-body {
  gap: 12px;
}

@media (max-width: 900px) {
  .lab-ideas-hero-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .lab-ideas-primary-actions {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .ops-task-modal-body-rich {
    grid-template-columns: 1fr;
  }

  .ops-task-history-list-grid {
    grid-template-columns: 1fr;
  }

  .ops-task-history-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .ops-task-kv-grid {
    grid-template-columns: 1fr;
  }
}


.ops-standups-finalization-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
