:root{--bg:#eef0ec;--panel:#fff;--ink:#171815;--muted:#6b7168;--line:#d9ddd4;--accent:#9bd60c;--accent-deep:#5c8a0b;--accent-soft:#eef8cd;--green:#5c8a0b;--red:#c43f3f;--shadow:0 14px 40px #1218261f}*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.form-success{color:var(--accent-deep);font-size:14px;font-weight:700}button,input,textarea{font:inherit}button{cursor:pointer}.login-screen{justify-content:center;align-items:center;min-height:100vh;padding:24px;display:flex}.login-panel{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:8px;gap:16px;width:100%;max-width:380px;padding:28px;display:grid}.login-mark{background:var(--accent-soft);color:var(--accent-deep);border-radius:8px;justify-content:center;align-items:center;width:48px;height:48px;display:flex}.eyebrow,.login-panel p,.brand-block p,.panel-head p{color:var(--muted);margin:0}.eyebrow{letter-spacing:0;text-transform:uppercase;font-size:12px;font-weight:700}.login-panel h1,.brand-block h1,.panel-head h2{margin:0}.login-panel h1{font-size:28px;line-height:1.1}.field-label{color:#343831;font-size:14px;font-weight:700}.password-input,.text-input,.text-area{border:1px solid var(--line);color:var(--ink);background:#fbfcfa;border-radius:8px;outline:none;width:100%}.password-input,.text-input{height:42px;padding:0 12px}.text-area{resize:vertical;min-height:120px;padding:10px 12px;line-height:1.45}.password-input:focus,.text-input:focus,.text-area:focus{border-color:var(--accent-deep);box-shadow:0 0 0 3px #9bd60c3d}.form-error{color:var(--red);font-size:14px}.primary-button,.ghost-button,.icon-button,.small-button,.danger-button,.status-button{border:0;border-radius:8px;justify-content:center;align-items:center;gap:7px;min-height:38px;padding:0 14px;font-weight:700;display:inline-flex}.primary-button{background:var(--accent);color:var(--ink)}.primary-button:disabled{cursor:not-allowed;opacity:.55}.primary-button.compact{min-height:34px}.ghost-button,.icon-button,.small-button{color:#2d312b;background:#f4f6f1}.icon-button{width:38px;padding:0}.danger-button{color:var(--red);background:#fff0f0}.review-shell{grid-template-rows:auto auto 1fr;height:100dvh;min-height:640px;display:grid;overflow:hidden}.topbar{border-bottom:1px solid var(--line);background:#ffffffeb;justify-content:space-between;align-items:center;gap:16px;padding:12px 16px;display:flex}.brand-block{align-items:center;gap:12px;min-width:240px;display:flex}.brand-logo-mark{border:1px solid var(--line);background:#fff;border-radius:8px;justify-content:center;align-items:center;width:108px;height:38px;padding:0 10px;display:inline-flex}.brand-logo-mark img{width:84px;height:auto;display:block}.brand-block h1{font-size:18px}.brand-block p,.panel-head p{font-size:13px}.topbar-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.segmented{border:1px solid var(--line);background:#edf0e9;border-radius:8px;padding:3px;display:flex}.segmented button{color:#3e443c;background:0 0;border:0;border-radius:6px;align-items:center;gap:7px;min-height:32px;padding:0 11px;font-weight:800;display:inline-flex}.segmented button.active{color:var(--accent-deep);background:#fff;box-shadow:0 1px 5px #00000014}.notice{color:#6b5413;background:#fff8e5;border-bottom:1px solid #ecdba6;justify-content:space-between;align-items:center;padding:10px 16px;display:flex}.notice button{color:inherit;background:0 0;border:0;align-items:center;display:inline-flex}.workspace{grid-template-columns:minmax(0,1fr);height:100%;min-height:0;display:grid}.workspace.panel-open{grid-template-columns:minmax(0,1fr) minmax(320px,360px)}.frame-wrap{background:#dfe4db;height:100%;min-height:calc(100dvh - 65px);position:relative;overflow:auto}.wireframe-frame{background:#f7f7f4;border:0;width:100%;height:100%}.marker-layer{pointer-events:none;position:absolute;inset:0}.marker-layer.can-comment{cursor:crosshair;pointer-events:auto}.marker-layer.can-touch-pan{cursor:grab}.marker{color:#fff;z-index:2;border:2px solid #fff;border-radius:999px;justify-content:center;align-items:center;width:28px;height:28px;font-size:12px;font-weight:900;display:inline-flex;position:absolute;transform:translate(-50%,-50%);box-shadow:0 4px 14px #00000040}.marker.open{background:var(--accent);color:var(--ink)}.marker.resolved{background:var(--green)}.marker.active{outline:4px solid #9bd60c57}.marker.draft{background:var(--red);border-color:#fff}.comment-panel{background:var(--panel);border-left:1px solid var(--line);flex-direction:column;min-height:0;padding:16px;display:none;overflow:auto}.workspace.panel-open .comment-panel{display:flex}.panel-head{justify-content:space-between;align-items:center;margin-bottom:14px;display:flex}.panel-head h2{font-size:17px}.editor-card,.empty-panel{border:1px solid var(--line);border-radius:8px;gap:10px;margin-bottom:14px;padding:12px;display:grid}.editor-card h3{margin:0;font-size:15px}.editor-actions,.detail-title{justify-content:space-between;align-items:center;gap:8px;display:flex}.status-button.open{background:var(--accent-soft);color:var(--accent-deep)}.status-button.resolved{color:var(--green);background:#eaf7ef}.empty-panel{color:var(--muted);text-align:center;place-items:center;min-height:148px}.empty-panel p{margin:0}.comment-list{gap:8px;display:grid}.comment-row{color:inherit;text-align:left;background:#f8faf5;border:1px solid #0000;border-radius:8px;grid-template-columns:10px 1fr;align-items:flex-start;gap:9px;padding:10px;display:grid}.comment-row.selected{background:var(--accent-soft);border-color:#5c8a0b40}.comment-row strong,.comment-row small,.comment-row span span{display:block}.comment-row strong{font-size:13px}.comment-row small{color:var(--muted);margin:2px 0 6px;font-size:12px}.comment-row span span{color:#373c34;-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:13px;line-height:1.35;display:-webkit-box;overflow:hidden}.status-dot{border-radius:999px;width:10px;height:10px;margin-top:3px}.status-dot.open{background:var(--accent)}.status-dot.resolved{background:var(--green)}@media (max-width:900px){.review-shell{height:100dvh;min-height:0}.topbar{flex-wrap:wrap;align-items:flex-start}.workspace{grid-template-columns:minmax(0,1fr);min-height:0;display:grid}.workspace.panel-open{grid-template-rows:minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr)}.topbar-actions{justify-content:flex-start;margin-top:12px}.frame-wrap{height:100%;min-height:0;overflow:hidden}.wireframe-frame{touch-action:none}.comment-panel{border-left:0;border-top:1px solid var(--line);max-height:44dvh}.workspace:not(.panel-open) .comment-panel{display:none}}@media (pointer:coarse){.marker-layer.can-touch-pan{pointer-events:auto;touch-action:none}.marker-layer.can-touch-pan .marker{pointer-events:none}}.signing-admin-page,.signing-page,.signing-complete-page{background:#f5f7f1;min-height:100dvh}.signing-admin-header,.signing-public-header{border-bottom:1px solid var(--line);z-index:10;background:#fffffff0;justify-content:space-between;align-items:center;gap:16px;padding:14px 18px;display:flex;position:sticky;top:0}.signing-brand{align-items:center;gap:14px;min-width:0;display:flex}.signing-brand img{border:1px solid var(--line);object-fit:contain;background:#fff;border-radius:8px;width:112px;height:42px;padding:8px;display:block}.signing-brand h1{margin:0;font-size:22px;line-height:1.1}.signing-admin-grid{grid-template-columns:minmax(360px,.86fr) minmax(420px,1.14fr);gap:18px;max-width:1480px;margin:0 auto;padding:18px;display:grid}.signing-panel,.signer-card,.package-card,.signature-panel{border:1px solid var(--line);background:#fff;border-radius:8px;box-shadow:0 10px 28px #12182612}.signing-panel{gap:14px;padding:18px;display:grid}.panel-head{align-items:center;gap:10px;display:flex}.signing-panel .panel-head,.signature-panel .panel-head{justify-content:flex-start;max-width:100%}.signing-panel .panel-head>div,.signature-panel .panel-head>div{flex:0 auto;min-width:0}.panel-head svg{color:var(--accent-deep);flex:none}.signer-form-grid{gap:10px;display:grid}.signer-form-card{border:1px solid var(--line);background:#f8faf4;border-radius:8px;gap:9px;padding:12px;display:grid}.signer-form-card h3,.package-card h3,.signer-card h2{margin:0}.packages-panel{align-content:start}.package-list{gap:12px;display:grid}.package-card{gap:12px;padding:14px;display:grid}.package-card-top{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.package-card-top p,.signer-card p,.empty-note{color:var(--muted);margin:3px 0 0}.status-pill{white-space:nowrap;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800}.status-draft{background:#eef0e9}.status-sent{background:var(--accent-soft);color:var(--accent-deep)}.status-completed{color:#23723a;background:#e7f7ea}.status-expired{color:var(--red);background:#fff0f0}.signer-status-list{gap:8px;display:grid}.signer-status-list div{background:#f8faf4;border-radius:8px;grid-template-columns:110px minmax(0,1fr) auto;align-items:center;gap:6px;padding:8px 10px;display:grid}.signer-status-list span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.signer-status-list em{color:var(--muted);font-style:normal;font-weight:700}.document-hash-list{gap:6px;display:grid}.document-hash-list details{border-top:1px solid var(--line);padding-top:7px}.document-hash-list summary{cursor:pointer;font-weight:700}.document-hash-list code{color:var(--muted);overflow-wrap:anywhere;margin-top:6px;font-size:11px;display:block}.package-actions,.signature-actions{flex-wrap:wrap;gap:8px;display:flex}.disabled-link{opacity:.45;pointer-events:none}.signing-alert{border-radius:8px;width:calc(100% - 36px);max-width:1480px;margin:14px auto 0;padding:10px 14px;font-weight:700}.signing-alert.error{color:var(--red);background:#fff0f0}.signing-alert.success{background:var(--accent-soft);color:var(--accent-deep)}.signing-workspace{grid-template-columns:320px minmax(0,1fr);gap:14px;height:calc(100dvh - 72px);padding:14px;display:grid}.signing-side{grid-auto-rows:max-content;gap:12px;min-width:0;padding-bottom:14px;display:grid;overflow:auto}.signer-card{padding:16px}.progress-line{align-items:baseline;gap:5px;margin-top:14px;display:flex}.progress-line span{font-size:34px;font-weight:850}.progress-line em{color:var(--muted);font-style:normal}.signed-badge{color:#23723a;background:#e7f7ea;border-radius:8px;align-items:center;gap:7px;margin-top:12px;padding:8px 10px;font-weight:800;display:inline-flex}.compact-panel{box-shadow:none}.otp-input{text-align:center}.document-list{gap:7px;display:grid}.document-tab{border:1px solid var(--line);color:var(--ink);text-align:left;background:#fff;border-radius:8px;align-items:center;gap:9px;min-height:42px;padding:0 11px;display:flex}.document-tab.active{border-color:var(--accent);box-shadow:0 0 0 3px #9bd60c2e}.document-tab:disabled{cursor:not-allowed;opacity:.5}.full-button{width:100%}.signing-main{grid-template-rows:minmax(0,1fr) auto;gap:12px;min-width:0;min-height:0;display:grid}.pdf-frame-wrap{border:1px solid var(--line);background:#dfe3da;border-radius:8px;grid-template-rows:auto minmax(0,1fr);min-height:0;display:grid;overflow:hidden}.pdf-toolbar{border-bottom:1px solid var(--line);background:#fff;justify-content:space-between;align-items:center;gap:10px;min-width:0;padding:10px;display:flex}.pdf-toolbar strong{text-overflow:ellipsis;white-space:nowrap;min-width:0;display:block;overflow:hidden}.pdf-viewer{min-height:0;padding:10px;position:relative;overflow:auto}.pdf-pages{justify-items:center;gap:12px;display:grid}.pdf-page-canvas{background:#fff;max-width:100%;height:auto;display:block;box-shadow:0 8px 24px #12182629}.pdf-viewer-message{border:1px solid var(--line);color:var(--muted);text-align:center;z-index:2;background:#ffffffeb;border-radius:8px;width:max-content;padding:8px 12px;font-weight:800;position:sticky;top:10px;left:50%;transform:translate(-50%)}.pdf-viewer-message.error{color:var(--red);background:#fff0f0}.locked-documents,.signing-loading,.signing-complete-page{color:var(--muted);text-align:center;justify-content:center;align-items:center;min-height:320px;display:flex}.locked-documents{flex-direction:column;gap:10px;height:100%}.signature-panel{gap:10px;padding:14px;display:grid}.signature-canvas{touch-action:none;background:#fbfcfa;border:1px dashed #aeb7a8;border-radius:8px;width:100%;height:160px;display:block}.consent-row{color:#343831;align-items:flex-start;gap:9px;line-height:1.35;display:flex}.consent-row input{margin-top:3px}.complete-panel{text-align:center;max-width:420px}.complete-panel img{justify-self:center;width:128px;height:auto}.complete-panel h1,.complete-panel p{margin:0}@media (max-width:980px){.signing-admin-grid,.signing-workspace{grid-template-columns:minmax(0,1fr)}.signing-workspace{height:auto}.signing-main{grid-template-rows:62dvh auto}}@media (max-width:640px){.signing-admin-header{flex-direction:column;align-items:flex-start}.signing-page .signing-public-header{display:none}.signing-brand img{width:96px}.signing-admin-grid,.signing-workspace{padding:10px}.signer-status-list div{grid-template-columns:minmax(0,1fr)}.package-card-top,.signature-actions,.package-actions{flex-direction:column;align-items:stretch}.signing-main{grid-template-rows:min(68dvh,720px) auto}.signing-workspace{gap:10px}.signing-side{padding-bottom:0;overflow:visible}.signer-card,.signature-panel,.signing-panel{padding:12px}.pdf-toolbar{flex-direction:column;align-items:stretch}.pdf-toolbar .ghost-button{width:100%}.pdf-viewer{padding:8px}.compact-panel>.panel-head,.signature-panel>.panel-head{justify-content:flex-start;align-items:flex-start;gap:8px;width:fit-content}.compact-panel>.panel-head>div,.signature-panel>.panel-head>div{flex:none}}
