@skillre/dsh-plugin-work-dashboard 0.0.0-stage → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +259 -0
  3. package/README.md +371 -2
  4. package/UNINSTALL.md +7 -0
  5. package/compatibility.json +195 -0
  6. package/cordis.patch.yml +24 -0
  7. package/docs/DESIGN-0.3.md +122 -0
  8. package/docs/DETAIL.md +1 -0
  9. package/docs/DETAIL.zh.md +1 -0
  10. package/docs/PLAN-0.7-0.9.md +230 -0
  11. package/docs/preview.svg +254 -0
  12. package/docs/preview.zh.svg +254 -0
  13. package/icon.svg +17 -0
  14. package/lib/blockers.d.ts +45 -0
  15. package/lib/blockers.js +160 -0
  16. package/lib/client/api.d.ts +42 -0
  17. package/lib/client/api.js +45 -0
  18. package/lib/client/contracts.d.ts +94 -0
  19. package/lib/client/contracts.js +21 -0
  20. package/lib/client/css/base.d.ts +31 -0
  21. package/lib/client/css/base.js +461 -0
  22. package/lib/client/css/blockers.d.ts +18 -0
  23. package/lib/client/css/blockers.js +196 -0
  24. package/lib/client/css/charts.d.ts +14 -0
  25. package/lib/client/css/charts.js +191 -0
  26. package/lib/client/css/detail.d.ts +21 -0
  27. package/lib/client/css/detail.js +423 -0
  28. package/lib/client/css/insights.d.ts +27 -0
  29. package/lib/client/css/insights.js +660 -0
  30. package/lib/client/css/overview.d.ts +23 -0
  31. package/lib/client/css/overview.js +327 -0
  32. package/lib/client/css/summary.d.ts +13 -0
  33. package/lib/client/css/summary.js +187 -0
  34. package/lib/client/format.d.ts +57 -0
  35. package/lib/client/format.js +96 -0
  36. package/lib/client/preferences.d.ts +56 -0
  37. package/lib/client/preferences.js +118 -0
  38. package/lib/client/styles.d.ts +17 -0
  39. package/lib/client/styles.js +24 -0
  40. package/lib/client/text.d.ts +32 -0
  41. package/lib/client/text.js +1112 -0
  42. package/lib/client/view-contract.d.ts +118 -0
  43. package/lib/client/view-contract.js +28 -0
  44. package/lib/client.js +6599 -0
  45. package/lib/config.d.ts +61 -0
  46. package/lib/config.js +67 -0
  47. package/lib/form.d.ts +218 -0
  48. package/lib/form.js +1075 -0
  49. package/lib/gap.d.ts +60 -0
  50. package/lib/gap.js +227 -0
  51. package/lib/index.d.ts +40 -0
  52. package/lib/index.js +159 -0
  53. package/lib/repo.d.ts +124 -0
  54. package/lib/repo.js +407 -0
  55. package/lib/risks.d.ts +24 -0
  56. package/lib/risks.js +85 -0
  57. package/lib/skill.d.ts +94 -0
  58. package/lib/skill.js +220 -0
  59. package/lib/store.d.ts +63 -0
  60. package/lib/store.js +505 -0
  61. package/lib/timeline.d.ts +23 -0
  62. package/lib/timeline.js +93 -0
  63. package/lib/transport.d.ts +67 -0
  64. package/lib/transport.js +131 -0
  65. package/lib/types.d.ts +701 -0
  66. package/lib/types.js +78 -0
  67. package/locale/en.json +7 -0
  68. package/locale/zh.json +7 -0
  69. package/package.json +117 -4
  70. package/skills/poc-export/SKILL.md +81 -0
  71. package/skills/poc-export/scripts/export-form.mjs +654 -0
  72. package/skills/poc-ledger/SKILL.md +171 -0
  73. package/skills/poc-submit/SKILL.md +186 -0
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Structural mirrors of the DSH Client contracts this bundle consumes.
3
+ *
4
+ * Queried from the live 0.2.1-rc.5 runtime on 2026-11-05:
5
+ * - `ctx.slots` (provided by `@deepseek-ai/dsh-client-ui-renderer`'s SlotRegistry):
6
+ * `inject(key, callback)` waits for a slot declaration, `register(options,
7
+ * component)` registers one entry through the caller's Fiber.
8
+ * - `sidebar.panellist` is a `list` slot whose entries take `{ size, active }`
9
+ * and whose `id` addresses the matching `main` panel; `main` is a `keyed`
10
+ * slot selected by `ctx.layout.selectPanel(key)`.
11
+ * - `ctx.locale` (`@deepseek-ai/dsh-client-locale`): `register(ns, { zh, en })`,
12
+ * `bind(ns)`, `getSnapshot()` / `subscribe()` for reactive translation.
13
+ * - `ctx.connection` (`@deepseek-ai/dsh-client-connection`):
14
+ * `rpc.call(channel, endpoint, payload, signal)` resolving
15
+ * `{ ok: true, value } | { ok: false, error }`.
16
+ *
17
+ * Mirrored rather than imported so this package does not pull the whole client
18
+ * package graph into its own build. Re-query the live contracts before widening
19
+ * this surface, and treat a mismatch as a compatibility finding.
20
+ */
21
+ import type { ComponentType, ReactNode } from 'react';
22
+ /** One teardown callback returned by every registration. */
23
+ export type Disposer = () => void;
24
+ /** Registration options shared by the list and keyed slots used here. */
25
+ export interface SlotRegisterOptions {
26
+ /** Target slot name, e.g. `sidebar.panellist` or `main`. */
27
+ readonly name: string;
28
+ /** Cell id for list slots; a fresh id is added beside the shipped entries. */
29
+ readonly id?: string;
30
+ /** Panel key for keyed slots such as `main`. */
31
+ readonly key?: string;
32
+ /** Ascending position among the entries. */
33
+ readonly order?: number;
34
+ /** Display text where the owner projects one; a thunk follows the locale. */
35
+ readonly label?: string | (() => string);
36
+ }
37
+ /** The slot registry face a Client plugin uses. */
38
+ export interface SlotsLike {
39
+ /** Wait for a slot declaration, then run the registration callback. */
40
+ inject(slot: string, callback: () => Disposer | readonly Disposer[]): Disposer;
41
+ /** Register one contribution; returns its disposer. */
42
+ register<P>(options: SlotRegisterOptions, component: ComponentType<P> | ((props: P) => ReactNode)): Disposer;
43
+ }
44
+ /** Current locale snapshot as `ctx.locale.getSnapshot()` returns it. */
45
+ export interface ClientLocaleSnapshot {
46
+ /** Active locale id, e.g. `en` or `zh`. */
47
+ readonly active: string;
48
+ /** Every declared locale definition. */
49
+ readonly locales: readonly {
50
+ readonly id: string;
51
+ }[];
52
+ /** Bumped on every locale switch or dictionary registration. */
53
+ readonly revision: number;
54
+ }
55
+ /** The Client locale service face this bundle uses. */
56
+ export interface ClientLocaleLike {
57
+ /** Read the current locale snapshot (stable reference between changes). */
58
+ getSnapshot(): ClientLocaleSnapshot;
59
+ /** Observe locale switches and dictionary registrations. */
60
+ subscribe(listener: () => void): Disposer;
61
+ /** Register one namespace dictionary for one or more locales. */
62
+ register(namespace: string, locales: Record<string, Record<string, string>>): Disposer;
63
+ /** Bind a namespace to a translate function reading the active locale. */
64
+ bind(namespace: string): (key: string, params?: Record<string, string | number>) => string;
65
+ }
66
+ /** The result envelope Connection's browser RPC caller resolves. */
67
+ export type RpcResult<T> = {
68
+ readonly ok: true;
69
+ readonly value: T;
70
+ } | {
71
+ readonly ok: false;
72
+ readonly error: {
73
+ readonly code: string;
74
+ readonly message: string;
75
+ readonly details: Record<string, unknown>;
76
+ };
77
+ };
78
+ /** The Client connection face this bundle uses. */
79
+ export interface ClientConnectionLike {
80
+ readonly rpc: {
81
+ call<T>(channel: string, endpoint: string, payload: unknown, signal?: AbortSignal): Promise<RpcResult<T>>;
82
+ };
83
+ }
84
+ /** The restricted Client context handed to a module's `apply`. */
85
+ export interface ClientContext {
86
+ /** The slot registry service, a hard dependency of this module. */
87
+ readonly slots: SlotsLike;
88
+ /** The locale service, a hard dependency of this module. */
89
+ readonly locale: ClientLocaleLike;
90
+ /** The authenticated Host transport, a hard dependency of this module. */
91
+ readonly connection: ClientConnectionLike;
92
+ /** Register a resource owned by this plugin's Fiber; returns its disposer. */
93
+ effect(callback: () => Disposer | void, label?: string): Disposer;
94
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Structural mirrors of the DSH Client contracts this bundle consumes.
3
+ *
4
+ * Queried from the live 0.2.1-rc.5 runtime on 2026-11-05:
5
+ * - `ctx.slots` (provided by `@deepseek-ai/dsh-client-ui-renderer`'s SlotRegistry):
6
+ * `inject(key, callback)` waits for a slot declaration, `register(options,
7
+ * component)` registers one entry through the caller's Fiber.
8
+ * - `sidebar.panellist` is a `list` slot whose entries take `{ size, active }`
9
+ * and whose `id` addresses the matching `main` panel; `main` is a `keyed`
10
+ * slot selected by `ctx.layout.selectPanel(key)`.
11
+ * - `ctx.locale` (`@deepseek-ai/dsh-client-locale`): `register(ns, { zh, en })`,
12
+ * `bind(ns)`, `getSnapshot()` / `subscribe()` for reactive translation.
13
+ * - `ctx.connection` (`@deepseek-ai/dsh-client-connection`):
14
+ * `rpc.call(channel, endpoint, payload, signal)` resolving
15
+ * `{ ok: true, value } | { ok: false, error }`.
16
+ *
17
+ * Mirrored rather than imported so this package does not pull the whole client
18
+ * package graph into its own build. Re-query the live contracts before widening
19
+ * this surface, and treat a mismatch as a compatibility finding.
20
+ */
21
+ export {};
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Shell styles: the frame, the page chrome, the toolbar, and shared atoms.
3
+ *
4
+ * Design goals, in the order that drove the decisions:
5
+ *
6
+ * 1. **Depth through layering, not decoration.** Three surface levels
7
+ * (canvas → card → inset) with a single soft shadow ramp. A flat page reads
8
+ * "unstyled"; three tones read "designed" without adding visual noise.
9
+ * 2. **One accent, used sparingly.** The brand blue marks only the current
10
+ * selection, the active view and the primary action. Status colour
11
+ * (green/amber/red) is reserved for judgement — never for chrome.
12
+ * 3. **Density with air.** The ledger is data-heavy, so rows stay compact, but
13
+ * every section gets a real gap and a real heading hierarchy. Cramped and
14
+ * airy are both failures; the target is "scannable at 1440".
15
+ * 4. **Theme-native.** The frame uses `--dsw-alias-*` tokens so light and dark
16
+ * both work. The ledger's own palette (blue/green/amber/red from DESIGN.md)
17
+ * is literal, with dark-theme variants that stay legible.
18
+ * 5. **Chrome is one column.** Header, search, toolbar, body and footer share
19
+ * the same 32px gutter and the same stack, so the page reads as one
20
+ * instrument rather than a table wedged between two bars.
21
+ *
22
+ * This sheet owns ONLY the frame: `.page-*`, `.module-*`, `.toolbar-*`,
23
+ * `.filter-*`, `.view-*`, `.sort-*`, `.search-*`, `.btn`, `.empty-*`,
24
+ * `.failure`, `.modal-*`, and the shared `.chip` / `.status-pill` atoms.
25
+ * Charts, overview, detail and insights each ship their own sheet beside their
26
+ * component, and `styles.ts` concatenates all of them.
27
+ *
28
+ * Everything is scoped under `.wd-shell`, and the sheet lives in a `<style>`
29
+ * element React removes on unmount, so nothing leaks into product DOM.
30
+ */
31
+ export declare const BASE_CSS = "\n.wd-shell {\n /* Brand + status palette (DESIGN.md), with soft tints derived from each. */\n --wd-primary: #2864E8;\n --wd-primary-deep: #1B4FC2;\n --wd-primary-soft: rgba(40, 100, 232, .09);\n --wd-primary-ring: rgba(40, 100, 232, .26);\n --wd-text: #192638;\n --wd-bg: #F5F7FB;\n --wd-border: #E6EBF2;\n --wd-green: #218568;\n --wd-amber: #B77919;\n --wd-red: #C0392B;\n --wd-slate: #5A6A80;\n --wd-green-soft: rgba(33, 133, 104, .10);\n --wd-amber-soft: rgba(183, 121, 25, .11);\n --wd-red-soft: rgba(192, 57, 43, .10);\n --wd-slate-soft: rgba(90, 106, 128, .10);\n\n /* Surface ramp: canvas \u2192 card \u2192 inset. */\n --wd-canvas: #F5F7FB;\n --wd-surface: #FFFFFF;\n --wd-inset: #F7F9FC;\n --wd-hairline: #E6EBF2;\n\n /* One shadow ramp; three steps is enough for any depth in this UI. */\n --wd-shadow-1: 0 1px 2px rgba(20, 32, 52, .05);\n --wd-shadow-2: 0 2px 6px rgba(20, 32, 52, .07), 0 1px 2px rgba(20, 32, 52, .04);\n --wd-shadow-3: 0 10px 30px rgba(20, 32, 52, .12), 0 2px 8px rgba(20, 32, 52, .06);\n\n height: 100%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n background: var(--wd-canvas);\n color: var(--wd-text);\n font-family: 'Avenir Next', 'PingFang SC', system-ui, -apple-system, sans-serif;\n font-size: 13px;\n line-height: 20px;\n -webkit-font-smoothing: antialiased;\n}\nbody[data-ds-dark-theme] .wd-shell {\n --wd-text: #E8EDF5;\n --wd-bg: #14181F;\n --wd-border: #2A3341;\n --wd-green: #4FC59B;\n --wd-amber: #E0A94A;\n --wd-red: #F07A6B;\n --wd-slate: #97A6BA;\n --wd-primary: #6E9BFF;\n --wd-primary-deep: #8DB0FF;\n --wd-primary-soft: rgba(110, 155, 255, .14);\n --wd-primary-ring: rgba(110, 155, 255, .32);\n --wd-green-soft: rgba(79, 197, 155, .14);\n --wd-amber-soft: rgba(224, 169, 74, .16);\n --wd-red-soft: rgba(240, 122, 107, .14);\n --wd-slate-soft: rgba(151, 166, 186, .14);\n --wd-canvas: #14181F;\n --wd-surface: #1B2029;\n --wd-inset: #222834;\n --wd-hairline: #2A3341;\n --wd-shadow-1: 0 1px 2px rgba(0, 0, 0, .28);\n --wd-shadow-2: 0 2px 8px rgba(0, 0, 0, .34), 0 1px 2px rgba(0, 0, 0, .24);\n --wd-shadow-3: 0 12px 34px rgba(0, 0, 0, .48), 0 2px 8px rgba(0, 0, 0, .3);\n}\n.wd-shell *, .wd-shell *::before, .wd-shell *::after { box-sizing: border-box; }\n.wd-shell button, .wd-shell input, .wd-shell select { font: inherit; color: inherit; }\n.wd-shell:focus { outline: none; }\n\n/* ---------- shell: rail + canvas ---------- */\n.wd-shell .page { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }\n\n.wd-shell .module-rail {\n flex: 0 0 auto;\n display: flex; align-items: center; gap: 6px;\n padding: 10px 32px 0;\n}\n.wd-shell .module-tab {\n display: inline-flex; align-items: center; gap: 7px;\n height: 30px; padding: 0 12px;\n border: 1px solid transparent; border-radius: 8px 8px 0 0;\n background: transparent; color: var(--dsw-alias-label-secondary);\n cursor: pointer; font-size: 12.5px; font-weight: 500;\n border-bottom: 0; position: relative; top: 1px;\n}\n.wd-shell .module-tab[data-active=\"true\"] {\n background: var(--wd-surface); color: var(--wd-text);\n border-color: var(--wd-hairline); font-weight: 600;\n}\n.wd-shell .module-tab:not([data-active=\"true\"]):hover { background: var(--wd-primary-soft); color: var(--wd-text); }\n.wd-shell .module-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-primary); flex: none; }\n.wd-shell .module-tab[data-active=\"false\"] .module-tab-dot { background: var(--wd-slate); opacity: .55; }\n.wd-shell .module-rail-hint { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }\n\n/* ---------- page header ---------- */\n.wd-shell .page-header {\n flex: 0 0 auto;\n display: flex; align-items: flex-start; gap: 16px;\n padding: 14px 28px 12px;\n background: var(--wd-surface);\n border: 1px solid var(--wd-hairline);\n box-shadow: var(--wd-shadow-1);\n position: relative; z-index: 2;\n}\n.wd-shell .page-header-text { flex: 1 1 auto; min-width: 0; }\n.wd-shell .page-eyebrow {\n display: flex; align-items: center; gap: 6px;\n font-size: 11px; line-height: 16px; letter-spacing: .06em;\n text-transform: uppercase; color: var(--dsw-alias-label-tertiary);\n margin: 0 0 3px;\n}\n.wd-shell .page-title {\n margin: 0; font-size: 19px; line-height: 25px; font-weight: 650;\n letter-spacing: -.01em; display: flex; align-items: center; gap: 10px;\n}\n.wd-shell .page-subtitle { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); }\n.wd-shell .page-source {\n margin: 4px 0 0; font-size: 10.5px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary);\n display: flex; gap: 7px; flex-wrap: wrap; align-items: center;\n}\n.wd-shell .page-source code {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;\n padding: 2px 7px; border-radius: 5px;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n}\n.wd-shell .header-actions { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }\n.wd-shell .page-body {\n flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;\n padding: 16px 28px 36px;\n}\n.wd-shell .detail-body {\n flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;\n padding: 0;\n}\n.wd-shell .page-footer {\n flex: 0 0 auto; display: flex; align-items: center; gap: 10px;\n padding: 8px 32px; min-height: 32px;\n border-top: 1px solid var(--wd-hairline);\n background: var(--wd-surface);\n font-size: 11.5px; color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .page-footer .spacer { flex: 1 1 auto; }\n\n/* ---------- search (inside the toolbar) ---------- */\n.wd-shell .search-box {\n position: relative; display: flex; align-items: center;\n width: min(300px, 100%); flex: 0 1 300px;\n height: 28px; padding: 0 9px 0 27px;\n border: 1px solid var(--wd-hairline); border-radius: 9px;\n background: var(--wd-inset);\n transition: border-color .13s ease, background .13s ease, box-shadow .13s ease;\n}\n.wd-shell .search-box:focus-within {\n border-color: var(--wd-primary); background: var(--wd-surface);\n box-shadow: 0 0 0 3px var(--wd-primary-soft);\n}\n.wd-shell .search-glyph {\n position: absolute; left: 9px; top: 50%; transform: translateY(-50%);\n font-size: 14px; line-height: 1; color: var(--dsw-alias-label-tertiary);\n pointer-events: none;\n}\n.wd-shell .search-input {\n flex: 1 1 auto; min-width: 0; height: 100%;\n border: 0; background: transparent; outline: none;\n font-size: 12.5px;\n}\n.wd-shell .search-input::placeholder { color: var(--dsw-alias-label-tertiary); }\n.wd-shell .search-input::-webkit-search-cancel-button { display: none; }\n.wd-shell .search-clear {\n flex: none; width: 18px; height: 18px; border-radius: 50%;\n border: 0; background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);\n font-size: 12px; line-height: 1; cursor: pointer;\n display: flex; align-items: center; justify-content: center;\n}\n.wd-shell .search-clear:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }\n.wd-shell .footer-hint { font-size: 10px; color: var(--dsw-alias-label-tertiary); white-space: nowrap; }\n\n/* ---------- toolbar ---------- */\n.wd-shell .toolbar {\n flex: 0 0 auto;\n display: flex; flex-direction: column; gap: 6px;\n padding: 8px 28px 9px;\n background: var(--wd-surface);\n border-bottom: 1px solid var(--wd-hairline);\n box-shadow: var(--wd-shadow-1);\n position: relative; z-index: 1;\n}\n.wd-shell .toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; }\n/* The filter strip is ONE scrolling line. Wrapping it onto three lines cost the\n project list most of the first screen, which is the opposite of the point. */\n.wd-shell .toolbar-row-filters {\n gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;\n padding-bottom: 2px; scrollbar-width: thin;\n}\n.wd-shell .toolbar-row-filters .toolbar-group { flex: none; }\n.wd-shell .toolbar-group { display: flex; align-items: center; gap: 7px; min-width: 0; }\n.wd-shell .toolbar-group-label {\n flex: none; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;\n color: var(--dsw-alias-label-tertiary); font-weight: 600;\n}\n.wd-shell .chip-scroll { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; min-width: 0; }\n.wd-shell .filter-chip {\n display: inline-flex; align-items: center; gap: 5px;\n height: 24px; padding: 0 9px;\n border: 1px solid var(--wd-hairline); border-radius: 20px;\n background: var(--wd-surface); color: var(--dsw-alias-label-secondary);\n font-size: 11.5px; cursor: pointer; white-space: nowrap;\n transition: background .12s ease, border-color .12s ease, color .12s ease;\n}\n.wd-shell .filter-chip:hover:not([disabled]) { background: var(--wd-inset); color: var(--wd-text); }\n.wd-shell .filter-chip[data-active=\"true\"] {\n background: var(--wd-primary-soft); border-color: var(--wd-primary);\n color: var(--wd-primary); font-weight: 600;\n}\n.wd-shell .filter-chip[disabled] { opacity: .4; cursor: default; }\n.wd-shell .filter-chip-count {\n font-size: 10px; font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-tertiary); font-weight: 500;\n}\n.wd-shell .filter-chip[data-active=\"true\"] .filter-chip-count { color: var(--wd-primary); }\n.wd-shell .view-switch {\n display: inline-flex; align-items: center; padding: 2px;\n border: 1px solid var(--wd-hairline); border-radius: 9px;\n background: var(--wd-inset); gap: 2px;\n}\n.wd-shell .view-switch-btn {\n height: 24px; padding: 0 11px; border: 0; border-radius: 7px;\n background: transparent; color: var(--dsw-alias-label-secondary);\n font-size: 11.5px; cursor: pointer; white-space: nowrap;\n transition: background .12s ease, color .12s ease, box-shadow .12s ease;\n}\n.wd-shell .view-switch-btn:hover:not([data-active=\"true\"]) { color: var(--wd-text); }\n.wd-shell .view-switch-btn[data-active=\"true\"] {\n background: var(--wd-surface); color: var(--wd-text); font-weight: 600;\n box-shadow: var(--wd-shadow-1);\n}\n.wd-shell .sort-switch { display: inline-flex; align-items: center; gap: 4px; }\n.wd-shell .sort-select {\n height: 26px; padding: 0 8px; border-radius: 7px;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n color: var(--dsw-alias-label-secondary); font-size: 11.5px; cursor: pointer;\n}\n.wd-shell .sort-select:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }\n.wd-shell .toolbar-result { margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n\n/* ---------- buttons ---------- */\n.wd-shell .btn {\n height: 30px; padding: 0 12px;\n display: inline-flex; align-items: center; gap: 6px;\n border-radius: 8px; border: 1px solid var(--wd-hairline);\n background: var(--wd-surface); color: var(--dsw-alias-label-secondary);\n cursor: pointer; white-space: nowrap; font-size: 12.5px;\n transition: background .13s ease, border-color .13s ease, box-shadow .13s ease, transform .06s ease;\n box-shadow: var(--wd-shadow-1);\n}\n.wd-shell .btn:hover:not([disabled]) {\n background: var(--wd-inset); color: var(--wd-text);\n border-color: var(--dsw-alias-border-l2); box-shadow: var(--wd-shadow-2);\n}\n.wd-shell .btn:active:not([disabled]) { transform: translateY(1px); box-shadow: var(--wd-shadow-1); }\n.wd-shell .btn:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 2px; }\n.wd-shell .btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }\n.wd-shell .btn-primary {\n background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);\n border-color: transparent; color: #fff; font-weight: 550;\n box-shadow: 0 1px 2px rgba(40, 100, 232, .3), 0 4px 12px rgba(40, 100, 232, .18);\n}\n.wd-shell .btn-primary:hover:not([disabled]) {\n background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);\n color: #fff; filter: brightness(1.07);\n box-shadow: 0 2px 4px rgba(40, 100, 232, .32), 0 8px 20px rgba(40, 100, 232, .22);\n}\n.wd-shell .btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }\n.wd-shell .btn-ghost:hover:not([disabled]) { background: var(--wd-inset); box-shadow: none; }\n.wd-shell .btn-small { height: 25px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }\n.wd-shell .btn-icon { width: 26px; padding: 0; justify-content: center; font-size: 12px; }\n\n/* ---------- shared atoms ---------- */\n.wd-shell .chip {\n display: inline-flex; align-items: center; gap: 4px;\n padding: 2px 9px; border-radius: 20px; font-size: 11.5px; line-height: 18px;\n background: var(--wd-inset); color: var(--dsw-alias-label-secondary);\n border: 1px solid var(--wd-hairline);\n}\n.wd-shell .chip-row { display: flex; flex-wrap: wrap; gap: 6px; }\n.wd-shell .chip-button { border: 0; cursor: pointer; font-family: inherit; }\n.wd-shell .chip-button:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }\n.wd-shell .status-pill {\n display: inline-flex; align-items: center; gap: 5px;\n height: 21px; padding: 0 9px; border-radius: 20px;\n font-size: 11px; font-weight: 550; white-space: nowrap;\n background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);\n}\n.wd-shell .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-slate); flex: none; }\n.wd-shell .tone-blue { background: var(--wd-primary-soft); color: var(--wd-primary); }\n.wd-shell .tone-blue .status-dot { background: var(--wd-primary); }\n.wd-shell .tone-green { background: var(--wd-green-soft); color: var(--wd-green); }\n.wd-shell .tone-green .status-dot { background: var(--wd-green); }\n.wd-shell .tone-amber { background: var(--wd-amber-soft); color: var(--wd-amber); }\n.wd-shell .tone-amber .status-dot { background: var(--wd-amber); }\n.wd-shell .tone-red { background: var(--wd-red-soft); color: var(--wd-red); }\n.wd-shell .tone-red .status-dot { background: var(--wd-red); }\n.wd-shell .tone-slate { background: var(--wd-slate-soft); color: var(--wd-slate); }\n.wd-shell .tone-slate .status-dot { background: var(--wd-slate); }\n.wd-shell .is-muted { color: var(--dsw-alias-label-tertiary); font-style: italic; }\n.wd-shell .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }\n.wd-shell .prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 19px; color: var(--dsw-alias-label-secondary); }\n\n/* ---------- empty / failure ---------- */\n.wd-shell .empty-state {\n margin: 0 auto; max-width: 440px; padding: 56px 24px;\n text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px;\n}\n.wd-shell .empty-icon {\n width: 76px; height: 76px; border-radius: 18px;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n display: flex; align-items: center; justify-content: center;\n color: var(--dsw-alias-label-tertiary); margin-bottom: 10px;\n box-shadow: var(--wd-shadow-2);\n}\n.wd-shell .empty-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 650; }\n.wd-shell .empty-copy { margin: 0 0 12px; font-size: 12.5px; line-height: 19px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n.wd-shell .empty-meta { margin-top: 16px; font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }\n.wd-shell .failure {\n border: 1px solid var(--wd-red-soft); border-radius: 10px;\n background: var(--wd-red-soft); padding: 13px 15px;\n display: flex; align-items: flex-start; gap: 11px;\n border-left: 3px solid var(--wd-red);\n}\n.wd-shell .failure-text { min-width: 0; flex: 1 1 auto; }\n.wd-shell .failure-title { font-size: 13px; line-height: 19px; font-weight: 650; color: var(--wd-red); }\n.wd-shell .failure-reason { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n.wd-shell .spinner {\n display: inline-block; width: 12px; height: 12px;\n border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;\n animation: wd-spin .9s linear infinite; opacity: .8;\n}\n@keyframes wd-spin { to { transform: rotate(360deg); } }\n\n/* ---------- settings modal ---------- */\n.wd-shell .modal-overlay {\n position: fixed; inset: 0; z-index: 40;\n display: flex; align-items: center; justify-content: center; padding: 24px;\n background: rgba(12, 18, 28, .46);\n backdrop-filter: blur(2px);\n}\n.wd-shell .modal {\n width: min(452px, 100%); max-height: 86vh;\n display: flex; flex-direction: column;\n border-radius: 14px; border: 1px solid var(--dsw-alias-border-l2);\n background: var(--wd-surface);\n box-shadow: var(--wd-shadow-3);\n overflow: hidden;\n}\n.wd-shell .modal-header { display: flex; align-items: center; gap: 9px; padding: 15px 19px; border-bottom: 1px solid var(--wd-hairline); }\n.wd-shell .modal-title { margin: 0; font-size: 14.5px; line-height: 21px; font-weight: 650; }\n.wd-shell .modal-content { padding: 15px 19px; display: flex; flex-direction: column; gap: 5px; overflow: auto; }\n.wd-shell .modal-footer { display: flex; align-items: center; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--wd-hairline); background: var(--wd-inset); }\n.wd-shell .modal-footer .spacer { flex: 1 1 auto; }\n/* The export dialog needs a wider box: it lists projects, and 452px clipped the\n company name on every row. */\n.wd-shell .modal-wide { width: min(560px, 100%); }\n.wd-shell .modal-lead {\n margin: 0 0 4px; font-size: 12px; line-height: 18px;\n color: var(--dsw-alias-label-secondary);\n}\n.wd-shell .export-toolbar {\n display: flex; align-items: center; gap: 7px;\n padding: 8px 0 6px;\n}\n.wd-shell .export-count {\n margin-left: auto; font-size: 11px; line-height: 16px;\n color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;\n}\n.wd-shell .export-list {\n list-style: none; margin: 0; padding: 0;\n max-height: 42vh; overflow: auto;\n border: 1px solid var(--wd-hairline); border-radius: 9px;\n}\n.wd-shell .export-row {\n display: flex; align-items: flex-start; gap: 9px;\n padding: 8px 11px; cursor: pointer;\n border-bottom: 1px solid var(--wd-hairline);\n transition: background .11s ease;\n}\n.wd-shell .export-list li:last-child .export-row { border-bottom: 0; }\n.wd-shell .export-row:hover { background: var(--wd-inset); }\n.wd-shell .export-row[data-selected=\"true\"] { background: var(--wd-primary-soft); }\n.wd-shell .export-row input[type=\"checkbox\"] { accent-color: var(--wd-primary); flex: none; margin: 2px 0 0; }\n.wd-shell .export-row-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }\n.wd-shell .export-row-name {\n font-size: 12px; line-height: 17px; font-weight: 600; color: var(--wd-text);\n overflow-wrap: anywhere;\n}\n.wd-shell .export-row-meta {\n font-size: 10.5px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;\n}\n.wd-shell .checkbox-row {\n display: flex; align-items: center; gap: 10px;\n padding: 9px 11px; border-radius: 8px; cursor: pointer;\n border: 1px solid transparent; transition: background .11s ease, border-color .11s ease;\n}\n.wd-shell .checkbox-row:hover { background: var(--wd-inset); }\n.wd-shell .checkbox-row[data-selected=\"true\"] { border-color: var(--wd-hairline); background: var(--wd-inset); }\n.wd-shell .checkbox-row input[type=\"radio\"] { accent-color: var(--wd-primary); flex: none; margin: 0; }\n.wd-shell .field { display: flex; flex-direction: column; gap: 5px; }\n.wd-shell .field-label { font-size: 12px; color: var(--dsw-alias-label-secondary); }\n.wd-shell .input {\n height: 30px; width: 94px; padding: 0 10px; border-radius: 8px;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n color: var(--wd-text); font-variant-numeric: tabular-nums;\n}\n.wd-shell .input:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }\n.wd-shell .form-error { margin: 2px 0 0; font-size: 11.5px; color: var(--wd-red); }\n.wd-shell .inline-field { display: flex; align-items: center; gap: 9px; padding: 4px 11px 4px 35px; }\n.wd-shell .helper-box {\n margin-top: 7px; padding: 9px 11px; border-radius: 8px;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-tertiary);\n}\n\n/* ---------- sidebar glyph ---------- */\n.wd-glyph { display: block; }\n\n@media (prefers-reduced-motion: reduce) {\n .wd-shell .spinner { animation-duration: 2.4s; }\n .wd-shell .btn, .wd-shell .filter-chip, .wd-shell .search-box, .wd-shell .view-switch-btn { transition: none; }\n}\n";
@@ -0,0 +1,461 @@
1
+ /**
2
+ * Shell styles: the frame, the page chrome, the toolbar, and shared atoms.
3
+ *
4
+ * Design goals, in the order that drove the decisions:
5
+ *
6
+ * 1. **Depth through layering, not decoration.** Three surface levels
7
+ * (canvas → card → inset) with a single soft shadow ramp. A flat page reads
8
+ * "unstyled"; three tones read "designed" without adding visual noise.
9
+ * 2. **One accent, used sparingly.** The brand blue marks only the current
10
+ * selection, the active view and the primary action. Status colour
11
+ * (green/amber/red) is reserved for judgement — never for chrome.
12
+ * 3. **Density with air.** The ledger is data-heavy, so rows stay compact, but
13
+ * every section gets a real gap and a real heading hierarchy. Cramped and
14
+ * airy are both failures; the target is "scannable at 1440".
15
+ * 4. **Theme-native.** The frame uses `--dsw-alias-*` tokens so light and dark
16
+ * both work. The ledger's own palette (blue/green/amber/red from DESIGN.md)
17
+ * is literal, with dark-theme variants that stay legible.
18
+ * 5. **Chrome is one column.** Header, search, toolbar, body and footer share
19
+ * the same 32px gutter and the same stack, so the page reads as one
20
+ * instrument rather than a table wedged between two bars.
21
+ *
22
+ * This sheet owns ONLY the frame: `.page-*`, `.module-*`, `.toolbar-*`,
23
+ * `.filter-*`, `.view-*`, `.sort-*`, `.search-*`, `.btn`, `.empty-*`,
24
+ * `.failure`, `.modal-*`, and the shared `.chip` / `.status-pill` atoms.
25
+ * Charts, overview, detail and insights each ship their own sheet beside their
26
+ * component, and `styles.ts` concatenates all of them.
27
+ *
28
+ * Everything is scoped under `.wd-shell`, and the sheet lives in a `<style>`
29
+ * element React removes on unmount, so nothing leaks into product DOM.
30
+ */
31
+ export const BASE_CSS = `
32
+ .wd-shell {
33
+ /* Brand + status palette (DESIGN.md), with soft tints derived from each. */
34
+ --wd-primary: #2864E8;
35
+ --wd-primary-deep: #1B4FC2;
36
+ --wd-primary-soft: rgba(40, 100, 232, .09);
37
+ --wd-primary-ring: rgba(40, 100, 232, .26);
38
+ --wd-text: #192638;
39
+ --wd-bg: #F5F7FB;
40
+ --wd-border: #E6EBF2;
41
+ --wd-green: #218568;
42
+ --wd-amber: #B77919;
43
+ --wd-red: #C0392B;
44
+ --wd-slate: #5A6A80;
45
+ --wd-green-soft: rgba(33, 133, 104, .10);
46
+ --wd-amber-soft: rgba(183, 121, 25, .11);
47
+ --wd-red-soft: rgba(192, 57, 43, .10);
48
+ --wd-slate-soft: rgba(90, 106, 128, .10);
49
+
50
+ /* Surface ramp: canvas → card → inset. */
51
+ --wd-canvas: #F5F7FB;
52
+ --wd-surface: #FFFFFF;
53
+ --wd-inset: #F7F9FC;
54
+ --wd-hairline: #E6EBF2;
55
+
56
+ /* One shadow ramp; three steps is enough for any depth in this UI. */
57
+ --wd-shadow-1: 0 1px 2px rgba(20, 32, 52, .05);
58
+ --wd-shadow-2: 0 2px 6px rgba(20, 32, 52, .07), 0 1px 2px rgba(20, 32, 52, .04);
59
+ --wd-shadow-3: 0 10px 30px rgba(20, 32, 52, .12), 0 2px 8px rgba(20, 32, 52, .06);
60
+
61
+ height: 100%;
62
+ display: flex;
63
+ flex-direction: column;
64
+ overflow: hidden;
65
+ background: var(--wd-canvas);
66
+ color: var(--wd-text);
67
+ font-family: 'Avenir Next', 'PingFang SC', system-ui, -apple-system, sans-serif;
68
+ font-size: 13px;
69
+ line-height: 20px;
70
+ -webkit-font-smoothing: antialiased;
71
+ }
72
+ body[data-ds-dark-theme] .wd-shell {
73
+ --wd-text: #E8EDF5;
74
+ --wd-bg: #14181F;
75
+ --wd-border: #2A3341;
76
+ --wd-green: #4FC59B;
77
+ --wd-amber: #E0A94A;
78
+ --wd-red: #F07A6B;
79
+ --wd-slate: #97A6BA;
80
+ --wd-primary: #6E9BFF;
81
+ --wd-primary-deep: #8DB0FF;
82
+ --wd-primary-soft: rgba(110, 155, 255, .14);
83
+ --wd-primary-ring: rgba(110, 155, 255, .32);
84
+ --wd-green-soft: rgba(79, 197, 155, .14);
85
+ --wd-amber-soft: rgba(224, 169, 74, .16);
86
+ --wd-red-soft: rgba(240, 122, 107, .14);
87
+ --wd-slate-soft: rgba(151, 166, 186, .14);
88
+ --wd-canvas: #14181F;
89
+ --wd-surface: #1B2029;
90
+ --wd-inset: #222834;
91
+ --wd-hairline: #2A3341;
92
+ --wd-shadow-1: 0 1px 2px rgba(0, 0, 0, .28);
93
+ --wd-shadow-2: 0 2px 8px rgba(0, 0, 0, .34), 0 1px 2px rgba(0, 0, 0, .24);
94
+ --wd-shadow-3: 0 12px 34px rgba(0, 0, 0, .48), 0 2px 8px rgba(0, 0, 0, .3);
95
+ }
96
+ .wd-shell *, .wd-shell *::before, .wd-shell *::after { box-sizing: border-box; }
97
+ .wd-shell button, .wd-shell input, .wd-shell select { font: inherit; color: inherit; }
98
+ .wd-shell:focus { outline: none; }
99
+
100
+ /* ---------- shell: rail + canvas ---------- */
101
+ .wd-shell .page { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
102
+
103
+ .wd-shell .module-rail {
104
+ flex: 0 0 auto;
105
+ display: flex; align-items: center; gap: 6px;
106
+ padding: 10px 32px 0;
107
+ }
108
+ .wd-shell .module-tab {
109
+ display: inline-flex; align-items: center; gap: 7px;
110
+ height: 30px; padding: 0 12px;
111
+ border: 1px solid transparent; border-radius: 8px 8px 0 0;
112
+ background: transparent; color: var(--dsw-alias-label-secondary);
113
+ cursor: pointer; font-size: 12.5px; font-weight: 500;
114
+ border-bottom: 0; position: relative; top: 1px;
115
+ }
116
+ .wd-shell .module-tab[data-active="true"] {
117
+ background: var(--wd-surface); color: var(--wd-text);
118
+ border-color: var(--wd-hairline); font-weight: 600;
119
+ }
120
+ .wd-shell .module-tab:not([data-active="true"]):hover { background: var(--wd-primary-soft); color: var(--wd-text); }
121
+ .wd-shell .module-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-primary); flex: none; }
122
+ .wd-shell .module-tab[data-active="false"] .module-tab-dot { background: var(--wd-slate); opacity: .55; }
123
+ .wd-shell .module-rail-hint { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }
124
+
125
+ /* ---------- page header ---------- */
126
+ .wd-shell .page-header {
127
+ flex: 0 0 auto;
128
+ display: flex; align-items: flex-start; gap: 16px;
129
+ padding: 14px 28px 12px;
130
+ background: var(--wd-surface);
131
+ border: 1px solid var(--wd-hairline);
132
+ box-shadow: var(--wd-shadow-1);
133
+ position: relative; z-index: 2;
134
+ }
135
+ .wd-shell .page-header-text { flex: 1 1 auto; min-width: 0; }
136
+ .wd-shell .page-eyebrow {
137
+ display: flex; align-items: center; gap: 6px;
138
+ font-size: 11px; line-height: 16px; letter-spacing: .06em;
139
+ text-transform: uppercase; color: var(--dsw-alias-label-tertiary);
140
+ margin: 0 0 3px;
141
+ }
142
+ .wd-shell .page-title {
143
+ margin: 0; font-size: 19px; line-height: 25px; font-weight: 650;
144
+ letter-spacing: -.01em; display: flex; align-items: center; gap: 10px;
145
+ }
146
+ .wd-shell .page-subtitle { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); }
147
+ .wd-shell .page-source {
148
+ margin: 4px 0 0; font-size: 10.5px; line-height: 15px;
149
+ color: var(--dsw-alias-label-tertiary);
150
+ display: flex; gap: 7px; flex-wrap: wrap; align-items: center;
151
+ }
152
+ .wd-shell .page-source code {
153
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
154
+ padding: 2px 7px; border-radius: 5px;
155
+ background: var(--wd-inset); border: 1px solid var(--wd-hairline);
156
+ }
157
+ .wd-shell .header-actions { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
158
+ .wd-shell .page-body {
159
+ flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;
160
+ padding: 16px 28px 36px;
161
+ }
162
+ .wd-shell .detail-body {
163
+ flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;
164
+ padding: 0;
165
+ }
166
+ .wd-shell .page-footer {
167
+ flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
168
+ padding: 8px 32px; min-height: 32px;
169
+ border-top: 1px solid var(--wd-hairline);
170
+ background: var(--wd-surface);
171
+ font-size: 11.5px; color: var(--dsw-alias-label-tertiary);
172
+ }
173
+ .wd-shell .page-footer .spacer { flex: 1 1 auto; }
174
+
175
+ /* ---------- search (inside the toolbar) ---------- */
176
+ .wd-shell .search-box {
177
+ position: relative; display: flex; align-items: center;
178
+ width: min(300px, 100%); flex: 0 1 300px;
179
+ height: 28px; padding: 0 9px 0 27px;
180
+ border: 1px solid var(--wd-hairline); border-radius: 9px;
181
+ background: var(--wd-inset);
182
+ transition: border-color .13s ease, background .13s ease, box-shadow .13s ease;
183
+ }
184
+ .wd-shell .search-box:focus-within {
185
+ border-color: var(--wd-primary); background: var(--wd-surface);
186
+ box-shadow: 0 0 0 3px var(--wd-primary-soft);
187
+ }
188
+ .wd-shell .search-glyph {
189
+ position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
190
+ font-size: 14px; line-height: 1; color: var(--dsw-alias-label-tertiary);
191
+ pointer-events: none;
192
+ }
193
+ .wd-shell .search-input {
194
+ flex: 1 1 auto; min-width: 0; height: 100%;
195
+ border: 0; background: transparent; outline: none;
196
+ font-size: 12.5px;
197
+ }
198
+ .wd-shell .search-input::placeholder { color: var(--dsw-alias-label-tertiary); }
199
+ .wd-shell .search-input::-webkit-search-cancel-button { display: none; }
200
+ .wd-shell .search-clear {
201
+ flex: none; width: 18px; height: 18px; border-radius: 50%;
202
+ border: 0; background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);
203
+ font-size: 12px; line-height: 1; cursor: pointer;
204
+ display: flex; align-items: center; justify-content: center;
205
+ }
206
+ .wd-shell .search-clear:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }
207
+ .wd-shell .footer-hint { font-size: 10px; color: var(--dsw-alias-label-tertiary); white-space: nowrap; }
208
+
209
+ /* ---------- toolbar ---------- */
210
+ .wd-shell .toolbar {
211
+ flex: 0 0 auto;
212
+ display: flex; flex-direction: column; gap: 6px;
213
+ padding: 8px 28px 9px;
214
+ background: var(--wd-surface);
215
+ border-bottom: 1px solid var(--wd-hairline);
216
+ box-shadow: var(--wd-shadow-1);
217
+ position: relative; z-index: 1;
218
+ }
219
+ .wd-shell .toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; }
220
+ /* The filter strip is ONE scrolling line. Wrapping it onto three lines cost the
221
+ project list most of the first screen, which is the opposite of the point. */
222
+ .wd-shell .toolbar-row-filters {
223
+ gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
224
+ padding-bottom: 2px; scrollbar-width: thin;
225
+ }
226
+ .wd-shell .toolbar-row-filters .toolbar-group { flex: none; }
227
+ .wd-shell .toolbar-group { display: flex; align-items: center; gap: 7px; min-width: 0; }
228
+ .wd-shell .toolbar-group-label {
229
+ flex: none; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
230
+ color: var(--dsw-alias-label-tertiary); font-weight: 600;
231
+ }
232
+ .wd-shell .chip-scroll { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; min-width: 0; }
233
+ .wd-shell .filter-chip {
234
+ display: inline-flex; align-items: center; gap: 5px;
235
+ height: 24px; padding: 0 9px;
236
+ border: 1px solid var(--wd-hairline); border-radius: 20px;
237
+ background: var(--wd-surface); color: var(--dsw-alias-label-secondary);
238
+ font-size: 11.5px; cursor: pointer; white-space: nowrap;
239
+ transition: background .12s ease, border-color .12s ease, color .12s ease;
240
+ }
241
+ .wd-shell .filter-chip:hover:not([disabled]) { background: var(--wd-inset); color: var(--wd-text); }
242
+ .wd-shell .filter-chip[data-active="true"] {
243
+ background: var(--wd-primary-soft); border-color: var(--wd-primary);
244
+ color: var(--wd-primary); font-weight: 600;
245
+ }
246
+ .wd-shell .filter-chip[disabled] { opacity: .4; cursor: default; }
247
+ .wd-shell .filter-chip-count {
248
+ font-size: 10px; font-variant-numeric: tabular-nums;
249
+ color: var(--dsw-alias-label-tertiary); font-weight: 500;
250
+ }
251
+ .wd-shell .filter-chip[data-active="true"] .filter-chip-count { color: var(--wd-primary); }
252
+ .wd-shell .view-switch {
253
+ display: inline-flex; align-items: center; padding: 2px;
254
+ border: 1px solid var(--wd-hairline); border-radius: 9px;
255
+ background: var(--wd-inset); gap: 2px;
256
+ }
257
+ .wd-shell .view-switch-btn {
258
+ height: 24px; padding: 0 11px; border: 0; border-radius: 7px;
259
+ background: transparent; color: var(--dsw-alias-label-secondary);
260
+ font-size: 11.5px; cursor: pointer; white-space: nowrap;
261
+ transition: background .12s ease, color .12s ease, box-shadow .12s ease;
262
+ }
263
+ .wd-shell .view-switch-btn:hover:not([data-active="true"]) { color: var(--wd-text); }
264
+ .wd-shell .view-switch-btn[data-active="true"] {
265
+ background: var(--wd-surface); color: var(--wd-text); font-weight: 600;
266
+ box-shadow: var(--wd-shadow-1);
267
+ }
268
+ .wd-shell .sort-switch { display: inline-flex; align-items: center; gap: 4px; }
269
+ .wd-shell .sort-select {
270
+ height: 26px; padding: 0 8px; border-radius: 7px;
271
+ border: 1px solid var(--wd-hairline); background: var(--wd-surface);
272
+ color: var(--dsw-alias-label-secondary); font-size: 11.5px; cursor: pointer;
273
+ }
274
+ .wd-shell .sort-select:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }
275
+ .wd-shell .toolbar-result { margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
276
+
277
+ /* ---------- buttons ---------- */
278
+ .wd-shell .btn {
279
+ height: 30px; padding: 0 12px;
280
+ display: inline-flex; align-items: center; gap: 6px;
281
+ border-radius: 8px; border: 1px solid var(--wd-hairline);
282
+ background: var(--wd-surface); color: var(--dsw-alias-label-secondary);
283
+ cursor: pointer; white-space: nowrap; font-size: 12.5px;
284
+ transition: background .13s ease, border-color .13s ease, box-shadow .13s ease, transform .06s ease;
285
+ box-shadow: var(--wd-shadow-1);
286
+ }
287
+ .wd-shell .btn:hover:not([disabled]) {
288
+ background: var(--wd-inset); color: var(--wd-text);
289
+ border-color: var(--dsw-alias-border-l2); box-shadow: var(--wd-shadow-2);
290
+ }
291
+ .wd-shell .btn:active:not([disabled]) { transform: translateY(1px); box-shadow: var(--wd-shadow-1); }
292
+ .wd-shell .btn:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 2px; }
293
+ .wd-shell .btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }
294
+ .wd-shell .btn-primary {
295
+ background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);
296
+ border-color: transparent; color: #fff; font-weight: 550;
297
+ box-shadow: 0 1px 2px rgba(40, 100, 232, .3), 0 4px 12px rgba(40, 100, 232, .18);
298
+ }
299
+ .wd-shell .btn-primary:hover:not([disabled]) {
300
+ background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);
301
+ color: #fff; filter: brightness(1.07);
302
+ box-shadow: 0 2px 4px rgba(40, 100, 232, .32), 0 8px 20px rgba(40, 100, 232, .22);
303
+ }
304
+ .wd-shell .btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
305
+ .wd-shell .btn-ghost:hover:not([disabled]) { background: var(--wd-inset); box-shadow: none; }
306
+ .wd-shell .btn-small { height: 25px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }
307
+ .wd-shell .btn-icon { width: 26px; padding: 0; justify-content: center; font-size: 12px; }
308
+
309
+ /* ---------- shared atoms ---------- */
310
+ .wd-shell .chip {
311
+ display: inline-flex; align-items: center; gap: 4px;
312
+ padding: 2px 9px; border-radius: 20px; font-size: 11.5px; line-height: 18px;
313
+ background: var(--wd-inset); color: var(--dsw-alias-label-secondary);
314
+ border: 1px solid var(--wd-hairline);
315
+ }
316
+ .wd-shell .chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
317
+ .wd-shell .chip-button { border: 0; cursor: pointer; font-family: inherit; }
318
+ .wd-shell .chip-button:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }
319
+ .wd-shell .status-pill {
320
+ display: inline-flex; align-items: center; gap: 5px;
321
+ height: 21px; padding: 0 9px; border-radius: 20px;
322
+ font-size: 11px; font-weight: 550; white-space: nowrap;
323
+ background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);
324
+ }
325
+ .wd-shell .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-slate); flex: none; }
326
+ .wd-shell .tone-blue { background: var(--wd-primary-soft); color: var(--wd-primary); }
327
+ .wd-shell .tone-blue .status-dot { background: var(--wd-primary); }
328
+ .wd-shell .tone-green { background: var(--wd-green-soft); color: var(--wd-green); }
329
+ .wd-shell .tone-green .status-dot { background: var(--wd-green); }
330
+ .wd-shell .tone-amber { background: var(--wd-amber-soft); color: var(--wd-amber); }
331
+ .wd-shell .tone-amber .status-dot { background: var(--wd-amber); }
332
+ .wd-shell .tone-red { background: var(--wd-red-soft); color: var(--wd-red); }
333
+ .wd-shell .tone-red .status-dot { background: var(--wd-red); }
334
+ .wd-shell .tone-slate { background: var(--wd-slate-soft); color: var(--wd-slate); }
335
+ .wd-shell .tone-slate .status-dot { background: var(--wd-slate); }
336
+ .wd-shell .is-muted { color: var(--dsw-alias-label-tertiary); font-style: italic; }
337
+ .wd-shell .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }
338
+ .wd-shell .prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 19px; color: var(--dsw-alias-label-secondary); }
339
+
340
+ /* ---------- empty / failure ---------- */
341
+ .wd-shell .empty-state {
342
+ margin: 0 auto; max-width: 440px; padding: 56px 24px;
343
+ text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px;
344
+ }
345
+ .wd-shell .empty-icon {
346
+ width: 76px; height: 76px; border-radius: 18px;
347
+ border: 1px solid var(--wd-hairline); background: var(--wd-surface);
348
+ display: flex; align-items: center; justify-content: center;
349
+ color: var(--dsw-alias-label-tertiary); margin-bottom: 10px;
350
+ box-shadow: var(--wd-shadow-2);
351
+ }
352
+ .wd-shell .empty-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 650; }
353
+ .wd-shell .empty-copy { margin: 0 0 12px; font-size: 12.5px; line-height: 19px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
354
+ .wd-shell .empty-meta { margin-top: 16px; font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }
355
+ .wd-shell .failure {
356
+ border: 1px solid var(--wd-red-soft); border-radius: 10px;
357
+ background: var(--wd-red-soft); padding: 13px 15px;
358
+ display: flex; align-items: flex-start; gap: 11px;
359
+ border-left: 3px solid var(--wd-red);
360
+ }
361
+ .wd-shell .failure-text { min-width: 0; flex: 1 1 auto; }
362
+ .wd-shell .failure-title { font-size: 13px; line-height: 19px; font-weight: 650; color: var(--wd-red); }
363
+ .wd-shell .failure-reason { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
364
+ .wd-shell .spinner {
365
+ display: inline-block; width: 12px; height: 12px;
366
+ border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
367
+ animation: wd-spin .9s linear infinite; opacity: .8;
368
+ }
369
+ @keyframes wd-spin { to { transform: rotate(360deg); } }
370
+
371
+ /* ---------- settings modal ---------- */
372
+ .wd-shell .modal-overlay {
373
+ position: fixed; inset: 0; z-index: 40;
374
+ display: flex; align-items: center; justify-content: center; padding: 24px;
375
+ background: rgba(12, 18, 28, .46);
376
+ backdrop-filter: blur(2px);
377
+ }
378
+ .wd-shell .modal {
379
+ width: min(452px, 100%); max-height: 86vh;
380
+ display: flex; flex-direction: column;
381
+ border-radius: 14px; border: 1px solid var(--dsw-alias-border-l2);
382
+ background: var(--wd-surface);
383
+ box-shadow: var(--wd-shadow-3);
384
+ overflow: hidden;
385
+ }
386
+ .wd-shell .modal-header { display: flex; align-items: center; gap: 9px; padding: 15px 19px; border-bottom: 1px solid var(--wd-hairline); }
387
+ .wd-shell .modal-title { margin: 0; font-size: 14.5px; line-height: 21px; font-weight: 650; }
388
+ .wd-shell .modal-content { padding: 15px 19px; display: flex; flex-direction: column; gap: 5px; overflow: auto; }
389
+ .wd-shell .modal-footer { display: flex; align-items: center; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--wd-hairline); background: var(--wd-inset); }
390
+ .wd-shell .modal-footer .spacer { flex: 1 1 auto; }
391
+ /* The export dialog needs a wider box: it lists projects, and 452px clipped the
392
+ company name on every row. */
393
+ .wd-shell .modal-wide { width: min(560px, 100%); }
394
+ .wd-shell .modal-lead {
395
+ margin: 0 0 4px; font-size: 12px; line-height: 18px;
396
+ color: var(--dsw-alias-label-secondary);
397
+ }
398
+ .wd-shell .export-toolbar {
399
+ display: flex; align-items: center; gap: 7px;
400
+ padding: 8px 0 6px;
401
+ }
402
+ .wd-shell .export-count {
403
+ margin-left: auto; font-size: 11px; line-height: 16px;
404
+ color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
405
+ }
406
+ .wd-shell .export-list {
407
+ list-style: none; margin: 0; padding: 0;
408
+ max-height: 42vh; overflow: auto;
409
+ border: 1px solid var(--wd-hairline); border-radius: 9px;
410
+ }
411
+ .wd-shell .export-row {
412
+ display: flex; align-items: flex-start; gap: 9px;
413
+ padding: 8px 11px; cursor: pointer;
414
+ border-bottom: 1px solid var(--wd-hairline);
415
+ transition: background .11s ease;
416
+ }
417
+ .wd-shell .export-list li:last-child .export-row { border-bottom: 0; }
418
+ .wd-shell .export-row:hover { background: var(--wd-inset); }
419
+ .wd-shell .export-row[data-selected="true"] { background: var(--wd-primary-soft); }
420
+ .wd-shell .export-row input[type="checkbox"] { accent-color: var(--wd-primary); flex: none; margin: 2px 0 0; }
421
+ .wd-shell .export-row-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
422
+ .wd-shell .export-row-name {
423
+ font-size: 12px; line-height: 17px; font-weight: 600; color: var(--wd-text);
424
+ overflow-wrap: anywhere;
425
+ }
426
+ .wd-shell .export-row-meta {
427
+ font-size: 10.5px; line-height: 15px;
428
+ color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
429
+ }
430
+ .wd-shell .checkbox-row {
431
+ display: flex; align-items: center; gap: 10px;
432
+ padding: 9px 11px; border-radius: 8px; cursor: pointer;
433
+ border: 1px solid transparent; transition: background .11s ease, border-color .11s ease;
434
+ }
435
+ .wd-shell .checkbox-row:hover { background: var(--wd-inset); }
436
+ .wd-shell .checkbox-row[data-selected="true"] { border-color: var(--wd-hairline); background: var(--wd-inset); }
437
+ .wd-shell .checkbox-row input[type="radio"] { accent-color: var(--wd-primary); flex: none; margin: 0; }
438
+ .wd-shell .field { display: flex; flex-direction: column; gap: 5px; }
439
+ .wd-shell .field-label { font-size: 12px; color: var(--dsw-alias-label-secondary); }
440
+ .wd-shell .input {
441
+ height: 30px; width: 94px; padding: 0 10px; border-radius: 8px;
442
+ border: 1px solid var(--wd-hairline); background: var(--wd-surface);
443
+ color: var(--wd-text); font-variant-numeric: tabular-nums;
444
+ }
445
+ .wd-shell .input:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }
446
+ .wd-shell .form-error { margin: 2px 0 0; font-size: 11.5px; color: var(--wd-red); }
447
+ .wd-shell .inline-field { display: flex; align-items: center; gap: 9px; padding: 4px 11px 4px 35px; }
448
+ .wd-shell .helper-box {
449
+ margin-top: 7px; padding: 9px 11px; border-radius: 8px;
450
+ background: var(--wd-inset); border: 1px solid var(--wd-hairline);
451
+ font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-tertiary);
452
+ }
453
+
454
+ /* ---------- sidebar glyph ---------- */
455
+ .wd-glyph { display: block; }
456
+
457
+ @media (prefers-reduced-motion: reduce) {
458
+ .wd-shell .spinner { animation-duration: 2.4s; }
459
+ .wd-shell .btn, .wd-shell .filter-chip, .wd-shell .search-box, .wd-shell .view-switch-btn { transition: none; }
460
+ }
461
+ `;