/* Documents sent for signature: the sender's dialog and lists (js/signing.js),
   and the signature pad (js/signature-pad.js, also used by sign.html). */
.sg-overlay { position: fixed; inset: 0; z-index: 9500; background: rgba(15,15,15,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sg-dialog { background: var(--bg2, #fff); color: var(--text, #111); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 480px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.sg-dialog.wide { max-width: 640px; }
.sg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.sg-h { font-size: 17px; font-weight: 700; }
.sg-sub { font-size: 12.5px; color: var(--text3); margin-top: 3px; line-height: 1.45; }
.sg-close { border: none; background: none; font-size: 24px; line-height: 1; color: var(--text3); cursor: pointer; padding: 0 4px; }
.sg-body { padding: 8px 20px 4px; overflow-y: auto; }
.sg-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 20px 18px; border-top: 1px solid var(--border); margin-top: 8px; }
.sg-l { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin: 12px 0 4px; }
.sg-in { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 13.5px; background-color: var(--bg); color: var(--text); }
textarea.sg-in { resize: vertical; }
.sg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sg-row3 { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 6px; margin-top: 6px; }
.sg-or { font-size: 11.5px; color: var(--text3); margin: 6px 0; text-align: center; }
.sg-signer { position: relative; margin-bottom: 8px; padding-right: 22px; }
.sg-item { position: relative; margin-bottom: 8px; padding-right: 22px; }
.sg-item .sg-x { top: 6px; }
.sg-x { position: absolute; top: 0; right: 0; border: none; background: none; font-size: 20px; color: var(--text3); cursor: pointer; }
.sg-link { border: none; background: none; color: var(--safety-orange); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 0; margin-right: 10px; }
.sg-chk { display: flex; align-items: center; gap: 7px; font-size: 13px; margin: 5px 0; color: var(--text); }
.sg-err { color: var(--danger); font-size: 12.5px; min-height: 18px; margin-top: 8px; }
.sg-card { border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; margin: 10px 0; background: var(--bg); }
.sg-mut { color: var(--text3); font-size: 12px; font-weight: 400; }
.sg-loading { padding: 40px 20px; text-align: center; color: var(--text2); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sg-spin { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--safety-orange); border-radius: 50%; animation: sg-rot .8s linear infinite; }
@keyframes sg-rot { to { transform: rotate(360deg); } }
.sg-copy { display: flex; gap: 8px; margin-top: 8px; }
.sg-code { margin-top: 10px; text-align: center; background: var(--safety-orange-l); border-radius: 10px; padding: 10px; }
.sg-code-n { font-size: 30px; font-weight: 800; letter-spacing: 8px; margin-top: 4px; color: var(--text); }

.sg-sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.sg-list { display: grid; gap: 12px; }
.sg-empty { color: var(--text3); font-size: 13.5px; padding: 26px 8px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; }
.sg-req { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--bg2); }
.sg-req-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.sg-req-t { font-size: 14.5px; font-weight: 700; }
.sg-pill { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.sg-pill.ok { background: #DCFCE7; color: #166534; } .sg-pill.warn { background: #FEF3C7; color: #92400E; }
.sg-pill.bad { background: #FEE2E2; color: #B91C1C; } .sg-pill.mut { background: var(--bg3); color: var(--text2); }
.sg-person { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; flex-wrap: wrap; }
.sg-tick { width: 18px; height: 18px; border-radius: 50%; background: #DCFCE7; color: #166534; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.sg-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border); display: inline-block; box-sizing: border-box; }
.sg-acts { margin-left: auto; }
.sg-req-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sg-ev { display: flex; gap: 12px; padding: 6px 0; border-top: 1px solid var(--bg3); font-size: 13px; }
.sg-ev:first-child { border-top: none; } .sg-ev .sg-mut { min-width: 150px; }

/* signature pad */
.sgp { margin-top: 12px; }
.sgp-tabs { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.sgp-tab { border: none; background: var(--bg3); color: var(--text2); font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.sgp-tab.on { background: var(--text); color: var(--bg2); }
.sgp-clear { margin-left: auto; border: none; background: none; color: var(--text3); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.sgp-draw { position: relative; }
.sgp-canvas { width: 100%; display: block; border: 1px dashed var(--text3); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.sgp-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9CA3AF; font-size: 13px; pointer-events: none; }
.sgp-input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; font: inherit; background: var(--bg); color: var(--text); }
.sgp-preview { margin-top: 8px; min-height: 64px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--text3); border-radius: 10px; background: #fff; color: #111; font: normal 34px "Sacramento", "Brush Script MT", cursive; padding: 6px 10px; overflow: hidden; }
@media (max-width: 560px) { .sg-2, .sg-row3 { grid-template-columns: 1fr; } .sg-dialog { max-height: 96vh; } }
