/* Shared product surfaces. All operational state and colours of business risk remain data-driven. */
:root {
  --ink: #132640;
  --muted: #526680;
  --line: #dbe4ed;
  --canvas: #f3f6fa;
  --primary: #2556b7;
  --teal: #147269;
  --blue-light: #eaf1ff;
  --shadow: 0 1px 2px rgb(28 49 83 / 4%);
  --focus: #4e73c3;
  --cyan: #55dac7;
  --panel-radius: 12px;
}
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
:is(a,button,input,textarea,select,summary):focus-visible { outline-color: var(--focus); }

.sidebar {
  background: radial-gradient(ellipse at 0 0, #1d304d 0, transparent 52%),
    linear-gradient(165deg, #102234, #102436 62%, #101e30);
  border-inline-end: 1px solid #081b32;
}
.sidebar .brand {
  gap: 11px;
  padding: 19px 15px;
  border-bottom: 1px solid #334454;
}
.brand img { width: 36px; height: auto; }
.brand strong { font-size: 1.08rem; letter-spacing: .012em; font-weight: 710; }
.brand small { color: #b4c4d6; letter-spacing: .08em; }
.sidebar .nav-heading {
  display: flex; align-items: center; gap: 8px;
  margin: 13px 12px 7px; padding: 7px 9px;
  border: 1px solid #385164; border-radius: 6px;
  background: #233846; color: #e0edf1; font-size: .76rem;
}
.sidebar .nav-heading::before {
  content: ""; width: 9px; height: 9px; flex: none; border-radius: 2px;
  background: linear-gradient(90deg, #93dfd3 3px, transparent 3px 5px, #93dfd3 5px),
    linear-gradient(0deg, #93dfd3 3px, transparent 3px 5px, #93dfd3 5px);
}
.ws-nav-group { padding-block: 4px; }
.ws-nav-group summary { color: #aabdd0; font-size: .735rem; letter-spacing: .045em; }
.sidebar #nav a {
  position: relative; margin-block: 2px; padding: 6px 11px;
  border-radius: 6px; color: #d8e3ee; gap: 10px;
}
.sidebar #nav a .ic { color: #a5bbce; }
.sidebar #nav a:hover { background: #25384a; }
.sidebar #nav a[aria-current="page"] {
  color: #fff; background: linear-gradient(100deg, #294955, #263f55 80%);
  box-shadow: inset 2px 0 var(--cyan), inset 0 0 0 1px #456571;
}
.sidebar #nav a[aria-current="page"] .ic { color: #8eecdb; }
.sidebar #nav :focus-visible { outline-color: #91dace; }
.sidebar .sandbox { padding-block: 11px 3px; color: #b7cad8; }
.sidebar .status-dot { background: #65dfbf; box-shadow: 0 0 0 3px #214b4c; }

.top {
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 1px 0 rgb(33 64 95 / 3%);
}
.breadcrumb { gap: 10px; }
.breadcrumb span { color: #587189; }
.breadcrumb strong { color: #19314e; font-weight: 650; }
.rolebox .select-wrap { max-width: 100%; }
.rolebox select { max-width: 100%; font-weight: 600; background: #f5f8fc; border-color: #d5dfea; border-radius: 7px; }
.pagehead { margin-bottom: 16px; }
.pagehead h1 { color: #11263e; letter-spacing: -.035em; font-weight: 720; }
.pagehead p { color: #586e85; }

.card, .rd-object-head, .rd-sheet, .rd-brief {
  border-color: var(--line); border-radius: var(--panel-radius); box-shadow: var(--shadow);
}
.cardhead, .rd-sheet > h3 {
  background: linear-gradient(90deg, #fafcfe, #fff 56%);
  border-bottom-color: #e3eaf1;
}
.titlegroup > .ic { color: #38699b; }
.cardhead h2, .queue-head h2, .rd-sheet > h3 { color: #19314d; }
.hub-row, .queue-row, .ledger-row, .follow-row, .rd-link { border-color: #e5ebf1; }
:is(.hub-row,.queue-row,.ledger-row,.follow-row,.rd-link,.ws-docs > a,.ws-steps > a):hover { background: #f0f7fc; }
.btn { border-radius: 7px; border-color: #cbd8e4; }
.btn.primary, #home-query button {
  background: linear-gradient(120deg, #175b9d, #2658bc);
  border-color: #235ca9;
}
.btn.primary:hover:not(:disabled), #home-query button:hover:not(:disabled) { background: #174b95; }
.btn.subtle { color: #3159a1; background: #eff4ff; }
:is(.toolbar,.hub-toolbar,.ws-channel-tools) { background: #f8fafc; }
.search-field, .hub-filters .search-field { border-color: #cbd8e4; border-radius: 7px; }
.search-field:focus-within { outline-color: #dbe8f6; }
thead th, .ws-table thead th, .rd-scroll thead th, .queue-columns {
  color: #405776; background: #f0f4f9; font-weight: 610;
}
table tbody tr:hover { background: #f6faff; }
.tag, .hub-chip { border-radius: 5px; }
.tag.teal, .hub-chip.good { background: #e1f5ed; color: #116547; }
.tag.amber, .hub-chip.warn { background: #fff1d8; color: #7b4c0c; }
.tag.accent { background: #e9edff; color: #484d9c; }
:is(.hub-row-meta,.rd-type code,.object-path span,.ws-region strong) { font-variant-numeric: tabular-nums; }

/* The command surface has a quiet orbital motif isolated from typed or generated content. */
.home-ai {
  isolation: isolate; position: relative; overflow: hidden;
  padding: 16px 20px; border: 1px solid #254464; border-radius: var(--panel-radius);
  background: linear-gradient(108deg, #142c46 1%, #193957 57%, #263758);
  box-shadow: 0 3px 10px #203d5f12;
}
.home-ai::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 290px; height: 190px; right: -16px; top: -107px;
  transform: rotate(-17deg);
  background: radial-gradient(ellipse at 50% 50%, transparent 24%, #72e2d94a 24.6% 25%, transparent 25.6% 43%, #83c6eb55 43.6% 44%, transparent 44.6% 61%, #b1a9ff55 61.6% 62%, transparent 62.6%);
}
.home-ai-heading { gap: 10px; }
.home-ai-heading h2 { color: #fff; font-size: 1.1rem; }
.home-ai-heading > span:last-child { color: #ccdfed; }
.home-ai-mark {
  width: 30px; height: 30px;
  border: 1px solid #638caa; border-radius: 8px; background: #31576e;
  color: #9af0d9;
}
#home-query { min-height: 44px; border: 1px solid #adc4d8; border-radius: 8px; }
#home-query:focus-within { border-color: #61c8c0; box-shadow: 0 0 0 3px #67d6c433; }
#home-question { color: var(--ink); }
#home-question::placeholder { color: #556b83; }
#home-query button { margin: 3px; border-radius: 5px; }
#home-query button:disabled { background: #e1e9f3; color: #546984; opacity: 1; }
.home-ai .queue-question {
  border-color: #527088; background: #29465f; color: #f0f8ff; border-radius: 6px;
}
.home-ai .queue-question .ic { color: #9edacf; }
.home-ai .queue-question > span { color: #c9f1e6; border-color: #607d92; }
.home-ai .queue-question:hover, .home-ai .queue-question:focus-visible { background: #375570; border-color: #95bec8; }
.home-ai .secondary, .home-ai .queue-shortcuts > b { color: #d5e6f1; }

.metrics {
  overflow: hidden; gap: 0; border: 1px solid var(--line);
  border-radius: var(--panel-radius); background: #fff; box-shadow: var(--shadow);
}
.metrics .metric {
  border: 0; border-radius: 0; box-shadow: none; min-width: 0; padding: 13px 16px;
}
.metrics .metric + .metric { box-shadow: inset 1px 0 #e1e9f1; }
.metrics .metric:hover { background: #f5f9fd; }
.metric .metric-label { color: #45617e; font-weight: 570; }
.metric strong {
  margin-block: 5px 4px; color: #1b385b;
  letter-spacing: -.025em; line-height: 1.2; font-size: clamp(1.25rem, 2vw, 1.88rem);
}
.metrics .metric:first-child strong { color: #126a72; }
.metric small { color: #556c83; }
.ws-shortcuts { gap: 6px; padding: 1px 1px 0; }
.ws-shortcuts b { padding-right: 3px; color: #50667b; }
.ws-shortcuts a { border-color: #d2deea; border-radius: 6px; color: #2c4f72; }
.ws-shortcuts a:hover { background: #edf6f9; border-color: #9ec6cd; }

/* Process and document pages use the same visual language, with distinct AI and human lanes. */
.hub-symbol, .hub-doc, .rd-doc-icon, .file-icon, .ws-ai-icon {
  color: #315eb1; background: #edf3ff; border-radius: 8px;
}
.hub-symbol.support { color: #166a67; background: #e6f6f1; }
.hub-hero, .rd-object-head {
  background: linear-gradient(105deg, #eff6fc, #fff 68%); border-top: 0;
  box-shadow: inset 0 2px #467b99;
}
.hub-symbol.large { color: #e5ffff; background: #21465d; border-color: #2b5368; border-radius: 11px; }
.hub-kicker, .rd-type { color: #386b85; font-weight: 650; }
.hub-steps { background: #f7fafb; }
.hub-step-dot { background: #e3ebf2; color: #596b7d; }
.hub-steps li.current .hub-step-dot { background: #245b9a; box-shadow: 0 0 0 3px #dae6f2; }
.hub-steps li.done .hub-step-dot { background: #dcf3e9; color: #126653; }
.hub-cross { padding: 12px; background: #f6f9fc; border: 1px solid #e0e9f1; border-radius: 8px; }
.hub-cross-actor .hub-cross-mark { color: #514ba1; background: #eaeafe; }
.hub-cross-actor.human .hub-cross-mark { color: #10695c; background: #dbf1eb; }
.hub-kpi-track i, .ws-bar i { background: linear-gradient(90deg, #32679d, #39968e); }
.hub-facts dd, .rd-facts dd { color: #213d58; }
.hub-tabs button[aria-pressed=true], .ws-filter button[aria-pressed=true] { background: #e3eefb; color: #25599a; }
.rd-next { background: #f2f8fb; }
.rd-evidence { border-left-color: #7ea9c0; background: #f2f6f9; }
:is(.ws-table,.rd-scroll,.table-wrap) { scrollbar-width: thin; scrollbar-color: #bccddf transparent; }
.rank-report { border-color: var(--line); border-radius: var(--panel-radius); box-shadow: var(--shadow); }
.rank-report > header { background: linear-gradient(100deg, #edf4f9, #fbfcff); }
.rank-index { color: #49748a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.work-list .queue-amount { color: #1d4c68; font-weight: 670; }
.work-list .rank-next b { color: #226563; }
.work-list .rank-client { border-left: 1px solid #e2eaf0; padding-left: 10px; }
.queue-do { background: #edf4f9; color: #2c5879; border-color: #c5d8e4; border-radius: 6px; }

#assistant-launcher {
  border: 1px solid #426a8a; border-radius: 15px;
  background: linear-gradient(120deg, #19435a 0, #214b71 54%, #504887);
  box-shadow: 0 4px 14px #15335134, inset 0 1px #ffffff18;
}
#assistant-launcher:hover { background: #214969; }
#assistant-launcher > .ic { color: #9befd8; }
.assistant-drawer-head {
  background: linear-gradient(115deg, #15354a, #263c60); border: 0;
  box-shadow: inset 0 -1px #405870;
}
.assistant-drawer-head::before {
  content: ""; flex: none; width: 33px; height: 33px; border-radius: 8px;
  background: #315364 url("../mark.svg") center / 24px 22px no-repeat;
  box-shadow: inset 0 0 0 1px #658496;
}
.assistant-drawer-title strong { color: #f3f9ff; }
.assistant-drawer-title small { color: #c7d9e4; }
#assistant-dismiss { color: #d7e5ef; }
#assistant-dismiss:hover { color: white; background: #3c536c; }
#assistant-drawer .chat-intro > h3 { color: #1f3c53; }
#assistant-drawer .chat-intro .starter { background: #f6f9fd; border-color: #d9e5ef; box-shadow: none; }
#assistant-drawer .chat-intro .starter:hover { background: #ebf4fa; border-color: #a6c1d2; }
.msg.user .msg-content { background: #e8f1ff; border-color: #d6e3f6; border-radius: 11px 3px 11px 11px; }
#assistant-drawer .compose { border-color: #bccddf; }
#assistant-drawer .compose:focus-within { border-color: #4b85af; box-shadow: 0 0 0 2px #dcecf6; }
#assistant-drawer .query-context { background: #eef5fa; }
dialog { border-color: #bfcede; box-shadow: 0 20px 60px #0c233a36; }
.dialog-head { background: #f5f8fc; }
@media (max-width: 970px) {
  .sidebar #nav a { min-height: 35px; }
}
@media (max-width: 760px) {
  .metrics .metric { padding: 11px 12px; }
  .metrics .metric + .metric { box-shadow: none; }
  .metrics .metric:nth-child(even) { box-shadow: inset 1px 0 #e1e9f1; }
  .metrics .metric:nth-child(n + 3) { border-top: 1px solid #e1e9f1; }
  .metric .metric-label { flex-direction: row; align-items: center; }
  .metric strong { font-size: 1.34rem; }
  .home-ai { padding: 12px; }
  .home-ai::before { width: 160px; height: 130px; right: -54px; top: -82px; }
  .home-ai-heading { flex-wrap: wrap; gap: 6px 8px; }
  .home-ai-heading > span:last-child { font-size: .76rem; }
  .hub-cross { padding: 9px; }
  .rolebox { min-width: 0; }
  .top .breadcrumb { flex: 1; }
  .top .breadcrumb > span { flex-shrink: 0; }
  .assistant-drawer-head::before { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .starter, .queue-question, .sidebar #nav a { transition: background-color .14s, border-color .14s; }
}
