/* MeshLine OS v2 — a unified operational interface for staging. */

body.meshline-os-v2 {
  --os-canvas: #f2f1ec;
  --os-canvas-strong: #e9e8e2;
  --os-panel: #fbfbf8;
  --os-panel-strong: #ffffff;
  --os-panel-muted: #f6f6f1;
  --os-rail: #0b1220;
  --os-rail-soft: #111b2d;
  --os-ink: #16202a;
  --os-muted: #65707a;
  --os-faint: #8d969e;
  --os-line: #d9d9d2;
  --os-line-strong: #c7c9c2;
  --os-cyan: #28bdd5;
  --os-cyan-soft: #dcf6fa;
  --os-blue: #4d70e8;
  --os-violet: #825ee4;
  --os-amber: #eea94c;
  --os-amber-soft: #fff0d6;
  --os-green: #25865e;
  --os-green-soft: #e1f3e9;
  --os-red: #bf554f;
  --os-red-soft: #fae7e4;
  --os-shadow-sm: 0 1px 2px rgba(18, 27, 34, 0.05);
  --os-shadow-md: 0 12px 34px rgba(25, 34, 40, 0.09);
  --os-shadow-lg: 0 28px 80px rgba(15, 24, 35, 0.16);
  --os-radius-xs: 5px;
  --os-radius-sm: 8px;
  --os-radius-md: 12px;
  --os-radius-lg: 18px;
  margin: 0;
  background: var(--os-canvas);
  color: var(--os-ink);
  font-family: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

/* Platform depth pass: scalable portfolios, comparison reporting, and focused review. */
body.meshline-os-v2 .workflow-portfolio-bulk {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-top: 10px;
  border: 1px solid #d7e0dc;
  border-radius: 12px;
  background: #f7faf8;
}

body.meshline-os-v2 .workflow-portfolio-bulk.hidden {
  display: none;
}

body.meshline-os-v2 .workflow-portfolio-bulk label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: #42524d;
  font-size: 0.82rem;
}

body.meshline-os-v2 .workflow-card-selection {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: none;
  padding: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

body.meshline-os-v2.workflow-portfolio-table-view .agent-studio-module-catalog {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

body.meshline-os-v2.workflow-portfolio-table-view .agent-studio-module-card:not(.agent-studio-module-card--create) {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(240px, 1.4fr) minmax(220px, 1fr) minmax(260px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 0 !important;
  padding: 14px 48px 14px 16px !important;
}

body.meshline-os-v2.workflow-portfolio-table-view .workflow-card-selection,
body.meshline-os-v2 .agent-studio-module-card:focus-within .workflow-card-selection {
  display: inline-flex;
}

body.meshline-os-v2.workflow-portfolio-table-view .agent-studio-module-card--create {
  min-height: 86px !important;
}

body.meshline-os-v2 .report-range-context {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

body.meshline-os-v2 .report-compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #51625c;
  font-size: 0.82rem;
}

body.meshline-os-v2 .report-comparison-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: -2px 0 16px;
}

body.meshline-os-v2 .report-comparison-card {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid #d9e1dd;
  border-radius: 12px;
  background: #fff;
}

body.meshline-os-v2 .report-comparison-card > span,
body.meshline-os-v2 .report-comparison-card > small { color: #687872; }
body.meshline-os-v2 .report-comparison-card.positive > strong { color: #14704e; }
body.meshline-os-v2 .report-comparison-card.warning > strong { color: #a75522; }
body.meshline-os-v2 .report-comparison-card.neutral > strong { color: #56645f; }

body.meshline-os-v2 .marketing-preview-queue-list {
  display: grid;
  gap: 7px;
  max-height: 210px;
  overflow: auto;
  margin-top: 10px;
}

body.meshline-os-v2 .marketing-preview-queue-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid #dce3df;
  border-radius: 10px;
  text-align: left;
  color: #35433e;
  background: #fff;
}

body.meshline-os-v2 .marketing-preview-queue-item.active {
  border-color: #4f8a70;
  background: #edf6f1;
  box-shadow: inset 3px 0 #2f7659;
}

body.meshline-os-v2 .marketing-preview-queue-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

body.meshline-os-v2 .marketing-preview-queue-item small { color: #708079; }

body.meshline-os-v2 .create-marketing-advanced-field:not(.active) {
  display: none !important;
}

@media (max-width: 900px) {
  body.meshline-os-v2 .report-comparison-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.meshline-os-v2 .report-range-context { align-items: flex-start; flex-direction: column; gap: 7px; }
}

@media (max-width: 1180px) {
  body.meshline-os-v2 .workflow-card-selection { display: none !important; }
  body.meshline-os-v2 .workflow-portfolio-bulk { display: none !important; }
}

/* Mobile audit refinements — 2026-08-11 */
body.meshline-os-v2 .marketing-project-readiness-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

body.meshline-os-v2 .marketing-project-readiness-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--os-cyan), #6f7df0, var(--os-violet));
}

body.meshline-os-v2 .agent-studio-hub-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 22px;
  border: 1px dashed var(--os-line-strong);
  border-radius: 16px;
  color: var(--os-ink);
  background: var(--os-panel-muted);
}

body.meshline-os-v2 .agent-studio-hub-empty p {
  margin: 0;
  color: var(--os-muted);
}

@media (max-width: 760px) {
  body.meshline-os-v2[data-active-screen="loginScreen"] .mobile-app-nav {
    display: none !important;
  }

  body.meshline-os-v2 .workspace-main,
  body.meshline-os-v2 .workspace-panel,
  body.meshline-os-v2 .workspace-aux-panel {
    min-width: 0;
  }

  body.meshline-os-v2 button,
  body.meshline-os-v2 a,
  body.meshline-os-v2 input,
  body.meshline-os-v2 select {
    min-height: 44px;
  }

  body.meshline-os-v2 .workspace-route-chip {
    max-width: calc(100% - 72px);
    min-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.meshline-os-v2 .app-language-switch {
    top: 12px;
    right: 14px;
    bottom: auto;
    z-index: 170;
  }

  body.meshline-os-v2[data-active-screen="loginScreen"] .app-language-switch {
    top: auto;
    right: 16px;
    bottom: 16px;
  }

  body.meshline-os-v2 #loginScreen .auth-text-button {
    min-height: 44px;
    padding: 8px;
    border: 0;
    color: #355dcc;
    background: transparent;
  }

  body.meshline-os-v2 #loginScreen .auth-divider {
    background: transparent;
  }

  body.meshline-os-v2 #loginScreen .auth-divider span {
    padding-inline: 10px;
    color: var(--os-muted);
    background: rgba(255, 255, 252, 0.98);
  }

  body.meshline-os-v2 .mobile-app-nav {
    display: flex !important;
    gap: 2px;
    min-height: 66px;
    padding: 5px 7px calc(5px + env(safe-area-inset-bottom));
  }

  body.meshline-os-v2 .mobile-app-nav__item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 54px;
    padding-inline: 2px;
  }

  body.meshline-os-v2 .mobile-app-nav__label {
    overflow: hidden;
    font-size: 0.62rem;
    text-overflow: ellipsis;
  }

  body.meshline-os-v2:has(.json-modal:not(.hidden)) .mobile-app-nav,
  body.meshline-os-v2:has(.json-modal:not(.hidden)) .app-language-switch,
  body.meshline-os-v2:has(.json-modal:not(.hidden)) .meshline-ux-launcher,
  body.meshline-os-v2.mobile-create-module-open .mobile-app-nav,
  body.meshline-os-v2.mobile-create-module-open .app-language-switch,
  body.meshline-os-v2.mobile-create-module-open .meshline-ux-launcher {
    display: none !important;
  }

  body.meshline-os-v2 .json-modal:not(.hidden) {
    padding: 0 !important;
    align-items: stretch;
  }

  body.meshline-os-v2 .json-modal:not(.hidden) > .json-modal-card {
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 16px calc(18px + env(safe-area-inset-bottom)) !important;
    overflow: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  body.meshline-os-v2 .json-modal:not(.hidden) > .json-modal-card > .panel-head {
    position: sticky;
    top: 0;
    z-index: 4;
    min-height: 70px;
    margin: 0 -16px 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--os-line);
    background: rgba(251, 251, 248, 0.97);
    backdrop-filter: blur(18px);
  }

  body.meshline-os-v2 .json-modal:not(.hidden) .modal-close-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  body.meshline-os-v2 .create-module-form {
    gap: 10px;
  }

  body.meshline-os-v2 .create-module-form > .input-card,
  body.meshline-os-v2 .create-module-form .builder-onboarding-callout,
  body.meshline-os-v2 .create-module-form .agent-plan-summary {
    padding: 12px;
  }

  body.meshline-os-v2 .create-marketing-stepper {
    position: sticky;
    top: 70px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 8px 0;
    background: var(--os-panel);
  }

  body.meshline-os-v2 .create-marketing-step {
    min-width: 0;
    min-height: 48px;
    padding: 6px 3px;
    border: 1px solid var(--os-line);
    color: #4b5660 !important;
    background: #f5f6f2 !important;
  }

  body.meshline-os-v2 .create-marketing-step strong,
  body.meshline-os-v2 .create-marketing-step span {
    color: inherit !important;
  }

  body.meshline-os-v2 .create-marketing-step.active {
    border-color: #7890ea !important;
    color: #173375 !important;
    background: #e8edff !important;
    box-shadow: 0 0 0 2px rgba(77, 112, 232, 0.12);
  }

  body.meshline-os-v2 .create-module-form > .register-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px -16px -18px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--os-line);
    background: rgba(251, 251, 248, 0.97);
    backdrop-filter: blur(18px);
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-launchpad-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-launch-card {
    min-height: 0;
    padding: 12px 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-launch-card p,
  body.meshline-os-v2 #dashboardScreen .mesh-os-launch-graphic {
    display: none !important;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-launch-action {
    white-space: nowrap;
  }

  body.meshline-os-v2 #dashboardScreen #firstPostOnboardingPanel .onboarding-flow-layout {
    display: none;
  }

  body.meshline-os-v2 #dashboardScreen #firstPostOnboardingPanel {
    padding-block: 14px;
  }

  body.meshline-os-v2 #dashboardScreen #firstPostOnboardingPanel .workspace-panel-head {
    gap: 12px;
  }

  body.meshline-os-v2 #dashboardScreen #firstPostOnboardingPanel .helper-text,
  body.meshline-os-v2 #dashboardScreen #firstPostOnboardingPanel #onboardingFlowBadge {
    display: none !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-mini-stat {
    min-height: 52px !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-mini-stat.active {
    border-color: #45c8d9 !important;
    box-shadow: 0 0 0 3px rgba(69, 200, 217, 0.2) !important;
  }

  body.meshline-os-v2 #agentScreen .marketing-project-card-actions .primary-button,
  body.meshline-os-v2 #agentScreen .marketing-project-card-actions .secondary-button {
    min-height: 44px;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions button,
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-empty-actions button {
    min-height: 46px !important;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card:first-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card:first-child > .panel-head,
  body.meshline-os-v2 #automationScreen .sidebar-card:first-child > .summary-list {
    grid-column: 1 / -1;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card .nav-button {
    width: 100%;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-card h3,
  body.meshline-os-v2 #automationScreen .automation-setup-card h4,
  body.meshline-os-v2 #automationScreen .view-panel > h3 {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-glance-item {
    min-width: 0;
    overflow: hidden;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-glance-item strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: clamp(1rem, 5vw, 1.3rem);
  }

  body.meshline-os-v2 #reportsScreen .workspace-route-chip {
    font-size: 0;
  }

  body.meshline-os-v2 #reportsScreen .workspace-route-chip::after {
    content: "Outcomes / Workflow evidence";
    font-size: 0.72rem;
  }

  body.meshline-os-v2 #reportsScreen #reportsFilterForm .info-card {
    grid-column: 1 / -1;
    min-height: 0;
    padding: 0;
    background: transparent;
  }

  body.meshline-os-v2 #reportsScreen #reportsFilterForm .primary-button {
    width: 100%;
    min-height: 46px;
  }

  body.meshline-os-v2 #reportsScreen .signals-glance-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  body.meshline-os-v2 #reportsScreen .signals-glance-strip > :last-child {
    grid-column: 1 / -1;
  }

  body.meshline-os-v2 #reportsScreen .glance-card {
    min-height: 0;
    padding: 13px;
  }

  body.meshline-os-v2 #reportsScreen #reportLogsList {
    max-height: 560px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  body.meshline-os-v2 #reportsScreen .signals-action-item .secondary-button {
    margin-top: 8px;
  }
}

/* Final desktop cascade: keep legacy module themes from overriding the operator console. */
@media (min-width: 1181px) {
  body.meshline-os-v2 .workspace-header {
    grid-template-columns: minmax(120px, 0.48fr) minmax(360px, 1fr) auto !important;
  }

  body.meshline-os-v2 .workspace-utility-strip {
    border-color: #cfd4d0 !important;
    background: #fff !important;
    box-shadow: 0 3px 12px rgba(21, 32, 39, 0.055) !important;
  }

  body.meshline-os-v2 .workspace-utility-pill,
  body.meshline-os-v2 #automationScreen .workspace-utility-pill {
    border: 0 !important;
    color: #526069 !important;
    background: #f3f5f1 !important;
    box-shadow: none !important;
  }

  body.meshline-os-v2 .workspace-utility-pill span {
    display: block !important;
    color: #617078 !important;
    font-size: 0.56rem !important;
    font-weight: 730;
  }

  body.meshline-os-v2 .workspace-utility-pill strong {
    color: #172631 !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card,
  body.meshline-os-v2 #agentScreen .marketing-project-card {
    min-height: 220px !important;
    border: 1px solid #d6dad5 !important;
    color: #1d2b35 !important;
    background: #fff !important;
    box-shadow: 0 9px 28px rgba(20, 31, 38, 0.07) !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card:hover,
  body.meshline-os-v2 #agentScreen .marketing-project-card:hover {
    border-color: #a8beb4 !important;
    box-shadow: 0 14px 34px rgba(20, 31, 38, 0.11) !important;
    transform: translateY(-2px);
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card h3,
  body.meshline-os-v2 #agentScreen .agent-studio-module-card h4,
  body.meshline-os-v2 #agentScreen .agent-studio-module-card strong,
  body.meshline-os-v2 #agentScreen .agent-studio-module-card p,
  body.meshline-os-v2 #agentScreen .agent-studio-module-card span,
  body.meshline-os-v2 #agentScreen .marketing-project-card h3,
  body.meshline-os-v2 #agentScreen .marketing-project-card h4,
  body.meshline-os-v2 #agentScreen .marketing-project-card strong,
  body.meshline-os-v2 #agentScreen .marketing-project-card p,
  body.meshline-os-v2 #agentScreen .marketing-project-card span {
    color: inherit !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-stat,
  body.meshline-os-v2 #agentScreen .agent-studio-module-summary-row,
  body.meshline-os-v2 #agentScreen .agent-studio-module-status {
    border-color: #e0e3de !important;
    color: #53616a !important;
    background: #f5f6f2 !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card--create {
    border-style: dashed !important;
    color: #315f50 !important;
    background: #eef6f1 !important;
  }

  body.meshline-os-v2 #automationScreen .workspace-aux-panel,
  body.meshline-os-v2 #automationScreen .workspace-embedded-grid,
  body.meshline-os-v2 #automationScreen .view-panel,
  body.meshline-os-v2 #automationScreen .content,
  body.meshline-os-v2 #reportsScreen .workspace-aux-panel,
  body.meshline-os-v2 #reportsScreen .view-panel.active {
    color: #1c2a34 !important;
    background: #f6f7f3 !important;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card,
  body.meshline-os-v2 #automationScreen .automation-setup-shell,
  body.meshline-os-v2 #automationScreen .automation-setup-card,
  body.meshline-os-v2 #automationScreen .stack-item,
  body.meshline-os-v2 #reportsScreen .signals-hero-shell,
  body.meshline-os-v2 #reportsScreen .signals-insight-card,
  body.meshline-os-v2 #reportsScreen .signals-detail-card,
  body.meshline-os-v2 #reportsScreen #reportsFilterForm .input-card,
  body.meshline-os-v2 #reportsScreen #reportsFilterForm .info-card {
    border-color: #d9ddd8 !important;
    color: #1c2a34 !important;
    background: #fff !important;
    box-shadow: 0 5px 18px rgba(20, 31, 38, 0.06) !important;
  }

  body.meshline-os-v2 #automationScreen h3,
  body.meshline-os-v2 #automationScreen h4,
  body.meshline-os-v2 #automationScreen strong,
  body.meshline-os-v2 #automationScreen p,
  body.meshline-os-v2 #automationScreen span,
  body.meshline-os-v2 #automationScreen .stack-item div,
  body.meshline-os-v2 #reportsScreen h3,
  body.meshline-os-v2 #reportsScreen h4,
  body.meshline-os-v2 #reportsScreen strong,
  body.meshline-os-v2 #reportsScreen p,
  body.meshline-os-v2 #reportsScreen span {
    color: inherit;
  }
}

@media (min-width: 1181px) and (max-width: 1399px) {
  body.meshline-os-v2 .desktop-operator-tools button strong {
    display: none;
  }

  body.meshline-os-v2 .desktop-operator-tools button {
    min-width: 30px;
    justify-content: center;
  }

  body.meshline-os-v2 .desktop-operator-tools [data-desktop-command-open] kbd {
    display: none;
  }
}

@media (min-width: 1400px) {
  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1760px) {
  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Final desktop visual-refinement cascade. */
@media (min-width: 1181px) {
  body.meshline-os-v2 .workspace-header {
    grid-template-columns: minmax(128px, 0.48fr) minmax(350px, 1fr) max-content !important;
    gap: 12px !important;
  }

  body.meshline-os-v2 .workspace-header-actions {
    min-width: 0;
    gap: 7px;
  }

  body.meshline-os-v2 .workspace-route-chip {
    width: 100%;
  }

  body.meshline-os-v2 .workspace-user-pill {
    width: 146px;
    max-width: 146px;
  }

  body.meshline-os-v2 .workspace-user-copy,
  body.meshline-os-v2 .workspace-user-copy strong {
    min-width: 0;
    overflow: hidden;
  }

  body.meshline-os-v2 .workspace-user-copy strong {
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .workspace-user-copy {
    display: none !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-overview-shell .panel-head.compact {
    align-items: flex-start;
    gap: 16px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-overview-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card {
    grid-template-rows: auto auto 1fr;
    min-height: 244px !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-foot {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: end;
    align-items: stretch;
    gap: 10px !important;
    width: 100%;
    min-width: 0;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-status,
  body.meshline-os-v2 #agentScreen .agent-studio-module-summary-row,
  body.meshline-os-v2 #agentScreen .marketing-project-card-actions {
    width: 100%;
    min-width: 0;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-status {
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    border: 1px solid #e0e3de;
    border-radius: 8px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-summary-row {
    padding: 0 2px;
    border: 0 !important;
    background: transparent !important;
  }

  body.meshline-os-v2 #agentScreen .marketing-project-card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
  }

  body.meshline-os-v2 #agentScreen .marketing-project-card-actions .primary-button,
  body.meshline-os-v2 #agentScreen .marketing-project-card-actions .secondary-button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workspace-shell[data-layout="marketing-minimal"] {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-operations-shell {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-queue-empty {
    grid-template-columns: 106px minmax(220px, 1fr) max-content;
  }
}

@media (min-width: 1181px) and (max-width: 1599px) {
  body.meshline-os-v2 .desktop-operator-tools button {
    width: 32px;
    min-width: 32px;
    justify-content: center;
    padding-inline: 5px;
  }

  body.meshline-os-v2 .desktop-operator-tools button strong,
  body.meshline-os-v2 .desktop-operator-tools button kbd {
    display: none !important;
  }
}

@media (min-width: 1600px) {
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-operations-shell {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Desktop visual refinement — keep as the final wide-screen authority.
   Prevent dense command bars and project controls from competing for space. */
@media (min-width: 1181px) {
  body.meshline-os-v2 .workspace-header {
    grid-template-columns: minmax(128px, 0.48fr) minmax(350px, 1fr) max-content !important;
    gap: 12px !important;
  }

  body.meshline-os-v2 .workspace-header-actions {
    min-width: 0;
    gap: 7px;
  }

  body.meshline-os-v2 .workspace-route-chip {
    width: 100%;
  }

  body.meshline-os-v2 .workspace-user-pill {
    width: 146px;
    max-width: 146px;
  }

  body.meshline-os-v2 .workspace-user-copy,
  body.meshline-os-v2 .workspace-user-copy strong {
    min-width: 0;
    overflow: hidden;
  }

  body.meshline-os-v2 .workspace-user-copy strong {
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .workspace-user-copy {
    display: none !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-overview-shell .panel-head.compact {
    align-items: flex-start;
    gap: 16px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-overview-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card {
    grid-template-rows: auto auto 1fr;
    min-height: 244px !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-foot {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: end;
    align-items: stretch;
    gap: 10px !important;
    width: 100%;
    min-width: 0;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-status,
  body.meshline-os-v2 #agentScreen .agent-studio-module-summary-row,
  body.meshline-os-v2 #agentScreen .marketing-project-card-actions {
    width: 100%;
    min-width: 0;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-status {
    padding: 10px 11px;
    border: 1px solid #e0e3de;
    border-radius: 8px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-summary-row {
    padding: 0 2px;
    background: transparent !important;
  }

  body.meshline-os-v2 #agentScreen .marketing-project-card-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.meshline-os-v2 #agentScreen .marketing-project-card-actions .primary-button,
  body.meshline-os-v2 #agentScreen .marketing-project-card-actions .secondary-button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workspace-shell[data-layout="marketing-minimal"] {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-operations-shell {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-queue-empty {
    grid-template-columns: 106px minmax(220px, 1fr) max-content;
  }
}

@media (min-width: 1181px) and (max-width: 1599px) {
  body.meshline-os-v2 .desktop-operator-tools button {
    width: 32px;
    min-width: 32px;
    justify-content: center;
    padding-inline: 5px;
  }

  body.meshline-os-v2 .desktop-operator-tools button strong,
  body.meshline-os-v2 .desktop-operator-tools button kbd {
    display: none !important;
  }
}

@media (min-width: 1600px) {
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-operations-shell {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1181px) {
  body.meshline-os-v2 .create-module-modal-card {
    position: relative;
  }

  body.meshline-os-v2 .create-marketing-step,
  body.meshline-os-v2 .create-marketing-step strong,
  body.meshline-os-v2 .create-marketing-step span {
    color: #66736f !important;
  }

  body.meshline-os-v2 .create-marketing-step.active,
  body.meshline-os-v2 .create-marketing-step.active strong,
  body.meshline-os-v2 .create-marketing-step.active span {
    color: #174f3d !important;
  }

  body.meshline-os-v2 .create-marketing-step-intro p {
    color: #66736f !important;
  }
}

@media (min-width: 1181px) and (max-width: 1399px) {
  body.meshline-os-v2 .workspace-utility-pill {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
  }

  body.meshline-os-v2 .workspace-utility-pill span {
    max-width: 100%;
  }

  body.meshline-os-v2 .desktop-operator-tools [data-desktop-command-open] strong {
    display: block;
  }
}

body.meshline-os-v2 *,
body.meshline-os-v2 *::before,
body.meshline-os-v2 *::after {
  box-sizing: border-box;
}

body.meshline-os-v2 h1,
body.meshline-os-v2 h2,
body.meshline-os-v2 h3,
body.meshline-os-v2 h4,
body.meshline-os-v2 h5,
body.meshline-os-v2 h6 {
  font-family: "Space Grotesk", "Instrument Sans", sans-serif;
  letter-spacing: -0.035em;
}

body.meshline-os-v2 button,
body.meshline-os-v2 input,
body.meshline-os-v2 textarea,
body.meshline-os-v2 select {
  font: inherit;
}

body.meshline-os-v2 button,
body.meshline-os-v2 a,
body.meshline-os-v2 input,
body.meshline-os-v2 textarea,
body.meshline-os-v2 select {
  -webkit-tap-highlight-color: transparent;
}

body.meshline-os-v2 :focus-visible {
  outline: 3px solid color-mix(in srgb, var(--os-cyan) 58%, transparent);
  outline-offset: 2px;
}

/* Boot experience */
body.meshline-os-v2 .app-boot-splash {
  background:
    radial-gradient(circle at 18% 18%, rgba(40, 189, 213, 0.15), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(130, 94, 228, 0.13), transparent 30%),
    var(--os-rail);
}

body.meshline-os-v2 .app-boot-splash__card {
  width: min(380px, calc(100vw - 32px));
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--os-radius-lg);
  background: rgba(17, 27, 45, 0.86);
  box-shadow: var(--os-shadow-lg);
  backdrop-filter: blur(24px);
}

body.meshline-os-v2 .app-boot-splash__mark {
  border-radius: var(--os-radius-md);
}

body.meshline-os-v2 .app-boot-splash__title {
  color: #f6f8fb;
  font-size: 1.45rem;
}

body.meshline-os-v2 .app-boot-splash__text,
body.meshline-os-v2 .app-boot-splash__eyebrow {
  color: rgba(224, 233, 244, 0.68);
}

/* Authentication — calm canvas + product control board */
body.meshline-os-v2 #loginScreen {
  min-height: 100dvh;
  overflow-x: clip;
  background:
    linear-gradient(rgba(31, 45, 62, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 45, 62, 0.035) 1px, transparent 1px),
    var(--os-canvas);
  background-size: 34px 34px;
}

body.meshline-os-v2 .login-layout.auth-layout-dark {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(430px, 0.85fr);
  width: min(1440px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 48px);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
  background: transparent;
}

body.meshline-os-v2 .auth-hero-card.auth-hero-classic {
  position: relative;
  display: grid;
  align-content: center;
  gap: 16px;
  min-width: 0;
  min-height: 680px;
  padding: clamp(20px, 3vw, 44px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: var(--os-ink);
  background: transparent;
  box-shadow: none;
}

body.meshline-os-v2 .auth-hero-card::before {
  position: absolute;
  top: 36px;
  left: 42px;
  width: 52px;
  height: 4px;
  border-radius: 99px;
  content: "";
  background: linear-gradient(90deg, var(--os-cyan), var(--os-blue), var(--os-violet));
}

body.meshline-os-v2 .auth-classic-kicker,
body.meshline-os-v2 .eyebrow {
  margin: 0;
  color: var(--os-green);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

body.meshline-os-v2 .auth-hero-card h1 {
  max-width: 760px;
  margin: 0;
  color: var(--os-ink);
  font-size: clamp(2.7rem, 5.2vw, 5.5rem);
  font-weight: 670;
  letter-spacing: -0.07em;
  line-height: 0.96;
  text-wrap: balance;
}

body.meshline-os-v2 .auth-classic-subtitle {
  max-width: 650px;
  margin: 0;
  color: var(--os-muted);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.6;
}

body.meshline-os-v2 .auth-classic-board {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(84, 112, 150, 0.42);
  border-radius: var(--os-radius-lg);
  color: #edf4fb;
  background:
    linear-gradient(rgba(126, 154, 190, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 154, 190, 0.065) 1px, transparent 1px),
    var(--os-rail);
  background-size: 26px 26px;
  box-shadow: var(--os-shadow-lg);
}

body.meshline-os-v2 .auth-classic-board::after {
  position: absolute;
  inset: -40% auto auto 54%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(77, 112, 232, 0.24), transparent 68%);
  pointer-events: none;
}

body.meshline-os-v2 .auth-classic-board-top,
body.meshline-os-v2 .auth-classic-board-footer,
body.meshline-os-v2 .auth-classic-brand,
body.meshline-os-v2 .auth-classic-footer-brand {
  position: relative;
  z-index: 1;
}

body.meshline-os-v2 .auth-classic-brand-mark,
body.meshline-os-v2 .auth-classic-footer-mark {
  border-radius: var(--os-radius-sm);
  background: rgba(255, 255, 255, 0.08);
}

body.meshline-os-v2 .auth-classic-brand-copy span,
body.meshline-os-v2 .auth-classic-lane p,
body.meshline-os-v2 .auth-classic-footer-chips,
body.meshline-os-v2 .auth-classic-footer-brand span {
  color: rgba(216, 227, 241, 0.62);
}

body.meshline-os-v2 .auth-classic-status-pill {
  border: 1px solid rgba(238, 169, 76, 0.36);
  border-radius: 999px;
  color: #ffdca7;
  background: rgba(238, 169, 76, 0.1);
}

body.meshline-os-v2 .auth-classic-lane-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.meshline-os-v2 .auth-classic-lane {
  min-width: 0;
  min-height: 150px;
  padding: 15px;
  border: 1px solid rgba(155, 180, 214, 0.16);
  border-radius: var(--os-radius-md);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

body.meshline-os-v2 .auth-classic-lane:nth-child(2) {
  background: linear-gradient(145deg, rgba(77, 112, 232, 0.18), rgba(130, 94, 228, 0.1));
}

body.meshline-os-v2 .auth-classic-lane:nth-child(3) {
  background: linear-gradient(145deg, rgba(40, 189, 213, 0.13), rgba(255, 255, 255, 0.035));
}

body.meshline-os-v2 .auth-classic-lane-label {
  color: #7ce5f4;
}

body.meshline-os-v2 .auth-classic-lane strong {
  color: #f5f8fb;
  font-size: 0.93rem;
  line-height: 1.25;
}

body.meshline-os-v2 .auth-stack {
  display: grid;
  justify-items: stretch;
  width: min(500px, 100%);
  min-width: 0;
  margin-inline: auto;
}

body.meshline-os-v2 .login-card.auth-card-shell,
body.meshline-os-v2 .register-card,
body.meshline-os-v2 #passwordResetRequestForm,
body.meshline-os-v2 #passwordResetConfirmForm {
  width: 100%;
  min-width: 0;
  padding: clamp(26px, 3.2vw, 44px);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  color: var(--os-ink);
  background: rgba(255, 255, 252, 0.94);
  box-shadow: var(--os-shadow-lg);
  backdrop-filter: blur(18px);
}

body.meshline-os-v2 .auth-entry-heading,
body.meshline-os-v2 .register-card h2,
body.meshline-os-v2 #passwordResetRequestForm h2,
body.meshline-os-v2 #passwordResetConfirmForm h2 {
  margin: 0;
  color: var(--os-ink);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 680;
  letter-spacing: -0.055em;
}

body.meshline-os-v2 .auth-entry-card .helper-text,
body.meshline-os-v2 .register-card .helper-text,
body.meshline-os-v2 #passwordResetRequestForm .helper-text,
body.meshline-os-v2 #passwordResetConfirmForm .helper-text {
  color: var(--os-muted);
}

body.meshline-os-v2 .auth-entry-card .field span,
body.meshline-os-v2 .register-card .field span,
body.meshline-os-v2 #passwordResetRequestForm .field span,
body.meshline-os-v2 #passwordResetConfirmForm .field span {
  color: #35414b;
  font-size: 0.76rem;
  font-weight: 760;
}

body.meshline-os-v2 .auth-entry-card input,
body.meshline-os-v2 .register-card input,
body.meshline-os-v2 #passwordResetRequestForm input,
body.meshline-os-v2 #passwordResetConfirmForm input {
  min-height: 48px;
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-sm);
  color: var(--os-ink);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(25, 35, 42, 0.035);
}

body.meshline-os-v2 .auth-entry-card input:focus,
body.meshline-os-v2 .register-card input:focus,
body.meshline-os-v2 #passwordResetRequestForm input:focus,
body.meshline-os-v2 #passwordResetConfirmForm input:focus {
  border-color: var(--os-cyan);
  box-shadow: 0 0 0 4px rgba(40, 189, 213, 0.13);
}

body.meshline-os-v2 .auth-text-button {
  color: var(--os-blue);
}

body.meshline-os-v2 .auth-divider {
  color: var(--os-muted);
}

body.meshline-os-v2 .app-language-switch {
  right: 22px;
  bottom: 22px;
  padding: 4px;
  border: 1px solid var(--os-line);
  border-radius: 999px;
  background: rgba(255, 255, 252, 0.92);
  box-shadow: var(--os-shadow-md);
}

/* Button system */
body.meshline-os-v2 .primary-button,
body.meshline-os-v2 .secondary-button,
body.meshline-os-v2 .danger-button,
body.meshline-os-v2 .ghost-button,
body.meshline-os-v2 .button-link,
body.meshline-os-v2 .nav-button {
  min-height: 38px;
  padding: 0.56rem 0.82rem;
  border-radius: var(--os-radius-sm);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: -0.01em;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

body.meshline-os-v2 .primary-button {
  border: 1px solid #243b84;
  color: #fff;
  background: linear-gradient(180deg, #5779eb, #415fc7);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22), 0 2px 5px rgba(55, 79, 163, 0.2);
}

body.meshline-os-v2 .primary-button:hover {
  background: linear-gradient(180deg, #6485ef, #3857bf);
  box-shadow: 0 7px 18px rgba(61, 84, 168, 0.2);
  transform: translateY(-1px);
}

body.meshline-os-v2 .secondary-button,
body.meshline-os-v2 .ghost-button,
body.meshline-os-v2 .nav-button {
  border: 1px solid var(--os-line-strong);
  color: #34414a;
  background: #fff;
  box-shadow: var(--os-shadow-sm);
}

body.meshline-os-v2 .secondary-button:hover,
body.meshline-os-v2 .ghost-button:hover,
body.meshline-os-v2 .nav-button:hover {
  border-color: #afb4ad;
  background: var(--os-panel-muted);
}

body.meshline-os-v2 .danger-button {
  border: 1px solid #b6534b;
  color: #fff;
  background: #c45b54;
}

/* Global application chrome */
body.meshline-os-v2 .screen:not(#loginScreen) {
  min-height: 100dvh;
  background: var(--os-canvas);
}

body.meshline-os-v2 .workspace-shell,
body.meshline-os-v2 .workspace-shell.workspace-shell-inner {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-height: 100dvh;
  overflow: clip;
  border: 0;
  border-radius: 0;
  background: var(--os-canvas);
  box-shadow: none;
}

body.meshline-os-v2 .workspace-sidebar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1;
  width: 244px;
  height: 100dvh;
  min-height: 0;
  padding: 10px 9px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(130, 155, 188, 0.18);
  border-radius: 0;
  color: #dce5f0;
  background:
    radial-gradient(circle at 30% 0%, rgba(40, 189, 213, 0.08), transparent 28%),
    linear-gradient(180deg, var(--os-rail-soft), var(--os-rail));
  box-shadow: none;
}

body.meshline-os-v2 .workspace-brand-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 52px;
  margin: 0 0 8px;
  padding: 7px;
  border: 1px solid rgba(154, 180, 216, 0.13);
  border-radius: var(--os-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

body.meshline-os-v2 .workspace-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(126, 226, 242, 0.18);
  border-radius: var(--os-radius-sm);
  background: rgba(40, 189, 213, 0.08);
}

body.meshline-os-v2 .workspace-brand-mark img {
  width: 27px;
  height: 27px;
}

body.meshline-os-v2 .workspace-brand-copy,
body.meshline-os-v2 .workspace-brand-line {
  min-width: 0;
}

body.meshline-os-v2 .workspace-brand-copy h2 {
  margin: 0;
  color: #f4f7fb;
  font-size: 0.95rem;
  font-weight: 720;
}

body.meshline-os-v2 .workspace-brand-copy small {
  padding: 2px 4px;
  border: 1px solid rgba(238, 169, 76, 0.26);
  border-radius: 3px;
  color: #ffd698;
  background: rgba(238, 169, 76, 0.08);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.meshline-os-v2 .workspace-brand-tagline {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: rgba(207, 219, 235, 0.5);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.meshline-os-v2 .workspace-nav {
  display: grid;
  gap: 2px;
  padding: 4px 0 10px;
  border-bottom: 1px solid rgba(143, 166, 198, 0.13);
}

body.meshline-os-v2 .workspace-nav-button {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: rgba(218, 227, 239, 0.68);
  text-align: left;
  background: transparent;
  box-shadow: none;
}

body.meshline-os-v2 .workspace-nav-button:hover {
  border-color: rgba(154, 180, 216, 0.1);
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

body.meshline-os-v2 .workspace-nav-button.active {
  border-color: rgba(128, 215, 230, 0.16);
  color: #fff;
  background: linear-gradient(90deg, rgba(40, 189, 213, 0.15), rgba(77, 112, 232, 0.08));
  box-shadow: inset 3px 0 var(--os-cyan);
}

body.meshline-os-v2 .workspace-nav-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: rgba(212, 224, 239, 0.72);
  background: rgba(255, 255, 255, 0.045);
}

body.meshline-os-v2 .workspace-nav-button.active .workspace-nav-icon {
  color: #b9f6ff;
  background: rgba(40, 189, 213, 0.11);
}

body.meshline-os-v2 .workspace-nav-icon svg {
  width: 16px;
  height: 16px;
}

body.meshline-os-v2 .workspace-nav-copy {
  display: grid;
  min-width: 0;
}

body.meshline-os-v2 .workspace-nav-copy small {
  order: 2;
  overflow: hidden;
  color: rgba(197, 211, 229, 0.42);
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.meshline-os-v2 .workspace-nav-copy strong {
  order: 1;
  font-size: 0.75rem;
  font-weight: 720;
}

body.meshline-os-v2 .workspace-sidebar-section {
  margin: 9px 0 0;
  padding: 10px 8px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  color: rgba(215, 225, 238, 0.66);
  background: transparent;
  box-shadow: none;
}

body.meshline-os-v2 .workspace-sidebar-section .eyebrow {
  color: rgba(173, 193, 218, 0.44);
  font-size: 0.56rem;
}

body.meshline-os-v2 .workspace-sidebar-section h3 {
  margin: 3px 0;
  color: rgba(240, 245, 251, 0.82);
  font-size: 0.75rem;
  letter-spacing: -0.02em;
}

body.meshline-os-v2 .workspace-sidebar-section .helper-text,
body.meshline-os-v2 .workspace-project-tray-summary {
  color: rgba(193, 208, 227, 0.48);
  font-size: 0.64rem;
}

body.meshline-os-v2 .workspace-pinned-list {
  display: grid;
  gap: 3px;
  margin-top: 7px;
}

body.meshline-os-v2 .workspace-pinned-list button,
body.meshline-os-v2 .workspace-pinned-card {
  border-color: transparent;
  border-radius: 6px;
  color: rgba(223, 232, 242, 0.7);
  background: rgba(255, 255, 255, 0.035);
}

body.meshline-os-v2 .workspace-project-tray {
  margin-top: auto;
  max-height: 45vh;
  border-top: 1px solid rgba(143, 166, 198, 0.13);
}

body.meshline-os-v2 .workspace-main {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  min-height: 100dvh;
  padding: 0 18px 32px;
  overflow: visible;
  color: var(--os-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(40, 189, 213, 0.045), transparent 20%),
    var(--os-canvas);
}

body.meshline-os-v2 .workspace-header {
  position: sticky;
  top: 0;
  z-index: 22;
  display: grid;
  grid-template-columns: minmax(160px, 0.72fr) minmax(330px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin: 0 -18px;
  padding: 8px 18px;
  border: 0;
  border-bottom: 1px solid var(--os-line);
  border-radius: 0;
  color: var(--os-ink);
  background: rgba(246, 246, 242, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
}

body.meshline-os-v2 .workspace-route-chip {
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid var(--os-line-strong);
  border-radius: 7px;
  color: #4e5a64;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px #fff, var(--os-shadow-sm);
  font-size: 0.68rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.meshline-os-v2 .workspace-utility-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  min-height: 38px;
  padding: 3px;
  border: 1px solid var(--os-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

body.meshline-os-v2 .workspace-utility-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 30px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  color: var(--os-muted);
  background: transparent;
  box-shadow: none;
}

body.meshline-os-v2 button.workspace-utility-pill:hover {
  color: var(--os-ink);
  background: #fff;
}

body.meshline-os-v2 .workspace-utility-pill span {
  overflow: hidden;
  font-size: 0.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.meshline-os-v2 .workspace-utility-pill strong {
  color: #26343e;
  font-size: 0.65rem;
  white-space: nowrap;
}

body.meshline-os-v2 .workspace-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

body.meshline-os-v2 .workspace-header-primary {
  min-height: 34px;
  border-color: #0e5b3b;
  background: linear-gradient(180deg, #2b8d65, #1b6d4b);
}

body.meshline-os-v2 .workspace-release-badge,
body.meshline-os-v2 .release-pill {
  border-color: #e0b65f;
  color: #765117;
  background: #fff2ce;
}

body.meshline-os-v2 .workspace-health-pill {
  border-color: #a6cfb6;
  color: #246445;
  background: #e9f6ee;
}

body.meshline-os-v2 .workspace-user-pill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 3px 4px 3px 8px;
  border: 1px solid var(--os-line-strong);
  border-radius: 7px;
  color: var(--os-ink);
  background: #fff;
}

body.meshline-os-v2 .workspace-user-copy small {
  color: var(--os-faint);
  font-size: 0.53rem;
}

body.meshline-os-v2 .workspace-user-copy strong {
  font-size: 0.66rem;
}

body.meshline-os-v2 .workspace-user-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #273e83;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(145deg, var(--os-blue), var(--os-violet));
}

body.meshline-os-v2 .workspace-user-dropdown {
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-sm);
  color: var(--os-ink);
  background: #fff;
  box-shadow: var(--os-shadow-lg);
}

body.meshline-os-v2 .workspace-user-dropdown-item {
  min-height: 36px;
  border-radius: 5px;
  color: #3e4952;
}

body.meshline-os-v2 .workspace-user-dropdown-item:hover {
  background: var(--os-panel-muted);
}

body.meshline-os-v2 .workspace-user-dropdown-item.danger {
  color: var(--os-red);
}

/* Shared surfaces */
body.meshline-os-v2 .workspace-panel,
body.meshline-os-v2 .module-panel,
body.meshline-os-v2 .info-card,
body.meshline-os-v2 .input-card,
body.meshline-os-v2 .sidebar-card,
body.meshline-os-v2 .signals-insight-card,
body.meshline-os-v2 .settings-card,
body.meshline-os-v2 .agent-card,
body.meshline-os-v2 .webhook-card,
body.meshline-os-v2 .connector-card,
body.meshline-os-v2 .content-card,
body.meshline-os-v2 .stack-item,
body.meshline-os-v2 .summary-card,
body.meshline-os-v2 .metric-card,
body.meshline-os-v2 .stat-card,
body.meshline-os-v2 .revenue-card {
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  color: var(--os-ink);
  background: var(--os-panel);
  box-shadow: var(--os-shadow-sm);
}

body.meshline-os-v2 .workspace-panel {
  padding: clamp(16px, 1.7vw, 24px);
}

body.meshline-os-v2 .workspace-panel:not(.mesh-os-home):hover,
body.meshline-os-v2 .module-panel:hover,
body.meshline-os-v2 .info-card:hover {
  border-color: #c9ccc5;
}

body.meshline-os-v2 .workspace-panel-head,
body.meshline-os-v2 .panel-head {
  align-items: flex-start;
  gap: 16px;
}

body.meshline-os-v2 .workspace-panel-head h3,
body.meshline-os-v2 .panel-head h3,
body.meshline-os-v2 .panel-head h4,
body.meshline-os-v2 .module-panel h3,
body.meshline-os-v2 .module-panel h4 {
  margin: 2px 0 0;
  color: var(--os-ink);
  font-weight: 680;
}

body.meshline-os-v2 .helper-text,
body.meshline-os-v2 .workspace-project-copy p,
body.meshline-os-v2 .stack-item > div,
body.meshline-os-v2 .summary-row span {
  color: var(--os-muted);
}

body.meshline-os-v2 .pill {
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid var(--os-line-strong);
  border-radius: 999px;
  color: #667169;
  background: #f7f7f3;
  font-size: 0.58rem;
  font-weight: 780;
  letter-spacing: 0.02em;
}

body.meshline-os-v2 .pill.live,
body.meshline-os-v2 .status-success {
  border-color: #a9d4ba;
  color: #256547;
  background: var(--os-green-soft);
}

body.meshline-os-v2 .pill.warning,
body.meshline-os-v2 .status-warning {
  border-color: #e3c078;
  color: #78541a;
  background: var(--os-amber-soft);
}

body.meshline-os-v2 .pill.danger,
body.meshline-os-v2 .status-error {
  border-color: #dfaaa4;
  color: #8d3f39;
  background: var(--os-red-soft);
}

/* Home control room */
body.meshline-os-v2 .mesh-os-home {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding: clamp(18px, 2.2vw, 30px);
  overflow: hidden;
  border-color: #18253a;
  color: #eef4fa;
  background:
    radial-gradient(circle at 78% 0%, rgba(77, 112, 232, 0.24), transparent 34%),
    radial-gradient(circle at 92% 52%, rgba(130, 94, 228, 0.12), transparent 28%),
    linear-gradient(145deg, #101a2b, #0a1220);
  box-shadow: 0 24px 58px rgba(19, 28, 43, 0.18);
}

body.meshline-os-v2 .mesh-os-home::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(144, 170, 208, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 170, 208, 0.045) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(90deg, transparent, #000 42%, #000);
}

body.meshline-os-v2 .mesh-os-home > * {
  position: relative;
  z-index: 1;
}

body.meshline-os-v2 .mesh-os-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(410px, 1.1fr);
  gap: clamp(26px, 4vw, 66px);
  align-items: center;
}

body.meshline-os-v2 .mesh-os-hero-copy {
  display: grid;
  gap: 12px;
}

body.meshline-os-v2 .mesh-os-kicker-row,
body.meshline-os-v2 .mesh-os-primary-actions,
body.meshline-os-v2 .mesh-os-live-head,
body.meshline-os-v2 .mesh-os-live-title-group,
body.meshline-os-v2 .mesh-os-live-progress-row {
  display: flex;
  align-items: center;
}

body.meshline-os-v2 .mesh-os-kicker-row,
body.meshline-os-v2 .mesh-os-primary-actions {
  flex-wrap: wrap;
  gap: 7px;
}

body.meshline-os-v2 .mesh-os-kicker,
body.meshline-os-v2 .mesh-os-environment,
body.meshline-os-v2 .mesh-os-time-badge {
  width: max-content;
  padding: 4px 7px;
  border: 1px solid rgba(154, 180, 216, 0.16);
  border-radius: 5px;
  color: rgba(218, 230, 243, 0.72);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.meshline-os-v2 .mesh-os-kicker {
  color: #b9f6ff;
}

body.meshline-os-v2 .mesh-os-kicker i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 2px;
  background: var(--os-cyan);
  box-shadow: 0 0 12px rgba(40, 189, 213, 0.7);
}

body.meshline-os-v2 .mesh-os-home .eyebrow {
  color: rgba(180, 205, 235, 0.55);
}

body.meshline-os-v2 .mesh-os-hero-copy h2 {
  max-width: 720px;
  margin: 0;
  color: #f8fafc;
  font-size: clamp(2.25rem, 4.3vw, 4.7rem);
  font-weight: 640;
  letter-spacing: -0.065em;
  line-height: 0.99;
  text-wrap: balance;
}

body.meshline-os-v2 .mesh-os-hero-copy > .helper-text {
  max-width: 610px;
  margin: 0;
  color: rgba(211, 223, 239, 0.66);
  font-size: clamp(0.9rem, 1.05vw, 1.04rem);
  line-height: 1.55;
}

body.meshline-os-v2 .mesh-os-home .secondary-button {
  border-color: rgba(157, 182, 216, 0.22);
  color: #e2eaf4;
  background: rgba(255, 255, 255, 0.055);
}

body.meshline-os-v2 .mesh-os-home .secondary-button:hover {
  border-color: rgba(130, 226, 240, 0.34);
  background: rgba(40, 189, 213, 0.1);
}

body.meshline-os-v2 .mesh-os-create-button {
  border-color: #ca8731;
  color: #2b1e0d;
  background: linear-gradient(180deg, #ffc472, #eba34b);
  box-shadow: 0 8px 20px rgba(238, 169, 76, 0.18);
}

body.meshline-os-v2 .mesh-os-flow-visual {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(145, 176, 218, 0.18);
  border-radius: var(--os-radius-lg);
  background: rgba(4, 10, 19, 0.46);
  box-shadow: inset 0 0 60px rgba(40, 189, 213, 0.025);
}

body.meshline-os-v2 .mesh-os-flow-grid {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(132, 162, 201, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 162, 201, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle, #000, transparent 80%);
}

body.meshline-os-v2 .mesh-os-flow-node,
body.meshline-os-v2 .mesh-os-flow-core {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 181, 224, 0.2);
  color: #eef5fc;
  background: rgba(14, 26, 45, 0.94);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

body.meshline-os-v2 .mesh-os-flow-node {
  top: 50%;
  width: 165px;
  min-height: 58px;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 10px;
  transform: translateY(-50%);
}

body.meshline-os-v2 .mesh-os-flow-node--source { left: 4%; }
body.meshline-os-v2 .mesh-os-flow-node--outcome { right: 4%; }

body.meshline-os-v2 .mesh-os-flow-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 7px;
  color: #07121d;
  background: var(--os-cyan);
  font-size: 0.68rem;
  font-weight: 900;
}

body.meshline-os-v2 .mesh-os-flow-node--outcome .mesh-os-flow-icon {
  background: #6fd7a8;
}

body.meshline-os-v2 .mesh-os-flow-node small,
body.meshline-os-v2 .mesh-os-flow-core small {
  display: block;
  color: rgba(200, 216, 236, 0.55);
  font-size: 0.54rem;
}

body.meshline-os-v2 .mesh-os-flow-node strong,
body.meshline-os-v2 .mesh-os-flow-core strong {
  display: block;
  font-size: 0.69rem;
}

body.meshline-os-v2 .mesh-os-flow-core {
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  gap: 1px;
  border-radius: 28px;
  transform: translate(-50%, -50%);
}

body.meshline-os-v2 .mesh-os-flow-core img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  animation: os-v2-float 4.5s ease-in-out infinite;
}

body.meshline-os-v2 .mesh-os-core-orbit {
  position: absolute;
  inset: -20px;
  border: 1px solid rgba(40, 189, 213, 0.16);
  border-radius: 50%;
  animation: os-v2-spin 18s linear infinite;
}

body.meshline-os-v2 .mesh-os-core-orbit::after {
  position: absolute;
  top: 10%;
  right: 10%;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  content: "";
  background: var(--os-cyan);
  box-shadow: 0 0 12px rgba(40, 189, 213, 0.8);
}

body.meshline-os-v2 .mesh-os-flow-line {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: calc(50% - 190px);
  height: 2px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(40, 189, 213, 0.06), rgba(40, 189, 213, 0.64), rgba(130, 94, 228, 0.1));
}

body.meshline-os-v2 .mesh-os-flow-line--one { left: calc(4% + 165px); }
body.meshline-os-v2 .mesh-os-flow-line--two { right: calc(4% + 165px); }

body.meshline-os-v2 .mesh-os-flow-line i {
  position: absolute;
  top: -2px;
  width: 22px;
  height: 6px;
  border-radius: 99px;
  background: #c0f7ff;
  box-shadow: 0 0 12px rgba(40, 189, 213, 0.9);
  animation: os-v2-flow 2.4s linear infinite;
}

body.meshline-os-v2 .mesh-os-flow-caption {
  position: absolute;
  inset: auto 20px 16px;
  display: flex;
  justify-content: center;
  gap: 15px;
  color: rgba(192, 210, 232, 0.45);
  font-size: 0.54rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.meshline-os-v2 .mesh-os-live-deck {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 178, 217, 0.16);
  border-radius: var(--os-radius-md);
  background: rgba(4, 10, 19, 0.48);
}

body.meshline-os-v2 .mesh-os-live-head {
  justify-content: space-between;
  gap: 12px;
}

body.meshline-os-v2 .mesh-os-live-title-group {
  gap: 9px;
}

body.meshline-os-v2 .mesh-os-live-pulse {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #67d7a5;
  box-shadow: 0 0 13px rgba(103, 215, 165, 0.65);
}

body.meshline-os-v2 .mesh-os-live-title-group small {
  display: block;
  color: rgba(194, 212, 234, 0.52);
  font-size: 0.56rem;
}

body.meshline-os-v2 .mesh-os-live-title-group strong {
  display: block;
  color: #eff5fb;
  font-size: 0.78rem;
}

body.meshline-os-v2 .mesh-os-live-progress-row {
  gap: 10px;
}

body.meshline-os-v2 .mesh-os-live-progress-track,
body.meshline-os-v2 .workspace-project-progress,
body.meshline-os-v2 .marketing-run-progress-track {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(144, 170, 205, 0.12);
}

body.meshline-os-v2 .mesh-os-live-progress-track span,
body.meshline-os-v2 .workspace-project-progress > span,
body.meshline-os-v2 .marketing-run-progress-track > span {
  position: relative;
  display: block;
  height: 100%;
  min-width: 7px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--os-cyan), var(--os-blue), var(--os-violet));
  box-shadow: 0 0 12px rgba(40, 189, 213, 0.32);
  transition: width 500ms cubic-bezier(.2,.8,.2,1);
}

body.meshline-os-v2 .mesh-os-live-progress-row > strong {
  min-width: 42px;
  color: #e8f5fb;
  font-size: 0.65rem;
  text-align: right;
}

body.meshline-os-v2 .mesh-os-live-deck > p {
  margin: 0;
  color: rgba(194, 212, 234, 0.58);
  font-size: 0.65rem;
}

body.meshline-os-v2 .mesh-os-live-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

body.meshline-os-v2 .mesh-os-live-stages span,
body.meshline-os-v2 .marketing-run-stage-pill {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid rgba(144, 170, 205, 0.11);
  border-radius: 5px;
  color: rgba(192, 210, 232, 0.42);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.54rem;
  font-weight: 700;
  text-align: center;
}

body.meshline-os-v2 .mesh-os-home-support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

body.meshline-os-v2 .workspace-home-spotlight,
body.meshline-os-v2 .workspace-home-approvals {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(148, 178, 217, 0.14);
  border-radius: var(--os-radius-md);
  background: rgba(255, 255, 255, 0.035);
}

body.meshline-os-v2 .workspace-home-spotlight h3,
body.meshline-os-v2 .workspace-home-approvals h3 {
  color: #f2f6fb;
}

body.meshline-os-v2 .workspace-home-spotlight .helper-text,
body.meshline-os-v2 .workspace-home-approvals .helper-text {
  color: rgba(198, 214, 234, 0.56);
}

/* Quick setup and project cards */
body.meshline-os-v2 .mesh-os-launchpad {
  padding: clamp(16px, 1.8vw, 22px);
}

body.meshline-os-v2 .mesh-os-time-badge {
  border-color: #bad3c4;
  color: #2d6a4e;
  background: #edf8f1;
}

body.meshline-os-v2 .mesh-os-launchpad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

body.meshline-os-v2 .mesh-os-launch-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 210px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  color: var(--os-ink);
  text-align: left;
  background: #fff;
  box-shadow: var(--os-shadow-sm);
}

body.meshline-os-v2 .mesh-os-launch-card::after {
  position: absolute;
  inset: auto -28px -38px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(77, 112, 232, 0.08), transparent 70%);
}

body.meshline-os-v2 .mesh-os-launch-card:hover {
  border-color: #b9c0b9;
  box-shadow: var(--os-shadow-md);
  transform: translateY(-2px);
}

body.meshline-os-v2 .mesh-os-launch-number {
  color: var(--os-blue);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

body.meshline-os-v2 .mesh-os-launch-card > strong {
  font-size: 0.9rem;
}

body.meshline-os-v2 .mesh-os-launch-card > p {
  margin: 0;
  color: var(--os-muted);
  font-size: 0.72rem;
  line-height: 1.48;
}

body.meshline-os-v2 .mesh-os-launch-action {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: end;
  color: var(--os-blue);
  font-size: 0.68rem;
  font-weight: 820;
}

body.meshline-os-v2 .mesh-os-launch-graphic {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}

body.meshline-os-v2 .mesh-os-launch-graphic i {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid #bfe4ea;
  border-radius: 7px;
  color: #247486;
  background: var(--os-cyan-soft);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 850;
}

body.meshline-os-v2 .mesh-os-launch-graphic--workflow i {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--os-cyan), var(--os-blue));
}

body.meshline-os-v2 .workspace-project-grid,
body.meshline-os-v2 .agent-studio-module-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

body.meshline-os-v2 .workspace-project-card,
body.meshline-os-v2 .agent-studio-module-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 270px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  color: var(--os-ink);
  background:
    linear-gradient(90deg, var(--os-cyan), var(--os-blue), var(--os-violet)) top / 100% 4px no-repeat,
    #fff;
  box-shadow: var(--os-shadow-sm);
}

body.meshline-os-v2 .workspace-project-card:hover,
body.meshline-os-v2 .agent-studio-module-card:hover,
body.meshline-os-v2 .workspace-project-card.active {
  border-color: #b9beb7;
  box-shadow: var(--os-shadow-md);
  transform: translateY(-2px);
}

body.meshline-os-v2 .workspace-project-avatar {
  width: 43px;
  height: 43px;
  border: 1px solid #bfe4ea;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--os-cyan-soft), #edf0ff);
}

body.meshline-os-v2 .workspace-project-copy small {
  color: var(--os-green);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body.meshline-os-v2 .workspace-project-copy > strong {
  color: var(--os-ink);
  font-size: 0.98rem;
}

body.meshline-os-v2 .workspace-project-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

body.meshline-os-v2 .workspace-project-flow span {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--os-faint);
  font-size: 0.52rem;
  font-weight: 720;
  text-align: center;
}

body.meshline-os-v2 .workspace-project-flow i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--os-line);
  border-radius: 5px;
  color: #68737b;
  background: #f5f5f1;
  font-size: 0.52rem;
  font-style: normal;
}

body.meshline-os-v2 .workspace-project-flow span.is-ready i {
  border-color: #a9d7be;
  color: #28684a;
  background: var(--os-green-soft);
}

/* Studio, workflow, connectors, reports, and operations */
body.meshline-os-v2 .agent-workspace-panel,
body.meshline-os-v2 .workspace-aux-panel {
  min-height: calc(100dvh - 90px);
  padding: 12px;
  background: rgba(255, 255, 252, 0.72);
}

body.meshline-os-v2 .agent-workspace-shell {
  display: grid;
  grid-template-columns: minmax(210px, 0.24fr) minmax(0, 1fr);
  gap: 10px;
}

body.meshline-os-v2 .agent-side-rail {
  display: grid;
  align-content: start;
  gap: 8px;
}

body.meshline-os-v2 .agent-main-workspace,
body.meshline-os-v2 .agent-workspace-main,
body.meshline-os-v2 .module-workspace,
body.meshline-os-v2 .revenue-workspace-shell,
body.meshline-os-v2 .marketing-workspace-shell {
  min-width: 0;
}

body.meshline-os-v2 .agent-project-browser-list,
body.meshline-os-v2 .content-list,
body.meshline-os-v2 .stack-list,
body.meshline-os-v2 .summary-list {
  display: grid;
  gap: 5px;
}

body.meshline-os-v2 .content-list > *,
body.meshline-os-v2 .stack-list > *,
body.meshline-os-v2 .summary-row,
body.meshline-os-v2 .trend-list > * {
  border-color: var(--os-line);
  border-radius: 7px;
  color: var(--os-ink);
  background: #fff;
  box-shadow: none;
}

body.meshline-os-v2 .main-grid.workspace-embedded-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
}

body.meshline-os-v2 .main-grid.workspace-embedded-grid > .sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

body.meshline-os-v2 .nav-button.active {
  border-color: #a8d5ba;
  color: #245f43;
  background: var(--os-green-soft);
  box-shadow: inset 3px 0 var(--os-green);
}

body.meshline-os-v2 .signals-hero-shell,
body.meshline-os-v2 .module-overview-shell,
body.meshline-os-v2 .agent-command-shell,
body.meshline-os-v2 .revenue-command-shell {
  border-color: var(--os-line);
  border-radius: var(--os-radius-md);
  color: var(--os-ink);
  background:
    radial-gradient(circle at 88% 0%, rgba(40, 189, 213, 0.08), transparent 30%),
    #fff;
  box-shadow: var(--os-shadow-sm);
}

body.meshline-os-v2 .signals-glance-strip,
body.meshline-os-v2 .workspace-metric-grid,
body.meshline-os-v2 .module-kpi-grid,
body.meshline-os-v2 .agent-studio-overview-mini-stats {
  gap: 7px;
}

body.meshline-os-v2 .signals-glance-strip > *,
body.meshline-os-v2 .workspace-metric-grid > *,
body.meshline-os-v2 .module-kpi-grid > * {
  border: 1px solid var(--os-line);
  border-radius: 8px;
  color: var(--os-ink);
  background: #fff;
  box-shadow: var(--os-shadow-sm);
}

body.meshline-os-v2 table,
body.meshline-os-v2 .data-table,
body.meshline-os-v2 .revenue-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-sm);
  color: var(--os-ink);
  background: #fff;
  overflow: hidden;
}

body.meshline-os-v2 th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--os-line);
  color: #66716b;
  background: #f2f3ef;
  font-size: 0.6rem;
  font-weight: 830;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
}

body.meshline-os-v2 td {
  padding: 10px;
  border-bottom: 1px solid #ecece7;
  color: #36424a;
}

body.meshline-os-v2 tbody tr:hover td {
  background: #fafaf7;
}

body.meshline-os-v2 input,
body.meshline-os-v2 textarea,
body.meshline-os-v2 select {
  max-width: 100%;
  border: 1px solid var(--os-line-strong);
  border-radius: 7px;
  color: var(--os-ink);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(25, 35, 42, 0.025);
}

body.meshline-os-v2 input:focus,
body.meshline-os-v2 textarea:focus,
body.meshline-os-v2 select:focus {
  border-color: var(--os-cyan);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(40, 189, 213, 0.12);
}

body.meshline-os-v2 label > span,
body.meshline-os-v2 .field > span {
  color: #4b565f;
  font-weight: 720;
}

/* Run state */
body.meshline-os-v2 .marketing-run-card,
body.meshline-os-v2 .run-card,
body.meshline-os-v2 .execution-card {
  overflow: hidden;
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-md);
  color: var(--os-ink);
  background: #fff;
  box-shadow: var(--os-shadow-sm);
}

body.meshline-os-v2 .marketing-run-card[data-run-status="running"],
body.meshline-os-v2 .marketing-run-card[data-run-status="active"],
body.meshline-os-v2 .marketing-run-card[data-run-status="processing"] {
  border-color: #9ed3dc;
  box-shadow: 0 0 0 3px rgba(40, 189, 213, 0.08), var(--os-shadow-md);
}

body.meshline-os-v2 .marketing-run-card[data-run-status="running"] .marketing-run-progress-track > span::after,
body.meshline-os-v2 .marketing-run-card[data-run-status="active"] .marketing-run-progress-track > span::after,
body.meshline-os-v2 .marketing-run-card[data-run-status="processing"] .marketing-run-progress-track > span::after,
body.meshline-os-v2 [data-live-state="running"] .mesh-os-live-progress-track span::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-100%);
  animation: os-v2-shimmer 1.8s ease-in-out infinite;
}

body.meshline-os-v2 .marketing-run-stage-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

body.meshline-os-v2 .marketing-run-stage-pill {
  color: var(--os-faint);
  background: #f7f7f4;
}

body.meshline-os-v2 .marketing-run-stage-pill.done {
  border-color: #aed5bd;
  color: #28684a;
  background: var(--os-green-soft);
}

body.meshline-os-v2 .marketing-run-stage-pill.active {
  border-color: #a8dbe3;
  color: #216978;
  background: var(--os-cyan-soft);
  box-shadow: inset 0 -2px var(--os-cyan);
}

/* Modal, drawer, toast, and menus */
body.meshline-os-v2 .json-modal,
body.meshline-os-v2 .modal-backdrop,
body.meshline-os-v2 .drawer-backdrop {
  background: rgba(8, 15, 25, 0.55);
  backdrop-filter: blur(8px);
}

body.meshline-os-v2 .json-modal-card,
body.meshline-os-v2 .modal-card,
body.meshline-os-v2 .drawer,
body.meshline-os-v2 .revenue-pipeline-drawer {
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-lg);
  color: var(--os-ink);
  background: #fff;
  box-shadow: var(--os-shadow-lg);
}

body.meshline-os-v2 .modal-close-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--os-line);
  border-radius: 7px;
  color: #53606a;
  background: #f6f6f2;
}

body.meshline-os-v2 .toast,
body.meshline-os-v2 .notification-toast {
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius-sm);
  color: var(--os-ink);
  background: #fff;
  box-shadow: var(--os-shadow-lg);
}

body.meshline-os-v2 .mobile-guide-strip {
  display: none;
}

body.meshline-os-v2 .mobile-app-nav {
  border-color: var(--os-line);
  color: var(--os-muted);
  background: rgba(255, 255, 252, 0.92);
  box-shadow: 0 -8px 24px rgba(25, 34, 40, 0.08);
  backdrop-filter: blur(18px);
}

body.meshline-os-v2 .mobile-app-nav__item {
  color: var(--os-muted);
}

body.meshline-os-v2 .mobile-app-nav__item.active {
  color: var(--os-blue);
}

body.meshline-os-v2 .mobile-app-nav__item.active .mobile-app-nav__icon {
  color: #fff;
  background: var(--os-blue);
  box-shadow: 0 6px 14px rgba(77, 112, 232, 0.22);
}

/* Motion */
@keyframes os-v2-spin { to { transform: rotate(360deg); } }
@keyframes os-v2-float { 50% { transform: translateY(-5px); } }
@keyframes os-v2-flow { from { transform: translateX(-26px); } to { transform: translateX(420px); } }
@keyframes os-v2-shimmer { to { transform: translateX(100%); } }

/* Responsive system */
@media (max-width: 1320px) {
  body.meshline-os-v2 .workspace-shell,
  body.meshline-os-v2 .workspace-shell.workspace-shell-inner {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  body.meshline-os-v2 .workspace-sidebar {
    width: 210px;
  }

  body.meshline-os-v2 .workspace-header {
    grid-template-columns: minmax(130px, 0.55fr) minmax(300px, 1fr) auto;
  }

  body.meshline-os-v2 .workspace-user-copy,
  body.meshline-os-v2 .workspace-release-badge,
  body.meshline-os-v2 .workspace-health-pill {
    display: none;
  }

  body.meshline-os-v2 .workspace-user-shell,
  body.meshline-os-v2 .workspace-user-pill {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
  }

  body.meshline-os-v2 .workspace-user-pill {
    grid-template-columns: 28px;
    justify-content: center;
    padding: 3px;
  }

  body.meshline-os-v2 .workspace-utility-pill span {
    display: none;
  }

  body.meshline-os-v2 .workspace-project-grid,
  body.meshline-os-v2 .agent-studio-module-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body.meshline-os-v2 .login-layout.auth-layout-dark {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr);
    gap: 24px;
    padding: 24px;
  }

  body.meshline-os-v2 .auth-hero-card.auth-hero-classic {
    min-height: 620px;
    padding: 24px;
  }

  body.meshline-os-v2 .auth-classic-lane-grid {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 .auth-classic-lane {
    min-height: 0;
  }

  body.meshline-os-v2 .mesh-os-hero-grid {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 .mesh-os-flow-visual {
    min-height: 270px;
  }

  body.meshline-os-v2 .workspace-header {
    grid-template-columns: minmax(120px, 0.4fr) minmax(270px, 1fr) auto;
  }

  body.meshline-os-v2 .workspace-utility-pill span {
    display: none;
  }

  body.meshline-os-v2 .workspace-utility-pill {
    justify-content: center;
  }

  body.meshline-os-v2 .agent-workspace-shell {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 .agent-side-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  body.meshline-os-v2 .workspace-shell,
  body.meshline-os-v2 .workspace-shell.workspace-shell-inner {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 .workspace-sidebar {
    display: none;
  }

  body.meshline-os-v2 .workspace-main {
    grid-column: 1;
    padding-inline: 12px;
    padding-bottom: 94px;
  }

  body.meshline-os-v2 .workspace-header {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-inline: -12px;
    padding-inline: 12px;
  }

  body.meshline-os-v2 .workspace-utility-strip {
    display: none;
  }

  body.meshline-os-v2 .workspace-header-actions .secondary-button,
  body.meshline-os-v2 .workspace-logout-button {
    display: none;
  }

  body.meshline-os-v2 .mobile-guide-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    padding: 8px 10px;
    border: 1px solid var(--os-line);
    border-radius: var(--os-radius-sm);
    color: var(--os-muted);
    background: rgba(255, 255, 255, 0.68);
  }

  body.meshline-os-v2 .mobile-guide-strip span {
    color: var(--os-green);
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  body.meshline-os-v2 .mobile-guide-strip strong {
    font-size: 0.66rem;
  }

  body.meshline-os-v2 .main-grid.workspace-embedded-grid {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 .main-grid.workspace-embedded-grid > .sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.meshline-os-v2 #loginScreen {
    background: var(--os-canvas);
  }

  body.meshline-os-v2 .login-layout.auth-layout-dark {
    display: block;
    min-height: 100dvh;
    padding: 8px;
  }

  body.meshline-os-v2 .auth-hero-card.auth-hero-classic {
    display: none;
  }

  body.meshline-os-v2 .auth-stack {
    width: 100%;
    min-height: calc(100dvh - 16px);
    align-content: start;
    padding-top: 8px;
  }

  body.meshline-os-v2 .login-card.auth-card-shell,
  body.meshline-os-v2 .register-card,
  body.meshline-os-v2 #passwordResetRequestForm,
  body.meshline-os-v2 #passwordResetConfirmForm {
    min-height: auto;
    padding: 22px 18px;
    border-radius: var(--os-radius-md);
    box-shadow: var(--os-shadow-md);
  }

  body.meshline-os-v2 #passwordResetRequestForm .helper-text,
  body.meshline-os-v2 #passwordResetConfirmForm .helper-text {
    display: block;
  }

  body.meshline-os-v2 #passwordResetRequestForm .register-actions,
  body.meshline-os-v2 #passwordResetConfirmForm .register-actions {
    position: static;
    padding-top: 0;
    background: none;
  }

  body.meshline-os-v2 .app-language-switch {
    top: 18px;
    right: 18px;
    bottom: auto;
    box-shadow: none;
  }

  body.meshline-os-v2 .workspace-header {
    min-height: 54px;
  }

  body.meshline-os-v2 .workspace-route-chip {
    max-width: 190px;
  }

  body.meshline-os-v2 .workspace-header-primary {
    padding-inline: 10px;
    font-size: 0.65rem;
  }

  body.meshline-os-v2 .workspace-user-pill {
    display: none;
  }

  body.meshline-os-v2 .workspace-panel {
    padding: 14px;
  }

  body.meshline-os-v2 .mesh-os-home {
    padding: 18px 14px;
  }

  body.meshline-os-v2 .mesh-os-hero-copy h2 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  body.meshline-os-v2 .mesh-os-primary-actions,
  body.meshline-os-v2 .mesh-os-live-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 .mesh-os-primary-actions button,
  body.meshline-os-v2 .mesh-os-live-deck button {
    width: 100%;
    min-height: 44px;
  }

  body.meshline-os-v2 .mesh-os-flow-visual {
    min-height: 380px;
  }

  body.meshline-os-v2 .mesh-os-flow-node {
    left: 50%;
    right: auto;
    width: min(220px, calc(100% - 38px));
    transform: translateX(-50%);
  }

  body.meshline-os-v2 .mesh-os-flow-node--source { top: 35px; }
  body.meshline-os-v2 .mesh-os-flow-node--outcome { top: auto; bottom: 50px; }

  body.meshline-os-v2 .mesh-os-flow-line {
    left: 50%;
    width: 2px;
    height: 62px;
    transform: translateX(-50%);
  }

  body.meshline-os-v2 .mesh-os-flow-line--one { top: 92px; }
  body.meshline-os-v2 .mesh-os-flow-line--two { top: auto; right: auto; bottom: 104px; }
  body.meshline-os-v2 .mesh-os-flow-line i { display: none; }

  body.meshline-os-v2 .mesh-os-home-support-grid,
  body.meshline-os-v2 .mesh-os-launchpad-grid,
  body.meshline-os-v2 .workspace-project-grid,
  body.meshline-os-v2 .agent-studio-module-catalog,
  body.meshline-os-v2 .agent-side-rail,
  body.meshline-os-v2 .main-grid.workspace-embedded-grid > .sidebar {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 .mesh-os-live-stages,
  body.meshline-os-v2 .marketing-run-stage-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.meshline-os-v2 .workspace-project-card,
  body.meshline-os-v2 .agent-studio-module-card {
    min-height: 240px;
  }
}

/* Mobile refinement: keep the light OS shell and dark execution surfaces coherent. */
@media (max-width: 760px) {
  body.meshline-os-v2 .app-shell {
    padding: 8px 8px calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.meshline-os-v2 .screen.active::after {
    height: 72px !important;
  }

  body.meshline-os-v2 .workspace-main::after {
    height: 76px !important;
    background: linear-gradient(180deg, transparent, rgba(242, 241, 236, 0.94));
  }

  body.meshline-os-v2 .workspace-panel:last-child,
  body.meshline-os-v2 .view-panel.active:last-child,
  body.meshline-os-v2 .content > :last-child,
  body.meshline-os-v2 .workspace-main > :last-child {
    margin-bottom: 0 !important;
  }

  body.meshline-os-v2 .agent-command-actions,
  body.meshline-os-v2 .agent-queue-empty-actions,
  body.meshline-os-v2 .marketing-minimal-hero-actions,
  body.meshline-os-v2 #agentScreen .agent-studio-overview-actions,
  body.meshline-os-v2 #automationScreen .builder-tabs {
    margin-bottom: 0 !important;
    transform: none !important;
  }

  body.meshline-os-v2 .mesh-os-home {
    padding: 18px 16px !important;
    border-radius: 18px;
  }

  body.meshline-os-v2 .mesh-os-hero-copy h2 {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    color: #f7f9ff;
    font-size: clamp(1.9rem, 9vw, 2.55rem) !important;
    line-height: 1 !important;
    white-space: normal !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
  }

  body.meshline-os-v2 .mesh-os-hero-copy > .helper-text,
  body.meshline-os-v2 .agent-studio-module-copy p,
  body.meshline-os-v2 .agent-studio-module-status span,
  body.meshline-os-v2 .content-item p,
  body.meshline-os-v2 .stack-item p,
  body.meshline-os-v2 .marketing-run-card p,
  body.meshline-os-v2 .revenue-lead-card p,
  body.meshline-os-v2 .webhook-card p {
    display: -webkit-box !important;
    overflow: hidden;
    font-size: 0.76rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3 !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-overview-shell,
  body.meshline-os-v2 #agentScreen .agent-studio-catalog-panel--full {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-overview-mini-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 7px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-overview-actions,
  body.meshline-os-v2 #agentScreen .agent-studio-overview-mini-stats,
  body.meshline-os-v2 #agentScreen .agent-studio-module-actions,
  body.meshline-os-v2 #agentScreen .marketing-project-card-actions {
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-mini-stat,
  body.meshline-os-v2 #agentScreen .agent-studio-module-card {
    background: linear-gradient(160deg, #23365f 0%, #141d36 58%, #0e1528 100%) !important;
    border-color: rgba(118, 151, 218, 0.3);
    box-shadow: 0 12px 28px rgba(23, 34, 54, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  body.meshline-os-v2 #agentScreen .agent-studio-mini-stat {
    min-width: 0;
    min-height: 48px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card {
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-stat {
    min-height: 52px;
    padding: 8px;
    background: rgba(6, 12, 28, 0.58) !important;
    border-color: rgba(154, 178, 230, 0.12);
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-copy p,
  body.meshline-os-v2 #agentScreen .agent-studio-module-status span,
  body.meshline-os-v2 #agentScreen .agent-studio-module-summary-row span {
    color: rgba(215, 225, 247, 0.76);
  }

  body.meshline-os-v2 #agentScreen .marketing-project-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  body.meshline-os-v2 #agentScreen .marketing-project-card-actions > :first-child {
    grid-column: 1 / -1;
  }

  body.meshline-os-v2 #agentScreen .marketing-project-card-actions .primary-button,
  body.meshline-os-v2 #agentScreen .marketing-project-card-actions .secondary-button {
    width: 100%;
    min-height: 42px;
    white-space: normal;
    line-height: 1.15;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card,
  body.meshline-os-v2 #automationScreen .webhook-control-panel,
  body.meshline-os-v2 #automationScreen .webhook-studio,
  body.meshline-os-v2 #automationScreen .view-panel {
    border: 1px solid var(--os-line);
    color: var(--os-ink);
    background: var(--os-panel);
    box-shadow: var(--os-shadow-sm);
  }

  body.meshline-os-v2 #automationScreen .sidebar > .sidebar-card:not(:first-child) {
    display: none !important;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
    padding: 0;
    background: transparent;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-card {
    min-height: 0;
    padding: 14px;
    border: 1px solid var(--os-line);
    border-radius: 14px;
    color: var(--os-ink);
    background: #fff;
    box-shadow: var(--os-shadow-sm);
  }

  body.meshline-os-v2 #automationScreen .automation-setup-card h4,
  body.meshline-os-v2 #automationScreen .automation-setup-card p {
    color: var(--os-ink) !important;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-glance {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-glance-item,
  body.meshline-os-v2 #automationScreen .automation-setup-item {
    min-height: 0;
    padding: 10px;
    border: 1px solid var(--os-line);
    border-radius: 12px;
    background: var(--os-panel-muted);
  }

  body.meshline-os-v2 #automationScreen .automation-setup-glance-item span,
  body.meshline-os-v2 #automationScreen .automation-setup-glance-item strong,
  body.meshline-os-v2 #automationScreen .automation-setup-item span,
  body.meshline-os-v2 #automationScreen .automation-setup-item strong {
    color: var(--os-ink) !important;
  }

  body.meshline-os-v2 #automationScreen .workspace-utility-pill {
    color: var(--os-ink) !important;
    background: #fff !important;
  }

  body.meshline-os-v2 #automationScreen .workspace-utility-pill.active {
    color: #174f3d !important;
    background: var(--os-green-soft) !important;
  }

  body.meshline-os-v2 #automationScreen .view-panel:not(.active),
  body.meshline-os-v2 #automationScreen .builder-view:not(.active) {
    display: none !important;
  }

  body.meshline-os-v2 #automationScreen #webhookIndexList,
  body.meshline-os-v2 #automationScreen .webhook-list,
  body.meshline-os-v2 #automationScreen .stack-list {
    padding-bottom: 0 !important;
  }

  body.meshline-os-v2 #automationScreen #webhookIndexList > :first-child,
  body.meshline-os-v2 #automationScreen .webhook-list > :first-child {
    margin-top: 0 !important;
  }

  body.meshline-os-v2 #automationScreen .webhook-inventory-shell {
    margin-top: 0;
    padding: 14px;
    border: 1px solid var(--os-line);
    border-radius: 14px;
    background: #fff;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card .nav-button,
  body.meshline-os-v2 #automationScreen .builder-tab {
    min-height: 44px !important;
    border: 1px solid var(--os-line-strong) !important;
    color: #49545d !important;
    background: #f5f6f2 !important;
    box-shadow: none !important;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card .nav-button.active,
  body.meshline-os-v2 #automationScreen .builder-tab.active {
    border-color: #91b9ac !important;
    color: #174f3d !important;
    background: var(--os-green-soft) !important;
  }

  body.meshline-os-v2 #reportsScreen .signals-hero-shell,
  body.meshline-os-v2 #reportsScreen .view-panel.active,
  body.meshline-os-v2 #reportsScreen .workspace-aux-panel {
    border: 1px solid var(--os-line);
    color: var(--os-ink);
    background: var(--os-panel);
    box-shadow: var(--os-shadow-sm);
  }

  body.meshline-os-v2 #reportsScreen #reportsFilterForm {
    margin-bottom: 18px !important;
  }

  body.meshline-os-v2 #reportsScreen .signals-glance-strip,
  body.meshline-os-v2 #reportsScreen .signals-hero-badges {
    color: var(--os-ink);
    background: var(--os-panel-muted);
  }

  body.meshline-os-v2 #reportsScreen .signals-insight-card,
  body.meshline-os-v2 #reportsScreen .glance-card,
  body.meshline-os-v2 #reportsScreen .metric-card,
  body.meshline-os-v2 #reportsScreen .stat-card {
    border-color: var(--os-line);
    color: var(--os-ink);
    background: #fff;
    box-shadow: var(--os-shadow-sm);
  }

  body.meshline-os-v2 #reportsScreen .signals-insight-card strong,
  body.meshline-os-v2 #reportsScreen .signals-insight-card p,
  body.meshline-os-v2 #reportsScreen .glance-card h3,
  body.meshline-os-v2 #reportsScreen .glance-card p,
  body.meshline-os-v2 #reportsScreen .glance-card strong,
  body.meshline-os-v2 #reportsScreen .glance-card span,
  body.meshline-os-v2 #reportsScreen .metric-card strong,
  body.meshline-os-v2 #reportsScreen .metric-card span,
  body.meshline-os-v2 #reportsScreen .stat-card strong,
  body.meshline-os-v2 #reportsScreen .stat-card span {
    color: var(--os-ink) !important;
  }

  body.meshline-os-v2 .mobile-app-nav {
    min-height: 60px !important;
    padding: 6px !important;
    border: 1px solid #d4d7d1 !important;
    background: rgba(251, 251, 248, 0.96) !important;
    box-shadow: 0 14px 34px rgba(25, 34, 40, 0.18) !important;
  }

  body.meshline-os-v2 .mobile-app-nav__item {
    min-height: 46px !important;
    color: #69747c !important;
  }

  body.meshline-os-v2 .mobile-app-nav__item.active {
    color: #345fd8 !important;
    border-color: #cde6eb !important;
    background: #edf8fa !important;
  }
}

@media (max-width: 420px) {
  body.meshline-os-v2 .workspace-main {
    padding-inline: 8px;
  }

  body.meshline-os-v2 .workspace-header {
    margin-inline: -8px;
    padding-inline: 8px;
  }

  body.meshline-os-v2 .workspace-route-chip {
    max-width: 160px;
  }

  body.meshline-os-v2 .mesh-os-hero-copy h2 {
    font-size: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.meshline-os-v2 *,
  body.meshline-os-v2 *::before,
  body.meshline-os-v2 *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Authoritative mobile audit cascade — keep after legacy mobile overrides. */
@media (max-width: 760px) {
  body.meshline-os-v2 button,
  body.meshline-os-v2 a,
  body.meshline-os-v2 input,
  body.meshline-os-v2 select {
    min-height: 44px;
  }

  body.meshline-os-v2 .workspace-route-chip {
    max-width: calc(100% - 72px) !important;
    min-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.meshline-os-v2 .app-language-switch {
    top: 12px !important;
    right: 14px !important;
    bottom: auto !important;
  }

  body.meshline-os-v2[data-active-screen="loginScreen"] .app-language-switch {
    top: auto !important;
    bottom: 16px !important;
  }

  body.meshline-os-v2 #loginScreen .auth-text-button {
    min-height: 44px;
    border: 0 !important;
    color: #355dcc !important;
    background: transparent !important;
  }

  body.meshline-os-v2 #loginScreen .auth-divider,
  body.meshline-os-v2 #loginScreen .auth-divider::before,
  body.meshline-os-v2 #loginScreen .auth-divider::after {
    background: transparent !important;
  }

  body.meshline-os-v2 #loginScreen .auth-divider span {
    color: var(--os-muted) !important;
    background: rgba(255, 255, 252, 0.98) !important;
  }

  body.meshline-os-v2 .mobile-app-nav {
    display: flex !important;
    gap: 2px !important;
    min-height: 66px !important;
    padding: 5px 7px calc(5px + env(safe-area-inset-bottom)) !important;
  }

  body.meshline-os-v2[data-active-screen="loginScreen"] .mobile-app-nav {
    display: none !important;
  }

  body.meshline-os-v2 .mobile-app-nav__item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 54px !important;
    padding-inline: 2px !important;
  }

  body.meshline-os-v2 .mobile-app-nav__label {
    overflow: hidden;
    font-size: 0.62rem !important;
    text-overflow: ellipsis;
  }

  body.meshline-os-v2:has(.json-modal:not(.hidden)) .mobile-app-nav,
  body.meshline-os-v2:has(.json-modal:not(.hidden)) .app-language-switch,
  body.meshline-os-v2:has(.json-modal:not(.hidden)) .meshline-ux-launcher,
  body.meshline-os-v2.mobile-create-module-open .mobile-app-nav,
  body.meshline-os-v2.mobile-create-module-open .app-language-switch,
  body.meshline-os-v2.mobile-create-module-open .meshline-ux-launcher {
    display: none !important;
  }

  body.meshline-os-v2 .json-modal:not(.hidden) {
    padding: 0 !important;
    align-items: stretch !important;
  }

  body.meshline-os-v2 .json-modal:not(.hidden) > .json-modal-card {
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 16px calc(18px + env(safe-area-inset-bottom)) !important;
    overflow: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  body.meshline-os-v2 .json-modal:not(.hidden) > .json-modal-card > .panel-head {
    position: sticky !important;
    top: 0;
    z-index: 4;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 70px;
    margin: 0 -16px 12px !important;
    padding: 14px 16px 12px !important;
    border-bottom: 1px solid var(--os-line);
    background: rgba(251, 251, 248, 0.97) !important;
    backdrop-filter: blur(18px);
  }

  body.meshline-os-v2 .profile-account-summary {
    padding: 10px !important;
    border-color: var(--os-line) !important;
    background: var(--os-panel-muted) !important;
  }

  body.meshline-os-v2 .profile-account-summary .summary-row {
    gap: 10px;
    min-width: 0;
  }

  body.meshline-os-v2 .profile-account-summary .summary-row strong {
    max-width: 62%;
    overflow-wrap: anywhere;
    text-align: right;
  }

  body.meshline-os-v2 .profile-account-summary > .helper-text {
    display: none;
  }

  body.meshline-os-v2 .create-marketing-stepper {
    position: sticky !important;
    top: 70px;
    z-index: 3;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 8px 0 !important;
    background: var(--os-panel) !important;
  }

  body.meshline-os-v2 .create-marketing-step {
    min-width: 0 !important;
    min-height: 48px !important;
    color: #4b5660 !important;
    background: #f5f6f2 !important;
  }

  body.meshline-os-v2 .create-marketing-step strong,
  body.meshline-os-v2 .create-marketing-step span {
    color: inherit !important;
  }

  body.meshline-os-v2 .create-marketing-step.active {
    border-color: #7890ea !important;
    color: #173375 !important;
    background: #e8edff !important;
  }

  body.meshline-os-v2 .create-module-form > .register-actions {
    position: sticky !important;
    bottom: 0;
    z-index: 4;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 8px -16px -18px !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid var(--os-line);
    background: rgba(251, 251, 248, 0.97) !important;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-launchpad-grid {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-launch-card {
    min-height: 0 !important;
    padding: 12px 14px !important;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-launch-card p,
  body.meshline-os-v2 #dashboardScreen .mesh-os-launch-graphic,
  body.meshline-os-v2 #dashboardScreen #firstPostOnboardingPanel .onboarding-flow-layout,
  body.meshline-os-v2 #dashboardScreen #firstPostOnboardingPanel .helper-text,
  body.meshline-os-v2 #dashboardScreen #firstPostOnboardingPanel #onboardingFlowBadge {
    display: none !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-mini-stat.active {
    border-color: #45c8d9 !important;
    box-shadow: 0 0 0 3px rgba(69, 200, 217, 0.2) !important;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card:first-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card:first-child > .panel-head,
  body.meshline-os-v2 #automationScreen .sidebar-card:first-child > .summary-list {
    grid-column: 1 / -1;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-card h3,
  body.meshline-os-v2 #automationScreen .automation-setup-card h4,
  body.meshline-os-v2 #automationScreen .view-panel > h3 {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-glance-item strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: clamp(1rem, 5vw, 1.3rem) !important;
  }

  body.meshline-os-v2 #reportsScreen .workspace-route-chip {
    font-size: 0 !important;
  }

  body.meshline-os-v2 #reportsScreen .workspace-route-chip::after {
    content: "Outcomes / Workflow evidence";
    font-size: 0.72rem;
  }

  body.meshline-os-v2 #reportsScreen #reportsFilterForm .info-card {
    grid-column: 1 / -1 !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }

  body.meshline-os-v2 #reportsScreen #reportsFilterForm .primary-button {
    width: 100% !important;
    min-height: 46px !important;
  }

  body.meshline-os-v2 #reportsScreen .signals-glance-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.meshline-os-v2 #reportsScreen .signals-glance-strip > :last-child {
    grid-column: 1 / -1 !important;
  }

  body.meshline-os-v2 #reportsScreen #reportLogsList {
    max-height: 560px !important;
    overflow: auto !important;
  }

  body.meshline-os-v2 .create-marketing-step-intro p {
    color: var(--os-muted) !important;
  }

  body.meshline-os-v2 #agentScreen .marketing-inline-frequency-button,
  body.meshline-os-v2 #agentScreen .marketing-frequency-preset {
    min-height: 44px !important;
  }
}

/* Marketing workflow workspace - OS v2 convergence layer.
   This deliberately outranks the legacy dark marketing-minimal rules so the
   authenticated project view uses one theme, one contrast model, and one
   spacing system. */
body.meshline-os-v2 #agentScreen.marketing-minimal-mode {
  --workflow-accent: #1e7f66;
  --workflow-accent-soft: #e9f5ef;
  --workflow-blue: #4266c8;
  --workflow-blue-soft: #edf1fb;
  --workflow-warning: #a26017;
  --workflow-warning-soft: #fff3df;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workspace-panel {
  min-height: 0;
  padding: 12px;
  overflow: visible;
  border-color: var(--os-line);
  border-radius: 12px;
  background: #f7f7f3;
  box-shadow: var(--os-shadow-sm);
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .workspace-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  grid-template-rows: 38px !important;
  min-height: 58px !important;
  padding-block: 8px;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .workspace-header-actions {
  display: flex !important;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: auto !important;
  min-width: 38px !important;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .workspace-user-shell,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .workspace-user-pill {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .workspace-user-pill {
  display: grid !important;
  place-items: center;
  padding: 4px !important;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workspace-shell[data-layout="marketing-minimal"] {
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 12px;
  align-items: start;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-center-stage,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-output-rail {
  gap: 10px;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-operations-shell {
  gap: 10px;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-panel,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-review-panel,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-published-panel,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workflow-panel {
  padding: 15px 16px;
  overflow: hidden;
  border: 1px solid var(--os-line);
  border-radius: 10px;
  color: var(--os-ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 24, 34, 0.04), 0 8px 22px rgba(15, 24, 34, 0.045);
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-panel {
  border-top: 3px solid #6c87d5;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-review-panel {
  border-top: 3px solid #d3a257;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-published-panel {
  border-top: 3px solid #64a786;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workflow-panel {
  border-top: 3px solid #d3a257;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .panel-head,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head {
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0 0 11px;
  border-bottom: 1px solid var(--os-line-soft);
  background: transparent;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .panel-head h4,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head h4 {
  margin: 2px 0 0;
  color: var(--os-ink);
  font: 720 0.94rem/1.25 "Space Grotesk", sans-serif;
  letter-spacing: -0.018em;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .panel-head .eyebrow,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head .eyebrow {
  color: var(--workflow-accent);
  font-size: 0.62rem;
  font-weight: 820;
  letter-spacing: 0.085em;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions .primary-button,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions .secondary-button,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-empty-actions .primary-button,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-empty-actions .secondary-button {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 0.76rem;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions .primary-button,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-empty-actions .primary-button {
  border-color: #365bc1;
  color: #fff;
  background: linear-gradient(180deg, #5475d5, #3f60be);
  box-shadow: 0 5px 12px rgba(63, 96, 190, 0.18);
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions .secondary-button,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-empty-actions .secondary-button {
  border-color: #cfd3cd;
  color: #35404a;
  background: #fff;
  box-shadow: none;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions .secondary-button:hover,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-empty-actions .secondary-button:hover {
  border-color: #aeb5af;
  background: #f4f5f1;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-queue-empty {
  grid-template-columns: 106px minmax(0, 1fr) max-content;
  grid-template-areas:
    "steps title actions"
    "steps description actions"
    "steps summary actions";
  gap: 6px 16px;
  align-items: center;
  min-height: 112px;
  padding: 14px;
  border: 1px solid #d9ddd7;
  border-radius: 9px;
  color: var(--os-ink);
  background: #f8f9f6;
  box-shadow: none;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-empty-visual {
  grid-area: steps;
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 5px;
  align-self: stretch;
  align-items: center;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-empty-visual span {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #bdc9e8;
  border-radius: 50%;
  color: #38559f;
  background: var(--workflow-blue-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-empty-visual span:not(:last-child)::after {
  position: absolute;
  top: 13px;
  left: 27px;
  width: 7px;
  height: 1px;
  content: "";
  background: #bdc9e8;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-queue-empty > strong {
  grid-area: title;
  align-self: end;
  color: var(--os-ink);
  font-size: 0.94rem;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-queue-empty > span {
  grid-area: description;
  color: var(--os-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-queue-empty-summary {
  grid-area: summary;
  display: flex;
  gap: 16px;
  align-self: start;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-queue-empty-summary span {
  position: relative;
  color: #59656e;
  font-size: 0.68rem;
  font-weight: 720;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-queue-empty-summary span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 6px);
  content: "→";
  color: #9ba49f;
  transform: translateY(-50%);
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-empty-actions {
  grid-area: actions;
  display: grid;
  gap: 6px;
  min-width: 132px;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-review-empty,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-published-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 5px 16px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid #ddd8ca;
  border-radius: 9px;
  color: var(--os-ink);
  background: #fbfaf6;
  box-shadow: none;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-review-empty > strong,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-published-empty > strong {
  grid-column: 1;
  color: var(--os-ink);
  font-size: 0.9rem;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-review-empty > span,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-published-empty > span {
  grid-column: 1;
  color: var(--os-muted);
  font-size: 0.78rem;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-review-empty .agent-queue-empty-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-output-rail .agent-workflow-panel {
  padding: 15px;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-output-rail .panel-head {
  margin-bottom: 10px;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-inline-frequency {
  gap: 7px;
  margin-bottom: 10px;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-inline-frequency-label {
  color: #6a746f;
  font-size: 0.63rem;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-inline-frequency-head strong {
  color: var(--os-ink);
  font-size: 0.8rem;
  line-height: 1.25;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-inline-frequency-button {
  min-height: 34px;
  border: 1px solid #d6d9d3;
  border-radius: 7px;
  color: #34404a;
  background: #f8f8f5;
  font-size: 0.75rem;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-inline-frequency-button:hover,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-inline-frequency-button.active {
  border-color: #9bb5a8;
  color: #225f48;
  background: var(--workflow-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(30, 127, 102, 0.06);
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-schedule-summary {
  gap: 5px;
  padding: 10px;
  border: 1px solid #d9ddd7;
  border-radius: 8px;
  color: #4f5b64;
  background: #f7f8f5;
  font-size: 0.72rem;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-schedule-summary strong,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-schedule-summary .is-live {
  color: #1e7459;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-schedule-summary .is-warning {
  color: #98405a;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-schedule-summary .is-muted {
  color: #737d77;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-auth-quick-grid {
  gap: 7px;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-auth-quick-button {
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid #d8dbd6;
  border-radius: 8px;
  color: var(--os-ink);
  background: #fafaf7;
  box-shadow: none;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-auth-quick-button:hover {
  border-color: #abb4ae;
  background: #f3f5f1;
  transform: translateY(-1px);
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-auth-quick-button.is-missing {
  border-color: #e2b7be;
  background: #fff4f5;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-auth-quick-button.is-optional {
  border-color: #d8dbd6;
  color: #445059;
  background: #f7f8f5;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-auth-quick-button.is-optional .marketing-auth-quick-state {
  color: #737d77;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-auth-quick-label,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-auth-quick-state {
  color: inherit;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-auth-quick-state {
  color: var(--os-muted);
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .pill {
  border-color: #d4d8d2;
  color: #4d595f;
  background: #f5f6f2;
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .pill.live {
  border-color: #a9d2bd;
  color: #236348;
  background: var(--workflow-accent-soft);
}

body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-run-card,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-review-card,
body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-published-card {
  border-color: var(--os-line);
  color: var(--os-ink);
  background: #fff;
  box-shadow: none;
}

/* Desktop operator console — 2026-08-11
   Wide screens prioritize simultaneous context, monitoring, and fast actions.
   Every rule is desktop-scoped so the refined mobile application remains intact. */
.workflow-portfolio-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.45fr) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.workflow-portfolio-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  padding: 5px 9px;
  border: 1px solid var(--os-line-strong);
  border-radius: 8px;
  color: #65727a;
  background: #fff;
}

.workflow-portfolio-search input {
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.workflow-portfolio-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 5px 8px;
  border: 1px solid var(--os-line-strong);
  border-radius: 8px;
  background: #fff;
}

.workflow-portfolio-filter > span {
  color: #68757c;
  font-size: 0.63rem;
  font-weight: 760;
}

.workflow-portfolio-filter select {
  min-height: 30px !important;
  padding: 3px 22px 3px 6px !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 0.72rem;
}

.workflow-portfolio-view,
.report-range-presets {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--os-line);
  border-radius: 8px;
  background: #f1f3ef;
}

.workflow-portfolio-view button,
.report-range-presets button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  color: #5b6870;
  background: transparent;
  box-shadow: none;
  font-size: 0.68rem;
  font-weight: 720;
}

.workflow-portfolio-view button.active,
.report-range-presets button.active {
  color: #174f3d;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 31, 38, 0.08);
}

.workflow-portfolio-result,
.report-range-toolbar > span {
  color: #68757c;
  font-size: 0.68rem;
  white-space: nowrap;
}

.report-range-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.desktop-command-palette,
body.meshline-os-v2 .desktop-sidebar-toggle,
body.meshline-os-v2 .desktop-operator-tools {
  display: none;
}

@media (max-width: 760px) {
  body.meshline-os-v2 .workflow-portfolio-tools {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.meshline-os-v2 .workflow-portfolio-search,
  body.meshline-os-v2 .workflow-portfolio-filter {
    grid-column: 1 / -1;
  }

  body.meshline-os-v2 .workflow-portfolio-result {
    justify-self: end;
  }

  body.meshline-os-v2 .report-range-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  body.meshline-os-v2 .report-range-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.meshline-os-v2 .report-range-presets button {
    min-width: 0;
    padding-inline: 5px;
  }
}

@media (min-width: 1181px) {
  body.meshline-os-v2 {
    --desktop-rail: 264px;
    --desktop-gap: 12px;
  }

  body.meshline-os-v2 .workspace-shell,
  body.meshline-os-v2 .workspace-shell.workspace-shell-inner {
    grid-template-columns: var(--desktop-rail) minmax(0, 1fr);
  }

  body.meshline-os-v2 .workspace-sidebar {
    width: var(--desktop-rail);
    padding: 12px 10px;
    transition: width 180ms ease;
  }

  body.meshline-os-v2 .workspace-brand-card {
    min-height: 58px;
    margin-bottom: 6px;
  }

  body.meshline-os-v2 .workspace-brand-tagline,
  body.meshline-os-v2 .workspace-nav-copy small,
  body.meshline-os-v2 .workspace-pinned-app-copy strong,
  body.meshline-os-v2 .workspace-pinned-app-copy span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  body.meshline-os-v2 .workspace-pinned-list button {
    min-height: 50px;
    padding: 8px;
  }

  body.meshline-os-v2 .desktop-sidebar-toggle {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    margin-bottom: 5px;
    padding: 5px 8px;
    border: 1px solid rgba(151, 178, 211, 0.12);
    border-radius: 7px;
    color: rgba(216, 228, 241, 0.66);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: none;
    text-align: left;
  }

  body.meshline-os-v2 .desktop-sidebar-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.075);
  }

  body.meshline-os-v2 .desktop-sidebar-toggle strong {
    font-size: 0.64rem;
    font-weight: 680;
  }

  body.meshline-os-v2 .desktop-sidebar-toggle kbd,
  body.meshline-os-v2 .desktop-operator-tools kbd,
  body.meshline-os-v2 .desktop-command-palette kbd {
    padding: 2px 5px;
    border: 1px solid rgba(130, 146, 164, 0.24);
    border-radius: 4px;
    color: inherit;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    font: 650 0.55rem/1.2 "Space Grotesk", sans-serif;
  }

  body.meshline-os-v2.workspace-sidebar-collapsed {
    --desktop-rail: 76px;
  }

  body.meshline-os-v2.workspace-sidebar-collapsed .workspace-brand-card {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2.workspace-sidebar-collapsed .workspace-brand-mark {
    margin-inline: auto;
  }

  body.meshline-os-v2.workspace-sidebar-collapsed .workspace-brand-copy,
  body.meshline-os-v2.workspace-sidebar-collapsed .workspace-nav-copy,
  body.meshline-os-v2.workspace-sidebar-collapsed .workspace-sidebar-section,
  body.meshline-os-v2.workspace-sidebar-collapsed .workspace-project-tray,
  body.meshline-os-v2.workspace-sidebar-collapsed .desktop-sidebar-toggle strong,
  body.meshline-os-v2.workspace-sidebar-collapsed .desktop-sidebar-toggle kbd,
  body.meshline-os-v2.workspace-sidebar-collapsed .workspace-pinned-app-copy {
    display: none !important;
  }

  body.meshline-os-v2.workspace-sidebar-collapsed .desktop-sidebar-toggle,
  body.meshline-os-v2.workspace-sidebar-collapsed .workspace-nav-button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 6px;
  }

  body.meshline-os-v2.workspace-sidebar-collapsed .desktop-sidebar-toggle span {
    transform: rotate(180deg);
  }

  body.meshline-os-v2 .workspace-main {
    gap: var(--desktop-gap);
    padding: 0 20px 36px;
  }

  body.meshline-os-v2 .workspace-header {
    grid-template-columns: minmax(170px, 0.65fr) minmax(360px, 1fr) auto;
    min-height: 64px;
    margin-inline: -20px;
    padding-inline: 20px;
  }

  body.meshline-os-v2 .workspace-utility-strip {
    min-height: 42px;
    padding: 4px;
    border-color: #cfd4d0;
    background: #fff;
    box-shadow: 0 3px 12px rgba(21, 32, 39, 0.055);
  }

  body.meshline-os-v2 .workspace-utility-pill {
    min-height: 32px;
    color: #526069;
    background: #f5f6f2;
  }

  body.meshline-os-v2 .workspace-utility-pill span {
    color: #617078;
    font-weight: 730;
  }

  body.meshline-os-v2 .workspace-utility-pill strong {
    color: #172631;
    font-size: 0.69rem;
  }

  body.meshline-os-v2 button.workspace-utility-pill:hover,
  body.meshline-os-v2 button.workspace-utility-pill:focus-visible {
    color: #173f35;
    background: #eaf4ef;
  }

  body.meshline-os-v2 .desktop-operator-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--os-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
  }

  body.meshline-os-v2 .desktop-operator-tools button {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 7px;
    border: 0;
    border-radius: 5px;
    color: #56636b;
    background: transparent;
    box-shadow: none;
  }

  body.meshline-os-v2 .desktop-operator-tools button:hover {
    color: #1d5444;
    background: #edf5f1;
  }

  body.meshline-os-v2 .desktop-operator-tools strong {
    font-size: 0.62rem;
  }

  body.meshline-os-v2 .desktop-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2e9a70;
    box-shadow: 0 0 0 3px rgba(46, 154, 112, 0.12);
  }

  body.meshline-os-v2 .desktop-command-palette:not(.hidden) {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: grid;
    place-items: start center;
    padding-top: min(14vh, 130px);
  }

  body.meshline-os-v2 .desktop-command-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: rgba(7, 14, 24, 0.58);
    backdrop-filter: blur(8px);
  }

  body.meshline-os-v2 .desktop-command-card {
    position: relative;
    width: min(680px, calc(100vw - 64px));
    overflow: hidden;
    border: 1px solid #cfd5d1;
    border-radius: 16px;
    background: #f9faf7;
    box-shadow: 0 34px 100px rgba(6, 14, 24, 0.34);
  }

  body.meshline-os-v2 .desktop-command-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 20px 12px;
  }

  body.meshline-os-v2 .desktop-command-head span {
    color: #2f7b63;
    font-size: 0.61rem;
    font-weight: 820;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.meshline-os-v2 .desktop-command-head h2 {
    margin: 3px 0 0;
    color: #172631;
    font-size: 1.2rem;
  }

  body.meshline-os-v2 .desktop-command-search {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin: 0 14px 10px;
    padding: 7px 10px;
    border: 1px solid #aebbb5;
    border-radius: 10px;
    color: #526069;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(40, 189, 213, 0.08);
  }

  body.meshline-os-v2 .desktop-command-search input {
    min-height: 34px;
    padding: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    font-size: 0.92rem;
  }

  body.meshline-os-v2 .desktop-command-list {
    display: grid;
    gap: 3px;
    max-height: 430px;
    padding: 4px 10px 12px;
    overflow: auto;
  }

  body.meshline-os-v2 .desktop-command-list button {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 9px 11px;
    border: 0;
    border-radius: 8px;
    color: #26343e;
    background: transparent;
    box-shadow: none;
    text-align: left;
  }

  body.meshline-os-v2 .desktop-command-list button:hover,
  body.meshline-os-v2 .desktop-command-list button:focus-visible {
    outline: 0;
    background: #eaf4ef;
  }

  body.meshline-os-v2 .desktop-command-list button span {
    font-size: 0.82rem;
    font-weight: 760;
  }

  body.meshline-os-v2 .desktop-command-list button small {
    color: #6d797f;
    font-size: 0.72rem;
  }

  body.meshline-os-v2 .desktop-command-card > footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #dde1dd;
    color: #6d787e;
    background: #f1f3ef;
    font-size: 0.65rem;
  }

  /* Home becomes an operator cockpit instead of a tall marketing hero. */
  body.meshline-os-v2 #dashboardScreen .mesh-os-home {
    padding: 18px;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-hero-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
    min-height: 240px;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-hero-copy {
    padding: 4px 6px 2px;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-hero-copy h2 {
    max-width: 720px;
    font-size: clamp(2rem, 3vw, 3.35rem);
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-flow-visual {
    min-height: 226px;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-live-deck {
    margin-top: 12px;
    padding: 13px 15px;
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-home-support-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  }

  body.meshline-os-v2 #dashboardScreen .mesh-os-launchpad-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Project hubs use the horizontal space for inventory rather than empty canvas. */
  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card,
  body.meshline-os-v2 #agentScreen .marketing-project-card {
    min-height: 250px;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workspace-shell[data-layout="marketing-minimal"] {
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 14px;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-output-rail {
    position: sticky;
    top: 78px;
    max-height: calc(100dvh - 96px);
    overflow: auto;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-operations-shell {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-published-panel {
    margin-top: 0;
  }

  /* Operations is a light, legible control surface with a persistent inspector. */
  body.meshline-os-v2 #automationScreen .workspace-aux-panel,
  body.meshline-os-v2 #automationScreen .workspace-embedded-grid,
  body.meshline-os-v2 #automationScreen .view-panel,
  body.meshline-os-v2 #automationScreen .content {
    color: var(--os-ink) !important;
    background: transparent !important;
  }

  body.meshline-os-v2 #automationScreen .workspace-embedded-grid {
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 14px;
  }

  body.meshline-os-v2 #automationScreen .workspace-embedded-grid > .content {
    grid-column: 1;
    grid-row: 1;
  }

  body.meshline-os-v2 #automationScreen .workspace-embedded-grid > .sidebar {
    position: sticky;
    top: 78px;
    grid-column: 2;
    grid-row: 1;
    max-height: calc(100dvh - 96px);
    overflow: auto;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card,
  body.meshline-os-v2 #automationScreen .automation-setup-shell,
  body.meshline-os-v2 #automationScreen .automation-setup-card,
  body.meshline-os-v2 #automationScreen .automation-inventory-shell,
  body.meshline-os-v2 #automationScreen .webhook-inventory-shell,
  body.meshline-os-v2 #automationScreen .stack-item,
  body.meshline-os-v2 #automationScreen .info-card {
    border-color: var(--os-line) !important;
    color: var(--os-ink) !important;
    background: #fff !important;
    box-shadow: var(--os-shadow-sm) !important;
  }

  body.meshline-os-v2 #automationScreen h3,
  body.meshline-os-v2 #automationScreen h4,
  body.meshline-os-v2 #automationScreen strong,
  body.meshline-os-v2 #automationScreen p,
  body.meshline-os-v2 #automationScreen span,
  body.meshline-os-v2 #automationScreen .stack-item div {
    color: inherit;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
  }

  body.meshline-os-v2 #automationScreen .automation-setup-glance {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Outcomes behaves like a dashboard, with one compact filter toolbar. */
  body.meshline-os-v2 #reportsScreen .workspace-aux-panel,
  body.meshline-os-v2 #reportsScreen .view-panel.active {
    color: var(--os-ink) !important;
    background: #f6f7f3 !important;
  }

  body.meshline-os-v2 #reportsScreen .workspace-aux-panel {
    padding: 12px;
  }

  body.meshline-os-v2 #reportsScreen .signals-hero-shell,
  body.meshline-os-v2 #reportsScreen .signals-insight-card,
  body.meshline-os-v2 #reportsScreen .signals-detail-card,
  body.meshline-os-v2 #reportsScreen #reportsFilterForm .input-card,
  body.meshline-os-v2 #reportsScreen #reportsFilterForm .info-card {
    border: 1px solid var(--os-line) !important;
    color: var(--os-ink) !important;
    background: #fff !important;
    box-shadow: var(--os-shadow-sm) !important;
  }

  body.meshline-os-v2 #reportsScreen h3,
  body.meshline-os-v2 #reportsScreen h4,
  body.meshline-os-v2 #reportsScreen strong,
  body.meshline-os-v2 #reportsScreen p,
  body.meshline-os-v2 #reportsScreen span {
    color: inherit;
  }

  body.meshline-os-v2 #reportsScreen .signals-hero-shell {
    min-height: 112px;
    padding: 16px 18px;
  }

  body.meshline-os-v2 #reportsScreen #reportsFilterForm {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) max-content;
    align-items: end;
    gap: 8px;
    margin-bottom: 12px !important;
  }

  body.meshline-os-v2 #reportsScreen #reportsFilterForm .input-card,
  body.meshline-os-v2 #reportsScreen #reportsFilterForm .info-card {
    min-height: 72px;
    margin: 0;
    padding: 9px 10px !important;
  }

  body.meshline-os-v2 #reportsScreen #reportsFilterForm .primary-button {
    min-width: 132px;
    min-height: 44px;
  }

  body.meshline-os-v2 #reportsScreen .signals-glance-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.meshline-os-v2 #reportsScreen .signals-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.meshline-os-v2 #reportsScreen #reportLogsList {
    max-height: 430px;
    overflow: auto;
  }

  /* Desktop creation uses a broad form canvas and a visible, sticky progress rail. */
  body.meshline-os-v2 .create-module-modal-card {
    width: min(1100px, calc(100vw - 80px));
    max-width: 1100px;
    height: min(860px, calc(100dvh - 70px));
    max-height: calc(100dvh - 70px);
    padding: 0;
    overflow: hidden;
  }

  body.meshline-os-v2 .create-module-modal-card > .panel-head {
    position: sticky;
    top: 0;
    z-index: 4;
    margin: 0;
    padding: 16px 18px;
    border-bottom: 1px solid var(--os-line);
    background: rgba(255, 255, 255, 0.96);
  }

  body.meshline-os-v2 .create-module-form {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 10px;
    height: calc(100% - 72px);
    padding: 14px 18px 86px;
    overflow: auto;
  }

  body.meshline-os-v2 .create-module-form > .input-card {
    margin: 0;
  }

  body.meshline-os-v2 .create-module-form > .create-module-description-field {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  body.meshline-os-v2 .create-module-description-field textarea {
    min-height: 118px;
  }

  body.meshline-os-v2 .create-marketing-project-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body.meshline-os-v2 .create-marketing-stepper,
  body.meshline-os-v2 .create-marketing-step-panel,
  body.meshline-os-v2 .create-marketing-project-fields > .builder-onboarding-callout,
  body.meshline-os-v2 .create-marketing-project-fields > .builder-onboarding-inline-action,
  body.meshline-os-v2 .create-marketing-project-fields > .agent-plan-summary {
    grid-column: 1 / -1;
  }

  body.meshline-os-v2 .create-marketing-stepper {
    position: sticky;
    top: -14px;
    z-index: 3;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 8px;
    border: 1px solid var(--os-line);
    border-radius: 10px;
    background: rgba(248, 249, 246, 0.96);
    backdrop-filter: blur(12px);
  }

  body.meshline-os-v2 .create-marketing-step {
    min-height: 44px;
    color: #5b6870;
    background: transparent;
  }

  body.meshline-os-v2 .create-marketing-step.active {
    color: #174f3d;
    background: #e8f5ef;
  }

  body.meshline-os-v2 .create-module-form > .register-actions {
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 12px 18px;
    border-top: 1px solid var(--os-line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
  }

  /* Compact mode is opt-in and preserves target size while increasing information density. */
  body.meshline-os-v2.desktop-density-compact {
    --desktop-gap: 8px;
  }

  body.meshline-os-v2.desktop-density-compact .workspace-main {
    padding-bottom: 20px;
  }

  body.meshline-os-v2.desktop-density-compact .workspace-panel,
  body.meshline-os-v2.desktop-density-compact .module-panel,
  body.meshline-os-v2.desktop-density-compact .info-card {
    padding: 12px;
  }

  body.meshline-os-v2.desktop-density-compact #dashboardScreen .mesh-os-flow-visual {
    min-height: 190px;
  }

  body.meshline-os-v2.desktop-density-compact #dashboardScreen .mesh-os-launch-card p,
  body.meshline-os-v2.desktop-density-compact .workspace-sidebar-section .helper-text {
    display: none;
  }

  body.meshline-os-v2.desktop-density-compact .panel-head,
  body.meshline-os-v2.desktop-density-compact .workspace-panel-head {
    margin-bottom: 8px;
  }
}

@media (min-width: 1500px) {
  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.meshline-os-v2 #dashboardScreen .workspace-home-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.55fr);
  }
}

@media (max-width: 1120px) {
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workspace-shell[data-layout="marketing-minimal"] {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-output-rail {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-output-rail .agent-workflow-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
    gap: 12px;
  }
}

@media (max-width: 760px) {
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workspace-panel {
    padding: 8px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-panel,
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-review-panel,
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-published-panel,
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-workflow-panel {
    padding: 12px;
    border-radius: 9px;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head {
    align-items: stretch;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions .primary-button,
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions .secondary-button,
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-panel-head-actions .pill {
    width: 100%;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-queue-empty {
    grid-template-columns: 1fr;
    grid-template-areas:
      "steps"
      "title"
      "description"
      "summary"
      "actions";
    gap: 9px;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-empty-visual {
    align-self: auto;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-queue-empty-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-review-empty,
  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-published-empty {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .marketing-review-empty .agent-queue-empty-actions {
    grid-column: 1;
    grid-row: auto;
  }

  body.meshline-os-v2 #agentScreen.marketing-minimal-mode .agent-output-rail .agent-workflow-panel {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Authoritative wide-screen finish. Keep this block last in the cascade. */
@media (min-width: 1181px) {
  body.meshline-os-v2 #meshlineUxLauncher,
  body.meshline-os-v2 #appLanguageSwitch {
    display: none !important;
  }

  body.meshline-os-v2.workflow-portfolio-list-view #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2.workflow-portfolio-list-view #agentScreen .workspace-project-grid {
    grid-template-columns: 1fr !important;
  }

  body.meshline-os-v2.workflow-portfolio-list-view #agentScreen .agent-studio-module-card {
    min-height: 0 !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-setting-row,
  body.meshline-os-v2 #agentScreen .agent-studio-setting-row--cta {
    border: 1px solid #d9ddd8 !important;
    color: #26343e !important;
    background: #f5f6f2 !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-setting-row:hover,
  body.meshline-os-v2 #agentScreen button.agent-studio-setting-row:focus-visible {
    border-color: #a8beb4 !important;
    color: #174f3d !important;
    background: #eaf4ef !important;
    outline: 0;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-setting-row strong,
  body.meshline-os-v2 #agentScreen .agent-studio-setting-row p,
  body.meshline-os-v2 #agentScreen .agent-studio-setting-row span {
    color: inherit !important;
  }

  body.meshline-os-v2 .create-module-modal-card {
    position: relative;
  }

  body.meshline-os-v2 .create-marketing-step,
  body.meshline-os-v2 .create-marketing-step strong,
  body.meshline-os-v2 .create-marketing-step span {
    color: #66736f !important;
  }

  body.meshline-os-v2 .create-marketing-step.active,
  body.meshline-os-v2 .create-marketing-step.active strong,
  body.meshline-os-v2 .create-marketing-step.active span {
    color: #174f3d !important;
  }

  body.meshline-os-v2 .create-marketing-step-intro p {
    color: #66736f !important;
  }

  body.meshline-os-v2 .workspace-utility-strip {
    border-color: #cfd4d0 !important;
    background: #fff !important;
    box-shadow: 0 3px 12px rgba(21, 32, 39, 0.055) !important;
  }

  body.meshline-os-v2 .workspace-utility-pill,
  body.meshline-os-v2 #automationScreen .workspace-utility-pill {
    border: 0 !important;
    color: #526069 !important;
    background: #f3f5f1 !important;
    box-shadow: none !important;
  }

  body.meshline-os-v2 .workspace-utility-pill span {
    display: block !important;
    color: #617078 !important;
    font-size: 0.56rem !important;
    font-weight: 730 !important;
  }

  body.meshline-os-v2 .workspace-utility-pill strong {
    color: #172631 !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card,
  body.meshline-os-v2 #agentScreen .marketing-project-card {
    min-height: 220px !important;
    border: 1px solid #d6dad5 !important;
    color: #1d2b35 !important;
    background: #fff !important;
    box-shadow: 0 9px 28px rgba(20, 31, 38, 0.07) !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card h3,
  body.meshline-os-v2 #agentScreen .agent-studio-module-card h4,
  body.meshline-os-v2 #agentScreen .agent-studio-module-card strong,
  body.meshline-os-v2 #agentScreen .agent-studio-module-card p,
  body.meshline-os-v2 #agentScreen .agent-studio-module-card span,
  body.meshline-os-v2 #agentScreen .marketing-project-card h3,
  body.meshline-os-v2 #agentScreen .marketing-project-card h4,
  body.meshline-os-v2 #agentScreen .marketing-project-card strong,
  body.meshline-os-v2 #agentScreen .marketing-project-card p,
  body.meshline-os-v2 #agentScreen .marketing-project-card span {
    color: inherit !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-stat,
  body.meshline-os-v2 #agentScreen .agent-studio-module-summary-row,
  body.meshline-os-v2 #agentScreen .agent-studio-module-status {
    border-color: #e0e3de !important;
    color: #53616a !important;
    background: #f5f6f2 !important;
  }

  body.meshline-os-v2 #agentScreen .agent-studio-module-card--create {
    border-style: dashed !important;
    color: #315f50 !important;
    background: #eef6f1 !important;
  }

  body.meshline-os-v2 #automationScreen .workspace-aux-panel,
  body.meshline-os-v2 #automationScreen .workspace-embedded-grid,
  body.meshline-os-v2 #automationScreen .view-panel,
  body.meshline-os-v2 #automationScreen .content,
  body.meshline-os-v2 #reportsScreen .workspace-aux-panel,
  body.meshline-os-v2 #reportsScreen .view-panel.active {
    color: #1c2a34 !important;
    background: #f6f7f3 !important;
  }

  body.meshline-os-v2 #automationScreen .sidebar-card,
  body.meshline-os-v2 #automationScreen .automation-setup-shell,
  body.meshline-os-v2 #automationScreen .automation-setup-card,
  body.meshline-os-v2 #automationScreen .stack-item,
  body.meshline-os-v2 #reportsScreen .signals-hero-shell,
  body.meshline-os-v2 #reportsScreen .signals-insight-card,
  body.meshline-os-v2 #reportsScreen .signals-detail-card,
  body.meshline-os-v2 #reportsScreen #reportsFilterForm .input-card,
  body.meshline-os-v2 #reportsScreen #reportsFilterForm .info-card {
    border-color: #d9ddd8 !important;
    color: #1c2a34 !important;
    background: #fff !important;
    box-shadow: 0 5px 18px rgba(20, 31, 38, 0.06) !important;
  }
}

@media (min-width: 1181px) and (max-width: 1399px) {
  body.meshline-os-v2 .desktop-operator-tools button strong,
  body.meshline-os-v2 .desktop-operator-tools [data-desktop-command-open] kbd {
    display: none;
  }

  body.meshline-os-v2 .desktop-operator-tools [data-desktop-command-open] strong {
    display: block;
  }

  body.meshline-os-v2 .workspace-utility-pill {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
  }
}

@media (min-width: 1400px) {
  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1760px) {
  body.meshline-os-v2 #agentScreen .agent-studio-module-catalog,
  body.meshline-os-v2 #agentScreen .workspace-project-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
