/* Document Signer — Corporate Navy ARVENZA (HELP DESK only) */
.ds-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: linear-gradient(165deg, #071326 0%, #0a1f3d 42%, #123663 100%);
  color: #e8eef6;
  display: flex; flex-direction: column;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}
.ds-overlay[hidden] { display: none !important; }
.ds-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(7,19,38,.72); backdrop-filter: blur(8px);
}
.ds-brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ds-brand strong { font-size: 15px; letter-spacing: .4px; color: #fff; }
.ds-brand small { font-size: 11px; color: #9db4ce; }
.ds-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ds-actions .btn {
  border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 700; font-size: 12px;
  letter-spacing: .4px; cursor: pointer;
}
.ds-actions .btn-save { background: #1d4ed8; color: #fff; }
.ds-actions .btn-void { background: #7f1d1d; color: #fecaca; }
.ds-actions .btn-cancel { background: #334155; color: #e2e8f0; }
.ds-actions .btn:disabled { opacity: .45; cursor: not-allowed; }
.ds-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 320px; gap: 0; }
.ds-preview-pane {
  min-width: 0; min-height: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px;
  background: radial-gradient(900px 500px at 20% 0%, rgba(29,78,216,.18), transparent 60%);
}
.ds-stage-wrap {
  flex: 1; min-height: 0; overflow: auto; border: 1px solid rgba(148,163,184,.28);
  border-radius: 12px; background: #0b1729; position: relative;
}
.ds-stage {
  position: relative; margin: 18px auto; background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.35);
  transform-origin: top center;
}
.ds-stage img.ds-doc, .ds-stage embed.ds-doc, .ds-stage object.ds-doc {
  display: block; width: 100%; height: 100%; pointer-events: none; user-select: none;
}
.ds-stamp {
  position: absolute; border: 1.5px dashed #1d4ed8; cursor: move;
  box-sizing: border-box; touch-action: none;
  background: transparent;
}
.ds-stamp img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ds-stamp .ds-handle {
  position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px;
  background: #1d4ed8; border-radius: 3px; cursor: nwse-resize;
}
.ds-side {
  border-left: 1px solid rgba(255,255,255,.12); background: rgba(7,19,38,.88);
  padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px;
}
.ds-side h3 { margin: 0; font-size: 13px; letter-spacing: .6px; color: #93c5fd; text-transform: uppercase; }
.ds-side p, .ds-side label { margin: 0; font-size: 12px; color: #cbd5e1; line-height: 1.45; }
.ds-side .field { display: flex; flex-direction: column; gap: 6px; }
.ds-side input[type="text"], .ds-side input[type="password"], .ds-side input[type="number"], .ds-side select {
  border: 1px solid #334155; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 9px 10px;
}
.ds-side .btn-secondary {
  border: 1px solid #475569; background: #1e293b; color: #e2e8f0; border-radius: 8px;
  padding: 9px 12px; font-weight: 650; cursor: pointer; font-size: 12px;
}
.ds-side .btn-primary {
  border: 0; background: #1d4ed8; color: #fff; border-radius: 8px;
  padding: 9px 12px; font-weight: 700; cursor: pointer; font-size: 12px;
}
.ds-sig-preview {
  background: repeating-conic-gradient(#e2e8f0 0% 25%, #fff 0% 50%) 50% / 16px 16px;
  border-radius: 8px; min-height: 72px; display: grid; place-items: center; padding: 8px;
}
.ds-sig-preview img { max-width: 100%; max-height: 90px; }
.ds-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ds-history li {
  border: 1px solid #334155; border-radius: 8px; padding: 8px 10px; font-size: 11px; color: #cbd5e1;
  display: flex; justify-content: space-between; gap: 8px; cursor: pointer;
}
.ds-history li:hover { background: #12233d; }
.ds-history .st { font-weight: 700; color: #93c5fd; }
.ds-gate {
  max-width: 380px; margin: auto; background: rgba(15,23,42,.92); border: 1px solid #334155;
  border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.ds-gate h2 { margin: 0; font-size: 18px; color: #fff; }
.ds-msg { font-size: 12px; color: #fca5a5; min-height: 1em; }
.ds-msg.ok { color: #86efac; }
@media (max-width: 960px) {
  .ds-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .ds-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); max-height: 42vh; }
}
