/* Q-5: THE "Your signs" section's look (src/core/signs-settings.js), loaded by the website (/account) and the extension (Settings; the build
   copies it to lib/signs-settings.css). Built only on the tokens both pages define (--line, --surface, --surface-2, --ink, --ink-2, --brand,
   --brand-soft, --brand-text, --warn, --warn-bg, --bad, --ok, --radius-s), so light and dark follow each page's own theme. Phone width
   first (390 px), 44 px targets. */
.sg{display:grid;gap:12px;width:100%;min-width:0;box-sizing:border-box}
.sg p{margin:0}
.sg-intro,.sg-tip{color:var(--ink-2);max-width:44rem}
.sg-upgrade{font-weight:600;color:var(--brand-text);max-width:44rem}
.sg-place{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:var(--radius-s,10px);background:var(--surface);max-width:44rem;min-width:0}
.sg-h{margin:0;font-size:1rem;line-height:1.3;overflow-wrap:anywhere}
.sg-sign{display:grid;gap:8px;padding:10px;border-radius:var(--radius-s,10px);background:var(--surface-2);min-width:0}
.sg-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.sg-chip{display:inline-block;padding:2px 10px;border-radius:999px;font-size:.85rem;font-weight:700;background:var(--brand-soft);color:var(--brand-text)}
.sg-chip.sg-paused{background:var(--warn-bg);color:var(--warn)}
.sg-label{font-weight:600;overflow-wrap:anywhere}
.sg-meta{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--ink-2);font-size:.92rem}
.sg-acts{display:flex;flex-wrap:wrap;gap:6px}
.sg-acts[hidden],.sg-ask[hidden]{display:none}
.sg button{min-height:44px}
.sg .sg-acts button{width:auto}
/* Q3 (T-517, one filled action per area): Cancel Sign is outlined (the surface's plain class) with red words; its question's Cancel Sign
   is the surface's danger button */
.sg .sg-acts button.sg-danger{color:var(--bad)}
.sg-ask{display:grid;gap:6px;padding:10px;border:1px solid var(--line);border-radius:var(--radius-s,10px);background:var(--surface)}
.sg-warn{color:var(--ink)}
.sg-strong{font-weight:700}
.sg-msg{min-height:1.2em;color:var(--ok)}
.sg-msg.sg-bad{color:var(--bad)}
/* T-390: THE set-up form (Make a sign, a sign's Settings) and the account's waiting line; tokens only */
.sg-form{display:grid;gap:10px;padding:10px;border:1px solid var(--line);border-radius:var(--radius-s,10px);background:var(--surface);min-width:0}
.sg-form[hidden],.sg-err[hidden]{display:none}
.sg-field{display:grid;gap:4px;min-width:0}
.sg-num{width:7rem;min-height:44px;box-sizing:border-box;padding:6px 10px;border:1px solid var(--line);border-radius:var(--radius-s,10px);background:var(--surface);color:var(--ink);font:inherit}
.sg-num:disabled{background:var(--surface-2);color:var(--ink-2)}
.sg-num[aria-invalid="true"]{border-color:var(--bad)}
.sg-hint{color:var(--ink-2);font-size:.85rem}
.sg-err{color:var(--bad);font-size:.9rem}
.sg-same{display:flex;align-items:center;gap:8px;min-height:44px;font-weight:600;overflow-wrap:anywhere}
.sg-tick{width:20px;height:20px;flex:none}
.sg-chip.sg-limit{background:var(--warn-bg);color:var(--warn)}
.sg-waiting{display:grid;gap:6px;max-width:44rem}
/* T-519: a sign's TM30 property, read-only (its place's; changed in Your Properties) */
.sg-propline .sg-warn{color:var(--warn)}
/* T-601 (the approved mock-up v7): THE ONE ROW of QR Signs (the Documents tab): picture · name · chip + meta · small outlined View / Print
   + ⋯ More (its menu); the boxes (Cancel This Sign?, Edit Sign); Cancelled Signs + Restore; the Print line. Tokens only */
.sg-rows{display:grid;border:1px solid var(--line);border-radius:var(--radius,10px);background:var(--surface);min-width:0}
.sg-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px 12px;padding:12px;min-width:0}
.sg-row+.sg-row{border-top:1px solid var(--line)}
.sg-main{display:grid;gap:4px;min-width:0}
.sg-name{font-weight:600;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sg-rmeta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--ink-2);font-size:.85rem}
.sg-chip.sg-live{background:var(--ok-bg);color:var(--ok)}
.sg-chip{font-size:.75rem;padding:1px 8px}
.sg-racts{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.sg .sg-racts button{min-height:36px;padding:0 12px;font-size:.85rem;width:auto}
.sg .sg-racts .sg-dots{min-width:36px;padding:0 8px;font-weight:700;letter-spacing:.05em}
@media (max-width:559px){.sg .sg-racts button{min-height:44px}.sg .sg-racts .sg-dots{min-width:44px}}   /* T-605 (the test job's flag): a phone's touch target is 44 px; the computer keeps the approved compact 36 px row */
.sg-pic{position:relative;display:block;width:34px;height:46px;border:1px solid var(--line);border-radius:3px;background:var(--paper);overflow:hidden;flex:none}
.sg-pic-top{position:absolute;left:0;right:0;top:0;height:9px;background:var(--print-accent)}
.sg-pic-qr{position:absolute;left:6px;right:6px;top:14px;bottom:8px;background:repeating-linear-gradient(90deg,var(--print-ink) 0 3px,transparent 3px 5px),var(--paper);opacity:.85;-webkit-mask:repeating-linear-gradient(0deg,var(--print-ink) 0 3px,transparent 3px 6px);mask:repeating-linear-gradient(0deg,var(--print-ink) 0 3px,transparent 3px 6px)}
.sg-pic-none{border-style:dashed;background:var(--surface-2)}
.sg-more{position:relative;display:inline-flex}
.sg-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:30;display:grid;min-width:168px;padding:4px;border:1px solid var(--line);border-radius:var(--radius-s,8px);background:var(--surface);box-shadow:var(--shadow-pop)}
.sg-menu[hidden]{display:none}
.sg .sg-menu .sg-mi{display:block;width:100%;min-height:40px;padding:0 12px;border:0;border-radius:6px;background:none;color:var(--ink);font:inherit;font-size:.9rem;text-align:left;cursor:pointer}
.sg .sg-menu .sg-mi:hover,.sg .sg-menu .sg-mi:focus-visible{background:var(--surface-2)}
.sg .sg-menu .sg-mi-bad{color:var(--bad)}
.sg-menu-sep{height:1px;margin:4px 0;background:var(--line)}
.sg-cancelled{display:grid;gap:4px;font-size:.85rem}
.sg-ch{font-weight:700;font-size:.85rem}
.sg-cline{color:var(--ink-2)}
.sg-link{border:0;background:none;padding:0;min-height:0;color:var(--brand-text);font:inherit;font-weight:600;cursor:pointer;text-decoration:none}
.sg .sg-link{min-height:24px}
.sg-link:hover{text-decoration:underline}
.sg-muted{color:var(--ink-2)}
.sg-printline{color:var(--ink-2);font-size:.82rem}
.sg-makebox{display:grid;gap:8px}
.sg-select{min-height:44px;max-width:22rem;border:1px solid var(--sec-line);border-radius:var(--radius-s,8px);background:var(--surface);color:var(--ink);font:inherit;padding:0 10px}
.sg-scrim{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:16px;background:var(--scrim-dialog)}
.sg-dialog{display:grid;gap:10px;width:min(440px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:18px;border:1px solid var(--line);border-radius:var(--radius,10px);background:var(--surface);color:var(--ink);box-shadow:var(--shadow-pop);box-sizing:border-box}
.sg-dialog:focus{outline:none}
.sg-dialog p{margin:0}
.sg-dh{margin:0;font-size:1.1rem;line-height:1.3}
.sg-dh4{margin:4px 0 0;font-size:.92rem}
.sg-dp{line-height:1.45}
.sg-dsec{display:grid;gap:8px}
.sg-dacts{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:4px}
.sg-dacts button{min-height:44px;width:auto}
.sg-tickrow{display:flex;align-items:center;gap:10px;min-height:36px}
.sg-getrow{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}   /* T-606: a ticked document + this sign's Who Signs? */
.sg-getrow .sg-tickrow{flex:1 1 180px;min-width:0}
.sg-whosel{font:inherit;font-size:13px;min-height:36px;max-width:100%;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}
.sg-whosel:disabled{opacity:.5}
.sg-getrow .sg-whosel{margin-left:32px}
.sg-termsrow{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:var(--radius-s,8px)}
.sg-ticon{width:28px;height:28px;border-radius:6px;background:var(--brand-soft)}
.sg-tname{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sg-tmain{min-width:0}
@media (max-width:420px){.sg-row{grid-template-columns:auto minmax(0,1fr)}.sg-racts{grid-column:1 / -1;justify-content:flex-end}}
