/* ==========================================================================
   PDF Signature - WordPress Theme Isolation & Pixel-Perfect Styling
   Version: 4.9.3
   ========================================================================== */

/* 1. Root Container Framing */
#pdf-signature-root,
#root {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  clear: both !important;
  position: relative !important;
  box-sizing: border-box !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
  line-height: 1.5 !important;
  color: #0f172a !important;
  text-align: left !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

#wp-signature-app-root {
  width: 100% !important;
  height: 88vh !important;
  min-height: 680px !important;
  max-height: 980px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
  background-color: #f0f4f8 !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
}

/* 2. Universal Box-Sizing inside App */
#pdf-signature-root *,
#pdf-signature-root *::before,
#pdf-signature-root *::after {
  box-sizing: border-box !important;
}

/* Universal Protection Against Theme Word-Break & Truncation on Buttons */
#pdf-signature-root button,
#pdf-signature-root button *,
#signature-modal-overlay button,
#signature-modal-overlay button *,
#signature-modal-card button,
#signature-modal-card button * {
  word-break: keep-all !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  white-space: nowrap !important;
}

/* Modal Tab Buttons: ensure labels never wrap */
#signature-modal-card button span,
#signature-modal-overlay button span {
  white-space: nowrap !important;
  display: inline-block !important;
}

/* 3. Typography Overrides Protection */
#pdf-signature-root p,
#pdf-signature-root h1,
#pdf-signature-root h2,
#pdf-signature-root h3,
#pdf-signature-root h4,
#pdf-signature-root h5,
#pdf-signature-root h6,
#pdf-signature-root label {
  font-family: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

#pdf-signature-root p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#pdf-signature-root h1,
#pdf-signature-root h2,
#pdf-signature-root h3,
#pdf-signature-root h4,
#pdf-signature-root h5,
#pdf-signature-root h6 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 4. Form Elements Reset */
#pdf-signature-root input[type="text"],
#pdf-signature-root input[type="number"],
#pdf-signature-root select,
#pdf-signature-root textarea {
  font-family: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: #0f172a !important;
  background-color: #ffffff !important;
}

#pdf-signature-root input[type="radio"],
#pdf-signature-root input[type="checkbox"] {
  width: 1rem !important;
  height: 1rem !important;
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
  cursor: pointer !important;
}

#pdf-signature-root input[type="range"] {
  display: block !important;
  width: 100% !important;
  cursor: pointer !important;
}

/* 5. Viewer & Workspace Structure */
#pdf-viewer-main-wrapper {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  flex: 1 1 0% !important;
  background-color: #f0f4f8 !important;
  position: relative !important;
  overflow: hidden !important;
}

#pdf-viewer-toolbar {
  min-height: 52px !important;
  height: 52px !important;
  padding: 0.375rem 0.875rem !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  z-index: 30 !important;
  position: relative !important;
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

#pdf-viewer-toolbar > div {
  background-color: transparent !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

#pdf-viewer-toolbar > div:first-child {
  gap: 0.5rem !important;
}

#pdf-viewer-toolbar > div:last-child {
  gap: 0.375rem !important;
}

/* 6. TOP TOOLBAR BUTTONS & RATIOS */
#prev-page-btn,
#next-page-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #475569 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
}

#prev-page-btn:hover:not(:disabled),
#next-page-btn:hover:not(:disabled) {
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

#prev-page-btn:disabled,
#next-page-btn:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

#prev-page-btn svg,
#next-page-btn svg {
  width: 16px !important;
  height: 16px !important;
  color: inherit !important;
}

#current-page-num-input {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 24px !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  text-align: center !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  color: #0f172a !important;
  padding: 0 !important;
  margin: 0 4px !important;
  display: inline-block !important;
  box-shadow: none !important;
}

#zoom-out-btn,
#zoom-in-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #334155 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
}

#zoom-out-btn:hover,
#zoom-in-btn:hover {
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

#zoom-out-btn svg,
#zoom-in-btn svg {
  width: 16px !important;
  height: 16px !important;
  color: inherit !important;
}

#zoom-reset-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.25rem 0.5rem !important;
  height: 28px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: #1e293b !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
}

#zoom-reset-btn:hover {
  background-color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Page Signatures Summary Count Pill (e.g. "0 Signatures on Page 1") */
html body #pdf-signature-root #pdf-viewer-toolbar div.rounded-full,
html body #pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"],
#pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"] {
  background: #eef2ff !important;
  background-color: #eef2ff !important;
  color: #03045e !important;
  border: 1px solid #c7d2fe !important;
  border-radius: 9999px !important;
  padding: 3px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: none !important;
}

html body #pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"] span,
#pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"] span {
  color: #03045e !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  display: inline !important;
}

html body #pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"] svg,
#pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"] svg {
  color: #03045e !important;
  stroke: #03045e !important;
  width: 14px !important;
  height: 14px !important;
  display: inline-block !important;
}

#viewer-add-sig-btn {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.375rem !important;
  height: 34px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.15s ease !important;
}

#viewer-add-sig-btn:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
}

#viewer-add-sig-btn svg {
  color: #000851 !important;
  width: 14px !important;
  height: 14px !important;
}

#viewer-preview-pdf-btn {
  background-color: #ffffff !important;
  color: #000851 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.375rem !important;
  height: 34px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.15s ease !important;
}

#viewer-preview-pdf-btn:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
}

#viewer-preview-pdf-btn svg {
  color: #000851 !important;
  width: 14px !important;
  height: 14px !important;
}

#viewer-export-pdf-btn {
  background-color: #000851 !important;
  color: #ffffff !important;
  border: 1px solid #000851 !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.375rem !important;
  height: 34px !important;
  box-shadow: 0 4px 8px -1px rgba(0, 8, 81, 0.25) !important;
  transition: all 0.15s ease !important;
}

#viewer-export-pdf-btn:hover {
  background-color: #03045e !important;
}

#viewer-export-pdf-btn svg {
  color: #00e5ff !important;
  width: 14px !important;
  height: 14px !important;
}

/* 7. Upload Screen */
#pdf-viewer-upload-screen > div {
  background: #ffffff !important;
  border: 2px dashed #cbd5e1 !important;
  border-radius: 1rem !important;
  padding: 2.5rem 3rem !important;
  text-align: center !important;
  max-width: 36rem !important;
  width: 100% !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
}

/* Center Upload Box Graphic & Icon */
#pdf-viewer-upload-screen div[class*="w-16"],
#pdf-viewer-upload-screen .w-16.h-16,
#pdf-viewer-upload-screen div[class*="rounded-2xl"][class*="border"] {
  background-color: #f0f4f8 !important;
  border: 1px solid #cbd5e1 !important;
  color: #000851 !important;
}

#pdf-viewer-upload-screen div[class*="w-16"] svg,
#pdf-viewer-upload-screen .w-16.h-16 svg,
#pdf-viewer-upload-screen svg.w-8.h-8,
#pdf-viewer-upload-screen div[class*="rounded-2xl"][class*="border"] svg {
  color: #000851 !important;
  stroke: #000851 !important;
  width: 32px !important;
  height: 32px !important;
}

/* Modal Upload Tab Dropzone Icon */
#sig-file-upload-input + label svg,
#pdf-signature-root label[for="sig-file-upload-input"] svg,
#pdf-signature-root .border-dashed label svg {
  color: #000851 !important;
  stroke: #000851 !important;
  width: 32px !important;
  height: 32px !important;
}

#pdf-viewer-upload-screen h2 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-bottom: 0.5rem !important;
  letter-spacing: -0.02em !important;
}

#pdf-viewer-upload-screen p {
  font-size: 0.875rem !important;
  color: #64748b !important;
  line-height: 1.6 !important;
  margin-bottom: 1.5rem !important;
  max-width: 26rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#center-upload-pdf-btn {
  background-color: #03045e !important;
  color: #ffffff !important;
  padding: 0.625rem 1.5rem !important;
  border-radius: 12px !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 10px 20px -3px rgba(3, 4, 94, 0.25) !important;
  border: none !important;
  cursor: pointer !important;
  height: 44px !important;
  transition: all 0.15s ease !important;
}

#center-upload-pdf-btn:hover {
  background-color: #023e8a !important;
  box-shadow: 0 12px 24px -3px rgba(3, 4, 94, 0.35) !important;
  transform: translateY(-1px) !important;
}

#center-upload-pdf-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

#center-upload-pdf-btn::before {
  display: none !important;
  content: none !important;
}

#center-upload-pdf-btn svg,
#center-upload-pdf-btn svg *,
#center-upload-pdf-btn svg path,
#center-upload-pdf-btn svg polyline,
#center-upload-pdf-btn svg line,
html body #pdf-signature-root #center-upload-pdf-btn svg,
html body #pdf-signature-root #center-upload-pdf-btn svg * {
  color: #38bdf8 !important;
  stroke: #38bdf8 !important;
  fill: none !important;
  stroke-width: 2.2px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  display: inline-block !important;
  margin: 0 !important;
}

#center-upload-pdf-btn:hover svg,
#center-upload-pdf-btn:hover svg * {
  color: #67e8f9 !important;
  stroke: #67e8f9 !important;
}

#center-upload-pdf-btn span {
  color: #ffffff !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

/* 8. Right Control Sidebar */
#app-control-sidebar {
  width: 320px !important;
  min-width: 320px !important;
  max-width: 320px !important;
  background-color: #ffffff !important;
  border-left: 1px solid #e2e8f0 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow-y: auto !important;
  flex-shrink: 0 !important;
}

/* ==========================================================================
   RESPONSIVE LAYOUT SYSTEM - MOBILE & TABLET OPTIMIZATION
   ========================================================================== */

/* Tablet & Mobile Layout (< 1024px) */
@media (max-width: 1023px) {
  /* Main Container Stacking */
  #wp-signature-app-root {
    height: auto !important;
    min-height: 90vh !important;
    max-height: none !important;
    overflow: visible !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #wp-signature-app-root > div.flex-1.flex,
  #pdf-signature-root div.flex-1.flex {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
    display: flex !important;
    flex: none !important;
  }

  /* PDF Viewer Workspace Takes Prime Viewport with Strict Internal Flex */
  #pdf-viewer-main-wrapper {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 60vh !important;
    min-height: 460px !important;
    max-height: 640px !important;
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-bottom: 3px solid #cbd5e1 !important;
    border-right: none !important;
    position: relative !important;
    background-color: #f1f5f9 !important;
  }

  /* Top Toolbar Fixed at Top of Viewer */
  #pdf-viewer-toolbar {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    height: auto !important;
    min-height: 48px !important;
    padding: 0.375rem 0.625rem !important;
    flex-wrap: wrap !important;
    gap: 0.375rem !important;
    background: #ffffff !important;
    z-index: 20 !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }

  /* PDF Viewer Canvas Viewport Touch Scrolling & Horizontal Pan Moving Area */
  #pdf-canvas-scroll-container,
  #pdf-preview-scroll-container,
  #pdf-viewer-main-wrapper div.flex-1.overflow-auto,
  #pdf-viewer-main-wrapper div[class*="overflow-auto"],
  #pdf-preview-modal-card div.flex-1.overflow-auto,
  #pdf-preview-modal-card div[class*="overflow-auto"] {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    padding: 16px !important;
    display: block !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  #pdf-render-canvas-container,
  #pdf-preview-scroll-container > div,
  #pdf-preview-modal-card div[class*="shadow"] {
    display: inline-block !important;
    vertical-align: top !important;
    text-align: left !important;
    white-space: normal !important;
    margin: 0 auto !important;
    max-width: none !important;
    touch-action: pan-x pan-y !important;
  }

  #pdf-render-canvas-container canvas,
  #pdf-preview-scroll-container canvas,
  #pdf-preview-modal-card canvas {
    touch-action: pan-x pan-y !important;
    max-width: none !important;
    display: block !important;
  }

  /* Document Pages Thumbnails Strip - 100% Horizontal Side-by-Side with Visible Scrollbar */
  html body #pdf-signature-root #pdf-thumbnails-strip,
  #pdf-thumbnails-strip {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    padding: 2px 8px !important;
    background: #ffffff !important;
    border-top: 2px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 20 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body #pdf-signature-root #pdf-thumbnails-strip button[title*="Scroll Pages"],
  #pdf-thumbnails-strip button[title*="Scroll Pages"] {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #03045e !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  }

  html body #pdf-signature-root #pdf-thumbnails-strip button[title*="Scroll Pages"]:hover,
  #pdf-thumbnails-strip button[title*="Scroll Pages"]:hover {
    background-color: #e2e8f0 !important;
    border-color: #94a3b8 !important;
  }

  html body #pdf-signature-root #pdf-thumbnails-scroll-inner,
  #pdf-thumbnails-scroll-inner {
    display: block !important;
    white-space: nowrap !important;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 48px !important;
    padding: 2px 2px 6px 2px !important;
    box-sizing: border-box !important;
    scrollbar-width: thin !important;
    scrollbar-color: #03045e #e2e8f0 !important;
  }

  html body #pdf-signature-root #pdf-thumbnails-scroll-inner::-webkit-scrollbar,
  #pdf-thumbnails-scroll-inner::-webkit-scrollbar {
    height: 6px !important;
    display: block !important;
    background-color: #f1f5f9 !important;
    -webkit-appearance: none !important;
  }

  html body #pdf-signature-root #pdf-thumbnails-scroll-inner::-webkit-scrollbar-track,
  #pdf-thumbnails-scroll-inner::-webkit-scrollbar-track {
    background: #e2e8f0 !important;
    border-radius: 9999px !important;
  }

  html body #pdf-signature-root #pdf-thumbnails-scroll-inner::-webkit-scrollbar-thumb,
  #pdf-thumbnails-scroll-inner::-webkit-scrollbar-thumb {
    background: #03045e !important;
    border-radius: 9999px !important;
  }

  html body #pdf-signature-root #pdf-thumbnails-scroll-inner::-webkit-scrollbar-thumb:hover,
  #pdf-thumbnails-scroll-inner::-webkit-scrollbar-thumb:hover {
    background: #023e8a !important;
  }

  html body #pdf-signature-root #pdf-thumbnails-scroll-inner button,
  #pdf-thumbnails-scroll-inner button {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: top !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    margin: 0 6px 0 0 !important;
    padding: 0 8px !important;
    min-width: 48px !important;
    width: auto !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    line-height: 26px !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }

  html body #pdf-signature-root #pdf-thumbnails-scroll-inner button span,
  #pdf-thumbnails-scroll-inner button span {
    display: inline !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    line-height: 1 !important;
    font-size: 11px !important;
  }

  /* Control Panel Sidebar Stacks Cleanly Below Workspace */
  #app-control-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    flex: none !important;
    border-left: none !important;
    border-top: 2px solid #e2e8f0 !important;
    overflow: visible !important;
    padding: 1.25rem 1rem !important;
    position: relative !important;
    z-index: 5 !important;
    background: #ffffff !important;
  }
}

/* Smartphone Layout (< 768px) */
@media (max-width: 767px) {
  #wp-signature-app-root {
    border-radius: 8px !important;
    margin: 0 !important;
  }

  #pdf-viewer-main-wrapper {
    height: 54vh !important;
    min-height: 380px !important;
  }

  /* PDF Viewer Top Toolbar Mobile Responsive Layout */
  #pdf-viewer-toolbar,
  html body #pdf-signature-root #pdf-viewer-toolbar {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  #pdf-viewer-toolbar > div,
  html body #pdf-signature-root #pdf-viewer-toolbar > div {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }

  /* Row 1: Page Navigation & Signatures Count Pill */
  #pdf-viewer-toolbar > div:first-child,
  html body #pdf-signature-root #pdf-viewer-toolbar > div:first-child {
    justify-content: space-between !important;
    gap: 4px !important;
  }

  /* Row 2: Zoom Controls, Place Signature, Preview, and Download Buttons */
  #pdf-viewer-toolbar > div:last-child,
  html body #pdf-signature-root #pdf-viewer-toolbar > div:last-child {
    justify-content: space-between !important;
    gap: 3px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 1px !important;
  }

  #pdf-viewer-toolbar > div:last-child::-webkit-scrollbar,
  html body #pdf-signature-root #pdf-viewer-toolbar > div:last-child::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* Zoom controls cluster */
  #pdf-viewer-toolbar > div:last-child > div:first-child {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    gap: 0 !important;
    margin-right: 0 !important;
  }

  #zoom-out-btn,
  #zoom-in-btn {
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  #zoom-out-btn svg,
  #zoom-in-btn svg {
    width: 12px !important;
    height: 12px !important;
  }

  #zoom-reset-btn {
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 2px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
  }

  /* Action Buttons in Toolbar on Mobile */
  #viewer-add-sig-btn,
  #viewer-preview-pdf-btn,
  #viewer-export-pdf-btn {
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    line-height: 26px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
  }

  #viewer-add-sig-btn {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
  }

  #viewer-preview-pdf-btn {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
  }

  #viewer-export-pdf-btn {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 0 7px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    background-color: #03045e !important;
    color: #ffffff !important;
    border: 1px solid #03045e !important;
    box-shadow: 0 1px 3px rgba(3, 4, 94, 0.3) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
  }

  #viewer-add-sig-btn svg,
  #viewer-preview-pdf-btn svg,
  #viewer-export-pdf-btn svg {
    width: 11px !important;
    height: 11px !important;
    flex-shrink: 0 !important;
  }

  /* Page Navigation Controls on Mobile */
  #prev-page-btn,
  #next-page-btn {
    width: 26px !important;
    min-width: 26px !important;
    height: 28px !important;
    min-height: 28px !important;
  }

  #current-page-num-input {
    width: 32px !important;
    min-width: 32px !important;
    height: 24px !important;
    font-size: 11px !important;
  }

  /* Page Signatures Summary Count Pill */
  html body #pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"],
  #pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"] {
    padding: 2px 8px !important;
    font-size: 11px !important;
    max-width: 60% !important;
  }

  html body #pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"] span,
  #pdf-signature-root #pdf-viewer-toolbar div[class*="rounded-full"] span {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Signature Modal Mobile Dialog Framing */
  #signature-modal-card,
  #pdf-signature-root .fixed > div.relative,
  html body #signature-modal-card {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 94vh !important;
    margin: 1.5vh auto !important;
    padding: 0 !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.25) !important;
  }

  /* Modal Header on Mobile */
  #signature-modal-card > div:first-child,
  html body #signature-modal-card > div:first-child {
    padding: 12px 16px !important;
  }

  #signature-modal-card > div:first-child h3,
  html body #signature-modal-card > div:first-child h3 {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  #signature-modal-card > div:first-child p,
  html body #signature-modal-card > div:first-child p {
    font-size: 10px !important;
  }

  /* Modal Navigation Tabs Touch Grid (All 6 Tabs Visible: Draw, Type, Line, Text Box, Upload, Verified Seal) */
  #signature-modal-card nav,
  #signature-modal-card .flex.border-b,
  #signature-modal-card div[class*="border-b"][class*="flex"],
  html body #signature-modal-card div[class*="border-b"][class*="flex"] {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    overflow: visible !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #signature-modal-card nav button,
  #signature-modal-card div[class*="border-b"] button,
  html body #signature-modal-card div[class*="border-b"] button,
  #tab-draw-btn,
  #tab-type-btn,
  #tab-line-btn,
  #tab-text-btn,
  #tab-upload-btn,
  #tab-stamp-btn,
  html body #signature-modal-card button[id^="tab-"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    box-sizing: border-box !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #334155 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
  }

  #signature-modal-card div[class*="border-b"] button span,
  html body #signature-modal-card div[class*="border-b"] button span,
  html body #signature-modal-card button[id^="tab-"] span {
    font-size: 11px !important;
    color: #334155 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
    display: inline-block !important;
  }

  #signature-modal-card div[class*="border-b"] button svg,
  html body #signature-modal-card div[class*="border-b"] button svg,
  html body #signature-modal-card button[id^="tab-"] svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    color: #64748b !important;
  }

  /* Active Tab Button Highlight on Mobile */
  #tab-draw-btn[class*="bg-white"],
  #tab-type-btn[class*="bg-white"],
  #tab-line-btn[class*="bg-white"],
  #tab-text-btn[class*="bg-white"],
  #tab-upload-btn[class*="bg-white"],
  #tab-stamp-btn[class*="bg-white"],
  #signature-modal-card div[class*="border-b"] button[class*="border-[#03045e]"],
  #signature-modal-card div[class*="border-b"] button[class*="text-[#03045e]"],
  #signature-modal-card div[class*="border-b"] button[class*="bg-white"],
  html body #signature-modal-card div[class*="border-b"] button[class*="border-[#03045e]"],
  html body #signature-modal-card div[class*="border-b"] button[class*="text-[#03045e]"],
  html body #signature-modal-card div[class*="border-b"] button[class*="bg-white"] {
    background: #03045e !important;
    background-color: #03045e !important;
    color: #ffffff !important;
    border: 1px solid #03045e !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(3, 4, 94, 0.25) !important;
  }

  #tab-draw-btn[class*="bg-white"] span,
  #tab-type-btn[class*="bg-white"] span,
  #tab-line-btn[class*="bg-white"] span,
  #tab-text-btn[class*="bg-white"] span,
  #tab-upload-btn[class*="bg-white"] span,
  #tab-stamp-btn[class*="bg-white"] span,
  #signature-modal-card div[class*="border-b"] button[class*="border-[#03045e]"] span,
  #signature-modal-card div[class*="border-b"] button[class*="text-[#03045e]"] span,
  #signature-modal-card div[class*="border-b"] button[class*="bg-white"] span,
  html body #signature-modal-card div[class*="border-b"] button[class*="border-[#03045e]"] span,
  html body #signature-modal-card div[class*="border-b"] button[class*="text-[#03045e]"] span,
  html body #signature-modal-card div[class*="border-b"] button[class*="bg-white"] span {
    color: #ffffff !important;
    font-weight: 700 !important;
  }

  #tab-draw-btn[class*="bg-white"] svg,
  #tab-type-btn[class*="bg-white"] svg,
  #tab-line-btn[class*="bg-white"] svg,
  #tab-text-btn[class*="bg-white"] svg,
  #tab-upload-btn[class*="bg-white"] svg,
  #tab-stamp-btn[class*="bg-white"] svg,
  #signature-modal-card div[class*="border-b"] button[class*="border-[#03045e]"] svg,
  #signature-modal-card div[class*="border-b"] button[class*="text-[#03045e]"] svg,
  #signature-modal-card div[class*="border-b"] button[class*="bg-white"] svg,
  html body #signature-modal-card div[class*="border-b"] button[class*="border-[#03045e]"] svg,
  html body #signature-modal-card div[class*="border-b"] button[class*="text-[#03045e]"] svg,
  html body #signature-modal-card div[class*="border-b"] button[class*="bg-white"] svg {
    color: #38bdf8 !important;
    stroke: currentColor !important;
  }

  /* Modal Body Scroll Area */
  #signature-modal-card > div.p-6,
  #signature-modal-card div[class*="space-y-"],
  html body #signature-modal-card > div.p-6 {
    overflow-y: auto !important;
    max-height: calc(90vh - 170px) !important;
    padding: 14px 12px !important;
  }

  /* Responsive Signature Drawing Canvas */
  #signature-pad-canvas,
  canvas[id*="signature"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 160px !important;
    touch-action: none !important;
  }

  /* Compact Modal Footer */
  #signature-modal-card > div.px-6.py-4.bg-slate-50,
  #signature-modal-card > div:last-child,
  html body #signature-modal-card > div:last-child {
    padding: 10px 14px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  #signature-modal-card > div:last-child button,
  html body #signature-modal-card > div:last-child button {
    font-size: 12px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
  }
}

@media (max-width: 360px) {
  #signature-modal-card div[class*="border-b"][class*="flex"],
  html body #signature-modal-card div[class*="border-b"][class*="flex"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

#app-control-sidebar h2 {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #000851 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  margin-bottom: 0.75rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

#app-control-sidebar h4,
#app-control-sidebar h4[title] {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
}

#app-control-sidebar h4 + p,
#app-control-sidebar h4[title] + p {
  font-size: 0.65rem !important;
  color: #94a3b8 !important;
  margin-top: 2px !important;
  font-family: inherit !important;
}

/* Sidebar Action Buttons */
#upload-custom-pdf-btn {
  background-color: #000851 !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  padding: 0.625rem 1rem !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  border: none !important;
  height: 44px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 4px rgba(0, 8, 81, 0.15) !important;
  transition: all 0.15s ease !important;
}

#upload-custom-pdf-btn:hover {
  background-color: #03045e !important;
}

#upload-custom-pdf-btn svg {
  color: #00e5ff !important;
  width: 16px !important;
  height: 16px !important;
}

#sidebar-preview-btn {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #000851 !important;
  border-radius: 12px !important;
  padding: 0.625rem 1rem !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  height: 44px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.15s ease !important;
}

#sidebar-preview-btn:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
}

#sidebar-preview-btn svg {
  color: #000851 !important;
  width: 16px !important;
  height: 16px !important;
}

#sidebar-export-btn {
  background-color: #000851 !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.84375rem !important;
  font-weight: 700 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  height: 46px !important;
  box-shadow: 0 4px 12px rgba(0, 8, 81, 0.25) !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin-top: 8px !important;
}

#sidebar-export-btn:hover {
  background-color: #03045e !important;
}

#sidebar-export-btn svg {
  color: #00e5ff !important;
  width: 18px !important;
  height: 18px !important;
}

#main-create-signature-btn {
  background-color: #000851 !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  margin-bottom: 0.75rem !important;
  box-shadow: 0 4px 10px rgba(0, 8, 81, 0.2) !important;
  border: none !important;
  height: 44px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#main-create-signature-btn:hover {
  background-color: #03045e !important;
}

#main-create-signature-btn svg {
  color: #00e5ff !important;
  width: 16px !important;
  height: 16px !important;
}

#sidebar-add-signature-line-btn,
#sidebar-add-text-box-btn {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 6px 8px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  height: 38px !important;
  min-height: 38px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

#sidebar-add-signature-line-btn:hover,
#sidebar-add-text-box-btn:hover {
  border-color: #03045e !important;
  background-color: #f8fafc !important;
  color: #03045e !important;
  box-shadow: 0 2px 4px rgba(3, 4, 94, 0.08) !important;
}

#sidebar-add-signature-line-btn span,
#sidebar-add-text-box-btn span {
  color: #0f172a !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

#sidebar-add-signature-line-btn:hover span,
#sidebar-add-text-box-btn:hover span {
  color: #03045e !important;
}

#sidebar-add-signature-line-btn svg,
#sidebar-add-text-box-btn svg {
  color: #03045e !important;
  stroke: #03045e !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

/* Sidebar Quick Style Templates (Cursive Script, Solid Line, Draw Ink, Verified Seal) */
#app-control-sidebar .grid.grid-cols-2 button {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  height: 40px !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  padding: 0 8px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

#app-control-sidebar .grid.grid-cols-2 button:hover {
  border-color: #000851 !important;
  background-color: #f8fafc !important;
}

#app-control-sidebar .grid.grid-cols-2 button span {
  color: #0f172a !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
}

/* Draw Ink template subtle accent */
#app-control-sidebar .grid.grid-cols-2 button[class*="bg-[#03045e]"],
#app-control-sidebar .grid.grid-cols-2 button[class*="border-[#03045e]"] {
  background: #eff6ff !important;
  background-color: #eff6ff !important;
  border-color: #000851 !important;
}

#app-control-sidebar .grid.grid-cols-2 button[class*="bg-[#03045e]"] span,
#app-control-sidebar .grid.grid-cols-2 button[class*="border-[#03045e]"] span {
  color: #000851 !important;
  font-weight: 700 !important;
}

/* 9. Bottom Page Thumbnails Bar */
#pdf-thumbnails-strip,
html body #pdf-signature-root #pdf-thumbnails-strip {
  background-color: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 0.5rem 1rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  z-index: 10 !important;
  min-height: 52px !important;
  height: 52px !important;
  box-sizing: border-box !important;
}

#pdf-thumbnails-strip > span {
  font-size: 0.625rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  white-space: nowrap !important;
  margin-right: 4px !important;
}

/* Scroll Container for Page Number Tabs */
html body #pdf-signature-root #pdf-thumbnails-scroll-inner,
#pdf-thumbnails-scroll-inner,
#pdf-thumbnails-strip > div {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 4px 6px !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
}

/* Page Number Tab Buttons with Gap Before and After */
#pdf-thumbnails-strip button,
#pdf-thumbnails-scroll-inner button,
html body #pdf-signature-root #pdf-thumbnails-strip button {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 0 10px !important;
  height: 28px !important;
  min-height: 28px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.375rem !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin: 0 4px !important;
  flex-shrink: 0 !important;
}

#pdf-thumbnails-strip button:hover,
#pdf-thumbnails-scroll-inner button:hover {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

#pdf-thumbnails-strip button span,
#pdf-thumbnails-scroll-inner button span {
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Active Selected Page Tab */
#pdf-thumbnails-strip button[class*="bg-"],
#pdf-thumbnails-scroll-inner button[class*="bg-"],
html body #pdf-signature-root #pdf-thumbnails-strip button[class*="bg-"] {
  background: #000851 !important;
  background-color: #000851 !important;
  color: #ffffff !important;
  border: 1px solid #000851 !important;
  box-shadow: 0 2px 4px rgba(0, 8, 81, 0.25) !important;
  margin: 0 4px !important;
}

#pdf-thumbnails-strip button[class*="bg-"]:hover,
#pdf-thumbnails-scroll-inner button[class*="bg-"]:hover {
  background-color: #03045e !important;
  border-color: #03045e !important;
}

#pdf-thumbnails-strip button[class*="bg-"] span,
#pdf-thumbnails-scroll-inner button[class*="bg-"] span {
  color: #ffffff !important;
  font-weight: 700 !important;
}

#pdf-thumbnails-strip button span[class*="rounded-full"],
#pdf-thumbnails-scroll-inner button span[class*="rounded-full"] {
  font-size: 0.625rem !important;
  padding: 1px 6px !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
}

/* Arrow Scroll Buttons (< and >) */
#pdf-thumbnails-strip button[title*="Scroll Pages"],
html body #pdf-signature-root #pdf-thumbnails-strip button[title*="Scroll Pages"] {
  background: #03045e !important;
  background-color: #03045e !important;
  color: #ffffff !important;
  border: 1px solid #03045e !important;
  border-radius: 8px !important;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  margin: 0 4px !important;
  box-shadow: 0 1px 3px rgba(3, 4, 94, 0.25) !important;
}

#pdf-thumbnails-strip button[title*="Scroll Pages"]:hover,
html body #pdf-signature-root #pdf-thumbnails-strip button[title*="Scroll Pages"]:hover {
  background-color: #023e8a !important;
  border-color: #023e8a !important;
}

#pdf-thumbnails-strip button[title*="Scroll Pages"] svg,
html body #pdf-signature-root #pdf-thumbnails-strip button[title*="Scroll Pages"] svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* 10. SIGNATURE MODAL COMPLETE THEME ISOLATION */
#pdf-signature-root [class*="bg-[#03045e]"]:not([class*="bg-[#03045e]/"]):not(#app-control-sidebar *),
#pdf-signature-root [class*="bg-slate-900"]:not(#app-control-sidebar *) {
  color: #ffffff !important;
}

#pdf-signature-root h2,
#pdf-signature-root h3 {
  color: inherit !important;
}

#close-sig-modal-btn,
#close-preview-modal-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.375rem !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(255, 255, 255, 0.8) !important;
  cursor: pointer !important;
}

#close-sig-modal-btn:hover,
#close-preview-modal-btn:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

#close-sig-modal-btn svg,
#close-preview-modal-btn svg {
  color: inherit !important;
  width: 20px !important;
  height: 20px !important;
}

/* ==========================================================================
   Desktop / Tablet Landscape Signature Modal Tabs (>= 768px)
   ========================================================================== */
@media (min-width: 768px) {
  /* Modal Top Signature Type Tabs Navigation Container */
  #signature-modal-card nav,
  #signature-modal-card .flex.border-b,
  #signature-modal-card div[class*="border-b"][class*="flex"],
  html body #signature-modal-card div[class*="border-b"][class*="flex"] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    gap: 4px !important;
    padding: 8px 16px 0 16px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #signature-modal-card div[class*="border-b"][class*="flex"]::-webkit-scrollbar,
  html body #signature-modal-card div[class*="border-b"][class*="flex"]::-webkit-scrollbar {
    height: 4px !important;
  }

  #signature-modal-card div[class*="border-b"][class*="flex"]::-webkit-scrollbar-thumb,
  html body #signature-modal-card div[class*="border-b"][class*="flex"]::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 4px !important;
  }

  /* Modal Top Signature Type Tabs */
  #tab-draw-btn,
  #tab-type-btn,
  #tab-line-btn,
  #tab-text-btn,
  #tab-upload-btn,
  #tab-stamp-btn,
  #signature-modal-card div[class*="border-b"] button,
  html body #signature-modal-card div[class*="border-b"] button,
  html body #signature-modal-card button[id^="tab-"] {
    background: transparent !important;
    background-color: transparent !important;
    color: #475569 !important;
    border: 2px solid transparent !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
  }

  #tab-draw-btn:hover,
  #tab-type-btn:hover,
  #tab-line-btn:hover,
  #tab-text-btn:hover,
  #tab-upload-btn:hover,
  #tab-stamp-btn:hover,
  #signature-modal-card div[class*="border-b"] button:hover,
  html body #signature-modal-card div[class*="border-b"] button:hover {
    color: #0f172a !important;
    background-color: rgba(241, 245, 249, 0.6) !important;
  }

  #tab-draw-btn[class*="bg-white"],
  #tab-type-btn[class*="bg-white"],
  #tab-line-btn[class*="bg-white"],
  #tab-text-btn[class*="bg-white"],
  #tab-upload-btn[class*="bg-white"],
  #tab-stamp-btn[class*="bg-white"],
  #tab-draw-btn[class*="border-[#03045e]"],
  #tab-type-btn[class*="border-[#03045e]"],
  #tab-line-btn[class*="border-[#03045e]"],
  #tab-text-btn[class*="border-[#03045e]"],
  #tab-upload-btn[class*="border-[#03045e]"],
  #tab-stamp-btn[class*="border-[#03045e]"],
  #signature-modal-card div[class*="border-b"] button[class*="bg-white"],
  html body #signature-modal-card div[class*="border-b"] button[class*="bg-white"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #03045e !important;
    border: 2px solid #03045e !important;
    border-radius: 8px 8px 0 0 !important;
    box-shadow: 0 1px 3px rgba(3, 4, 94, 0.08) !important;
    font-weight: 700 !important;
  }

  #tab-draw-btn span,
  #tab-type-btn span,
  #tab-line-btn span,
  #tab-text-btn span,
  #tab-upload-btn span,
  #tab-stamp-btn span,
  #signature-modal-card div[class*="border-b"] button span,
  html body #signature-modal-card div[class*="border-b"] button span,
  html body #signature-modal-card button[id^="tab-"] span {
    display: inline-block !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    font-size: 12px !important;
    font-weight: inherit !important;
    line-height: 1.4 !important;
    color: inherit !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #tab-draw-btn[class*="bg-white"] span,
  #tab-type-btn[class*="bg-white"] span,
  #tab-line-btn[class*="bg-white"] span,
  #tab-text-btn[class*="bg-white"] span,
  #tab-upload-btn[class*="bg-white"] span,
  #tab-stamp-btn[class*="bg-white"] span,
  #tab-draw-btn[class*="border-[#03045e]"] span,
  #tab-type-btn[class*="border-[#03045e]"] span,
  #tab-line-btn[class*="border-[#03045e]"] span,
  #tab-text-btn[class*="border-[#03045e]"] span,
  #tab-upload-btn[class*="border-[#03045e]"] span,
  #tab-stamp-btn[class*="border-[#03045e]"] span,
  #signature-modal-card div[class*="border-b"] button[class*="bg-white"] span,
  html body #signature-modal-card div[class*="border-b"] button[class*="bg-white"] span {
    color: #03045e !important;
    font-weight: 700 !important;
  }

  #tab-draw-btn svg,
  #tab-type-btn svg,
  #tab-line-btn svg,
  #tab-text-btn svg,
  #tab-upload-btn svg,
  #tab-stamp-btn svg,
  #signature-modal-card div[class*="border-b"] button svg,
  html body #signature-modal-card div[class*="border-b"] button svg,
  html body #signature-modal-card button[id^="tab-"] svg {
    color: inherit !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
  }

  #tab-draw-btn[class*="bg-white"] svg,
  #tab-type-btn[class*="bg-white"] svg,
  #tab-line-btn[class*="bg-white"] svg,
  #tab-text-btn[class*="bg-white"] svg,
  #tab-upload-btn[class*="bg-white"] svg,
  #tab-stamp-btn[class*="bg-white"] svg,
  #tab-draw-btn[class*="border-[#03045e]"] svg,
  #tab-type-btn[class*="border-[#03045e]"] svg,
  #tab-line-btn[class*="border-[#03045e]"] svg,
  #tab-text-btn[class*="border-[#03045e]"] svg,
  #tab-upload-btn[class*="border-[#03045e]"] svg,
  #tab-stamp-btn[class*="border-[#03045e]"] svg,
  #signature-modal-card div[class*="border-b"] button[class*="bg-white"] svg,
  html body #signature-modal-card div[class*="border-b"] button[class*="bg-white"] svg {
    color: #03045e !important;
    stroke: currentColor !important;
  }
}

/* Canvas Undo & Clear Buttons */
#undo-sig-stroke-btn {
  background: #f1f5f9 !important;
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 0.25rem 0.625rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  box-shadow: none !important;
  height: 28px !important;
}

#undo-sig-stroke-btn:hover:not(:disabled) {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

#undo-sig-stroke-btn:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

#clear-sig-canvas-btn {
  background: #fef2f2 !important;
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  border-radius: 6px !important;
  padding: 0.25rem 0.625rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  box-shadow: none !important;
  height: 28px !important;
}

#clear-sig-canvas-btn:hover {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
}

#undo-sig-stroke-btn svg,
#clear-sig-canvas-btn svg {
  width: 12px !important;
  height: 12px !important;
  color: inherit !important;
}

/* ==========================================================================
   11. ALL INK & STAMP COLOR PALETTE CIRCLES (Draw, Type, Line, Text, Stamp)
   ========================================================================== */
html body #pdf-signature-root div.flex-wrap > button.rounded-full:not([title*="Add"]),
html body #signature-modal-card div.flex-wrap > button.rounded-full:not([title*="Add"]),
.pdf-signature-app div.flex-wrap > button.rounded-full:not([title*="Add"]),
html body #pdf-signature-root button.w-7.h-7.rounded-full:not([title*="Add"]),
button.w-7.h-7.rounded-full:not([title*="Add"]) {
  border-radius: 9999px !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 2px solid transparent !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  overflow: hidden !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Inner Color Div Fill */
html body #pdf-signature-root button.w-7.h-7.rounded-full div,
html body #signature-modal-card button.w-7.h-7.rounded-full div,
button.w-7.h-7.rounded-full div {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  border-radius: 9999px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  pointer-events: none !important;
}

/* Selected Active Swatch Ring */
html body button.rounded-full[class*="ring-2"],
html body button.rounded-full[class*="scale-110"],
button.rounded-full[class*="ring-2"],
button.rounded-full[class*="scale-110"] {
  border: 2px solid #0f172a !important;
  box-shadow: 0 0 0 3px rgba(3, 4, 94, 0.3) !important;
  transform: scale(1.1) !important;
}

/* ==========================================================================
   11B. ADD CUSTOM COLOR BUTTON (+) - PERFECTLY CENTERED
   ========================================================================== */
html body #pdf-signature-root button[title*="Add Custom Color"],
html body div.relative > button.rounded-full[title*="Add Custom Color"],
button.rounded-full[title*="Add Custom Color"],
button[class*="rounded-full"][title*="Add Custom Color"] {
  border-radius: 9999px !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 2px dashed #94a3b8 !important;
  color: #03045e !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  vertical-align: middle !important;
  line-height: 0 !important;
  font-size: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
}

html body #pdf-signature-root button[title*="Add Custom Color"]:hover,
button.rounded-full[title*="Add Custom Color"]:hover {
  background-color: #eff6ff !important;
  border-color: #03045e !important;
}

html body #pdf-signature-root button[title*="Add Custom Color"] svg,
button.rounded-full[title*="Add Custom Color"] svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  color: #03045e !important;
  stroke: #03045e !important;
  display: block !important;
  margin: 0 !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: none !important;
}

/* Custom HEX Code Input Box */
html body #pdf-signature-root input[placeholder="46027E"],
html body #signature-modal-card input[placeholder="46027E"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  outline: none !important;
}

html body button.rounded-full[title*="Add Custom Color"]:hover,
html body button[class*="rounded-full"][title*="Add Custom Color"]:hover,
html body div.relative > button.rounded-full:hover,
html body div[class*="relative"] > button.rounded-full:hover {
  background-color: #f8fafc !important;
  border-color: #03045e !important;
  color: #03045e !important;
}

html body button.rounded-full[title*="Add Custom Color"] svg,
html body button[class*="rounded-full"][title*="Add Custom Color"] svg,
html body div.relative > button.rounded-full svg,
html body div[class*="relative"] > button.rounded-full svg {
  width: 14px !important;
  height: 14px !important;
  color: #475569 !important;
  stroke: #475569 !important;
  display: block !important;
}

html body button.rounded-full[title*="Add Custom Color"]:hover svg,
html body div.relative > button.rounded-full:hover svg {
  color: #03045e !important;
  stroke: #03045e !important;
}

/* ==========================================================================
   11B. STAMP HEADER PRESET PILLS (DIGITALLY VERIFIED SIGNATURE, etc.)
   ========================================================================== */
html body #pdf-signature-root button.rounded-md,
html body #pdf-signature-root button[class*="rounded-md"],
#pdf-signature-root button.rounded-md {
  border-radius: 6px !important;
  width: auto !important;
  min-width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 22px !important;
  max-height: none !important;
  padding: 3px 8px !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  margin: 2px !important;
}

html body #pdf-signature-root button.rounded-md:hover,
#pdf-signature-root button.rounded-md:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* Active Selected Preset Pill */
html body #pdf-signature-root button.rounded-md[class*="bg-[#03045e]"],
html body #pdf-signature-root button.rounded-md[class*="border-[#03045e]"],
#pdf-signature-root button.rounded-md[class*="bg-[#03045e]"] {
  background: #000851 !important;
  background-color: #000851 !important;
  color: #ffffff !important;
  border-color: #000851 !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   12. STAMP & SEAL TAB: 6 STYLE SELECTION CARDS
   ========================================================================== */
html body #pdf-signature-root .space-y-4 .grid button,
html body #pdf-signature-root div[class*="grid-cols-2"] button,
html body #pdf-signature-root div[class*="sm:grid-cols-3"] button,
#pdf-signature-root .space-y-4 .grid button,
#pdf-signature-root div[class*="grid-cols-2"] button,
#pdf-signature-root div[class*="sm:grid-cols-3"] button,
#pdf-signature-root button:has(p.line-clamp-2) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  color: #0f172a !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
  height: auto !important;
}

html body #pdf-signature-root .space-y-4 .grid button:hover,
html body #pdf-signature-root div[class*="grid-cols-2"] button:hover,
html body #pdf-signature-root div[class*="sm:grid-cols-3"] button:hover,
#pdf-signature-root .space-y-4 .grid button:hover,
#pdf-signature-root div[class*="grid-cols-2"] button:hover,
#pdf-signature-root div[class*="sm:grid-cols-3"] button:hover,
#pdf-signature-root button:has(p.line-clamp-2):hover {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
}

/* Stamp Card Title Text (Crisp Black/Dark Slate) */
html body #pdf-signature-root .space-y-4 .grid button span,
html body #pdf-signature-root div[class*="grid-cols-2"] button span,
html body #pdf-signature-root div[class*="sm:grid-cols-3"] button span,
#pdf-signature-root .space-y-4 .grid button span,
#pdf-signature-root div[class*="grid-cols-2"] button span,
#pdf-signature-root div[class*="sm:grid-cols-3"] button span,
#pdf-signature-root button:has(p.line-clamp-2) span {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  display: inline-block !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Stamp Card Description Text (Readable Black/Slate) */
html body #pdf-signature-root .space-y-4 .grid button p,
html body #pdf-signature-root div[class*="grid-cols-2"] button p,
html body #pdf-signature-root div[class*="sm:grid-cols-3"] button p,
#pdf-signature-root .space-y-4 .grid button p,
#pdf-signature-root div[class*="grid-cols-2"] button p,
#pdf-signature-root div[class*="sm:grid-cols-3"] button p,
#pdf-signature-root button:has(p.line-clamp-2) p {
  font-size: 10px !important;
  font-weight: 400 !important;
  color: #334155 !important;
  line-height: 1.35 !important;
  margin-top: 4px !important;
  display: block !important;
  text-transform: none !important;
}

/* Stamp Card Icon */
html body #pdf-signature-root .space-y-4 .grid button svg,
html body #pdf-signature-root div[class*="grid-cols-2"] button svg,
html body #pdf-signature-root div[class*="sm:grid-cols-3"] button svg,
#pdf-signature-root .space-y-4 .grid button svg,
#pdf-signature-root div[class*="grid-cols-2"] button svg,
#pdf-signature-root div[class*="sm:grid-cols-3"] button svg,
#pdf-signature-root button:has(p.line-clamp-2) svg {
  color: #000851 !important;
  stroke: #000851 !important;
  width: 14px !important;
  height: 14px !important;
}

/* Active Selected Stamp Card */
html body #pdf-signature-root .space-y-4 .grid button[class*="border-[#03045e]"],
html body #pdf-signature-root .space-y-4 .grid button[class*="bg-blue-50"],
#pdf-signature-root .space-y-4 .grid button[class*="border-[#03045e]"],
#pdf-signature-root .space-y-4 .grid button[class*="bg-blue-50"],
#pdf-signature-root div[class*="grid-cols-2"] button[class*="border-[#03045e]"],
#pdf-signature-root div[class*="grid-cols-2"] button[class*="bg-blue-50"],
#pdf-signature-root button:has(p.line-clamp-2)[class*="border-[#03045e]"],
#pdf-signature-root button:has(p.line-clamp-2)[class*="bg-blue-50"] {
  background: #eff6ff !important;
  background-color: #eff6ff !important;
  border: 1.5px solid #000851 !important;
  box-shadow: 0 0 0 2px rgba(0, 8, 81, 0.15) !important;
}

/* ==========================================================================
   13. PAGE PLACEMENT CONTROL CARDS (Modal Bottom Section)
   ========================================================================== */
html body #pdf-signature-root #target-current-page-btn,
html body #pdf-signature-root #target-all-pages-btn,
html body #pdf-signature-root #target-first-last-btn,
html body #pdf-signature-root #target-custom-pages-btn,
#target-current-page-btn,
#target-all-pages-btn,
#target-first-last-btn,
#target-custom-pages-btn {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0.625rem 0.75rem !important;
  font-size: 0.75rem !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  height: auto !important;
}

html body #pdf-signature-root #target-current-page-btn:hover,
html body #pdf-signature-root #target-all-pages-btn:hover,
html body #pdf-signature-root #target-first-last-btn:hover,
html body #pdf-signature-root #target-custom-pages-btn:hover,
#target-current-page-btn:hover,
#target-all-pages-btn:hover,
#target-first-last-btn:hover,
#target-custom-pages-btn:hover {
  border-color: #000851 !important;
  background-color: #f8fafc !important;
}

html body #pdf-signature-root #target-current-page-btn div:first-child,
html body #pdf-signature-root #target-all-pages-btn div:first-child,
html body #pdf-signature-root #target-first-last-btn div:first-child,
html body #pdf-signature-root #target-custom-pages-btn div:first-child,
#target-current-page-btn div:first-child,
#target-all-pages-btn div:first-child,
#target-first-last-btn div:first-child,
#target-custom-pages-btn div:first-child {
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  color: #0f172a !important;
}

html body #pdf-signature-root #target-current-page-btn div:last-child,
html body #pdf-signature-root #target-all-pages-btn div:last-child,
html body #pdf-signature-root #target-first-last-btn div:last-child,
html body #pdf-signature-root #target-custom-pages-btn div:last-child,
#target-current-page-btn div:last-child,
#target-all-pages-btn div:last-child,
#target-first-last-btn div:last-child,
#target-custom-pages-btn div:last-child {
  font-size: 0.625rem !important;
  color: #64748b !important;
  margin-top: 2px !important;
}

/* Active Selected Placement Card (Deep Navy with White Title and Cyan Subtitle) */
html body #pdf-signature-root #target-current-page-btn[class*="bg-[#03045e]"],
html body #pdf-signature-root #target-all-pages-btn[class*="bg-[#03045e]"],
html body #pdf-signature-root #target-first-last-btn[class*="bg-[#03045e]"],
html body #pdf-signature-root #target-custom-pages-btn[class*="bg-[#03045e]"],
html body #pdf-signature-root #target-current-page-btn[class*="border-[#03045e]"],
html body #pdf-signature-root #target-all-pages-btn[class*="border-[#03045e]"],
html body #pdf-signature-root #target-first-last-btn[class*="border-[#03045e]"],
html body #pdf-signature-root #target-custom-pages-btn[class*="border-[#03045e]"],
#target-current-page-btn[class*="bg-[#03045e]"],
#target-all-pages-btn[class*="bg-[#03045e]"],
#target-first-last-btn[class*="bg-[#03045e]"],
#target-custom-pages-btn[class*="bg-[#03045e]"],
#target-current-page-btn[class*="bg-slate-900"],
#target-all-pages-btn[class*="bg-slate-900"],
#target-first-last-btn[class*="bg-slate-900"],
#target-custom-pages-btn[class*="bg-slate-900"] {
  background: #000851 !important;
  background-color: #000851 !important;
  color: #ffffff !important;
  border: 1px solid #000851 !important;
  box-shadow: 0 2px 4px rgba(0, 8, 81, 0.25) !important;
}

html body #pdf-signature-root #target-current-page-btn[class*="bg-[#03045e]"] div:first-child,
html body #pdf-signature-root #target-all-pages-btn[class*="bg-[#03045e]"] div:first-child,
html body #pdf-signature-root #target-first-last-btn[class*="bg-[#03045e]"] div:first-child,
html body #pdf-signature-root #target-custom-pages-btn[class*="bg-[#03045e]"] div:first-child,
html body #pdf-signature-root #target-current-page-btn[class*="border-[#03045e]"] div:first-child,
html body #pdf-signature-root #target-all-pages-btn[class*="border-[#03045e]"] div:first-child,
html body #pdf-signature-root #target-first-last-btn[class*="border-[#03045e]"] div:first-child,
html body #pdf-signature-root #target-custom-pages-btn[class*="border-[#03045e]"] div:first-child,
#target-current-page-btn[class*="bg-[#03045e]"] div:first-child,
#target-all-pages-btn[class*="bg-[#03045e]"] div:first-child,
#target-first-last-btn[class*="bg-[#03045e]"] div:first-child,
#target-custom-pages-btn[class*="bg-[#03045e]"] div:first-child {
  color: #ffffff !important;
}

html body #pdf-signature-root #target-current-page-btn[class*="bg-[#03045e]"] div:last-child,
html body #pdf-signature-root #target-all-pages-btn[class*="bg-[#03045e]"] div:last-child,
html body #pdf-signature-root #target-first-last-btn[class*="bg-[#03045e]"] div:last-child,
html body #pdf-signature-root #target-custom-pages-btn[class*="bg-[#03045e]"] div:last-child,
html body #pdf-signature-root #target-current-page-btn[class*="border-[#03045e]"] div:last-child,
html body #pdf-signature-root #target-all-pages-btn[class*="border-[#03045e]"] div:last-child,
html body #pdf-signature-root #target-first-last-btn[class*="border-[#03045e]"] div:last-child,
html body #pdf-signature-root #target-custom-pages-btn[class*="border-[#03045e]"] div:last-child,
#target-current-page-btn[class*="bg-[#03045e]"] div:last-child,
#target-all-pages-btn[class*="bg-[#03045e]"] div:last-child,
#target-first-last-btn[class*="bg-[#03045e]"] div:last-child,
#target-custom-pages-btn[class*="bg-[#03045e]"] div:last-child {
  color: #7dd3fc !important;
}

/* 14. Label Placement Cards (Signature Line Tab) */
#pos-down-of-line-btn,
#pos-above-line-btn,
#pos-before-line-btn,
#pos-after-line-btn,
#pos-line-only-btn {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0.5rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
  height: auto !important;
}

#pos-down-of-line-btn:hover,
#pos-above-line-btn:hover,
#pos-before-line-btn:hover,
#pos-after-line-btn:hover,
#pos-line-only-btn:hover {
  border-color: #000851 !important;
  background-color: #f8fafc !important;
}

#pos-down-of-line-btn span,
#pos-above-line-btn span,
#pos-before-line-btn span,
#pos-after-line-btn span,
#pos-line-only-btn span {
  display: block !important;
}

#pos-down-of-line-btn span:first-of-type,
#pos-above-line-btn span:first-of-type,
#pos-before-line-btn span:first-of-type,
#pos-after-line-btn span:first-of-type,
#pos-line-only-btn span:first-of-type {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin-top: 2px !important;
}

#pos-down-of-line-btn span:last-of-type,
#pos-above-line-btn span:last-of-type,
#pos-before-line-btn span:last-of-type,
#pos-after-line-btn span:last-of-type,
#pos-line-only-btn span:last-of-type {
  font-size: 0.5625rem !important;
  color: #64748b !important;
  margin-top: 2px !important;
}

#pos-down-of-line-btn svg,
#pos-above-line-btn svg,
#pos-before-line-btn svg,
#pos-after-line-btn svg,
#pos-line-only-btn svg {
  color: #475569 !important;
  width: 16px !important;
  height: 16px !important;
  margin-bottom: 2px !important;
}

/* Active State for Label Placement Cards */
#pos-down-of-line-btn[class*="bg-[#03045e]"],
#pos-above-line-btn[class*="bg-[#03045e]"],
#pos-before-line-btn[class*="bg-[#03045e]"],
#pos-after-line-btn[class*="bg-[#03045e]"],
#pos-line-only-btn[class*="bg-[#03045e]"] {
  background: #000851 !important;
  background-color: #000851 !important;
  border-color: #000851 !important;
  box-shadow: 0 1px 3px rgba(0, 8, 81, 0.2) !important;
}

#pos-down-of-line-btn[class*="bg-[#03045e]"] span:first-of-type,
#pos-above-line-btn[class*="bg-[#03045e]"] span:first-of-type,
#pos-before-line-btn[class*="bg-[#03045e]"] span:first-of-type,
#pos-after-line-btn[class*="bg-[#03045e]"] span:first-of-type,
#pos-line-only-btn[class*="bg-[#03045e]"] span:first-of-type {
  color: #ffffff !important;
}

#pos-down-of-line-btn[class*="bg-[#03045e]"] span:last-of-type,
#pos-above-line-btn[class*="bg-[#03045e]"] span:last-of-type,
#pos-before-line-btn[class*="bg-[#03045e]"] span:last-of-type,
#pos-after-line-btn[class*="bg-[#03045e]"] span:last-of-type,
#pos-line-only-btn[class*="bg-[#03045e]"] span:last-of-type {
  color: #7dd3fc !important;
}

#pos-down-of-line-btn[class*="bg-[#03045e]"] svg,
#pos-above-line-btn[class*="bg-[#03045e]"] svg,
#pos-before-line-btn[class*="bg-[#03045e]"] svg,
#pos-after-line-btn[class*="bg-[#03045e]"] svg,
#pos-line-only-btn[class*="bg-[#03045e]"] svg {
  color: #00e5ff !important;
}

/* 15. Presets & Quick Tag Buttons */
#pdf-signature-root button[class*="text-[11px]"],
#pdf-signature-root button[class*="text-[10px]"] {
  background-color: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 0.125rem 0.5rem !important;
  font-size: 0.6875rem !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
  text-transform: capitalize !important;
}

#pdf-signature-root button[class*="text-[11px]"]:hover,
#pdf-signature-root button[class*="text-[10px]"]:hover {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

#pdf-signature-root button[class*="text-[11px]"][class*="bg-blue-50"],
#pdf-signature-root button[class*="text-[10px]"][class*="bg-blue-50"],
#pdf-signature-root button[class*="text-[10px]"][class*="bg-[#03045e]"] {
  background-color: #eff6ff !important;
  color: #000851 !important;
  border-color: #93c5fd !important;
  font-weight: 700 !important;
}

/* 16. TEXT ANNOTATION TAB FORMATTING CONTROLS */
#pdf-signature-root [title="Bold"],
#pdf-signature-root [title="Italic"],
#pdf-signature-root [title="Underline"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 0 !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: all 0.15s ease !important;
}

#pdf-signature-root [title="Bold"]:hover,
#pdf-signature-root [title="Italic"]:hover,
#pdf-signature-root [title="Underline"]:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

#pdf-signature-root [title="Bold"][class*="bg-[#03045e]"],
#pdf-signature-root [title="Italic"][class*="bg-[#03045e]"],
#pdf-signature-root [title="Underline"][class*="bg-[#03045e]"] {
  background: #000851 !important;
  background-color: #000851 !important;
  color: #ffffff !important;
  border-color: #000851 !important;
}

#pdf-signature-root [title="Bold"] svg,
#pdf-signature-root [title="Italic"] svg,
#pdf-signature-root [title="Underline"] svg {
  width: 14px !important;
  height: 14px !important;
  color: inherit !important;
}

/* Text Alignment Pill Group */
#pdf-signature-root [title*="Align"] {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #64748b !important;
  border-radius: 4px !important;
  padding: 0 !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

#pdf-signature-root [title*="Align"]:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

#pdf-signature-root [title*="Align"][class*="bg-slate-200"] {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}

#pdf-signature-root [title*="Align"] svg {
  width: 14px !important;
  height: 14px !important;
  color: inherit !important;
}

/* Box Background Style Pills (Transparent, White, Highlight, Subtle) */
#pdf-signature-root button[class*="text-[10px]"][class*="capitalize"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 0.125rem 0.5rem !important;
  font-size: 0.6875rem !important;
  font-weight: 500 !important;
  text-transform: capitalize !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 26px !important;
  min-height: 26px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
  margin: 0 !important;
}

#pdf-signature-root button[class*="text-[10px]"][class*="capitalize"]:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

#pdf-signature-root button[class*="text-[10px]"][class*="capitalize"][class*="bg-blue-50"] {
  background: #eff6ff !important;
  background-color: #eff6ff !important;
  color: #000851 !important;
  border-color: #93c5fd !important;
  font-weight: 700 !important;
}

/* Line Style (Solid, Dashed, Dotted, Double) & Text Case Buttons */
#pdf-signature-root .grid-cols-4 button,
#pdf-signature-root .grid-cols-3 button {
  background-color: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0.375rem 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  text-align: center !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
}

#pdf-signature-root .grid-cols-4 button:hover,
#pdf-signature-root .grid-cols-3 button:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

#pdf-signature-root .grid-cols-4 button[class*="bg-blue-50"],
#pdf-signature-root .grid-cols-3 button[class*="bg-blue-50"] {
  background-color: #eff6ff !important;
  color: #000851 !important;
  border-color: #93c5fd !important;
  font-weight: 700 !important;
}

/* 17. CURSIVE FONT SELECTION CARDS (Type Tab) */
#pdf-signature-root .max-h-56 button {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 0.75rem !important;
  text-align: left !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
  height: auto !important;
}

#pdf-signature-root .max-h-56 button:hover {
  border-color: #cbd5e1 !important;
  background-color: #f8fafc !important;
}

#pdf-signature-root .max-h-56 button[class*="border-[#03045e]"],
#pdf-signature-root .max-h-56 button[class*="bg-blue-50"] {
  border-color: #000851 !important;
  background: #f0f9ff !important;
  background-color: #f0f9ff !important;
  box-shadow: 0 0 0 2px rgba(0, 8, 81, 0.15) !important;
}

#pdf-signature-root .max-h-56 button span {
  text-transform: none !important;
  letter-spacing: normal !important;
}

#pdf-signature-root .max-h-56 button span[class*="uppercase"] {
  font-size: 0.625rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

#pdf-signature-root .max-h-56 button span[class*="bg-slate-100"] {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
  font-size: 0.5625rem !important;
  padding: 0.125rem 0.375rem !important;
  border-radius: 0.375rem !important;
  font-weight: 500 !important;
}

/* 18. Modal Bottom Footer Actions */
#cancel-sig-btn {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 0.5rem 1.25rem !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#cancel-sig-btn:hover {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

#apply-signature-to-doc-btn {
  background: #000851 !important;
  background-color: #000851 !important;
  color: #ffffff !important;
  border: 1px solid #000851 !important;
  border-radius: 12px !important;
  padding: 0.625rem 1.5rem !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  box-shadow: 0 4px 12px rgba(0, 8, 81, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#apply-signature-to-doc-btn:hover:not(:disabled) {
  background-color: #03045e !important;
}

#apply-signature-to-doc-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

#apply-signature-to-doc-btn svg {
  color: #00e5ff !important;
  width: 16px !important;
  height: 16px !important;
}

/* 19. SVG Icons & Graphics Protection */
#pdf-signature-root svg {
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

/* 20. Canvas Protection */
#pdf-signature-root canvas {
  max-width: none !important;
  max-height: none !important;
  display: block !important;
  margin: 0 auto !important;
}

/* 21. Modal Overlay */
#pdf-signature-root .fixed {
  z-index: 99999 !important;
}

/* 22. Signature Handwriting Fonts */
#pdf-signature-root .font-dancing,
.font-dancing {
  font-family: 'Dancing Script', cursive !important;
}
#pdf-signature-root .font-greatvibes,
.font-greatvibes {
  font-family: 'Great Vibes', cursive !important;
}
#pdf-signature-root .font-caveat,
.font-caveat {
  font-family: 'Caveat', cursive !important;
}
#pdf-signature-root .font-alexbrush,
.font-alexbrush {
  font-family: 'Alex Brush', cursive !important;
}
#pdf-signature-root .font-pacifico,
.font-pacifico {
  font-family: 'Pacifico', cursive !important;
}
#pdf-signature-root .font-allura,
.font-allura {
  font-family: 'Allura', cursive !important;
}
#pdf-signature-root .font-sacramento,
.font-sacramento {
  font-family: 'Sacramento', cursive !important;
}
#pdf-signature-root .font-parisienne,
.font-parisienne {
  font-family: 'Parisienne', cursive !important;
}
#pdf-signature-root .font-tangerine,
.font-tangerine {
  font-family: 'Tangerine', cursive !important;
}
#pdf-signature-root .font-satisfy,
.font-satisfy {
  font-family: 'Satisfy', cursive !important;
}
#pdf-signature-root .font-homemade,
.font-homemade {
  font-family: 'Homemade Apple', cursive !important;
}
#pdf-signature-root .font-delafield,
.font-delafield {
  font-family: 'Mrs Saint Delafield', cursive !important;
}
#pdf-signature-root .font-marck,
.font-marck {
  font-family: 'Marck Script', cursive !important;
}
#pdf-signature-root .font-reenie,
.font-reenie {
  font-family: 'Reenie Beanie', cursive !important;
}
#pdf-signature-root .font-muellerhoff,
.font-muellerhoff {
  font-family: 'Herr Von Muellerhoff', cursive !important;
}
#pdf-signature-root .font-cedarville,
.font-cedarville {
  font-family: 'Cedarville Cursive', cursive !important;
}

/* 23. Sleek Custom Scrollbars inside App */
#pdf-signature-root *::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}
#pdf-signature-root *::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
}
#pdf-signature-root *::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 9999px !important;
}
#pdf-signature-root *::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* ==========================================================================
   24. PDF PREVIEW / DOWNLOAD MODAL (Download Preview Screen)
   ========================================================================== */

/* Modal Container */
html body #pdf-preview-modal-card,
#pdf-preview-modal-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  overflow: hidden !important;
}

/* 1. "Open in Tab" Top Header Button */
html body #preview-open-tab-btn,
#preview-open-tab-btn {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  height: 34px !important;
}

html body #preview-open-tab-btn:hover,
#preview-open-tab-btn:hover {
  background-color: #f8fafc !important;
  border-color: #03045e !important;
  color: #03045e !important;
}

html body #preview-open-tab-btn svg,
#preview-open-tab-btn svg {
  width: 14px !important;
  height: 14px !important;
  color: inherit !important;
  stroke: currentColor !important;
}

/* 2. Close Modal (X) Button */
html body #close-preview-modal-btn,
#close-preview-modal-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #64748b !important;
  padding: 6px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  box-shadow: none !important;
}

html body #close-preview-modal-btn:hover,
#close-preview-modal-btn:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html body #close-preview-modal-btn svg,
#close-preview-modal-btn svg {
  width: 18px !important;
  height: 18px !important;
  color: inherit !important;
}

/* 3. Preview Toolbar Navigation & Zoom Buttons */
html body #preview-prev-page-btn,
html body #preview-next-page-btn,
html body #preview-zoom-out-btn,
html body #preview-zoom-in-btn,
#preview-prev-page-btn,
#preview-next-page-btn,
#preview-zoom-out-btn,
#preview-zoom-in-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #334155 !important;
  padding: 0 !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

html body #preview-prev-page-btn:hover:not(:disabled),
html body #preview-next-page-btn:hover:not(:disabled),
html body #preview-zoom-out-btn:hover:not(:disabled),
html body #preview-zoom-in-btn:hover:not(:disabled),
#preview-prev-page-btn:hover:not(:disabled),
#preview-next-page-btn:hover:not(:disabled),
#preview-zoom-out-btn:hover:not(:disabled),
#preview-zoom-in-btn:hover:not(:disabled) {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html body #preview-prev-page-btn:disabled,
html body #preview-next-page-btn:disabled,
html body #preview-zoom-out-btn:disabled,
html body #preview-zoom-in-btn:disabled,
#preview-prev-page-btn:disabled,
#preview-next-page-btn:disabled,
#preview-zoom-out-btn:disabled,
#preview-zoom-in-btn:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

html body #preview-prev-page-btn svg,
html body #preview-next-page-btn svg,
html body #preview-zoom-out-btn svg,
html body #preview-zoom-in-btn svg,
#preview-prev-page-btn svg,
#preview-next-page-btn svg,
#preview-zoom-out-btn svg,
#preview-zoom-in-btn svg {
  width: 15px !important;
  height: 15px !important;
  color: inherit !important;
}

html body #preview-zoom-reset-btn,
#preview-zoom-reset-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #1e293b !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  padding: 2px 8px !important;
  height: 28px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

html body #preview-zoom-reset-btn:hover:not(:disabled),
#preview-zoom-reset-btn:hover:not(:disabled) {
  background-color: #f1f5f9 !important;
}

/* 4. "â† Back to Editor" Bottom Secondary Button */
html body #preview-back-to-editor-btn,
#preview-back-to-editor-btn {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  height: 42px !important;
}

html body #preview-back-to-editor-btn:hover,
#preview-back-to-editor-btn:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* 5. "Download Signed PDF" Bottom Primary Action Button */
html body #preview-download-now-btn,
#preview-download-now-btn {
  background: #03045e !important;
  background-color: #03045e !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 1px solid #03045e !important;
  border-radius: 10px !important;
  padding: 10px 24px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 14px rgba(3, 4, 94, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  height: 42px !important;
}

html body #preview-download-now-btn:hover:not(:disabled),
#preview-download-now-btn:hover:not(:disabled) {
  background: #023e8a !important;
  background-color: #023e8a !important;
  border-color: #023e8a !important;
  box-shadow: 0 6px 18px rgba(3, 4, 94, 0.35) !important;
  transform: translateY(-1px) !important;
}

html body #preview-download-now-btn:active:not(:disabled),
#preview-download-now-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98) !important;
}

html body #preview-download-now-btn:disabled,
#preview-download-now-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

html body #preview-download-now-btn svg,
#preview-download-now-btn svg {
  width: 16px !important;
  height: 16px !important;
  color: #38bdf8 !important;
  stroke: #38bdf8 !important;
}

/* ==========================================================================
   25. PLACED SIGNATURE OVERLAY & FLOATING ACTION TOOLBAR
   ========================================================================== */

/* Floating dark toolbar container */
html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute,
html body #pdf-signature-root div[class*="sig-overlay"] div.absolute,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute,
#pdf-signature-root div[class*="sig-overlay"] div.absolute {
  box-sizing: border-box !important;
}

html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11,
html body #pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"],
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11,
#pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"] {
  background: #03045e !important;
  background-color: #03045e !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px !important;
  padding: 2px 6px !important;
  box-shadow: 0 10px 25px -3px rgba(3, 4, 94, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.15) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 3px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  z-index: 50 !important;
}

/* Floating Toolbar Action Buttons (-, +, â†», âœŽ, â, ðŸ—‘) */
html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button,
html body #pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"] button,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button,
#pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"] button {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 0 !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  cursor: pointer !important;
  box-shadow: none !important;
  margin: 0 !important;
  transition: background-color 0.15s ease !important;
}

html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button:hover,
html body #pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"] button:hover,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button:hover,
#pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"] button:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Specific button SVG icons */
html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button svg,
html body #pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"] button svg,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button svg,
#pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"] button svg {
  width: 13px !important;
  height: 13px !important;
  min-width: 13px !important;
  min-height: 13px !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
  display: inline-block !important;
}

/* Cyan for - and + */
html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button[title*="Size"] svg,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button[title*="Size"] svg {
  color: #38bdf8 !important;
  stroke: #38bdf8 !important;
}

/* Amber for Edit */
html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button[title*="Edit"] svg,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button[title*="Edit"] svg {
  color: #fcd34d !important;
  stroke: #fcd34d !important;
}

/* Red for Delete */
html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button[title*="Delete"] svg,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button[title*="Delete"] svg {
  color: #fca5a5 !important;
  stroke: #fca5a5 !important;
}

html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button[title*="Delete"]:hover,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 button[title*="Delete"]:hover {
  background-color: rgba(239, 68, 68, 0.35) !important;
}

/* Floating Toolbar Dropdown Select */
html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 select,
html body #pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"] select,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 select,
#pdf-signature-root div[class*="sig-overlay"] div[class*="-top-11"] select {
  background: #023e8a !important;
  background-color: #023e8a !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  border-radius: 4px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  padding: 1px 4px !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  outline: none !important;
  cursor: pointer !important;
  margin: 0 1px !important;
  box-shadow: none !important;
}

html body #pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 select option,
#pdf-signature-root div[id^="sig-overlay-"] > div.absolute.-top-11 select option {
  background: #03045e !important;
  background-color: #03045e !important;
  color: #ffffff !important;
}

/* ==========================================================================
   26. CANVAS ISOLATION & PREVIEW MODE OVERFLOW FIXES
   ========================================================================== */

/* Universal Canvas Protection across all modes (Editor, Preview, Signature Draw) */
#pdf-signature-root canvas,
html body #pdf-signature-root canvas,
#pdf-preview-modal-card canvas,
html body #pdf-preview-modal-card canvas,
#pdf-preview-canvas,
html body #pdf-preview-canvas,
#pdf-render-canvas-container canvas,
html body #pdf-render-canvas-container canvas {
  max-width: none !important;
  max-height: none !important;
  box-sizing: content-box !important;
  vertical-align: top !important;
}

/* PDF Preview Scroll Stage Container */
#pdf-preview-scroll-container,
html body #pdf-preview-scroll-container,
html body #pdf-preview-modal-card div[id="pdf-preview-scroll-container"],
#pdf-preview-modal-card div[id="pdf-preview-scroll-container"] {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow: auto !important;
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 0% !important;
  background-color: #f1f5f9 !important;
  padding: 1.5rem !important;
  position: relative !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

/* PDF Preview Canvas Wrapper */
#pdf-preview-canvas-wrapper,
html body #pdf-preview-canvas-wrapper,
html body #pdf-preview-modal-card div[id="pdf-preview-canvas-wrapper"],
#pdf-preview-modal-card div[id="pdf-preview-canvas-wrapper"] {
  position: relative !important;
  margin: auto !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  box-sizing: content-box !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  line-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  overflow: hidden !important;
}

/* PDF Preview Canvas */
#pdf-preview-canvas,
html body #pdf-preview-canvas,
#pdf-preview-canvas-wrapper canvas,
html body #pdf-preview-canvas-wrapper canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
}


/* Cursor & Drag Pan Styling for Preview */
#pdf-preview-scroll-container,
html body #pdf-preview-scroll-container {
  cursor: grab !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

#pdf-preview-scroll-container.cursor-grabbing,
#pdf-preview-scroll-container:active,
html body #pdf-preview-scroll-container.cursor-grabbing,
html body #pdf-preview-scroll-container:active {
  cursor: grabbing !important;
}

#pdf-preview-canvas-wrapper,
html body #pdf-preview-canvas-wrapper {
  cursor: grab !important;
}

#pdf-preview-canvas-wrapper:active {
  cursor: grabbing !important;
}


/* ============================================================
   SIGNATURE MODAL - TAB ACTIVE STATE ISOLATION
   Prevents WordPress themes from stripping active tab styling
   ============================================================ */

/* --- Modal Overlay & Card Base --- */
#signature-modal-overlay {
  z-index: 999999 !important;
}

#signature-modal-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  overflow: hidden !important;
}

/* --- Modal Header Bar (Navy) --- */
#signature-modal-card > div:first-child {
  background-color: #03045e !important;
  color: #ffffff !important;
}

#signature-modal-card > div:first-child h3 {
  color: #ffffff !important;
  font-weight: 700 !important;
}

#signature-modal-card > div:first-child p {
  color: rgba(165, 243, 252, 0.8) !important;
}

/* --- Tab Bar Container (Second child = tab row) --- */
#signature-modal-card > div:nth-child(2) {
  background-color: rgba(248, 250, 252, 0.8) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  padding: 0.5rem 1rem 0 1rem !important;
  gap: 0.375rem !important;
}

/* --- ALL Tab Buttons Base (Inactive State) --- */
#tab-draw-btn,
#tab-type-btn,
#tab-line-btn,
#tab-text-btn,
#tab-upload-btn,
#tab-stamp-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  border-radius: 8px 8px 0 0 !important;
  border: 2px solid transparent !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #475569 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

/* Tab Hover (Inactive) */
#tab-draw-btn:hover,
#tab-type-btn:hover,
#tab-line-btn:hover,
#tab-text-btn:hover,
#tab-upload-btn:hover,
#tab-stamp-btn:hover {
  color: #0f172a !important;
  background-color: rgba(255, 255, 255, 0.5) !important;
}

/* Tab Icon SVGs */
#tab-draw-btn svg,
#tab-type-btn svg,
#tab-line-btn svg,
#tab-text-btn svg,
#tab-upload-btn svg,
#tab-stamp-btn svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  color: inherit !important;
}

/* Tab Label Spans */
#tab-draw-btn span,
#tab-type-btn span,
#tab-line-btn span,
#tab-text-btn span,
#tab-upload-btn span,
#tab-stamp-btn span {
  white-space: nowrap !important;
  display: inline-block !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}

/* --- ACTIVE Tab State --- */
/* The React app toggles Tailwind classes: bg-white text-[#03045e] border-[#03045e] shadow-xs
   WordPress themes strip these, so we re-enforce via attribute + class selectors */

/* Active via Tailwind class pattern (bg-white is added when active) */
html body #tab-draw-btn.bg-white,
html body #tab-type-btn.bg-white,
html body #tab-line-btn.bg-white,
html body #tab-text-btn.bg-white,
html body #tab-upload-btn.bg-white,
html body #tab-stamp-btn.bg-white,
#tab-draw-btn.bg-white,
#tab-type-btn.bg-white,
#tab-line-btn.bg-white,
#tab-text-btn.bg-white,
#tab-upload-btn.bg-white,
#tab-stamp-btn.bg-white,
#signature-modal-card #tab-draw-btn.bg-white,
#signature-modal-card #tab-type-btn.bg-white,
#signature-modal-card #tab-line-btn.bg-white,
#signature-modal-card #tab-text-btn.bg-white,
#signature-modal-card #tab-upload-btn.bg-white,
#signature-modal-card #tab-stamp-btn.bg-white {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #03045e !important;
  border: 2px solid #03045e !important;
  border-bottom-color: #ffffff !important;
  border-radius: 8px 8px 0 0 !important;
  font-weight: 700 !important;
  box-shadow: 0 -2px 4px rgba(3, 4, 94, 0.08) !important;
  position: relative !important;
  z-index: 2 !important;
}

/* Active tab icon color */
html body #tab-draw-btn.bg-white svg,
html body #tab-type-btn.bg-white svg,
html body #tab-line-btn.bg-white svg,
html body #tab-text-btn.bg-white svg,
html body #tab-upload-btn.bg-white svg,
html body #tab-stamp-btn.bg-white svg,
#tab-draw-btn.bg-white svg,
#tab-type-btn.bg-white svg,
#tab-line-btn.bg-white svg,
#tab-text-btn.bg-white svg,
#tab-upload-btn.bg-white svg,
#tab-stamp-btn.bg-white svg {
  color: #03045e !important;
}

/* Active tab label color */
html body #tab-draw-btn.bg-white span,
html body #tab-type-btn.bg-white span,
html body #tab-line-btn.bg-white span,
html body #tab-text-btn.bg-white span,
html body #tab-upload-btn.bg-white span,
html body #tab-stamp-btn.bg-white span,
#tab-draw-btn.bg-white span,
#tab-type-btn.bg-white span,
#tab-line-btn.bg-white span,
#tab-text-btn.bg-white span,
#tab-upload-btn.bg-white span,
#tab-stamp-btn.bg-white span {
  color: #03045e !important;
  font-weight: 700 !important;
}

/* Also match via the text color class the React app adds */
html body #tab-draw-btn[class*="text-[#03045e]"],
html body #tab-type-btn[class*="text-[#03045e]"],
html body #tab-line-btn[class*="text-[#03045e]"],
html body #tab-text-btn[class*="text-[#03045e]"],
html body #tab-upload-btn[class*="text-[#03045e]"],
html body #tab-stamp-btn[class*="text-[#03045e]"],
#tab-draw-btn[class*="text-[#03045e]"],
#tab-type-btn[class*="text-[#03045e]"],
#tab-line-btn[class*="text-[#03045e]"],
#tab-text-btn[class*="text-[#03045e]"],
#tab-upload-btn[class*="text-[#03045e]"],
#tab-stamp-btn[class*="text-[#03045e]"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #03045e !important;
  border: 2px solid #03045e !important;
  border-bottom-color: #ffffff !important;
  border-radius: 8px 8px 0 0 !important;
  font-weight: 700 !important;
  box-shadow: 0 -2px 4px rgba(3, 4, 94, 0.08) !important;
}

/* --- Inactive Tab Explicit Override (border-transparent class) --- */
#tab-draw-btn.border-transparent,
#tab-type-btn.border-transparent,
#tab-line-btn.border-transparent,
#tab-text-btn.border-transparent,
#tab-upload-btn.border-transparent,
#tab-stamp-btn.border-transparent {
  background: transparent !important;
  background-color: transparent !important;
  color: #475569 !important;
  border: 2px solid transparent !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

/* ============================================================
   Mobile Responsive Fixes for Signature Modal
   ============================================================ */

/* Page Placement Control — 2-column grid on mobile */
#target-placement-grid,
#signature-modal-card #target-placement-grid,
#signature-modal-overlay #target-placement-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.5rem !important;
}

/* On sm+ screens (≥640px) restore 4-column layout */
@media (min-width: 640px) {
  #target-placement-grid,
  #signature-modal-card #target-placement-grid,
  #signature-modal-overlay #target-placement-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Ultra-narrow mobile optimization (≤ 380px) */
@media (max-width: 380px) {
  #zoom-reset-btn {
    display: none !important;
  }
  #viewer-add-sig-btn,
  #viewer-preview-pdf-btn {
    padding: 0 4px !important;
    font-size: 9.5px !important;
  }
  #viewer-export-pdf-btn {
    padding: 0 5px !important;
    font-size: 9.5px !important;
  }
}

/* ============================================================
   SIDEBAR PLACEMENT RULES ISOLATION
   Ensures placement radio option cards have clear, visible text
   ============================================================ */
#app-control-sidebar div:has(input[name="pg_scope"]),
#pdf-signature-root #app-control-sidebar div:has(input[name="pg_scope"]),
html body #pdf-signature-root #app-control-sidebar div:has(input[name="pg_scope"]) {
  color: #334155 !important;
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

#app-control-sidebar div:has(input[name="pg_scope"]) label,
#app-control-sidebar div:has(input[name="pg_scope"]) span,
html body #pdf-signature-root #app-control-sidebar div:has(input[name="pg_scope"]) label,
html body #pdf-signature-root #app-control-sidebar div:has(input[name="pg_scope"]) span {
  color: #334155 !important;
}

/* Selected state: container has class bg-[#03045e]/5 or text-[#03045e] */
#app-control-sidebar div[class*="bg-[#03045e]/5"]:has(input[name="pg_scope"]),
#app-control-sidebar div[class*="text-[#03045e]"]:has(input[name="pg_scope"]),
#pdf-signature-root #app-control-sidebar div[class*="bg-[#03045e]/5"]:has(input[name="pg_scope"]),
#pdf-signature-root #app-control-sidebar div[class*="text-[#03045e]"]:has(input[name="pg_scope"]),
html body #pdf-signature-root #app-control-sidebar div[class*="bg-[#03045e]/5"]:has(input[name="pg_scope"]),
html body #pdf-signature-root #app-control-sidebar div[class*="text-[#03045e]"]:has(input[name="pg_scope"]) {
  background-color: rgba(3, 4, 94, 0.05) !important;
  border-color: rgba(3, 4, 94, 0.25) !important;
  color: #03045e !important;
}

#app-control-sidebar div[class*="bg-[#03045e]/5"]:has(input[name="pg_scope"]) label,
#app-control-sidebar div[class*="bg-[#03045e]/5"]:has(input[name="pg_scope"]) span,
#app-control-sidebar div[class*="text-[#03045e]"]:has(input[name="pg_scope"]) label,
#app-control-sidebar div[class*="text-[#03045e]"]:has(input[name="pg_scope"]) span,
html body #pdf-signature-root #app-control-sidebar div[class*="bg-[#03045e]/5"]:has(input[name="pg_scope"]) label,
html body #pdf-signature-root #app-control-sidebar div[class*="bg-[#03045e]/5"]:has(input[name="pg_scope"]) span,
html body #pdf-signature-root #app-control-sidebar div[class*="text-[#03045e]"]:has(input[name="pg_scope"]) label,
html body #pdf-signature-root #app-control-sidebar div[class*="text-[#03045e]"]:has(input[name="pg_scope"]) span {
  color: #03045e !important;
  font-weight: 600 !important;
}

/* Fallback without :has by targeting div and label classes directly */
#app-control-sidebar div[class*="p-3.5"][class*="rounded-xl"] label span,
html body #pdf-signature-root #app-control-sidebar div[class*="p-3.5"][class*="rounded-xl"] label span {
  color: #334155 !important;
}

#app-control-sidebar div[class*="p-3.5"][class*="rounded-xl"][class*="bg-[#03045e]"] label span,
#app-control-sidebar div[class*="p-3.5"][class*="rounded-xl"][class*="text-[#03045e]"] label span,
html body #pdf-signature-root #app-control-sidebar div[class*="p-3.5"][class*="rounded-xl"][class*="bg-[#03045e]"] label span,
html body #pdf-signature-root #app-control-sidebar div[class*="p-3.5"][class*="rounded-xl"][class*="text-[#03045e]"] label span {
  color: #03045e !important;
  font-weight: 600 !important;
}

/* Specific Range text input field inside sidebar */
#app-control-sidebar input[type="text"],
html body #pdf-signature-root #app-control-sidebar input[type="text"] {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.75rem !important;
  border-radius: 0.25rem !important;
}

#app-control-sidebar input[type="text"]::placeholder,
html body #pdf-signature-root #app-control-sidebar input[type="text"]::placeholder {
  color: #94a3b8 !important;
}

