html.sign-only body > *:not(#sign-page) { display:none !important; }
html.sign-only #sign-page { display:flex !important; }
#sign-page {
  display:none; position:fixed; inset:0; z-index:99999;
  flex-direction:column; align-items:center; justify-content:center;
  background:#faf6ed;
  overflow-y:auto; font-family:'Assistant','Heebo',sans-serif; font-weight:800; direction:rtl;
}
#sign-page::before {
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.5' numOctaves='6' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='500' height='500' filter='url(%23a)' opacity='.06'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='turbulence' baseFrequency='.9' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23b)' opacity='.03'/%3E%3C/svg%3E");
}
#sign-page > * { position:relative; z-index:1; }
/* V1 card */
#sign-page .sp-card {
  width:calc(100% - 40px); max-width:480px;
  background:#faf6ec; border:1.5px solid #ddd0b4;
  clip-path:polygon(0 14px,14px 0,calc(100% - 14px) 0,100% 14px,100% calc(100% - 14px),calc(100% - 14px) 100%,14px 100%,0 calc(100% - 14px));
  position:relative; overflow:hidden;
  box-shadow:0 4px 24px rgba(10,8,0,.04),0 1px 3px rgba(10,8,0,.02);
}
#sign-page .sp-card::before { content:''; position:absolute; inset:7px; border:1px solid rgba(184,150,11,.1); pointer-events:none; z-index:1; }
#sign-page .sp-card::after { content:''; position:absolute; top:3px; right:3px; width:14px; height:14px; border-top:2px solid #b8960b; border-right:2px solid #b8960b; opacity:.2; pointer-events:none; z-index:1; }
#sign-page .sp-hdr {
  background:linear-gradient(135deg,#050400,#1a1408,#0d0a04);
  padding:14px 24px; position:relative;
}
#sign-page .sp-hdr::after { content:''; position:absolute; bottom:0; left:20%; right:20%; height:1px; background:linear-gradient(90deg,transparent,rgba(184,150,11,.15),transparent); }
#sign-page .sp-hdr-title { font-size:.72rem; font-weight:900; color:#b8960b; letter-spacing:2px; text-transform:uppercase; text-align:center; }
#sign-page .sp-body { padding:22px 24px; }
#sign-page .sp-doc-link {
  display:block; padding:14px;
  clip-path:polygon(0 5px,5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px));
  background:#faf6ec; border:1.5px solid #ddd0b4;
  color:#1e1810; text-decoration:none; font-size:.9rem; font-weight:900; text-align:center; margin-bottom:14px;
}
#sign-page .sp-doc-link:hover { background:rgba(184,150,11,.06); border-color:#b8960b; }
#sign-page .sp-name-input {
  width:100%; padding:12px 14px;
  clip-path:polygon(0 5px,5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px));
  border:1.5px solid #ddd0b4; background:#faf6ec;
  font-family:inherit; font-size:1rem; font-weight:800; color:#1e1810; box-sizing:border-box; margin-bottom:14px;
}
#sign-page .sp-pad-wrap {
  position:relative; width:100%; height:200px;
  border:2px dashed #ddd0b4;
  clip-path:polygon(0 8px,8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px));
  background:rgba(255,252,245,.6); margin-bottom:8px; touch-action:none; overflow:hidden;
}
#sign-page .sp-pad-wrap::after { content:''; position:absolute; bottom:20px; left:14%; right:14%; height:1px; background:linear-gradient(90deg,transparent,rgba(184,150,11,.15),transparent); pointer-events:none; }
#sign-page .sp-pad-wrap canvas { display:block; width:100%; height:100%; touch-action:none; cursor:crosshair; }
#sign-page .sp-pad-hint { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-size:.88rem; color:rgba(184,150,11,.3); pointer-events:none; font-weight:800; }
#sign-page .sp-actions { display:flex; gap:8px; margin-top:8px; }
#sign-page .sp-clear {
  flex:1; padding:12px;
  clip-path:polygon(0 5px,5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px));
  border:1.5px solid #ddd0b4; background:#faf6ec; color:#9a7a00;
  font-family:inherit; font-size:.82rem; font-weight:900; cursor:pointer;
}
#sign-page .sp-submit {
  flex:2; padding:12px; border:none;
  clip-path:polygon(0 5px,5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px));
  background:linear-gradient(135deg,#050400,#1a1408,#0d0a04); color:#b8960b;
  font-family:inherit; font-size:.85rem; font-weight:900; cursor:pointer;
  position:relative; overflow:hidden;
}
#sign-page .sp-submit::after { content:''; position:absolute; top:0; left:-100%; width:60%; height:100%; background:linear-gradient(90deg,transparent,rgba(184,150,11,.06),transparent); animation:sp-btnSh 6s ease-in-out infinite; }
@keyframes sp-btnSh { 0%,70%{left:-100%} 100%{left:200%} }
#sign-page .sp-submit:disabled { opacity:.5; cursor:not-allowed; }
/* Success */
#sign-page .sp-success { text-align:center; padding:30px; }
#sign-page .sp-success-seal {
  width:90px; height:90px; margin:0 auto;
  clip-path:polygon(0 8px,8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px));
  background:linear-gradient(135deg,#1a5a1a,#2e7d32,#1a5a1a);
  display:flex; align-items:center; justify-content:center;
  position:relative; box-shadow:0 6px 24px rgba(30,100,30,.15);
}
#sign-page .sp-success-seal::before { content:''; position:absolute; inset:5px; border:1px solid rgba(255,255,255,.15); pointer-events:none; }
#sign-page .sp-success-seal .ch { font-size:2.2rem; color:rgba(255,255,255,.9); }
#sign-page .sp-success-title { font-size:1.3rem; font-weight:900; color:transparent; margin-top:18px; background:linear-gradient(135deg,#1a5a1a,#2e7d32,#1a5a1a); -webkit-background-clip:text; background-clip:text; }
#sign-page .sp-success-text { font-size:.72rem; color:#9a7a00; margin-top:8px; }
/* Error */
#sign-page .sp-error-seal {
  width:70px; height:70px; margin:0 auto;
  clip-path:polygon(0 8px,8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px));
  background:linear-gradient(135deg,#7a1a1a,#dc2626,#7a1a1a);
  display:flex; align-items:center; justify-content:center; position:relative;
}
#sign-page .sp-error-seal::before { content:''; position:absolute; inset:4px; border:1px solid rgba(255,255,255,.12); pointer-events:none; }
#sign-page .sp-error-seal .ch { font-size:1.8rem; color:rgba(255,255,255,.85); }
