.sign-pdf-page { background: radial-gradient(circle at 84% 4%, rgba(224,169,145,.28), transparent 29rem), radial-gradient(circle at 5% 45%, rgba(154,195,177,.22), transparent 26rem), #f4f1ea; }
.back-home { justify-self: end; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 750; }
.back-home span { color: var(--coral); margin-left: 4px; }
.sign-main { width: min(1280px, calc(100% - 48px)); margin: 0 auto; padding: 70px 0 110px; }
.sign-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: center; gap: 70px; margin-bottom: 46px; }
.sign-hero h1 { margin: 24px 0 17px; font-size: clamp(48px, 6vw, 76px); line-height: 1.02; letter-spacing: -.065em; }
.sign-hero h1 em { color: #bb654e; font-family: Georgia, "Songti SC", serif; font-weight: 500; }
.sign-hero > div > p { max-width: 700px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.hero-points { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; color: #726c64; font-size: 10px; font-weight: 750; }
.hero-points span::first-letter { color: #3d9871; }
.signature-hero-card { position: relative; width: 220px; height: 176px; display: block; border: 1px solid rgba(87,72,62,.16); border-radius: 14px; padding: 25px; background: #fffefa; box-shadow: 0 24px 50px rgba(55,44,36,.14); transform: rotate(2deg); }
.signature-hero-card::before { content: ""; position: absolute; inset: 11px -13px -13px 11px; z-index: -1; border: 1px solid rgba(87,72,62,.12); border-radius: 14px; background: #eadfd7; transform: rotate(-6deg); }
.signature-hero-card > span { color: #aaa198; font-size: 8px; font-weight: 850; letter-spacing: .15em; }
.signature-hero-card i { display: block; width: 80%; height: 4px; margin-top: 17px; border-radius: 5px; background: #e0dbd3; }
.signature-hero-card i:nth-of-type(2) { width: 92%; margin-top: 8px; }
.signature-hero-card i:nth-of-type(3) { width: 53%; margin-top: 8px; }
.signature-hero-card b { display: block; margin: 23px 0 2px; color: #2f3e48; font: italic 22px "Brush Script MT", "Segoe Script", cursive; }
.signature-hero-card small { color: #48a17a; font-size: 7px; }

.sign-workbench { position: relative; padding: 27px; border: 1px solid rgba(105,98,88,.2); border-radius: 28px; background: rgba(255,254,250,.86); box-shadow: 0 28px 75px rgba(54,47,37,.1), inset 0 1px #fff; backdrop-filter: blur(14px); }
.workbench-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 3px 4px 22px; }
.workbench-heading > div:first-child { display: grid; gap: 5px; }
.workbench-heading > div:first-child > span, .panel-title > span { color: #a85743; font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.workbench-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.local-note { display: inline-flex; align-items: center; gap: 7px; color: #8c867e; font-size: 10px; }
.local-note i { width: 6px; height: 6px; border-radius: 50%; background: #4da57e; }
.sign-empty[hidden], .sign-editor[hidden], .sign-loading[hidden], .export-progress[hidden], .selection-bar[hidden], .signature-tab-panel[hidden], .uploaded-signature-preview[hidden] { display: none; }
.sign-drop-zone { min-height: 338px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #cfc7bc; border-radius: 21px; padding: 35px 20px; background: #f8f5ef; text-align: center; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.sign-drop-zone:hover, .sign-drop-zone.dragging { border-color: #b75e49; background: #fff5f1; transform: translateY(-1px); }
.sign-drop-zone input, .signature-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-mark { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 19px 19px 19px 7px; color: #fff; background: #bd644e; box-shadow: 0 12px 25px rgba(167,77,57,.2); font-size: 28px; transform: rotate(-2deg); }
.sign-drop-zone strong { font-size: 19px; letter-spacing: -.025em; }
.sign-drop-zone p { margin: 8px 0 18px; color: #8d867d; font-size: 11px; }
.sign-drop-zone em { border-radius: 9px; padding: 10px 16px; color: #fff; background: #292725; font-size: 10px; font-style: normal; font-weight: 800; }
.sign-drop-zone small { margin-top: 12px; color: #aaa39a; font-size: 8px; }
.demo-button { display: flex; align-items: center; gap: 7px; border: 0; margin: 10px auto 0; padding: 7px 10px; color: #817a72; background: transparent; font-size: 9px; font-weight: 750; cursor: pointer; }
.demo-button span { color: #b75e49; }
.sign-capabilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.sign-capabilities > span { min-height: 84px; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 10px; border: 1px solid #e4ded5; border-radius: 13px; padding: 12px; background: #fffefa; }
.sign-capabilities b { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #703f34; background: #edd7d0; font: 750 13px Georgia, serif; }
.sign-capabilities strong { align-self: end; font-size: 10px; }
.sign-capabilities small { align-self: start; margin-top: 3px; color: #9a938a; font-size: 8px; }

.sign-editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #e2ddd4; border-radius: 14px; padding: 11px 13px; background: #f7f4ee; }
.document-identity { min-width: 0; display: flex; align-items: center; gap: 8px; }
.document-identity span { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 800; }
.document-identity strong, .document-identity small { border-radius: 7px; padding: 6px 8px; color: #777169; background: #ece8e1; font-size: 8px; }
.sign-editor-bar > div:last-child { display: flex; gap: 6px; }
.replace-file, .sign-editor-bar button { min-height: 32px; display: inline-flex; align-items: center; border: 1px solid #d9d3ca; border-radius: 8px; padding: 0 10px; color: #615c55; background: #fffefa; font-size: 9px; font-weight: 800; cursor: pointer; }
.replace-file { color: #fff; border-color: #292725; background: #292725; }
.sign-editor-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr) 250px; align-items: start; gap: 12px; margin-top: 12px; }
.sign-pages-panel, .sign-canvas-panel, .sign-export-panel { min-width: 0; border: 1px solid #e1dcd3; border-radius: 18px; background: #fffefa; }
.sign-pages-panel { max-height: 740px; overflow: hidden; padding: 13px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 2px 2px 11px; }
.panel-title small { color: #989188; font-size: 7px; }
.sign-thumbnails { max-height: 690px; display: grid; gap: 9px; overflow-y: auto; padding-right: 3px; scrollbar-width: thin; }
.sign-page-thumb { width: 100%; border: 1px solid #ddd7ce; border-radius: 10px; padding: 6px; background: #f3f0ea; cursor: pointer; }
.sign-page-thumb.active { border-color: #b85d46; box-shadow: 0 0 0 3px rgba(184,93,70,.1); }
.sign-page-thumb canvas { width: 100%; height: auto; display: block; border-radius: 5px; background: #fff; }
.sign-page-thumb > span { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; color: #716b64; font-size: 7px; font-weight: 800; }
.sign-page-thumb b { min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #b55d48; font-size: 7px; }
.sign-canvas-panel { padding: 13px; background: #f2efe9; }
.sign-tool-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sign-tool-row button { min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #d8d2c8; border-radius: 9px; padding: 0 8px; color: #5f5a53; background: #fffefa; font-size: 8px; cursor: pointer; }
.sign-tool-row button span { color: #a95542; font: 750 12px Georgia, serif; }
.sign-tool-row button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sign-tool-row button:hover:not(:disabled) { border-color: #af6856; }
.sign-tool-row button:disabled { opacity: .45; cursor: default; }
.sign-tool-row .primary-tool { color: #fff; border-color: #2c2926; background: #2c2926; }
.sign-tool-row .primary-tool span { color: #f5b8a8; }
.page-status-row { display: flex; justify-content: space-between; gap: 10px; margin: 10px 1px 7px; color: #948d85; font-size: 7px; }
.page-status-row span:first-child { color: #665f57; font-weight: 800; }
.sign-stage-scroll { max-height: 650px; overflow: auto; border: 1px solid #d6d0c7; border-radius: 11px; padding: 18px; background: #ded9d1; }
.sign-page-stage { position: relative; width: 100%; max-width: 760px; margin: 0 auto; overflow: hidden; background: #fff; box-shadow: 0 12px 30px rgba(44,38,32,.15); user-select: none; touch-action: none; }
.sign-page-stage > canvas { width: 100%; height: auto; display: block; }
.sign-overlay-layer { position: absolute; inset: 0; }
.sign-element { position: absolute; display: grid; place-items: center; border: 1px solid transparent; cursor: move; touch-action: none; }
.sign-element:hover, .sign-element.selected { border-color: #267cb2; background: rgba(69,153,205,.04); }
.sign-element img { width: 100%; height: 100%; display: block; object-fit: fill; pointer-events: none; }
.sign-element .resize-handle { position: absolute; right: -6px; bottom: -6px; width: 13px; height: 13px; display: none; border: 2px solid #fff; border-radius: 50%; background: #267cb2; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: nwse-resize; }
.sign-element.selected .resize-handle { display: block; }
.selection-bar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 8px; border-radius: 9px; padding: 7px; background: #e7e3dc; }
.selection-bar > span { display: grid; gap: 1px; margin-right: auto; }
.selection-bar small { color: #a35a46; font-size: 6px; font-weight: 850; letter-spacing: .12em; }
.selection-bar strong { font-size: 9px; }
.selection-bar button { border: 1px solid #d0c9bf; border-radius: 7px; padding: 7px 9px; background: #fffefa; font-size: 8px; font-weight: 800; cursor: pointer; }
.selection-bar .danger { color: #b34735; }
.sign-export-panel { position: sticky; top: 14px; padding: 20px; }
.export-kicker { color: #a85743; font-size: 8px; font-weight: 850; letter-spacing: .15em; }
.sign-export-panel h3 { margin: 6px 0 0; font-size: 17px; }
.sign-export-panel > p { margin: 8px 0 20px; color: #8b857c; font-size: 9px; line-height: 1.6; }
.filename-field { display: grid; gap: 7px; color: #726c64; font-size: 8px; font-weight: 800; }
.filename-field > div { height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid #d9d3ca; border-radius: 10px; padding: 0 11px; background: #fff; }
.filename-field input { min-width: 0; border: 0; outline: 0; padding: 0; color: #45413b; background: transparent; font-size: 10px; }
.filename-field b { color: #aaa39a; font-size: 8px; }
.export-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.export-stats span { display: grid; gap: 4px; border-radius: 9px; padding: 10px; background: #f3f0ea; }
.export-stats small { color: #999289; font-size: 7px; }
.export-stats strong { color: #413d37; font: 750 16px Georgia, serif; }
.export-progress { margin: 10px 0; padding: 10px; border-radius: 9px; background: #f4f1eb; }
.export-progress > div { display: flex; justify-content: space-between; gap: 10px; color: #6c665f; font-size: 8px; }
.export-progress > p { height: 5px; overflow: hidden; margin: 7px 0 0; border-radius: 99px; background: #ddd7ce; }
.export-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: #b75e49; transition: width .2s; }
.export-button { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 10px; color: #fff; background: #b75e49; font-size: 10px; font-weight: 850; cursor: pointer; box-shadow: 0 10px 22px rgba(166,73,53,.18); }
.export-button:hover:not(:disabled) { background: #9f4e3c; }
.export-button:disabled { opacity: .48; cursor: default; }
.export-button b { color: #ffd0c4; font-size: 15px; }
.export-note { display: block; margin-top: 11px; color: #9f978e; font-size: 7px; line-height: 1.55; }
.sign-loading { position: absolute; inset: 76px 27px 27px; z-index: 10; display: flex; align-items: center; justify-content: center; gap: 14px; border: 1px solid rgba(222,215,205,.8); border-radius: 21px; background: rgba(255,254,250,.96); backdrop-filter: blur(8px); }
.sign-loading > span { width: 43px; height: 43px; border: 2px solid #e3ddd4; border-top-color: #b75e49; border-radius: 50%; animation: sign-spin .8s linear infinite; }
.sign-loading div { display: grid; gap: 5px; }
.sign-loading strong { font-size: 12px; }
.sign-loading p { margin: 0; color: #918a82; font-size: 9px; }
@keyframes sign-spin { to { transform: rotate(360deg); } }

.sign-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.sign-benefits article { min-height: 165px; padding: 21px; border: 1px solid rgba(111,103,92,.17); border-radius: 17px; background: rgba(255,254,250,.48); }
.sign-benefits span { color: #a85743; font: italic 11px Georgia, serif; }
.sign-benefits strong { display: block; margin: 23px 0 7px; font-size: 14px; }
.sign-benefits p { margin: 0; color: #7f7970; font-size: 11px; line-height: 1.65; }

.signature-dialog, .text-dialog { width: min(620px, calc(100% - 28px)); border: 1px solid #d8d1c7; border-radius: 22px; padding: 0; background: #fffefa; box-shadow: 0 30px 100px rgba(38,31,25,.25); }
.signature-dialog::backdrop, .text-dialog::backdrop { background: rgba(32,28,24,.44); backdrop-filter: blur(5px); }
.signature-dialog form, .text-dialog form { position: relative; padding: 27px; }
.signature-dialog h2, .text-dialog h2 { margin: 5px 0 20px; font-size: 27px; letter-spacing: -.04em; }
.dialog-close { position: absolute; right: 17px; top: 16px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #6e675f; background: #f0ece6; font-size: 19px; cursor: pointer; }
.dialog-kicker { color: #a85743; font-size: 8px; font-weight: 850; letter-spacing: .15em; }
.signature-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 4px; border-radius: 11px; background: #f0ece6; }
.signature-tabs button, .signature-style-options button { border: 0; border-radius: 8px; padding: 9px; color: #7a746c; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.signature-tabs button.active, .signature-style-options button.active { color: #292725; background: #fff; box-shadow: 0 2px 7px rgba(42,35,29,.08); }
.signature-tab-panel { margin-top: 12px; }
#signatureDrawCanvas { width: 100%; height: 180px; display: block; border: 1px dashed #c9c1b7; border-radius: 12px; background: repeating-linear-gradient(0deg, #fff 0, #fff 43px, #eee9e1 44px); touch-action: none; cursor: crosshair; }
.draw-options { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.draw-options label { display: flex; align-items: center; gap: 6px; color: #777067; font-size: 8px; font-weight: 800; }
.draw-options input { width: 25px; height: 25px; border: 0; padding: 0; background: transparent; }
.draw-options button, .uploaded-signature-preview button { border: 0; color: #9d4d3a; background: transparent; font-size: 8px; font-weight: 800; cursor: pointer; }
.signature-text-field { display: grid; gap: 7px; color: #746d65; font-size: 8px; font-weight: 800; }
.signature-text-field input { width: 100%; height: 45px; border: 1px solid #d7d0c6; border-radius: 9px; outline: 0; padding: 0 12px; background: #fff; font-size: 12px; }
.signature-text-field input:focus { border-color: #a9614f; box-shadow: 0 0 0 3px rgba(169,97,79,.1); }
.typed-signature-preview { min-height: 126px; display: grid; place-items: center; margin-top: 10px; overflow: hidden; border: 1px solid #e0d9d0; border-radius: 11px; background: #faf8f3; color: #252422; font: italic 48px "Brush Script MT", "Segoe Script", cursive; }
.typed-signature-preview.font-serif { font-family: Georgia, serif; font-style: italic; }
.typed-signature-preview.font-sans { font-family: Inter, sans-serif; font-style: normal; font-weight: 650; }
.signature-style-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 8px; padding: 4px; border-radius: 10px; background: #f0ece6; }
.signature-upload { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #c9c1b7; border-radius: 12px; background: #faf8f3; cursor: pointer; }
.signature-upload > span { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 11px; color: #fff; background: #b75e49; font-size: 20px; }
.signature-upload strong { font-size: 11px; }
.signature-upload small { margin-top: 5px; color: #9a938a; font-size: 8px; }
.uploaded-signature-preview { min-height: 190px; display: grid; place-items: center; border: 1px solid #ddd6cc; border-radius: 12px; padding: 12px; background: #faf8f3; }
.uploaded-signature-preview img { max-width: 100%; max-height: 135px; }
.uploaded-signature-preview button { margin-top: 6px; }
.signature-dialog-error { min-height: 15px; margin: 8px 0 0; color: #b94632; font-size: 8px; }
.signature-dialog-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 13px; }
.signature-dialog-actions button { min-height: 39px; border: 1px solid #d7d0c6; border-radius: 9px; padding: 0 14px; background: #fff; font-size: 9px; font-weight: 800; cursor: pointer; }
.signature-dialog-actions .save-signature { color: #fff; border-color: #292725; background: #292725; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; padding: 11px 15px; border-radius: 10px; color: #fff; background: #242220; box-shadow: 0 12px 36px rgba(0,0,0,.2); font-size: 11px; font-weight: 750; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1120px) {
  .sign-editor-layout { grid-template-columns: 130px minmax(0, 1fr); }
  .sign-export-panel { position: static; grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px 18px; }
  .sign-export-panel > p, .export-note { grid-column: 1; }
  .filename-field, .export-stats, .export-progress, .export-button { grid-column: 2; }
  .filename-field { grid-row: 1 / 3; align-self: end; }
}
@media (max-width: 800px) {
  .sign-hero { grid-template-columns: 1fr; }
  .signature-hero-card { display: none; }
  .sign-capabilities { grid-template-columns: 1fr; }
  .sign-editor-layout { grid-template-columns: 1fr; }
  .sign-pages-panel { max-height: none; }
  .sign-thumbnails { max-height: none; grid-template-columns: repeat(4, 100px); overflow-x: auto; overflow-y: hidden; }
  .sign-canvas-panel { grid-column: 1; }
  .sign-export-panel { display: block; }
  .filename-field, .export-stats, .export-progress, .export-button { margin-top: 10px; }
}
@media (max-width: 620px) {
  .sign-main { width: calc(100% - 24px); padding: 48px 0 76px; }
  .sign-hero { margin-bottom: 30px; }
  .sign-hero h1 { font-size: clamp(43px, 13vw, 61px); }
  .sign-hero > div > p { font-size: 14px; }
  .sign-workbench { padding: 13px; border-radius: 21px; }
  .workbench-heading { align-items: flex-start; flex-direction: column; padding: 8px 4px 17px; }
  .sign-drop-zone { min-height: 300px; }
  .sign-editor-bar { align-items: flex-start; flex-direction: column; }
  .sign-editor-bar > div:last-child { width: 100%; }
  .sign-editor-bar > div:last-child > * { flex: 1; justify-content: center; }
  .document-identity { flex-wrap: wrap; }
  .sign-tool-row { grid-template-columns: repeat(2, 1fr); }
  .sign-stage-scroll { padding: 8px; }
  .page-status-row span:last-child { display: none; }
  .sign-benefits { grid-template-columns: 1fr; }
  .signature-dialog form, .text-dialog form { padding: 22px 18px; }
  #signatureDrawCanvas { height: 150px; }
  .typed-signature-preview { font-size: 38px; }
  .sign-loading { inset: 72px 13px 13px; }
}
@media (max-width: 400px) { .back-home { display: none; } }

