/* Fill & sign workspace: shared layout with the approved mark-tool mockup. */
.editor-app{min-width:0;background:#fff;--editor-accent:#0879bd;--editor-muted:#647487}
.editor-header{height:72px;padding:0 26px;gap:24px}.editor-header .filename{min-width:0}.editor-header .filename strong{max-width:34vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.editor-header-actions{margin-left:auto;display:flex;gap:10px}.editor-header-actions .button-blue{background:var(--editor-accent)}
.editor-toolbar{height:64px;gap:18px;position:relative;z-index:10;padding:0 24px;overflow:visible}.editor-primary-tools{gap:5px;border:0;padding:0}.editor-toolbar .tool{min-height:40px;padding:8px 12px;border:1px solid transparent;border-radius:7px;background:white;white-space:nowrap;font-size:14px}.editor-toolbar .tool:hover{background:#f1f5f9}.editor-toolbar .tool.active{background:#eaf5fd;color:#076da9;border-color:#acd4ee}.editor-history{border-left:1px solid var(--line);border-right:0;padding-left:14px;gap:5px}.editor-toolbar .zoom-label{margin-left:auto;color:var(--editor-muted)}.zoom-label select{max-width:145px}
.editor-body{grid-template-columns:176px minmax(0,1fr) 284px}.pages-panel{background:#f8fafc}.workspace{background:#edf1f5;padding:22px 28px 40px}.workspace-caption{display:flex;align-items:center;justify-content:space-between;color:var(--editor-muted);font-size:12px;margin-bottom:18px;gap:12px}.workspace-caption>span{background:none;padding:0;display:flex;align-items:center;gap:6px}.workspace-caption svg{width:14px;height:14px}#page-surface{box-shadow:0 3px 18px #22384a0c}.workspace-tip{font-size:11px}.editor-status{height:42px;flex-shrink:0;color:var(--editor-muted);padding:0 24px}.mobile-page-select{display:none}
.mark-picker-wrap{position:relative}.mark-chevron{font-size:15px}.mark-picker{position:absolute;top:50px;left:0;width:264px;background:white;border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:0 12px 36px #233c5620}.mark-picker p{font-size:12px;color:var(--editor-muted);margin:0 0 12px}.mark-picker small{display:block;font-size:12px;color:var(--editor-muted);margin-top:12px}.mark-choices{display:flex;gap:8px}.mark-choices button{flex:1;min-width:0;flex-direction:column;gap:7px;border:1px solid var(--line);border-radius:7px;background:#fff;min-height:66px;padding:10px 5px;font-size:12px}.mark-choices button svg{width:24px;height:24px}.mark-choices button:hover{background:#f5f9fc}.mark-choices button.active{background:#eaf5fd;color:#076da9;border-color:#acd4ee}
.mark-properties-content{padding:25px 22px;display:flex;flex-direction:column;flex:1}.mark-properties h2{font-size:17px;margin:0 0 5px}.mark-subtitle{font-size:12px;color:var(--editor-muted);margin:0 0 24px}.mark-property-fields label{display:block;font-size:13px;margin-bottom:10px}.mark-size-field,.mark-color-field{margin-top:24px}.mark-stepper{display:flex;border:1px solid var(--line);border-radius:7px;overflow:hidden;align-items:center;height:42px}.mark-stepper button{border:0;background:white;min-width:43px;height:40px}.mark-stepper button:hover{background:#f1f5f9}.mark-stepper input{width:100%;min-width:0;border:0;text-align:center;padding:0;color:var(--ink);background:white;appearance:textfield;-moz-appearance:textfield}.mark-stepper input::-webkit-inner-spin-button{appearance:none}.mark-swatches{display:flex;gap:12px;align-items:center;min-height:38px}.mark-swatches button{border-radius:50%;padding:0;width:32px;height:32px;min-height:32px;border:5px solid white;outline:1px solid var(--line)}.mark-swatches button.chosen{outline:2px solid var(--editor-accent)}.mark-swatches .swatch-black{background:#172c40}.mark-swatches .swatch-blue{background:#176ba8}.mark-swatches .swatch-red{background:#b13b36}.mark-continuous{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin-top:26px;gap:10px}.mark-continuous input{appearance:none;width:34px;height:20px;border-radius:14px;background:#bcc9d4;position:relative;cursor:pointer;flex-shrink:0}.mark-continuous input:before{content:'';position:absolute;width:16px;height:16px;top:2px;left:2px;border-radius:50%;background:white;transition:transform .15s}.mark-continuous input:checked{background:var(--editor-accent)}.mark-continuous input:checked:before{transform:translateX(14px)}.mark-helper{font-size:12px;color:var(--editor-muted);margin:10px 0}.mark-help{border-top:1px solid var(--line);margin-top:26px;padding-top:18px;font-size:12px;color:var(--editor-muted);line-height:1.9}.mark-help svg{width:15px;height:15px;vertical-align:middle}.mark-help kbd{border:1px solid var(--line);border-radius:4px;padding:1px 5px;font-size:11px}.mark-remove{margin-top:auto;width:100%}.mark-mobile-actions{display:none}
.mark-object.selected{outline-offset:6px}.mark-visual{border:0!important;border-radius:0;background:transparent!important;display:block;padding:0;width:100%;height:100%;min-height:0;cursor:pointer}.mark-visual svg{display:block;width:100%;height:100%;pointer-events:none}.mark-object .object-actions{top:-58px;height:42px;gap:0;background:white;border:1px solid var(--line);box-shadow:0 4px 15px #20394b18;border-radius:8px;padding:2px}.mark-object .object-actions.below{top:calc(100% + 10px)}.mark-object .object-actions button{width:44px;min-width:44px;height:36px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:white;color:var(--ink);border-radius:5px;box-shadow:none}.mark-object .object-actions button:hover{background:#eef4f8}.mark-object .object-actions .object-delete{color:#b33b3b}.mark-object .move-handle{touch-action:none}#mark-ghost{position:absolute;pointer-events:none;opacity:.55;z-index:4}#mark-ghost svg{width:100%;height:100%}
@media(max-width:1100px){.editor-body{grid-template-columns:130px minmax(0,1fr) 244px}.workspace{padding:20px}.editor-header{padding:0 18px;gap:15px}.editor-header .open-another{font-size:0;padding:10px}.editor-header .open-another svg{width:20px}.mark-properties-content{padding:20px 16px}}
@media(max-width:700px){.editor-header{height:62px;padding:0 14px;gap:8px}.editor-header .filename,.editor-header .header-divider,.editor-header .header-preview,.editor-header .open-another,.desktop-label{display:none}.editor-header .brand{font-size:20px}.editor-header .docnori-word{font-size:23px}.editor-header .docnori-symbol{width:25px;height:30px}.editor-header .button{font-size:12px;padding:9px 11px;gap:5px}.editor-toolbar{height:65px;padding:0 8px;gap:0}.editor-primary-tools{width:100%;justify-content:space-around}.editor-primary-tools>.tool,.mark-picker-wrap>.tool{flex-direction:column;gap:4px;min-height:52px;padding:6px 8px;font-size:11px}.mark-chevron,.editor-history,.editor-toolbar .zoom-label{display:none}.mark-picker{position:fixed;top:133px;left:16px;width:calc(100vw - 32px)}.editor-body{display:flex;flex-direction:column;min-height:0}.pages-panel{display:none}.workspace{flex:1;min-height:0;padding:16px 12px 60px;overflow:auto}.workspace-caption{font-size:11px}.workspace-tip{display:none}.mobile-page-select{display:inline-flex;gap:6px;align-items:center}.mobile-page-select select{font-size:12px;border:1px solid var(--line);padding:4px;background:white;border-radius:5px}.workspace-caption>.desktop-page-label{display:none}.properties-panel{flex-shrink:0;max-height:36dvh;border-top:1px solid var(--line);border-left:0;border-radius:16px 16px 0 0;box-shadow:0 -6px 18px #20384b0a}.properties-panel:not(.mark-properties) .properties-empty{display:none}.properties-panel:not(.mark-properties) .panel-title{padding:10px 16px}.properties-panel:not(.mark-properties) .properties-content{padding:12px 16px}.signature-library-panel{padding:10px 16px}.mark-properties{max-height:45dvh}.mark-properties-content{padding:15px 20px max(14px,env(safe-area-inset-bottom));display:block}.mark-properties h2{font-size:14px}.mark-subtitle,.mark-properties-content>.mark-choices,.mark-continuous,.mark-helper,.mark-help,.mark-remove{display:none}.mark-property-fields{display:grid;grid-template-columns:1fr 1fr;gap:24px}.mark-size-field,.mark-color-field{margin-top:12px}.mark-property-fields label{font-size:11px;margin-bottom:7px}.mark-stepper{height:40px}.mark-swatches button{width:32px;height:32px}.mark-mobile-actions{display:flex;gap:10px;margin-top:12px}.mark-mobile-actions button{flex:1;min-height:44px}.mark-mobile-actions .button-blue{background:var(--editor-accent)}.editor-status{display:none}.mark-object .object-actions{height:48px;top:-64px}.mark-object .object-actions button{min-height:44px;height:44px}.text-object .move-handle{touch-action:none}}
@media(prefers-reduced-motion:reduce){.editor-app *{transition:none!important}}
.editor-mobile-history{display:none}
@media(max-width:700px){.editor-mobile-history{display:flex;gap:0}.editor-mobile-history .tool{width:40px;height:44px;min-height:44px;border:0;background:white;padding:6px}.editor-header-actions{gap:4px}.editor-header .docnori-word{font-size:21px}.editor-header .docnori-symbol{width:23px}.editor-header{gap:4px;padding:0 10px}}
.editor-app .workspace-caption>span{font-size:12px;border:0;line-height:1.5;border-radius:0;color:var(--editor-muted)}
@media(max-width:700px){.editor-app .workspace-caption>span{font-size:10px}.workspace-caption{gap:6px}.workspace-caption .workspace-privacy{margin-left:auto;font-size:9px}.mobile-zoom select{max-width:68px}.mark-visual:after{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;min-width:100%;min-height:100%}}

/* Signature method picker: two clear actions with a shared visual hierarchy. */
.signature-source-dialog{--signature-accent:var(--editor-accent,#0879bd);--signature-muted:#586b7d;width:min(600px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:28px;border-radius:16px;overflow:auto}
.signature-source-dialog .signature-heading{margin-bottom:24px;gap:16px}
.signature-source-dialog .signature-heading h2{font-size:24px;line-height:1.4;margin:0;font-weight:700;letter-spacing:0}
.signature-source-dialog .signature-heading p{font-size:14px;line-height:1.6;margin:8px 0 0;color:var(--signature-muted)}
.signature-source-dialog .signature-close{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--signature-muted)}
.signature-source-dialog .signature-close:hover{background:#f1f5f9}
.signature-source-dialog .signature-choices{gap:16px}
.signature-source-dialog .signature-choice{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:22px 20px;border:1px solid #d7e1e9;border-radius:12px;background:#fff;color:#172c40;transition:border-color 160ms ease,background-color 160ms ease,box-shadow 160ms ease}
.signature-source-dialog .signature-choice:hover{border-color:var(--signature-accent);background:#f7fbff;box-shadow:0 4px 12px #172c4008}
.signature-source-dialog .signature-choice:active{background:#edf6fd}
.signature-source-dialog button:focus-visible{outline:2px solid var(--signature-accent);outline-offset:3px}
.signature-source-dialog .signature-choice-icon{display:grid;place-items:center;width:44px;height:44px;margin-bottom:18px;border-radius:10px;background:#edf6fd;color:var(--signature-accent)}
.signature-source-dialog .signature-choice-icon svg{width:24px;height:24px}
.signature-source-dialog .signature-choice strong{font-size:18px;line-height:1.5;margin:0 0 8px;font-weight:600}
.signature-source-dialog .signature-choice-description{font-size:14px;line-height:1.7;color:var(--signature-muted)}
.signature-source-dialog .signature-choice-action{display:flex;align-items:center;gap:8px;padding-top:20px;margin-top:auto;font-size:14px;font-weight:600;color:var(--signature-accent)}
.signature-source-dialog .signature-choice-action svg{width:16px;height:16px;transition:transform 160ms ease}
.signature-source-dialog .signature-choice:hover .signature-choice-action svg{transform:translateX(3px)}
.signature-source-note{display:flex;align-items:flex-start;gap:10px;margin-top:24px;padding-top:20px;border-top:1px solid #e6ebf0;color:var(--signature-muted)}
.signature-source-note>svg{flex-shrink:0;width:16px;height:16px;margin-top:3px}
.signature-source-note p{font-size:13px;line-height:1.7;margin:0}
.signature-source-note p>span{font-size:12px}
@media(max-width:540px){.signature-source-dialog{padding:24px 20px}.signature-source-dialog .signature-heading h2{font-size:22px}.signature-source-dialog .signature-choices{grid-template-columns:1fr;gap:12px}.signature-source-dialog .signature-choice{position:relative;padding:18px 16px 18px 76px}.signature-source-dialog .signature-choice-icon{position:absolute;left:16px;top:18px;margin:0}.signature-source-dialog .signature-choice-description br{display:none}.signature-source-dialog .signature-choice-action{padding-top:12px}.signature-source-note{margin-top:20px;padding-top:16px}}
@media(prefers-reduced-motion:reduce){.signature-source-dialog .signature-choice,.signature-source-dialog .signature-choice-action svg{transition:none}.signature-source-dialog .signature-choice:hover .signature-choice-action svg{transform:none}}

/* Date stamp settings share the editor inspector and remain editable after placement. */
.date-properties-content{padding:24px 20px;color:#172c40}
.date-panel-heading{display:flex;align-items:center;gap:8px}.date-panel-heading svg{color:var(--editor-accent)}.date-panel-heading h2{margin:0;font-size:17px;font-weight:600}
.date-subtitle{color:var(--editor-muted);font-size:12px;line-height:1.6;margin:8px 0 22px}
.date-properties-content label,.date-calendar legend{font-size:12px;font-weight:600;display:block;color:#43576a}
.date-input-row{display:flex;gap:8px;align-items:flex-end}.date-input-row label{flex:1;min-width:0}.date-input-row .button{padding:10px;min-height:44px;font-size:13px;color:var(--editor-accent)}
.date-properties-content input,.date-properties-content select{width:100%;min-width:0;min-height:44px;border:1px solid #d5dfe8;background:white;border-radius:7px;color:#172c40;padding:8px 10px;font:inherit;font-size:14px;margin-top:7px;box-sizing:border-box}
.date-calendar{border:0;padding:0;margin:20px 0}.date-calendar legend{margin-bottom:8px}.date-calendar>div{display:flex;background:#f2f5f8;border:1px solid #e1e7ed;padding:3px;border-radius:8px;gap:4px}.date-calendar button{flex:1;min-height:40px;border:1px solid transparent;border-radius:6px;background:transparent;color:#586b7d;font:inherit;font-size:14px;cursor:pointer}.date-calendar button[aria-pressed=true]{border-color:#c7ddeb;background:white;color:var(--editor-accent);box-shadow:0 1px 3px #172c4010}
.date-preview{padding:16px 12px;background:#f5f9fc;border:1px solid #e2ecf4;border-radius:9px;margin:18px 0}.date-preview>span{display:block;font-size:11px;color:var(--editor-muted);margin-bottom:8px}.date-preview output{display:block;font-size:19px;line-height:1.6;overflow-wrap:anywhere;color:#172c40}
.date-style{gap:12px}.date-style>label{flex:1;min-width:0}.date-style input[type=color]{padding:6px}
.date-placement-hint{display:flex;align-items:flex-start;gap:7px;font-size:12px;line-height:1.7;color:var(--editor-muted);margin:20px 0 12px}.date-placement-hint svg{width:17px;height:17px;flex-shrink:0;margin-top:2px}.date-actions{display:flex;gap:8px}.date-actions .button:first-child{flex:1}.date-actions .button{min-height:44px}.date-done{margin-top:12px;width:100%;min-height:44px}
.date-properties-content :is(button,input,select):focus-visible{outline:2px solid var(--editor-accent);outline-offset:2px}
@media(max-width:700px){.date-properties{max-height:48dvh}.date-properties-content{padding:16px 20px max(16px,env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr 1fr;gap:12px}.date-panel-heading,.date-subtitle,.date-placement-hint,.date-actions,.date-done{grid-column:1/-1}.date-subtitle{margin:-6px 0 0}.date-calendar{margin:0;align-self:end}.date-calendar legend{font-size:11px}.date-calendar button{min-height:38px}.date-input-row{gap:4px}.date-input-row .button{padding:8px 4px;font-size:12px}.date-input-row input{padding:8px 4px;font-size:12px}.date-preview{margin:0;padding:10px}.date-preview output{font-size:15px}.date-style{grid-column:1/-1;display:flex}.date-placement-hint{margin:0}.date-done{margin:0}.editor-primary-tools .tool{padding-left:7px;padding-right:7px}}

/* Text and date objects move directly; typing starts on a deliberate double click. */
.text-object:not(.signature-object):not(.mark-object) textarea[readonly]{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.text-object:not(.signature-object):not(.mark-object) textarea[readonly]:active{cursor:grabbing}
.text-object:not(.signature-object):not(.mark-object) textarea:not([readonly]){cursor:text;touch-action:auto;user-select:text;-webkit-user-select:text}

/* Shared signing uses the existing editor shell and signature visual language. */
.signing-panel{padding:22px 18px;color:var(--editor-ink,#172c40)}
.signing-panel-title{display:flex;align-items:center;gap:8px}.signing-panel-title svg{color:var(--editor-accent)}.signing-panel h2{font-size:18px;margin:0}.signing-panel h3{font-size:14px;margin:0 0 8px}
.signing-state{display:inline-block;margin-top:14px;padding:5px 10px;border-radius:6px;background:#eaf5ef;color:#246b48;font-size:12px;font-weight:600}
.signing-panel .button{min-height:44px;margin-top:8px;font-size:13px}.signing-draft-section{margin-top:20px;padding-top:20px;border-top:1px solid #e2e8f0}
.signing-activity{display:grid;gap:8px;margin-top:12px}.signing-member{border:1px solid #e2e8f0;border-radius:8px;padding:10px 12px}.signing-member strong,.signing-member span{display:block;font-size:12px}.signing-member span{font-size:11px;color:#52697c;margin-top:5px}
#signing-live{font-size:12px;color:#52697c;margin:20px 0 0}#signing-message,#signing-dialog-message,#signing-create-message{font-size:13px;overflow-wrap:anywhere}.signing-error{color:#aa302c}
.signing-field{display:block;font-size:14px;margin:20px 0 8px}.signing-field input{box-sizing:border-box;width:100%;min-height:44px;margin-top:8px;border:1px solid #cbd8e4;border-radius:8px;padding:10px;font:inherit;color:#172c40;background:#fff}
.signing-info{display:flex;gap:12px;margin:18px 0}.signing-info svg{flex-shrink:0;color:var(--editor-accent);margin-top:4px}.signing-info p{margin:0;font-size:14px;line-height:1.8}
.signing-loading{padding:80px 24px;text-align:center}.signing-loading h2{font-size:24px}
.confirmed-signature{position:absolute;pointer-events:none;user-select:none}.confirmed-signature img{width:100%;height:100%;display:block}
.shared-signing .open-another,.shared-signing .editor-primary-tools button[aria-label="เพิ่มข้อความ"],.shared-signing .editor-primary-tools button[aria-label="เพิ่มวันที่"],.shared-signing .mark-picker-wrap,.shared-signing .properties-empty,.shared-signing .properties-panel>.panel-title{display:none}
.shared-signing .signature-library-panel>.button,.shared-signing .signature-library-panel>.field-help{display:none}.shared-signing .signature-library-panel{border-top:1px solid #e2e8f0}
.shared-signing-closed .signature-library-panel,.shared-signing-closed .signing-draft-section,.shared-signing-closed .editor-primary-tools,.shared-signing-closed .editor-history,.shared-signing-closed .editor-mobile-history{display:none}
.shared-signing .editor-status>span:last-child{display:none}
.signing-panel button:focus-visible,.signing-field input:focus-visible{outline:2px solid var(--editor-accent);outline-offset:3px}
@media(max-width:700px){.shared-signing .properties-panel{display:block!important;max-height:42dvh;overflow:auto}.signing-panel{padding:14px 16px}.signing-panel-title{display:inline-flex}.signing-state{margin:0 0 0 12px}.signing-draft-section{margin-top:12px;padding-top:12px}.signing-panel .button{min-height:44px}.signing-activity{grid-template-columns:1fr 1fr}.shared-signing .editor-header-actions{gap:4px}.shared-signing .header-preview{display:none}}
.signing-confirm-dialog p{white-space:pre-line;line-height:1.8;color:#52697c;font-size:14px}.signing-confirm-dialog h2{font-size:22px}
.signing-points{display:flex;flex-wrap:wrap;gap:4px}.signing-points .button{padding:4px 8px;font-size:12px;margin:0;min-height:36px}.signing-page-count{display:block;margin-top:4px;color:#246b48;font-size:11px}
@media(max-width:700px){.shared-signing .editor-mobile-history{display:none}.signing-points .button{min-height:44px}.shared-signing .editor-header-actions .button{padding:8px}}
@media(max-width:700px){.shared-signing-closed .editor-toolbar{display:none}}
.signature-object{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.signature-object:active{cursor:grabbing}.signature-object img{cursor:inherit;touch-action:none;-webkit-user-drag:none}
.signing-terminal .editor-app,.signing-terminal .landing{display:none!important}
.signing-outcome-main{max-width:720px;margin:0 auto;padding:72px 24px;text-align:center;min-height:65vh;display:flex;flex-direction:column;align-items:center;gap:20px}
.signing-outcome-main h2{font-size:clamp(26px,4vw,38px);line-height:1.4;margin:0;color:var(--ink,#182c40)}
.signing-outcome-main p{margin:0;line-height:1.8;color:#617386}.signing-outcome-icon{display:grid;place-items:center;width:80px;height:80px;border-radius:24px;background:#eaf5fc;color:#1688cd}.signing-outcome-icon svg{width:36px;height:36px}
.signing-outcome-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:8px}.signing-outcome-note{padding:12px 18px;background:#fff7e7;border-radius:12px}.signing-outcome-main [hidden]{display:none!important}
@media(max-width:600px){.signing-outcome-main{padding:48px 20px}.signing-outcome-actions{width:100%;flex-direction:column}.signing-outcome-actions .button{width:100%}}
