/* Tanda Tangan Digital: bubuhkan ke dokumen (PDF/gambar). Dimuat dari halaman pages/signature. */
.sd-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 16px; text-align: center; border-radius: 16px; cursor: pointer; background: #F1F7FF; border: 2px dashed #9DC5FF; color: #004FC3; transition: background .15s, border-color .15s, transform .15s; }
.sd-drop:hover, .sd-drop.over { background: #E3EEFF; border-color: #0C6FFF; }
.sd-drop.over { transform: scale(1.01); }
.dark .sd-drop { background: rgba(12, 111, 255, .08); border-color: rgba(90, 157, 255, .45); color: #9DC5FF; }
.dark .sd-drop:hover, .dark .sd-drop.over { background: rgba(12, 111, 255, .16); border-color: #5A9DFF; }
.sd-drop small { color: #6b7280; font-size: 12px; } .dark .sd-drop small { color: #9ca3af; }

.sd-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #F1F7FF; }
.dark .sd-chip { background: rgba(255, 255, 255, .06); }
.sd-chip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; color: #111827; }
.dark .sd-chip-name { color: #f3f4f6; }

.sd-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: #F9FAFB; cursor: pointer; }
.dark .sd-opt { background: rgba(255, 255, 255, .04); }
.sd-opt.on { background: #E3EEFF; box-shadow: inset 0 0 0 1.5px #0C6FFF; }
.dark .sd-opt.on { background: rgba(12, 111, 255, .16); }
.sd-opt.off { opacity: .55; }

.sd-scroller { max-height: 72vh; overflow: auto; padding: 14px; border-radius: 16px; background: #E5E7EB; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dark .sd-scroller { background: #111827; }
.sd-page { position: relative; width: 100%; max-width: 820px; background: #fff; box-shadow: 0 6px 24px -8px rgba(0, 31, 77, .35); flex: none; user-select: none; -webkit-user-select: none; }
.sd-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sd-page-no { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 9999px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(17, 24, 39, .55); pointer-events: none; }

.sd-sig { position: absolute; cursor: grab; touch-action: none; outline: none; border-radius: 4px; box-shadow: 0 0 0 1.5px rgba(12, 111, 255, .45); }
.sd-sig:active { cursor: grabbing; }
.sd-sig.sel { box-shadow: 0 0 0 2px #0C6FFF, 0 6px 18px -6px rgba(12, 111, 255, .5); }
.sd-sig img { width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.sd-del, .sd-handle { position: absolute; display: none; background: #0C6FFF; color: #fff; }
.sd-sig.sel .sd-del, .sd-sig.sel .sd-handle { display: flex; }
.sd-del { top: -12px; right: -12px; width: 26px; height: 26px; border-radius: 9999px; align-items: center; justify-content: center; font-size: 16px; line-height: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.sd-handle { right: -9px; bottom: -9px; width: 20px; height: 20px; border-radius: 6px; cursor: nwse-resize; touch-action: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
@media (pointer: coarse) { .sd-del { width: 32px; height: 32px; top: -16px; right: -16px; } .sd-handle { width: 28px; height: 28px; right: -14px; bottom: -14px; } }
.sd-hint { font-size: 12px; color: #6b7280; } .dark .sd-hint { color: #9ca3af; }
.sd-err { display: flex; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: #be123c; background: #fff1f2; }
.dark .sd-err { color: #fda4af; background: rgba(244, 63, 94, .12); }
.sd-spin { width: 18px; height: 18px; border-radius: 9999px; box-shadow: inset 0 0 0 2px rgba(12, 111, 255, .25); position: relative; display: inline-block; vertical-align: middle; }
.sd-spin::after { content: ''; position: absolute; inset: 0; border-radius: 9999px; box-shadow: inset 0 2px 0 0 #0C6FFF; animation: sd-rot .7s linear infinite; }
@keyframes sd-rot { to { transform: rotate(360deg); } }
