.pdf-stamp-main { padding-top: 58px; }
.pdf-stamp-hero { grid-template-columns: minmax(0,1fr) 260px; }
.pdf-stamp-visual { position: relative; width: 238px; height: 180px; border: 1px solid #d6cfc5; border-radius: 16px; background: #fffefa; box-shadow: 0 22px 48px rgba(61,48,39,.13); transform: rotate(2deg); }
.pdf-stamp-visual::before { content: ''; position: absolute; inset: 23px 28px; border-top: 5px solid #e2ddd5; border-bottom: 5px solid #e2ddd5; box-shadow: 0 27px #e2ddd5, 0 54px #e2ddd5; }
.pdf-stamp-visual > span { position: absolute; left: 26px; top: 68px; z-index: 2; color: rgba(181,82,61,.48); font: 850 20px Georgia,serif; transform: rotate(-20deg); }
.pdf-stamp-visual > b { position: absolute; right: 17px; bottom: 14px; border-radius: 7px; padding: 6px 8px; color: #fff; background: #2d2b28; font: 750 9px Georgia,serif; }
.pdf-stamp-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); }
.pdf-stamp-empty[hidden], .pdf-stamp-editor[hidden], #pdfStampLoading[hidden], #pdfStampProgress[hidden], #pdfStampImageSettings[hidden], .pdf-stamp-panel[hidden], #pdfStampSignatureWarning[hidden] { display: none; }
.pdf-stamp-capabilities { grid-template-columns: repeat(3,1fr); }
.pdf-stamp-filebar { display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid #e2ddd4; border-radius: 14px; padding: 11px 13px; background: #f7f4ee; }
.pdf-stamp-filebar > div { min-width: 0; display: flex; align-items: center; gap: 8px; }
.pdf-stamp-filebar strong { max-width: 310px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.pdf-stamp-filebar span, .pdf-stamp-filebar small { border-radius: 7px; padding: 6px 8px; color: #777169; background: #ece8e1; font-size: 8px; }
.pdf-stamp-filebar label, .pdf-stamp-filebar button { min-height: 32px; display: inline-flex; align-items: center; border: 1px solid #d9d3ca; border-radius: 8px; padding: 0 10px; background: #fffefa; font-size: 9px; font-weight: 800; cursor: pointer; }
.pdf-stamp-filebar label { color: #fff; border-color: #292725; background: #292725; }
.pdf-signature-warning { display: flex; align-items: center; gap: 10px; margin-top: 10px; border: 1px solid #dfb9ac; border-radius: 11px; padding: 10px 13px; color: #7e4235; background: #fff2ed; font-size: 8px; }
.pdf-signature-warning b { flex: 0 0 auto; }
.pdf-stamp-layout { display: grid; grid-template-columns: minmax(0,1fr) 390px; align-items: start; gap: 12px; margin-top: 12px; }
.pdf-stamp-preview-panel, .pdf-stamp-options { border: 1px solid #e1dcd3; border-radius: 18px; background: #fffefa; }
.pdf-stamp-preview-panel { min-width: 0; padding: 18px; }
.pdf-stamp-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.pdf-stamp-preview-heading > div:first-child { display: grid; gap: 4px; }
.pdf-stamp-preview-heading span { color: #b15a45; font-size: 7px; font-weight: 900; letter-spacing: .15em; }
.pdf-stamp-preview-heading h3 { margin: 0; font-size: 16px; }
.pdf-stamp-preview-heading > div:last-child { display: flex; gap: 5px; }
.pdf-stamp-preview-heading button, .pdf-stamp-preview-heading select { height: 34px; border: 1px solid #d8d2c9; border-radius: 8px; padding: 0 10px; background: #f5f2ec; font-size: 8px; font-weight: 800; }
.pdf-stamp-preview-heading button { cursor: pointer; }
.pdf-stamp-stage-wrap { min-height: 570px; display: grid; place-items: center; overflow: auto; border-radius: 14px; padding: 22px; background: #ece8e1; }
.pdf-stamp-stage { position: relative; flex: 0 0 auto; width: min(var(--stage-width, 650px), 100%); aspect-ratio: var(--stage-ratio, 612 / 792); box-shadow: 0 15px 32px rgba(50,42,35,.15); }
.pdf-stamp-stage canvas { width: 100%; height: 100%; display: block; background: #fff; }
.pdf-stamp-overlay { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pdf-stamp-overlay img { position: absolute; display: block; object-fit: contain; }
.pdf-stamp-preview-note { margin: 10px 0 0; color: #989188; font-size: 7px; line-height: 1.55; }
.pdf-stamp-options { position: sticky; top: 14px; overflow: hidden; }
.pdf-stamp-tool-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-bottom: 1px solid #e1dcd3; padding: 10px; background: #f3f0ea; }
.pdf-stamp-tool-tabs button { min-height: 50px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding: 0 9px; color: #68625b; background: transparent; text-align: left; cursor: pointer; }
.pdf-stamp-tool-tabs button.active { color: #fff; background: #2e2b28; }
.pdf-stamp-tool-tabs b { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; color: #8a4939; background: #edd8d1; font-size: 7px; }
.pdf-stamp-tool-tabs span { font-size: 8px; font-weight: 850; }
.pdf-stamp-tool-tabs i { border-radius: 99px; padding: 3px 5px; color: #3f7f63; background: #dcece4; font-size: 5px; font-style: normal; font-weight: 900; }
.pdf-stamp-tool-tabs button.active i { color: #f1b7a6; background: #51443f; }
.pdf-stamp-panel { padding: 17px 18px 3px; }
.pdf-stamp-enable { display: flex; align-items: center; gap: 9px; border-radius: 10px; padding: 10px; background: #f5f2ec; cursor: pointer; }
.pdf-stamp-enable input { width: 18px; height: 18px; margin: 0; accent-color: #b85f49; }
.pdf-stamp-enable span { display: grid; gap: 2px; }
.pdf-stamp-enable strong { font-size: 9px; }
.pdf-stamp-enable small { color: #958e85; font-size: 6px; }
.pdf-stamp-panel fieldset { border: 0; margin: 13px 0 0; padding: 0; }
.pdf-stamp-panel legend, .pdf-stamp-field > span { display: block; margin-bottom: 6px; color: #726c64; font-size: 7px; font-weight: 850; }
.pdf-stamp-source { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pdf-stamp-source label { cursor: pointer; }
.pdf-stamp-source input { position: absolute; opacity: 0; }
.pdf-stamp-source label span { min-height: 38px; display: grid; place-items: center; border: 1px solid #d9d3ca; border-radius: 8px; background: #f6f3ed; font-size: 8px; font-weight: 850; }
.pdf-stamp-source input:checked + span { color: #fff; border-color: #2e2b28; background: #2e2b28; }
#pdfStampTextSettings { display: grid; grid-template-columns: 1fr 54px; gap: 7px; margin-top: 12px; }
.pdf-stamp-field { display: grid; margin-top: 11px; }
#pdfStampTextSettings .pdf-stamp-field { margin-top: 0; }
.pdf-stamp-field input:not([type="color"]), .pdf-stamp-field select { min-width: 0; width: 100%; height: 39px; border: 1px solid #d9d3ca; border-radius: 8px; outline: 0; padding: 0 9px; background: #fff; font-size: 8px; }
.pdf-stamp-field input:focus, .pdf-stamp-field select:focus { border-color: #bb6049; box-shadow: 0 0 0 3px rgba(187,96,73,.09); }
.pdf-stamp-field input[type="color"] { width: 100%; height: 39px; border: 1px solid #d9d3ca; border-radius: 8px; padding: 4px; background: #fff; }
.pdf-stamp-field > small { margin-top: 5px; color: #999188; font-size: 6px; line-height: 1.45; }
.pdf-stamp-image-upload { min-height: 77px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 9px; margin-top: 12px; border: 1px dashed #d2cac0; border-radius: 10px; padding: 10px; background: #f8f5f0; cursor: pointer; }
.pdf-stamp-image-upload input { position: absolute; opacity: 0; }
.pdf-stamp-image-upload > span { grid-row: 1/3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #b85f49; }
.pdf-stamp-image-upload strong { align-self: end; font-size: 8px; }
.pdf-stamp-image-upload small { align-self: start; color: #999188; font-size: 6px; }
.pdf-stamp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.pdf-stamp-range { display: grid; gap: 6px; margin-top: 12px; }
.pdf-stamp-range > span { display: flex; justify-content: space-between; color: #726c64; font-size: 7px; font-weight: 850; }
.pdf-stamp-range input { width: 100%; accent-color: #b85f49; }
.pdf-stamp-template-presets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.pdf-stamp-template-presets button { min-height: 29px; border: 1px solid #d9d3ca; border-radius: 7px; padding: 0 7px; background: #f4f1eb; font-size: 6px; font-weight: 800; cursor: pointer; }
.pdf-stamp-error { min-height: 0; margin: 8px 0 0; color: #bc4d37; font-size: 7px; }
.pdf-stamp-error:empty { display: none; }
.pdf-stamp-export { border-top: 1px solid #e3ddd5; margin-top: 12px; padding: 3px 18px 18px; }
.pdf-stamp-export .export-button { margin-top: 10px; }
@media (max-width: 1080px) { .pdf-stamp-layout { grid-template-columns: 1fr; } .pdf-stamp-options { position: static; } .pdf-stamp-stage-wrap { min-height: 500px; } }
@media (max-width: 800px) { .pdf-stamp-hero { grid-template-columns: 1fr; } .pdf-stamp-visual { display: none; } .pdf-stamp-capabilities { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .pdf-stamp-workbench { padding: 13px; border-radius: 21px; } .pdf-stamp-filebar { align-items: flex-start; flex-direction: column; } .pdf-stamp-filebar > div { flex-wrap: wrap; } .pdf-stamp-layout { gap: 10px; } .pdf-stamp-preview-panel { padding: 11px; } .pdf-stamp-preview-heading { align-items: flex-start; flex-direction: column; } .pdf-stamp-stage-wrap { min-height: 430px; padding: 12px; } .pdf-stamp-options { border-radius: 15px; } .pdf-stamp-two { grid-template-columns: 1fr; } }
