: asapien/signet

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
:root {
  --ink: #1b2330; --muted: #637083; --line: #d9dfe7; --bg: #f3f5f8; --card: #fff;
  --accent: #1f5f8b; --danger: #a8322d; --ok: #2c7a4b; --warn: #9a6a00;
  --sig: 214, 48, 49; --img: 9, 102, 204; --txt: 34, 139, 84;
}
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
a { color: var(--accent); }
.bar { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.2rem; background: var(--ink); color: #fff; z-index: 100; }
.bar a { color: #cfd8e3; text-decoration: none; }
.bar a:hover { color: #fff; }
.bar .brand { font-weight: 700; letter-spacing: .06em; color: #fff; text-transform: uppercase; }
.beta { display: inline-block; margin-inline-start: .35em; padding: .1em .45em; border: 1px solid currentColor; border-radius: 3px; color: var(--line); font-size: .7rem; letter-spacing: .04em; vertical-align: middle; }
.bar nav { display: flex; gap: 1rem; flex: 1; }
#whoami { font-size: 12px; color: #cfd8e3; }
main { margin-top: 2.8rem; width: 100%; flex: 1; overflow: hidden; }
h1 { font-size: 1.25rem; margin: 0 0 1rem; }
h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 1.2rem 0 .5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; }

button, .btn { font: inherit; padding: .4rem .85rem; border-radius: 4px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
button:hover { border-color: #9aa7b6; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; padding: .38rem .5rem; border: 1px solid #b9c3cf; border-radius: 4px; width: 100%; background: #fff; color: var(--ink); }
label { display: block; font-size: 12px; color: var(--muted); margin: .55rem 0 .15rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1 1 auto; width: auto; }

.tabs { display: flex; gap: .25rem; margin-bottom: .8rem; flex-wrap: wrap; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f6f9fc; }
.empty { color: var(--muted); padding: 1.5rem .6rem; }

.status { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 3px; background: #e6eaef; color: #3c4858; white-space: nowrap; }
.status.PENDING { background: #fff1cf; color: var(--warn); }
.status.CORRECTION_REQUIRED { background: #ffe1d2; color: #a2461a; }
.status.RELEASED { background: #d9f2e3; color: var(--ok); }
.status.DISAPPROVED { background: #f8d9d8; color: var(--danger); }

/* document workspace */
.workspace { display: flex; width: 100%; height: 100%; gap: 0; }
.pages { flex: 0 0 75%; padding: 1.2rem; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.side { flex: 0 0 25%; padding: 1.2rem; background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto; }
@media (max-width: 900px) { .workspace { flex-direction: column; } .pages { flex: 0 0 auto; overflow-y: visible; } .side { flex: 0 0 auto; background: transparent; border-left: none; overflow-y: visible; } }
.pages { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.page { position: relative; flex-shrink: 0; width: 100%; max-width: 1000px; background: #fff; box-shadow: 0 1px 4px rgba(20, 30, 45, .25); line-height: 0; }
.page > img { width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }
.page .overlay { position: absolute; inset: 0; line-height: normal; }
.page .pageno { position: absolute; top: 4px; right: -2.2rem; font-size: 11px; color: var(--muted); line-height: 1; }
.notice { padding: .6rem .8rem; border-radius: 4px; background: #fff1cf; color: #6b4b00; margin-bottom: .8rem; }
.notice.error { background: #f8d9d8; color: #7a201c; }

/* Decoration must not shrink the imprint geometry used by fitText/object-fit. */
.box { position: absolute; outline: 1.5px solid rgb(var(--c)); outline-offset: -1.5px; background: rgba(var(--c), .10); overflow: hidden; white-space: nowrap; color: #000; }
.box.t-signature_zone { --c: var(--sig); }
.box.t-pim_image { --c: var(--img); }
.box.t-pim_text, .box.t-date, .box.t-serial { --c: var(--txt); }
.box.circle { border-radius: 50%; }
.box img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; display: block; }
.box .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: rgb(var(--c)); font-weight: 600; text-align: center; white-space: normal; line-height: 1.2; }

/* preview mode: translucent shapes above the flattened copy; the <area>s
   underneath keep their native tooltips */
.preview .overlay { pointer-events: none; }
.preview .box { background: rgba(var(--c), .16); outline-style: dashed; }
.hide-overlays .overlay { display: none; }

/* edit mode */
.edit .box, .preview .placement { cursor: move; touch-action: none; }
.preview .placement { pointer-events: auto; outline-style: solid; }
.preview .placement:focus { outline: 2px solid rgb(var(--sig)); outline-offset: 2px; }
.edit .box.selected { outline: 2px solid rgb(var(--c)); outline-offset: 1px; background: rgba(var(--c), .18); }
.edit .box .grip, .preview .placement .grip { position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; background: rgb(var(--c)); opacity: .55; cursor: nwse-resize; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.edit .box.circle .grip { right: 12%; bottom: 12%; border-radius: 50%; }
.page.dragover { outline: 3px dashed var(--accent); }

.palette { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.palette .chip { border: 1.5px solid rgb(var(--c)); background: rgba(var(--c), .1); border-radius: 4px; padding: .35rem .5rem; cursor: grab; font-size: 13px; text-align: center; user-select: none; }
.chip.t-signature_zone { --c: var(--sig); } .chip.t-pim_image { --c: var(--img); }
.chip.t-pim_text, .chip.t-date, .chip.t-serial { --c: var(--txt); }

.level { border: 1px solid var(--line); border-radius: 4px; padding: .5rem; margin-bottom: .4rem; }
.level.current { border-color: var(--warn); background: #fffaf0; }
.level .who { font-size: 13px; }
.history { font-size: 13px; margin: 0; padding: 0; list-style: none; }
.history li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.history .c { color: var(--muted); display: block; }
.signature-collection { height: 100%; overflow-y: auto; padding: 1.2rem; }
.signature-collection > * { max-width: 48rem; }
.signature-collection .row > strong { min-width: 0; overflow-wrap: anywhere; }
.signature-collection .row + .row { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.enrol-canvas { display: block; max-width: 100%; touch-action: none; border: 1px solid var(--line); margin: 1rem 0; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.legend { display: flex; gap: .8rem; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border: 1.5px solid rgb(var(--c)); background: rgba(var(--c), .2); margin-right: .25rem; vertical-align: -1px; }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 4px; max-width: 90vw; z-index: 10; }
.toast.error { background: var(--danger); }