/* HeyMyPDF v5.13: clear, legible contextual page rail. Overrides legacy thumbnail CSS. */
.hm-editor-route .pc-v5-layout .pc-v52-thumbs{box-sizing:border-box!important;min-width:0!important;min-height:0!important;height:auto!important;max-height:min(85vh,850px)!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;scrollbar-width:thin!important;scrollbar-color:#a9c4f4 #eef4ff!important}
.hm-editor-route .pc-v52-thumbs>.pc-v5-settings{overflow:visible!important;max-height:none!important;min-height:0!important;flex:0 0 auto!important}
.hm-editor-route .pc-v52-thumbs .pc-previewhead{flex:0 0 auto!important}
.hm-editor-route .pc-v52-thumbs #pc-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;overflow:visible!important;max-height:none!important;min-height:0!important;align-content:start!important;gap:12px!important;padding:5px!important;box-sizing:border-box!important}
.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile{display:block!important;position:relative!important;box-sizing:border-box!important;flex:none!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important;border:1px solid #d7e5fb!important;border-radius:13px!important;padding:9px!important;background:#fff!important}
.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile>.pc-canvas-wrap{position:relative!important;box-sizing:border-box!important;height:180px!important;min-height:180px!important;max-height:180px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;border-radius:9px!important;background:#f3f7fe!important;padding:5px!important}
.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile>.pc-canvas-wrap canvas{display:block!important;position:static!important;transform:none!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:168px!important;object-fit:contain!important;box-shadow:0 2px 8px #11244a18!important}
.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile>.pc-tilecap{display:flex!important;gap:7px!important;padding:8px 2px!important;font-size:12px!important;min-height:0!important}
.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile>.pc-tiletools{position:static!important;display:flex!important;flex-wrap:nowrap!important;gap:3px!important;margin:0!important}
.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile>.pc-tiletools button{flex:1 1 0!important;min-width:0!important;max-width:none!important;min-height:30px!important;padding:2px!important}
.hm-editor-route .pc-v52-thumbs .pc-v5-thumbnav{position:sticky!important;bottom:0!important;padding:9px 2px 2px!important;background:#fff!important;z-index:2!important}
.hm-editor-route .pc-rotate-actions{display:flex;flex-direction:column;align-items:stretch;gap:9px;padding:10px 0}
.hm-editor-route .pc-rotate-actions .action-btn{white-space:normal!important;line-height:1.35!important;text-align:center!important}
/* Keep the full-width organize board and mobile workspace free of rail styling. */
@media(max-width:900px){.hm-editor-route .pc-v5-layout .pc-v52-thumbs{max-height:500px!important}.hm-editor-route .pc-v52-thumbs #pc-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile>.pc-canvas-wrap{height:155px!important;min-height:155px!important;max-height:155px!important}.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile>.pc-canvas-wrap canvas{max-height:143px!important}}
@media(max-width:520px){.hm-editor-route .pc-v52-thumbs #pc-grid{grid-template-columns:minmax(0,1fr)!important}.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile>.pc-canvas-wrap{height:195px!important;min-height:195px!important;max-height:195px!important}.hm-editor-route .pc-v52-thumbs #pc-grid>.pc-tile>.pc-canvas-wrap canvas{max-height:180px!important}}

.pc-preview-error-label{display:flex;align-items:center;justify-content:center;width:100%;min-height:95px;padding:12px;color:#425c87;font-weight:600;font-size:12px;text-align:center}
/* Legacy CSS assigned equal fractional rows inside a fixed-height thumbnail grid.
   That made 267px page cards overlap in 45px grid tracks. Let every track size to content. */
.hm-editor-route .pc-v52-thumbs #pc-grid{
  grid-auto-rows:max-content!important;
  grid-template-rows:none!important;
  height:max-content!important;
  min-height:0!important;
  max-height:none!important;
  flex:none!important;
}

/* Redundant upload strip removal */
.pc-drop, #pc-drop { display: none !important; }

/* Prominent empty-state PDF selection & Drag-and-drop zone */
.pc-v5-empty {
  min-height: 380px !important;
  padding: 42px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  border: 2px dashed #b8ceec !important;
  border-radius: 16px !important;
  background: radial-gradient(ellipse at 50% 10%, #edf5ff 0%, #f7faff 80%) !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.pc-v5-empty.dragover {
  border-color: #2167f3 !important;
  background: #ebf3ff !important;
  box-shadow: 0 0 0 5px rgba(33,103,243,0.18) !important;
}
.pc-empty-action-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 14px 0 16px !important;
}
.pc-btn-choose {
  background: linear-gradient(100deg, #2884ff, #1952ee) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 13px 32px !important;
  border-radius: 11px !important;
  border: 0 !important;
  cursor: pointer !important;
  box-shadow: 0 5px 18px rgba(25,82,238,0.3) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.pc-btn-choose:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 7px 22px rgba(25,82,238,0.4) !important;
}
.pc-btn-choose:focus-visible {
  outline: 3px solid #6fa7ff !important;
  outline-offset: 3px !important;
}
.pc-empty-drop-text {
  font-size: 13px !important;
  color: #4c688f !important;
  font-weight: 500 !important;
}
.pc-empty-desc {
  font-size: 13px !important;
  color: #5d7595 !important;
  max-width: 440px !important;
  line-height: 1.65 !important;
  margin: 6px 0 0 !important;
}

/* Context-aware Split PDF panel */
.pc-split-panel .pc-range-item {
  background: #f7faff;
  border: 1px solid #dbe6f7;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 9px;
}
.pc-range-tag {
  font-size: 11px;
  font-weight: 700;
  color: #2e5380;
  display: block;
  margin-bottom: 6px;
}
.pc-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pc-range-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: #435e83;
  font-weight: 600;
}
.pc-range-field input {
  width: 70px !important;
  padding: 6px 8px !important;
  border: 1px solid #c7d8f0 !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1a3258 !important;
}
.pc-range-to {
  color: #7991b2;
  font-weight: bold;
  font-size: 14px;
  margin-top: 14px;
}
.pc-range-del {
  margin-top: 14px;
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  border: 0 !important;
  background: #eef3f9 !important;
  color: #7086a3 !important;
  font-size: 16px !important;
  cursor: pointer !important;
  display: inline-grid;
  place-items: center;
}
.pc-range-del:hover:not(:disabled) {
  background: #fedfe2 !important;
  color: #c42b3b !important;
}
.pc-split-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.pc-split-run-btn {
  width: 100% !important;
  min-height: 40px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}
.pc-panel-idle {
  opacity: 0.85;
  margin-top: 10px;
}
.pc-panel-idle .pc-range-row.disabled input {
  background: #f1f4f9 !important;
  cursor: not-allowed !important;
}


/* Distinct settings heading and privacy badge */
.pc-settings-heading {
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
  display: inline-block !important;
  line-height: inherit !important;
}
.pc-v5-settings-title .pc-badge {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #3b5998 !important;
  background: #eef4ff !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  border: 1px solid #d2e3fc !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   HeyMyPDF: Sejda-Inspired Enhanced Text & Signature UX + Navigation Strip
   ========================================================================== */

/* 1. Navigation Strip & Thumbnail Size Controls */
.pc-v5-nav-strip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 10px 14px !important;
  margin-bottom: 12px !important;
  background: #f4f8fe !important;
  border: 1px solid #d0e1f9 !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  color: #1a3258 !important;
}
.pc-nav-jump-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.pc-nav-jump-group input[type="number"] {
  width: 55px !important;
  padding: 4px 6px !important;
  border: 1px solid #c0d5f3 !important;
  border-radius: 6px !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}
.pc-nav-total {
  color: #637d9f !important;
  font-weight: 500 !important;
}
.pc-nav-selected-indicator {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-weight: 500 !important;
}
.pc-nav-selected-indicator strong {
  color: #175cd3 !important;
}
.pc-thumb-size-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.pc-size-btn {
  width: 26px !important;
  height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #bed4f5 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #1e3a66 !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  cursor: pointer !important;
  transition: background 0.15s, border-color 0.15s;
}
.pc-size-btn:hover {
  background: #e9f2ff !important;
  border-color: #2167f3 !important;
}
#pc-thumb-size {
  width: 90px !important;
  cursor: pointer !important;
}

/* 2. Floating Formatting Toolbar for Text Overlays (Sejda Style) */
.pc-v52-object.pc-v52-text.pc-object-selected {
  outline: 2px dashed #2167f3 !important;
  outline-offset: 3px !important;
}
.pc-floating-toolbar {
  position: absolute !important;
  bottom: calc(100% + 8px) !important;
  left: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px 8px !important;
  background: #ffffff !important;
  border: 1px solid #b9d3f8 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(18, 52, 109, 0.18) !important;
  z-index: 100 !important;
  white-space: nowrap !important;
  user-select: none !important;
}
.pc-ft-btn {
  min-width: 26px !important;
  height: 26px !important;
  padding: 0 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #1a3258 !important;
  font-size: 13px !important;
  cursor: pointer !important;
}
.pc-ft-btn:hover {
  background: #edf4fe !important;
  border-color: #c5dcfa !important;
}
.pc-ft-btn.active {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}
.pc-ft-select {
  height: 26px !important;
  padding: 0 4px !important;
  border: 1px solid #ccdff7 !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  background: #fff !important;
  color: #1a3258 !important;
  cursor: pointer !important;
}
.pc-ft-color {
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  border: 1px solid #ccdff7 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  overflow: hidden !important;
}
.pc-ft-del:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

/* 3. Placed Signatures: Dashed Border, Corner Handles & Floating Tools (Sejda Style) */
.pc-resize-signature.pc-sejda-sig {
  border: 1px dashed transparent !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
  position: absolute !important;
  cursor: grab !important;
  transition: border-color 0.15s ease;
}
.pc-resize-signature.pc-sejda-sig:hover {
  border-color: rgba(33, 103, 243, 0.45) !important;
}
.pc-resize-signature.pc-sejda-sig.is-selected {
  border: 2px dashed #2167f3 !important;
}
.pc-resize-signature.pc-sejda-sig:active {
  cursor: grabbing !important;
}
.pc-sig-floating-tools {
  position: absolute !important;
  top: -34px !important;
  left: -2px !important;
  display: none !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 3px 6px !important;
  background: #ffffff !important;
  border: 1px solid #b9d3f8 !important;
  border-radius: 6px !important;
  box-shadow: 0 3px 12px rgba(18, 52, 109, 0.15) !important;
  z-index: 50 !important;
}
.pc-resize-signature.pc-sejda-sig.is-selected .pc-sig-floating-tools {
  display: flex !important;
}
.pc-sig-handle {
  position: absolute !important;
  width: 10px !important;
  height: 10px !important;
  background: #2167f3 !important;
  border: 1px solid #ffffff !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
  z-index: 20 !important;
  display: none !important;
}
.pc-resize-signature.pc-sejda-sig.is-selected .pc-sig-handle {
  display: block !important;
}
.pc-sig-handle.nw { top: -5px; left: -5px; cursor: nwse-resize; }
.pc-sig-handle.ne { top: -5px; right: -5px; cursor: nesw-resize; }
.pc-sig-handle.se { bottom: -5px; right: -5px; cursor: nwse-resize; }
.pc-sig-handle.sw { bottom: -5px; left: -5px; cursor: nesw-resize; }

.pc-floating-toolbar .pc-font-family {
  max-width: 135px !important;
  font-weight: 500 !important;
}
.pc-floating-toolbar .pc-font-family optgroup {
  font-weight: 700 !important;
  color: #1e3a66 !important;
  font-style: normal !important;
  background: #f1f5f9 !important;
}
.pc-floating-toolbar .pc-font-family option {
  font-weight: 400 !important;
  color: #0f172a !important;
  background: #ffffff !important;
}

/* 4. Dedicated Create Signature Popup Modal */

.pc-modal-backdrop[hidden],
.pc-modal-backdrop.hidden {
  display: none !important;
}

.pc-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(14, 30, 58, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 100000 !important;
  backdrop-filter: blur(2px) !important;
}
.pc-modal-box.pc-sign-dialog {
  width: 90% !important;
  max-width: 650px !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 36px rgba(10, 31, 68, 0.25) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.pc-modal-header {
  padding: 16px 20px !important;
  border-bottom: 1px solid #e2ecf9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.pc-modal-header h3 {
  margin: 0 !important;
  font-size: 17px !important;
  color: #132b4f !important;
}
.pc-modal-close {
  background: transparent !important;
  border: 0 !important;
  font-size: 22px !important;
  cursor: pointer !important;
  color: #64748b !important;
}
.pc-modal-tabs {
  display: flex !important;
  border-bottom: 1px solid #e2ecf9 !important;
  background: #f8fafc !important;
}
.pc-modal-tab {
  flex: 1 !important;
  padding: 12px 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.pc-modal-tab.active {
  color: #2167f3 !important;
  border-bottom-color: #2167f3 !important;
  background: #ffffff !important;
}
.pc-modal-body {
  padding: 20px !important;
}
.pc-sig-font-choices {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  margin-top: 14px !important;
}
.pc-sig-choice {
  padding: 16px !important;
  border: 1px solid #d0e1f9 !important;
  border-radius: 8px !important;
  font-size: 26px !important;
  text-align: center !important;
  cursor: pointer !important;
  background: #fcfdfe !important;
  transition: border-color 0.15s, background 0.15s;
}
.pc-sig-choice:hover {
  border-color: #2167f3 !important;
  background: #f0f6ff !important;
}
.pc-sig-choice.active {
  border-color: #2167f3 !important;
  background: #ebf3ff !important;
  box-shadow: 0 0 0 2px rgba(33, 103, 243, 0.2) !important;
}
.pc-canvas-container {
  border: 1px dashed #b8ceec !important;
  border-radius: 8px !important;
  background: #fafcff !important;
  overflow: hidden !important;
  touch-action: none !important;
}
.pc-canvas-container canvas {
  display: block !important;
  width: 100% !important;
  height: 200px !important;
  cursor: crosshair !important;
}
.pc-draw-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-top: 8px !important;
}
.pc-modal-ink-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155 !important;
}
.pc-ink-palette {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.pc-ink-btn {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 0 1px #cbd5e1 !important;
  cursor: pointer !important;
}
.pc-ink-btn.active {
  box-shadow: 0 0 0 2px #2167f3 !important;
}
.pc-modal-disclaimer {
  display: block !important;
  margin-top: 12px !important;
  font-size: 11px !important;
  color: #64748b !important;
}
.pc-modal-footer {
  padding: 14px 20px !important;
  background: #f8fafc !important;
  border-top: 1px solid #e2ecf9 !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

/* 5. Clean Shared Settings Panel Layout (Fixes cramped Extract Pages & Labels) */
.pc-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  padding: 4px 0 !important;
}
.pc-panel h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #132b4f !important;
}
.pc-panel-desc {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #475569 !important;
}
.pc-field-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.pc-field-group label {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1e3a66 !important;
}
.pc-field-group .pc-wideinput {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 9px 12px !important;
  border: 1px solid #c7d8f0 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f274a !important;
  background: #fff !important;
  transition: border-color 0.15s;
}
.pc-field-group .pc-wideinput:focus {
  border-color: #2167f3 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(33, 103, 243, 0.15) !important;
}
.pc-field-help {
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: #64748b !important;
}
.pc-panel-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: 4px !important;
}
.pc-panel-action-btn {
  width: 100% !important;
  min-height: 40px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* 6. Saved Signatures Strip in Tool Panel */
.pc-saved-sigs-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  margin-top: 6px !important;
}
.pc-saved-sig-item {
  position: relative !important;
  border: 1px solid #d0e1f9 !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  background: #fff !important;
  cursor: pointer !important;
}
.pc-saved-sig-item img {
  height: 32px !important;
  width: auto !important;
  display: block !important;
}
.pc-sig-del-btn {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  cursor: pointer !important;
}

/* 7. RTL Support */
[dir="rtl"] .pc-v5-nav-strip {
  direction: rtl !important;
}
[dir="rtl"] .pc-floating-toolbar {
  left: auto !important;
  right: 0 !important;
}
[dir="rtl"] .pc-sig-floating-tools {
  left: auto !important;
  right: -2px !important;
}


/* --- V6 MODERN WORKSPACE POLISH --- */
/* HeyMyPDF Modern Workspace Visual Polish & Layout Overhaul (v6) */

/* 1. Overall Layout & Proportions */
/* (replaced by 4-column unified rule below) */

/* 2. Left Sidebar - Dedicated Tool Selector with Visible Smooth Scrollbar */
.pc-v5-layout > div:first-child {
  position: sticky !important;
  top: 10px !important;
  max-height: calc(100vh - 90px) !important;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 10px 8px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  scrollbar-width: thin !important;
  scrollbar-color: #94a3b8 #f1f5f9 !important;
}

.pc-v5-layout > div:first-child::-webkit-scrollbar {
  width: 6px !important;
  display: block !important;
}

.pc-v5-layout > div:first-child::-webkit-scrollbar-thumb {
  background: #94a3b8 !important;
  border-radius: 999px !important;
}

.pc-v5-layout > div:first-child::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
  border-radius: 999px !important;
}

.pc-tools {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: 100% !important;
}

.pc-tool {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 38px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: all 0.15s ease-in-out !important;
}

.pc-tool:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

.pc-tool.active {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1) !important;
}

.pc-tool .ico {
  font-size: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
}

/* 3. Center PDF Workable Area - Maximized & Uncluttered */
.pc-center {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.pc-viewer-card {
  width: 100% !important;
  height: calc(100vh - 105px) !important;
  min-height: 620px !important;
  max-height: none !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #f1f5f9 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.pc-viewer-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 16px !important;
  min-height: 48px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  z-index: 10 !important;
}

.pc-viewer-bar b {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

.pc-viewer-bar > div {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.pc-viewer-bar .pc-quiet {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
  padding: 4px 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.pc-viewer-bar .pc-quiet:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.pc-viewer-bar #pc-viewer-zoom {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  padding: 0 6px !important;
  min-width: 44px !important;
  text-align: center !important;
}

.pc-viewer-page {
  flex: 1 !important;
  min-height: 0 !important;
  background: #f1f5f9 !important;
  padding: 20px !important;
  overflow: auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
}

.pc-viewer-sheet {
  position: relative !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  border-radius: 4px !important;
  background: #ffffff !important;
}

/* 4. Hide redundant & distracting toolbars by default */
.pc-viewer-tools {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 8px 14px !important;
  gap: 8px !important;
  display: flex !important;
}

/* Only show .pc-viewer-tools in annotate and forms mode */
.pc-workspace:not([data-active-mode="annotate"]):not([data-active-mode="forms"]):not([data-active-mode="create-fillable"]) .pc-viewer-tools {
  display: none !important;
}

/* Only show .pc-viewer-tip in sign mode */
.pc-workspace:not([data-active-mode="sign"]) .pc-viewer-tip {
  display: none !important;
}

/* 5. Right Sidebar - Clean Dedicated Tool Settings */
.pc-v52-thumbs {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.pc-v5-settings {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  max-height: calc(100vh - 90px) !important;
  overflow-y: auto !important;
}

.pc-v5-settings-title {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  padding-bottom: 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.pc-v5-settings-heading {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.35 !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  width: 100% !important;
}

.pc-v5-settings-title .pc-badge {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #2563eb !important;
  background: #eff6ff !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  border: 1px solid #dbeafe !important;
}

/* Suppress redundant H3 and duplicate title inside panels */
.pc-v5-settings .pc-panel h3 {
  display: none !important;
}

.pc-v5-settings .pc-tip,
.pc-v5-settings .pc-panel-desc {
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #64748b !important;
  margin: 0 0 14px !important;
}

/* Clean modern Form Controls */
.pc-field-group label,
.pc-v5-settings label {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 12px !important;
}

.pc-wideinput,
.pc-v5-settings input[type="text"],
.pc-v5-settings input[type="number"],
.pc-v5-settings select {
  height: 38px !important;
  padding: 6px 12px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  color: #0f172a !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  width: 100% !important;
  transition: all 0.15s ease !important;
}

.pc-wideinput:focus,
.pc-v5-settings input:focus,
.pc-v5-settings select:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.pc-v5-settings input[type="color"] {
  height: 38px !important;
  width: 100% !important;
  padding: 3px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  background: #ffffff !important;
}

.pc-check-label {
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  font-weight: 500 !important;
}

.pc-check-label input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  cursor: pointer !important;
  margin: 0 !important;
}

/* In non-organize modes: only hide the nav-strip (organize-only UI) */
.pc-workspace:not([data-active-mode="organize"]) .pc-v5-nav-strip {
  display: none !important;
}

/* In non-organize modes with PDF loaded: show compact thumbnail filmstrip in right sidebar */
.hm-editor-route .pc-workspace.pc-v5-live:not([data-active-mode="organize"]) .pc-v52-thumbs .pc-previewhead {
  display: flex !important;
}
.hm-editor-route .pc-workspace.pc-v5-live:not([data-active-mode="organize"]) .pc-v52-thumbs #pc-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  max-height: 260px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  gap: 8px !important;
  padding: 4px !important;
}
.hm-editor-route .pc-workspace.pc-v5-live:not([data-active-mode="organize"]) .pc-v52-thumbs .pc-canvas-wrap {
  height: 110px !important;
  min-height: 110px !important;
  max-height: 110px !important;
}
.hm-editor-route .pc-workspace.pc-v5-live:not([data-active-mode="organize"]) .pc-v52-thumbs .pc-canvas-wrap canvas {
  max-height: 102px !important;
}
.hm-editor-route .pc-workspace.pc-v5-live:not([data-active-mode="organize"]) .pc-v52-thumbs .pc-tiletools {
  display: none !important;
}
/* When PDF is NOT loaded, keep grid hidden */
.hm-editor-route .pc-workspace:not(.pc-v5-live):not([data-active-mode="organize"]) .pc-v52-thumbs .pc-previewhead,
.hm-editor-route .pc-workspace:not(.pc-v5-live):not([data-active-mode="organize"]) .pc-v52-thumbs #pc-grid,
.hm-editor-route .pc-workspace:not(.pc-v5-live):not([data-active-mode="organize"]) .pc-v52-thumbs #pc-more {
  display: none !important;
}

/* Primary Action Buttons */
.btn.primary,
.action-btn.primary,
#pc-export {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.15s ease !important;
}

.btn.primary:hover,
.action-btn.primary:hover,
#pc-export:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35) !important;
}

/* 6. Floating Formatting Toolbar for Text Annotations */
.pc-floating-toolbar {
  position: absolute !important;
  bottom: calc(100% + 8px) !important;
  left: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px 6px !important;
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
  z-index: 200 !important;
  white-space: nowrap !important;
  user-select: none !important;
}

.pc-ft-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 28px !important;
  height: 28px !important;
  padding: 2px 6px !important;
  border: none !important;
  border-radius: 5px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: background 0.15s ease !important;
}

.pc-ft-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.pc-ft-btn.active {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

.pc-ft-select {
  height: 28px !important;
  padding: 2px 6px !important;
  border: 1px solid #475569 !important;
  border-radius: 5px !important;
  background: #334155 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  cursor: pointer !important;
}

.pc-ft-color {
  width: 28px !important;
  height: 28px !important;
  padding: 1px !important;
  border: 1px solid #475569 !important;
  border-radius: 5px !important;
  background: #334155 !important;
  cursor: pointer !important;
}

.pc-ft-del:hover {
  background: #ef4444 !important;
}

/* 7. Live Preview Overlays on PDF Canvas - Zone Discrete (Sejda/iLovePDF standard) */
.pc-live-stamp-header,
.pc-live-stamp-footer {
  position: absolute !important;
  pointer-events: auto !important;
  display: inline-block !important;
  z-index: 25 !important;
  white-space: nowrap !important;
  max-width: 45% !important;
}
.pc-stamp-hl, .pc-stamp-fl {
  left: 24px !important;
  right: auto !important;
  text-align: left !important;
}
.pc-stamp-hc, .pc-stamp-fc {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  text-align: center !important;
}
.pc-stamp-hr, .pc-stamp-fr {
  right: 24px !important;
  left: auto !important;
  text-align: right !important;
}
.pc-stamp-hl, .pc-stamp-hc, .pc-stamp-hr {
  top: 16px !important;
  bottom: auto !important;
}
.pc-stamp-fl, .pc-stamp-fc, .pc-stamp-fr {
  bottom: 16px !important;
  top: auto !important;
}

.pc-live-stamp-bates {
  position: absolute !important;
  pointer-events: none !important;
  font-family: 'Courier New', monospace !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  background: rgba(254, 240, 138, 0.7) !important;
  padding: 2px 8px !important;
  border: 1px dashed #ca8a04 !important;
  border-radius: 4px !important;
  z-index: 10 !important;
  font-size: 12px !important;
}

/* 8. Interactive Form Field Builder Overlays */
.pc-form-field-overlay { pointer-events: auto !important; 
  position: absolute !important;
  box-sizing: border-box !important;
  border: 2px solid #2563eb !important;
  background: rgba(219, 234, 254, 0.5) !important;
  border-radius: 4px !important;
  cursor: move !important;
  touch-action: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  color: #1e3a8a !important;
  font-weight: 600 !important;
  user-select: none !important;
  z-index: 50 !important;
}

.pc-form-field-overlay:hover,
.pc-form-field-overlay.selected {
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25) !important;
}

.pc-form-field-tag {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.pc-form-field-del {
  cursor: pointer !important;
  color: #ef4444 !important;
  font-weight: 700 !important;
  margin-left: 6px !important;
}

.pc-form-field-del:hover {
  color: #b91c1c !important;
}


/* === HeyMyPDF V2 Final Unified 4-Column Layout === */
html body.hm-editor-route .pc-workspace .pc-v5-layout,
body.hm-editor-route .pc-workspace .pc-v5-layout,
.hm-editor-route .pc-workspace .pc-v5-layout,
.hm-editor-route .pc-v5-layout,
.pc-workspace .pc-v5-layout,
.pc-v5-layout {
  display: grid !important;
  grid-template-columns: 180px 190px minmax(0, 1fr) 310px !important;
  gap: 6px !important;
  align-items: start !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1280px) {
  html body.hm-editor-route .pc-workspace .pc-v5-layout,
  body.hm-editor-route .pc-workspace .pc-v5-layout,
  .hm-editor-route .pc-workspace .pc-v5-layout,
  .hm-editor-route .pc-v5-layout,
  .pc-workspace .pc-v5-layout,
  .pc-v5-layout {
    grid-template-columns: 165px 170px minmax(0, 1fr) 280px !important;
    gap: 10px !important;
  }
}

@media (max-width: 1024px) {
  html body.hm-editor-route .pc-workspace .pc-v5-layout,
  body.hm-editor-route .pc-workspace .pc-v5-layout,
  .hm-editor-route .pc-workspace .pc-v5-layout,
  .hm-editor-route .pc-v5-layout,
  .pc-workspace .pc-v5-layout,
  .pc-v5-layout {
    grid-template-columns: 140px 150px minmax(0, 1fr) 260px !important;
    gap: 8px !important;
  }
}

@media (max-width: 860px) {
  html body.hm-editor-route .pc-workspace .pc-v5-layout,
  body.hm-editor-route .pc-workspace .pc-v5-layout,
  .hm-editor-route .pc-workspace .pc-v5-layout,
  .hm-editor-route .pc-v5-layout,
  .pc-workspace .pc-v5-layout,
  .pc-v5-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Col 1: Dedicated Tool Selector Sidebar */
.pc-v5-layout > div:first-child {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-height: calc(100vh - 120px) !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin !important;
  position: sticky !important;
  top: 10px !important;
  padding: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.pc-tools {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

.pc-tool {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 42px !important;
  padding: 8px 10px !important;
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.25 !important;
  border-radius: 10px !important;
}

html[dir="rtl"] .pc-tool {
  text-align: right !important;
}

/* Col 2: Dedicated Permanent Thumbnails Rail */
#pc-thumbs-rail,
.pc-v52-thumbs {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 200px !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  height: auto !important;
  max-height: calc(100vh - 120px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin !important;
  position: sticky !important;
  top: 10px !important;
}

/* Col 3: Viewer Canvas (Dominant Center Column) */
#pc-viewer,
.pc-center {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

/* Col 4: Right Tool Settings Panel */
.pc-v5-settings {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-height: calc(100vh - 120px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  position: sticky !important;
  top: 10px !important;
}

/* Interactive Form Field Styling & Polish */
.pc-form-field-overlay {
  box-sizing: border-box !important;
  border: 1.5px solid #2563eb !important;
  background: rgba(239, 246, 255, 0.85) !important;
  border-radius: 4px !important;
  cursor: move !important;
  touch-action: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  color: #1e3a8a !important;
  font-weight: 500 !important;
  user-select: none !important;
  z-index: 50 !important;
  overflow: hidden !important;
}

.pc-form-field-overlay.selected {
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25) !important;
  background: rgba(219, 234, 254, 0.95) !important;
}

.pc-form-dropdown-label {
  flex: 1 1 auto !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-family: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
  line-height: 1.2 !important;
}

.pc-form-dropdown-arrow {
  flex: 0 0 auto !important;
  font-size: 0.65em !important;
  opacity: 0.7 !important;
  margin-left: 6px !important;
  margin-right: 14px !important;
  pointer-events: none !important;
}

.pc-form-text-label {
  flex: 1 1 auto !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-family: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
  line-height: 1.2 !important;
}

.pc-form-field-del {
  flex: 0 0 auto !important;
  cursor: pointer !important;
  color: #ef4444 !important;
  font-weight: bold !important;
  font-size: 14px !important;
  padding: 0 2px !important;
  line-height: 1 !important;
  margin-left: 4px !important;
}

.pc-form-field-del:hover {
  color: #b91c1c !important;
}

.pc-form-field-resize {
  position: absolute !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 10px !important;
  height: 10px !important;
  cursor: se-resize !important;
  background: linear-gradient(135deg, transparent 50%, #2563eb 50%) !important;
}


/* Prevent input overflow on narrow or RTL panels */
.pc-panel,
.pc-panel * {
  min-width: 0 !important;
  box-sizing: border-box !important;
}
.pc-panel select,
.pc-panel input,
.pc-panel textarea {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Sidebar Ad Placement in Right-hand Tool Panel */
.hm-editor-route .pc-v5-settings .pc-adside,
.hm-editor-route .pc-v5-settings .pc-sidebar-ad {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f8fafc !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 16px 12px !important;
  margin-top: 12px !important;
  min-height: 180px !important;
  text-align: center !important;
  color: #64748b !important;
  box-sizing: border-box !important;
}
.hm-editor-route .pc-v5-settings .pc-adside span,
.hm-editor-route .pc-v5-settings .pc-sidebar-ad span {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #94a3b8 !important;
  margin-bottom: 4px !important;
}
.hm-editor-route .pc-v5-settings .pc-adside small,
.hm-editor-route .pc-v5-settings .pc-sidebar-ad small {
  font-size: 11px !important;
  color: #94a3b8 !important;
}

/* Thumbnail Previous / Next Navigation Buttons */
.pc-v5-thumbnav {
  display: flex !important;
  gap: 8px !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 8px 4px !important;
}
.pc-v5-thumbnav button {
  flex: 1 !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #1e293b !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.pc-v5-thumbnav button:hover:not(:disabled) {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}
.pc-v5-thumbnav button:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
}



.pc-previewhead {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 8px !important;
}
.pc-previewhead-titles {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}


.hm-editor-route .pc-v52-thumbs .pc-thumb-ad {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f8fafc !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 12px 8px !important;
  margin: 12px 4px 6px !important;
  min-height: 110px !important;
  text-align: center !important;
  color: #64748b !important;
  box-sizing: border-box !important;
}
.hm-editor-route .pc-v52-thumbs .pc-thumb-ad span {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #94a3b8 !important;
  margin-bottom: 2px !important;
}
.hm-editor-route .pc-v52-thumbs .pc-thumb-ad small {
  font-size: 10px !important;
  color: #94a3b8 !important;
}

/* Hide useless +/- zoom buttons in rail */
.pc-v52-thumbs .pc-thumbs-zoom-btns,
.pc-aside .pc-thumbs-zoom-btns:not(.pc-org-zoom) {
  display: none !important;
}

/* Organize mode center board display and grid */
.hm-editor-route.pc-organize-mode .pc-organizer-board,
.pc-organize-mode #pc-organizer-board {
  display: block !important;
  width: 100% !important;
}
.pc-organize-mode #pc-organizer-board #pc-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(var(--pc-thumb-width, 160px), 1fr)) !important;
  gap: 16px !important;
  padding: 16px !important;
  max-height: 75vh !important;
  overflow-y: auto !important;
}


/* Prevent any wrapping or overflow in tool icons */
.mini-ico, .hm-card-icon, .tool-card-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  word-break: keep-all !important;
  overflow: hidden !important;
}
.mini-ico svg, .hm-card-icon svg, .tool-card-icon svg {
  display: block !important;
  margin: auto !important;
  flex-shrink: 0 !important;
}


/* Scope .pc-org-zoom strictly to Organize mode */
.pc-previewhead .pc-org-zoom,
.pc-org-zoom {
  display: none !important;
}
.pc-organize-mode .pc-previewhead .pc-org-zoom,
.pc-organize-mode .pc-org-zoom,
[data-active-mode="organize"] .pc-previewhead .pc-org-zoom {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* Organize mode thumbnail canvas expansion */
.pc-organize-mode .pc-canvas-wrap,
#pc-organizer-board .pc-canvas-wrap,
.pc-grid-organize .pc-canvas-wrap {
  width: 100% !important;
  height: auto !important;
  min-height: 120px !important;
  max-height: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pc-organize-mode .pc-canvas-wrap canvas,
#pc-organizer-board .pc-canvas-wrap canvas,
.pc-grid-organize .pc-canvas-wrap canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Modern styling for page input in viewer bar */
#pc-viewer-curr-page {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  width: 44px !important;
  height: 32px !important;
  text-align: center !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  color: #0f172a !important;
  background: #ffffff !important;
  padding: 0 4px !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05) !important;
  -moz-appearance: textfield !important;
}
#pc-viewer-curr-page::-webkit-outer-spin-button,
#pc-viewer-curr-page::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
