/* V4e foundation + shared component navigation, pinned by the I00 manifest.
   Scoped to the owner shell; existing member, public and operator shells remain. */
/* Legacy pages share only the light palette; their dark palette and layout stay legacy. */
html[data-legacy-appearance][data-theme="light"],
html[data-pilot-shell] {
  color-scheme:dark;
  --canvas:#191b2c; --surface:#202326; --surface-subtle:#26292d;
  --ink:#f0f2f4; --muted:#acb3bd; --line:#3b4148;
  --accent:#9bbeff; --accent-soft:#26344c; --on-accent:#13223d;
  --attention:#f3bc66; --attention-bg:#3d3020; --live:#83d8b1; --live-bg:#243b32; --radius:11px;
  --color-void:var(--canvas); --color-void-2:var(--surface); --color-panel:var(--surface);
  --color-panel-2:var(--surface-subtle); --color-text:var(--ink); --color-dim:var(--muted);
  --color-faint:var(--muted); --color-line:var(--line); --color-line-2:var(--line);
  --color-pulse:var(--accent); --color-alert:var(--attention);
  --color-live:var(--live); --color-gold:var(--attention);
}
html[data-legacy-appearance][data-theme="light"],
html[data-pilot-shell][data-theme="light"] {
  color-scheme:light;
  --canvas:#f4f6f8; --surface:#fff; --surface-subtle:#f7f9fb;
  --ink:#202a36; --muted:#596675; --line:#dce2e9;
  --accent:#2463d6; --accent-soft:#eaf0fd; --on-accent:#fff;
  --attention:#9a4b08; --attention-bg:#fff0dd; --live:#167251; --live-bg:#e6f4ec; --radius:14px;
}
/* Selected overview/job shell geometry, adapted to the existing authenticated IDs.
   Keep these roles explicit: legacy utility/component styles must not set them. */
[data-pilot-shell] body { margin:0; background:var(--canvas) radial-gradient(ellipse at 95% 5%,#42417b99,transparent 70%) fixed; color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,sans-serif; font-size:14px; font-weight:400; line-height:1.5; -webkit-font-smoothing:antialiased; }
[data-pilot-shell][data-theme="light"] body { background:var(--canvas); }
/* Notifications consumes the shell palette without changing other Connections pages. */
[data-legacy-appearance][data-theme="light"] .personal-preferences .connection-scope,
[data-legacy-appearance][data-theme="light"] .personal-preferences .connection-panel,
[data-pilot-shell][data-theme="light"] .personal-preferences .connection-scope,
[data-pilot-shell][data-theme="light"] .personal-preferences .connection-panel { background:var(--surface); border-color:var(--line); color:var(--ink); }
[data-legacy-appearance][data-theme="light"] .personal-preferences .connection-scope p,
[data-legacy-appearance][data-theme="light"] .personal-preferences .connection-panel p,
[data-legacy-appearance][data-theme="light"] .personal-preferences .notification-preference small,
[data-legacy-appearance][data-theme="light"] .personal-preferences .notification-switch-state,
[data-pilot-shell][data-theme="light"] .personal-preferences .connection-scope p,
[data-pilot-shell][data-theme="light"] .personal-preferences .connection-panel p,
[data-pilot-shell][data-theme="light"] .personal-preferences .notification-preference small,
[data-pilot-shell][data-theme="light"] .personal-preferences .notification-switch-state { color:var(--muted); }
[data-legacy-appearance][data-theme="light"] .personal-preferences .notification-preference,
[data-pilot-shell][data-theme="light"] .personal-preferences .notification-preference { border-color:var(--line); }
[data-legacy-appearance][data-theme="light"] .personal-preferences .notification-preference input[role=switch],
[data-pilot-shell][data-theme="light"] .personal-preferences .notification-preference input[role=switch] { background:var(--muted); border-color:var(--muted); }
[data-legacy-appearance][data-theme="light"] .personal-preferences .notification-preference input[role=switch]:checked,
[data-pilot-shell][data-theme="light"] .personal-preferences .notification-preference input[role=switch]:checked { background:var(--accent); border-color:var(--accent); }
[data-legacy-appearance][data-theme="light"] .personal-preferences .notification-preference input[role=switch]::after,
[data-pilot-shell][data-theme="light"] .personal-preferences .notification-preference input[role=switch]::after { background:var(--surface); }
[data-legacy-appearance][data-theme="light"] .personal-preferences .notification-preference input[role=switch]:focus-visible,
[data-pilot-shell][data-theme="light"] .personal-preferences .notification-preference input[role=switch]:focus-visible { outline-color:var(--accent); }
[data-pilot-shell] :is(h1,h2,h3,h4) { font-family:inherit; text-wrap:pretty; }
[data-pilot-shell] h1 { font-size:32px; font-weight:620; line-height:1.2; letter-spacing:-.035em; }
[data-pilot-shell] h2 { font-size:17px; font-weight:620; line-height:1.4; letter-spacing:-.025em; }
[data-pilot-shell] h3 { font-size:14px; font-weight:590; line-height:1.5; letter-spacing:normal; }
[data-pilot-shell] :is(button,input,select,textarea) { font-family:inherit; }
[data-pilot-shell] :is(button,a,summary) { touch-action:manipulation; }
[data-pilot-shell] #sidebar { width:216px; padding:28px 16px 20px; background:var(--surface); border-color:var(--line); color:var(--muted); }
[data-pilot-shell] .pilot-mobile-heading { display:none; }
[data-pilot-shell] .pilot-sidebar-top { display:flex; align-items:center; gap:4px; }
[data-pilot-shell] .sidebar-brand { flex:1; min-width:0; gap:8px; padding:0; font-size:13px; font-weight:560; }
[data-pilot-shell] .sidebar-brand img { width:38px; height:38px; flex-shrink:0; }
[data-pilot-shell] .pilot-product-name { display:block; font-size:13px; font-weight:560; color:var(--ink); line-height:1.5; }
[data-pilot-shell] #sidebar-collapse { display:grid; place-items:center; position:static; width:36px; min-height:40px; flex-shrink:0; margin:0; padding:0; border:0; border-radius:7px; color:var(--ink); background:transparent; }
[data-pilot-shell] #sidebar-collapse[hidden] { display:none; }
[data-pilot-shell] #sidebar-collapse .sidebar-label { display:none; }
[data-pilot-shell] #sidebar-collapse:hover { background:var(--surface-subtle); }
.pilot-business { display:flex; align-items:flex-start; gap:10px; padding:30px 8px 28px; }
.pilot-business-initial { display:grid; place-items:center; width:31px; height:31px; flex-shrink:0; border:1px solid var(--line); border-radius:7px; color:var(--ink); font-weight:600; }
.pilot-business strong { display:block; font-size:13px; font-weight:580; color:var(--ink); overflow-wrap:anywhere; }
.pilot-business .sidebar-label>span { display:block; font-size:11px; margin-top:3px; }
[data-pilot-shell] .component-navigation { display:block; }
[data-pilot-shell] #sidebar :is(.nav-link,.nav-link-active) { display:flex; align-items:center; gap:12px; width:100%; min-height:44px; margin:0 0 5px; padding:11px 12px; font-size:13px; font-weight:400; line-height:1.6; letter-spacing:normal; text-align:left; justify-content:flex-start; border:0; border-radius:7px; background:transparent; color:var(--muted); box-shadow:none; }
[data-pilot-shell] #sidebar .nav-link:hover { background:var(--surface-subtle); color:var(--ink); }
[data-pilot-shell] #sidebar :is(.nav-link-active,a[aria-current="page"]) { background:var(--accent-soft); color:var(--accent); box-shadow:inset 2px 0 var(--accent); font-weight:580; }
[data-pilot-shell] #sidebar svg { width:19px; height:19px; flex-shrink:0; }
[data-pilot-shell] .sidebar-bottom { display:block; margin-top:auto; padding-top:24px; }
.pilot-profile { margin:16px 8px 0; padding-top:22px; border-top:1px solid var(--line); }
.pilot-profile>summary { display:flex; align-items:center; gap:10px; min-height:44px; cursor:pointer; list-style:none; }
.pilot-profile>summary::-webkit-details-marker { display:none; }
.pilot-profile>summary:hover { color:var(--accent); }
.pilot-avatar { display:grid; place-items:center; width:31px; height:31px; flex-shrink:0; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-size:11px; }
.pilot-profile strong { display:block; font-size:12px; font-weight:500; color:var(--ink); overflow-wrap:anywhere; }
.pilot-profile .sidebar-label>span { display:block; font-size:11px; margin-top:2px; }
.pilot-account-actions { padding-top:12px; }
.pilot-appearance { display:flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:8px; margin-bottom:12px; }
.pilot-appearance button { flex:1; min-height:38px; padding:4px 12px; border-radius:5px; font-size:12px; font-weight:560; color:var(--muted); }
.pilot-appearance button[aria-pressed="true"] { background:var(--ink); color:var(--surface); }
[data-pilot-shell] #main { width:100%; max-width:1440px; padding:24px 42px 56px; }
[data-pilot-shell] .component-heading { margin-bottom:24px; }
[data-pilot-shell] .component-heading h1 { font-size:28px; font-weight:620; line-height:1.25; margin:0; }
[data-pilot-shell] .component-heading p { font-size:13px; color:var(--muted); margin-top:8px; }
[data-pilot-shell] .component-heading p:first-child { font-size:12px; margin:0 0 6px; }
[data-pilot-shell] .component-tabs { display:flex; flex-wrap:wrap; gap:4px 20px; border-bottom:1px solid var(--line); margin-bottom:24px; }
[data-pilot-shell] .component-tabs a { display:flex; align-items:center; min-height:44px; padding:8px 2px; color:var(--muted); font-size:13px; font-weight:400; border-bottom:2px solid transparent; }
[data-pilot-shell] .component-tabs a[aria-current="page"] { color:var(--ink); border-color:var(--accent); font-weight:600; }
[data-pilot-shell] .component-heading-finance { margin-bottom:12px; }
[data-pilot-shell] .component-heading-finance h1 { font-size:24px; }
[data-pilot-shell] .component-tabs-finance { margin-bottom:20px; }
[data-pilot-shell] .component-tabs-finance a { padding:12px 0; font-weight:400; }
[data-pilot-shell] .component-tabs-finance a[aria-current="page"] { font-weight:400; }
[data-pilot-shell] :is(.btn-primary,.btn-secondary,.btn-ghost) { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:38px; padding:8px 13px; border-radius:7px; font-size:13px; font-weight:580; line-height:1.6; letter-spacing:normal; white-space:normal; text-align:center; box-shadow:none; }
[data-pilot-shell] .btn-primary { background:var(--accent); color:var(--on-accent); border:1px solid transparent; }
[data-pilot-shell] .btn-secondary { background:var(--surface); color:var(--ink); border:1px solid var(--line); }
[data-pilot-shell] .btn-secondary:hover { background:var(--surface-subtle); border-color:var(--muted); }
[data-pilot-shell] .btn-ghost { background:transparent; color:var(--muted); border:1px solid transparent; }
[data-pilot-shell] .btn-ghost:hover { background:var(--surface-subtle); color:var(--ink); }
[data-pilot-shell] .request-row-actions :is(.btn-primary,.btn-secondary),[data-pilot-shell] .request-dialog-actions :is(.btn-primary,.btn-secondary) { min-height:44px; }
[data-pilot-shell] :is(button,a,input,select,textarea,summary):focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
[data-pilot-shell] #mobile-bar { min-height:60px; padding:10px 24px; gap:8px; background:var(--surface); }
[data-pilot-shell] #mobile-bar a { font-size:13px; font-weight:560; }
[data-pilot-shell] #nav-toggle { margin:0; padding:0; min-width:40px; min-height:40px; }
[data-pilot-shell] .pilot-demo-bar { min-height:58px; padding:10px 28px; margin:0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:var(--surface); color:var(--muted); }
[data-pilot-shell] .pilot-demo-bar strong { color:var(--ink); font-weight:600; }
[data-pilot-shell] .pilot-demo-bar a { color:var(--muted); }
@media(min-width:960px) {
 [data-pilot-shell] .workspace-shell { display:grid; grid-template-columns:216px minmax(0,1fr); align-items:start; }
 [data-pilot-shell] #sidebar { position:sticky; top:0; height:100dvh; transform:none; }
 [data-pilot-shell] #mobile-bar,[data-pilot-shell] #nav-close,[data-pilot-shell] #nav-backdrop { display:none; }
 [data-pilot-shell][data-sidebar-collapsed="true"] .workspace-shell { grid-template-columns:76px minmax(0,1fr); }
 [data-pilot-shell][data-sidebar-collapsed="true"] #sidebar { width:76px; padding-inline:12px; }
 [data-pilot-shell][data-sidebar-collapsed="true"] .pilot-sidebar-top { flex-direction:column; gap:8px; }
 [data-pilot-shell][data-sidebar-collapsed="true"] .sidebar-brand { flex:none; }
 [data-pilot-shell][data-sidebar-collapsed="true"] #sidebar .sidebar-label { display:block; position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
 [data-pilot-shell][data-sidebar-collapsed="true"] .pilot-business { justify-content:center; padding:22px 0; }
 [data-pilot-shell][data-sidebar-collapsed="true"] #sidebar :is(.nav-link,.nav-link-active) { justify-content:center; padding-inline:0; }
 [data-pilot-shell][data-sidebar-collapsed="true"] .pilot-profile { margin-inline:0; }
 [data-pilot-shell][data-sidebar-collapsed="true"] .pilot-profile>summary { justify-content:center; }
 [data-pilot-shell][data-sidebar-collapsed="true"] .pilot-appearance { flex-direction:column; }
 [data-pilot-shell][data-sidebar-collapsed="true"] .pilot-appearance button { padding-inline:2px; }
 [data-pilot-shell][data-sidebar-collapsed="true"] #sidebar-collapse svg { transform:rotate(180deg); }
}
@media(min-width:960px) and (max-width:1180px) {
 [data-pilot-shell]:not([data-sidebar-collapsed="true"]) .workspace-shell { grid-template-columns:192px minmax(0,1fr); }
 [data-pilot-shell]:not([data-sidebar-collapsed="true"]) #sidebar { width:192px; padding-inline:12px; }
 [data-pilot-shell] #main { padding-inline:26px; }
}
@media(max-width:959px) {
 [data-pilot-shell] .workspace-shell { display:block; }
 [data-pilot-shell] #sidebar { position:fixed; inset:auto; top:50%; left:50%; width:min(520px,calc(100% - 34px)); height:auto; max-height:calc(100dvh - 48px); padding:28px; border:1px solid var(--line); border-radius:16px; transform:translate(-50%,-50%); overflow-y:auto; overscroll-behavior:contain; box-shadow:0 24px 80px #0003; transition:none; }
 [data-pilot-shell] #sidebar.-translate-x-full { display:none; }
 [data-pilot-shell] #sidebar:not(.-translate-x-full) { display:flex; transform:translate(-50%,-50%); }
 [data-pilot-shell] #sidebar :is(.pilot-sidebar-top,.pilot-business) { display:none; }
 [data-pilot-shell] .pilot-mobile-heading { display:flex; align-items:center; justify-content:space-between; gap:15px; margin:-8px -8px 18px 0; }
 [data-pilot-shell] .pilot-mobile-heading h2 { color:var(--ink); font-size:17px; font-weight:620; line-height:1.4; }
 [data-pilot-shell] #sidebar .sidebar-bottom { padding-top:0; }
 [data-pilot-shell] #sidebar .pilot-profile { padding-top:16px; }
 [data-pilot-shell] #nav-close { display:grid; place-items:center; min-width:40px; min-height:40px; border-radius:7px; flex-shrink:0; color:var(--ink); }
 [data-pilot-shell] #nav-close:hover { background:var(--surface-subtle); }
 [data-pilot-shell] #nav-backdrop { background:#0b121db3; backdrop-filter:none; }
 [data-pilot-shell] #mobile-bar { display:flex; }
 [data-pilot-shell] #nav-backdrop:not(.hidden) { display:block; }
 [data-pilot-shell] #sidebar .sidebar-label { display:block; }
 [data-pilot-shell] #main { padding:20px 28px 56px; }
}
@media(max-width:700px) {
 [data-pilot-shell] #main { padding-inline:20px; }
 [data-pilot-shell] .component-tabs { gap:4px 16px; }
 [data-pilot-shell] .pilot-demo-bar { padding:10px 18px; }
 [data-pilot-shell] .component-heading-finance { margin-bottom:4px; }
 [data-pilot-shell] .component-heading-finance h1 { font-size:20px; }
 [data-pilot-shell] .component-tabs-finance { margin-bottom:16px; }
}
@media(max-width:480px) {
 [data-pilot-shell] .component-heading:not(.component-heading-finance) h1 { font-size:24px; }
 [data-pilot-shell] #main { padding-inline:16px; }
 [data-pilot-shell] #sidebar { padding:22px; }
 [data-pilot-shell] .component-heading-finance p:first-child { font-size:11px; max-width:170px; }
 [data-pilot-shell] #mobile-bar { padding-inline:12px; }
}
@media(pointer:coarse) { [data-pilot-shell] :is(.btn-primary,.btn-secondary,.btn-ghost,.pilot-appearance button) { min-height:44px; } }
@media(prefers-reduced-motion:reduce) { [data-pilot-shell] *,[data-pilot-shell] *::before,[data-pilot-shell] *::after { scroll-behavior:auto; transition:none; animation:none; } }

/* Color-only compatibility for the canonical work destination. Its body and
   workflow composition are retained until their own integration increments. */
[data-pilot-shell] .work-record-essentials dd,
[data-pilot-shell] .work-record-disclosure>summary,
[data-pilot-shell] .workflow-path li[aria-current="step"],
[data-pilot-shell] .work-basic-progress { color:var(--ink); }
[data-pilot-shell] :is(.work-record-essentials dt,.work-record-next p,.work-record-links p,.work-record-links small,.work-crew-list p,.work-visit p,.work-basic-progress p,.work-basic-progress dd,.workflow-path li,.workflow-path-caption,.workflow-path-note,.work-record>.owner-note) { color:var(--muted); }
[data-pilot-shell] .work-record-next .work-record-update { color:var(--muted); }
[data-pilot-shell] :is(.work-record-next,.work-record-disclosure) { background:var(--surface); border-color:var(--line); }
[data-pilot-shell] .work-record-disclosure>summary:hover { background:var(--surface-subtle); }
[data-pilot-shell] :is(.work-record-essentials,.work-record-disclosure[open]>summary,.work-crew,.work-crew-list>li,.work-visit,.work-basic-progress,.work-record-links a) { border-color:var(--line); }
[data-pilot-shell] :is(.work-record-links a,.work-crew details>summary,.work-visit a,.work-basic-progress a,.work-basic-progress summary,.workflow-path-now) { color:var(--accent); }
[data-pilot-shell] .workflow-path li[aria-current="step"] { background:var(--accent-soft); box-shadow:inset 0 -2px var(--accent); }
[data-pilot-shell] .workflow-path-number { background:var(--surface); border-color:var(--line); }
[data-pilot-shell] .workflow-path li:not(:last-child)::after { background:var(--line); }
[data-pilot-shell] .workflow-path [aria-current="step"] .workflow-path-number { background:var(--accent); color:var(--on-accent); border-color:var(--accent); box-shadow:none; }
[data-pilot-shell] .workflow-path li.workflow-stage-review { background:var(--attention-bg); box-shadow:inset 0 -2px var(--attention); }
[data-pilot-shell] .workflow-path .workflow-stage-review .workflow-path-number { background:var(--attention); color:var(--on-accent); border-color:var(--attention); }
[data-pilot-shell] .workflow-stage-review .workflow-path-now { color:var(--attention); }
[data-pilot-shell] .work-stage-label { color:var(--ink); }

/* Keep the retained owner dashboard readable in the shared light shell.
   Its selected Overview composition is delivered separately in I11. */
[data-pilot-shell][data-theme="light"] .dashboard-home .card {
  background:var(--surface); border-color:var(--line); box-shadow:none;
}
[data-pilot-shell][data-theme="light"] .dashboard-home .dashboard-booking {
  background:var(--surface-subtle); border-color:var(--line); border-left-color:var(--accent);
}
[data-pilot-shell][data-theme="light"] .dashboard-home :is(.attention-header,#dashboard-performance>summary) {
  background:var(--surface-subtle); border-color:var(--line);
}
