@reportwright/viewer 0.0.0-stage → 0.11.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 (96) hide show
  1. package/CHANGELOG.md +206 -0
  2. package/LICENSE +23 -0
  3. package/README.md +146 -2
  4. package/dist/chunk-2NAW3MAP.js +1284 -0
  5. package/dist/chunk-2NAW3MAP.js.map +6 -0
  6. package/dist/chunk-3D43XGIN.js +1167 -0
  7. package/dist/chunk-3D43XGIN.js.map +6 -0
  8. package/dist/chunk-66QZ3RDV.js +1661 -0
  9. package/dist/chunk-66QZ3RDV.js.map +6 -0
  10. package/dist/chunk-72S6DETS.js +40 -0
  11. package/dist/chunk-72S6DETS.js.map +6 -0
  12. package/dist/chunk-AH47FS6Y.js +13 -0
  13. package/dist/chunk-AH47FS6Y.js.map +6 -0
  14. package/dist/chunk-APRPSQOD.js +301 -0
  15. package/dist/chunk-APRPSQOD.js.map +6 -0
  16. package/dist/chunk-BXKUE45K.js +1284 -0
  17. package/dist/chunk-BXKUE45K.js.map +6 -0
  18. package/dist/chunk-D2NTLAKL.js +14 -0
  19. package/dist/chunk-D2NTLAKL.js.map +6 -0
  20. package/dist/chunk-E7INJHTL.js +1284 -0
  21. package/dist/chunk-E7INJHTL.js.map +6 -0
  22. package/dist/chunk-FGEFSGJT.js +1284 -0
  23. package/dist/chunk-FGEFSGJT.js.map +6 -0
  24. package/dist/chunk-GJS242RR.js +1652 -0
  25. package/dist/chunk-GJS242RR.js.map +6 -0
  26. package/dist/chunk-HAMBWF6C.js +20682 -0
  27. package/dist/chunk-HAMBWF6C.js.map +6 -0
  28. package/dist/chunk-J56FRCFU.js +1284 -0
  29. package/dist/chunk-J56FRCFU.js.map +6 -0
  30. package/dist/chunk-KJTRZJHN.js +599 -0
  31. package/dist/chunk-KJTRZJHN.js.map +6 -0
  32. package/dist/chunk-N5WHQ4DM.js +153 -0
  33. package/dist/chunk-N5WHQ4DM.js.map +6 -0
  34. package/dist/chunk-NJWQT6VB.js +1284 -0
  35. package/dist/chunk-NJWQT6VB.js.map +6 -0
  36. package/dist/chunk-ODREGGKA.js +219 -0
  37. package/dist/chunk-ODREGGKA.js.map +6 -0
  38. package/dist/chunk-OLLMACWA.js +35 -0
  39. package/dist/chunk-OLLMACWA.js.map +6 -0
  40. package/dist/chunk-PXXMOP4N.js +1284 -0
  41. package/dist/chunk-PXXMOP4N.js.map +6 -0
  42. package/dist/chunk-RKGIVPK5.js +1284 -0
  43. package/dist/chunk-RKGIVPK5.js.map +6 -0
  44. package/dist/chunk-RYHJUQSV.js +98 -0
  45. package/dist/chunk-RYHJUQSV.js.map +6 -0
  46. package/dist/chunk-SBD55ZES.js +316 -0
  47. package/dist/chunk-SBD55ZES.js.map +6 -0
  48. package/dist/chunk-SR2TQ2ZK.js +70 -0
  49. package/dist/chunk-SR2TQ2ZK.js.map +6 -0
  50. package/dist/chunk-WQOBRZAL.js +14777 -0
  51. package/dist/chunk-WQOBRZAL.js.map +6 -0
  52. package/dist/designer.d.ts +48 -0
  53. package/dist/designer.js +35865 -0
  54. package/dist/designer.js.map +6 -0
  55. package/dist/peer/chunk-2NJMXASD.js +1282 -0
  56. package/dist/peer/chunk-2NJMXASD.js.map +6 -0
  57. package/dist/peer/chunk-5X4ZSSJT.js +1660 -0
  58. package/dist/peer/chunk-5X4ZSSJT.js.map +6 -0
  59. package/dist/peer/chunk-6YO42ALN.js +14777 -0
  60. package/dist/peer/chunk-6YO42ALN.js.map +6 -0
  61. package/dist/peer/chunk-76ZABVTI.js +598 -0
  62. package/dist/peer/chunk-76ZABVTI.js.map +6 -0
  63. package/dist/peer/chunk-776OR56A.js +6040 -0
  64. package/dist/peer/chunk-776OR56A.js.map +6 -0
  65. package/dist/peer/chunk-BPF3SLL4.js +1282 -0
  66. package/dist/peer/chunk-BPF3SLL4.js.map +6 -0
  67. package/dist/peer/chunk-BWVDLOVL.js +1282 -0
  68. package/dist/peer/chunk-BWVDLOVL.js.map +6 -0
  69. package/dist/peer/chunk-CXM3YSWF.js +1282 -0
  70. package/dist/peer/chunk-CXM3YSWF.js.map +6 -0
  71. package/dist/peer/chunk-DQFZ6LVB.js +1282 -0
  72. package/dist/peer/chunk-DQFZ6LVB.js.map +6 -0
  73. package/dist/peer/chunk-EKWTFHVE.js +152 -0
  74. package/dist/peer/chunk-EKWTFHVE.js.map +6 -0
  75. package/dist/peer/chunk-IMQRHDR4.js +12 -0
  76. package/dist/peer/chunk-IMQRHDR4.js.map +6 -0
  77. package/dist/peer/chunk-IPU2YRL2.js +300 -0
  78. package/dist/peer/chunk-IPU2YRL2.js.map +6 -0
  79. package/dist/peer/chunk-M4AGFUWE.js +97 -0
  80. package/dist/peer/chunk-M4AGFUWE.js.map +6 -0
  81. package/dist/peer/chunk-PG2PNYDX.js +1282 -0
  82. package/dist/peer/chunk-PG2PNYDX.js.map +6 -0
  83. package/dist/peer/chunk-QRAJXW2D.js +1282 -0
  84. package/dist/peer/chunk-QRAJXW2D.js.map +6 -0
  85. package/dist/peer/chunk-SHVCNAUG.js +1282 -0
  86. package/dist/peer/chunk-SHVCNAUG.js.map +6 -0
  87. package/dist/peer/chunk-Y5CAHLXS.js +218 -0
  88. package/dist/peer/chunk-Y5CAHLXS.js.map +6 -0
  89. package/dist/peer/designer.js +35841 -0
  90. package/dist/peer/designer.js.map +6 -0
  91. package/dist/peer/viewer.js +1061 -0
  92. package/dist/peer/viewer.js.map +6 -0
  93. package/dist/viewer.d.ts +77 -0
  94. package/dist/viewer.js +1066 -0
  95. package/dist/viewer.js.map +6 -0
  96. package/package.json +76 -4
@@ -0,0 +1,1061 @@
1
+ import {
2
+ ReportViewer,
3
+ declareDocumentStyles,
4
+ loadLanguage,
5
+ setShadowStyles,
6
+ uiFontCss
7
+ } from "./chunk-776OR56A.js";
8
+ import {
9
+ registerReports,
10
+ setAssetBase,
11
+ setBundledFonts,
12
+ setStandalone
13
+ } from "./chunk-6YO42ALN.js";
14
+ import "../chunk-GJS242RR.js";
15
+ import "../chunk-72S6DETS.js";
16
+ import "../chunk-SR2TQ2ZK.js";
17
+ import "../chunk-3D43XGIN.js";
18
+
19
+ // src/embed/index.js
20
+ import { createElement } from "react";
21
+ import { createRoot } from "react-dom/client";
22
+ var CSS = true ? `/* Layout: a drafting table. Cool grey workspace, white paper, ink text, one teal accent for selection and action. */
23
+ /* Interface type: IBM Plex Sans + Plex Mono (+ Plex Sans Devanagari for the Hindi UI). Same rules as src/viewer/uiFonts.js. */
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ :host {
38
+ --desk: #e6eaee;
39
+ --panel: #ffffff;
40
+ --panel-2: #f5f7f9;
41
+ --line: #d5dce3;
42
+ --line-2: #e7ecf0;
43
+ --ink: #16202a;
44
+ --muted: #5f6b77;
45
+ --faint: #64717e; /* 5:1 on panel (was #8e99a4, 2.9:1) */
46
+ --line-strong: #848f9b; /* control borders, 3:1 */
47
+ --accent: #0e7490;
48
+ --accent-ink: #ffffff;
49
+ --accent-soft: #e0f2f7;
50
+ --danger: #b42318;
51
+ --warn: #b54708;
52
+ --ok: #067647;
53
+ --band: #f0f3f6;
54
+ --focus: var(--accent);
55
+ --expr: #6d28d9; /* expressions and bound data, off the paper */
56
+ --expr-soft: #f5f3ff;
57
+ --danger-soft: #fff6f5; --danger-line: #f4c7c3;
58
+ --warn-soft: #fffaeb; --warn-line: #fedf89;
59
+ --guide: #e11d48;
60
+ --scrim: rgba(16, 24, 40, .38);
61
+ /* the report paper is white in every theme */
62
+ --paper: #ffffff; --paper-ink: #16202a; --paper-expr: #6d28d9;
63
+ --shadow-page: 0 1px 2px rgba(16, 24, 40, .08), 0 6px 20px rgba(16, 24, 40, .08);
64
+ --shadow-paper: 0 1px 2px rgba(16, 24, 40, .08), 0 8px 28px rgba(16, 24, 40, .10);
65
+ --shadow-dialog: 0 24px 60px rgba(16, 24, 40, .3);
66
+ --shadow-card: 0 6px 18px rgba(22, 32, 42, .08);
67
+ --shadow-sheet: 0 1px 2px rgba(22, 32, 42, .12), 0 4px 14px rgba(22, 32, 42, .08);
68
+ --ruler-tick: #848f9b; --ruler-text: #5f6b77;
69
+ --cm-string: #b45309; --cm-number: #0e7490; --cm-keyword: #7c3aed; --cm-fn: #1d4ed8; --cm-special: #be185d;
70
+ --ui: "PW UI", system-ui, -apple-system, "Segoe UI", sans-serif;
71
+ --mono: "PW Mono", ui-monospace, Menlo, monospace;
72
+ /* type scale: use these, not raw sizes */
73
+ --fs-2xs: 10px; /* band labels, ruler, tags */
74
+ --fs-xs: 11px; /* field labels, section heads, hints */
75
+ --fs-sm: 12px; /* tools, meta, secondary text */
76
+ --fs-base: 13px; /* body, inputs, buttons */
77
+ --fs-md: 14px; /* panel titles, dialog titles */
78
+ --fs-lg: 18px;
79
+ --fs-xl: 30px; /* page title */
80
+ --fw-regular: 400; --fw-medium: 500; --fw-strong: 600;
81
+ --lh: 1.45;
82
+ --track-caps: .06em;
83
+ --r: 6px;
84
+ color-scheme: light;
85
+ }
86
+
87
+ /* Night desk. Set by data-theme on <html> (see app/layout.js). Same contrast rules as light: text 4.5:1 on --panel, borders 3:1. */
88
+ :host([data-theme="dark"]) {
89
+ --desk: #0e1318;
90
+ --panel: #151b22;
91
+ --panel-2: #1b232c;
92
+ --band: #19212a;
93
+ --line: #2d3946;
94
+ --line-2: #222c37;
95
+ --line-strong: #647281;
96
+ --ink: #e6edf3;
97
+ --muted: #a3afbb;
98
+ --faint: #8693a0;
99
+ --accent: #3cbfd4;
100
+ --accent-ink: #03222a;
101
+ --accent-soft: #123a44;
102
+ --expr: #b8a0ff;
103
+ --expr-soft: #2a2145;
104
+ --danger: #ff8a7f; --danger-soft: #2e1715; --danger-line: #6b2a24;
105
+ --warn: #f7b155; --warn-soft: #2b2110; --warn-line: #6b4f12;
106
+ --ok: #5cd394;
107
+ --scrim: rgba(0, 0, 0, .6);
108
+ --shadow-page: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 20px rgba(0, 0, 0, .45);
109
+ --shadow-paper: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 28px rgba(0, 0, 0, .5);
110
+ --shadow-dialog: 0 24px 60px rgba(0, 0, 0, .6);
111
+ --shadow-card: 0 6px 18px rgba(0, 0, 0, .4);
112
+ --shadow-sheet: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .4);
113
+ --ruler-tick: #647281; --ruler-text: #a3afbb;
114
+ --cm-string: #f7b155; --cm-number: #3cbfd4; --cm-keyword: #c4b5fd; --cm-fn: #93c5fd; --cm-special: #f9a8d4;
115
+ color-scheme: dark;
116
+ }
117
+
118
+ * { box-sizing: border-box; }
119
+
120
+ .pw-embed{ margin: 0; background: var(--desk); color: var(--ink); font: var(--fw-regular) var(--fs-base)/var(--lh) var(--ui); -webkit-font-smoothing: antialiased; }
121
+ a { color: var(--accent); }
122
+ button, input, select, textarea { font: inherit; color: inherit; }
123
+ :focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
124
+
125
+ /* ---------- buttons & fields ---------- */
126
+ .btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); cursor: pointer; white-space: nowrap; font-weight: var(--fw-medium); }
127
+ .btn:hover { border-color: var(--accent); color: var(--accent); }
128
+ .btn:disabled { opacity: .45; cursor: default; color: var(--muted); border-color: var(--line); }
129
+ .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
130
+ .btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
131
+ .btn.ghost { border-color: transparent; background: transparent; }
132
+ .btn.ghost:hover { background: var(--panel-2); border-color: var(--line); }
133
+ .btn.sm { height: 24px; padding: 0 8px; font-size: var(--fs-sm); }
134
+ .btn.icon { width: 28px; padding: 0; justify-content: center; }
135
+ .btn.danger:hover { color: var(--danger); border-color: var(--danger); }
136
+ .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
137
+ .seg button { border: 0; background: var(--panel); height: 26px; padding: 0 12px; cursor: pointer; font-weight: var(--fw-strong); color: var(--muted); }
138
+ .seg button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }
139
+
140
+ .field { display: grid; gap: 3px; }
141
+ .field > span { font-size: var(--fs-xs); color: var(--muted); }
142
+ .input, .select, .textarea { width: 100%; min-width: 0; height: 26px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); }
143
+ .textarea { height: auto; padding: 6px 7px; font-family: var(--mono); font-size: var(--fs-sm); resize: vertical; }
144
+ .input.mono { font-family: var(--mono); font-size: var(--fs-sm); }
145
+ .input.invalid, .textarea.invalid { border-color: var(--danger); background: var(--danger-soft); }
146
+ .err { color: var(--danger); font-size: var(--fs-xs); }
147
+ .hint { color: var(--faint); font-size: var(--fs-xs); }
148
+ .check { display: flex; align-items: center; gap: 7px; cursor: pointer; }
149
+ .kbd { font-family: var(--mono); font-size: var(--fs-2xs); padding: 1px 4px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel-2); color: var(--muted); }
150
+
151
+ /* ---------- home ---------- */
152
+ .home-shell { min-height: 100%; }
153
+ .home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; padding-inline: 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
154
+ .home { padding-inline: clamp(16px, 2vw, 32px); padding-block: 24px 40px; } /* the whole width: no centred column */
155
+ .home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 18px; }
156
+ .home h1 { font-size: var(--fs-xl); font-weight: var(--fw-strong); margin: 0 0 6px; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
157
+ .home .lede { color: var(--muted); margin: 0; max-width: 56ch; }
158
+ .newrep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
159
+ .newrep .input { width: 240px; height: 32px; }
160
+ .newrep .btn { height: 32px; padding: 0 14px; }
161
+ .newrep .err { flex-basis: 100%; }
162
+ /* report cards: a sheet of paper on the desk */
163
+ .rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
164
+ .rcard { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
165
+ .rcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
166
+ .rcard-thumb { display: block; padding: 12px 14px 0; background: var(--band); border-bottom: 1px solid var(--line-2); text-decoration: none; }
167
+ .thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
168
+ .thumb .sheet { background: var(--paper); color: var(--paper-ink); border-radius: 2px 2px 0 0; box-shadow: var(--shadow-sheet); transform-origin: top center; transition: transform .2s; }
169
+ .rcard:hover .thumb .sheet { transform: translateY(-3px); }
170
+ .thumb .sheet svg { display: block; width: 100%; height: auto; }
171
+ .thumb .sheet.blank { height: 140%; display: grid; place-items: center; color: var(--faint); font-size: var(--fs-sm); }
172
+ .thumb .pages { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(22, 32, 42, .72); color: #fff; font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
173
+ .rcard-body { padding: 12px 14px 4px; min-width: 0; }
174
+ .rcard-body :is(h2, h3) { margin: 0 0 4px; font-size: var(--fs-md); font-weight: var(--fw-strong); line-height: 1.3; }
175
+ .rcard-body :is(h2, h3) a { color: var(--ink); text-decoration: none; }
176
+ .rcard-body :is(h2, h3) a:hover { color: var(--accent); }
177
+ .rcard .meta { margin: 0; color: var(--faint); font-size: var(--fs-sm); hyphens: auto; overflow-wrap: break-word; }
178
+ .rcard .meta code { font-family: var(--mono); font-size: var(--fs-xs); }
179
+ .rcard-acts { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 14px; }
180
+ .rcard-acts .ghost { margin-left: auto; }
181
+ .rempty { grid-column: 1 / -1; display: grid; gap: 4px; padding: 32px; text-align: center; background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; }
182
+
183
+ /* ---------- console shell: sidebar + top bar (src/home/Shell.jsx) ---------- */
184
+ .app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100%; }
185
+ .side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; background: var(--panel); border-inline-end: 1px solid var(--line); overflow-y: auto; }
186
+ .side-brand { font-size: var(--fs-lg); padding: 2px 10px 18px; }
187
+ .side-nav { display: flex; flex-direction: column; gap: 2px; }
188
+ .side-link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: var(--fw-medium); white-space: nowrap; }
189
+ .side-link:hover { background: var(--panel-2); color: var(--ink); }
190
+ .side-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
191
+ .side-card { margin-top: auto; display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
192
+ .side-card b { font-size: var(--fs-sm); }
193
+ .side-big { font-size: var(--fs-lg); font-weight: var(--fw-strong); font-variant-numeric: tabular-nums; }
194
+ .app-main { min-width: 0; display: flex; flex-direction: column; }
195
+ .topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; padding-inline: clamp(16px, 2vw, 32px); background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
196
+ .top-search { flex: 0 1 420px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--faint); }
197
+ .top-search:focus-within { border-color: var(--accent); }
198
+ .top-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
199
+ .top-acts { display: flex; align-items: center; gap: 10px; }
200
+ .umenu, .drop { position: relative; }
201
+ .umenu summary, .drop summary { list-style: none; cursor: pointer; }
202
+ .umenu summary::-webkit-details-marker, .drop summary::-webkit-details-marker { display: none; }
203
+ .umenu summary { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 8px; color: var(--muted); }
204
+ .umenu summary:hover { background: var(--panel-2); }
205
+ .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: var(--fw-strong); font-size: var(--fs-sm); }
206
+ .uwho { display: grid; line-height: 1.2; }
207
+ .uwho b { color: var(--ink); text-transform: capitalize; font-weight: var(--fw-strong); }
208
+ .uwho span { font-size: var(--fs-xs); text-transform: capitalize; }
209
+ .menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; display: grid; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-dialog); }
210
+ .drop.range .menu { inset-inline-end: auto; inset-inline-start: 0; }
211
+ .menu a, .menu button { display: block; width: 100%; text-align: start; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); text-decoration: none; cursor: pointer; }
212
+ .menu a:hover, .menu button:hover, .menu a[aria-current] { background: var(--panel-2); color: var(--accent); }
213
+ .menu-email { padding: 4px 10px 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; overflow-wrap: anywhere; }
214
+
215
+ /* ---------- overview (src/home/Overview.jsx) ---------- */
216
+ .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; }
217
+ .page-head .lede { max-width: none; }
218
+ .scope { color: var(--accent); font-weight: var(--fw-medium); }
219
+ .page-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
220
+ .drop.range summary { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); white-space: nowrap; }
221
+ .btn.lg { height: 38px; padding: 0 16px; border-radius: 8px; }
222
+ .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
223
+ .kpi, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
224
+ .kpi { padding: 16px 18px; display: grid; grid-template-rows: auto 1fr; gap: 10px; }
225
+ .kpi-row { align-self: end; }
226
+ .kpi-head { display: flex; align-items: center; gap: 10px; }
227
+ .kpi-head h3 { margin: 0; font-size: var(--fs-base); font-weight: var(--fw-medium); color: var(--muted); }
228
+ .kpi-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
229
+ .kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
230
+ .kpi-row > div { min-width: 0; }
231
+ .kpi-value { margin: 0; font-size: 28px; font-weight: var(--fw-strong); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
232
+ .kpi-delta, .kpi-hint { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--faint); }
233
+ .kpi-delta b { font-weight: var(--fw-strong); }
234
+ .kpi-delta.up b { color: var(--ok); } .kpi-delta.down b { color: var(--danger); }
235
+ .spark { width: 110px; height: 40px; flex: none; overflow: visible; }
236
+ .spark-empty { width: 110px; height: 40px; flex: none; border-bottom: 1px dashed var(--line); }
237
+ .spark-line { fill: none; stroke: var(--accent); stroke-width: 1.8; }
238
+ .spark-fill { fill: var(--accent); opacity: .14; }
239
+ .spark-bar { fill: var(--accent); opacity: .8; }
240
+ .ov-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
241
+ .ov-row.three { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 1fr); }
242
+ .ov-row.split { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
243
+ .panel { padding: 16px 18px; display: flex; flex-direction: column; }
244
+ .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
245
+ .panel-head h2, .section-title { margin: 0; font-size: var(--fs-md); font-weight: var(--fw-strong); }
246
+ .home .section-title { font-size: var(--fs-lg); margin-bottom: 4px; }
247
+ .panel .seg a { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; color: var(--muted); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium); background: var(--panel); }
248
+ .panel .seg a[aria-current] { background: var(--accent-soft); color: var(--accent); }
249
+ .seg a + a { border-inline-start: 1px solid var(--line-strong); }
250
+ .more-link { font-size: var(--fs-sm); font-weight: var(--fw-medium); text-decoration: none; }
251
+ .tchart { width: 100%; height: auto; max-height: 340px; display: block; margin-block: auto; }
252
+ .tchart .grid { stroke: var(--line-2); }
253
+ .tchart .axis { fill: var(--faint); font-size: 11px; font-family: var(--ui); }
254
+ .tchart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
255
+ .tchart .area { fill: var(--accent); opacity: .15; }
256
+ .tchart .dot { fill: var(--panel); stroke: var(--accent); stroke-width: 1.6; }
257
+ .tchart .bar { fill: var(--accent); }
258
+ .tchart .bar:hover { opacity: .8; }
259
+ .chart-empty { flex: 1; min-height: 180px; display: grid; place-content: center; gap: 4px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
260
+ .health { list-style: none; margin: 0; padding: 0; display: grid; }
261
+ .health li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n s" "d s"; align-items: center; column-gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
262
+ .hl-name { grid-area: n; font-weight: var(--fw-medium); }
263
+ .hl-note { grid-area: d; }
264
+ .hl-state { grid-area: s; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
265
+ .hl-state i, .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); }
266
+ .hl-state.ok { color: var(--ok); } .hl-state.ok i, .dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
267
+ .hl-state.down { color: var(--danger); } .hl-state.down i, .dot.bad { background: var(--danger); }
268
+ .hl-state.warn { color: var(--warn); } .hl-state.warn i { background: var(--warn); }
269
+ .hl-state.off { color: var(--muted); }
270
+ .health-foot { margin-top: auto; padding-top: 12px; display: grid; gap: 8px; }
271
+ .ratio { height: 8px; border-radius: 4px; background: var(--danger); overflow: hidden; }
272
+ .ratio i { display: block; height: 100%; background: var(--ok); }
273
+ .ratio-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-sm); color: var(--muted); }
274
+ .ratio-legend span { display: inline-flex; align-items: center; gap: 6px; }
275
+ .ratio-legend b { color: var(--ink); }
276
+ .tscroll { position: relative; overflow-x: auto; margin-inline: -18px; }
277
+ .dtable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
278
+ .dtable th { text-align: start; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--faint); text-transform: uppercase; letter-spacing: var(--track-caps); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
279
+ .dtable td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
280
+ .dtable tr:last-child td { border-bottom: 0; }
281
+ .dtable th:first-child, .dtable td:first-child { padding-inline-start: 18px; }
282
+ .dtable th:last-child, .dtable td:last-child { padding-inline-end: 18px; width: 1%; }
283
+ .dtable .num { text-align: end; }
284
+ .nowrap { white-space: nowrap; }
285
+ .cell-name { font-weight: var(--fw-medium); color: var(--ink); text-decoration: none; }
286
+ a.cell-name:hover { color: var(--accent); }
287
+ .cell-name.muted { color: var(--faint); font-weight: var(--fw-regular); }
288
+ .fmt { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
289
+ .pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: var(--fs-xs); font-weight: var(--fw-strong); white-space: nowrap; }
290
+ .pill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
291
+ .pill.bad { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-line); }
292
+ .pill.off { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
293
+ .kebab summary { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); font-size: 18px; line-height: 1; }
294
+ .kebab summary:hover { background: var(--panel-2); color: var(--ink); }
295
+ .kebab .menu { min-width: 140px; }
296
+ .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
297
+ .sched { list-style: none; margin: 0; padding: 0; display: grid; }
298
+ .sched li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
299
+ .sched li:last-child { border-bottom: 0; }
300
+ .sched-icon { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); }
301
+ .sched-main { flex: 1; min-width: 0; display: grid; }
302
+ .sched-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
303
+ .switch { position: relative; width: 36px; height: 20px; flex: none; border: 0; border-radius: 10px; background: var(--line-strong); cursor: pointer; padding: 0; transition: background .15s; }
304
+ .switch i { position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; }
305
+ .switch[aria-checked="true"] { background: var(--accent); }
306
+ .switch[aria-checked="true"] i { inset-inline-start: 18px; }
307
+ .switch:disabled { opacity: .5; }
308
+ .library { margin-top: 28px; }
309
+ .page-head + .library, .home > .library:first-child { margin-top: 0; }
310
+ .home-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
311
+ .crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 1; min-width: 200px; }
312
+ .lib-search { display: flex; gap: 6px; }
313
+ .lib-search .input { width: 220px; }
314
+ .fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0 0 14px; }
315
+ .fcard { display: flex; align-items: center; gap: 8px; padding: 10px 14px; }
316
+ .fcard svg { color: var(--accent); flex: none; }
317
+ .fcard a { flex: 1; font-weight: var(--fw-strong); color: var(--ink); text-decoration: none; }
318
+ @media (max-width: 1280px) { .ov-row.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ov-row.three > :last-child { grid-column: 1 / -1; } }
319
+ @media (max-width: 1000px) { .ov-row.split { grid-template-columns: minmax(0, 1fr); } }
320
+ @media (max-width: 860px) {
321
+ .app { grid-template-columns: minmax(0, 1fr); }
322
+ .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; border-inline-end: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
323
+ .side-brand { padding: 0 8px 0 0; font-size: var(--fs-md); }
324
+ .side-nav { flex-direction: row; }
325
+ .side-link { height: 32px; padding: 0 10px; }
326
+ .side-card { display: none; }
327
+ .ov-row.three { grid-template-columns: minmax(0, 1fr); }
328
+ .uwho { display: none; }
329
+ }
330
+ @media (max-width: 560px) { .ov-row { grid-template-columns: minmax(0, 1fr); } .page-acts, .page-acts .drop.range, .page-acts .btn.lg { width: 100%; } .drop.range summary { justify-content: center; } .btn.lg { justify-content: center; } .lib-search, .lib-search .input { flex: 1; width: auto; } .kpi-value { font-size: 24px; } }
331
+
332
+ /* ---------- viewer ---------- */
333
+ .viewer { position: relative; display: grid; grid-template-rows: auto 1fr; height: 100%; min-height: 0; }
334
+ .viewer:fullscreen { background: var(--desk); }
335
+ .vbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 46px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
336
+ .vbar .btn.sm { height: 28px; font-size: var(--fs-sm); }
337
+ .vbar .btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
338
+ .vbar-gap { flex: 1 1 0; min-width: 0; }
339
+ .vbar .sep { width: 1px; height: 20px; background: var(--line); }
340
+ .vbar .pageno { width: 44px; text-align: center; font-family: var(--mono); }
341
+ .vbar .stat { color: var(--faint); font-size: var(--fs-sm); white-space: nowrap; }
342
+ .vbar .vstats { font-size: var(--fs-xs); }
343
+ @media (max-width: 1400px) { .vbar .vstats { display: none; } }
344
+ .vbody { display: grid; grid-template-columns: auto 1fr; grid-template-rows: minmax(0, 1fr); min-height: 0; }
345
+ .vparams { width: 240px; padding: 14px; border-inline-end: 1px solid var(--line); background: var(--panel); display: grid; gap: 12px; align-content: start; overflow: auto; }
346
+ .vparams h3 { margin: 0; font-size: var(--fs-sm); text-transform: uppercase; font-weight: var(--fw-strong); letter-spacing: var(--track-caps); color: var(--muted); }
347
+ .vpages { overflow: auto; padding: 24px 16px 48px; display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
348
+ .vpage { background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow-page); flex: none; content-visibility: auto; contain-intrinsic-size: auto 1100px; }
349
+ .vpage svg { display: block; width: 100%; height: 100%; }
350
+ .vmsg { margin: 40px auto; max-width: 520px; padding: 16px 18px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
351
+ .vmsg.error { border-color: var(--danger-line); background: var(--danger-soft); color: var(--danger); }
352
+ .warnings { width: 100%; padding: 10px 14px; border-radius: 8px; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); font-size: var(--fs-sm); }
353
+ .warnings ul { margin: 4px 0 0; padding-left: 18px; }
354
+
355
+ /* ---------- designer shell ---------- */
356
+ /* the app shell is the window's height and never scrolls as a whole: its panes scroll inside (a top bar, banners and
357
+ the main area in a column; the main area takes what is left) */
358
+ .designer { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
359
+ .designer > .dmain, .designer > .viewer { flex: 1 1 0; min-height: 0; }
360
+ .dtop { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
361
+ .brand { font-weight: var(--fw-strong); letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
362
+ .brand i { width: 14px; height: 18px; background: var(--accent); border-radius: 2px; display: inline-block; }
363
+ .dtop .name { border: 1px solid transparent; background: transparent; height: 28px; padding: 0 6px; border-radius: 5px; font-weight: var(--fw-strong); width: 220px; }
364
+ .dtop .name:hover, .dtop .name:focus { border-color: var(--line); background: var(--panel); }
365
+ .dtop .spacer { flex: 1; }
366
+ .dtop .saved { color: var(--faint); font-size: var(--fs-sm); }
367
+ .dtop .saved.dirty { color: var(--warn); }
368
+ .dmain { display: grid; grid-template-columns: 236px 1fr 280px; grid-template-rows: minmax(0, 1fr); min-height: 0; }
369
+ .dleft, .dright { position: relative; background: var(--panel); min-height: 0; overflow: auto; } /* relative: their visually hidden (absolute) helpers scroll with them, not with the page */
370
+ .dleft { border-right: 1px solid var(--line); }
371
+ .dright { border-left: 1px solid var(--line); }
372
+ .pane { border-bottom: 1px solid var(--line); }
373
+ .pane > h4 { margin: 0; padding: 10px 12px 6px; font-size: var(--fs-xs); text-transform: uppercase; font-weight: var(--fw-strong); letter-spacing: var(--track-caps); color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
374
+ .pane-body { padding: 4px 12px 12px; }
375
+ .tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
376
+ .tool { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); cursor: grab; user-select: none; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
377
+ .tool:hover { border-color: var(--accent); color: var(--accent); }
378
+ .tool svg { flex: none; }
379
+ .tool { min-height: 34px; min-width: 0; }
380
+ .tool .tool-nm { overflow: hidden; min-width: 0; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; hyphens: auto; overflow-wrap: break-word; }
381
+ .tool:focus-visible { border-color: var(--accent); }
382
+ .insp-find { margin: 0 0 2px; }
383
+ .band-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; color: var(--faint); font-size: var(--fs-sm); pointer-events: none; }
384
+
385
+ .tree { list-style: none; margin: 0; padding: 0; }
386
+ .tree li { margin: 0; }
387
+ .trow { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 4px; cursor: default; min-width: 0; }
388
+ .trow:hover { background: var(--panel-2); }
389
+ .trow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
390
+ .trow .ty { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--faint); }
391
+ .trow .act { opacity: .75; } /* always visible (and for the keyboard): hover only brightens it */
392
+ .trow:hover .act, .trow:focus-within .act { opacity: 1; }
393
+ .outline-row.sel { background: var(--accent-soft); }
394
+ .outline-row .linklike.nm, .outline-band { text-decoration: none; color: var(--ink); text-align: start; }
395
+ .outline-row.sel .linklike.nm, .outline-band.sel { color: var(--accent); }
396
+ .outline-row.sel .act, .outline-row:focus-within .act { opacity: 1; }
397
+ .outline-row[draggable="true"] { cursor: grab; }
398
+ .outline-row .grip { color: var(--faint); font-size: 10px; line-height: 1; margin-inline-start: -2px; opacity: .55; }
399
+ .outline-row:hover .grip { opacity: 1; }
400
+ .outline-row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
401
+ .outline-row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
402
+ .outline-row.drop-into { background: var(--accent-soft); outline: 1.5px dashed var(--accent); outline-offset: -1.5px; }
403
+ .outline-sec.drop-band > .outline-band { color: var(--accent); }
404
+ .outline-sec.drop-band > .tree { box-shadow: inset 0 -2px 0 var(--accent); }
405
+ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
406
+ .field-chip { cursor: grab; }
407
+ .field-chip .nm::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); margin-right: 7px; vertical-align: 1px; }
408
+ .subtle { color: var(--faint); font-size: var(--fs-xs); padding: 2px 6px; }
409
+
410
+ /* ---------- canvas ---------- */
411
+ .dcenter { display: grid; grid-template-rows: auto 1fr; min-height: 0; min-width: 0; }
412
+ .cbar { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); flex-wrap: wrap; font-size: var(--fs-sm); }
413
+ .cscroll { overflow: auto; min-height: 0; padding: 28px 40px 80px; }
414
+ .paper { margin: 0 auto; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow-paper); position: relative; }
415
+ .band-label { display: flex; align-items: center; justify-content: space-between; height: 20px; padding: 0 8px; background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--fs-2xs); letter-spacing: var(--track-caps); text-transform: uppercase; font-weight: var(--fw-strong); color: var(--muted); cursor: pointer; user-select: none; }
416
+ .band-label.sel { color: var(--accent); background: var(--accent-soft); }
417
+ .band-label .h { font-family: var(--mono); letter-spacing: 0; text-transform: none; }
418
+ .band { position: relative; overflow: visible; }
419
+ .band.drop { box-shadow: inset 0 0 0 2px var(--accent); }
420
+ .band-resize { position: absolute; left: 0; right: 0; bottom: -4px; height: 8px; cursor: ns-resize; z-index: 5; }
421
+ .band-resize:hover { background: linear-gradient(transparent 3px, var(--accent) 3px, var(--accent) 5px, transparent 5px); }
422
+
423
+ .it { position: absolute; cursor: move; }
424
+ .it .box { position: absolute; inset: 0; overflow: hidden; display: flex; outline: 1px dashed rgba(95,107,119,.35); outline-offset: -0.5px; }
425
+ .it.sel .box { outline: 1.5px solid var(--accent); }
426
+ .it .tx { width: 100%; white-space: pre-wrap; word-break: break-word; }
427
+ .it .tx.dyn { color: var(--paper-expr) !important; font-family: var(--mono) !important; }
428
+ .handle { position: absolute; width: 8px; height: 8px; background: var(--paper); border: 1.5px solid var(--accent); border-radius: 2px; z-index: 4; }
429
+ .marquee { position: absolute; border: 1px solid var(--accent); background: rgba(14,116,144,.08); pointer-events: none; z-index: 6; }
430
+ .guide-badge { position: absolute; z-index: 7; padding: 1px 5px; font: var(--fs-2xs) var(--mono); color: var(--panel); background: var(--ink); border-radius: 3px; pointer-events: none; white-space: nowrap; }
431
+
432
+ /* table in the designer */
433
+ .tbl { position: absolute; }
434
+ .tbl .grip { position: absolute; left: -18px; top: -18px; width: 14px; height: 14px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; cursor: move; font-size: var(--fs-2xs); color: var(--muted); }
435
+ .tbl.sel .grip { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
436
+ .tbl .row { position: relative; display: flex; }
437
+ .tbl .row-tag { position: absolute; left: -18px; width: 14px; display: grid; place-items: center; font: var(--fs-2xs) var(--mono); color: var(--faint); height: 100%; }
438
+ .tbl .cell { position: relative; overflow: hidden; display: flex; border-right: 1px dashed rgba(95,107,119,.3); border-bottom: 1px dashed rgba(95,107,119,.3); cursor: cell; }
439
+ .tbl .cell:first-child { border-left: 1px dashed rgba(95,107,119,.3); }
440
+ .tbl .row:first-child .cell { border-top: 1px dashed rgba(95,107,119,.3); }
441
+ .tbl .tx { width: 100%; white-space: pre-wrap; word-break: break-word; }
442
+ .tbl .tx.dyn { color: var(--paper-expr) !important; font-family: var(--mono) !important; }
443
+ .tbl .cell.sel { box-shadow: inset 0 0 0 1.5px var(--accent); }
444
+ .tbl .cell.drop { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft) !important; }
445
+ .tbl.sel { outline: 1.5px solid var(--accent); outline-offset: 1px; }
446
+ .col-resize { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; z-index: 3; }
447
+ .col-resize:hover { background: var(--accent); opacity: .5; }
448
+
449
+ /* ---------- inspector ---------- */
450
+ .insp-head { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
451
+ .insp-head b { font-size: var(--fs-md); font-weight: var(--fw-strong); }
452
+ .insp-head .ty { font-family: var(--mono); font-size: var(--fs-xs); color: var(--faint); }
453
+ .cat { border-bottom: 1px solid var(--line-2); padding: 8px 12px 12px; display: grid; gap: 8px; }
454
+ .cat > h5 { margin: 0; font-size: var(--fs-2xs); text-transform: uppercase; font-weight: var(--fw-strong); letter-spacing: var(--track-caps); color: var(--faint); }
455
+ .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
456
+ .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
457
+ .expr-row { display: flex; gap: 4px; }
458
+ .expr-row .input { flex: 1; }
459
+ .fx { width: 26px; height: 26px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel-2); cursor: pointer; font: italic 600 var(--fs-sm) Georgia, serif; color: var(--expr); }
460
+ .fx:hover { border-color: var(--expr); }
461
+ .colorrow { display: flex; gap: 4px; align-items: center; }
462
+ .colorrow input[type=color] { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: none; flex: none; }
463
+ .btnrow { display: flex; gap: 6px; flex-wrap: wrap; }
464
+
465
+ /* ---------- dialogs ---------- */
466
+ .scrim { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; z-index: 100; padding: 16px; }
467
+ .dialog { background: var(--panel); border-radius: 10px; width: min(640px, 100%); max-height: calc(100vh - 32px); display: grid; grid-template-rows: auto 1fr auto; box-shadow: var(--shadow-dialog); }
468
+ .dialog.wide { width: min(880px, 100%); }
469
+ .dialog header { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: var(--fw-strong); }
470
+ .dialog .dbody { padding: 14px 16px; overflow: auto; display: grid; gap: 12px; align-content: start; }
471
+ .dialog footer { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
472
+ .xgrid { display: grid; grid-template-columns: 220px 1fr; gap: 14px; min-height: 0; }
473
+ .xlist { border: 1px solid var(--line); border-radius: 6px; max-height: 360px; overflow: auto; font-size: var(--fs-sm); }
474
+ .xlist h6 { margin: 0; padding: 6px 8px 2px; font-size: var(--fs-2xs); text-transform: uppercase; font-weight: var(--fw-strong); letter-spacing: var(--track-caps); color: var(--faint); position: sticky; top: 0; background: var(--panel); }
475
+ .xlist button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 3px 10px; cursor: pointer; font-family: var(--mono); font-size: var(--fs-xs); }
476
+ .xlist button:hover { background: var(--accent-soft); color: var(--accent); }
477
+ .sample { font-family: var(--mono); font-size: var(--fs-sm); padding: 8px 10px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); hyphens: auto; overflow-wrap: break-word; }
478
+
479
+ @media (max-width: 1100px) { .dmain { grid-template-columns: 200px 1fr 250px; } }
480
+ @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
481
+
482
+ /* nested items (container, list) */
483
+ .nest { position: absolute; inset: 0; }
484
+ .nest.drop { box-shadow: inset 0 0 0 2px var(--accent); background: rgba(14,116,144,.05); }
485
+ .nest-box { outline-style: dashed !important; outline-color: rgba(109,40,217,.45) !important; }
486
+ .nest-tag { position: absolute; right: 2px; top: -15px; font: var(--fs-2xs) var(--mono); color: var(--expr); background: var(--expr-soft); padding: 0 4px; border-radius: 3px; white-space: nowrap; pointer-events: none; }
487
+ .it.sel > .box.nest-box { outline: 1.5px solid var(--accent) !important; }
488
+ .group-card { border: 1px solid var(--line); border-radius: 6px; padding: 8px; display: grid; gap: 6px; background: var(--panel-2); }
489
+ .rowx { display: grid; grid-template-columns: 1fr 70px 1fr auto; gap: 4px; align-items: center; }
490
+ /* viewer extras */
491
+ .vside { width: 240px; border-inline-end: 1px solid var(--line); background: var(--panel); overflow: auto; padding: 12px; display: grid; gap: 4px; align-content: start; }
492
+ .vside h3 { margin: 0 0 6px; font-size: var(--fs-sm); text-transform: uppercase; font-weight: var(--fw-strong); letter-spacing: var(--track-caps); color: var(--muted); }
493
+ .vside button { text-align: start; border: 0; background: none; padding: 3px 6px; border-radius: 4px; cursor: pointer; font-size: var(--fs-sm); }
494
+ .vside button:hover { background: var(--accent-soft); color: var(--accent); }
495
+ .vpage { position: relative; }
496
+ .vpage .hl { position: absolute; background: rgba(250, 204, 21, .45); outline: 1px solid rgba(202,138,4,.8); pointer-events: none; }
497
+ .vpage .hl.cur { background: rgba(249,115,22,.55); }
498
+ .vpage .pw-link:hover { fill: rgba(14,116,144,.08); }
499
+ .search { display: flex; align-items: center; gap: 4px; }
500
+ .search .input { width: 160px; height: 28px; }
501
+ .it > .box.nest-box { overflow: visible; }
502
+ .it .box.live { outline-color: rgba(95,107,119,.25); }
503
+ .it .box.live svg { width: 100%; height: 100%; display: block; }
504
+ .guide { position: absolute; z-index: 8; pointer-events: none; background: var(--guide); }
505
+ .guide.v { top: 0; bottom: 0; width: 1px; }
506
+ .guide.h { left: 0; right: 0; height: 1px; }
507
+ .col-guide { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(14,116,144,.07) 0 4px, transparent 4px 8px); pointer-events: none; }
508
+ .ruler { overflow: visible; }
509
+ .kbd-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; font-size: var(--fs-base); }
510
+ .ver-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
511
+ .style-card { display: grid; grid-template-columns: 1fr 52px 72px auto minmax(70px, 96px); gap: 4px; align-items: center; }
512
+
513
+ /* digits that line up */
514
+ .vbar .pageno, .vbar .stat, .trow .ty, .input.mono, .rcard .meta, .guide-badge { font-variant-numeric: tabular-nums; }
515
+
516
+ /* joined control groups (viewer toolbar): see the B2 block for their look */
517
+ .tgroup { display: inline-flex; align-items: center; }
518
+ .titem { display: contents; }
519
+ @media (max-width: 560px) { .home-top .hint { display: none; } .newrep, .newrep .input { width: 100%; } .newrep .input { flex: 1 1 0; } }
520
+
521
+ /* ---------- theme toggle ---------- */
522
+ .theme-toggle svg { display: block; }
523
+
524
+ /* ---------- drill-through breadcrumb ---------- */
525
+ .vcrumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 12px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
526
+ .vcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: 0; }
527
+ .vcrumbs li + li::before { content: "›"; color: var(--muted); margin-inline-end: 4px; }
528
+ [dir="rtl"] .vcrumbs li + li::before { content: "‹"; }
529
+ .vcrumbs b { color: var(--ink); }
530
+ .vcrumbs .hint { margin-inline-start: auto; }
531
+ .linklike { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
532
+ .linklike:hover { color: var(--ink); }
533
+ .viewer:has(> .vcrumbs) { grid-template-rows: auto auto 1fr; }
534
+
535
+ /* ---------- chart gallery (designer) ---------- */
536
+ .dialog.cw { width: min(1240px, 100%); height: min(860px, calc(100vh - 32px)); }
537
+ .cw .dbody { padding: 0; overflow: hidden; }
538
+ .cw-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 0; height: 100%; }
539
+ .cw-side { padding: 14px 16px; border-right: 1px solid var(--line); display: grid; gap: 12px; align-content: start; overflow: auto; background: var(--panel-2); }
540
+ .cw-src { display: grid; gap: 6px; justify-items: start; }
541
+ .cw-src code { font-family: var(--mono); font-size: var(--fs-xs); }
542
+ .cw-main { padding: 14px 16px; overflow: auto; display: grid; gap: 14px; align-content: start; }
543
+ .cw-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
544
+ .cw-card { display: grid; gap: 4px; padding: 8px; text-align: left; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); cursor: pointer; font: inherit; color: inherit; }
545
+ .cw-card:hover { border-color: var(--accent); }
546
+ .cw-card.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
547
+ .cw-thumb { display: grid; place-items: center; aspect-ratio: 250 / 150; background: var(--paper); border-radius: 4px; overflow: hidden; }
548
+ .cw-thumb > span:not(.hint):not(.err) { width: 100%; height: 100%; display: block; }
549
+ .cw-thumb svg { display: block; width: 100%; height: 100%; }
550
+ .cw-name { font-weight: var(--fw-strong); display: flex; align-items: center; gap: 6px; }
551
+ .cw-name em { font-style: normal; font-size: var(--fs-2xs); font-weight: var(--fw-strong); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--accent); background: var(--accent-soft); border-radius: 3px; padding: 1px 5px; }
552
+ .cw-card.sel .cw-name em { background: var(--panel); }
553
+ .cw-preview { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
554
+ .cw-preview h5 { margin: 0 0 6px; font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--muted); font-weight: var(--fw-strong); }
555
+ .cw-paper { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 8px; min-height: 120px; display: grid; place-items: center; }
556
+ .cw-paper svg { display: block; width: 100%; height: auto; }
557
+ .cw-table { overflow: auto; max-height: 240px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
558
+ .cw-table table { border-collapse: collapse; width: 100%; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
559
+ .cw-table th, .cw-table td { padding: 4px 8px; border-bottom: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
560
+ .cw-table th { position: sticky; top: 0; background: var(--panel-2); z-index: 1; }
561
+ .cw-table th .linklike { text-decoration: none; font-weight: var(--fw-strong); color: var(--ink); }
562
+ .cw-table th .linklike:hover { color: var(--accent); text-decoration: underline; }
563
+ .cw-table .cw-cat, .cw-key.cw-cat { background: var(--accent-soft); }
564
+ .cw-table .cw-val, .cw-key.cw-val { background: var(--expr-soft); }
565
+ .cw-key { padding: 0 5px; border-radius: 3px; font-size: var(--fs-2xs); color: var(--ink); }
566
+ .cw-raw { margin-top: 8px; }
567
+ .cw-raw summary { cursor: pointer; font-size: var(--fs-sm); color: var(--accent); }
568
+ .cw-raw pre { margin: 6px 0 0; max-height: 220px; overflow: auto; font: var(--fs-xs)/1.45 var(--mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
569
+ @media (max-width: 900px) { .cw-body { grid-template-columns: 1fr; } .cw-side { border-right: 0; border-bottom: 1px solid var(--line); } .cw-preview { grid-template-columns: 1fr; } }
570
+
571
+ /* ---------- viewer: Phase 6 (view modes, frozen headers, search options, parameter editors, phone layout, RTL) ---------- */
572
+ /* report pages are drawn at fixed coordinates: never mirrored, whatever the UI direction */
573
+ .vpage, .vfrozen { direction: ltr; }
574
+ [dir="rtl"] .vbar .flip { display: inline-block; transform: scaleX(-1); }
575
+ .vfrozen { position: sticky; top: -24px; /* the .vpages top padding: sticky offsets start inside it */ z-index: 3; flex: none; height: 0; margin-bottom: -18px; }
576
+ .vfrozen-head { position: absolute; top: 0; background: var(--paper); box-shadow: 0 3px 8px rgba(16, 24, 40, .18); pointer-events: none; }
577
+ .vfrozen-head svg { display: block; width: 100%; height: 100%; }
578
+ .search .opt { font-size: var(--fs-xs); font-weight: var(--fw-strong); }
579
+ .search .opt[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
580
+ .vmatches button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
581
+ .vmatches button[aria-current] { background: var(--accent-soft); color: var(--accent); }
582
+ .vparams-go { display: grid; gap: 12px; }
583
+ .vparams.top { width: auto; border-inline-end: 0; border-bottom: 1px solid var(--line); align-items: start; }
584
+ .vparams.top h3, .vparams.top .vparams-go { grid-column: 1 / -1; }
585
+ .vparams.top .vparams-go { display: flex; align-items: center; }
586
+ .pslider { display: flex; align-items: center; gap: 8px; }
587
+ .pslider input { flex: 1 1 0; min-width: 0; accent-color: var(--accent); }
588
+ .pslider output { min-width: 4ch; text-align: end; font-variant-numeric: tabular-nums; }
589
+ .prange { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
590
+ .pradio { display: grid; gap: 4px; }
591
+ .select.plist { height: auto; padding: 2px; }
592
+ .pswitch input { appearance: none; flex: none; width: 30px; height: 18px; margin: 0; border-radius: 9px; background: var(--line-strong); position: relative; cursor: pointer; }
593
+ .pswitch input::before { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); transition: inset-inline-start .15s; }
594
+ .pswitch input:checked { background: var(--accent); }
595
+ .pswitch input:checked::before { inset-inline-start: 14px; }
596
+ .pswitch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
597
+ /* phone layout: a compact bar, a "more" menu, bottom sheets */
598
+ .vmore-wrap { position: relative; margin-inline-start: auto; }
599
+ .vmenu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: min(320px, calc(100vw - 32px)); padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-dialog); }
600
+ .vmenu .sep, .vmenu .vbar-gap { display: none; }
601
+ .vmenu .vstats { display: inline; }
602
+ .viewer.narrow .vbar { flex-wrap: nowrap; gap: 6px; padding: 6px 8px; }
603
+ .viewer.narrow .search { flex: 1 1 auto; min-width: 0; }
604
+ .viewer.narrow .search .input { width: 100%; min-width: 56px; }
605
+ .viewer.narrow .search:not(:focus-within) .opt { display: none; }
606
+ .viewer.narrow .vpages { padding: 12px 8px 32px; }
607
+ .viewer.narrow .vfrozen { top: -12px; }
608
+ .vsheet-wrap { position: absolute; inset: 0; z-index: 30; }
609
+ .vscrim { position: absolute; inset: 0; background: var(--scrim); }
610
+ .vsheet { position: absolute; inset-inline: 0; bottom: 0; max-height: 75%; overflow: auto; background: var(--panel); border-radius: 14px 14px 0 0; box-shadow: var(--shadow-dialog); }
611
+ .vsheet .vparams, .vsheet .vside { width: auto; border: 0; padding: 16px; }
612
+ .vsheet-close { position: absolute; top: 10px; inset-inline-end: 12px; z-index: 1; }
613
+ .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
614
+ /* the designer page is drawn at fixed coordinates: never mirrored */
615
+ .cscroll { direction: ltr; }
616
+
617
+ /* Phase 8: masters, parts, layers, cell mode, pivot wizard */
618
+ .band.master-host { position: relative; }
619
+ .master-layer { position: absolute; inset: 0; pointer-events: none; opacity: .5; filter: grayscale(.4); }
620
+ .band.master-content { outline: 1.5px dashed var(--accent); outline-offset: -1px; background-color: rgba(14,116,144,.03); }
621
+ .band.master-locked { pointer-events: none; }
622
+ .layer-locked { pointer-events: none; opacity: .6; }
623
+ .it .box.reuse-box { outline: 1.5px dashed rgba(109,40,217,.55); background: rgba(109,40,217,.05); align-items: center; justify-content: center; }
624
+ .it .box.reuse-part { outline: 1.5px solid rgba(109,40,217,.45); }
625
+ .layer-row { display: grid; grid-template-columns: minmax(70px, 1fr) auto auto minmax(80px, 110px) auto; gap: 4px; align-items: center; margin-bottom: 4px; }
626
+ .part-chip { cursor: grab; }
627
+ .pv-zones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
628
+ .pv-zone { min-height: 110px; border: 1.5px dashed var(--line); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--panel-2); }
629
+ .pv-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: var(--fs-sm); }
630
+ .pv-value { display: grid; grid-template-columns: 1fr auto; border-radius: var(--r); padding: 6px; }
631
+ .pv-preview { aspect-ratio: auto; min-height: 220px; place-items: start; }
632
+ .pv-preview > span:not(.hint):not(.err) { width: auto !important; height: auto !important; }
633
+ .pv-preview svg { width: auto !important; height: auto !important; max-width: 100%; }
634
+ @media (max-width: 900px) { .pv-zones { grid-template-columns: 1fr; } }
635
+
636
+ /* ---------- R1-C: designer and viewer UX ---------- */
637
+ .warn-dot { flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); font: var(--fw-strong) var(--fs-2xs)/1 var(--ui); }
638
+ /* structured parameter mapping (drill-through, filter this report, subreport) */
639
+ .pmap { display: grid; gap: 6px; }
640
+ .pmap-row { display: grid; grid-template-columns: minmax(64px, 34%) 1fr auto; gap: 4px; align-items: start; }
641
+ .pmap-row > div { min-width: 0; }
642
+ .pmap-name { font-family: var(--mono); font-size: var(--fs-sm); padding-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
643
+ .pmap-name.bad { color: var(--danger); }
644
+ .pmap-err { grid-column: 1 / -1; }
645
+ /* viewer: the accessible layer over a page (real buttons and links on the drawing's hot spots) */
646
+ .vlinks { position: absolute; inset: 0; pointer-events: none; }
647
+ .vlink { position: absolute; display: block; margin: 0; padding: 0; border: 0; border-radius: 2px; background: transparent; color: transparent; font-size: 0; overflow: hidden; white-space: nowrap; pointer-events: none; text-decoration: none; }
648
+ .vlink:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; background: rgba(14, 116, 144, .10); }
649
+ /* designer: an unsaved draft found when the report opens */
650
+ .draft-bar { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: calc(100vw - 32px); padding: 8px 12px; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--ink); border-radius: 8px; box-shadow: var(--shadow-card); font-size: var(--fs-sm); }
651
+ /* designer table: several cells selected, column and row handles, the cell menu */
652
+ .tbl { user-select: none; -webkit-user-select: none; }
653
+ .tbl .row-tag { cursor: pointer; border-radius: 2px; }
654
+ .tbl .row-tag:hover { background: var(--accent-soft); color: var(--accent); }
655
+ .col-handles { position: absolute; left: 0; top: -12px; height: 10px; display: flex; }
656
+ .col-handle { flex: none; height: 8px; margin: 0; padding: 0; border: 0; border-top: 2px solid var(--line); background: transparent; cursor: s-resize; }
657
+ .col-handle:hover, .col-handle:focus-visible { border-top-color: var(--accent); background: var(--accent-soft); }
658
+ .tbl .cell.sel { background-color: rgba(14, 116, 144, .08); }
659
+ .cell-menu { position: absolute; z-index: 30; min-width: 200px; display: grid; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-dialog); font-size: var(--fs-sm); color: var(--ink); }
660
+ .cell-menu button { text-align: start; border: 0; background: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; }
661
+ .cell-menu button:hover, .cell-menu button:focus-visible { background: var(--accent-soft); color: var(--accent); }
662
+ .cell-menu button.danger:hover { color: var(--danger); background: var(--danger-soft); }
663
+ .cell-menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 3px 0; }
664
+ /* an expression that reads a field the data set does not have */
665
+ .warn { color: var(--warn); font-size: var(--fs-xs); }
666
+ .input.squiggle { text-decoration: underline wavy var(--warn); text-decoration-skip-ink: none; text-underline-offset: 3px; border-color: var(--warn); }
667
+ .field-chip.nested { padding-inline-start: 14px; }
668
+ .cm-unknown-field { text-decoration: underline wavy var(--warn); text-decoration-skip-ink: none; text-underline-offset: 3px; }
669
+ .expr-issues { margin: 0; padding-inline-start: 18px; }
670
+ /* image item: thumbnails of the report's images */
671
+ .img-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
672
+ .img-pick { display: grid; gap: 2px; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); cursor: pointer; font-size: var(--fs-2xs); color: var(--muted); }
673
+ .img-pick img { width: 100%; height: 40px; object-fit: contain; background: var(--paper); }
674
+ .img-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
675
+ .img-pick.sel, .img-pick:hover { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
676
+ .group-add { display: grid; gap: 4px; }
677
+ /* design-time issues: a red outline on the item, a count and a list in the canvas bar */
678
+ .it.issue > .box { outline: 1.5px dashed var(--danger) !important; }
679
+ .tbl.issue { outline: 1.5px dashed var(--danger); outline-offset: 2px; }
680
+ .issue-tag { position: absolute; right: -10px; top: -10px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--danger); color: var(--panel); font: var(--fw-strong) var(--fs-2xs)/1 var(--ui); z-index: 5; }
681
+ .issues-wrap { position: relative; }
682
+ .issues-btn { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
683
+ .issues-list { position: absolute; z-index: 40; top: calc(100% + 6px); inset-inline-start: 0; width: min(420px, calc(100vw - 32px)); max-height: 320px; overflow: auto; margin: 0; padding: 8px 12px 8px 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-dialog); display: grid; gap: 4px; font-size: var(--fs-sm); }
684
+ .issues-list .linklike { text-align: start; }
685
+ .align-bar { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-inline: 1px solid var(--line); }
686
+ .align-bar .btn.icon { width: 26px; }
687
+ /* the left rail: compact insert tiles (three a row) so the data panel shows without scrolling */
688
+ .dleft .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
689
+ .dleft .tool { flex-direction: column; justify-content: center; gap: 2px; padding: 4px 2px; min-height: 40px; font-size: var(--fs-2xs); text-align: center; }
690
+ .dleft .tool .tool-nm { line-height: 1.15; }
691
+ /* a phone: the page to look at, read-only in spirit; designing needs a wider screen */
692
+ .narrow-note { display: none; }
693
+ @media (max-width: 900px) {
694
+ .narrow-note { display: block; padding: 8px 12px; background: var(--warn-soft); border-bottom: 1px solid var(--warn-line); color: var(--ink); font-size: var(--fs-sm); }
695
+ .dmain { grid-template-columns: minmax(0, 1fr); }
696
+ .dleft, .dright { display: none; }
697
+ .dtop .name { width: auto; flex: 1 1 120px; min-width: 0; }
698
+ .dtop > .btn.ghost, .dtop .theme-toggle { display: none; }
699
+ .cbar > :not(:first-child) { display: none; }
700
+ .cscroll { padding: 12px 8px 40px; }
701
+ }
702
+ /* conditional formatting wizard */
703
+ .cf-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: cf; }
704
+ .cf-rules > li { counter-increment: cf; position: relative; padding-inline-start: 30px; }
705
+ .cf-rules > li::before { content: counter(cf); position: absolute; inset-inline-start: 8px; top: 10px; font: var(--fw-strong) var(--fs-sm) var(--ui); color: var(--muted); }
706
+ .cf-cond { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(130px, 1fr) minmax(70px, 1fr) minmax(70px, 1fr); gap: 6px; }
707
+ .cf-fmt { display: flex; flex-wrap: wrap; align-items: end; gap: 6px 12px; }
708
+ .cf-fmt .field { min-width: 150px; }
709
+ @media (max-width: 640px) { .cf-cond { grid-template-columns: 1fr 1fr; } }
710
+ /* visual SQL query builder */
711
+ .qb { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 12px; min-height: 0; }
712
+ .qb-tables { display: grid; gap: 6px; align-content: start; max-height: 520px; overflow: auto; border-inline-end: 1px solid var(--line-2); padding-inline-end: 10px; }
713
+ .qb-tables ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-family: var(--mono); font-size: var(--fs-sm); }
714
+ .qb-main { display: grid; gap: 10px; min-width: 0; }
715
+ .qb-canvas { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; min-height: 60px; padding: 8px; background: var(--panel-2); border: 1px dashed var(--line); border-radius: 8px; }
716
+ .qb-table { min-width: 170px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 6px; font-size: var(--fs-sm); }
717
+ .qb-table header { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-bottom: 1px solid var(--line-2); }
718
+ .qb-table header .btn { margin-inline-start: auto; }
719
+ .qb-table ul { list-style: none; margin: 0; padding: 4px 6px; max-height: 220px; overflow: auto; display: grid; gap: 2px; }
720
+ .qb-table li { display: flex; justify-content: space-between; gap: 8px; cursor: grab; }
721
+ .qb-table li .ty { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--faint); }
722
+ .qb-sec { display: grid; gap: 6px; }
723
+ .qb-sec > h5 { margin: 0; font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--faint); }
724
+ .qb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
725
+ .qb-row .select, .qb-row .input { width: auto; min-width: 120px; }
726
+ .qb-sql { margin: 0; padding: 8px 10px; font: var(--fs-sm)/1.45 var(--mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
727
+ @media (max-width: 760px) { .qb { grid-template-columns: 1fr; } .qb-tables { border: 0; max-height: 180px; } }
728
+ .dialog.qb-wide { width: min(1440px, 100%); }
729
+
730
+ /* ---------- B2: viewer and designer upgrade (console look: grouped icon controls, rounded panels, 8px rhythm) ---------- */
731
+ .ico { flex: none; display: block; }
732
+ :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
733
+ .seg button:focus-visible, .vtabs [role=tab]:focus-visible, .rail-tab:focus-visible { outline-offset: -3px; }
734
+ .top-search:focus-within { box-shadow: 0 0 0 2px var(--focus); }
735
+ .btn { transition: background-color .12s, border-color .12s, color .12s; }
736
+ .btn:active:not(:disabled) { transform: translateY(.5px); }
737
+ /* viewer toolbar */
738
+ .vbar { gap: 8px; min-height: 52px; padding: 8px 16px; }
739
+ .vbar .tgroup { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
740
+ .vbar .tgroup .btn { border-color: transparent; background: transparent; }
741
+ .vbar .tgroup .btn:hover:not(:disabled) { background: var(--panel); border-color: var(--line); color: var(--ink); }
742
+ .vbar .btn.sm { height: 30px; font-size: var(--fs-sm); padding: 0 10px; gap: 6px; border-radius: 6px; }
743
+ .vbar .btn.sm.icon { width: 30px; padding: 0; }
744
+ .vbar .btn[aria-pressed="true"], .vbar .tgroup .btn[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
745
+ .vbar .sep { display: none; }
746
+ .vbar .zoomval { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
747
+ .vbar .pageno { width: 44px; height: 30px; border-color: var(--line); background: var(--panel); }
748
+ .vbar .tgroup.paging .stat { padding-inline: 4px 6px; }
749
+ .vbar .select.vmode { height: 30px; width: auto; border-color: transparent; background-color: transparent; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
750
+ .vbar .search { position: relative; display: inline-flex; align-items: center; gap: 4px; }
751
+ .vbar .search .search-ico { position: absolute; inset-inline-start: 10px; color: var(--faint); pointer-events: none; }
752
+ .vbar .search .input { height: 32px; width: 220px; padding-inline-start: 32px; border-color: var(--line); border-radius: 8px; background: var(--panel-2); }
753
+ .vbar .search .input:focus { background: var(--panel); border-color: var(--accent); }
754
+ .vbar .search .btn.sm.icon { width: 28px; height: 28px; }
755
+ .vbar > b { font-size: var(--fs-md); }
756
+ /* the Export menu */
757
+ .vdrop-wrap { position: relative; display: inline-flex; }
758
+ .vdrop { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 25; min-width: 248px; display: grid; gap: 2px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-dialog); animation: pw-pop .12s ease-out; }
759
+ .vdrop[hidden] { display: none; }
760
+ .vdrop .titem { display: block; }
761
+ .vdrop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); text-align: start; cursor: pointer; }
762
+ .vdrop-item:hover:not(:disabled), .vdrop-item:focus-visible { background: var(--panel-2); }
763
+ .vdrop-item:disabled { opacity: .45; cursor: default; }
764
+ .vdrop-txt { display: grid; line-height: 1.25; }
765
+ .vdrop-txt b { font-weight: var(--fw-medium); }
766
+ .fmt-badge { flex: none; width: 34px; height: 24px; display: grid; place-items: center; border-radius: 5px; font: var(--fw-strong) 9px/1 var(--mono); letter-spacing: .02em; color: #fff; background: #64748b; }
767
+ .fmt-badge.pdf { background: #c2410c; } .fmt-badge.xlsx { background: #15803d; } .fmt-badge.docx { background: #1d4ed8; } .fmt-badge.pptx { background: #b45309; }
768
+ .fmt-badge.html { background: #7c3aed; } .fmt-badge.csv { background: #0f766e; } .fmt-badge.json { background: #475569; }
769
+ @keyframes pw-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
770
+ /* side panels: parameters, pages and contents, matches */
771
+ .vbody { transition: grid-template-columns .18s ease; }
772
+ .vparams { width: auto; padding: 16px; gap: 16px; background: var(--panel); }
773
+ .vparams h3, .vside h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-xs); text-transform: uppercase; font-weight: var(--fw-strong); letter-spacing: var(--track-caps); color: var(--muted); }
774
+ .vparams .field { gap: 6px; }
775
+ .vparams .field > span { font-weight: var(--fw-medium); color: var(--ink); font-size: var(--fs-sm); }
776
+ .vparams .input, .vparams .select { height: 32px; border-color: var(--line); border-radius: 6px; }
777
+ .vparams-go { position: sticky; bottom: -16px; margin: 0 -16px -16px; padding: 12px 16px 16px; background: linear-gradient(transparent, var(--panel) 30%); }
778
+ .vparams-go .btn.primary { height: 36px; justify-content: center; border-radius: 8px; }
779
+ .vside { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--panel); border-inline-end: 1px solid var(--line); overflow: auto; }
780
+ .vside > button, .vtoc { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); text-align: start; cursor: pointer; font-size: var(--fs-sm); }
781
+ .vside > button:hover, .vtoc:hover { background: var(--panel-2); }
782
+ .vtoc[aria-current] { background: var(--accent-soft); color: var(--accent); }
783
+ .vtoc-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
784
+ .vtabs { display: flex; gap: 2px; padding: 2px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); position: sticky; top: -12px; z-index: 1; }
785
+ .vtabs [role=tab] { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-weight: var(--fw-medium); font-size: var(--fs-sm); cursor: pointer; }
786
+ .vtabs [role=tab][aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
787
+ .vthumbs { display: grid; gap: 12px; padding: 4px 8px 12px; }
788
+ .vthumb { display: grid; justify-items: center; gap: 4px; padding: 6px; border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; color: var(--muted); }
789
+ .vthumb:hover { background: var(--panel-2); }
790
+ .vthumb[aria-current] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
791
+ .vthumb-sheet { display: block; width: 100%; background: var(--paper); box-shadow: var(--shadow-sheet); border-radius: 2px; overflow: hidden; }
792
+ .vthumb-sheet svg { display: block; width: 100%; height: 100%; }
793
+ .vthumb-n { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; font-weight: var(--fw-medium); }
794
+ /* the loading skeleton: sheets of paper with shimmering lines */
795
+ .vskel-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
796
+ .vskel { flex: none; max-width: 100%; display: flex; flex-direction: column; gap: 12px; padding: 6% 7%; background: var(--paper); box-shadow: var(--shadow-page); }
797
+ .vskel i { display: block; height: 10px; border-radius: 4px; background: linear-gradient(90deg, #e9edf1 25%, #f5f7f9 50%, #e9edf1 75%); background-size: 200% 100%; animation: pw-shimmer 1.2s linear infinite; }
798
+ .vskel i.blk { flex: 1; min-height: 60px; margin-top: 12px; border-radius: 6px; }
799
+ @keyframes pw-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
800
+ @media (prefers-reduced-motion: reduce) { .vskel i, .vdrop, .vbody, .dmain { animation: none; transition: none; } }
801
+ /* phone: no sideways scroll, tap targets of 32 px */
802
+ .viewer.narrow .vbar { min-height: 48px; }
803
+ .viewer.narrow .vbar .tgroup { padding: 1px; gap: 0; }
804
+ .viewer.narrow .vbar .lbl { display: none; }
805
+ .viewer.narrow .vbar .btn.sm, .viewer.narrow .vbar .btn.sm.icon { min-width: 32px; height: 32px; }
806
+ .viewer.narrow .vbar .pageno { width: 36px; height: 32px; }
807
+ .viewer.narrow .vbar .search .input { width: 100%; height: 32px; }
808
+ .viewer.narrow .vbar .tgroup.paging .stat { padding-inline: 2px 4px; }
809
+ .viewer.narrow .vbar .titem[data-toolbar-id=pageNumber] .stat { display: none; }
810
+ .viewer.narrow .vmenu .lbl { display: inline; }
811
+ .viewer.narrow .vpages { overflow-x: auto; }
812
+ .viewer, .vbody, .vpages { min-width: 0; max-width: 100%; }
813
+ @media (pointer: coarse) { .btn.sm, .btn.icon, .vside > button, .vtoc, .vtabs [role=tab] { min-height: 32px; } .btn.icon { min-width: 32px; } }
814
+ .vshell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
815
+ .vshell-main { min-height: 0; min-width: 0; }
816
+ .dtop-title { margin: 0; font-size: var(--fs-md); font-weight: var(--fw-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
817
+ .dtop-sep { width: 1px; height: 20px; background: var(--line); }
818
+ .dtop { min-height: 52px; padding: 8px 16px; gap: 8px; }
819
+ /* Inspector: collapsible sections, each with an icon */
820
+ :host {
821
+ --ico-layout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 2h5v5H2zM9 2h5v5H9zM2 9h5v5H2zM9 9h5v5H9z'/%3E%3C/svg%3E");
822
+ --ico-position: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 1.5v13M1.5 8h13M8 1.5L6 3.5M8 1.5l2 2M8 14.5l-2-2M8 14.5l2-2M1.5 8l2-2M1.5 8l2 2M14.5 8l-2-2M14.5 8l-2 2'/%3E%3C/svg%3E");
823
+ --ico-data: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 5.5c3 0 5.5-.9 5.5-2S11 1.5 8 1.5 2.5 2.4 2.5 3.5 5 5.5 8 5.5zM2.5 3.5v9c0 1.1 2.5 2 5.5 2s5.5-.9 5.5-2v-9M2.5 8c0 1.1 2.5 2 5.5 2s5.5-.9 5.5-2'/%3E%3C/svg%3E");
824
+ --ico-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3.5h10M8 3.5v9'/%3E%3C/svg%3E");
825
+ --ico-colour: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 1.8c2.5 3 4.5 5.3 4.5 7.7a4.5 4.5 0 0 1-9 0c0-2.4 2-4.7 4.5-7.7z'/%3E%3C/svg%3E");
826
+ --ico-box: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 2.5h11v11h-11z'/%3E%3C/svg%3E");
827
+ --ico-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 8S4 3.5 8 3.5 14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8zM8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'/%3E%3C/svg%3E");
828
+ --ico-click: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 2v8l2-2 1.5 3.5 1.5-.7L8.5 7.5H11z'/%3E%3C/svg%3E");
829
+ --ico-chart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 13.5h11M4 13V8.5M7 13V4M10 13V7M13 13v-3'/%3E%3C/svg%3E");
830
+ --ico-table: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h12v10H2zM2 6.5h12M2 9.8h12M6 3v10'/%3E%3C/svg%3E");
831
+ --ico-cf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 13.5L13.5 2M2 2h4v4H2zM10 10h4v4h-4z'/%3E%3C/svg%3E");
832
+ --ico-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h12v10H2zM2.5 12l3.5-4 3 3 1.5-1.5 3 2.5'/%3E%3C/svg%3E");
833
+ --ico-page: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 1.5h7l3 3v10H3zM10 1.5v3h3'/%3E%3C/svg%3E");
834
+ --ico-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 14.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zM1.5 8h13M8 1.5c2 2 2.8 4.2 2.8 6.5S10 12.5 8 14.5C6 12.5 5.2 10.3 5.2 8S6 3.5 8 1.5z'/%3E%3C/svg%3E");
835
+ --ico-fx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 2.5H8.5A1.5 1.5 0 0 0 7 4v8a1.5 1.5 0 0 1-1.5 1.5H4M4.5 7h5'/%3E%3C/svg%3E");
836
+ --ico-sort: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 2.5v11M2.5 11.5l2 2 2-2M11.5 13.5v-11M9.5 4.5l2-2 2 2'/%3E%3C/svg%3E");
837
+ --ico-barcode: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 2.5v11M4 2.5v11M5.5 2.5v11M8 2.5v11M9.5 2.5v11M12 2.5v11M14 2.5v11'/%3E%3C/svg%3E");
838
+ --ico-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5h11M2.5 8h11M2.5 11.5h11M5 3v3M10 6.5v3M7 10v3'/%3E%3C/svg%3E");
839
+ --ico-align: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 2v12M5 4h8M5 8h5M5 12h7'/%3E%3C/svg%3E");
840
+ }
841
+ .cat > h5 { display: flex; align-items: center; gap: 8px; margin: 0 -12px; padding: 4px 12px; cursor: pointer; user-select: none; border-radius: 0; color: var(--muted); }
842
+ .cat > h5:hover { color: var(--ink); background: var(--panel-2); }
843
+ .cat > h5::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; --ico: var(--ico-default); opacity: .85; }
844
+ .cat > h5::after { content: ""; margin-inline-start: auto; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; opacity: .7; }
845
+ .cat[data-collapsed] > h5::after { transform: rotate(-45deg); }
846
+ .cat[data-collapsed] { padding-bottom: 6px; }
847
+ .cat[data-collapsed] > :not(h5) { display: none; }
848
+ .cat > h5 > .cat-toggle { all: unset; flex: 1 1 auto; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
849
+ .cat > h5 > .cat-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
850
+ .cat > h5[data-icon="Layout"]::before, .cat > h5[data-icon="i_structure"]::before, .cat > h5[data-icon="i_columns"]::before, .cat > h5[data-icon="i_rows"]::before, .cat > h5[data-icon="rowTitle"]::before, .cat > h5[data-icon="bodySections"]::before { --ico: var(--ico-layout); }
851
+ .cat > h5[data-icon="i_position"]::before, .cat > h5[data-icon="i_distribute"]::before { --ico: var(--ico-position); }
852
+ .cat > h5[data-icon="Data"]::before, .cat > h5[data-icon="Field"]::before, .cat > h5[data-icon="i_data"]::before, .cat > h5[data-icon="i_groups"]::before, .cat > h5[data-icon="pivotValues"]::before { --ico: var(--ico-data); }
853
+ .cat > h5[data-icon="Text"]::before, .cat > h5[data-icon="Labels"]::before, .cat > h5[data-icon="i_defaultText"]::before, .cat > h5[data-icon="i_namedStyles"]::before { --ico: var(--ico-text); }
854
+ .cat > h5[data-icon="Colour"]::before, .cat > h5[data-icon="Look"]::before, .cat > h5[data-icon="pivotStyles"]::before, .cat > h5[data-icon="i_visual"]::before { --ico: var(--ico-colour); }
855
+ .cat > h5[data-icon="Box"]::before, .cat > h5[data-icon="Shape"]::before, .cat > h5[data-icon="Shapes"]::before { --ico: var(--ico-box); }
856
+ .cat > h5[data-icon="Visibility"]::before, .cat > h5[data-icon="Accessibility"]::before { --ico: var(--ico-eye); }
857
+ .cat > h5[data-icon="Interactivity"]::before, .cat > h5[data-icon="i_interactivity"]::before { --ico: var(--ico-click); }
858
+ .cat > h5[data-icon="Chart"]::before, .cat > h5[data-icon="Points"]::before, .cat > h5[data-icon="Axes"]::before, .cat > h5[data-icon="Overlays"]::before { --ico: var(--ico-chart); }
859
+ .cat > h5[data-icon="cf_title"]::before { --ico: var(--ico-cf); }
860
+ .cat > h5[data-icon="images"]::before, .cat > h5[data-icon="ux_imageCat"]::before { --ico: var(--ico-image); }
861
+ .cat > h5[data-icon="i_page"]::before { --ico: var(--ico-page); }
862
+ .cat > h5[data-icon="i_regional"]::before { --ico: var(--ico-globe); }
863
+ .cat > h5[data-icon="i_functions"]::before { --ico: var(--ico-fx); }
864
+ .cat > h5[data-icon="Barcode"]::before, .cat > h5[data-icon="Barcode options"]::before { --ico: var(--ico-barcode); }
865
+ .cat > h5[data-icon="i_align"]::before { --ico: var(--ico-align); }
866
+ /* Designer top bar: labelled groups of icon buttons (File, Insert, Arrange, View, Preview) */
867
+ .designer { --left-w: 280px; --right-w: 296px; }
868
+ .dbar { flex-wrap: nowrap; gap: 8px; min-height: 60px; padding: 6px 16px; }
869
+ .dbar .brand { flex: none; }
870
+ .dname { display: grid; min-width: 0; flex: 0 1 260px; }
871
+ .dbar .name { width: 100%; height: 28px; font-size: var(--fs-md); }
872
+ .dbar .saved { display: inline-flex; align-items: center; gap: 6px; padding-inline: 6px; font-size: var(--fs-xs); line-height: 1.2; }
873
+ .dbar .saved i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
874
+ .dbar .saved.dirty i { background: var(--warn); }
875
+ .tb-group { flex: none; display: grid; justify-items: center; gap: 2px; padding-inline: 8px; border-inline-start: 1px solid var(--line-2); }
876
+ .tb-items { display: flex; align-items: center; gap: 2px; }
877
+ .tb-cap { font-size: 9.5px; line-height: 1; text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--faint); font-weight: var(--fw-medium); }
878
+ .tb-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; transition: background-color .12s, color .12s; }
879
+ .tb-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--ink); border-color: var(--line); }
880
+ .tb-btn:active:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
881
+ .tb-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
882
+ .tb-btn:disabled { opacity: .4; cursor: default; }
883
+ .tb-btn.danger:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
884
+ .dbar .seg { border-color: var(--line); border-radius: 8px; padding: 2px; gap: 2px; background: var(--panel-2); }
885
+ .dbar .seg button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 6px; background: transparent; font-weight: var(--fw-medium); }
886
+ .dbar .seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .14); }
887
+ .ai-btn { height: 34px; border-radius: 8px; border-color: var(--line); background: var(--panel-2); }
888
+ .ai-btn .ico { color: var(--expr); }
889
+ .save-btn { height: 34px; border-radius: 8px; padding: 0 14px; }
890
+ /* main area: rail + body | canvas | inspector; the side panels slide */
891
+ .dmain { --left-w: 280px; --right-w: 296px; transition: grid-template-columns .2s ease; }
892
+ .dmain > aside { transition: opacity .15s, visibility .2s; }
893
+ .dmain[data-left=closed] > .dleft, .dmain[data-right=closed] > .dright { visibility: hidden; opacity: 0; overflow: hidden; border: 0; }
894
+ .dleft { display: grid; grid-template-columns: 60px minmax(0, 1fr); overflow: hidden; }
895
+ .rail { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; border-inline-end: 1px solid var(--line-2); background: var(--panel-2); }
896
+ .rail-tab { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 10px; font-weight: var(--fw-medium); line-height: 1.1; cursor: pointer; text-align: center; overflow-wrap: anywhere; }
897
+ .rail-tab:hover { background: var(--panel); color: var(--ink); }
898
+ .rail-tab[aria-current] { background: var(--accent-soft); color: var(--accent); }
899
+ .rail-body { min-height: 0; overflow: auto; position: relative; }
900
+ .rail-body > section + section { border-top: 4px solid var(--panel-2); }
901
+ .pane > h4 { position: sticky; top: 0; z-index: 2; background: var(--panel); padding: 12px 16px 8px; }
902
+ .pane-body { padding: 4px 16px 16px; }
903
+ .dleft .tools { gap: 6px; }
904
+ .dleft .tool { min-height: 52px; gap: 4px; border-radius: 8px; border-color: var(--line-2); transition: border-color .12s, background-color .12s, color .12s, transform .12s; }
905
+ .dleft .tool:hover { background: var(--accent-soft); border-color: var(--accent); }
906
+ .dleft .tool svg { width: 16px; height: 16px; }
907
+ /* canvas: the page centred on the desk, rulers along the top and beside each band */
908
+ .dcenter { grid-template-rows: auto minmax(0, 1fr) auto; background: var(--desk); }
909
+ .cbar { gap: 8px 16px; padding: 6px 16px; min-height: 40px; background: var(--panel); }
910
+ .cbar .select { height: 28px; }
911
+ .cbar-hint { margin-inline-start: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 120px; text-align: end; }
912
+ .cscroll { padding: 24px 40px 80px 56px; }
913
+ .paper { border-radius: 2px; }
914
+ .ruler.v { position: absolute; left: -44px; top: 0; pointer-events: none; overflow: visible; }
915
+ .dstatus { display: flex; align-items: center; gap: 16px; min-height: 32px; padding: 2px 12px; border-top: 1px solid var(--line); background: var(--panel); font-size: var(--fs-xs); color: var(--muted); }
916
+ .dstatus-zoom { display: inline-flex; align-items: center; gap: 2px; }
917
+ .dstatus-zoom .select { height: 26px; width: 92px; border-color: var(--line); font-size: var(--fs-xs); }
918
+ .dstatus-zoom .btn.icon { width: 26px; height: 26px; }
919
+ .dstatus-sel { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-family: var(--mono); }
920
+ .dstatus-sel i { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
921
+ .dstatus-page { margin-inline-start: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
922
+ /* inspector: roomier sections */
923
+ .dright .insp-head { position: sticky; top: 0; z-index: 3; background: var(--panel); padding: 12px 16px; }
924
+ .dright .cat { padding: 8px 16px 16px; gap: 8px; }
925
+ .dright .cat > h5 { margin: 0 -16px; padding: 6px 16px; font-size: var(--fs-2xs); }
926
+ .dpreview { flex: 1 1 0; min-height: 0; display: grid; }
927
+ .dpreview > .viewer { min-height: 0; }
928
+ @media (max-width: 1360px) { .tb-cap { display: none; } .dbar { min-height: 52px; } .ai-btn { width: 34px; padding: 0; justify-content: center; font-size: 0; gap: 0; } }
929
+ @media (max-width: 1180px) { .designer { --left-w: 248px; --right-w: 272px; } .dmain { --left-w: 248px; --right-w: 272px; } .dbar .seg button .ico { display: none; } }
930
+ @media (max-width: 900px) { .tb-group, .ai-btn, .dstatus-page { display: none; } .dbar .tb-group:last-of-type { display: grid; } .dmain { grid-template-columns: minmax(0, 1fr) !important; } .dmain > aside, .dmain > span { display: none; } }
931
+ .vbar .tgroup.zoom .lbl { display: none; }
932
+ .vbar .tgroup.zoom .btn.sm:not(.icon) { width: 30px; padding: 0; justify-content: center; }
933
+ .vbar .search .input { width: 200px; }
934
+ @media (max-width: 1500px) { .vbar .vstats { display: none; } }
935
+ .vbar { position: relative; z-index: 6; } /* its menus open over the pages */
936
+ .dtop .brand { min-height: 32px; }
937
+ input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); }
938
+ @media (pointer: coarse) { input[type=checkbox], input[type=radio] { width: 24px; height: 24px; } .dtop .btn.sm, .dtop .theme-toggle { min-height: 32px; min-width: 32px; } }
939
+ @media (max-width: 900px) {
940
+ .dbar { gap: 6px; padding: 6px 8px; min-height: 52px; }
941
+ .dbar .brand { font-size: 0; gap: 0; }
942
+ .dbar .dtop-sep, .save-btn .kbd, .dbar .seg button .ico { display: none; }
943
+ .dbar .dname { flex: 1 1 0; }
944
+ .dbar .tb-group { padding-inline: 0; border: 0; }
945
+ .dbar .seg button { padding: 0 8px; }
946
+ .save-btn { padding: 0 10px; }
947
+ .cscroll { padding-inline-start: 52px; }
948
+ }
949
+ /* the viewer's clickable spots are the accessible controls themselves (A11yLayer): a box-shaped one takes the clicks */
950
+ .vpage svg rect.pw-link { pointer-events: none; }
951
+ .vlink.hit { pointer-events: auto; cursor: pointer; }
952
+ .vlink.hit:hover { background: rgba(14, 116, 144, .07); }
953
+
954
+ .pw-embed{display:block;font:var(--fw-regular) var(--fs-base)/var(--lh) var(--ui);color:var(--ink);background:var(--desk);border:1px solid var(--line);border-radius:8px;overflow:hidden}
955
+ ` : "";
956
+ function installSnapshot(snapshot) {
957
+ if (!snapshot || window.__pwSnapshot) return;
958
+ window.__pwSnapshot = true;
959
+ const live = window.fetch.bind(window);
960
+ window.fetch = async (input, init) => {
961
+ const url = typeof input === "string" ? input : input?.url;
962
+ try {
963
+ const res = await live(input, init);
964
+ if (res.ok || !(url in snapshot)) return res;
965
+ } catch (e) {
966
+ if (!(url in snapshot)) throw e;
967
+ }
968
+ return new Response(JSON.stringify(snapshot[url]), { status: 200, headers: { "content-type": "application/json", "x-pagewright-snapshot": "1" } });
969
+ };
970
+ }
971
+ function withData(def, data) {
972
+ if (data == null || !def) return def;
973
+ const srcs = def.dataSources || [];
974
+ const keyed = typeof data === "object" && !Array.isArray(data) && srcs.some((s) => Object.hasOwn(data, s.name));
975
+ if (!keyed && srcs.length !== 1) throw new Error(`mountViewer: data must be keyed by data source name (${srcs.map((s) => s.name).join(", ") || "the definition has none"})`);
976
+ const of = (s) => keyed ? Object.hasOwn(data, s.name) ? data[s.name] : void 0 : data;
977
+ return { ...def, dataSources: srcs.map((s) => of(s) === void 0 ? s : { name: s.name, type: "json", data: of(s) }) };
978
+ }
979
+ function mountViewer(target, opts = {}) {
980
+ const el = typeof target === "string" ? document.querySelector(target) : target;
981
+ if (!el) throw new Error(`mountViewer: no element for ${target}`);
982
+ const server = String(opts.server || "").replace(/\/$/, "");
983
+ setAssetBase(server);
984
+ setStandalone({ standalone: !server, fontsUrl: opts.fontsUrl });
985
+ if (opts.reports) registerReports(opts.reports);
986
+ if (opts.fonts) setBundledFonts(opts.fonts, opts.customFonts);
987
+ if (opts.snapshot) installSnapshot(opts.snapshot);
988
+ const fontCss = opts.uiFontCss ?? (server ? uiFontCss(server) : "");
989
+ if (fontCss) declareDocumentStyles("pw-embed-fonts", fontCss, opts.nonce);
990
+ const shadow = el.shadowRoot || el.attachShadow({ mode: "open" });
991
+ shadow.innerHTML = '<div class="pw-embed"></div>';
992
+ setShadowStyles(shadow, CSS, opts.nonce);
993
+ const box = (
994
+ /** @type {HTMLElement} */
995
+ shadow.querySelector(".pw-embed")
996
+ );
997
+ box.style.height = opts.height || "720px";
998
+ const root = createRoot(box);
999
+ const listeners = {};
1000
+ const emit = (name, detail) => {
1001
+ for (const fn of listeners[name] || []) {
1002
+ try {
1003
+ fn(detail);
1004
+ } catch (e) {
1005
+ console.error(e);
1006
+ }
1007
+ }
1008
+ };
1009
+ let api = null;
1010
+ let wake = () => {
1011
+ };
1012
+ const viewerReady = new Promise((resolve) => {
1013
+ wake = () => resolve(void 0);
1014
+ });
1015
+ const control = { get current() {
1016
+ return api;
1017
+ }, set current(v) {
1018
+ api = v;
1019
+ if (v) wake();
1020
+ } };
1021
+ const show0 = (definition) => root.render(createElement(ReportViewer, { definition, reportId: opts.report, params: opts.params, lang: opts.lang, onDrill: opts.onDrill, title: opts.title, toolbar: opts.toolbar, viewMode: opts.viewMode, onReady: opts.onReady, control, onEvent: emit }));
1022
+ const show = (definition) => loadLanguage(opts.lang).catch(() => {
1023
+ }).then(() => show0(definition));
1024
+ if (opts.definition) show(withData(opts.definition, opts.data));
1025
+ else if (!server) throw new Error("mountViewer: pass definition (standalone), or server and report");
1026
+ else fetch(`${server}/api/reports/${encodeURIComponent(opts.report)}`).then((r) => r.ok ? r.json() : r.json().then((j) => Promise.reject(new Error(j.error || `HTTP ${r.status}`)))).then(show).catch((e) => {
1027
+ shadow.querySelector(".pw-embed").innerHTML = `<div class="vmsg error">The report did not load: ${String(e.message).replace(/</g, "&lt;")}</div>`;
1028
+ opts.onReady?.(e);
1029
+ emit("error", { message: e.message });
1030
+ });
1031
+ const handle = {
1032
+ unmount: () => {
1033
+ api = null;
1034
+ root.unmount();
1035
+ },
1036
+ setParameters: (params) => viewerReady.then(() => api?.setParameters(params)),
1037
+ setDefinition: (definition) => viewerReady.then(() => api?.setDefinition(definition)),
1038
+ goToPage: (page) => viewerReady.then(() => api?.goTo(page)),
1039
+ getPageCount: () => api?.pages ?? 0,
1040
+ print: () => viewerReady.then(() => api?.print()),
1041
+ export: (format) => viewerReady.then(() => {
1042
+ const f = { excel: "xlsx", word: "docx", powerpoint: "pptx" }[format] ?? format;
1043
+ if (!["pdf", "xlsx", "docx", "pptx", "html", "csv", "json"].includes(f)) throw new Error(`export: unknown format "${format}"`);
1044
+ if (!api) throw new Error("export: the viewer is not showing a report");
1045
+ return api.exportBlob(f);
1046
+ }),
1047
+ on: (event, fn) => {
1048
+ (listeners[event] || (listeners[event] = [])).push(fn);
1049
+ return () => {
1050
+ listeners[event] = (listeners[event] || []).filter((x) => x !== fn);
1051
+ };
1052
+ }
1053
+ };
1054
+ return handle;
1055
+ }
1056
+ if (typeof window !== "undefined") window.ReportWright = window.Pagewright = { mountViewer };
1057
+ export {
1058
+ mountViewer,
1059
+ withData
1060
+ };
1061
+ //# sourceMappingURL=viewer.js.map