/* PDF Editor V7.2 — scoped responsive stylesheet */
/* Bootstrap 5.1.3 breakpoints only. */

.pdf-editor-page {
  --primary: #635bff;
  --primary-dark: #5148ea;
  --primary-soft: #f0efff;
  --ink: #101828;
  --muted: #667085;
  --border: #e4e7ec;
  --surface: #f7f8fb;
  --workspace: #e8ecf3;
  --danger: #dc2626;
  --success: #15803d;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.pdf-editor-page,
.pdf-editor-page * {
  box-sizing: border-box;
}

.pdf-editor-page button,
.pdf-editor-page input,
.pdf-editor-page textarea {
  font: inherit;
}

.pdf-editor-page .app-wide {
  max-width: 1780px;
}

.pdf-editor-page .btn-primary {
  border-color: var(--primary);
  background: var(--primary);
}

.pdf-editor-page .btn-primary:hover,
.pdf-editor-page .btn-primary:focus {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.pdf-editor-page .editor-section {
  padding: 12px 0 52px;
  min-height: auto;
  padding-top: 10px;
}

.pdf-editor-page .upload-card {
  display: flex;
  width: min(680px, calc(100vw - 28px));
  min-height: min(570px, calc(100vh - 100px));
  margin: 0 auto;
  padding: 42px 28px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 2px dashed #cfd4dc;
  border-radius: 24px;
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow);
  transition: 0.18s ease;
}

.pdf-editor-page .upload-card.dragging {
  border-color: var(--primary);
  background: #faf9ff;
  transform: translateY(-2px);
}

.pdf-editor-page .upload-icon {
  display: flex;
  width: 78px;
  height: 78px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 2.15rem;
}

.pdf-editor-page .upload-card h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 850;
  letter-spacing: -0.045em;
}

.pdf-editor-page .upload-card p {
  margin: 10px 0 22px;
  color: var(--muted);
}

.pdf-editor-page .upload-mini {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 650;
}

.pdf-editor-page .editor-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.pdf-editor-page .document-bar {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.pdf-editor-page .document-main,
.pdf-editor-page .document-actions,
.pdf-editor-page .toolbar-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pdf-editor-page .document-identity {
  min-width: 0;
}

.pdf-editor-page .document-identity > strong {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.pdf-editor-page .document-meta {
  display: flex;
  gap: 5px;
  margin-top: 3px;
}

.pdf-editor-page .status-pill {
  display: inline-flex;
  max-width: 220px;
  align-items: center;
  padding: 2px 7px;
  overflow: hidden;
  border-radius: 999px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.66rem;
  font-weight: 750;
}

.pdf-editor-page .status-pill.neutral {
  color: #475467;
  background: #f2f4f7;
}

.pdf-editor-page .status-pill.primary {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.pdf-editor-page .status-pill.success {
  color: #067647;
  background: #ecfdf3;
}

.pdf-editor-page .icon-button,
.pdf-editor-page .toolbar-button,
.pdf-editor-page .zoom-label {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #475467;
  background: #fff;
  transition: 0.15s ease;
}

.pdf-editor-page .icon-button:hover,
.pdf-editor-page .toolbar-button:hover,
.pdf-editor-page .zoom-label:hover {
  border-color: #cfd4dc;
  color: var(--ink);
  background: #f9fafb;
}

.pdf-editor-page .icon-button:disabled,
.pdf-editor-page .toolbar-button:disabled {
  opacity: 0.4;
}

.pdf-editor-page .editor-grid {
  display: grid;
  grid-template-columns: 104px 204px minmax(0, 1fr);
  min-height: calc(100vh - 140px);
}

.pdf-editor-page .page-rail,
.pdf-editor-page .tools-panel {
  min-width: 0;
  background: #fff;
}

.pdf-editor-page .page-rail {
  border-right: 1px solid var(--border);
}

.pdf-editor-page .rail-head {
  display: flex;
  height: 43px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  color: #667085;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pdf-editor-page .rail-badge {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #475467;
  background: #f2f4f7;
}

.pdf-editor-page .thumbnail-list {
  height: calc(100% - 43px);
  padding: 9px;
  overflow: auto;
}

.pdf-editor-page .thumbnail-item {
  width: 100%;
  margin: 0 0 9px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #667085;
  background: transparent;
  font-size: 0.66rem;
}

.pdf-editor-page .thumbnail-item:hover,
.pdf-editor-page .thumbnail-item.active {
  border-color: #c9c5ff;
  color: var(--primary-dark);
  background: #f7f6ff;
}

.pdf-editor-page .thumbnail-canvas {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 4px;
  border: 1px solid #eaecf0;
  border-radius: 4px;
  background: #fff;
}

.pdf-editor-page .tools-panel {
  padding: 10px;
  overflow: auto;
  border-right: 1px solid var(--border);
}

.pdf-editor-page .tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.pdf-editor-page .tool-card {
  display: flex;
  min-height: 72px;
  padding: 8px 5px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: #475467;
  background: #fff;
  text-align: center;
  transition: 0.15s ease;
}

.pdf-editor-page .tool-card:hover {
  border-color: #cfd4dc;
  transform: translateY(-1px);
}

.pdf-editor-page .tool-card.active,
.pdf-editor-page .tool-card-primary.active {
  border-color: rgba(99, 91, 255, 0.32);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.pdf-editor-page .tool-card-primary {
  color: var(--primary-dark);
  background: #faf9ff;
}

.pdf-editor-page .tool-icon {
  font-size: 1.12rem;
}

.pdf-editor-page .tool-card strong {
  font-size: 0.72rem;
}

.pdf-editor-page .workspace {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--workspace);
}

.pdf-editor-page .workspace-toolbar {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 9px;
  border-bottom: 1px solid #d9dee7;
  background: #f9fafb;
}

.pdf-editor-page .toolbar-button,
.pdf-editor-page .zoom-label {
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
}

.pdf-editor-page .zoom-label {
  min-width: 58px;
  font-size: 0.75rem;
  font-weight: 750;
}

.pdf-editor-page .page-label {
  min-width: 72px;
  color: #475467;
  font-size: 0.76rem;
  font-weight: 750;
  text-align: center;
}

.pdf-editor-page .workspace-scroller {
  position: relative;
  flex: 1 1 auto;
  min-height: 440px;
  overflow: auto;
  padding: 26px;
  overscroll-behavior: contain;
}

.pdf-editor-page .page-stage {
  position: relative;
  width: 1px;
  height: 1px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.17),
  0 2px 7px rgba(15, 23, 42, 0.08);
}

.pdf-editor-page #pdfCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
}

.pdf-editor-page .object-layer,
.pdf-editor-page .inline-editor-host {
  position: absolute;
  inset: 0;
}

.pdf-editor-page .object-layer {
  z-index: 2;
  pointer-events: none;
}

.pdf-editor-page .inline-editor-host {
  z-index: 5;
  pointer-events: none;
}

.pdf-editor-page .pdf-object-hit {
  position: absolute;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  pointer-events: auto;
  touch-action: none;
}

.pdf-editor-page .pdf-object-hit.text-object {
  cursor: text;
}

.pdf-editor-page .pdf-object-hit.image-object,
.pdf-editor-page .pdf-object-hit.path-object {
  cursor: move;
}

.pdf-editor-page .pdf-object-hit:hover {
  border-color: rgba(99, 91, 255, 0.68);
  background: rgba(99, 91, 255, 0.05);
}

.pdf-editor-page .pdf-object-hit.selected {
  border: 1.5px solid var(--primary);
  background: rgba(99, 91, 255, 0.035);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.pdf-editor-page .object-delete-control {
  position: absolute;
  z-index: 6;
  top: -13px;
  right: -13px;
  display: none;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--danger);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3);
  pointer-events: auto;
  cursor: pointer;
}

.pdf-editor-page .pdf-object-hit.selected .object-delete-control {
  display: flex;
}

.pdf-editor-page .pdf-object-hit.dragging {
  border-style: dashed;
  cursor: grabbing;
}

.pdf-editor-page .inline-text-editor {
  position: absolute;
  z-index: 10;
  min-width: 180px;
  min-height: 44px;
  padding: 8px 10px;
  overflow: auto;
  border: 2px solid var(--primary);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 8px 24px rgba(99, 91, 255, 0.18);
  resize: both;
  line-height: 1.25;
  white-space: pre-wrap;
  pointer-events: auto;
}

.pdf-editor-page .inline-edit-actions {
  position: absolute;
  z-index: 11;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
}

.pdf-editor-page .inline-edit-actions button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.pdf-editor-page .inline-edit-actions button:hover {
  background: #f2f4f7;
}

.pdf-editor-page .workspace-footer {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  border-top: 1px solid #d9dee7;
  color: #667085;
  background: #f9fafb;
  font-size: 0.68rem;
}

.pdf-editor-page .properties-dock {
  position: fixed;
  z-index: 1450;
  left: 50%;
  bottom: 0;
  width: min(520px, calc(100vw - 24px));
  max-width: none;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #fff;
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
  transform: translate(
  -50%,
  calc(100% - 38px)
  );
  transition: transform 0.2s ease,
  width 0.2s ease,
  box-shadow 0.2s ease;
}

.pdf-editor-page .properties-dock.open {
  width: min(980px, calc(100vw - 24px));
  transform: translate(-50%, 0);
  box-shadow: 0 -14px 42px rgba(15, 23, 42, 0.16);
}

.pdf-editor-page .properties-dock-tab {
  display: flex;
  width: 100%;
  height: 38px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 0;
  color: #475467;
  background: rgba(255, 255, 255, 0.98);
  font-size: 0.76rem;
}

.pdf-editor-page .properties-dock-tab:hover {
  background: #f9fafb;
}

.pdf-editor-page .properties-selection-label {
  max-width: 260px;
  overflow: hidden;
  color: #98a2b3;
  font-size: 0.72rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-editor-page .properties-dock-body {
  max-height: 34vh;
  padding: 9px 12px 11px;
  overflow: auto;
  border-top: 1px solid var(--border);
}

.pdf-editor-page .properties-empty-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  color: #98a2b3;
  font-size: 0.78rem;
}

.pdf-editor-page .properties-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
}

.pdf-editor-page .property-group label {
  display: block;
  margin-bottom: 3px;
  color: #667085;
  font-size: 0.64rem;
  font-weight: 750;
  line-height: 1.1;
}

.pdf-editor-page .property-group-small {
  flex: 0 0 auto;
}

.pdf-editor-page .property-actions-group .btn {
  width: 100%;
}

.pdf-editor-page .property-help {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #98a2b3;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-editor-page .app-modal {
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18);
}

.pdf-editor-page .modal-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  margin-right: 10px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-soft);
}

.pdf-editor-page .modal-icon.success {
  color: #067647;
  background: #ecfdf3;
}

.pdf-editor-page .choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pdf-editor-page .choice-card {
  display: flex;
  min-height: 145px;
  padding: 18px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #344054;
  background: #fff;
  text-align: center;
}

.pdf-editor-page .choice-card i {
  color: var(--primary);
  font-size: 1.8rem;
}

.pdf-editor-page .choice-card strong {
  font-size: 0.95rem;
}

.pdf-editor-page .choice-card span {
  color: #98a2b3;
  font-size: 0.72rem;
}

.pdf-editor-page .choice-card:hover {
  border-color: #c9c5ff;
  background: #faf9ff;
}

.pdf-editor-page .choice-card-primary {
  border-color: rgba(99, 91, 255, 0.24);
  background: var(--primary-soft);
}

.pdf-editor-page .loading-overlay {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(4px);
}

.pdf-editor-page .loading-card {
  display: flex;
  min-width: 280px;
  align-items: center;
  gap: 13px;
  padding: 17px 20px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.15);
}

.pdf-editor-page .loading-card strong,
.pdf-editor-page .loading-card small {
  display: block;
}

.pdf-editor-page .loading-card small {
  margin-top: 2px;
  color: #667085;
}

.pdf-editor-page .property-button-group .btn.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.pdf-editor-page .property-group-medium {
  min-width: 0;
}

.pdf-editor-page .pdf-object-hit.text-object.selected {
  height: 25px !important;
  min-height: 25px;
}

.pdf-editor-page .font-warning {
  display: flex;
  max-width: 360px;
  margin-top: 4px;
  align-items: flex-start;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #92400e;
  background: #fffbeb;
  font-size: 0.6rem;
  line-height: 1.2;
}

.pdf-editor-page .font-warning i {
  flex: 0 0 auto;
  margin-top: 1px;
}

.pdf-editor-page #editorApp:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background: var(--workspace);
}

.pdf-editor-page #editorApp:fullscreen .editor-shell {
  height: 100vh;
  border: 0;
  border-radius: 0;
}

.pdf-editor-page #editorApp:fullscreen .editor-grid {
  height: calc(100vh - 62px);
  min-height: 0;
}

.pdf-editor-page #editorApp:fullscreen .workspace {
  min-height: 0;
}

.pdf-editor-page #editorApp:fullscreen .workspace-scroller {
  min-height: 0;
}

.pdf-editor-page .property-group {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.pdf-editor-page #fontPropertyGroup {
  flex: 1 1 250px;
  max-width: 360px;
}

.pdf-editor-page #fontSizePropertyGroup {
  flex: 0 0 92px;
}

.pdf-editor-page #textStylePropertyGroup {
  flex: 0 0 auto;
}

.pdf-editor-page #alignmentPropertyGroup {
  flex: 0 0 auto;
}

.pdf-editor-page #rotationPropertyGroup {
  flex: 0 0 100px;
}

.pdf-editor-page #letterSpacingPropertyGroup {
  flex: 0 0 108px;
}

.pdf-editor-page #layerPropertyGroup {
  flex: 0 0 auto;
}

.pdf-editor-page .property-actions-group {
  flex: 0 0 auto;
}

.pdf-editor-page .form-control-color {
  width: 40px;
  height: 31px;
  padding: 3px;
}

.pdf-editor-page .text-selection-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.pdf-editor-page .pdf-auto-text-hit {
  position: absolute;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: text;
  pointer-events: auto;
}

.pdf-editor-page .pdf-auto-text-hit:hover {
  border-color: rgba(99, 91, 255, 0.72);
  background: rgba(99, 91, 255, 0.045);
}

.pdf-editor-page .pdf-auto-text-hit.selected {
  min-height: 25px;
  border: 1.5px solid var(--primary);
  background: rgba(99, 91, 255, 0.055);
}

.pdf-editor-page .pdf-editor-hero {
  padding: 32px 0 22px;
  background: radial-gradient(circle at 85% 0%, rgba(99, 91, 255, 0.10), transparent 22rem),
  linear-gradient(180deg, #ffffff, #f7f8fb);
}

.pdf-editor-page .pdf-editor-hero-copy {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.pdf-editor-page .pdf-editor-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pdf-editor-page .pdf-editor-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.pdf-editor-page .pdf-editor-hero p {
  max-width: 760px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.pdf-editor-page .pdf-editor-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.pdf-editor-page .pdf-editor-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  color: #475467;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
}

.pdf-editor-page .pdf-editor-seo {
  padding: 60px 0 72px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.pdf-editor-page .pdf-editor-seo-head {
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: center;
}

.pdf-editor-page .pdf-editor-seo h2 {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.pdf-editor-page .pdf-editor-seo-intro {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.pdf-editor-page .pdf-editor-seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pdf-editor-page .pdf-editor-seo-card {
  padding: 20px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.pdf-editor-page .pdf-editor-seo-card i {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 11px;
  color: #fff;
  background: var(--primary);
  border-radius: 11px;
}

.pdf-editor-page .pdf-editor-seo-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
}

.pdf-editor-page .pdf-editor-seo-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.pdf-editor-page .pdf-editor-how {
  margin-top: 34px;
  padding: 24px;
  background: #f7f8fb;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.pdf-editor-page .pdf-editor-how h2,
.pdf-editor-page .pdf-editor-faq h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.pdf-editor-page .pdf-editor-how ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  counter-reset: pdf-step;
  list-style: none;
}

.pdf-editor-page .pdf-editor-how li {
  position: relative;
  min-height: 100px;
  padding: 42px 14px 14px;
  color: #475467;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  font-size: 0.78rem;
  line-height: 1.55;
  counter-increment: pdf-step;
}

.pdf-editor-page .pdf-editor-how li::before {
  position: absolute;
  top: 12px;
  left: 14px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  content: counter(pdf-step);
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
}

.pdf-editor-page .pdf-editor-faq {
  max-width: 900px;
  margin: 34px auto 0;
}

.pdf-editor-page .pdf-editor-faq details {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.pdf-editor-page .pdf-editor-faq summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.pdf-editor-page .pdf-editor-faq p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.pdf-editor-page .pdf-editor-survey-section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  background: #fff;
}

.pdf-editor-page .pdf-editor-survey-card {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(1.35rem, 3vw, 2rem) 0 0;
  border-top: 1px solid #dfe9ed;
}

.pdf-editor-page .pdf-editor-survey-card::before {
  position: absolute;
  top: -2px;
  left: 0;
  width: 72px;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #0785af, #af0707);
  border-radius: 999px;
}

.pdf-editor-page .pdf-editor-survey-copy {
  max-width: 680px;
  margin: 0 0 0.85rem;
}

.pdf-editor-page .pdf-editor-survey-copy .pdf-editor-seo-kicker {
  margin-bottom: 0.35rem;
  font-size: 0.62rem;
}

.pdf-editor-page .pdf-editor-survey-copy h2 {
  margin: 0;
  color: #17252c;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.pdf-editor-page .pdf-editor-survey-copy p {
  max-width: 620px;
  margin: 0.45rem 0 0;
  color: #6c7d85;
  font-size: 0.75rem;
  line-height: 1.65;
}

.pdf-editor-page .pdf-editor-survey-frame {
  width: 100%;
  min-height: 383px;
  overflow: hidden;
}

.pdf-editor-page .pdf-editor-survey-frame iframe {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
}

@media (max-width: 1399.98px) {
  .pdf-editor-page .editor-grid {
    grid-template-columns: 92px 190px minmax(0, 1fr);
  }

  .pdf-editor-page .properties-row {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .pdf-editor-page .editor-grid {
    position: relative;
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .pdf-editor-page .page-rail {
    position: absolute;
    z-index: 1050;
    left: 8px;
    width: 110px;
    height: calc(100% - 12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transform: translateX(-140%);
    transition: 0.18s ease;
  }

  .pdf-editor-page .page-rail.open {
    transform: translateX(0);
  }
}

@media (max-width: 991.98px) {
  .pdf-editor-page .editor-section {
    padding: 10px 0 58px;
  }

  .pdf-editor-page .editor-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .pdf-editor-page .tools-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    padding: 8px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .pdf-editor-page .tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .pdf-editor-page .tool-card {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: 7px 4px;
  }

  .pdf-editor-page .workspace {
    min-height: calc(100dvh - 250px);
  }

  .pdf-editor-page .workspace-scroller {
    min-height: 360px;
    padding: 16px 8px 70px;
  }

  .pdf-editor-page .properties-dock {
    left: 50%;
    bottom: 0;
    width: calc(100vw - 16px);
  }

  .pdf-editor-page .properties-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .pdf-editor-page .properties-dock-body {
    max-height: 48vh;
  }

  .pdf-editor-page .tools-panel::-webkit-scrollbar {
    display: none;
  }

  .pdf-editor-page .pdf-editor-seo-grid {
    grid-template-columns: 1fr;
  }

  .pdf-editor-page .pdf-editor-how ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .pdf-editor-page .document-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .pdf-editor-page .document-actions {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .pdf-editor-page #exportButton,
.pdf-editor-page #copyButton {
    flex: 1 1 auto;
  }

  .pdf-editor-page .workspace-toolbar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px 8px;
  }

  .pdf-editor-page .choice-grid {
    grid-template-columns: 1fr;
  }

  .pdf-editor-page .choice-card {
    min-height: 105px;
  }

  .pdf-editor-page .properties-dock {
    left: auto;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: 44px;
    max-width: none;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    transform: none;
    transition: width 0.18s ease, right 0.18s ease, bottom 0.18s ease, border-radius 0.18s ease;
  }

  .pdf-editor-page .properties-dock:not(.open) {
    height: 44px;
    overflow: hidden;
  }

  .pdf-editor-page .properties-dock:not(.open) .properties-dock-tab {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
    color: var(--primary-dark);
    background: #fff;
  }

  .pdf-editor-page .properties-dock:not(.open) .properties-dock-tab > span {
    display: flex !important;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }

  .pdf-editor-page .properties-dock:not(.open) .properties-dock-tab strong,
.pdf-editor-page .properties-dock:not(.open) .properties-selection-label,
.pdf-editor-page .properties-dock:not(.open) #propertiesDockChevron {
    display: none !important;
  }

  .pdf-editor-page .properties-dock:not(.open) .properties-dock-tab .bi-sliders {
    margin: 0;
    font-size: 1.05rem;
  }

  .pdf-editor-page .properties-dock.open {
    left: 8px;
    right: 8px;
    bottom: 0;
    width: auto;
    max-width: none;
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.18);
    transform: none;
  }

  .pdf-editor-page .properties-dock.open .properties-dock-tab {
    height: 40px;
    padding: 0 10px 0 12px;
  }

  .pdf-editor-page .properties-dock.open .properties-selection-label {
    display: inline-block;
    max-width: 130px;
  }

  .pdf-editor-page .properties-dock-body {
    max-height: min(44dvh, 360px);
    padding: 8px 9px calc(10px + env(safe-area-inset-bottom));
    overflow: auto;
  }

  .pdf-editor-page .properties-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px 8px;
    align-items: end;
  }

  .pdf-editor-page .property-group {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .pdf-editor-page .property-group label {
    margin-bottom: 2px;
    font-size: 0.6rem;
  }

  .pdf-editor-page .property-help {
    display: none;
  }

  .pdf-editor-page .font-warning {
    max-width: none;
    margin-top: 3px;
    padding: 3px 5px;
    font-size: 0.56rem;
  }

  .pdf-editor-page .property-actions-group,
.pdf-editor-page #layerPropertyGroup {
    grid-column: 1 / -1;
  }

  .pdf-editor-page .property-actions-group .btn,
.pdf-editor-page #layerPropertyGroup .btn-group {
    width: 100%;
  }

  .pdf-editor-page #layerPropertyGroup .btn {
    flex: 1 1 50%;
  }

  .pdf-editor-page .inline-text-editor.mobile-inline-text-editor {
    position: fixed !important;
    z-index: 2100;
    top: max(66px, calc(env(safe-area-inset-top) + 54px)) !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 92px !important;
    max-height: min(48dvh, 420px) !important;
    padding: 11px 12px;
    overflow: auto;
    resize: none;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .pdf-editor-page .inline-edit-actions.mobile-inline-edit-actions {
    position: fixed !important;
    z-index: 2101;
    top: max(18px, calc(env(safe-area-inset-top) + 8px)) !important;
    right: 10px !important;
    left: auto !important;
  }

  .pdf-editor-page .inline-text-editor.mobile-inline-text-editor + .inline-edit-actions {
    max-width: calc(100vw - 20px);
  }

  .pdf-editor-page .document-actions #exportButton {
    margin-left: auto;
  }

  .pdf-editor-page .workspace-scroller {
    min-height: 320px;
    padding: 12px 6px 72px;
  }

  .pdf-editor-page #fontPropertyGroup {
    grid-column: 1 / -1;
    max-width: none;
  }

  .pdf-editor-page #fontSizePropertyGroup {
    grid-column: span 2;
  }

  .pdf-editor-page #textStylePropertyGroup {
    grid-column: span 2;
  }

  .pdf-editor-page #alignmentPropertyGroup {
    grid-column: span 2;
  }

  .pdf-editor-page #rotationPropertyGroup {
    grid-column: span 2;
  }

  .pdf-editor-page #letterSpacingPropertyGroup {
    grid-column: span 2;
  }

  .pdf-editor-page .property-group-small {
    grid-column: span 2;
  }

  .pdf-editor-page #layerPropertyGroup {
    grid-column: span 4;
  }

  .pdf-editor-page .property-actions-group {
    grid-column: span 2;
  }

  .pdf-editor-page #layerPropertyGroup .btn-group {
    width: 100%;
  }

  .pdf-editor-page .property-actions-group .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .pdf-editor-page .upload-card {
    min-height: calc(100dvh - 86px);
    border-radius: 16px;
  }

  .pdf-editor-page .document-identity > strong {
    max-width: 190px;
  }

  .pdf-editor-page .properties-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }

  .pdf-editor-page .properties-selection-label {
    max-width: 150px;
  }

  .pdf-editor-page .inline-text-editor {
    min-width: 150px;
  }

  .pdf-editor-page .properties-dock.open {
    width: calc(100vw - 12px);
  }

  .pdf-editor-page .properties-dock-tab {
    height: 36px;
    padding: 0 10px;
  }

  .pdf-editor-page .tool-card {
    min-height: 54px;
    padding: 6px 4px;
  }

  .pdf-editor-page .tool-card strong {
    font-size: 0.66rem;
  }

  .pdf-editor-page .document-actions {
    gap: 5px;
  }

  .pdf-editor-page #printButton {
    flex: 0 0 36px;
  }

  .pdf-editor-page .app-wide {
    padding-right: 6px;
    padding-left: 6px;
  }

  .pdf-editor-page .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdf-editor-page #copyButton {
    width: 100%;
    order: 10;
  }

  .pdf-editor-page .workspace {
    min-height: calc(100dvh - 285px);
  }

  .pdf-editor-page .workspace-scroller {
    min-height: 280px;
    padding: 10px 4px 72px;
  }

  .pdf-editor-page .properties-dock-body {
    max-height: min(42dvh, 330px);
  }

  .pdf-editor-page .pdf-editor-hero {
    padding: 22px 0 14px;
  }

  .pdf-editor-page .pdf-editor-hero h1 {
    font-size: 2rem;
  }

  .pdf-editor-page .pdf-editor-seo {
    padding: 42px 0 56px;
  }

  .pdf-editor-page .pdf-editor-how {
    padding: 16px;
  }

  .pdf-editor-page .pdf-editor-how ol {
    grid-template-columns: 1fr;
  }

  .pdf-editor-page .pdf-editor-survey-section {
    padding: 1.6rem 0 2rem;
  }

  .pdf-editor-page .pdf-editor-survey-card {
    padding-top: 1.1rem;
  }

  .pdf-editor-page .pdf-editor-survey-copy {
    margin-bottom: 0.55rem;
  }

  .pdf-editor-page .pdf-editor-survey-copy h2 {
    font-size: 1.15rem;
  }

  .pdf-editor-page .pdf-editor-survey-copy p {
    font-size: 0.7rem;
  }
}
