﻿.digital-signature-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(98, 54, 255, 0.06), transparent 28%),
    radial-gradient(circle at 100% 18%, rgba(193, 255, 82, 0.1), transparent 24%),
    #fcfbff;
}

.digital-signature-page .page-hero {
  background:
    radial-gradient(circle at 88% 12%, rgba(98, 54, 255, 0.12), transparent 34%),
    radial-gradient(circle at 8% 88%, rgba(193, 255, 82, 0.14), transparent 30%),
    transparent;
}

.digital-signature-page .page-hero p {
  max-width: 48ch;
}

.ds-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 1.2rem 2rem;
  align-items: center;
}

.ds-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-hero-visual img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
}

.ds-tool {
  padding-bottom: 1rem;
}

.ds-tool .btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
}

.ds-upload {
  padding: 0 0 2.4rem;
}

.ds-tool .dropzone {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(180deg, #ffffff 0%, #fcfbff 100%);
  border: 2px dashed #d9cff8;
  border-radius: 26px;
  padding: 3rem 1.5rem 2.2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.ds-tool .dropzone.dragover,
.ds-tool .dropzone:focus-within {
  border-color: var(--purple);
  box-shadow: var(--shadow-hover);
  transform: scale(1.01);
}

.ds-tool .dz-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f7f3ff, #ece4ff);
  color: var(--purple);
  font-size: 1.7rem;
  box-shadow: 0 8px 16px rgba(98, 54, 255, 0.1);
}

.ds-tool .dropzone h2 {
  color: var(--purple-navy);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.ds-tool .dropzone p {
  color: var(--muted);
  margin-bottom: 1.15rem;
}

.ds-tool .dz-hint {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.ds-tool .file-input-hidden,
.ds-tool .is-hidden {
  display: none !important;
}

.ds-tool .privacy-note {
  max-width: 680px;
  margin: 1.1rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.ds-tool .privacy-note i {
  color: #1f9d55;
}

.ds-tool .trust-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.6rem;
  margin-top: 1.5rem;
  list-style: none;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.ds-tool .trust-strip li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ds-tool .trust-strip i {
  color: var(--purple);
}

.ds-tool .workspace {
  display: none;
  padding: 0 0 2.6rem;
}

.ds-tool .workspace.active {
  display: block;
}

.ds-tool .file-summary-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid rgba(98, 54, 255, 0.1);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 28px rgba(42, 22, 90, 0.06);
  margin-bottom: 1rem;
}

.ds-tool .file-thumb-lg {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f4f0ff;
  color: var(--purple);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.ds-tool .file-summary-meta {
  flex: 1;
  min-width: 140px;
}

.ds-tool .fname {
  font-weight: 700;
  color: var(--purple-navy);
  word-break: break-word;
}

.ds-tool .fsub {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 0.15rem;
}

.ds-tool .ws-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  gap: 1rem;
  align-items: start;
}

.ds-tool .pdf-panel {
  background: #fff;
  border: 1px solid rgba(98, 54, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(42, 22, 90, 0.06);
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.ds-tool .pdf-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(98, 54, 255, 0.08);
  background: #fbfaff;
}

.ds-tool .pdf-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ds-tool .tb-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(98, 54, 255, 0.15);
  border-radius: 10px;
  background: #fff;
  color: var(--purple-navy);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ds-tool .tb-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.ds-tool #pageInfo {
  font-size: 0.86rem;
  font-weight: 600;
  min-width: 3.5rem;
  text-align: center;
}

.ds-tool .sig-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.ds-tool .pdf-viewport {
  flex: 1;
  overflow: auto;
  background: #ece8f5;
  padding: 1rem;
  min-height: 460px;
}

.ds-tool .pdf-viewport.is-placing {
  cursor: crosshair;
}

.ds-tool .pdf-viewport.is-placing .pdf-page canvas {
  outline: 2px dashed rgba(98, 54, 255, 0.4);
  outline-offset: 2px;
}

.ds-tool #pagesContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.ds-tool .pdf-page {
  position: relative;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ds-tool .pdf-page canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.ds-tool .sig-panel {
  background: #fff;
  border: 1px solid rgba(98, 54, 255, 0.1);
  border-radius: 20px;
  padding: 1.15rem 1.2rem 1.3rem;
  box-shadow: 0 12px 32px rgba(42, 22, 90, 0.06);
  position: sticky;
  top: 88px;
}

.ds-tool .sig-panel h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--purple-navy);
  letter-spacing: -0.02em;
}

.ds-tool .sig-hint {
  margin: 0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.ds-tool .tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.ds-tool .tab-btn {
  border: 1px solid rgba(98, 54, 255, 0.14);
  background: #f8f6ff;
  color: var(--muted);
  border-radius: 12px;
  padding: 0.55rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.ds-tool .tab-btn.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.ds-tool .panel {
  display: none;
}

.ds-tool .panel.active {
  display: block;
}

.ds-tool .canvas-container {
  border: 1px dashed #d9cff8;
  border-radius: 14px;
  background:
    linear-gradient(45deg, #f3f1f8 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(-45deg, #f3f1f8 25%, transparent 25%) 0 7px / 14px 14px,
    #fff;
  overflow: hidden;
}

.ds-tool #sigCanvas {
  display: block;
  width: 100%;
  height: 140px;
  cursor: crosshair;
  touch-action: none;
}

.ds-tool .link-btn {
  margin-top: 0.55rem;
  border: 0;
  background: none;
  color: var(--purple);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.ds-tool .type-preview {
  min-height: 72px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(98, 54, 255, 0.12);
  background: #fbfaff;
  margin-bottom: 0.7rem;
  padding: 0.6rem;
  overflow: hidden;
}

.ds-tool #typePreviewText {
  font-size: 1.7rem;
  color: #0d0d0d;
  white-space: nowrap;
}

.ds-tool .input-field {
  width: 100%;
  border: 1px solid rgba(98, 54, 255, 0.18);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  outline: none;
}

.ds-tool .input-field:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(98, 54, 255, 0.12);
}

.ds-tool .upload-zone {
  border: 1px dashed #d9cff8;
  border-radius: 14px;
  padding: 1.2rem 0.8rem;
  text-align: center;
  cursor: pointer;
  background: #fbfaff;
  color: var(--muted);
}

.ds-tool .upload-zone i {
  font-size: 1.5rem;
  color: var(--purple);
  display: block;
  margin-bottom: 0.35rem;
}

.ds-tool .upload-zone p {
  margin: 0;
  font-weight: 600;
  color: var(--purple-navy);
  font-size: 0.9rem;
}

.ds-tool .upload-zone small {
  font-size: 0.78rem;
}

.ds-tool #uploadPreview {
  display: none;
  margin-top: 0.7rem;
  padding: 0.6rem;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #f3f1f8 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(-45deg, #f3f1f8 25%, transparent 25%) 0 7px / 14px 14px,
    #fff;
  text-align: center;
}

.ds-tool #uploadPreview.is-visible {
  display: block;
}

.ds-tool #uploadedSigImg {
  max-width: 100%;
  max-height: 90px;
}

.ds-tool .size-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  margin: 1rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.ds-tool .size-row input[type="range"] {
  width: 100%;
}

.ds-tool .sig-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ds-tool .sig-actions .btn {
  width: 100%;
  justify-content: center;
}

.ds-tool .btn-download:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.ds-tool .signature-overlay {
  box-sizing: border-box;
}

.digital-signature-page .ds-related-grid {
  margin-top: 1.4rem;
}

.digital-signature-page .section-kicker {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.digital-signature-page .tool-copy {
  margin-top: 1.4rem;
}

.digital-signature-page .tool-copy p {
  color: var(--muted);
  max-width: none;
}

.digital-signature-page .tool-copy p + p {
  margin-top: 0.85rem;
}

.digital-signature-page .tool-about .section-head,
.digital-signature-page .related-tools-block .section-head,
.digital-signature-page .about-values .section-head,
.digital-signature-page .faq .section-head {
  text-align: center;
}

.digital-signature-page .tool-about .section-head h2::after,
.digital-signature-page .related-tools-block .section-head h2::after,
.digital-signature-page .about-values .section-head h2::after,
.digital-signature-page .faq .section-head h2::after {
  margin-left: auto;
  margin-right: auto;
}

.digital-signature-page .tool-about-story {
  position: relative;
  overflow: hidden;
  margin-top: 1.6rem;
  padding: 2rem 2rem 1.7rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at 96% 0%, rgba(193, 255, 82, 0.16), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fcfbff 100%);
  border: 1px solid rgba(98, 54, 255, 0.12);
  box-shadow: 0 16px 36px rgba(43, 27, 98, 0.07);
}

.digital-signature-page .tool-about-story::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.4rem;
  bottom: 1.4rem;
  width: 5px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, var(--lime), #8fd400);
}

.digital-signature-page .tool-about-cols {
  display: grid;
  gap: 1.1rem;
}

.digital-signature-page .tool-about-cols p {
  max-width: none;
  margin: 0;
  color: #4a4460;
  font-size: 1.02rem;
  line-height: 1.8;
}

.digital-signature-page .tool-about-cols p:first-child::first-letter {
  float: left;
  margin: 0.08rem 0.4rem 0 0;
  color: var(--purple);
  font-size: 3.1rem;
  font-weight: 800;
  line-height: 0.8;
}

.digital-signature-page .tool-about-highlight {
  max-width: none;
  margin: 1.35rem 0 0;
  padding: 1.15rem 1.25rem;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(98, 54, 255, 0.08), rgba(193, 255, 82, 0.12));
  border: 1px solid rgba(98, 54, 255, 0.12);
  color: var(--purple-navy);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.75;
}

.digital-signature-page .know-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
  list-style: none;
}

.digital-signature-page .know-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.95rem;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid rgba(98, 54, 255, 0.1);
  border-radius: 22px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.digital-signature-page .know-list .value-icon {
  margin-bottom: 0;
}

.digital-signature-page .know-list strong {
  display: block;
  color: var(--purple-navy);
  margin-bottom: 0.25rem;
}

.digital-signature-page .know-list p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.digital-signature-page .value-icon i {
  font-size: 1.15rem;
  color: var(--purple);
}

.digital-signature-page .cta {
  padding: 0 0 3.2rem;
  background: transparent;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 18, 58, 0.45);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.loading-overlay.is-hidden {
  display: none;
}

.loading-box {
  background: #fff;
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
  text-align: center;
  box-shadow: var(--shadow-hover);
  min-width: 220px;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #ece4ff;
  border-top-color: var(--purple);
  display: inline-block;
  animation: ds-spin 0.8s linear infinite;
  margin-bottom: 0.7rem;
}

@keyframes ds-spin {
  to { transform: rotate(360deg); }
}

.ds-toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 10000;
  background: #1f1638;
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  max-width: min(90vw, 420px);
  text-align: center;
}

.ds-toast--success { background: #14804a; }
.ds-toast--error { background: #c0392b; }
.ds-toast--info { background: #3b2d74; }

@media (max-width: 1024px) {
  .ds-tool .ws-layout {
    grid-template-columns: 1fr;
  }

  .ds-tool .sig-panel {
    position: static;
  }

  .ds-tool .pdf-panel {
    min-height: 420px;
  }
}

@media (max-width: 768px) {
  .ds-hero-inner {
    grid-template-columns: 1fr;
  }

  .ds-hero-visual {
    display: none;
  }

  .ds-tool .dropzone {
    padding: 2.2rem 1.1rem 1.8rem;
  }

  .ds-tool .pdf-viewport {
    min-height: 360px;
    padding: 0.7rem;
  }
}

@media (max-width: 640px) {
  .digital-signature-page .tool-about-story {
    padding: 1.4rem 1.15rem 1.25rem;
    border-radius: 20px;
  }

  .digital-signature-page .tool-about-cols p:first-child::first-letter {
    font-size: 2.4rem;
  }
}
