/* Morgan's Operations command-center visual direction, wired to sourced firm data. */

.operations-overhead-page {
    width: 100%;
    max-width: var(--advisor-content-width);
    margin: 0 auto;
    padding-bottom: var(--advisor-space-10);
    overflow-x: clip;
}

.operations-subnav {
    overflow-x: auto;
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-pill);
    background: var(--advisor-color-surface);
    box-shadow: var(--advisor-shadow-subtle);
    scrollbar-width: none;
}

.operations-subnav::-webkit-scrollbar { display: none; }

.operations-subnav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    width: max-content;
    min-width: 100%;
    margin: 0;
    padding: 5px;
    list-style: none;
}

.operations-subnav-btn {
    min-height: 36px;
    padding: 8px 13px;
    border: 0;
    border-radius: var(--advisor-radius-pill);
    background: transparent;
    color: var(--advisor-color-muted);
    font: 600 0.8rem/1 var(--advisor-font-body);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--advisor-transition), color var(--advisor-transition), box-shadow var(--advisor-transition);
}

.operations-subnav-btn:hover,
.operations-subnav-btn:focus-visible {
    color: var(--advisor-color-ink);
    background: var(--advisor-color-surface-accent);
}

.operations-subnav-btn.active {
    color: var(--advisor-color-ink);
    background: var(--advisor-color-surface-solid);
    box-shadow: 0 1px 4px rgba(16, 23, 20, 0.12);
}

.operations-vital-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--advisor-space-3);
}

.operations-vital-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--advisor-space-1);
    min-width: 0;
    padding: var(--advisor-space-4);
    overflow: hidden;
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-panel);
    background: var(--advisor-color-surface);
    box-shadow: var(--advisor-shadow-subtle);
}

.operations-vital-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--advisor-color-border-strong);
    content: "";
}

.operations-vital-card.is-positive::before { background: var(--advisor-color-positive); }
.operations-vital-card.is-warning::before { background: var(--advisor-color-accent); }
.operations-vital-card.is-attention::before { background: var(--advisor-color-negative); }

.operations-vital-label {
    color: var(--advisor-color-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.operations-vital-value {
    color: var(--advisor-color-ink);
    font: 700 1.35rem/1.2 var(--advisor-font-mono);
}

.operations-vital-meta,
.operations-scorecard-subtitle,
.operations-panel-note,
.operations-generated-at {
    color: var(--advisor-color-subtle);
    font-size: 0.8rem;
}

.operations-tab-panel { min-width: 0; }

.operations-scorecard-panel,
.operations-workload-card,
.operations-feed-card {
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-feature);
    background: var(--advisor-color-surface-solid);
    box-shadow: var(--advisor-shadow-panel);
}

.operations-scorecard-panel { padding: var(--advisor-space-6); }

.operations-scorecard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--advisor-space-4);
    margin-bottom: var(--advisor-space-5);
}

.operations-scorecard-title,
.operations-workload-card h2,
.operations-availability h2,
.operations-empty-domain h2 {
    margin: 0;
    color: var(--advisor-color-ink);
    font-family: var(--advisor-font-display);
}

.operations-scorecard-title { font-size: 1.3rem; }
.operations-scorecard-subtitle { max-width: 74ch; margin: var(--advisor-space-1) 0 0; }

.operations-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-panel);
}

.operations-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
    background: var(--advisor-color-surface-solid);
    font-size: 0.84rem;
    text-align: left;
}

.operations-table th {
    padding: var(--advisor-space-3) var(--advisor-space-4);
    border-bottom: 1px solid var(--advisor-color-border);
    background: var(--advisor-color-surface-muted);
    color: var(--advisor-color-subtle);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.operations-table td {
    padding: var(--advisor-space-4);
    border-bottom: 1px solid var(--advisor-color-border);
    color: var(--advisor-color-ink);
    vertical-align: middle;
}

.operations-table tr:last-child td { border-bottom: 0; }
.operations-table tbody tr:hover td { background: var(--advisor-color-surface-accent); }
.operations-table td small { display: block; margin-top: 3px; color: var(--advisor-color-subtle); }
.operations-table .num { text-align: right; font-family: var(--advisor-font-mono); }

.operations-row-action,
.operations-retry,
.operations-dossier-close {
    border: 1px solid var(--advisor-color-border-strong);
    border-radius: var(--advisor-radius-control);
    background: var(--advisor-color-surface-solid);
    color: var(--advisor-color-ink);
    font: 700 0.78rem/1 var(--advisor-font-body);
    cursor: pointer;
}

.operations-row-action { padding: 7px 10px; white-space: nowrap; }
.operations-retry { display: block; margin: var(--advisor-space-4) auto 0; padding: 10px 14px; }
.operations-row-action:hover,
.operations-row-action:focus-visible,
.operations-retry:hover,
.operations-retry:focus-visible { background: var(--advisor-color-surface-accent); }

.operations-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--advisor-radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.operations-badge--positive { background: var(--advisor-color-surface-positive); color: var(--advisor-color-positive-strong); }
.operations-badge--critical { background: var(--advisor-color-surface-negative); color: var(--advisor-color-negative); }
.operations-badge--info { background: var(--advisor-color-surface-info); color: var(--advisor-color-ink); }
.operations-badge--muted { background: var(--advisor-color-surface-muted); color: var(--advisor-color-muted); }

.operations-workload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--advisor-space-4);
    margin-top: var(--advisor-space-4);
}

.operations-workload-card { padding: var(--advisor-space-5); }
.operations-workload-card h2 { font-size: 1.12rem; }
.operations-workload-card > .operations-row-action { margin-top: var(--advisor-space-4); }

.operations-workload-card dl,
.operations-rollup-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: var(--advisor-space-4) 0 0;
    overflow: hidden;
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-panel);
    background: var(--advisor-color-border);
}

.operations-workload-card dl > div,
.operations-rollup-list > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: var(--advisor-space-3);
    background: var(--advisor-color-surface-solid);
}

.operations-workload-card dt,
.operations-rollup-list dt { color: var(--advisor-color-subtle); font-size: 0.72rem; }
.operations-workload-card dd,
.operations-rollup-list dd { margin: 0; color: var(--advisor-color-ink); font: 700 0.95rem/1.25 var(--advisor-font-mono); overflow-wrap: anywhere; }

.operations-availability {
    display: flex;
    align-items: flex-start;
    gap: var(--advisor-space-3);
    padding: var(--advisor-space-4);
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-panel);
    background: var(--advisor-color-surface-muted);
}

.operations-availability.is-partial { border-color: color-mix(in srgb, var(--advisor-color-accent) 45%, var(--advisor-color-border)); background: var(--advisor-color-surface-accent); }
.operations-availability-mark { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: var(--advisor-color-muted); }
.operations-availability.is-partial .operations-availability-mark { background: var(--advisor-color-accent); }
.operations-availability h2 { font-size: 1rem; }
.operations-availability p,
.operations-empty-domain p { margin: var(--advisor-space-1) 0 0; color: var(--advisor-color-muted); }
.operations-empty-domain { margin-top: var(--advisor-space-4); text-align: center; }

.operations-dossier-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    justify-content: flex-end;
    background: rgba(16, 23, 20, 0.45);
    backdrop-filter: blur(4px);
}

.operations-dossier-drawer {
    display: flex;
    flex-direction: column;
    width: min(580px, 100%);
    height: 100%;
    overflow-y: auto;
    border-left: 1px solid var(--advisor-color-border-strong);
    background: var(--advisor-color-surface-solid);
    box-shadow: var(--advisor-shadow-modal);
    animation: operations-slide-in 180ms ease-out;
}

@keyframes operations-slide-in { from { transform: translateX(100%); } }

.operations-dossier-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--advisor-space-4);
    padding: var(--advisor-space-6);
    border-bottom: 1px solid var(--advisor-color-border);
    background: var(--advisor-color-surface-muted);
}

.operations-dossier-header h2 { margin: 0; color: var(--advisor-color-ink); font-family: var(--advisor-font-display); }
.operations-dossier-header p:last-child { margin: var(--advisor-space-1) 0 0; color: var(--advisor-color-muted); }
.operations-dossier-close { width: 34px; height: 34px; padding: 0; font-size: 1.25rem; }
.operations-dossier-body { display: grid; gap: var(--advisor-space-6); padding: var(--advisor-space-6); }
.operations-dossier-section h3 { margin: 0; color: var(--advisor-color-ink); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.operations-dossier-status { display: flex; align-items: center; gap: var(--advisor-space-3); margin-top: var(--advisor-space-3); color: var(--advisor-color-muted); }
.operations-generated-at { margin: 0; text-align: right; }

/* --- Robinhood Legend Drag-and-Drop Operations Dashboard --- */

.operations-legend-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--advisor-space-5);
    width: 100%;
    min-width: 0;
    container: operations-dashboard / inline-size;
}

.operations-legend-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--advisor-space-4);
    padding: var(--advisor-space-4) var(--advisor-space-5);
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-feature);
    background: var(--advisor-color-surface-solid);
    box-shadow: var(--advisor-shadow-subtle);
}

.operations-legend-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--advisor-space-3);
}

.operations-legend-dashboard .operations-custom-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--advisor-color-border-strong);
    border-radius: var(--advisor-radius-pill);
    background: var(--advisor-color-surface-solid);
    color: var(--advisor-color-ink);
    font: 700 0.82rem/1 var(--advisor-font-body);
    cursor: pointer;
    transition: all var(--advisor-transition);
}

.operations-custom-btn:hover,
.operations-custom-btn:focus-visible {
    background: var(--advisor-color-surface-accent);
    border-color: var(--advisor-color-ink);
}

.operations-custom-btn.is-active {
    background: var(--advisor-color-ink);
    color: #ffffff;
    border-color: var(--advisor-color-ink);
}

.operations-custom-btn.is-secondary {
    color: var(--advisor-color-muted);
    font-weight: 600;
}

.operations-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--advisor-color-surface-muted);
    color: var(--advisor-color-ink);
    font-size: 0.72rem;
    font-weight: 800;
}

.operations-custom-btn.is-active .operations-pill-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.operations-legend-stage {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--advisor-space-5);
    position: relative;
    transition: gap 160ms ease;
}

.operations-legend-stage.has-palette-open {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
}

.operations-widgets-canvas {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--advisor-space-5);
    align-items: start;
}

.operations-canvas-empty-state {
    grid-column: 1 / -1;
    padding: var(--advisor-space-8);
    border: 2px dashed var(--advisor-color-border-strong);
    border-radius: var(--advisor-radius-feature);
    text-align: center;
    background: var(--advisor-color-surface-muted);
}

.operations-canvas-empty-state h3 {
    margin: 0;
    color: var(--advisor-color-ink);
    font-family: var(--advisor-font-display);
}

.operations-canvas-empty-state p {
    margin: var(--advisor-space-2) 0 var(--advisor-space-4);
    color: var(--advisor-color-muted);
}

/* Custom Widget Card & Sizing */
.operations-custom-widget {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    container: operations-widget / inline-size;
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-feature);
    background: var(--advisor-color-surface-solid);
    box-shadow: var(--advisor-shadow-panel);
    transition: box-shadow var(--advisor-transition), border-color var(--advisor-transition), transform var(--advisor-transition);
}

.operations-custom-widget.is-full,
.operations-custom-widget.is-full-width {
    grid-column: 1 / -1;
}

.operations-custom-widget.is-wide {
    grid-column: span 2;
}

.operations-custom-widget.is-compact,
.operations-custom-widget.is-half-width {
    grid-column: span 1;
}

.operations-custom-widget.is-dragging {
    opacity: 0.35;
    transform: scale(0.97);
    border: 2px dashed var(--advisor-color-accent);
}

.operations-custom-widget.is-drag-over {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), var(--advisor-shadow-panel);
    transform: translateY(-2px);
}

.operations-widget-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: var(--advisor-space-3);
    padding: var(--advisor-space-4) var(--advisor-space-5);
    border-bottom: 1px solid var(--advisor-color-border);
    background: var(--advisor-color-surface-muted);
    border-top-left-radius: var(--advisor-radius-feature);
    border-top-right-radius: var(--advisor-radius-feature);
}

.operations-custom-widget.is-collapsed .operations-widget-header {
    border-bottom: 0;
    border-radius: var(--advisor-radius-feature);
}

.operations-widget-title-block {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.operations-widget-title-block > div {
    min-width: 0;
}

.operations-widget-drag-handle {
    font-size: 1.1rem;
    color: var(--advisor-color-subtle);
    cursor: grab;
    flex: 0 0 auto;
    user-select: none;
    padding: 2px 4px;
    border-radius: 4px;
}

.operations-widget-drag-handle:active {
    cursor: grabbing;
}

.operations-widget-category-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--advisor-color-subtle);
}

.operations-legend-dashboard .operations-widget-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--advisor-color-ink);
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
}

.operations-widget-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.operations-legend-dashboard .operations-widget-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 32px;
    min-height: 32px;
    padding: 6px 9px;
    white-space: nowrap;
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-control);
    background: var(--advisor-color-surface-solid);
    color: var(--advisor-color-muted);
    font: 700 0.72rem/1 var(--advisor-font-mono);
    cursor: pointer;
    transition: all var(--advisor-transition);
}

.operations-widget-btn.is-size-btn {
    color: var(--advisor-color-ink);
    background: var(--advisor-color-surface-accent);
}

.operations-widget-btn:hover,
.operations-widget-btn:focus-visible {
    background: var(--advisor-color-surface-accent);
    color: var(--advisor-color-ink);
    border-color: var(--advisor-color-border-strong);
}

.operations-widget-btn.is-remove:hover {
    background: var(--advisor-color-surface-negative);
    color: var(--advisor-color-negative);
    border-color: var(--advisor-color-negative);
}

.operations-widget-body {
    min-width: 0;
    padding: var(--advisor-space-5);
}

/* Palette Drawer */
.operations-palette-drawer {
    display: none;
    flex-direction: column;
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-feature);
    background: var(--advisor-color-surface-solid);
    box-shadow: var(--advisor-shadow-panel);
    overflow: hidden;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.operations-palette-drawer.is-open {
    display: flex;
}

.operations-palette-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--advisor-space-3);
    padding: var(--advisor-space-4) var(--advisor-space-5);
    border-bottom: 1px solid var(--advisor-color-border);
    background: var(--advisor-color-surface-muted);
}

.operations-palette-title {
    margin: 0;
    font-size: 1.05rem;
    font-family: var(--advisor-font-display);
    color: var(--advisor-color-ink);
}

.operations-palette-sub {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: var(--advisor-color-muted);
}

.operations-palette-close {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-control);
    background: var(--advisor-color-surface);
    color: var(--advisor-color-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.operations-palette-close:hover {
    background: var(--advisor-color-surface-accent);
    color: var(--advisor-color-ink);
}

.operations-palette-content {
    padding: var(--advisor-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--advisor-space-3);
    max-height: 520px;
    overflow-y: auto;
}

.operations-palette-hint {
    margin: 0;
    font-size: 0.75rem;
    color: var(--advisor-color-subtle);
    line-height: 1.4;
}

.operations-palette-list {
    display: flex;
    flex-direction: column;
    gap: var(--advisor-space-3);
}

.operations-palette-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--advisor-space-3);
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-panel);
    background: var(--advisor-color-surface);
    cursor: grab;
    transition: all var(--advisor-transition);
}

.operations-palette-item:hover {
    border-color: var(--advisor-color-border-strong);
    background: var(--advisor-color-surface-accent);
}

.operations-palette-item.is-active {
    border-color: color-mix(in srgb, #10b981 35%, var(--advisor-color-border));
    background: color-mix(in srgb, var(--advisor-color-surface-positive) 15%, var(--advisor-color-surface));
    cursor: default;
}

.operations-palette-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.operations-palette-item-top strong {
    display: block;
    font-size: 0.82rem;
    color: var(--advisor-color-ink);
}

.operations-palette-item-desc {
    margin: 0;
    font-size: 0.72rem;
    color: var(--advisor-color-muted);
    line-height: 1.35;
}

.palette-toggle-btn {
    padding: 4px 10px;
    border: 1px solid var(--advisor-color-border-strong);
    border-radius: var(--advisor-radius-pill);
    font: 700 0.7rem/1 var(--advisor-font-body);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--advisor-transition);
}

.palette-toggle-btn.is-add {
    background: var(--advisor-color-surface-solid);
    color: var(--advisor-color-ink);
}

.palette-toggle-btn.is-add:hover {
    background: var(--advisor-color-ink);
    color: #ffffff;
}

.palette-toggle-btn.is-active {
    background: var(--advisor-color-surface-positive);
    color: var(--advisor-color-positive-strong);
    border-color: transparent;
}

.palette-toggle-btn.is-active:hover {
    background: var(--advisor-color-surface-negative);
    color: var(--advisor-color-negative);
}

.operations-palette-footer {
    padding: var(--advisor-space-3) var(--advisor-space-4);
    border-top: 1px solid var(--advisor-color-border);
    background: var(--advisor-color-surface-muted);
}

.operations-palette-reset-btn {
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--advisor-color-border-strong);
    border-radius: var(--advisor-radius-control);
    background: transparent;
    color: var(--advisor-color-muted);
    font: 600 0.75rem/1 var(--advisor-font-body);
    cursor: pointer;
}

.operations-palette-reset-btn:hover {
    background: var(--advisor-color-surface-accent);
    color: var(--advisor-color-ink);
}

/* =========================================================================
   Visual Graphs Styling (Robinhood Legend Aesthetics)
   ========================================================================= */

/* 1. Sparklines Grid */
.operations-sparkline-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--advisor-space-4);
}

.operations-sparkline-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: var(--advisor-space-4);
    border: 1px solid var(--advisor-color-border);
    border-radius: var(--advisor-radius-panel);
    background: var(--advisor-color-surface);
    box-shadow: var(--advisor-shadow-subtle);
}

.sparkline-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sparkline-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--advisor-color-muted);
}

.sparkline-badge {
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
}

.sparkline-badge.is-positive { background: rgba(16, 185, 129, 0.15); color: #059669; }
.sparkline-badge.is-cyan { background: rgba(6, 182, 212, 0.15); color: #0891b2; }
.sparkline-badge.is-attention { background: rgba(244, 63, 94, 0.15); color: #e11d48; }
.sparkline-badge.is-warning { background: rgba(245, 158, 11, 0.15); color: #d97706; }

.sparkline-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.sparkline-value {
    font: 800 1.4rem/1 var(--advisor-font-mono);
    color: var(--advisor-color-ink);
}

.sparkline-value small {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--advisor-color-muted);
}

.sparkline-svg-box {
    width: 100px;
    height: 36px;
    flex-shrink: 0;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.sparkline-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--advisor-color-subtle);
}

.sparkline-trend-pill {
    font-weight: 700;
    color: #10b981;
}

.sparkline-trend-pill.is-cyan { color: #06b6d4; }
.sparkline-trend-pill.is-blue { color: #3b82f6; }
.sparkline-trend-pill.is-purple { color: #a855f7; }

/* 2. Flow Dynamics Chart */
.operations-chart-container {
    display: flex;
    flex-direction: column;
    gap: var(--advisor-space-3);
    width: 100%;
}

.operations-flow-svg {
    display: block;
    width: 100%;
    min-width: 420px;
    height: auto;
    overflow: visible;
}

.flow-bar {
    transition: all 0.25s ease;
    cursor: pointer;
}

.flow-bar-group:hover .flow-bar {
    filter: brightness(1.1) drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.flow-peak-dot {
    filter: drop-shadow(0 0 6px currentColor);
}

.operations-chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--advisor-space-5);
    font-size: 0.75rem;
    color: var(--advisor-color-muted);
    padding-top: var(--advisor-space-2);
}

.operations-chart-legend .legend-item {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.legend-swatch {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-swatch.is-line {
    width: 16px;
    height: 3px;
    background: #10b981;
    border-radius: 2px;
}

.legend-item.is-pos .legend-swatch { background: linear-gradient(135deg, #10b981, #06b6d4); }
.legend-item.is-neg .legend-swatch { background: linear-gradient(135deg, #fb7185, #e11d48); }

/* 3. Donut Chart */
.operations-donut-widget-body {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: var(--advisor-space-4);
    flex-wrap: wrap;
}

.donut-chart-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-svg {
    overflow: visible;
}

.donut-slice {
    transition: stroke-width 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.donut-slice:hover {
    stroke-width: 28;
    opacity: 0.9;
}

.donut-center-num {
    font: 800 22px/1 var(--advisor-font-mono);
    fill: var(--advisor-color-ink);
}

.donut-center-lbl {
    font: 700 10px/1 var(--advisor-font-body);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    fill: var(--advisor-color-subtle);
}

.donut-legend-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}

.donut-legend-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.donut-legend-name {
    color: var(--advisor-color-ink);
    font-weight: 600;
}

.donut-legend-pct {
    margin-left: auto;
    font-family: var(--advisor-font-mono);
    color: var(--advisor-color-muted);
}

/* 4. Coordinate Matrix Plot */
.operations-matrix-container {
    display: flex;
    flex-direction: column;
    gap: var(--advisor-space-3);
    width: 100%;
}

.operations-matrix-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.matrix-pulse-ring {
    animation: matrixPulse 2.5s infinite ease-in-out alternate;
}

@keyframes matrixPulse {
    0% { r: 12px; opacity: 0.25; }
    100% { r: 18px; opacity: 0.55; }
}

.matrix-node-core {
    cursor: pointer;
    transition: transform 0.2s;
}

.matrix-node-group:hover .matrix-node-core {
    transform: scale(1.3);
}

.operations-matrix-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--advisor-space-5);
    font-size: 0.75rem;
    color: var(--advisor-color-muted);
}

.matrix-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.matrix-legend-dot.is-pos { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
.matrix-legend-dot.is-neg { background: #f43f5e; box-shadow: 0 0 6px rgba(244, 63, 94, 0.6); }

/* 5. Radial Cadence Rings */
.operations-radial-widget-body {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: var(--advisor-space-4);
    flex-wrap: wrap;
}

.operations-radial-meter-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.radial-center-val {
    font: 800 24px/1 var(--advisor-font-mono);
    fill: var(--advisor-color-ink);
}

.radial-center-lbl {
    font: 700 10px/1 var(--advisor-font-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    fill: var(--advisor-color-subtle);
}

.radial-ring-glow-1 { filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.4)); }
.radial-ring-glow-2 { filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.4)); }
.radial-ring-glow-3 { filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); }

.operations-radial-stats {
    display: flex;
    flex-direction: column;
    gap: var(--advisor-space-3);
    min-width: 140px;
}

.radial-stat-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.radial-stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 3px;
    flex-shrink: 0;
}

.radial-stat-row.is-current .radial-stat-dot { background: #10b981; }
.radial-stat-row.is-due .radial-stat-dot { background: #06b6d4; }
.radial-stat-row.is-missing .radial-stat-dot { background: #f59e0b; }

.radial-stat-info strong {
    display: block;
    font-size: 0.8rem;
    color: var(--advisor-color-ink);
}

.radial-stat-info small {
    display: block;
    font-size: 0.7rem;
    color: var(--advisor-color-subtle);
}

/* 6. Speedometer */
.operations-speedometer-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--advisor-space-3);
}

.speedo-active-arc {
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.4));
}

.speedometer-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--advisor-space-5);
    width: 100%;
}

.speedo-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.72rem;
    color: var(--advisor-color-muted);
}

.speedo-stat strong {
    font-family: var(--advisor-font-mono);
    font-size: 1.1rem;
    color: var(--advisor-color-ink);
}

.speedo-stat.is-attention strong {
    color: #f43f5e;
}

/* 7. Spectrum Bars */
.operations-spectrum-body {
    display: flex;
    flex-direction: column;
    gap: var(--advisor-space-4);
}

.spectrum-bars-list {
    display: flex;
    flex-direction: column;
    gap: var(--advisor-space-3);
}

.spectrum-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spectrum-bar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
}

.spectrum-bar-meta strong {
    color: var(--advisor-color-ink);
}

.spectrum-bar-meta span {
    font-family: var(--advisor-font-mono);
    color: var(--advisor-color-subtle);
    font-size: 0.72rem;
}

.spectrum-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: var(--advisor-color-border);
    overflow: hidden;
}

.spectrum-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.spectrum-fill.is-norm { background: linear-gradient(90deg, #06b6d4, #10b981); }
.spectrum-fill.is-high { background: linear-gradient(90deg, #f59e0b, #f43f5e); }

.spectrum-benchmark-pill {
    padding: 8px 12px;
    border-radius: var(--advisor-radius-panel);
    background: var(--advisor-color-surface-muted);
    font-size: 0.74rem;
    color: var(--advisor-color-muted);
    text-align: center;
}

/* 8. Radar Scope */
.operations-radar-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--advisor-space-3);
}

.radar-scope-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-sweep-beam {
    transform-origin: 100px 100px;
    animation: radarSweep 4s infinite linear;
}

@keyframes radarSweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.beacon-pulse {
    animation: beaconFlash 2s infinite ease-out;
}

@keyframes beaconFlash {
    0% { r: 5px; opacity: 0.8; }
    100% { r: 14px; opacity: 0; }
}

.radar-status-meta {
    text-align: center;
}

.radar-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
}

.radar-status-badge.is-positive { background: rgba(16, 185, 129, 0.15); color: #059669; }

.radar-hint {
    margin: 4px 0 0;
    font-size: 0.72rem;
    color: var(--advisor-color-subtle);
}

/* Respond to the workspace width, including a sidebar or an open library. */
.operations-legend-stage { container: operations-stage / inline-size; }
.operations-chart-scroll { max-width: 100%; overflow-x: auto; }
.operations-legend-dashboard .operations-widget-btn:focus-visible,
.operations-legend-dashboard .operations-custom-btn:focus-visible,
.operations-chart-scroll:focus-visible {
    outline: 2px solid var(--advisor-color-accent);
    outline-offset: 3px;
}
.operations-legend-toolbar-left { min-width: 0; }
.operations-legend-toolbar-left .eyebrow { margin-top: 0; }
.operations-legend-dashboard .operations-scorecard-title {
    font-size: 1.25rem;
    line-height: 1.25;
}
.operations-cadence-summary { margin: 0; color: var(--advisor-color-ink); line-height: 1.5; }
.operations-cadence-summary strong { font-weight: 650; }
.operations-cadence-summary + .operations-panel-note { margin-bottom: 0; }

@container operations-widget (min-width: 560px) {
    .operations-widget-header { flex-direction: row; align-items: center; }
    .operations-widget-title-block { flex: 1 1 auto; }
}
@container operations-widget (max-width: 560px) {
    .operations-sparkline-grid { grid-template-columns: 1fr; }
}
@container operations-widget (min-width: 561px) and (max-width: 900px) {
    .operations-sparkline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container operations-dashboard (max-width: 1100px) {
    .operations-legend-stage.has-palette-open { grid-template-columns: minmax(0, 1fr); }
    .operations-palette-drawer { position: static; }
}
@container operations-stage (max-width: 1200px) {
    .operations-widgets-canvas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .operations-custom-widget.is-wide { grid-column: 1 / -1; }
}
/* One or two selected widgets should use the available canvas. */
.operations-widgets-canvas:not(:has(> :nth-child(3))) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.operations-widgets-canvas > .operations-custom-widget:only-child { grid-column: 1 / -1; }
@container operations-stage (max-width: 700px) {
    .operations-widgets-canvas,
    .operations-widgets-canvas:not(:has(> :nth-child(3))) { grid-template-columns: minmax(0, 1fr); }
    .operations-custom-widget.is-compact,
    .operations-custom-widget.is-wide { grid-column: 1 / -1; }
}
@container operations-dashboard (max-width: 480px) {
    .operations-legend-toolbar { padding: var(--advisor-space-4); }
    .operations-widget-header,
    .operations-widget-body { padding: var(--advisor-space-4); }
    .operations-chart-legend { justify-content: flex-start; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .operations-dossier-drawer,
    .operations-custom-widget,
    .radar-sweep-beam,
    .matrix-pulse-ring,
    .beacon-pulse {
        animation: none !important;
        transition: none !important;
    }
}

/* Operations canvas v2. Route-owned layout chrome; Folio supplies the palette.
   Panel order is DOM order. Narrow layouts never rewrite desktop preferences. */
.operations-analysis-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; font-size: 11px; color: var(--advisor-color-muted); }
.operations-analysis-key > span { display: inline-flex; align-items: center; gap: 6px; }
.operations-analysis-key i { width: 8px; height: 8px; border-radius: 2px; }
.operations-analysis-key .is-sage, .operations-review-stack .is-sage, .operations-flow-rail .is-sage { background: var(--f-sage, #718e76); }
.operations-analysis-key .is-clay, .operations-review-stack .is-clay, .operations-flow-rail .is-clay { background: var(--f-clay, #b4775c); }
.operations-analysis-key .is-grey, .operations-review-stack .is-grey { background: var(--f-grey, #9a9081); }
.operations-review-comparison { display: grid; gap: 4px; }
.operations-canvas-workspace .operations-review-row { display: grid; gap: 9px; width: 100%; min-width: 0; border: 0; border-bottom: 1px solid var(--advisor-color-border); padding: 12px 0; text-align: left; background: none; cursor: pointer; color: var(--advisor-color-ink); font-family: var(--advisor-font-body); }
.operations-review-row:hover { background: var(--f-quiet, #fcf9f1); }
.operations-review-row-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 13px; }
.operations-review-row-head b { font: 500 12px/1.5 var(--advisor-font-mono); }
.operations-review-row small { font-size: 11px; color: var(--advisor-color-muted); }
.operations-review-stack { display: flex; height: 10px; border-radius: 3px; overflow: hidden; width: 100%; }
.operations-review-stack i { height: 100%; }
.operations-flow-balance { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 30px; align-items: center; }
.operations-flow-result { display: grid; gap: 10px; min-width: 0; }
.operations-flow-result > span { color: var(--advisor-color-muted); font-size: 12px; }
.operations-flow-result strong { color: var(--f-green, #315845); font: 500 clamp(26px, 3vw, 44px)/1.2 var(--advisor-font-display); white-space: nowrap; }
.operations-flow-result small { font-size: 11px; color: var(--advisor-color-muted); }
.operations-flow-equation { display: grid; gap: 18px; }
.operations-flow-equation > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; font-size: 12px; }
.operations-flow-equation b { font: 500 12px/1.5 var(--advisor-font-mono); }
.operations-flow-rail { grid-column: 1 / -1; height: 13px; border-radius: 3px; overflow: hidden; background: var(--f-inset, #f2ebdc); }
.operations-flow-rail i { height: 100%; display: block; border-radius: 3px; }
@container operations-widget (max-width: 560px) { .operations-flow-balance { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.operations-canvas-workspace [data-drag-surface] {
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
.operations-pointer-active,
.operations-pointer-active * {
    cursor: grabbing !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}
.operations-drag-preview {
    position: fixed; z-index: 10001; pointer-events: none; width: 260px;
    box-sizing: border-box; padding: 10px; overflow: hidden; border-radius: 12px;
    border: 1px solid #afa58c; background: #fffdf8; color: #30281c;
    box-shadow: 0 18px 44px #10231c40, 0 3px 8px #10231c20;
    transform: rotate(-2deg); opacity: .95;
    font: 12px/1.4 var(--advisor-font-body, sans-serif);
}
.operations-drag-preview.is-valid { border: 2px solid #315845; padding: 9px; }
.operations-drag-preview > strong { display: block; margin-bottom: 8px; }
.operations-drag-preview > span { display: block; font-size: 10px; margin-top: 7px; color: #536454; }
.operations-drag-preview-frame { height: 120px; width: 240px; overflow: hidden; border-radius: 6px; background: #f9f4e7; }
.operations-drop-marker {
    position: fixed; z-index: 10000; pointer-events: none; border-radius: 6px;
    background: #315845; box-shadow: 0 0 0 4px #31584520;
    font-size: 0;
}
.operations-drop-marker[hidden] { display: none; }
.operations-canvas-workspace {
    --canvas-gap: 14px;
    gap: 14px;
    color: var(--f-ink, #30281c);
}
.operations-canvas-workspace .operations-legend-toolbar {
    border: 0; border-radius: 0; box-shadow: none; background: none;
    padding: 12px 0 4px;
}
.operations-canvas-workspace .operations-scorecard-title {
    font: 500 clamp(1.7rem, 2.7vw, 2.5rem)/1.15 var(--f-font-display, var(--advisor-font-display));
    letter-spacing: -.035em; margin: 0;
}
.operations-workspace-subtitle { margin: 8px 0 0; color: var(--advisor-color-muted); font-size: 13px; }
.operations-canvas-workspace .operations-custom-btn {
    border-radius: 7px; min-height: 36px; padding: 8px 12px; font-size: 12px;
}
.operations-canvas-workspace button:disabled { opacity: .45; cursor: default; }
.operations-canvas-workspace .operations-custom-btn.is-active {
    background: var(--f-green, #315845); border-color: var(--f-green, #315845); color: white;
}
.operations-workspace-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
    padding: 10px 0; border-block: 1px solid var(--advisor-color-border);
}
.operations-preset-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.operations-preset-tabs button {
    appearance: none; border: 1px solid transparent; background: none; border-radius: 6px;
    color: var(--advisor-color-muted); padding: 9px 12px; cursor: pointer;
    font: 600 12px/1.2 var(--advisor-font-body);
}
.operations-preset-tabs button[aria-pressed="true"] {
    background: var(--f-paper, #fffdf8); border-color: var(--advisor-color-border); color: var(--f-green, #315845);
}
.operations-view-picker { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--advisor-color-muted); }
.operations-view-picker select {
    max-width: 180px; padding: 6px 24px 6px 8px; border: 1px solid var(--advisor-color-border);
    background: var(--f-paper, #fffdf8); border-radius: 6px; color: var(--advisor-color-ink); font: inherit;
}
.operations-snapshot-label { margin-left: auto; color: var(--advisor-color-muted); font: 10px/1.5 var(--advisor-font-mono); }
.operations-command-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; padding: 3px 0; }
.operations-command-line strong { font-size: 14px; color: var(--f-green, #315845); }
.operations-command-line span { color: var(--advisor-color-muted); font-size: 12px; }
.operations-canvas-help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 11px; color: var(--advisor-color-muted); }
.operations-canvas-workspace .operations-legend-stage { gap: var(--canvas-gap); align-items: start; }
.operations-canvas-workspace .operations-widgets-canvas {
    container: operations-canvas / inline-size;
    /* Grow within each row without changing the saved or keyboard order. */
    display: flex; flex-wrap: wrap; gap: var(--canvas-gap);
    align-items: flex-start; align-content: flex-start;
}
.operations-canvas-workspace .operations-custom-widget {
    border-radius: 10px; box-shadow: 0 2px 6px #30281c05; overflow: hidden;
    background: var(--f-paper, #fffdf8); align-self: start; flex-grow: 1; flex-shrink: 0;
}
.operations-canvas-workspace .operations-custom-widget[hidden],
.operations-canvas-workspace .operations-palette-item[hidden] { display: none; }
.operations-canvas-workspace .operations-custom-widget.is-compact { flex-basis: calc((100% - 2 * var(--canvas-gap)) / 3); }
.operations-canvas-workspace .operations-custom-widget.is-half { flex-basis: calc((100% - var(--canvas-gap)) / 2); }
.operations-canvas-workspace .operations-custom-widget.is-wide { flex-basis: calc((200% - var(--canvas-gap)) / 3); }
.operations-canvas-workspace .operations-custom-widget.is-full,
.operations-canvas-workspace .operations-custom-widget:only-child,
.operations-canvas-workspace .operations-custom-widget.is-focused { flex-basis: 100%; }
.operations-canvas-workspace .operations-widget-header {
    padding: 12px 16px; border-radius: 0; gap: 8px; background: var(--f-quiet, #fcf9f1);
}
.operations-canvas-workspace:not(.is-editing) .operations-widget-header { flex-direction: row; align-items: center; }
.operations-canvas-workspace .operations-widget-title-block { flex: 1; min-width: 0; }
.operations-canvas-workspace:not(.is-editing) .operations-widget-actions { flex: 0 0 auto; }
.operations-canvas-workspace .operations-widget-category-tag { font: 500 9px/1.4 var(--advisor-font-mono); letter-spacing: .1em; }
.operations-canvas-workspace .operations-widget-title {
    font: 600 14px/1.4 var(--advisor-font-body); letter-spacing: -.015em;
}
.operations-canvas-workspace .operations-widget-actions { flex-wrap: wrap; justify-content: flex-start; }
.operations-canvas-workspace:not(.is-editing) .operations-widget-actions { justify-content: flex-end; }
.operations-canvas-workspace .operations-widget-btn { min-height: 30px; min-width: 30px; padding: 5px 8px; background: transparent; border-color: transparent; }
.operations-canvas-workspace .operations-widget-btn:hover { background: var(--f-inset, #f2ebdc); }
.operations-canvas-workspace .operations-widget-body { padding: 18px; overflow: auto; max-height: 420px; scrollbar-width: thin; }
.operations-canvas-workspace .operations-widget-body > .operations-panel-note { margin: 14px 0 0; font-size: 11px; line-height: 1.5; }
.operations-canvas-workspace .operations-widget-body > .operations-panel-note:first-child { margin-top: 0; }
.operations-canvas-workspace .operations-widget-body > .operations-row-action { margin-top: 16px; }
.operations-canvas-workspace .operations-rollup-list { margin-top: 14px; }
.operations-canvas-workspace .operations-donut-widget-body { justify-content: center; gap: 20px; }
.operations-canvas-workspace .donut-chart-box { flex: 0 0 148px; }
.operations-canvas-workspace .donut-svg { width: 148px; height: 148px; }
.operations-canvas-workspace .donut-legend-list { flex: 1 1 170px; max-width: 260px; gap: 10px; }
.operations-canvas-workspace .donut-legend-item { font-size: 11px; gap: 8px; }
.operations-canvas-workspace .donut-legend-name { overflow-wrap: anywhere; }
.operations-canvas-workspace .operations-flow-svg { max-height: 240px; }
.operations-canvas-workspace .operations-feed-list > div:first-child { padding-top: 0; }
.operations-canvas-workspace .operations-feed-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.operations-canvas-workspace .is-height-short .operations-widget-body { max-height: 200px; }
.operations-canvas-workspace .is-height-tall .operations-widget-body { max-height: 620px; }
.operations-canvas-workspace .is-focused .operations-widget-body { max-height: none; }
.operations-canvas-workspace .operations-widget-drag-handle {
    touch-action: none; border: 0; background: transparent; font-size: 22px; min-width: 28px; min-height: 34px;
    color: var(--advisor-color-muted);
}
.operations-canvas-workspace.is-editing .operations-custom-widget { border-style: dashed; }
.operations-canvas-workspace .operations-custom-widget.is-drag-over,
.operations-canvas-workspace .operations-canvas-dropzone.is-drag-over { outline: 2px solid var(--f-green, #315845); outline-offset: -2px; transform: none; }
.operations-canvas-workspace .operations-custom-widget.is-drag-over::before {
    content: "Place panel here"; position: absolute; inset: 0 0 auto; z-index: 2; text-align: center;
    background: var(--f-green, #315845); color: white; padding: 4px; font-size: 11px; pointer-events: none;
}
.operations-resize-handle {
    position: absolute; bottom: 0; right: 0; width: 28px; height: 28px; border: 0;
    background: var(--f-inset, #f2ebdc); color: var(--advisor-color-muted);
    cursor: nwse-resize; touch-action: none; font-size: 20px; border-radius: 8px 0 0;
}
.operations-canvas-dropzone { flex-basis: 100%; border: 1px dashed var(--advisor-color-border-strong); padding: 16px; text-align: center; border-radius: 8px; font-size: 12px; color: var(--advisor-color-muted); }
.operations-canvas-workspace .operations-canvas-empty-state { flex-basis: 100%; padding: 24px; border-width: 1px; }
.operations-canvas-workspace .operations-palette-drawer { border-radius: 10px; box-shadow: none; max-height: none; }
.operations-canvas-workspace .operations-palette-header { padding: 16px; }
.operations-canvas-workspace .operations-palette-content { padding: 16px; max-height: 540px; overflow-y: auto; }
.operations-canvas-workspace .operations-palette-item { padding: 12px; border-radius: 6px; box-shadow: none; }
.operations-canvas-workspace .operations-palette-item-top { align-items: center; }
.operations-canvas-workspace .operations-palette-item-top strong { font-size: 12px; line-height: 1.35; }
.operations-canvas-workspace .operations-palette-item-desc { font-size: 11px; }
.operations-library-search { display: grid; gap: 6px; font-size: 11px; font-weight: 600; }
.operations-library-search input {
    width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--advisor-color-border-strong);
    border-radius: 6px; background: var(--f-paper, #fffdf8); color: var(--advisor-color-ink); font: 400 13px/1.4 var(--advisor-font-body);
}
.operations-canvas-workspace .operations-palette-footer { display: grid; gap: 10px; padding: 16px; }
.operations-canvas-workspace :is(button, input, select, [tabindex]):focus-visible { outline: 2px solid var(--f-green, #315845); outline-offset: 2px; }
.operations-snapshot-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; }
.operations-snapshot-facts > div { min-width: 0; }
.operations-snapshot-facts dt { color: var(--advisor-color-muted); font-size: 12px; }
.operations-snapshot-facts dd { margin: 8px 0; font: 600 clamp(20px, 2vw, 30px)/1.2 var(--advisor-font-mono); }
.operations-snapshot-facts small { color: var(--advisor-color-muted); font-size: 11px; }
.operations-work-verdict > span { font: 500 10px/1.5 var(--advisor-font-mono); text-transform: uppercase; letter-spacing: .12em; }
.operations-work-verdict > strong { display: block; color: var(--f-green, #315845); font: 500 56px/1.2 var(--advisor-font-display); }
.operations-work-verdict p { margin: 4px 0 0; font-size: 13px; }
.operations-feed-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--advisor-color-border); }
.operations-feed-list strong { display: block; font-size: 13px; }
.operations-feed-list small { display: block; margin-top: 4px; color: var(--advisor-color-muted); font-size: 11px; }
.operations-canvas-workspace .operations-chart-legend { font-size: 10px; margin-top: 0; padding-top: 0; gap: 8px 16px; }
.operations-canvas-workspace.is-density-compact { --canvas-gap: 8px; }
.operations-canvas-workspace.is-density-compact .operations-widget-header { padding: 8px 12px; }
.operations-canvas-workspace.is-density-compact .operations-widget-body { padding: 12px; max-height: 300px; }
.operations-canvas-workspace.is-density-compact .is-height-short .operations-widget-body { max-height: 160px; }
.operations-canvas-workspace.is-density-compact .is-height-tall .operations-widget-body { max-height: 540px; }
.operations-canvas-workspace.is-density-compact .is-focused .operations-widget-body { max-height: none; }
.operations-canvas-workspace .operations-comparison-table { min-width: 540px; table-layout: fixed; }
.operations-canvas-workspace .operations-comparison-table th:first-child { width: 29%; }
.operations-canvas-workspace .operations-comparison-table td { height: 56px; }
.operations-canvas-workspace .operations-comparison-table .num { white-space: nowrap; }
.operations-canvas-workspace.has-focus .operations-custom-widget.is-focused { grid-column: 1 / -1; }
@container operations-canvas (max-width: 1000px) {
    .operations-canvas-workspace .operations-custom-widget.is-compact,
    .operations-canvas-workspace .operations-custom-widget.is-half,
    .operations-canvas-workspace .operations-custom-widget.is-wide { flex-basis: calc((100% - var(--canvas-gap)) / 2); }
}
@container operations-dashboard (max-width: 1100px) {
    .operations-canvas-workspace .operations-palette-drawer { grid-row: 1; position: static; }
    .operations-canvas-workspace .operations-palette-content { max-height: 300px; }
}
@container operations-canvas (max-width: 650px) {
    .operations-canvas-workspace .operations-custom-widget.is-compact,
    .operations-canvas-workspace .operations-custom-widget.is-half,
    .operations-canvas-workspace .operations-custom-widget.is-wide { flex-basis: 100%; }
    .operations-canvas-workspace .operations-widget-body { max-height: none !important; }
}
@container operations-widget (max-width: 600px) {
    .operations-snapshot-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container operations-widget (min-width: 460px) {
    .operations-canvas-workspace [data-widget-id="task_velocity"] .operations-widget-body {
        display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; align-items: start;
    }
    .operations-canvas-workspace [data-widget-id="task_velocity"] .operations-rollup-list { margin: 0; }
    .operations-canvas-workspace [data-widget-id="task_velocity"] .operations-panel-note { grid-column: 1 / -1; margin: 0; }
    .operations-canvas-workspace [data-widget-id="task_velocity"] .operations-row-action { grid-column: 1 / -1; justify-self: start; margin: 0; }
}
@container operations-dashboard (max-width: 480px) {
    .operations-canvas-workspace .operations-legend-toolbar { padding: 8px 0; }
    .operations-canvas-workspace { gap: 10px; }
    .operations-canvas-workspace .operations-workspace-subtitle { display: none; }
    .operations-canvas-workspace:not(.is-editing) .operations-canvas-help > span:first-child { display: none; }
    .operations-canvas-workspace .operations-legend-toolbar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .operations-canvas-workspace .operations-custom-btn { justify-content: center; }
    .operations-canvas-workspace .operations-legend-toolbar-actions { gap: 6px; }
    .operations-canvas-workspace .operations-custom-btn { padding: 8px 10px; }
    .operations-snapshot-label { margin-left: 0; }
    .operations-canvas-workspace .operations-scorecard-title { font-size: 28px; }
}
@media (max-height: 650px) {
    .operations-canvas-workspace .operations-palette-drawer { position: static; }
}
@media (prefers-reduced-motion: reduce) {
    .operations-canvas-workspace *, .operations-canvas-workspace *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
