/* Tanda Tangan Digital */

.sig-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  align-items: start;
}
.sig-layout > .panel:first-child { display: grid; gap: 14px; }

.sig-stage {
  position: relative;
  height: 240px;
  border-radius: 18px;
  border: 1.5px dashed rgba(16, 185, 129, .4);
  background-color: #fff;
  background-image:
    conic-gradient(#EEF2F7 25%, #fff 0 50%, #EEF2F7 0 75%, #fff 0);
  background-size: 18px 18px;
  overflow: hidden;
  transition: background-color .2s;
}
.sig-stage.white { background-image: none; background-color: #fff; }

#pad {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  display: block;
}

.sig-baseline {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 26%;
  border-top: 1.5px solid rgba(100, 116, 139, .35);
  pointer-events: none;
}

.sig-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  color: #94A3B8;
  font-weight: 600;
  font-size: 14.5px;
  pointer-events: none;
  padding: 0 16px;
}
.sig-hint[hidden] { display: none; }

.sig-text-preview {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.2;
  pointer-events: none;
}
.sig-text-preview[hidden] { display: none; }

.sig-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}
.sig-tools[hidden] { display: none !important; }
.sig-range { min-width: 180px; flex: 1 1 180px; }
.sig-range input[type="range"] { width: 100%; accent-color: var(--brand); }
.sig-grow { flex: 1 1 100%; }
.sig-grow h3 { font-size: 13.5px; margin: 0 0 8px; }
.sig-tools-type .field { flex: 1 1 100%; }
.sig-tools-type #sig-text {
  font: inherit;
  font-size: 16px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .8);
  color: var(--ink);
}
#font-chips .opt-chip { font-size: 16px; padding: 8px 14px; }

.sig-side { display: grid; gap: 16px; }
.sig-side h3 { font-size: 13.5px; margin: 0 0 8px; }
.sig-side .btn-block { margin-top: 2px; }

@media (max-width: 767px) {
  .sig-layout { grid-template-columns: 1fr; }
  .sig-stage { height: 200px; }
}
