/* ============ وثّق — صفحات التطبيق (رفع / إدارة / توقيع) ============ */
@font-face { font-family: 'Aref Ruqaa'; font-weight: 700; font-display: swap; src: url(/vendor/fonts/aref/aref-ruqaa-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Aref Ruqaa'; font-weight: 700; font-display: swap; src: url(/vendor/fonts/aref/aref-ruqaa-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+2000-206F; }
@font-face { font-family: 'Dancing Script'; font-weight: 700; font-display: swap; src: url(/vendor/fonts/dancing/dancing-script-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+2000-206F; }

body.app { background: radial-gradient(1000px 520px at 85% -8%, #e4defe 0%, transparent 60%), radial-gradient(800px 480px at -5% 8%, #d9f1ff 0%, transparent 55%), var(--bg); background-attachment: fixed; min-height: 100dvh; }

.app-head {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px;
  padding: 9px clamp(14px, 3vw, 28px); background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.3rem; letter-spacing: -.2px; }
.brand img { border-radius: 11px; box-shadow: 0 6px 16px rgba(80, 90, 240, .35); }
.app-head .mid { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.app-head .mid .doc-title { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.app-head-end { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }

/* ============ صفحة الرفع ============ */
.up-wrap { max-width: 1080px; margin: 0 auto; padding: clamp(22px, 4vw, 46px) 18px 90px; display: grid; gap: 26px; }
.up-hero { text-align: center; display: grid; gap: 10px; justify-items: center; }
.up-hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); font-weight: 900; line-height: 1.25; letter-spacing: -.5px; }
.up-hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.up-hero p { color: var(--ink-2); max-width: 56ch; }
.steps { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; color: var(--ink-3); font-weight: 700; font-size: .9rem; }
.steps b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: .85rem; margin-inline-end: 6px; }
.steps span { display: inline-flex; align-items: center; }
.steps i { width: 26px; height: 2px; background: var(--line); border-radius: 2px; }

.up-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 880px) { .up-grid { grid-template-columns: 1fr; } }

.drop {
  position: relative; display: grid; place-items: center; text-align: center; gap: 12px; min-height: 330px; padding: 30px 22px;
  border-radius: 26px; background: #fff; cursor: pointer; isolation: isolate; transition: transform .25s var(--ease), box-shadow .25s;
  box-shadow: var(--shadow);
}
.drop::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2.5px; z-index: -1;
  background: linear-gradient(120deg, #6c5ce7, #00c2ff, #6c5ce7); background-size: 250% 100%; animation: borderRun 5s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .55;
}
@keyframes borderRun { to { background-position: -250% 0; } }
.drop:hover, .drop.over { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.drop.over::before { opacity: 1; }
.drop h3 { font-size: 1.3rem; font-weight: 800; }
.drop p { color: var(--ink-2); font-size: .95rem; }
.drop .or { color: var(--ink-3); font-size: .85rem; }
.drop-art { position: relative; width: 120px; height: 120px; perspective: 600px; margin-bottom: 4px; }
.drop-art i { position: absolute; inset: 10px 22px; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(60, 70, 160, .22); border: 1px solid var(--line); transform-style: preserve-3d; }
.drop-art i:nth-child(1) { transform: rotateY(-24deg) rotateX(8deg) translateZ(-30px) translateX(24px); background: #e9e5ff; }
.drop-art i:nth-child(2) { transform: rotateY(-24deg) rotateX(8deg) translateZ(-10px) translateX(12px); background: #dff4ff; }
.drop-art i:nth-child(3) { transform: rotateY(-24deg) rotateX(8deg); display: grid; place-items: center; color: var(--brand); animation: floaty 3.4s ease-in-out infinite; }
.drop-art i:nth-child(3)::before { content: ''; position: absolute; inset: 18px 14px auto; height: 7px; border-radius: 4px; background: #e3e7f6; box-shadow: 0 14px 0 #e3e7f6, 0 28px 0 #e3e7f6; }
.drop-art i:nth-child(3) svg { width: 30px; height: 30px; margin-top: 56px; stroke-width: 2.4; }
@keyframes floaty { 50% { transform: rotateY(-24deg) rotateX(8deg) translateY(-8px); } }

.file-card { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; }
.file-card canvas { width: 112px; height: auto; border-radius: 8px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.file-card .meta { display: grid; gap: 4px; min-width: 0; }
.file-card .meta b { overflow-wrap: anywhere; font-size: 1.02rem; }
.file-card .meta span { color: var(--ink-2); font-size: .88rem; display: flex; gap: 12px; flex-wrap: wrap; }

.form-stack { display: grid; gap: 16px; }
.divider { height: 1px; background: var(--line); margin: 2px 0; }
.meter { display: flex; gap: 4px; margin-top: 2px; }
.meter i { flex: 1; height: 5px; border-radius: 4px; background: #e6e9f6; transition: background .3s; }
.meter[data-s="1"] i:nth-child(-n+1) { background: #ef4444; }
.meter[data-s="2"] i:nth-child(-n+2) { background: #f59e0b; }
.meter[data-s="3"] i:nth-child(-n+3) { background: #84cc16; }
.meter[data-s="4"] i:nth-child(-n+4) { background: #10b981; }
.collapse { display: grid; gap: 10px; padding: 14px; margin-top: 4px; border-radius: 14px; background: #f7f8fd; border: 1px dashed #d4daf1; }

.err-box { background: var(--danger-soft); color: #b42318; padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: .92rem; }
.upload-bar { height: 8px; border-radius: 8px; background: #e6e9f6; overflow: hidden; }
.upload-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }

.recent { display: grid; gap: 8px; }
.recent a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-radius: 14px; border: 1px solid var(--line); font-weight: 600; transition: .2s; }
.recent a:hover { border-color: var(--brand); transform: translateX(-3px); }
.recent a small { color: var(--ink-3); margin-inline-start: auto; font-weight: 500; }

/* ============ العارض والحقول (مشترك) ============ */
.viewer { background: #e5e8f4; border-radius: 22px; padding: clamp(10px, 2.2vw, 26px); min-height: 60dvh; position: relative; }
.pages { display: grid; gap: 22px; justify-items: center; }
.pg { position: relative; width: 100%; max-width: 900px; background: #fff; box-shadow: 0 6px 26px rgba(30, 40, 100, .16); border-radius: 4px; overflow: hidden; }
.pg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pg .ov { position: absolute; inset: 0; pointer-events: none; }
.pg-num { position: absolute; bottom: 8px; inset-inline-start: 10px; background: rgba(10, 16, 48, .6); color: #fff; padding: 1px 10px; border-radius: 99px; font-size: .72rem; font-weight: 700; pointer-events: none; opacity: .8; }
.viewer-load { display: grid; place-items: center; gap: 12px; min-height: 50dvh; color: var(--ink-2); font-weight: 700; }

.fbox {
  position: absolute; pointer-events: auto; border: 2px dashed var(--brand); background: rgba(108, 92, 231, .09);
  border-radius: 8px; display: grid; place-items: center; text-align: center; touch-action: none; user-select: none;
  transition: box-shadow .2s, background .2s; container-type: size;
}
.fbox .fl { font-weight: 800; color: var(--brand); font-size: clamp(8px, 28cqh, 15px); line-height: 1.2; padding: 0 6px; pointer-events: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.fbox .fl svg { width: 1.1em; height: 1.1em; }
.fbox.edit { cursor: grab; }
.fbox.edit:active { cursor: grabbing; }
.fbox.sel { border-style: solid; background: rgba(108, 92, 231, .16); box-shadow: 0 0 0 4px rgba(108, 92, 231, .2), 0 8px 24px rgba(60, 70, 180, .25); z-index: 5; }
.fbox .x, .fbox .rz { position: absolute; display: none; }
.fbox.sel .x, .fbox.sel .rz { display: grid; }
.fbox .x { top: -13px; inset-inline-start: -13px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; place-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); cursor: pointer; padding: 0; }
.fbox .x svg { width: 14px; height: 14px; }
.fbox .rz { bottom: -9px; right: -9px; width: 20px; height: 20px; border-radius: 6px; background: var(--brand); border: 3px solid #fff; cursor: nwse-resize; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); touch-action: none; }
.fbox.signed { border: 2px solid var(--mint); background: rgba(16, 185, 129, .07); }
.fbox.signed img, .sigimg img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; display: block; }
.fbox.signed .who { position: absolute; bottom: -1px; inset-inline-end: -1px; background: var(--mint); color: #fff; font-size: 10px; font-weight: 800; padding: 0 7px; border-radius: 6px 0 6px 0; line-height: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbox.todo { cursor: pointer; border-color: var(--brand); background: rgba(108, 92, 231, .12); animation: todoPulse 2.2s infinite; }
.fbox.todo:hover { background: rgba(108, 92, 231, .22); }
.fbox.todo .fl { color: var(--brand); }
@keyframes todoPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, .45); } 60% { box-shadow: 0 0 0 10px rgba(108, 92, 231, 0); } }
.fbox.flash { animation: flash 1s; }
@keyframes flash { 30% { box-shadow: 0 0 0 14px rgba(108, 92, 231, .35); background: rgba(108, 92, 231, .3); } }
.fbox.locked-view { cursor: default; animation: none; }
.sigimg { position: absolute; pointer-events: auto; }
.sigimg .x { position: absolute; top: -12px; inset-inline-start: -12px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.sigimg .x svg { width: 13px; height: 13px; }
.sigimg.mine { outline: 1.5px dashed rgba(16, 185, 129, .6); outline-offset: 2px; border-radius: 4px; }

.add-mode .pg .ov { pointer-events: auto; cursor: crosshair; }
.add-mode .pg { outline: 2px dashed rgba(108, 92, 231, .35); outline-offset: 4px; }
.mode-banner { position: sticky; top: 64px; z-index: 30; margin: 0 auto 14px; width: fit-content; max-width: 100%; background: var(--navy); color: #fff; padding: 9px 18px; border-radius: 99px; font-weight: 700; font-size: .92rem; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); }
.mode-banner button { background: rgba(255, 255, 255, .15); border: 0; color: #fff; padding: 3px 12px; border-radius: 99px; font-weight: 700; }

/* ============ لوحة الإدارة ============ */
.mg { display: grid; grid-template-columns: 410px minmax(0, 1fr); gap: 22px; max-width: 1560px; margin: 0 auto; padding: 22px clamp(12px, 2.4vw, 28px) 80px; align-items: start; }
.mg-side { display: grid; gap: 16px; position: sticky; top: 74px; max-height: calc(100dvh - 90px); overflow-y: auto; padding: 2px 4px 20px 2px; scrollbar-width: thin; }
@media (max-width: 1000px) { .mg { grid-template-columns: 1fr; } .mg-side { position: static; max-height: none; overflow: visible; } }

.status-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), #e6e9f6 0); display: grid; place-items: center; position: relative; transition: background .5s; }
.ring::before { content: ''; position: absolute; inset: 9px; background: #fff; border-radius: 50%; }
.ring b { position: relative; font-size: 1.15rem; font-weight: 900; }
.ring.ok { background: conic-gradient(var(--mint) calc(var(--p) * 1%), #e6e9f6 0); }
.kv { display: grid; gap: 3px; font-size: .9rem; color: var(--ink-2); }
.kv b { color: var(--ink); }

.link-box { display: flex; gap: 8px; }
.link-box .input { direction: ltr; text-align: left; font-size: .9rem; background: #f7f8fd; }
.share-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.qr { background: #fff; padding: 10px; border-radius: 14px; border: 1px solid var(--line); width: fit-content; margin: 12px auto 0; }
.qr svg { width: 150px; height: 150px; }

.fl-list { display: grid; gap: 8px; margin-top: 12px; }
.fl-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: .2s; }
.fl-item.sel { border-color: var(--brand); background: #faf9ff; }
.fl-item .n { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 800; display: grid; place-items: center; font-size: .85rem; flex: none; }
.fl-item.done .n { background: var(--mint-soft); color: #067a56; }
.fl-item input { flex: 1; min-width: 0; border: 0; background: none; padding: 4px 2px; font-weight: 600; }
.fl-item input:focus { outline: none; }
.fl-item .pgtag { font-size: .75rem; color: var(--ink-3); white-space: nowrap; }
.icon-btn { width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-3); display: grid; place-items: center; flex: none; padding: 0; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn.del:hover { background: var(--danger-soft); color: var(--danger); }
.empty { text-align: center; color: var(--ink-3); padding: 14px 6px; font-size: .92rem; }
.dirty-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--gold-soft); color: #8a5a00; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: .9rem; margin-top: 12px; }

.sg-list { display: grid; gap: 8px; }
.sg-item { display: grid; grid-template-columns: 38px 1fr 74px auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; }
.sg-item .nm { display: grid; line-height: 1.35; min-width: 0; }
.sg-item .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-item .nm small { color: var(--ink-3); font-size: .78rem; }
.sg-item img { width: 74px; height: 34px; object-fit: contain; }

.final-box { display: grid; gap: 12px; }
.final-box .note { font-size: .88rem; color: var(--ink-2); line-height: 1.7; }
.hash { direction: ltr; text-align: left; font-family: ui-monospace, Menlo, monospace; font-size: .72rem; word-break: break-all; background: #f7f8fd; border-radius: 10px; padding: 8px 10px; color: var(--ink-2); }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; font-weight: 700; }
.banner.ok { background: var(--mint-soft); color: #067a56; }
.banner.brand { background: var(--brand-soft); color: var(--brand); }
.banner .ico { width: 26px; height: 26px; }
.danger-zone { border: 1px dashed #f3b4b4; background: #fffafa; }

/* ============ بوابة كلمة المرور ============ */
.gate-card { width: min(440px, 100%); display: grid; gap: 16px; text-align: center; padding: 30px 26px; border-radius: 26px; box-shadow: var(--shadow-lg); background: #fff; animation: popIn .5s var(--ease); }
.gate-ico { width: 74px; height: 74px; border-radius: 24px; margin: 0 auto; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 14px 34px rgba(80, 90, 240, .45); animation: floaty2 3s ease-in-out infinite; }
.gate-ico svg { width: 34px; height: 34px; }
@keyframes floaty2 { 50% { transform: translateY(-6px) rotate(-3deg); } }
.gate-card h1 { font-size: 1.4rem; font-weight: 900; }
.gate-card p { color: var(--ink-2); font-size: .95rem; }
.gate-card form { display: grid; gap: 12px; text-align: start; }

/* ============ صفحة التوقيع ============ */
.sign-wrap { max-width: 980px; margin: 0 auto; padding: 18px clamp(10px, 2.4vw, 24px) 130px; display: grid; gap: 16px; }
.sign-top { display: grid; gap: 10px; }
.sign-top h1 { font-size: clamp(1.2rem, 3.4vw, 1.7rem); font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; }
.sign-top .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--ink-2); font-size: .9rem; }
.sbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50; padding: 10px clamp(10px, 2.4vw, 24px) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(16px); border-top: 1px solid var(--line); box-shadow: 0 -10px 40px rgba(20, 30, 90, .1);
}
.sbar-in { max-width: 980px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.sbar .prog { flex: 1; min-width: 0; display: grid; gap: 6px; }
.sbar .prog small { font-weight: 700; color: var(--ink-2); display: flex; justify-content: space-between; }
.sbar .acts { display: flex; gap: 8px; }
@media (max-width: 560px) { .sbar-in { flex-wrap: wrap; } .sbar .acts { width: 100%; } .sbar .acts .btn { flex: 1; padding-inline: 12px; } }

.ghost { position: absolute; pointer-events: auto; touch-action: none; cursor: grab; border: 2px solid var(--brand); border-radius: 8px; background: rgba(108, 92, 231, .08); box-shadow: 0 10px 30px rgba(60, 70, 180, .3); z-index: 20; }
.ghost img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; display: block; }
.ghost .rz { position: absolute; bottom: -10px; right: -10px; width: 22px; height: 22px; border-radius: 7px; background: var(--brand); border: 3px solid #fff; cursor: nwse-resize; touch-action: none; }
.place-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: grid; gap: 10px; justify-items: center; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--navy); color: #fff; }
.place-bar p { font-weight: 700; font-size: .95rem; text-align: center; }
.place-bar .pb-acts { display: flex; gap: 10px; width: min(520px, 100%); }
.place-bar .pb-ok { flex: 1; justify-content: center; min-height: 54px; font-size: 1.08rem; font-weight: 800; animation: pbGlow 1.8s ease-in-out infinite; }
.place-bar .pb-x { color: #fff; border-color: rgba(255, 255, 255, .35); min-height: 54px; }
@keyframes pbGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } }

.done-hero { text-align: center; display: grid; gap: 10px; justify-items: center; }
.done-hero .badge { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #10b981, #34d399); color: #fff; box-shadow: 0 16px 40px rgba(16, 185, 129, .45); animation: badgePop .7s var(--ease); }
.done-hero .badge svg { width: 44px; height: 44px; stroke-width: 3; }
@keyframes badgePop { 0% { transform: scale(.3) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.12) rotate(4deg); } }
.confetti { position: fixed; top: -20px; width: 10px; height: 16px; z-index: 150; border-radius: 2px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); opacity: .9; } }

/* ============ نافذة التوقيع ============ */
.sig-modal h3 { font-size: 1.3rem; }
.sig-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #f0f2fa; padding: 5px; border-radius: 14px; margin: 14px 0 12px; }
.sig-tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 6px; border: 0; background: none; border-radius: 10px; font-weight: 700; color: var(--ink-2); transition: .2s; }
.sig-tab.on { background: #fff; color: var(--brand); box-shadow: 0 4px 12px rgba(30, 40, 100, .12); }
.pad { position: relative; aspect-ratio: 3 / 1; border: 2px dashed #c9cff0; border-radius: 16px; background: #fff; overflow: hidden; touch-action: none; display: block; }
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.pad.typed canvas { cursor: default; }
.pad.img { cursor: pointer; touch-action: auto; background: repeating-conic-gradient(#f3f5fb 0% 25%, #fff 0% 50%) 0 0 / 18px 18px; }
.pad-base { position: absolute; inset-inline: 7%; bottom: 25%; border-bottom: 2px solid #dfe3f5; pointer-events: none; }
.pad-x { position: absolute; inset-inline-start: 3.5%; bottom: 26%; color: #c3c9e6; font-style: normal; font-size: 1.5rem; line-height: 1; pointer-events: none; }
.pad-hint { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #aab1cf; font-weight: 700; pointer-events: none; transition: opacity .25s; }
.pad-hint svg { width: 26px; height: 26px; }
.pad-hint.gone { opacity: 0; }
.pad-tools { display: flex; gap: 8px; margin-top: 10px; }
.sig-opts { display: grid; gap: 10px; margin-top: 14px; }
.colors { display: flex; gap: 10px; align-items: center; }
.color-dot { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px #d4daf1; padding: 0; transition: transform .2s; }
.color-dot.on { box-shadow: 0 0 0 3px var(--brand); transform: scale(1.1); }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.fonts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.font-chip { padding: 6px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 1.15rem; }
.font-chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.sig-panel { min-height: 120px; }

@media (max-width: 640px) {
  .sg-item { grid-template-columns: 38px 1fr auto; } .sg-item img { display: none; }
  .file-card { grid-template-columns: 84px 1fr; } .file-card canvas { width: 84px; }
}

/* ============ إضافات ============ */
.placing .pg .ov { pointer-events: auto; cursor: copy; }
.placing .pg { outline: 2px dashed rgba(108, 92, 231, .4); outline-offset: 4px; }
.fbox.todo .fl { gap: 6px; }
@media (max-width: 560px) { .hide-sm { display: none; } .app-head .mid .doc-title { max-width: 18ch; } }

/* ===== رابط مشاركة احترافي + حالة الاطلاع ===== */
.short-link { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 16px; background: linear-gradient(135deg, #f1efff, #eaf6ff); border: 1px solid #dcd8ff; }
.short-link .sl-ico { color: var(--brand); display: grid; place-items: center; }
.short-link .sl-url { flex: 1; min-width: 0; direction: ltr; text-align: left; font-weight: 800; font-size: 1.02rem; letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1b1f3b; unicode-bidi: isolate; }
.invite { margin-top: 12px; border: 1px dashed #cfd5ee; border-radius: 14px; background: #fafbff; }
.invite-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 0; font-size: .86rem; }
.invite-t { margin: 0; padding: 6px 14px 12px; white-space: pre-wrap; word-break: break-word; font: 500 .86rem/1.8 inherit; font-family: inherit; color: var(--ink-2, #3b4160); }
.view-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.view-stats div { background: #f7f8fd; border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; display: grid; gap: 2px; }
.view-stats b { font-size: 1.5rem; line-height: 1.1; }
.view-stats small { color: var(--ink-3); font-size: .76rem; }
.view-stats .on b { color: #10a37f; }
.limit-row { display: grid; gap: 8px; margin: 12px 0; padding: 12px; border-radius: 14px; background: #f7f8fd; border: 1px solid var(--line); }
.limit-row label { display: grid; line-height: 1.5; } .limit-row label span { color: var(--ink-3); font-size: .8rem; }
.limit-in { display: flex; gap: 8px; } .limit-in .input { flex: 1; min-width: 0; }
.vw-list { display: grid; gap: 8px; max-height: 330px; overflow: auto; }
.vw-item { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.vw-item .nm { display: grid; line-height: 1.35; min-width: 0; } .vw-item .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vw-item .nm small { color: var(--ink-3); font-size: .78rem; }
.vw-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd0e6; } .vw-dot.on { background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.18); }
.banner.warn { background: #fff6e5; color: #8a5a00; border-color: #ffe2a8; }

.done-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.done-meta span { background: #f1f3fb; border-radius: 999px; padding: 5px 12px; font-size: .84rem; color: var(--ink-2, #3b4160); }

/* ===== تبويب التوقيع بالصورة ===== */
.photo-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.photo-steps li { display: flex; gap: 10px; align-items: center; font-size: .88rem; color: var(--ink-2, #3b4160); }
.photo-steps b { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: .78rem; flex: none; }
.photo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.photo-btns .btn { cursor: pointer; justify-content: center; }
.pad.checker { background: conic-gradient(#eef0f8 25%, #fff 0 50%, #eef0f8 0 75%, #fff 0) 0 0 / 16px 16px; }
.tune { display: grid; gap: 6px; margin-top: 10px; } .tune.dim .tune-r { opacity: .4; pointer-events: none; }
.tune-r { display: flex; align-items: center; gap: 10px; } .tune-r input { flex: 1; accent-color: var(--brand); } .tune-r small { color: var(--ink-3); }

/* ===== تجربة الموقّع: بطاقة الترحيب والمهلة والحقول المقفلة ===== */
.intro { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 22px; background: linear-gradient(135deg, #f1efff, #e9f6ff); border: 1px solid #dcd8ff; box-shadow: 0 10px 30px rgba(80, 70, 200, .08); }
.intro.ok { background: linear-gradient(135deg, #eafaf3, #effaff); border-color: #bfeedd; }
.intro.bad { background: linear-gradient(135deg, #fff3f0, #fff8ea); border-color: #ffd5cc; }
.intro .in-ico, .intro .in-av { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 900; font-size: 1.3rem; box-shadow: 0 8px 20px rgba(80, 70, 220, .3); }
.intro.ok .in-ico { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 8px 20px rgba(16, 185, 129, .3); }
.intro.bad .in-ico { background: linear-gradient(135deg, #f97316, #ef4444); box-shadow: 0 8px 20px rgba(239, 68, 68, .3); }
.intro .in-ico svg { width: 24px; height: 24px; }
.intro .in-t h2 { font-size: 1.12rem; font-weight: 900; line-height: 1.3; }
.intro .in-t p { margin-top: 3px; color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.intro .in-cta { grid-column: 1 / -1; justify-content: center; min-height: 50px; font-size: 1.02rem; }
.dl-chip { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.dl-chip > span { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.dl-chip div { display: grid; line-height: 1.4; } .dl-chip small { color: var(--ink-3); font-size: .8rem; }
.dl-chip.soon > span { background: var(--gold-soft); color: #a46b00; } .dl-chip.soon b { color: #a46b00; }
.dl-chip.over > span { background: #ffe9e5; color: #d6361f; } .dl-chip.over b { color: #d6361f; }
.fbox.locked-other { cursor: not-allowed; animation: none; border-style: dashed; border-color: #c4c8dc; background: repeating-linear-gradient(135deg, rgba(150,155,190,.12) 0 8px, rgba(150,155,190,.04) 8px 16px); }
.fbox.locked-other .fl { color: #7c829e; font-weight: 700; }
.fbox.todo.mine { border-color: #10b981; background: rgba(16, 185, 129, .1); animation-name: todoPulseMint; }
.fbox.todo.mine .fl { color: #067a56; }
@keyframes todoPulseMint { 0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.4); } 50% { box-shadow: 0 0 0 9px rgba(16,185,129,0); } }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: inherit; font-size: .82rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; cursor: pointer; }
.chip-btn svg { width: 15px; height: 15px; }
.sbar .acts { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .intro { padding: 14px; gap: 12px; border-radius: 20px; }
  .sign-wrap { gap: 12px; padding-bottom: 150px; }
  .sbar-in { flex-direction: column; align-items: stretch; gap: 10px; }
  .sbar .acts { display: grid; grid-template-columns: 1fr; }
  .sbar .acts .btn { width: 100%; justify-content: center; min-height: 48px; }
}

/* ===== المستهدفون + الإعدادات + تبويبات الجوال ===== */
.rc-list { display: grid; gap: 10px; margin-top: 10px; }
.rc-item { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #fff; display: grid; gap: 10px; }
.rc-item.off { opacity: .6; }
.rc-h { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.rc-h .nm { display: grid; line-height: 1.35; min-width: 0; } .rc-h .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rc-h .nm small { color: var(--ink-3); font-size: .78rem; }
.rc-f { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-fc { font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #f1f3fb; color: var(--ink-2); }
.rc-fc.done { background: var(--mint-soft); color: #067a56; }
.rc-a { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-danger { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.chk-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.chk-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.chk-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; min-height: 48px; }
.chk-row:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.chk-row.dis { opacity: .55; cursor: default; } .chk-row .nm { flex: 1; font-weight: 700; font-size: .92rem; } .chk-row small { color: var(--ink-3); }
.chk-row input { width: 20px; height: 20px; accent-color: var(--brand); }
.set-block { display: grid; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-block .t { display: grid; line-height: 1.5; } .set-block .t span { color: var(--ink-3); font-size: .82rem; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.q-chip { border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: .82rem; padding: 7px 14px; border-radius: 99px; cursor: pointer; color: var(--ink-2); }
.q-chip:hover, .q-chip:active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.asg-tag { font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: #e6f7f1; color: #067a56; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbox.assigned { border-color: #10b981; background: rgba(16, 185, 129, .1); } .fbox.assigned .fl { color: #067a56; }
.mg-tabs { display: none; }
@media (max-width: 1000px) {
  .mg { display: flex; flex-direction: column; padding-bottom: 96px; }
  .mg-side { display: contents; }
  .mg > .mg-side > *, .mg > .mg-doc { margin-bottom: 14px; }
  .mg[data-tab="doc"] [data-t="send"], .mg[data-tab="doc"] [data-t="track"],
  .mg[data-tab="send"] [data-t="doc"], .mg[data-tab="send"] [data-t="track"],
  .mg[data-tab="track"] [data-t="doc"], .mg[data-tab="track"] [data-t="send"] { display: none !important; }
  .mg[data-tab="doc"] .mg-doc { order: 2; }
  .mg-tabs { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px; box-shadow: 0 -8px 30px rgba(30, 40, 120, .08); }
  .mg-tab { position: relative; display: grid; justify-items: center; gap: 2px; border: 0; background: transparent; font: inherit; font-weight: 800; font-size: .76rem; color: var(--ink-3); padding: 7px 4px; border-radius: 14px; cursor: pointer; min-height: 54px; }
  .mg-tab .ti svg { width: 22px; height: 22px; }
  .mg-tab.on { color: var(--brand); background: var(--brand-soft); }
  .mg-tab .bdg { position: absolute; top: 4px; inset-inline-end: calc(50% - 26px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .68rem; font-style: normal; line-height: 18px; text-align: center; }
  .modal-back .modal { max-height: 92dvh; overflow: auto; }
}
@media (max-width: 640px) {
  .btn-sm { min-height: 42px; padding-inline: 14px; }
  .rc-a .btn, .share-row .btn { flex: 1 1 auto; justify-content: center; }
  .input, select.input { min-height: 48px; font-size: 16px; }
}
@media (max-width: 1000px) {
  .mg > .mg-side > *, .mg > .mg-doc { width: 100%; max-width: none; margin-inline: 0; box-sizing: border-box; align-self: stretch; }
}
.mg-side { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; } .mg-side > * { min-width: 0; max-width: 100%; } .mg-side .url, .mg-side [class*="link"], .mg-side code { overflow-wrap: anywhere; min-width: 0; }

/* ===== الحساب، واتساب، الترتيب ===== */
.acct-wrap { max-width: 980px; margin-inline: auto; }
.auth-card { max-width: 460px; margin-inline: auto; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--brand-soft); padding: 4px; border-radius: 14px; }
.seg button { border: 0; background: transparent; font: inherit; font-weight: 800; padding: 10px; border-radius: 11px; color: var(--ink-3); cursor: pointer; }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 4px 12px rgba(80, 70, 200, .12); }
.acct-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 6px 0 16px; }
.acct-top h1 { font-size: 1.5rem; margin: 0; }
.acct-stats { display: flex; gap: 10px; }
.acct-stats > div { display: grid; text-align: center; padding: 10px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); min-width: 84px; }
.acct-stats b { font-size: 1.35rem; } .acct-stats small { color: var(--ink-3); font-size: .78rem; } .acct-stats .ok b { color: #059669; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin: 16px 0; }
.doc-card { text-align: start; font: inherit; display: grid; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px; cursor: pointer; transition: transform .18s, box-shadow .18s; box-shadow: 0 6px 20px rgba(40, 40, 120, .05); }
.doc-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(80, 70, 200, .14); }
.doc-card.is-busy { opacity: .6; pointer-events: none; }
.dc-h { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.dc-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); } .dc-ico svg { width: 20px; height: 20px; }
.dc-m { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-3); font-size: .8rem; }
.dc-n { font-size: .8rem; font-weight: 700; color: #b45309; background: #fff7e6; padding: 5px 10px; border-radius: 10px; } .dc-n.warn { color: #b91c1c; background: #fff0ee; } .dc-n.purge { color: #6b7280; background: #f3f4f6; }
.hint-card { background: transparent; box-shadow: none; border-style: dashed; }
.wa-list { display: grid; gap: 8px; margin: 12px 0; max-height: 50vh; overflow: auto; }
.wa-row { display: grid; grid-template-columns: 38px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; }
.wa-row .nm { display: grid; min-width: 0; line-height: 1.3; } .wa-row small { color: var(--ink-3); }
.intro.wait { background: linear-gradient(135deg, #fff8ea, #f1efff); border-color: #ffe2a8; }
.set-block.acct { display: grid; gap: 10px; }

/* ===== الإدارة ===== */
.adm-wrap { max-width: 1100px; margin-inline: auto; }
.adm-tabs { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; max-width: 560px; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.adm-stat { display: grid; gap: 2px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; text-align: center; }
.adm-stat b { font-size: 1.6rem; } .adm-stat small { color: var(--ink-3); } .adm-stat.ok b { color: #059669; } .adm-stat.warn b { color: #d97706; }
.adm-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 6px 0 12px; } .adm-kv span { color: var(--ink-3); }
.adm-bar { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 12px; } .adm-bar .input { min-width: 0; }
.adm-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; margin-bottom: 10px; background: var(--brand-soft); border-radius: 14px; font-weight: 700; }
.adm-list { display: grid; gap: 10px; }
.adm-row { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.adm-row.off { opacity: .6; } .adm-row .nm { display: grid; gap: 1px; min-width: 0; } .adm-row .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .adm-row small { color: var(--ink-3); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.adm-chips, .adm-act { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-pager { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px; color: var(--ink-3); }
@media (max-width: 700px) {
  .adm-row { grid-template-columns: 40px 1fr; } .adm-row .adm-chips, .adm-row > .chip { grid-column: 2; justify-self: start; } .adm-row .adm-act { grid-column: 1 / -1; }
  .adm-row .adm-act .btn { flex: 1; justify-content: center; } .adm-bar { grid-template-columns: 1fr; }
}
.dev-login { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: #fff8e6; border: 1px dashed #f0c36a; margin-top: 4px; }
.dev-login small { color: #92400e; flex: 1; }
.tpl-list { display: grid; gap: 8px; margin-top: 8px; }
.tpl-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tpl-row .nm { display: grid; line-height: 1.35; } .tpl-row small { color: var(--ink-3); }
.imp-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: 10px 0; } .imp-table th, .imp-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: start; }
.imp-err { background: #fff0ee; color: #b91c1c; border-radius: 12px; padding: 8px 12px; margin: 4px 0; font-size: .85rem; }
.imp-box { max-height: 40vh; overflow: auto; }
.dev-login[hidden], .adm-filter[hidden] { display: none; }
.modal input[type=file] { width: 100%; padding: 10px; border: 1.5px dashed var(--line); border-radius: 14px; background: #fafaff; font: inherit; }
.modal input[type=file]::file-selector-button { margin-inline-end: 10px; border: 0; border-radius: 10px; padding: 6px 12px; background: var(--brand-soft); color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
.sigimg.adj { cursor: grab; outline: 1.5px dashed rgba(108, 92, 231, .8); outline-offset: 2px; z-index: 4; }
.sigimg.adj:active { cursor: grabbing; }
.sigimg .rz { position: absolute; bottom: -10px; right: -10px; width: 22px; height: 22px; border-radius: 7px; background: var(--brand); border: 3px solid #fff; cursor: nwse-resize; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); touch-action: none; }
.sigimg .rs { position: absolute; bottom: -12px; inset-inline-start: 0; border: 0; border-radius: 99px; background: #fff; color: var(--ink-2); font: inherit; font-size: 11px; font-weight: 700; padding: 3px 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); cursor: pointer; transform: translateY(100%); white-space: nowrap; }
.fbox.signed img { display: none; }

/* ===== صفحات الحذف/الإخفاء + تذييل المطوّر ===== */
.gone-card { max-width: 480px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 38px 30px 30px; text-align: center; box-shadow: var(--shadow-lg); display: grid; gap: 14px; justify-items: center; }
.gone-ico { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: #f1f3fb; color: var(--ink-3); }
.gone-ico svg { width: 36px; height: 36px; }
.gone-ico.ok { background: #e7f8f1; color: #059669; }
.gone-card h1 { font-size: 1.5rem; margin: 4px 0 0; }
.gone-lead { color: var(--ink-2); line-height: 1.8; margin: 0; }
.gone-meta { display: flex; gap: 10px; align-items: center; padding: 8px 16px; background: #f6f7fd; border-radius: 99px; font-size: .88rem; } .gone-meta span { color: var(--ink-3); }
.gone-act { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.fbox.masked { border: 2px solid var(--mint); background: rgba(16, 185, 129, .08); cursor: default; animation: none; }
.fbox.masked .fl { color: #059669; }
.sg-act { display: flex; gap: 4px; }
.dev-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: center; padding: 22px 16px 28px; font-size: .78rem; color: var(--ink-3); } .dev-foot i { opacity: .5; font-style: normal; } .dev-foot b { color: var(--ink-2); }
.scan-note { margin: 8px 2px 0; font-size: .8rem; color: var(--ink-3); } .scan-note.warn { color: #b45309; }

/* ===== الجوال: شريط إجراءات مضغوط وزر أساسي بارز ===== */
.sig-modal .sig-acts { position: sticky; bottom: -24px; z-index: 2; margin: 18px -24px -24px; padding: 12px 24px calc(14px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.sig-modal .sig-acts .btn-primary { flex: 1; justify-content: center; min-height: 52px; font-size: 1.05rem; font-weight: 800; }
@media (max-width: 640px) {
  .sbar { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .sbar-in { gap: 8px; }
  .sbar .prog { gap: 4px; }
  .sbar .prog small { font-size: .8rem; }
  .sbar .progress { height: 6px; }
  .sbar .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .sbar .acts .btn { min-height: 42px; font-size: .86rem; padding-inline: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sbar .acts .btn:only-child, .sbar .acts .btn-primary, .sbar .acts .btn-primary + .btn:last-child { grid-column: 1 / -1; }
  .sbar .acts .btn-primary { order: -1; min-height: 54px; font-size: 1.06rem; font-weight: 800; }
  .sign-wrap { padding-bottom: 170px; }
  .place-bar { gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 34px rgba(10, 16, 48, .35); }
  .place-bar p { font-size: .82rem; font-weight: 600; opacity: .85; }
  .toasts { bottom: auto; top: calc(14px + env(safe-area-inset-top)); }
  .sig-modal .sig-acts { flex-wrap: nowrap; }
}
