/* Quiet Health-inspired shell. Depth is reserved for focus and interaction. */
body.jarvis-softform {
  --sf-canvas:#eeefed;
  --j-node-channel-fill:linear-gradient(135deg,#d9edffdd,#bfdde5bb);
  --j-node-person-fill:linear-gradient(135deg,#ecdffff0,#cbb9ecb8);
  --j-node-company-fill:linear-gradient(135deg,#d7f2def0,#a8d7c5c9);
  --j-node-project-fill:linear-gradient(135deg,#ffe6c6f0,#f1bbd2c9);
  --sf-ink:#292e2b;
  --sf-muted:#737c76;
  --sf-faint:#89928b;
  --sf-fg:var(--sf-ink);
  --sf-text-muted:var(--sf-muted);
  --sf-surface-fill:linear-gradient(145deg,#ffffffed,#fafbf9eb);
  --sf-surface-shadow:0 6px 25px #20312603;
  --sf-well-fill:#e5e9e57a;
  --sf-selected-fill:#ffffffd9;
  --sf-track:#dce1dc;
  --sf-rule:#9aa69d20;
  --j-primary:#ed63b7;
  --j-primary-ink:#bc3f91;
  --j-primary-soft:#ed63b716;
  --j-primary-light:#ff9e78;
  --j-primary-fill:linear-gradient(120deg,#ff9b68,#ee62c2);
  --j-chart-1:#f58d68;--j-chart-2:#e65dc3;--j-chart-3:#b17fe3;
  --bg:var(--sf-canvas);
  background:var(--sf-canvas);
  color:var(--sf-fg);
}
body.jarvis-softform[data-palette=lagoon]{--j-primary:#10b8a5;--j-primary-ink:#008c7e;--j-primary-soft:#10b8a516;--j-primary-light:#94d46d;--j-primary-fill:linear-gradient(120deg,#8dd76a,#0bb6b0);--j-chart-1:#75ca8b;--j-chart-2:#12bba9;--j-chart-3:#46aeda}
body.jarvis-softform[data-palette=aurora]{--j-primary:#a36be8;--j-primary-ink:#7d48c7;--j-primary-soft:#a36be816;--j-primary-light:#84b8f1;--j-primary-fill:linear-gradient(120deg,#7ab9f6,#b569df);--j-chart-1:#7eaff1;--j-chart-2:#a76ce6;--j-chart-3:#ed8ab9}
body.jarvis-softform[data-palette]{--sf-accent:var(--j-primary);--sf-accent-strong:var(--j-primary-ink);--sf-focus:var(--j-primary);--accent:var(--j-primary);--accent-text:var(--j-primary-ink);--soft-violet:var(--j-primary-soft)}
body.jarvis-softform .page-top{display:none}
body.jarvis-softform .side-rail{border-color:transparent}
body.jarvis-softform .topbar{border-color:#8d9c9014}
body.jarvis-softform .dock.sf-surface{background:#ffffffa6;box-shadow:0 8px 30px #20312606;backdrop-filter:blur(18px)}
body.jarvis-softform .dock-item.active{background:var(--j-primary-soft);color:var(--j-primary-ink);box-shadow:none}
body.jarvis-softform :is(.sf-logo,.provider-icon,.resource-icon,.workspace-symbol,.company-avatar){border:0;box-shadow:none;background:color-mix(in srgb,var(--sf-fg) 4%,transparent)}
body.jarvis-softform :is(.sf-logo,.provider-icon,.resource-icon)::before{opacity:0}
body.jarvis-softform .sf-logo>:is(svg,img){filter:none}
body.jarvis-softform .sf-surface:not(.dock):not(.modal):not(.dashboard-assignment):not(.node){border:0;background:var(--sf-surface-fill);box-shadow:var(--sf-surface-shadow)}
body.jarvis-softform .sf-button:where(:not(.node *,.sf-button--primary,.sf-button--ghost,.sf-button--glass)),
body.jarvis-softform :is(.button,.icon-button,.more).sf-button:where(:not(.node *,.sf-button--primary,.sf-button--ghost,.sf-button--glass)){box-shadow:0 2px 8px #20312608;background:var(--sf-button-fill);text-shadow:none}
body.jarvis-softform .sf-button::before{opacity:0}
body.jarvis-softform :is(.sf-button--primary,.button.sf-button--primary){background:var(--j-primary-fill);color:#fff;box-shadow:0 3px 9px color-mix(in srgb,var(--j-primary) 16%,transparent)}
body.jarvis-softform :is(.sf-button--ghost,.button.ghost.sf-button){background:transparent;box-shadow:none;color:var(--sf-text-muted)}
body.jarvis-softform :is(.sf-button--ghost,.button.ghost.sf-button):hover{background:color-mix(in srgb,var(--sf-fg) 4%,transparent);color:var(--sf-fg)}
body.jarvis-softform :is(.sf-button--primary,.button.sf-button--primary):hover{background:var(--j-primary-fill);box-shadow:0 5px 13px color-mix(in srgb,var(--j-primary) 19%,transparent)}
body.jarvis-softform :is(.sf-button,.button.sf-button):not(.sf-button--ghost):active{box-shadow:0 1px 3px #2031260d}
body.jarvis-softform :is(.sf-segmented,.sf-tabs,.segmented,.scene-mode-toggle){background:#dfe4df70;box-shadow:none;border:0}
body.jarvis-softform :is(.sf-segment,.sf-tab,.wf-scenario,.scene-mode-toggle button)[aria-pressed=true],
body.jarvis-softform :is(.sf-tab.is-active,.wf-tabs>.active,.segmented>.active,.scene-mode-toggle button.active){background:#ffffffe6;box-shadow:0 2px 7px #20312608;color:var(--sf-fg)}
body.jarvis-softform :is(.sf-input,.sf-select,.sf-textarea,.graph-search,.wf-search,.provider-choice){box-shadow:none;border:1px solid transparent;background:var(--sf-well-fill)}
body.jarvis-softform :is(.sf-input,.sf-select,.sf-textarea):focus,
body.jarvis-softform :is(.graph-search,.wf-search):focus-within{border-color:color-mix(in srgb,var(--j-primary) 38%,transparent);box-shadow:0 0 0 3px var(--j-primary-soft)}
body.jarvis-softform :is(.sf-input,.sf-select,.sf-textarea):not(:focus):hover{box-shadow:none;border-color:var(--sf-rule)}
body.jarvis-softform :is(.toggle.on,.connections-calendar-toggle[aria-checked=true]>.sf-toggle-track,.sf-toggle>input:checked+.sf-toggle-track){--sf-accent:var(--j-primary);background:var(--j-primary);box-shadow:none}
body.jarvis-softform :is(.toggle,.sf-toggle-track){box-shadow:none}
body.jarvis-softform .sf-toggle-track::after{box-shadow:0 1px 3px #00000024}
body.jarvis-softform .sf-toggle>input:focus-visible+.sf-toggle-track{box-shadow:0 0 0 3px var(--j-primary-soft)}
body.jarvis-softform .connections-account-button{translate:none;transform:none}
body.jarvis-softform .connections-service-head .connections-card-action.sf-button{width:44px;height:44px;min-height:44px;padding:0;margin-left:auto;border-radius:50%;background:linear-gradient(145deg,#fff,#f8faf8);color:var(--sf-fg);box-shadow:0 4px 12px #2532290a;flex-shrink:0}
body.jarvis-softform .connections-card-action.sf-button .connections-icon{width:22px;height:22px;stroke-width:1.4}
body.jarvis-softform :is(.connections-plus-icon,.modal-close>svg){transform-origin:center;transition:transform var(--j-motion-control) var(--j-motion-ease)}
@media(hover:hover) and (pointer:fine){body.jarvis-softform :is(button:hover>.connections-plus-icon,.modal-close:hover>svg){transform:rotate(90deg)}}
body.jarvis-softform :is(button:focus-visible>.connections-plus-icon,.modal-close:focus-visible>svg){transform:rotate(90deg)}
@media(prefers-reduced-motion:reduce){body.jarvis-softform :is(.connections-plus-icon,.modal-close>svg){transform:none!important;transition:none!important}}
body.jarvis-softform .connections-service-head .connections-card-action.sf-button:hover{background:#fff;box-shadow:0 6px 16px #25322912}
body.jarvis-softform .connections-service-head .connections-card-action.sf-button:active{box-shadow:0 1px 4px #2532290d}
body.jarvis-softform :is(.connections-account,.connections-calendar-row)::before{background:var(--j-primary-soft);box-shadow:none}
body.jarvis-softform .connections-account-button .connections-account-chevron{transition:opacity var(--j-motion-medium) var(--j-motion-ease)}
body.jarvis-softform .connections-account-button:hover .connections-account-chevron{opacity:1}
body.jarvis-softform .connections-calendar-row .sf-toggle{--sf-accent:var(--j-primary)}
body.jarvis-softform .dashboard-bar-email{--dashboard-bar-color:var(--j-chart-1)}
body.jarvis-softform .dashboard-bar-calendar{--dashboard-bar-color:var(--j-chart-2)}
body.jarvis-softform .dashboard-bar-crm{--dashboard-bar-color:var(--j-chart-3)}
body.sf-system.jarvis-softform :is(.sf-input,.sf-select,.sf-textarea){box-shadow:none;border-color:transparent;background-color:var(--sf-well-fill)}
body.sf-system.jarvis-softform .sf-select{background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23808b84' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;background-size:12px 8px}
body.sf-system.jarvis-softform :is(.sf-input,.sf-select,.sf-textarea):focus{border-color:color-mix(in srgb,var(--j-primary) 38%,transparent);box-shadow:0 0 0 3px var(--j-primary-soft)}
body.jarvis-softform .connections-palette-option.sf-button{border-radius:18px;box-shadow:none;background:var(--sf-well-fill)}
body.jarvis-softform .connections-palette-option[aria-pressed=true]{box-shadow:0 0 0 2px var(--j-primary);background:var(--j-primary-soft)}
body.jarvis-softform .dashboard-assignment{--sf-well-shadow:transparent;--sf-well-light:transparent;--sf-fg:#fff;--sf-text-muted:#fffffff0;--sf-accent:#fff;--sf-track:#ffffff36;--sf-focus:#fff;background:var(--j-gradient);box-shadow:var(--sf-surface-shadow)}
body.jarvis-softform .dashboard-assignment .sf-button{color:inherit;background:#ffffff22;box-shadow:none}
body.jarvis-softform .dashboard-assignment .sf-button--ghost{background:transparent}
body.jarvis-softform .dashboard-assignment .sf-button:hover{background:#ffffff38}
body.jarvis-softform :is(.detail-relation,.wf-chain-item,.wf-draft-surface,.review-card){box-shadow:none;border-color:var(--sf-rule)}
body.jarvis-softform .graph-svg .editable-edge:hover path:not(.edge-hit){filter:drop-shadow(0 0 2px color-mix(in srgb,var(--j-primary) 12%,transparent))}
body.jarvis-softform .node.link-source{box-shadow:0 0 0 3px var(--j-primary-soft)}
@media(hover:hover) and (pointer:fine){
 body.jarvis-softform .sf-surface.is-motion-hover:not(.node):not(.graph-shell):not(.dock):not(.modal){box-shadow:0 9px 25px #20312609}
 body.jarvis-softform :is(.button,.icon-button,.more).sf-button:not(.sf-button--primary):not(.sf-button--ghost):not(:disabled):hover{box-shadow:0 4px 12px #2031260b}
 body.jarvis-softform .connections-account-button:hover{box-shadow:none;filter:none}
}
[data-theme=dark] body.sf-system.jarvis-softform{--sf-canvas:#191d1b;--sf-ink:#edf2ee;--sf-muted:#a2aea5;--sf-fg:var(--sf-ink);--sf-text-muted:var(--sf-muted);--sf-surface-fill:linear-gradient(145deg,#272d29,#242925);--sf-surface-shadow:0 6px 25px #00000008;--sf-well-fill:#ffffff07;--sf-selected-fill:#ffffff10;--sf-track:#485249;--sf-rule:#c7d5cb18;--sf-button-fill:linear-gradient(145deg,#ffffff13,#ffffff08);background:var(--sf-canvas)}
[data-theme=dark] body.jarvis-softform .dock.sf-surface{background:#28302bbd}
[data-theme=dark] body.jarvis-softform .connections-service-head .connections-card-action.sf-button{background:linear-gradient(145deg,#ffffff14,#ffffff08);color:var(--sf-fg);box-shadow:0 4px 12px #00000016}
[data-theme=dark] body.jarvis-softform :is(.sf-segmented,.sf-tabs,.segmented,.scene-mode-toggle){background:#ffffff05}
[data-theme=dark] body.jarvis-softform :is(.sf-segment[aria-pressed=true],.sf-tab.is-active,.wf-tabs>.active,.segmented>.active,.scene-mode-toggle button.active){background:#ffffff12}
[data-theme=dark] body.jarvis-softform .dashboard-assignment{background:var(--j-gradient)}
@media(prefers-reduced-motion:reduce){body.jarvis-softform .connections-account-button .connections-account-chevron{translate:none;transition:none}}

/* Shared segmented control: identical material, metrics and states in every view. */
body.sf-system.jarvis-softform .sf-segmented{display:inline-flex;align-items:center;gap:3px;padding:4px;height:44px;max-width:100%;border:0;border-radius:var(--sf-radius-pill);background:var(--sf-well-fill);box-shadow:none}
body.sf-system.jarvis-softform .sf-segmented>.sf-segment{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:10px 15px;border:0;border-radius:var(--sf-radius-pill);font:400 13px/1.2 var(--sf-font);white-space:nowrap;background:transparent;color:var(--sf-text-muted);box-shadow:none}
body.sf-system.jarvis-softform .sf-segmented>.sf-segment>svg{width:15px;height:15px}
body.sf-system.jarvis-softform .sf-segmented>.sf-segment[aria-pressed=true]{background:var(--sf-selected-fill);box-shadow:0 2px 7px #20312608;color:var(--sf-fg)}
@media(hover:hover) and (pointer:fine){body.sf-system.jarvis-softform .sf-segmented>.sf-segment:not([aria-pressed=true]):hover{background:color-mix(in srgb,var(--sf-selected-fill) 45%,transparent);color:var(--sf-fg)}}
@media(max-width:700px){body.sf-system.jarvis-softform .sf-segmented>.sf-segment{padding:10px 12px;font-size:12px}}

/* Raised round actions: highlight above, soft cast shadow below. */
body.jarvis-softform {--j-round-fill:linear-gradient(145deg,#ffffffed,#f2f5f2c9);--j-round-light:#ffffffdb;--j-round-shade:#42544824;--j-round-rim:#ffffffeb;--j-round-inset:#71817816}
[data-theme=dark] body.sf-system.jarvis-softform {--j-round-fill:linear-gradient(145deg,#3b443e,#2b332e);--j-round-light:#9aafa31c;--j-round-shade:#00000059;--j-round-rim:#ffffff26;--j-round-inset:#0000003d}
body.sf-system.jarvis-softform :is(.connections-service-head .sf-button--icon,.icon-button.sf-button--icon,.more.sf-button--icon).sf-button{background:var(--j-round-fill);color:var(--sf-fg);box-shadow:-2px -2px 6px var(--j-round-light),3px 5px 9px var(--j-round-shade),inset 1px 1px 1px var(--j-round-rim),inset -1px -1px 2px var(--j-round-inset)}
body.sf-system.jarvis-softform :is(.connections-service-head .sf-button--icon,.icon-button.sf-button--icon,.more.sf-button--icon).sf-button:hover{background:var(--j-round-fill);box-shadow:-3px -3px 8px var(--j-round-light),3px 7px 12px var(--j-round-shade),inset 1px 1px 1px var(--j-round-rim),inset -1px -1px 2px var(--j-round-inset)}
body.sf-system.jarvis-softform :is(.connections-service-head .sf-button--icon,.icon-button.sf-button--icon,.more.sf-button--icon).sf-button:active{box-shadow:inset 2px 3px 5px var(--j-round-shade),inset -2px -2px 4px var(--j-round-light)}
/* One quiet toolbar, consistent control size, compact review count. */
body.jarvis-softform .cluster-toolbar{align-items:center;gap:16px;flex-wrap:nowrap;margin-bottom:20px}
body.jarvis-softform .cluster-tools{display:flex;flex:1;min-width:0;gap:12px;flex-wrap:nowrap}
body.jarvis-softform .cluster-tools>.cluster-view-tabs{flex-shrink:0}
body.jarvis-softform .cluster-tools .graph-search{height:44px;box-sizing:border-box;padding:0 15px;flex:1;min-width:130px;width:auto;border:0;border-radius:14px;box-shadow:none;background:var(--sf-well-fill)}
body.jarvis-softform .cluster-tools .graph-search input{font-size:13px;min-width:0}
body.jarvis-softform .cluster-tools .graph-search>svg{width:16px;height:16px;flex-shrink:0}
body.jarvis-softform .cluster-tools .filter-select.sf-select{height:44px;min-height:44px;max-width:180px;width:160px;flex-shrink:1;padding:0 34px 0 14px;font-size:13px;border:0;border-radius:14px;background-color:var(--sf-well-fill);box-shadow:none;color:var(--sf-text-muted)}
body.jarvis-softform .cluster-tools .review-button{height:44px;min-height:44px;flex-shrink:0;gap:7px;padding:0 12px;white-space:nowrap;font-size:13px;border:0;border-radius:14px;background:transparent;color:var(--sf-text-muted);transition:background-color var(--j-motion-medium) var(--j-motion-ease),color var(--j-motion-medium) var(--j-motion-ease)}
body.jarvis-softform .cluster-tools .review-button:hover{background:var(--j-primary-soft);color:var(--j-primary-ink)}
body.jarvis-softform .cluster-review-count{display:grid;place-items:center;min-width:21px;height:21px;padding:0 5px;box-sizing:border-box;border-radius:7px;background:var(--j-primary-soft);color:var(--j-primary-ink);font-size:11px;font-variant-numeric:tabular-nums}
body.jarvis-softform .cluster-action-buttons{width:auto;margin:0;gap:8px;flex-shrink:0}
body.jarvis-softform .cluster-action-buttons .button{height:44px;min-height:44px;padding:0 16px;font-size:13px;white-space:nowrap}
body.jarvis-softform .cluster-action-buttons .fullscreen-toggle{width:44px;padding:0;background:transparent;box-shadow:none;color:var(--sf-text-muted)}
body.jarvis-softform .cluster-action-buttons .fullscreen-toggle>span{display:none}
body.jarvis-softform .node.company .node-contents{display:flex;align-items:center;min-height:58px}
@media(max-width:1100px){
 body.jarvis-softform .cluster-toolbar{flex-wrap:wrap;gap:12px}
 body.jarvis-softform .cluster-tools{flex-basis:100%}
 body.jarvis-softform .cluster-action-buttons{margin-left:auto}
}
@media(max-width:700px){
 body.jarvis-softform .cluster-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
 body.jarvis-softform .cluster-tools{display:contents}
 body.jarvis-softform .cluster-view-tabs{grid-column:1/-1;grid-row:1;justify-self:start}
 body.jarvis-softform .cluster-tools .review-button{grid-column:1;grid-row:3;justify-self:start;padding:0 10px;gap:7px}
 body.jarvis-softform .cluster-action-buttons{grid-column:2;grid-row:3}
 body.jarvis-softform .cluster-tools .review-button>svg{display:none}
 body.jarvis-softform .cluster-tools .graph-search{grid-column:1;grid-row:2;min-width:0;width:100%}
 body.jarvis-softform .cluster-tools .filter-select.sf-select{grid-column:2;grid-row:2;width:125px;max-width:125px}
}

/* Visible colour fields stay in the free space around neutral surfaces. */
body.sf-system.jarvis-softform,
[data-theme] body.sf-system.jarvis-softform{
 --j-canvas-glow-a:28%;--j-canvas-glow-b:20%;--j-canvas-glow-c:14%;
 background-image:
  radial-gradient(ellipse 55vw 52vh at 12% 5%,color-mix(in srgb,var(--j-primary-light) var(--j-canvas-glow-a),transparent) 0 12%,transparent 72%),
  radial-gradient(ellipse 46vw 64vh at 100% 50%,color-mix(in srgb,var(--j-primary) var(--j-canvas-glow-b),transparent) 0 8%,transparent 74%),
  radial-gradient(ellipse 50vw 38vh at 38% 103%,color-mix(in srgb,var(--j-primary-light) var(--j-canvas-glow-c),transparent),transparent 72%);
 background-attachment:fixed;background-repeat:no-repeat;
}

/* Milky glass lets the canvas colour show through the neutral widgets. */
body.jarvis-softform :is(.connections-service,.dashboard-approvals,.focus-card){
 --sf-surface-fill:linear-gradient(145deg,#ffffffad,#ffffff85);
 -webkit-backdrop-filter:blur(20px) saturate(112%);
 backdrop-filter:blur(20px) saturate(112%);
}
[data-theme=dark] body.jarvis-softform :is(.connections-service,.dashboard-approvals,.focus-card){--sf-surface-fill:linear-gradient(145deg,#272d29b8,#24292599)}

body.sf-system.jarvis-softform .modal-close.sf-button{width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;max-height:44px;aspect-ratio:1;padding:0;border-radius:50%;flex-shrink:0;display:grid;place-items:center}
body.jarvis-softform .modal-close>svg{width:20px;height:20px;stroke-width:1.5}

/* Shared page heading metrics, matching the connections start page. */
body.jarvis-softform :is(.connections-title-row,.cluster-heading,.wf-header){display:flex;justify-content:space-between;align-items:center;flex-direction:row;gap:20px;margin:4px 0 30px}
body.jarvis-softform :is(.connections-title-row,.cluster-heading,.wf-header)>h1{font:400 40px/1.1 var(--sf-font);letter-spacing:-1.6px;margin:0}
@media(max-width:700px){
 body.jarvis-softform :is(.connections-title-row,.cluster-heading,.wf-header){align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:23px}
 body.jarvis-softform :is(.connections-title-row,.cluster-heading,.wf-header)>h1{font-size:35px}
}

body.sf-system.jarvis-softform :is(.graph-search,.wf-search) input.sf-input{background:transparent;border:0;box-shadow:none}

/* The source template's glass control on the coloured assignment surface. */
body.jarvis-softform .dashboard-assignment .sf-button.sf-button--glass{
 --j-glass-button-fill:linear-gradient(145deg,#ffffff29,#ffffff10 56%,#ffffff21);
 --sf-edge-gradient:linear-gradient(135deg,#fffffff0,#ffffff66 30%,#ffffff24 55%,#ffffff66 85%,#ffffff38);
 min-height:44px;padding:12px 22px;font-size:13px;color:#fff;background:var(--j-glass-button-fill);
 box-shadow:-2px -2px 7px #ffffff1f,3px 5px 12px #9b3f7026,inset 0 1px 1px #ffffff29;
 text-shadow:0 1px 2px #65304d18;
 -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
}
body.jarvis-softform .dashboard-assignment .sf-button.sf-button--glass::before{opacity:.85;transition:opacity var(--j-motion-medium) var(--j-motion-ease)}
body.jarvis-softform .dashboard-assignment .sf-button.sf-button--glass:hover{color:#fff;background:var(--j-glass-button-fill);background-color:#ffffff0d;box-shadow:-2px -2px 8px #ffffff29,3px 6px 14px #9b3f702e,inset 0 1px 1px #ffffff38}
body.jarvis-softform .dashboard-assignment .sf-button.sf-button--glass:hover::before{opacity:1}
body.jarvis-softform .dashboard-assignment .sf-button.sf-button--glass:active{box-shadow:inset 2px 3px 6px #77385126,inset -1px -1px 3px #ffffff38}
