/* CONNECT_CLOUD_OFFICE_OBSIDIAN_V6 — neutral black reflective workspace.
 * One full-shell gradient is painted ONCE, never re-started in the sidebar,
 * topbar or content. No chromatic gradient stops, external assets, or API calls.
 * Dark Cloud Office only: Day, standalone modules, and other apps are unchanged. */

html[data-theme="dark"] .pa-shell.is-executive-rail {
  --co-obsidian-base: #070707;
  --co-obsidian-line: #1d1d1d;
  --co-obsidian-line-soft: #161616;
  --co-obsidian-line-lit: #929292;
  --co-obsidian-gloss:
    radial-gradient(ellipse 82% 34% at 26% -10%,
      rgba(255, 255, 255, .105) 0%, rgba(255, 255, 255, .026) 47%, transparent 82%),
    linear-gradient(136deg,
      #121212 0%, #090909 21%, #050505 44%, #0d0d0d 73%, #060606 100%);
  --cx-canvas: var(--co-obsidian-base);
  --cx-rail: var(--co-obsidian-base);
  --cx-surface: var(--co-obsidian-base);
  --cx-surface-2: var(--co-obsidian-base);
  --cx-input: #0c0c0c;
  --cx-hover: #1a1a1a;
  --cx-selected: #292929;
  --cx-border-soft: var(--co-obsidian-line-soft);
  --cx-border: var(--co-obsidian-line);
  --cx-border-strong: #383838;
  --exec-border: var(--co-obsidian-line-soft);
  --exec-hover: #1a1a1a;
  --exec-open: transparent;
  background: var(--co-obsidian-gloss);
  background-color: var(--co-obsidian-base);
  color-scheme: dark;
}

/* Background continuity: these are transparent windows over ONE shared
 * shell backdrop, rather than independently repeating radial gradients. */
html[data-theme="dark"] .pa-shell.is-executive-rail :is(
  .pa-topbar, .pa-frame, .pa-main, .pa-tabbar
) {
  background: transparent;
  background-color: transparent;
}
/* Status meaning is kept as the left accent rule, never as a tinted panel. */
html[data-theme="dark"] .pa-shell.is-executive-rail .cr-do-next.is-warn {
  box-shadow: inset 3px 0 0 var(--cx-accent);
}

/* Flat dark dividing lines remain understated until the cursor approaches. */
html[data-theme="dark"] .pa-shell.is-executive-rail .pa-side {
  border-right: 1px solid var(--co-obsidian-line);
  transition: border-color 165ms ease-out, box-shadow 165ms ease-out;
}
html[data-theme="dark"] .pa-shell.is-executive-rail .pa-side-head,
html[data-theme="dark"] .pa-shell.is-executive-rail .pa-side-foot,
html[data-theme="dark"] .pa-shell.is-executive-rail .pa-nav .pa-v2-items {
  border-color: var(--co-obsidian-line-soft);
}
html[data-theme="dark"] .pa-shell.is-executive-rail .pa-side::before {
  height: 1px;
  --co-side-sheen: linear-gradient(90deg, transparent, rgba(195, 195, 195, .12), transparent);
  background: var(--co-side-sheen);
  opacity: .55;
}
html[data-theme="dark"] .pa-shell.is-executive-rail .pa-topbar {
  position: relative;
  border-bottom: none;
  transition: border-color 165ms ease-out, box-shadow 165ms ease-out;
}
html[data-theme="dark"] .pa-shell.is-executive-rail .pa-side::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  transition: opacity 165ms ease-out;
}
html[data-theme="dark"] .pa-shell.is-executive-rail .pa-side::after {
  right: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  --co-side-edge-light: linear-gradient(to bottom,
    transparent 0,
    rgba(170, 170, 170, .16) calc(var(--co-edge-y, 50%) - 72px),
    rgba(225, 225, 225, .94) var(--co-edge-y, 50%),
    rgba(170, 170, 170, .16) calc(var(--co-edge-y, 50%) + 72px),
    transparent 100%);
  background: var(--co-side-edge-light);
}
html[data-theme="dark"] .pa-shell.is-executive-rail[data-near-side] .pa-side {
  border-color: var(--co-obsidian-line-lit);
  --co-edge-proximity-shadow: 0 0 13px rgba(200, 200, 200, .065);
  box-shadow: var(--co-edge-proximity-shadow);
}
html[data-theme="dark"] .pa-shell.is-executive-rail[data-near-side] .pa-side::after {
  opacity: 1;
}

/* Panels, cards and input borders have the same graphite line language.
 * Hover and keyboard focus reveal neutral grey only, never colorful glow. */
html[data-theme="dark"] .pa-shell.is-executive-rail :is(
  .pa-panel, .pa-head.cr-do-head, .cr-do-dept, .cr-do-card,
  .cr-do-next, .pa-kpi, .pa-searchbar, .pa-card
) {
  transition: border-color 175ms ease-out, box-shadow 175ms ease-out;
}
html[data-theme="dark"] .pa-shell.is-executive-rail :is(
  .pa-panel, .pa-head.cr-do-head, .cr-do-dept, .cr-do-card,
  .cr-do-next, .pa-kpi, .pa-searchbar, .pa-card
):hover {
  --co-panel-hover-line: #666666;
  --co-panel-hover-shadow: 0 0 0 1px rgba(175, 175, 175, .09);
  border-color: var(--co-panel-hover-line);
  box-shadow: var(--co-panel-hover-shadow);
}
html[data-theme="dark"] .pa-shell.is-executive-rail :is(
  .pa-panel, .pa-head.cr-do-head, .cr-do-dept, .cr-do-card,
  .cr-do-next, .pa-kpi, .pa-searchbar, .pa-card
):focus-within {
  --co-panel-focus-line: #828282;
  border-color: var(--co-panel-focus-line);
}
/* Preserve the semantic warning status marker on hover and focus. */
html[data-theme="dark"] .pa-shell.is-executive-rail .cr-do-next.is-warn:hover,
html[data-theme="dark"] .pa-shell.is-executive-rail .cr-do-next.is-warn:focus-within {
  --co-warn-hover-shadow: inset 3px 0 0 var(--cx-accent), 0 0 0 1px rgba(175, 175, 175, .09);
  box-shadow: var(--co-warn-hover-shadow);
}

/* Body-mounted profile menu is outside the shell's scoped token inheritance. */
html[data-theme="dark"] body:has(.pa-shell.is-executive-rail) .ac-menu.is-executive {
  --cx-surface: #080808;
  --cx-surface-2: #080808;
  --cx-input: #0c0c0c;
  --cx-border: #222222;
  --cx-border-soft: #181818;
  --cx-hover: #1a1a1a;
  --cx-selected: #292929;
  --co-account-menu-bg: #080808;
  --co-account-menu-line: #303030;
  --co-account-menu-shadow: 0 18px 54px rgba(0, 0, 0, .72);
  background: var(--co-account-menu-bg);
  border-color: var(--co-account-menu-line);
  box-shadow: var(--co-account-menu-shadow);
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] .pa-shell.is-executive-rail .pa-side,
  html[data-theme="dark"] .pa-shell.is-executive-rail .pa-topbar,
  html[data-theme="dark"] .pa-shell.is-executive-rail .pa-side::after,
  html[data-theme="dark"] .pa-shell.is-executive-rail .pa-topbar::after,
  html[data-theme="dark"] .pa-shell.is-executive-rail :is(
    .pa-panel, .cr-do-dept, .cr-do-card, .pa-searchbar
  ) { transition: none; }
}
@media (forced-colors: active) {
  html[data-theme="dark"] .pa-shell.is-executive-rail {
    background: Canvas;
    color-scheme: normal;
  }
  html[data-theme="dark"] .pa-shell.is-executive-rail :is(.pa-side, .pa-topbar) {
    border-color: CanvasText;
  }
  html[data-theme="dark"] .pa-shell.is-executive-rail :is(.pa-side, .pa-topbar)::after {
    display: none;
  }
}
